title: Biblatex: field "series" has wrong format

text: This is my first attempt to create my own style for Biblatex and Biber. I used chicago-authordate as a starting point, because it matches many of my requirements. By drawing from information found here, I was able to adjust most of the style to my requirements. Here is my last one, which I cannot solve. If the cited text is from a series, this information should be added as follows: > Lohndal, Terje. 2007. On the structure and development of nominal phrases in > Norwegian. In Nominal Determination. Typology, Context Constraints, and > Historical Emergence [Studies in Language Companion Series 89], Elisabeth > Stark, Elizabeth Leiss & Werner Abraham (eds), 285-308. Amsterdam: John > Benjamins. i.e. the series should be in square brackets as a title followed by the word "Series" followed by the series number. I adjusted the definition \DeclareBibliographyDriver{incollection} as follows:               \iffieldundef{series}     {}%     {\space%     \blx@bibopenbracket%     \printfield{series}%     \ Series%     \printfield[sernum]{number}%     \blx@bibclosebracket}%      Everything else works out nicely, but there is a comma after the opening square bracket: > [, Studies in Language Companion Series 89] Since the comma is within the square bracket, it has to come from the definition of "series" to the best of my understanding. I already tried to eliminate the comma with \DeclareSourcemap. I seem to apply the function correctly, since I can remove other characters but not the comma. I just don't know where it comes from. Here's what the relevant part of my file looks like:               \documentclass[a4paper,12pt]{article}     \usepackage[backend=biber,style=myownstyle]{biblatex}     \addbibresource{bib.bib}     \begin{document}     \cite[][]{Lohndal:OnTheStructure:2007}     \printbibliography     \end{document}


title: How to make a package to ignore parameters it doesn't know when loading in a class?

text: I'm defining a class that extends `article` that loads a package inside (`automultiplechoice`). I'm trying to configure the package and the class using the parameters of the `\documentclass` command. When I test for other packages (for example `hyperref`) it works (see code below).               \RequirePackage{filecontents}     \begin{filecontents*}{test.cls}     \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{test}[2012/02/10 Mini class for testing proposal]          \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}     \ProcessOptions\relax     \LoadClass{article}          % toggle this     \PassOptionsToPackage{linkcolor=blue}{hyperref}     \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{hyperref}}     \ProcessOptions\relax     \RequirePackage{hyperref}          \end{filecontents*}     \documentclass[colorlinks=true,legalpaper]{test}          \begin{document}     \section{Test}\label{foo}          \ref{foo}          \end{document}      However, when I change it to the `automultiplechoice` package, it doesn't (see code below)               \RequirePackage{filecontents}     \begin{filecontents*}{test.cls}     \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{test}[2012/02/10 Mini class for testing proposal]          \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}     \ProcessOptions\relax     \LoadClass{article}          % with this     \PassOptionsToPackage{lang=EN}{automultiplechoice}     \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{automultiplechoice}}     \ProcessOptions\relax     \RequirePackage{automultiplechoice}          \end{filecontents*}               \documentclass[legalpaper,lang=ES]{test}          \begin{document}     \section{Test}\label{foo}          \ref{foo}          \end{document}      In the latter, the unknown parameters for the `article` class (in this case `legalpaper`) trigger an error in the package, but I would like them to be ignored. I got the error > ! LaTeX Error: Unknown option `legalpaper` for package `automultiplechoice`. What I am missing? It has something to do with the `xkeyvalue` definitions? **I would like to be able to pass parameters to the package and to the class in the same definition in`\documentclass`.** How can I make that happen?


title: How to plot the absolute value of a hobby curve

text: I have a hobby curve that has regions above and below the horizontal axis. I would like to illustrate the difference between net and total area by being able to reflect the portion below the horizontal axis in the horizontal axis, i.e., take the absolute value of the hobby curve. Here is my code:               \documentclass{article}     \usepackage{pgf,tikz,amsmath,pgfplots}     \usepgfplotslibrary{fillbetween}     \usetikzlibrary{arrows,hobby}     \begin{document}         \pgfdeclarelayer{pre main}         \begin{tikzpicture}[scale=1.0,>=latex, use Hobby shortcut]             \pgfsetlayers{pre main,main}             \draw[name path=f,-] (0,3) .. (3,0) .. (6,-2);             \draw[->,thick] (-1.25,0) -- (7,0) node[above] {\footnotesize $t$};             \draw[->,thick] (-1,-3) -- (-1,4) node[below right]{\footnotesize $v(t)$};             \path[name path=xaxis] (0,0) -- (6,0);             \node[below] at (0,0) {\footnotesize $t_0$};             \node[above] at (6,0) {\footnotesize $t_1$};             \node at (1,1) {\tiny $\text{Area }=A_1$};             \node at (5,-0.75) {\tiny $\text{Area }=A_2$};             \tikzfillbetween[of=f and xaxis,split]{lightgray}         \end{tikzpicture}     \end{document}


title: fancyhdr does not display chapter name

text: I am using the fancyhdr package to create the headers and footers in my document. I wanted to display the chapter name on the left side of the page, so I defined my header like this:               \pagestyle{fancy}     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \lhead{\textcolor{deepgray}{\begin{myfont} \chaptername \end{myfont}}}     \renewcommand{\footrulewidth}{0.1pt}     \cfoot{\textcolor{deepgray}{\begin{myfont} \textbf{\thepage} \end{myfont}}}      Where the deepgray color was defined as:               \definecolor{deepgray}{RGB}{147,147,147}      And myfont is:               \newenvironment{myfont}{\sffamily\selectfont}{\par}      But instead of displaying the chapter name in the header, all I get is the text "Capítulo", which is "Chapter" in Portuguese (the language used in my document). I tried changing the language to English and I got the same thing, but now the header only says "Chapter".


title: Unable to make Russian hyphenation work after (re-)installing TeX Live 2013

text: I have just upgraded TeX Live to 2013 on Mac OS, and installed all the Cyrillic packages i could think of, but the hyphenation in Russian stopped working. Here is an example:               \documentclass[russian]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{babel}     \begin{document}          Польский язык (język polski, polszczyzna) — язык поляков, относящийся к лехитской подгруппе западнославянской группы славянской ветви индоевропейской языковой семьи.          \end{document}      The log output:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      \write18 enabled.     entering extended mode     (./hyphenation-test.tex     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 21 languages loaded.     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/inputenc.sty     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/utf8.def     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/t1enc.dfu)     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/ot1enc.dfu)     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/omsenc.dfu)))     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/fontenc.sty     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/t1enc.def))     (/usr/local/texlive/2013basic/texmf-dist/tex/generic/babel/babel.sty     (/usr/local/texlive/2013basic/texmf-dist/tex/generic/babel-russian/russianb.ldf     (/usr/local/texlive/2013basic/texmf-dist/tex/generic/babel/babel.def)          Package babel Warning: No hyphenation patterns were preloaded for     (babel)                the language `Russian' into the format.     (babel)                Please, configure your TeX system to add them and     (babel)                rebuild the format. Now I will use the patterns     (babel)                preloaded for english instead on input line 68.               Package babel Warning: No Cyrillic font encoding has been loaded so far.     (babel)                A font encoding should be declared before babel.     (babel)                Default `T2A' encoding will be loaded  on input line 111     .          (/usr/local/texlive/2013basic/texmf-dist/tex/latex/cyrillic/t2aenc.def     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/t2aenc.dfu))))     (./hyphenation-test.aux     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/cyrillic/t2acmr.fd))     Overfull \hbox (43.51624pt too wide) in paragraph at lines 9--10     \T2A/cmr/m/n/10 Í ÎÂıËÚÒÍÓÈ ÔÓ‰„ÛÔÔÂ Á‡Ô‡‰ÌÓÒÎ‡‚ˇÌÒÍÓÈ „ÛÔÔ˚ ÒÎ‡‚ˇÌÒÍÓÈ ‚ÂÚ‚Ë      ËÌ‰ÓÂ‚ÓÔÂÈÒÍÓÈ     [1{/Volumes/Data/Users/alexey/Library/texlive/2013basic/texmf-var/fonts/map/pdf     tex/updmap/pdftex.map}] (./hyphenation-test.aux) )     (see the transcript file for additional information){/usr/local/texlive/2013bas     ic/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t2a.enc}</usr/local/texlive/201     3basic/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb>     Output written on hyphenation-test.pdf (1 page, 18449 bytes).     SyncTeX written on hyphenation-test.synctex.gz.     Transcript written on hyphenation-test.log.      Could you suggest me anything, how to fix it, please?


title: MiKTeX Options submenu is greyed out in WinEdt 6.0

text: I have included the package `mtpro2` in my latex document using `\usepackage[lite,subscriptcorrection,slantedGreek,nofontinfo]{mtpro2}` as recommended here. The main reason is that I need very wide tildes, if that matters. I am using Winedt 6.0. When I try to follow the instructions at the link and add the `texmf` folder as a new root by going to `tex -> miktex -> miktex options` I find that all the submenus under the `miktex` submenu are greyed out (including update). So firstly I wonder why this is occurring and how to fix it, and secondly if there is another approach I can take. Please keep in mind that I am very new to using this ide and have only used the GUI (so I don't know any command line shortcuts at this point). Thank you very much!


title: Caption and footnote width with ctable

text: I am using `ctable` and I have a table with footnotes. Since the table is narrow, the caption text is squeezed in the table width, which looks odd. I can use `mincapwidth` to specify a minimum width for the table environment (not the table itself) which solves this issue, but creates another: it also applies to the footnote, which looks ugly since the footnote is small. Is there a way to make the footnote obey the width of the table itself and ignore `mincapwidth`? Example:               \ctable[     caption = {Somewhat long long long caption which is long},     mincapwidth = \textwidth,     ]{lr}{       \tnote[a]{Short footnote}     }{         \toprule         Header 1 & Header 2 \\         \midrule         foo\tmark[a] & 1 \\         \bottomrule     }      Which looks like this ![End result](http://i.stack.imgur.com/KhS7e.png)


title: How can I customize 'headsep' attribute in the geometry package so that I can set it for individual pages?

text: I use the `\geometry` package for formatting my CV, and I know (from How to remove vertical space between header and body of text?) that I can use the `headsep` attribute to customize the spacing between header and the text. But now, I need to have different spacing on the title page of my CV (headsep = 25), and the second page (headsep = 10). How do I do this?


title: How to color groups of bars in a graph, coming form an external file?

text: I have a graph displaying bars and error bars, the numbers comming from an external .dat, being simply black and white. ![black and white graph](http://i.stack.imgur.com/1Io30.png) And this is how I got there:               \documentclass[12pt]{report}     \usepackage{pgfplots}     \begin{figure} [ht]     \begin{tikzpicture}          \begin{axis}[xtick pos=left, unbounded coords=jump, scale=1.97, ybar, bar width=8pt, ylabel=$F_{Bruch}$\,${[N]}$,xtick=data,xticklabels from table={data.dat}{amount}]         \addplot [error bars/.cd,y dir=both,y explicit]         table[x expr=\coordindex,y=FB,y error =sFB]{dataEB.dat};         \end{axis}     \end{tikzpicture}     \vspace{-25pt}     \small     \begin{tabbing}         xxxxxxxxxxxxx\=xxxx\kill         \>\begin{tabular}[htbp]{*{6}{@{}c}}         $\underbrace{\;\;\;\;\;\;\;\;\;\;\;\;\;\;}$ & \;\;\;\;\,$\underbrace{\;\;\;\;\;\;\;\;\;\;\;\;\;\;}$ & \;\;\,$\underbrace{\;\;\;\;\;\;\;\;\;\;\;\;\;\;}$ & \,$\underbrace{\;\;\;\;\;\;\;\;\;\;\;\;\;\;}$ & \,$\underbrace{\;\;\;\;\;\;\;\;\;\;\;\;\;\;}$ & \;$\underbrace{\;\;\;\;\;\;\;\;\;\;\;\;\;\;}$ \\         PEL80\,L & \;\;\;\;PEL80\,B & \,\;\;\;\;PEL90A\,L & \;\;\;PEL90A\,B & \;\;\,PEL90B\,L & \;\;PEL90B\,B \\         \end{tabular}     \end{tabbing}     \caption{bla bla}     \end{figure}      I had to tweak the original data, so the error bars are in correct position (had to insert a few nan to get my spacing). And here is my question: How to get the bars of the different groups in different colors(e.g. PEL80L=red, PEL80B=green, ...)? And is there a smarter way to put those brackets below the groups? data.dat (shortened in rows and columns):               Name        FB  sFM seM sFB seB amount     PEL80-L-0   196.971 7.1561  20.3208 6.9981  18.3839 0     PEL80-L-5   187.389 7.5195  15.8812 8.0784  15.2679 5     PEL80-L-10  202.529 5.0238  7.0358  3.6911  7.8109  10     PEL80-L-15  194.160 16.3605 40.9362 12.9954 41.6095 15     PEL80-B-0   192.586 2.1435  6.5643  3.1437  7.9701  0     PEL80-B-5   130.047 36.6504 19.4086 36.3431 19.6311 5     PEL80-B-10  77.6493 8.6906  1.6346  8.6906  1.6346  10     PEL80-B-15  79.3942 6.1144  0.9555  5.3075  1.2452  15      dataEB.dat:               Name        FB  sFM seM sFB seB amount     PEL80-L-0   196.9710 7.1561 20.3208 6.9981  18.3839 0     PEL80-L-5   187.3894 7.5195 15.8812 8.0784  15.2679 5     PEL80-L-10  202.5292 5.0238 7.0358  3.6911  7.8109  10     PEL80-L-15  194.1602 16.360 40.9362 12.9954 41.6095 15     nan     nan  nan    nan nan nan 0     PEL80-B-0   192.5864 2.1435 6.5643  3.1437  7.9701  5     PEL80-B-5   130.0471 36.650 19.4086 36.3431 19.6311 10     PEL80-B-10  77.6493  8.6906 1.6346  8.6906  1.6346  15     PEL80-B-15  79.3942  6.1144 0.9555  5.3075  1.2452  0     nan     nan  nan    nan nan nan 5


title: Theorem environment in Italic form

text: In my whole report, I want to write all the theorems and definitions in Italic format. And the example and some other observations and Remark in Non-Italic format. I have put all these within \rm command. I don't want to remove it from whole document. Is there any possibility to make the change?


title: How to make index with alphabetic order?

text: Consider the following example :               \documentclass{article}     \usepackage{makeidx,multicol}     \makeindex     \begin{document}     All\index{All},Apple\index{Apple}, Ball\index{Ball}, , Small\index{Small},     Zoo\index{Zoo}           \printindex          \end{document}      Produces :   ![enter image description here](http://i.stack.imgur.com/GGj83.png) But I want like this :   ![enter image description here](http://i.stack.imgur.com/Obz0s.png) I use kile in ubuntu10.04. How can I do my job ?


title: How to use pstool and babelbib in the same document?

text: I'm trying to use the `pstool` package and the `babelbib` package in my document. I couldn't manage to process an `.eps` image, when one of the languages loaded by `babel` is `english`. Here's an example, with an arbitrary eps-image, that doesn't work on my system:               \documentclass{article}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}     \usepackage{pstool}     \usepackage{babelbib}     \EndPreamble     \begin{document}     \psfragfig{pic}     \end{document}      It works fine when either   * the `babelbib` package is removed,   * the `\usepackage{babelbib}` is moved below the `\EndPreamble` or   * `babel` is loaded with a different language, like `ngerman`. Hence the `\--shell-escape` should be set up properly. But these work-arounds either change the document or require a major alteration of the preamble. Is there another way to get this to work? Here's the first error from the `.log` of the auto-generated `.tex`-File:               ! Improper \spacefactor.     \@->\spacefactor                       \@m      l.17 \immediate \write \@                              mainaux {\@percentchar <*PSTOOLLABELS>}     You can refer to \spacefactor only in horizontal mode;     you can refer to \prevdepth only in vertical mode; and     neither of these is meaningful inside \write. So     I'm forgetting what you said and using zero instead.      I'm using MiKTeX 2.9:   * `babel`-Version: v3.8m   * `pstool`-Version: v1.5a   * `babelbib`-Version: v1.31


title: Rubber Fails Using XeLaTeX

text: My document builds just fine using `xelatex`, but now I am trying `rubber` and I get the following error:               $ rubber --module xelatex proposal     Source path uses special characters, error tracking might get confused.     compiling proposal.tex...     /usr/local/texlive/2013/texmf-dist/tex/latex/fontspec/fontspec.sty:41: ..............................................       /usr/local/texlive/2013/texmf-dist/tex/latex/fontspec/fontspec.sty:41: leading text:  }      I have no idea how to debug this, since the error appears to be in `fontspec.sty` and not in my document itself. I don't think I'm doing anything particularly weird in my preamble either:               \documentclass[letterpaper,11pt,oneside]{report}           \usepackage[T1]{fontenc}     \usepackage[final]{microtype}     \usepackage[margin=1.0in]{geometry}     \usepackage{graphicx}     \usepackage{fontspec}     \usepackage[backend=bibtex,url=false]{biblatex}     \usepackage{hyperref}     \usepackage{titlesec}     \usepackage{fancyhdr}     \usepackage{lipsum}          \pagestyle{fancy}     \lhead{\textit{My Proposal}}     \rhead{\textit{Mark A. Richman}}          \renewcommand{\chaptername}{}     \setcounter{chapter}{0}     \titleformat{\chapter}{\normalfont\huge\bfseries}{\chaptertitlename\thechapter}{1em}{}     \titleclass{\chapter}{straight}          \setmainfont[Ligatures=TeX]{Minion Pro}     \setsansfont{Myriad Pro}     \setmonofont[Scale=MatchLowercase]{Menlo}     \newfontfamily\titlefont[Scale=2.0,Ligatures=TeX]{Minion Pro}     \urlstyle{same}


title: Loading a math font with stylistic set in plain XeTeX

text: How does one activate a stylistic set in plain XeTeX? I have tried:               \font\test="XITS Math:+ss01" % for calligraphic     \textfont2=\test     $ \fam2 A $     \bye      but with no luck.


title: Having right and left wrapping floats nicely respecting page boundaries and margins

text: I was passing some documents I had in HTML to LaTeX for a better printout. (Same project as my previous question.) The documents use usual HTML/CSS floating images (sometimes the images are inside a floating `div` including a caption.) I would like to keep the behavior, so I am using the `wrapfig` package, however I have noticed that floats do not flow nicely through page breaks, footnotes (and presumptly other footers) etc. The complete sample is stored in Github. However I include here a short version:               \documentclass[10pt]{article}     \usepackage{graphicx,wrapfig}     \newlength{\px}%     \setlength{\px}{0.26mm}     \begin{document}     \section{Lorem ipsum \& rose}     \begin{wrapfigure}{l}{300\px}\centering     \includegraphics[width=300\px,height=197\px]{rose300.jpg}     \caption{Lorem ipsum dolor sit amet}     \end{wrapfigure}     Lorem ipsum dolor sit amet, consectetur adipiscing elit.\footnote{%     from \emph{http://lipsum.net}} Mauris in tortor eu risus convallis     pharetra. Suspendisse potenti. Ut malesuada sed lorem molestie volutpat.     Vivamus volutpat eu tortor non tempor.     \begin{wrapfigure}{r}{240\px}\centering     \includegraphics[width=240\px,height=158\px]{rose240.jpg}     \caption{Aenean feugiat justo nisi}     \end{wrapfigure}     Aenean feugiat justo nisi, eget blandit ligula tristique non. Nam non     lectus est. Curabitur vel scelerisque urna. Sed auctor molestie leo ac     luctus. Quisque ornare tellus tortor, vel convallis purus elementum id.     Vestibulum lectus nibh, ultrices placerat aliquam vel, accumsan ut elit.     \end{document}      The longer version will produce the following output: a![page 1](http://i.stack.imgur.com/0kpa6.png)b![page 2](http://i.stack.imgur.com/X1ij0.png) Note that the third figure is outside the bottom margin overlapping the footnote and the text in the beginning of the second page is reserving space for the image that is not there. The project has over 167 different documents (posts), currently compiling over 609 pages, and with 168 images (currently 40 of them inside a `wrapfigure` environment, but this number might get higher when I complete my conversion script). Manual tuning is not an option for now. So: How can I get the figures to flow nicely between pages preserving as much as possible the original format of the post?


title: How to indent equations?

text: I have 2 equations which looks like: A = B+ C + D... , While x is true. The problem is, the equation is quite big which goes on for 2 lines. How do I give an indent to the second line so it looks like:               A = B + C + D + E + F +         G + H + I + ... , while x is true.


title: Cross-referencing items in two-level enumerate environment

text: In LaTeX I have an enumerate environment embedded inside another enumerate environment.               \documentclass{article}     \usepackage{enumerate}     \begin{document}          \begin{enumerate}[(i)]     \item now we have another list\label{lab1}     \begin{enumerate}[(a)]     \item item one of second list     \item item two of second list\label{lab2}     \end{enumerate}     \item or another case     \end{enumerate}          \end{document}      I want to refer to part (i)(b), and have tried using `\eqref{lab1}\eqref{lab2}`. This produces the result (i)(ib). What is the correct way to obtain (i)(b)? **Note:** This question has been migrated here from Stack Overflow.


title: Appendix in LaTeX

text: I have the following document:               \documentclass[11pt,a4paper,twoside]{book}      \usepackage[spanish,activeacute]{babel}      \usepackage[titletoc]{appendix}           \begin{document}            \setcounter{tocdepth}{2}        \setcounter{secnumdepth}{3}        \tableofcontents            \chapter{First chapter}            \begin{appendices}        \addappheadtotoc        \appendixpage        \clearpage        \chapter{Some name}        \label{label1}        blah blah       \end{appendices}          \end{document}      this gives in the ToC:               Apéndice Appendices....................60     Apéndice A. Some name..................63      and in the body of the document:               Appendices     (page skip)     Apéndice A     Some name          blah blah        1. The TOC shows `"Apéndice Appendices"` and I need it to show `"Apéndices"` (note the "s" at the end of that word; it's **not** the same word that the first one currently in the TOC) Also in the body of the document it shows `"Appendices"` (in english) and I also need it to say `"Apéndices"` (in spanish), ie: the same word that should be displayed in the TOC. This looks like a `babel` issue to me.   2. Is there a way **not** to have to give each appendix a name? This is done with the `\chapter{Some name}` command, but I'd like the name of `Apéndice A` to be just that: `Apéndice A`. This way the ToC would look like (assuming the 1st point is fixed):              Apéndices........................60     Apéndice A.......................63      and the body of the document:              Apéndices     (page skip)     Apéndice A          blah blah      Is there any way to do this? * * * I think a hack to accomplish the 2nd point would be to combine @murray's answer with not giving a name to the chapter. This is, this line `\chapter{Some name}` would have to be replaced by:               \chapter[]{}      It's not pretty but I think it gets the job done. If anybody knows of a more elegant way to do this, please let me know.


title: How to insert a specific unicode character (such as the ZWNJ symbol) into the text stream via lua code compiled by Lua(La)TeX?

text: How does one instruct Lua(La)TeX -- specifically, the lua code invoked via a `\directlua` directive -- to insert a non-ASCII unicode symbol, such as a "zero width non-joiner" symbol (code U+200C), into the text stream? I already know how to do this inside the body of a (Lua)LaTeX document -- I'd type something like                stuff\char"200C{}morestuff      But how does one do this from inside lua code? * * * _Addendum_ to (hopefully...) clarify what I'm trying to get done. If there's a string in the input stream such as `xyz123`, I'd like to insert a specific character (this evil invisible ZWNJ character...) between `xyz` and `123`, so that the input stream now is               xyz<ZWNJ>123      I already have the code to (i) find all instances of `xyz123` in the input stream and (ii) find the insertion point for the ZWNJ character inside the string `xyz123`. What I'm stuck with is trying to figure out how to insert the ZWNJ character (a "node" in luatex speak? of what type?) at the insertion location.


title: biblatex ieee style same authors

text: I just realized that when using `ieee` style in `biblatex`, when two articles in my bibliography share the same authors, the second article the authors disappear and a line is used instead. Is there any easy way to change this behavior without changing the style?


title: Author-year citation with natbib and Springer's spbasic bibliography style

text: I found many solutions to similar problems here, but I still cannot solve this one: I'm using Springer's template like this:                \documentclass[twocolumn, natbib]{svjour3}           \usepackage{graphicx}      \usepackage{natbib}      ...      \bibliographystyle{spbasic}      % basic style, author-year citations      \bibliography{my_bibliography}      and I get an error: Bibliography not compatible with author-year citations. I really cannot figure out what I'm doing wrong.


title: Clickable box malformed in TOC when using math in heading and the Latin Modern Math font

text: The clickable box (the actual hyperlink) in the TOC is too heigh when using the Latin Modern Math font. ![clickable box too large](http://i.stack.imgur.com/HOuBF.png) Using Cambria Math everything looks normal. Using the `\texorpdfstring{}{}` command does not help. Minimal example:               %!TEX TS-program = xelatex     \documentclass{article}          \usepackage{unicode-math}     \setmathfont{Latin Modern Math}          \usepackage[psdextra]{hyperref}          \begin{document}     \tableofcontents     \section{My first chapter}     \section{My second chapter which includes $\pi$ and $\gamma$}     \section{My third chapter}     \end{document}      ## Update It looks like it is a problem with the internal height of the glyphs in the font which hyperref does not use correctly. When viewing the font using using quick view on Mac a similar problem appear with huge space between lines. ![Latin Modern Math](http://i.stack.imgur.com/ixeXf.png) ![Latin Modern Regular](http://i.stack.imgur.com/CSMgx.png)


title: Modify footer of first page in custom class

text: I know I can do               \maketitle     \thispagestyle{fancy}      But I want my custom class that I am making (based on article) to do this for me. It already does `pagestyle{fancy}`, but I can't get it to change the first page. I tried (adding this to `myclass.cls`)               \AtBeginDocument{\thispagestyle{fancy}}      but that didn't work. I also tried redefining `\maketitle` and adding it at the end:               \def\@maketitle{%         \newpage         \null         \vskip 2em%         \begin{center}%         \let \footnote \thanks             {\LARGE \@title \par}%             \vskip 1.5em%             {\large                 \lineskip .5em%                 \begin{tabular}[t]{c}%                     \@author                 \end{tabular}\par%             }%              \vskip 1em%             {\large \@date}%         \end{center}%                                                                         \par         \vskip 1.5em%         \thispagestyle{fancy} %%%%%%%%%%%%% HERE     }       but that didn't work either.


title: How to decrease space above shaded parbox in Lyx?

text: I'm using default settings in Lyx for document class etc., and use several small shaded boxes (via Insert -> Box -> Shaded Background). How do I decrease the amount of vertical space above and below these boxes? It is much more than for a Simple Frame box. Thanks!


title: How to put legend graphic representation to the right of the label

text: All the `pgfplots` examples I could find have the graphic (e.g. symbol) to the left of the label (see example below) in the legend. I think this default is very good but due to space constrains I have to switch the order (together with the options `legend cell align=right`). **How do I put the legend graphic representation to the _right_ of the label?** Here it is a typical example with graphics on the _left_ (`\--*-- Case 1`), but I want `Case 1 --*--`. ![totheleft](http://i.stack.imgur.com/F7jxf.png)


title: Is the a way to plot preimages of points/set of functions?

text: Suppose I have a function f:A ->A. I can plot this function in a cartesian coordinate system in tikz/pgf. Can someone explain to me how to plot for a specific point a in A and a natural number m the m-time preimage of a (meaning the point in A, that evaluates to a, if f is m times applied) ? Is it also possible to plot the preimage of an entire subset, that consists of more than a single point, of A ?


title: Formatting table with siunitx: problem with parentheses and signs

text: I basically need to create a regression table with coefficients on one line, and t-statistics in brackets on the second line. However, I have a problem when the t-statistics are negative. When I compile the code, I get a misplaced sign token error. Here is the code that I used:               \documentclass[12pt,a4paper,twoside]{article}     \usepackage[french,german,english]{babel}                           \usepackage{array}     \usepackage{multirow}     \usepackage{amsmath, amssymb,mathrsfs}       \usepackage{siunitx}     \sisetup{     input-symbols = {()},     group-digits  = false,     explicit-sign     }          \begin{document}     \begin{table}[H]     \centering     \begin{tabular}{l S S}     &\multicolumn{1}{c}{Proportion taken}&\multicolumn{1}{c}{Decision category}\\          Coefficient   &      -0.116** &      0.711** \\     t-test & (-0.23094) & (3223.3)\\          \end{tabular}     \end{table}          \end{document}      If I change the -0.23094 to 0.23094, it works fine, but not when I include the sign.


title: Plotting iterated functions

text: As explained to me here, one can plot iterations of a point "b" in A under the functions f:A -> A. Is it also possible to plot the entire function iterated, meaning given a function "f", is it possible to plot f composed with f; or f composed m times with itself ?


title: When should I upload my new style?

text: I've been working lately in a new style for my university, which is heavily influenced by a pre-existing style (`feupteses`). However, `feupteses` was never meant for PhD dissertations, so I decided to start working in a new version since it wasn't good enough. ...but, at the same time, mine is still not good enough either. It is pretty good, and works just fine, but it still has some minor details I'd like to correct. I'm practically working everyday with it, improving it whenever I need new things or to correct the ones I already had (almost already fully passed this stage). So, my question is: Should I upload what I have up until now to CTAN? Should I wait a little longer to have it more polished? Should I never upload it and just pass it through my colleges as I see they need it (i.e., this shouldn't go to CTAN)? What should be the right way to treat something that is in need (as some of my friends have asked me for this style), but it is not as good as expected yet?


title: numbers pages too near to titlepage

text: in my document the number of page is located at top-right and is too near to the title of the page.how can I put the number of the page at the bottom?I'm using book class with oneside option here an example ![enter image description here](http://i.stack.imgur.com/dZ1L9.png) this is a small example where you can see the number page and the a part of title too near.               \documentclass[a4paper,12pt,oneside,titlepage]{book}          \usepackage[T1]{fontenc}     \usepackage[applemac]{inputenc}     \usepackage[italian]{babel}          \usepackage{setspace} %setta l'interlinea a 1,5 \onehalfspacing     \usepackage{indentfirst}     \usepackage{microtype}     \usepackage{layaureo}     \usepackage{graphicx} %include immagini     \usepackage{caption}  %didascalie     \usepackage{amsmath,amssymb,amsthm}        % matematica          \begin{document}          \input{Capitoli/capitolo_1} \input{Capitoli/capitolo_2}          \end{document}


title: everymath and set font for math

text: I’m trying to have all the math components of my table in `\mathsf` and `\mathbf`. I thought I’d use `\everymath` to set the `\scriptscriptstyle`, `\mathbf` and `\mathsf`, but I’m not able to figure it out.               \boldmath     \everymath{\scriptscriptstyle\mathsf}      Any ideas?


title: Problem with overwriting diagram files using feynmf

text: I've just installed feynmf package and tried working with a standard example. I'm working with MikTeX 2.9 on Windows. The compilation worked fine and I got the diagram in the PDF, but when changing the code nothing happens. It seems as if there is some problem with the rights concerning overwriting the already created diagram files. There was another question similar to this one and the answer was simply "rerun mf after a change in a diagram". I have already tried but I still got the same problem. I can't overwrite the already created diagram and I always get the same diagram. The way I rerun mf is: mf "\mode=localfont; input diag1", where (of course) "diag1" is the fmffile name in .tex source. Any suggestions? Thank you very much!


title: \endcsname and multiply-defined labels.

text: I am fairly new to latex but have written a few documents using it, with no major errors. I am currently writing my dissertation and after inserting a figure I generate an error. Here is the code causing the error:               \begin{figure}[h]     \centering     \includegraphics[width=0.5\textwidth]{helix.jpg}     \caption{$\alpha$ -helix formation}     \label{fig:$\alpha$ -helix formation}     \end{figure}      I think mainly the $\alpha$ parts, and it seems to be due to it being included within a list of figures. I have also just noticed it says I have multiply-define labels.               [5] [6] (./DissertationLayout.aux     ./DissertationLayout.aux:38: Missing \endcsname inserted.     <to be read again>                         \alpha      l.38 ...ha $ -helix formation\relax }{figure.3}{}}          ?      ./DissertationLayout.aux:38: Missing $ inserted.     <inserted text>                      $     l.38 ...ha $ -helix formation\relax }{figure.3}{}}          ?      ./DissertationLayout.aux:38: Extra \endcsname.     \@newl@bel ... \bbl@tempa \csname #1@#2\endcsname                                                        \def \bbl@tempb {#3}\@safe...     l.38 ...ha $ -helix formation\relax }{figure.3}{}}          ?      )          LaTeX Warning: There were multiply-defined labels.


title: y label tikz plot interferes with y axis

text: I'm trying to make an tikz plot from a matlab plot. The problem is that de y label is on the y axis. ![Plot image](http://i.imgur.com/blLSA.png) I used the following code:               \begin{tikzpicture}          \begin{axis}[%     width=\figurewidth,     height=\figureheight,     scale only axis,     xmin=0, xmax=320,     xlabel={$\text{Debiet [m}^\text{3}\text{/h]}$},     xmajorgrids,     ymin=0, ymax=9e-006,     ylabel={$\text{d}_{\text{p,100\%}}\text{ [m]}$},     ymajorgrids,     axis lines=left,     title={ },     legend style={nodes=right}]     \addplot [     color=black,     solid     ]     coordinates{     ...     addlegendentry{$\text{d}_{\text{p,100\%}}\text{ bij ideale aanstroming}$};          \end{axis}     \end{tikzpicture}      . I tried several things but it still doesn't work. Is there a way I can move the y label to the right or use a common scaling factor on the y-axis.


I just started to use LaTeX and I have the following error running the blank university template using TeXworks: > ! LaTeX Error: File `isodate.sty' not found. > > Type X to quit or to proceed, or enter new name. (Default extension: sty) > > Enter file name: I can run older templates without problems as long `\RequirePackage[english,ngerman,num]{isodate}` is not written in the `.cls` file. Is there an error in the template or do I just miss something?


title: Replace all spaces with hyphens

text: It is good practice for legal documents to have hyphens instead of spaces so nobody can add anything to a contract after signing it. E.g.               ------------------------------------------     ------------Contract----------------------     ------------------------------------------     The-parties-of-this-contract-agree-to-----     lorem-ipsum-dolor-sit-amet----------------     ------------------------------------------      Could this be possible to achieve in LaTeX without the verbatim package?


title: Want to adjust the 1 page 2 column CV setting?

text: \documentclass[a4paper]{article}     \usepackage{tabularx}     %\usepackage{doublespace}     %\setstretch{1.2}     \usepackage{ae}     \usepackage[T1]{fontenc}     \usepackage{CV}          \usepackage[colorlinks]{hyperref}     \hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=blue}          \setlength{\textwidth}{5in}     \setlength{\textheight}{660pt}          \setlength{\oddsidemargin}{42pt}     \setlength{\topmargin}{-20pt}          \newcommand{\ingreen}[1]{{\color{blue}#1}}               \begin{document}     \twocolumn     \pagestyle{empty}     \begin{center}     %\huge{\textsc{Curriculum Vitae}}     %\vspace{0.5\baselineskip}          \huge{\textsc{Name}}     \end{center}     \vspace{0.25\baselineskip}                    \section{Contact Information}     \begin{flushleft}          Email: \ingreen{abc@gmail.com} \\     Skype: abc\\     Mobile: +00-000-1234567 \\     Phone: +00-00-1234567     \end{flushleft}          \section{Objective}     \begin{flushleft}      To become a good researcher in my field.     \end{flushleft}               \section{Education}          \begin{CV}     \item[\ingreen{August 2007--August 2009}]     \item[Master(Biochemistry)]     \item[University Name]     \item[City, Country]     \item[Area: Biochemistry]     \item[\ingreen{August 2002--September 2006}]     \item[BS(Hons)]     \item[University Name]     \item[City, Country]     \item[Area: Biology]     \end{CV}     \section{Research Work}     \begin{flushleft} My Master degree thesis is on \emph{Research}.     \end{flushleft}          \section{Technical Expertise}     \noindent     \begin{itemize}     \item  MATLAB, Mathematica, C/C++, \LaTeX, \LaTeX Draw, Mayura Draw, MS Office     \end{itemize}          \section{Area of Interest}     \noindent          \section{Hobbies $\&$ Sports}     \noindent     \begin{itemize}     \item Studying Books, Cricket, Watching Sports Channels     \item Music, Movies, Photography     \end{itemize}               \section{References}                              \end{document}        1. First Problem to centralizing the Name.    2. Second Equalize the horizontal lines.  ![enter image description here](http://i.stack.imgur.com/dhOnE.jpg)


title: How does latex source multiple configuration files..?

text: I have got a very peculiar question I'd like to ask about my latex processor:   * In my school we are using the pdfTeXk backend. At some point there was a need to make a few configuration changes within the `/usr/share/texmf/web2c/texmf.cnf` configuration file (essentially set some values).   * However since it's the school server I'm working on, I don't have root access to modify that file. Instead, we were told to create a texmf folder `~/texmf` under our home directory and put any additional packages and configuration files in there should we needed to. And so I did by creating `~/texmf/texmf.cnf` and placing my custom settings in it. Now, the system is set to look for its configuration files using an environmental variable called `TEXMFCNF`. The default configuration location can be checked by issuing `kpsewhich texmf.cnf`. The problem is that if I set it to point to my custom configuration folder at `~/texmf` it will ignore the default one in `/usr/share/texmf/web2c` (which contains many other settings I need) and only fetch mine. The same happens the other way around. Eventually the question is: How do I make latex fetch both of the texmf.cnf files? * * * ( _This question is an exact replica of this one:http://stackoverflow.com/questions/11854289/how-does-latex-source- multiple-configuration-files and is posted here after suggestion of the user Andrea Bergia_)


title: microtype versus mathastext: unknown slot number error

text: The following MWE compiles with `pdftex` but produces a mysterious warning.               \documentclass{article}     \usepackage{libertine}     \usepackage{mathastext}     \usepackage{microtype}     \begin{document}     Here is some text     \end{document}      The warning is:               Package microtype Warning: Unknown slot number of character     (microtype)                `\%'     (microtype)                in font encoding `OT1' in protrusion list     (microtype)                `default'.      There doesn't seem to be anything wrong with the compiled document, but I get dozens of this error in the full doc and I was wondering what it meant... Adding `\usepackage[T1]{fontenc}` doesn't help (except the error is now about T1 encoding instead. Permuting the order of the packages doesn't seem to help either. A `\listfiles`:                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)      fontenc.sty        t1enc.def    2005/09/27 v1.99g Standard LaTeX file     libertine.sty    2009/05/22a - 4.5.1a -LaTeX: Font libertine - (License GPL) Michael Niedermair       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)         calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)       ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive       pdftex.def    2010/03/12 v0.04p Graphics/color for pdfTeX       xspace.sty    2006/05/08 v1.12 Space after command names (DPC,MH)          fxl.inc          fxb.inc     microtype.sty    2009/03/27 v2.3d Micro-typography with pdfTeX (RS)     microtype.cfg    2009/03/27 v2.3d microtype main configuration file (RS)     mathastext.sty    2011/02/07 1.12 Use the text font in simple mathematics        t1fxl.fd    2009/05/22 scaled font definitions for libertine T1/fxl (Nm).     supp-pdf.mkii      ***********      Like I said, this error doesn't seem to translate into anything _wrong_ with the output PDF, but I'd like to know what's going on. (I'm trying to get rid of the clutter from my log file... I've learned that the `silence` package can hide these errors, but I'd like to know what's causing it. It seems that it's not a conflict with that particular font, since it also works if you substitute other fonts for `libertine`. Can anyone confirm that they get this error?


title: Using the booklet package and the geometry package together

text: When I use the `booklet` package alone, it works just fine and produces the output I expect. However, when I combine it with the `geometry` package, it produces really bad output. Here's my MWE. First, I comment out the `geometry` package:               \documentclass[11pt]{article}     %%\usepackage[landscape]{geometry}     \usepackage[print]{booklet}     \usepackage{lipsum}     \setpdftargetpages     \begin{document}     \lipsum[1]     \newpage     \lipsum[2]     \newpage     \lipsum[2]     \end{document}      which gives me the following output. Notice the results are in portrait format - I want landscape: ![booklet w/o geometry package](http://i.stack.imgur.com/d8hFs.png) Here are results from the same file with the `geometry` line uncommented. The orientation is in landscape format, but the margins are all wrong. Notice how the text clips on the first page and overlaps on the second: ![booklet w/ geometry package](http://i.stack.imgur.com/kTqcj.png) How can I make the `geometry` package work with the `booklet` package? I am using TeXLive 2012, by the way. p.s. My apologies for the unscaled images.


title: How can I use \patchcmd with commands with optional arguments?

text: > **This question led to a new package:**   >  `xpatch` This is likely a simple question, but I'm getting stuck on the small details. I have an internal command, defined by a package as               \newcommand\foo@[3][]{...stuff...}      and somewhere in there I'd like to patch the command to include a call to `\label{#1}`. I'm already using `etoolbox`, so I planned to use               \patchcmd{\foo@}{hook}{\label{#1}hook}{success}{failure}      Unfortunately this doesn't work, because `\foo@` is defined as               > \foo@=macro:     ->\@protected@testopt \foo@ \\foo@ {}.     l.359 \show\foo@      Which has no parameters and therefore the patching code fails. So I tried to figure out how to get `\\\foo@ ` (note the doubled slash and the trailing space) as a csname, and I got snarled up. So then I tried using the old-style approach of `\let\my@foo@=\foo@\renewcommand\foo@[3][]{...\my@foo@[#1]{#2}{#3}` -- I know the original idiom is to use `\let` and `\def`, but since `\foo@` was defined with `\newcommand` I tried using `\renewcommand`. But this doesn't work, and fails with a TeX capacity exceeded error, and the log file appears to show an endless cycle of macro expansion. **So**. What is the correct name for the internal macro defined by `\newcommand` when optional arguments are present, and how do I build the csname for that so I can patch it with `\patchcmd`?


title: Wrapfigure with tikzpicture not appearing where it should

text: I am trying to insert insets of commutative diagrams into my tex, using wrapfigure and tikz. The first commutative diagram (inside a wrapfigure environment) appears as it should, but the second commutative diagram (inside its own wrapfigure) appears much lower than it should, in a later paragraph. Here is a minimum-working-example:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix,arrows}     \usepackage{wrapfig}     \begin{document}          %+Title     \title{Article Title}     \author{Author}     \date{\today}     \maketitle     %-Title          %+Abstract     \begin{abstract}     test     \end{abstract}     %-Abstract               \section{test}     \begin{wrapfigure}[5]{r}{0.3\textwidth}     \vspace{-18pt}     \hspace{-0pt}     \begin{tikzpicture}[description/.style={fill=white,inner sep=0pt}]     \matrix (m) [matrix of math nodes, row sep=3em,     column sep=2.5em, text height=1.5ex, text depth=0.25ex]     { M & & N \\     & D & \\ };     %\draw[double,double distance=5pt] (m-1-1) – (m-1-3);     \path[<->]     (m-1-1) edge node[description] {$ f $} (m-1-3)     edge node[description] {$ \Phi $} (m-2-2)     (m-1-3) edge node[description] {$ \Psi $} (m-2-2);     \end{tikzpicture}     \end{wrapfigure}     one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one one\\     \begin{wrapfigure}[5]{r}{0.3\textwidth}     \vspace{-18pt}     \hspace{-0pt}     \begin{tikzpicture}[description/.style={fill=white,inner sep=0pt}]     \matrix (m) [matrix of math nodes, row sep=3em,     column sep=2.5em, text height=1.5ex, text depth=0.25ex]     { M & & N \\     & D & \\ };     %\draw[double,double distance=5pt] (m-1-1) – (m-1-3);     \path[<->]     (m-1-1) edge node[description] {$ f $} (m-1-3)     edge node[description] {$ \Phi $} (m-2-2)     (m-1-3) edge node[description] {$ \Psi $} (m-2-2);     \end{tikzpicture}     \end{wrapfigure}two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two two               \end{document}      The second diagram appears below the "two" section, rather than to the right of it as I intend. What am I doing wrong? `


title: Tex capacity exceeded, sorry [input stack size = 5000]

text: This is the error I am getting since I have added some new references to my .bib file. I think is more than a filled stack. Any ideas? references.bib It was requested a minimum working example but I am working on a template and it was quite difficult for me cut it out. This is my complete structure. The master document is thesis.tex and the problem is raised only under related_work chapter. If you have the time to look at it, I would highly appreciate it. Here is the complete document.


title: Is there a simple way to retroactively add the \long prefix to a macro's definition?

text: According to chapter 20 of the _TeXbook_ , a macro that is defined as "long" (by saying `\long` just before `\def\<macroname>`) allows arguments with `\par` tokens (i.e., paragraphs). Suppose I encounter a macro that is _not_ "long" (e.g. `\thanks`, the title equivalent of `\footnote`). I want to allow paragraphs in its argument, but not to change the macro's definition in any other way. Obviously, I could look up the meaning and define the macro anew, this time as "long". But is there a simple way to add the `\long` prefix?


title: How/Where can I commission diagrams for my *TeX papers?

text: Suppose I want to pay someone to draw one or more mathematical/scientific diagrams for a paper or book using TikZ, Asymptote, PSTricks, Sketch, MetaPost, or another TeX-friendly system. Preferably, I should be able to make small changes myself, and possibly even use the commissioned code as a learning tool. What options are available? What sort of costs are considered reasonable? Motivation: For one thing, it might be useful to refer people to this question when they ask "draw-it-for-me" types of questions. **Important note:** Answers should describe an existing service or advertisement, or else give evidence that no such service exists. This question is not intended to solicit bids (or, for that matter, as a place for advertisement, unless you happen to already offer such a service).


title: Write a word with the \LaTeX style

text: I would like to know how can I write a text in the same way that `\LaTeX` is written, I mean the even characters must be a little below the rest or the opposite with the odd characters.


title: How to avoid the need to declare already declared items in \index?

text: **Code:**               \documentclass{article}          \usepackage{index}     \usepackage{lipsum}     \makeindex          \begin{document}          \section{\index*{Hello World}}          Hello World          Some text about \index*{foo}.          \lipsum[1-15]          Hello World.          \printindex          \end{document}      **Output (Index):** foo, 1 Hello World, 1 **Problem Statement:** The other occurrences of "Hello World" are missed-out in the index.   * I have not included the other occurrences of "Hello World" under the \index{} tag.   * But I expect that this way I have declared a key-word to the index.   * LaTeX should take care of future references of "Hello World" itself. Is there any way (without using any tcl script) that once I specify a keyword using \index{}, the next occurrences of this word (if located on a different page) should be automatically entered in the index?


title: Customizing "Algorithmic" or generating output of the same style

text: The algorithmic sample code that I am using is something like this:               \begin{algorithm}[h]       \caption{Caption Here.} \label{alg:Name}          \begin{algorithmic}[1]       \REQUIRE       \ENSURE         \STATE         \STATE         \STATE          \end{algorithmic}          \end{algorithm}        > How can I customize the algorithmic output? for example, when I just entered > the \REQUIRE it give me the Setup keyword. BTW, I don't want the numbering > along each line, may be I just should not use this package at all :D. I tried to bypass using such package with some \hrule and \rule defined above and below the text like this:               \rule{\textwidth}{2pt}       Some text goes here for cation of the algorithm       \rule{\textwidth}{2pt}         But the text and everything in between goes to the outside of page margin. I just used the code               \vspace{2pt}       \hrule       \vspace{2pt}                instead of the second `\rule` but still not satisfied with the output, esp. the thickness of the `\hrule`. ![alt text](http://i.stack.imgur.com/ObVBW.png) Please ignore the Persian writings, I want the headline of my algorithm like that without using algorithmic, or using algorithmic package and customized texts for '\ENSURE' and '\REQUIRE'. > **Edit (New Question)** : How can I have the same output using ordinary > lines? In other words, how can I define the thickness of two consecutive > lines such that the text in-between does not fall outside of the page > margin?


title: How to remove caption of some subfigures?

text: I have four figures and want to put them together as subfigures. However, I don't want the first one to have a caption. Can anybody figure it out please? Thank you in advance!               \begin{figure}[t!]     \centering     \subfigure[]{     \includegraphics[width=5.2in]{legend.eps}     }\\     \subfigure[]{     \label{fig:1}     \includegraphics[width=4.8in]{fig1.eps}     }\\     \subfigure[]{     \label{fig:2s}     \includegraphics[width=4.8in]{fig2.eps}     }     \subfigure[]{     \label{fig:3}     \includegraphics[width=4.8in]{fig3.eps}     }     \caption{something and something}     \label{fig:Simulation}     \end{figure}


title: Code listing in subfigure

text: I am trying to use the `subfigure` package of LaTeX to display a code listing. Here was my first attempt:               \begin{figure}     \subfigure[Standard approach]{       {\footnotesize     \begin{verbatim}     var caps = new Capabilities(Messaging);     \end{verbatim}       }     }     \subfigure[Emerson approach] {       \includegraphics[width=3in]{fig/trust-emerson}     }     \caption{Some caption}     \end{figure}      (All I did was change code where I would have put an `\includegraphics` line into text.) I've also tried the equivalent idea using the `listings` package and replacing the lines in the subfigure with               \begin{lstlisting}     Code     \end{lstlisting}      But that also didn't compile.


title: How to create a custom list and \item element?

text: I would like to create my own list environment with custom `\item` element, with a custom tag _myitem_ , that takes an optional parameter (the _2,7,6_ in my example). It should be a numbered list. I should be able to reference it. This is basically what I want: Proposed latex code:               Look at \ref{a}, and \ref{b}     \begin{mylist}     \myitem[2] \label{a} lorum ipsum lorum ipsum     \myitem[7] lorum ipsum etc.     \myitem[6] \label{b} lorum ipsum etc.     \end{mylist}      The output should be:      Look at **myPrefix** -2-1, and **myPrefix** -6-3   **myPrefix** -2-1 lorum ipsum lorum ipsum   **myPrefix** -7-2 lorum ipsum etc.   **myPrefix** -6-3 lorum ipsum etc.   Should I clean up the question a bit more? So far with Tom and egreg's help, I have the following code:               \usepackage{enumitem}          \newlist{mylist}{enumerate}{1}     \setlist[mylist]{label*=RQ\arabic*:~,ref=RQ\arabic*}     \makeatletter     \newcommand\myitem[1][]{%       \if\relax\detokenize{#1}\relax         \item\relax       \else         \protected@edef\@currentlabel{RQ#1}%         \item[RQ#1:~]       \fi}     \makeatother      All I now need is for the label referencing to work as stated in my edited question.


title: Which publication type for forthcoming papers in BibTeX?

text: I need to cite a forthcoming paper (paper that is accepted, but still not published, I guess?). However when I use the `unpublished` or `proceedings` publication type I don't get the result I want. Some fields in from my `bib` file are always missing in the final `pdf` file. Result I want to see: > Author, Name (2011) "Name of the article," Name of the journal, Vol. 15, > forthcoming. What kind of publication type for forthcoming papers should I use? There are also some types of publication that I can't find their counterpart in BibDesk, like a chapter in a book written by an author, but the book is edited by another. For example: > Ritter, Jay R., 2002, Investment banking and securities issuance, in G. > Constantinides, M. Harris, and R. Stulz, eds.: Handbook of the Economics of > Finance (North-Holland, New York, NY)


title: openright in book class not taking effect

text: I have the following command in my preamble:               \documentclass[letterpaper,twoside,openright]{book}      But `\chapter{}`s still start on the left. I have seen this thread and this thread but the solutions didn't fix it for me.


title: Empty caption of subfigure in memoir slightly misaligned

text: Consider the following minimal example meant to illustrate a single figure with a subfigure using the `memoir` documentclass:               \documentclass{memoir}     \newsubfloat{figure}% Allow for subfloats (subfigures) within figure environment     \begin{document}     \begin{figure}       \centering       \subbottom[]{\rule{2pt}{3em}\quad\rule{2pt}{3em}\quad\rule{2pt}{3em}}%       \caption{This is a caption}     \end{figure}     \end{document}      The caption of the subfigure is empty so that it only displays the subfigure counter - '(a)' in this case: ![Figure with subfigure in memoir class](http://i.stack.imgur.com/nCVk2.png) However, the subfigure label is not perfectly centered the way I had hoped with an empty caption. Changing the subfigure definition (using some negative spacing via `$\\!\\!$`) to               \documentclass{memoir}     \newsubfloat{figure}% Allow for subfloats (subfigures) within figure environment     \begin{document}     \begin{figure}       \centering       \subbottom[$\!\!$]{\rule{2pt}{3em}\quad\rule{2pt}{3em}\quad\rule{2pt}{3em}}%       \caption{This is a caption}     \end{figure}     \end{document}      instead produces a more acceptable empty subfigure caption, however minuscule the difference: ![Figure with subfigure in memoir class](http://i.stack.imgur.com/YxHkS.png) Is this a known bug, or at least fixable?


title: How to let background image cover entire Beamer slide?

text: I successfully use the `usebackgroundtemplate` command to set a background image for a specific slide in Beamer as follows ![enter image description here](http://i.stack.imgur.com/tvzGq.png)               \documentclass{beamer}     \mode<presentation> {     \usetheme{CambridgeUS}     }          \begin{document}          \usebackgroundtemplate{%       \includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}}           \begin{frame}[t]     \frametitle{hello}     blahblah     \end{frame}          \end{document}       However, the image seems to have just covered the main body area, the background of the `\frametitle` is still white as before. How could I set this image as background for the entire slide? Or at least for the `\frametitle` as well (just for the slides I want, not for the entire presentation)? Or any better solutions?


title: What causes the presence of unnecessary white space?

text: What causes the presence of unnecessary white space in the following figure? The box and the circle should have the same center. ![enter image description here](http://i.stack.imgur.com/XG1DP.png)               \documentclass[border=12pt,pstricks]{standalone}     \usepackage{pst-node}     \begin{document}          \begin{pspicture}[showgrid=true](2,2)         \rput(1,1){\psDefBoxNodes{A}{\pscirclebox{Circle}}}%         \psframe(A:bl)(A:tr)%     \end{pspicture}          \end{document}


title: Custom footnote breaks

text: Does anybody have an idea how I could get custom footnote breaks like "if the footnote is longer than _x_ lines, then break it to the next page"?


title: Relative coordinates in pgfplots across multiple table plots

text: This is a follow up question to this one: Use pgfplots \addplot plot coordinates with relative coordinates Is it also possible to have the relative coordinates across multiple plots? For example if I take @Jake's answer:               \begin{tikzpicture}         \begin{axis}             \addplot table [x = x rel, y=y rel,ignore chars=\%] {           0 0 %absolute (0,0)           2 2 %absolute (2,2)           1 3 %absolute (2,2) + (1,3) = (3,5)          };          \addplot table [x = x rel, y=y rel,ignore chars=\%] {           1 1 %absolute (3,5) + (1,1) = (4,6)           2 1 %absolute (4,6) + (2,1) = (6,7)          };        \end{axis}     \end{tikzpicture}      Alternatively it would also suffice to be able to specify in the table that the path between two specific successive coordinates should not be drawn.


title: Migrating from SIunits to siunitx: are there any obvious pitfall?

text: I understood the differences that were mentioned at the following link. Differences between SIunits and siunitx packages I am using TexStudio and MikTeX (perhaps the most recent version, considering that I downloaded the whole bundle yesterday) for typesetting my document. After changing all `\unit` to `\SI` I am still getting errors like `line 0 Undefined control sequence`. How should I get around this problem?


title: Can I automatically split an ocg environment over page breaks

text: I want to display ocgs in a pdf and use the ocgx package to achieve this. Sometimes the content I have in the environment is so long it needs a page break. This is incompatible with the ocg system and the content on the second page is always displayed instead of being optional. A simple fix would be to detect if the ocg is going to contain a page break and split the environment, e.g.               \begin{ocg}{Name}{label}{0}       \lipsum[1-10]     \end{ocg}      would be detected and the output would resemble the result of e.g.               \begin{ocg}{Name}{label1}{0}       \lipsum[1-3]     \end{ocg}          \clearpage          \begin{ocg}{Name}{label2}{0}       \lipsum[4-10]     \end{ocg}      How can I achieve this? I tried wrapping in a `mdframed` with `beforebreak` and `afterbreak` hooks to break and restart the ocg environment but I don't think ocgs like being nested in other environments...


title: Badness underful box and weird output near equation numbering

text: \begin{align}      &{V_L}^{det}=-I_2+\frac{(1+c_1-2c_2/I2)^2X)}{9(r-\alpha)}\\      &+(4^{\beta_1-1}9^{2-\beta_1}(-2c_1I_2+(c_2+I_2){{I_F}^*}^2)(\alpha-r)X       \\      &\left(\frac{(-1+b)c_1(-1+{I_F}^*)[(-c_2 - I_2) {I_F}^* + c_1I_2(1 +{I_F}^*)]X}{b_1 I_2 {{I_F}^*}^3 (\alpha - r)\right)}^{\beta_1-1}\cdot      \\&{{I_F}^*}^2      (4 c_2^2 - 4 (1 + c_1) c_2 I_2 + I_2^2 (1 - 81 a^2 + 2 c_1 + c_1^2 - 9 a (I_2 - 18 r) + 9 I_2 r - 81 r^2))))      \label{eq: leaderA}      \end{align}      I have this code and once I run it it shows first of all underfull box warning. If for the last line I just add something simple (e.g. replace the last line with the number 2) it will show somehow the equation but also near the numbering we see a text "subsection" which I find really weird. The code works only if I remove the last alignment tab which I also find weird. What should I do?


title: TikZ - How to draw an interrupted line?

text: Please tell me of an (as simple as possible) solution to draw an interrupted line. I don't know how this is technically called; interrupted line, interleaved line, broken line, discontinuous line? Here is an image of what I want. It doesn't have to be wavy (but it would be nice). ![enter image description here](http://i.stack.imgur.com/FU58N.png)


title: how to include subfigures in list of figures or sub tables in the list of tables

text: Currently, `\listoffigures` and `\listoftables` display only the root and not the sub parts. I there any way to make them display sub parts as well? I tried searching but found nothing that I can use which works.


title: Different margins within one document

text: having the following code, how is it possible to insert another page, which would have different margin paramaters as opposed to those seen in the code? Basically, the first page is cover page with different margins (top=20, bottom=20, right=20, left=20) and this is the one I would like to integrate into this code. Thanks!               \documentclass[12pt,oneside,a4paper]{article}          \usepackage[      left=40mm,      top=30mm,      right=20mm,      bottom=20mm,      headsep=12.5mm,      headheight=14.5pt, %%% 3mm is too small      heightrounded     ]{geometry}          \usepackage{fancyhdr,xpatch}          \pagestyle{fancy}     \renewcommand{\headrulewidth}{0.0pt}     \fancyhf{}     \fancyhead[R]{Title of topic --- \thepage}          \makeatletter     \let\ORI@section\section     \renewcommand{\section}{\@ifstar\s@section\ORI@section}     \newcommand{\s@section}[1]{%       \ORI@section*{#1}       \csname phantomsection\endcsname % for hyperref       \addcontentsline{toc}{section}{#1}     }     \xpatchcmd{\tableofcontents}{\section}{\ORI@section}{}{} % toc not in toc     \makeatother          \begin{document}     \pagenumbering{roman}          \tableofcontents     \clearpage          \listoffigures     \clearpage          \listoftables      \clearpage          \section*{Section A}          \clearpage     \pagenumbering{arabic}          \section{Section B}          \end{document}


title: How do I check if a biblatex entry contains an author field?

text: I'm writing a paper on a very large number of pieces of artwork, and I've been trying to automate the creation of my section headings, but I've run into a roadblock when I try to check if a Biblatex author entry actually exists. I would like to do something like this:               \documentclass{article}          \usepackage[backend=biber]{biblatex}          \newcommand{\sectiontitle}[1]{\section{%     %check for author field in #1 and include "\citeauthor{#1} - " if it exists%     \citetitle{#1}}}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @ARTWORK{gizapyramid,       title = {Pyramids at Gizeh},       location = {Giza, Egypt},       year = {ca.\@ 2500 BCE}     }     @ARTWORK{bar,       title = {A Bar at the Folies-Berg\`{e}re},       location = {London, England},       year = {1882},       author = {Manet, \'{E}douard}     }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}          \sectiontitle{bar}          \sectiontitle{gizapyramid}          \end{document}      To achieve the same result as this:               \documentclass{article}          \usepackage[backend=biber]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @ARTWORK{gizapyramid,       title = {Pyramids at Gizeh},       location = {Giza, Egypt},       year = {ca.\@ 2500 BCE}     }     @ARTWORK{bar,       title = {A Bar at the Folies-Berg\`{e}re},       location = {London, England},       year = {1882},       author = {Manet, \'{E}douard}     }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}          \section{\citeauthor{bar} - \citetitle{bar}}          \section{\citetitle{gizapyramid}}          \end{document}      ![Example of desired output](http://i.stack.imgur.com/9G5lU.png) However, I'm not sure how to do the check I want to accomplish this. How can I check if the Biblatex author entry actually exists and implement this into my code?


title: Externalize graphics when using pgfplots doesn't work (MiKTeX 2.9)

text: I'm having problems exporting my pgfplots figures to separate files using the externalize command. I get an error, the central point of which seems to be "Please verify that you have enabled system calls.". I have followed the instructions in the pgfplots manual to do this, however. I'm using MiKTeX 2.9 and Windows 7. (In a related thread, the poster has the same problem as me: Attempt to export eps figures from TikZ fails . However, in that case the poster is able to successfully export an image using the command "pdflatex -enable-write18 -output-format=dvi", I don't get that far. I have read that thread carefully but still can't figure out how to solve my problem). My example is the following, taken from the pgfplots manual:               \documentclass{article}     \usepackage{pgfplots}     \usepgfplotslibrary{external}     \tikzexternalize[shell escape=-enable-write18] %needed for the MiKTeX compiler          \begin{document}          \begin{figure}     \begin{tikzpicture}     \begin{axis}     \addplot {x^2};     \end{axis}     \end{tikzpicture}     \caption{Our first external graphics example}     \end{figure}          \end{document}      I compile using the command:               pdflatex.exe -shell-escape      This gives the following error:               entering extended mode     ===== 'mode=convert with system call': Invoking 'pdflatex -enable-write18 -halt     -on-/b/c9/cerror /b/c0/c-interaction=batchmode -jobname "externalizetest-figure0" "\def\tikze     xternalrealjob{externalizetest}\input{externalizetest}"' ========     ! Package tikz /b/c9/cError:/b/c0/c Sorry, the system call 'pdflatex -enable-write18 -halt-on     -/b/c9/cerror /b/c0/c-interaction=batchmode -jobname "externalizetest-figure0" "\def\tikzexte     rnalrealjob{externalizetest}\input{externalizetest}"' did NOT result in a usabl     e output file 'externalizetest-figure0' (expected one of .epsi:.eps:.ps:). Plea     se verify that you have enabled system calls. For pdflatex, this is 'pdflatex -     shell-escape'. Sometimes it is also named 'write 18' or something like that. Or      maybe the command simply failed? /b/c9/cError /b/c0/cmessages can be found in 'externalizete     st-figure0.log'. If you continue now, I'll try to typeset the picture.     See the tikz package documentation for explanation.      As I understand it, the line               \tikzexternalize[shell escape=-enable-write18]      is supposed to replace the command -shell-escape to -enable-write18, which is needed for MiKTeX. Just to make sure that isn't the problem, I tried using the command               pdflatex.exe -enable-write18      instead, and               \tikzexternalize      in the .tex file. But that doesn't work either. I'd be very thankful for help on how to enable system calls with MiKTeX 2.9, or, if the problem lies somewhere else, for thoughts on what might be wrong. /Andreas


title: Compiling a code in TeXnicCenter produces an empty PDF without any warning and error

text: When I compile a code in TeXnicCenter, it builds a pdf without my modifications, giving: 0 errors 0 warnings 0 pages. I'm not an expert but I've tried everything to make it work without reach any solution. It should be a settings problem, because with same files but using my friend's pc the code works.


title: Problems with answers package v2.14

text: I recently updated the answers package to its latest version (2014/08/08 v2.14) and, now, I cannot even successfully build the examples in the package's manual. Case in point, the first example mentioned in the manual               \documentclass[12pt,a4paper]{article}      \usepackage{answers}     \Newassociation{sol}{Solution}{ans}     \newtheorem{ex}{Exercise}     \begin{document}     \Opensolutionfile{ans}[ans1]     \section{Problems}     \begin{ex}     First exercise     \begin{sol}     First solution.     \end{sol}     \end{ex}     \begin{ex}     Second exercise     \begin{sol}     Second solution.     \end{sol}     \end{ex}     \Closesolutionfile{ans}     \section{Solutions}     \input{ans1}     \end{document}      produces the following output (taken from the log file)               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2014.9.6)  6 SEP 2014 21:22     entering extended mode     .....................(omitted part of the log file)     (C:\Users\Georgio\AppData\Roaming\MiKTeX\2.9\tex\latex\answers\answers.sty     Package: answers 2014/08/08 v2.14 Production of solution sheets in LaTeX2e          ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\verbatim.sty"     Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements     \every@verbatim=\toks14     \verbatim@line=\toks15     \verbatim@in@stream=\read1     ))     Runaway argument?     {\@bsphack \Iffileundefined {##1}{}{\Ifopen {##1}{{\let \protect \string \ETC.     ! File ended while scanning use of \@argdef.     <inserted text>      \par      l.3 \Newassociation     {sol}{Solution}{ans}     I suspect you have forgotten a `}', causing me     to read past where you wanted me to stop.     I'll try to recover; but if the error is serious,     you'd better type `E' or `X' now and fix your file.     .....................(omitted part of the log file)      I performed a clean re-install of MikTeX 2.9.5105 64-bit on my Windows 7 64-bit system, but this did not resolve the problem. I am wondering, if anyone else has experienced the same problem and how to go about overcoming it. I suspect that the latest update to the answers package may have something to do with it (there were some major changes incorporated), but I am not sure. Unfortunately, I do not know enough about TeX to tackle it. Any insight to this matter would be much appreciated.


title: biblatex: excluding shorthand entries from the main bibliography

text: I use the following coding for biblatex with verbose-ibid, sorry I still do not know how to include a file: * * *               \usepackage[style=verbose-ibid,firstinits=true,sorting=nty,sortcites=true,useprefix=false,maxnames=6,backend=biber]{biblatex} % originally the style was verbose-ibid          \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}     \renewcommand*{\newunitpunct}{\addcomma\space}%put commas instead of periods after some elements of the title     %\usepackage{biblatex}%remove �in� in journal articles     \renewbibmacro{in:}{%     \ifentrytype{article}{}{%     \printtext{\bibstring{in}\intitlepunct}}}     \renewcommand*{\labelnamepunct}{\addcomma\space}     \renewcommand*{\nametitledelim}{\addcomma\space}     \renewcommand*{\bibfont}{\small}          \renewbibmacro*{publisher+location+date}{%     \printtext[parens]{% ADDED     \printlist{location}%     \iflistundef{publisher}       {\setunit*{\addcomma\space}}       {\setunit*{\addcolon\space}}%     \printlist{publisher}%     \setunit*{\addcomma\space}%     \usebibmacro{date}%     }\nopunct% ADDED     \newunit}     %for citing short forms     \renewbibmacro*{cite:short}{%     \printnames{labelname}%     \setunit*{\nametitledelim}%     % If article:     \ifentrytype{article}{%         \usebibmacro{journal}%         \setunit{\addspace}%         \printfield{volume}}{%     % If incollection:     \ifentrytype{incollection}{%         \usebibmacro{in:}%         \printtext[booktitle]{\printfield[titlecase]{booktitle}}}{%     % Else:     \printtext[bibhyperlink]{\printfield[citetitle]{labeltitle}}}}}          \printshorthands          \printbibliography      * * * I try to use shorthands for some of the books usually quoted in a shorthand form. This is the example for it:               @book{Eide.1994,     author = {Eide, T. and Hagg, T. and {Holton Pierce} and R. and Török, L.},     year = {1994},     title = {Fontes Historiae Nubiorum},     number = {I},     publisher = {University of Bergen, Department of Classics},     location = {Bergen},     shorthand = {FHN}      My problems are:   1. This title is repeated in the shorthand and in the bibliography. I wanted only in the shorthand.   2. I would like not to waste many pages. I would like something like: Bibliography title at the top of the page. Then shorthands immediately after the title and after shorthands are finished, the normal bibliography.


title: pgfplots with percentage on the axis

text: I am trying to draw a graph with percentage in x-axis and categories on y-axis. I cannot make the graph to show `%` sign. Here is my `MWE`:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \pagestyle{empty}     \usetikzlibrary{patterns}          \begin{document}     \begin{tikzpicture}     \begin{axis}     [         axis lines*=left,         title=Histogram of S\&P 500 CEOs Past Experience,         xbar,         width=8cm,         height=5cm,         xlabel={},         symbolic y coords={Sales, Marketing, Finance, Operations},         ytick=data,         xmin=0,         xmax=0.5,          nodes near coords,         nodes near coords align={horizontal}         ]            \addplot     [draw=blue,pattern=horizontal lines light blue]      coordinates          {(0.17,Sales)  (0.24,Marketing) (0.31,Finance) (0.42,Operations)};     \end{axis}     \end{tikzpicture}     \end{document}      as you can see, I can make the graph with decimal number and ideally I'd like to have `%` sign. Any suggestion?


title: Changing indentation of pseudocode including line numbers with algorithm and algorithmic

text: If I have pseudocode as shown below using the `algorithm` and `algorithmic` packages, is it possible to indent the pseudocode, including the line numbers, so that it lines up with the indentation of the first line of the paragraph above, i.e. so that the line numbers of the pseudocode are indented as much as the first line of the paragraph above. ![enter image description here](http://i.stack.imgur.com/kVRLR.png)


title: How to use (install) LegacySans

text: I find a nice font LegacySans and I would use it in my works. I don't know how to install it in Latex distribution. Some idea?


title: tkz-euclide.sty not found

text: I'm very new to LaTex. I'm trying to complile a document that contains the following:               \usepackage{tikz}          \usepackage{tkz-euclide}          \usetkzobj{all}      I'm getting `tkz-euclide.sty not found`. I'm on Ubuntu 12.something. and I previously received `kmath.sty` not found, so I did a:               sudo apt-get install texlive-full      hoping never to receive another `.sty` not found error again. This did resolved my `kmath.sty` not found issue, but not the `tkz-euclide.sty`. I took a look at the process for installing individual .sty files from CTAN and it made open heart surgery look easier. I'm not excited about the prospect of trying the instructions I found. and I also typed `texhash` many times, it did not solve my issue.


title: Is there a template available that allows easy publishing of poem book?

text: I would like to layout a professionally designed book containing poems. What template should I use?


title: How can I improve those voltage annotations

text: In France, we draw an arrow above or below a dipole to represent the potential difference between its two poles. I'm trying to automate this using the ideas of the `tikz` circuits library (not `circuitz`). The code is adapted from the `direction info` code. I have the following code. It works but it is far from perfect.   * It allows upsidedown labels.   * Sometimes labels overlap the arrow.   * I have the feeling that it complies only partially with `tikz`'s way of handling styles and options.   * It is verbose (not refactored). What and how should I do to improve this? ![enter image description here](http://i.stack.imgur.com/l8wTF.png)               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{circuits.ee.IEC}          \tikzset{%       voltage info/.is family,       voltage info/vertical offset/.initial = .5,       voltage info/arrow direction/.initial = ->,       voltage info/horizontal offset/.initial = 2,       voltage info/label position/.initial = above,       voltage info/label rotate/.initial = 0,       voltage info/label/.initial = {}     }          \tikzset{%       voltage arrow/.style = {%         /utils/exec = {%           \pgfsetarrowoptions{direction ee}{%             .4*\the\tikzcircuitssizeunit+.3*\the\pgflinewidth}},         > = direction ee},       voltage info sloped/.style = {%          append after command = {%           \bgroup             [voltage info/.cd,#1]             [current point is local=true]             [every voltage info/.try]             [shift={($(\tikzlastnode.north)+(0,\pgfkeysvalueof{/tikz/voltage info/vertical offset}\tikzcircuitssizeunit)$)}]             [voltage arrow,\pgfkeysvalueof{/tikz/voltage info/arrow direction}]             (-\pgfkeysvalueof{/tikz/voltage info/horizontal offset}\tikzcircuitssizeunit,0)             edge[line to]              node[\pgfkeysvalueof{/tikz/voltage info/label               position},transform shape,rotate = \pgfkeysvalueof{/tikz/voltage               info/label rotate}] {\pgfkeysvalueof{/tikz/voltage info/label}}             (\pgfkeysvalueof{/tikz/voltage info/horizontal offset}\tikzcircuitssizeunit,0)           \egroup         }       },       voltage info' sloped/.style = {%          append after command = {%           \bgroup             [voltage info/.cd,label position = below,#1]             [current point is local=true]             [every voltage info/.try]             [shift={($(\tikzlastnode.south)+(0,-\pgfkeysvalueof{/tikz/voltage info/vertical offset}\tikzcircuitssizeunit)$)}]             [voltage arrow,\pgfkeysvalueof{/tikz/voltage info/arrow direction}]             (-\pgfkeysvalueof{/tikz/voltage info/horizontal offset}\tikzcircuitssizeunit,0)             edge[line to]              node[\pgfkeysvalueof{/tikz/voltage info/label               position},transform shape,rotate = \pgfkeysvalueof{/tikz/voltage               info/label rotate}] {\pgfkeysvalueof{/tikz/voltage info/label}}             (\pgfkeysvalueof{/tikz/voltage info/horizontal offset}\tikzcircuitssizeunit,0)           \egroup         }       },       voltage info/.style = {%          append after command = {%           \bgroup             [voltage info/.cd,#1]             [current point is local=true]             [every voltage info/.try]             [shift={($(\tikzlastnode.north)+(0,\pgfkeysvalueof{/tikz/voltage info/vertical offset}\tikzcircuitssizeunit)$)}]             [voltage arrow,\pgfkeysvalueof{/tikz/voltage info/arrow direction}]             (-\pgfkeysvalueof{/tikz/voltage info/horizontal offset}\tikzcircuitssizeunit,0)             edge[line to]              node[\pgfkeysvalueof{/tikz/voltage info/label               position},rotate = \pgfkeysvalueof{/tikz/voltage               info/label rotate}] {\pgfkeysvalueof{/tikz/voltage info/label}}             (\pgfkeysvalueof{/tikz/voltage info/horizontal offset}\tikzcircuitssizeunit,0)           \egroup         }       },       voltage info'/.style = {%          append after command = {%           \bgroup             [voltage info/.cd,label position = below,#1]             [current point is local=true]             [every voltage info/.try]             [shift={($(\tikzlastnode.south)+(0,-\pgfkeysvalueof{/tikz/voltage info/vertical offset}\tikzcircuitssizeunit)$)}]             [voltage arrow,\pgfkeysvalueof{/tikz/voltage info/arrow direction}]             (-\pgfkeysvalueof{/tikz/voltage info/horizontal offset}\tikzcircuitssizeunit,0)             edge[line to]              node[\pgfkeysvalueof{/tikz/voltage info/label               position},rotate = \pgfkeysvalueof{/tikz/voltage               info/label rotate}] {\pgfkeysvalueof{/tikz/voltage info/label}}             (\pgfkeysvalueof{/tikz/voltage info/horizontal offset}\tikzcircuitssizeunit,0)           \egroup         }       }     }               \begin{document}     \begin{tikzpicture}[circuit ee IEC]       \draw (0,0) to[resistor = {%          voltage info = {label = $u_R$},         voltage info' = {label = $u_R$}}] (2,2);       \draw (2,0) to[resistor = {%          voltage info sloped = {label = $u_R$},         voltage info' sloped= {label = $u_R$}}] (4,2);       \begin{scope}[shift = {(4.5,2)}]         \draw (0,0)                to[resistor = {voltage info sloped = {label = $u_R$}}]               ++ (2,0)               to[resistor = {voltage info sloped = {label = $u_R$}}]               ++ (0,-2)               to[resistor = {voltage info sloped = {label = $u_R$}}]               ++ (-2,0);                 \end{scope}     \end{tikzpicture}     \end{document}


title: Formatting problem with lyx

text: I am writing a report in Lyx. I have included many images in the report. And I am having bit of problem with the placement of the image in the final report.   1. I include a image in a section and refer it from the middle of the section. And I would expect the image to be placed in the beginning of the section. Is my understanding correct ?   2. I had inserted image with the understanding of (1). This is how the image looks like in the final report. The dark stripe you see in the image is the page border. Please let me know where I could be going wrong. ![enter image description here](http://i.stack.imgur.com/2DyLx.jpg)


title: itemize within tables is no longer working

text: I'm new to this forum (and relative new to LaTeX). After upgrading MiKTeX to the latest version yesterday evening I'm unable to compile a document containing an `\begin{itemize} ... \end{itemize}` construction within an `tabulary` or `tabularx` environment.               \documentclass[fontsize=11pt, paper=a4, twoside, headinclude, footinclude, headsepline, footsepline, BCOR=5mm]{scrreprt}     \usepackage[lmargin=2.5cm,rmargin=2.5cm,tmargin=2.5cm,bmargin=3.5cm]{geometry}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage[english,ngerman]{babel}     \usepackage{tabularx}     \usepackage{tabulary}     \setlength{\tymin}{50pt}     \setlength{\tymax}{\linewidth}          \begin{document}     \begin{table}[hbt!]     \captionabove{Test Table}     \label{tab:Test Table}     \centering         \begin{tabulary}{\textwidth}{LL}     %    \begin{tabularx}{\textwidth}{XX}         \rowcolor{black!90}         \toprule         \color{white}\textbf{Column 1} & \color{white}\textbf{Column 2}\\         \midrule         Col 1 / Row 1 & Col 2 / Row 1:                 \begin{itemize}                     \item Item 1 with a long text which must be wrapped into the next line                     \item Item 2 with a long text which must be wrapped into the next line                 \end{itemize}\\         \hline         Col 1 / Row 2 & Col 2 / Row 2\\         \hline         Col 1 / Row 3 & Col 2 / Row 3 and again, a column with a long text which must be wrapped into the next line\\         \hline         Col 1 / Row 4 & Col 2 / Row 4\\         \bottomrule     %    \end{tabularx}         \end{tabulary}     \end{table}     \end{document}      The errormessages for `tabulary` are:               Zeile 35: Undefined control sequence \end{tabulary}     ...     Zeile 35: Something's wrong--perhaps a missing \item. \end{tabulary}     ...     Zeile 35: Undefined control sequence \end{tabulary}      and for `tabularx` they are:               Zeile 34: Undefined control sequence \end{tabularx}     ....     Zeile 34: Undefined control sequence \end{tabularx}      Before upgrading to the latest version everything was ok (tested with `tabularx`). Does anybody has a hint for me why it's no longer working or is this a bug?


title: Want to get 'book name, and 'chapter name, in header

text: I asked a question to get 'chapter name' and 'section' in the header in the following link : \markboth is not working when using \chapter and \section. Now I have decided to replace the `section name` with 'book name' in the header in the same question posted earlier. I have tried to change it in the following way :               \documentclass[a4paper,12pt]{book}          \usepackage[vmargin=0.2cm,hmargin=1cm,head=16pt,includeheadfoot]{geometry}          \usepackage{fancyhdr,amsthm}          \pagestyle{fancy}     % We don't want chapter and section numbers         \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     %\renewcommand{\sectionmark}[1]{\markright{#1}}          \fancyhead{}     \fancyfoot{}     \fancyhead[LE,RO]{\thepage}     \fancyhead[LO]{\slshape\rightmark}     \fancyhead[RE]{\slshape\leftmark}          \theoremstyle{plain}     \newtheorem{theorem}{Theorem}[section]     \newtheorem{corollary}[theorem]{Corollary}          \begin{document}          \chapter{Chapter}     \section{Section}     \markboth{book name}{section name}     \begin{theorem}      Theorem     \end{theorem}          \newpage     Second page     \newpage          Third page     \end{document}      But 'book name' is not appearing in the header. What is the required command to have 'book name' in odd pages and 'chapter name' in even pages ?


title: UML Sequence Diagram with PGF and Tikz produces "No shape named inst1 is known"

text: I've recently started using LaTeX for all my documentation and can't believe I didn't do this sooner! It's so quick to get good-quality documentation produced, and the LaTeX format serves brilliantly as an interim format for conversion to others. I'm having a lot of fun :D What I want to do presently is write a sequence diagram for a software build process. I'm using Tex Live 2011 and `pdflatex` (same result using plain old `latex`) in Cygwin on Windows XP to process my `.tex` file:               \documentclass{article}          \usepackage{tikz}     \usepackage{pgf-umlsd}     \usepgflibrary{arrows} % for pgf-umlsd     \begin{document}          \begin{figure}       \centering            \begin{sequencediagram}       \end{sequencediagram}          \end{figure}          \end{document}      As you can see, it's very simple. When I run this through `latex`/`pdflatex` I get:               ) (./build-process.aux) ABD: EveryShipout initializing macros          ! Package pgf Error: No shape named inst1 is known.          See the pgf package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.12   \end{sequencediagram}          ?       What am I doing wrong? Furthermore, will my platform and software suffice to allow me to write sequence diagrams in LaTeX? Thanks in advance!


title: How to handle old source needing floatflt.sty?

text: I just updated to latest version of texlive (2011) for mac and suddenly I don't have the `floatflt.sty` any longer. It seems it has changed license and is no longer shipped with the distributions. (A bit of a shock considering I have been told that LaTeX is not like MS Word in that it is very backwards version compatible but I guess that discussion is for another day...) Problem is though that I have a lot of old documents using it, so now I wonder the following:   1. What are the alternatives that I can use instead and how complicated is the conversion of my old document?   2. Given that my usage is okey okey according to this new license, how do I install it on my tex live system on my mac? > EDIT: When I try to download the DTX and INS files from > http://www.ctan.org/tex-archive/macros/latex/contrib/floatflt and run tex > floatflt.ins I get: >   >   >     $ tex floatflt.ins >     This is TeX, Version 3.1415926 (TeX Live 2011) >     (./floatflt.ins >     ! Undefined control sequence. >     l.25 \NeedsTeXFormat >                         {LaTeX2e}[1996/12/01] >     ? >


title: Problem referencing a survey report type of document

text: I have an issue referencing a document in LaTeX. The correct reference would be: > Harvest Choice, 2006. "Tanzania National Sample Census of Agriculture > 2002/2003: Small Holder Agriculture, Volume II: Crop Sector - National > Report." International Food Policy Research Institute, Washington, DC., and > University of Minnesota, St. Paul, MN. Available online at > http://harvestchoice.org/publications/tanzania-national-sample-census- > agriculture-20022003-small-holder-agriculture-volume-ii. I have tried many combinations and the best I could come up with was using the following on bibtex:               @TechReport{TN,         author = {Harvest Choice},         title = {Tanzania National Sample Census of Agriculture 2002/2003: Small Holder Agriculture, Volume 2: Crop Sector National Report},         institution = {International Food Policy Research Institute, Washington, DC., and University of Minnesota, St. Paul, MN},         year = {2006}      }      However, this yields 3 problems:   1. It cannot get to "Harvest Choice" being referenced, I only have: "Harvest, C" as it if were an author   2. I do not know how to insert the web link.    3. The reference specifies it is a technical report, which it is not


title: Automatically add fractions and reduce the result (if neccessary)

text: I'm trying to figure out how to reduce fractions. Adding fractions is no problem, see this example:               \documentclass[parskip]{scrartcl}     \usepackage[margin=15mm]{geometry}     \usepackage{tikz}          \newcommand{\addfraction}[4]{% 1N, 1D, 2N, 2D     \pgfmathsetmacro{\newnumerator}{#1*#4+#3*#2}     \pgfmathsetmacro{\newdenominator}{#4*#2}     \pgfkeys{/pgf/number format/.cd,int detect,precision=2}     \[ \frac{#1}{#2} + \frac{#3}{#4} = \frac{\pgfmathprintnumber{\newnumerator}}{\pgfmathprintnumber{\newdenominator}} \]     }          \begin{document}          \addfraction{3}{4}{1}{2}          \end{document}      In the eample, the result of adding 3/4 and 1/2 is 10/8, which obviously can be reduced to 5/4. In order to do so, I tried the `frac` format provided by `TikZ` (see tikz manual section 66 "number printing"): I computed the decimal value of my fraction, and had the result returned via `\pgfmathprintnumber`. This works, however only to a certain extent. Even "simple" tasks line 4/7 + 3/8 would return a denominator of 10000 and above, instead of 53/56. I also followed the directions for increasing accuracy (`frac shift` and `\usepackage{fp}`), but still no luck. Now I know how to manually reduce fractions, you have to find the greatest common divisor. But how to do this in an automated fashion? My guess would be that something like this is buried somewhere in `TikZ` as it seems to be applied when using the `frac` format. So it basically comes down to this: how to find the greatest common divisor of two given numbers (preferably using `TikZ`)?


title: Error with expansions

text: I am getting an error while trying to compile this minimal example: min.cls:               \ProvidesClass{min}          \LoadClass{minimal}     \NeedsTeXFormat{LaTeX2e}          \newenvironment{myenv}{}{     \def\aaa{test }     \expandafter\def\csname bbb\endcsname{$4\sqrt{2}$}     \bbb     \edef\aaa{\aaa \bbb}     \aaa     }          \endinput      mintest.tex:               \documentclass{min}          \begin{document}          \begin{myenv}     Test     \end{myenv}          \end{document}      Running latex over mintest.tex produces this error:               ERROR: Use of \@sqrt doesn't match its definition.          --- TeX said ---     \@ifnextchar ...eserved@d =#1\def \reserved@a {#2}                                                       \def \reserved@b {#3}\futu...     l.7 \end{myenv}      Peculiar. I want to expand the definition of `\aaa` by concatenation. Any thoughts?


title: Problems with bibliography style file in TeXworks

text: I'm using TeXworks as my editor in writing an article, where the bibliography style has to be `vancouver`. It has previously worked just fine, and if I set the style to `plain` I have no problems, but as soon as I set it to `vancouver` I encounter this problem. I can open the package manager just fine manually, and I have also updated MikTeX Here's the console output:               This is BibTeX, Version 0.99d (MiKTeX 2.9)     The top-level auxiliary file: filename.aux          ======================================================================     miktex-bibtex.exe: Cannot start MiKTeX package manager.     miktex-bibtex.exe: Data: Invalid syntax          ======================================================================     I couldn't open style file vancouver.bst     ---line 16 of file filename.aux      : \bibstyle{vancouver      :                    }     I'm skipping whatever remains of this command     I found no style file---while reading file filename.aux     (There were 2 error messages)      Thankful for any suggestions and sorry if this question is badly defined, I've only just stated using LaTeX, and all of this is completely new to me!