title: Set the width of a fcolorbox

text: Hi a very basic question I'm sure, but is there a way to tell `\fcolorbox` in `xcolor` to draw the box of a certain width. For example with `\fbox` I would do               \documentclass{article}     \usepackage{xcolor}     \begin{document}     \framebox[1in]{text}          \fcolorbox{blue}{blue!40}{what do I do here?}          \end{document}


title: Multiline figure caption centering

text: How to center a figure caption that's too long for a single line? Or at least, make the text in other lines line-up with text after "Slika 1:". It currently looks like this ![alt text](http://i.stack.imgur.com/GWoNu.png)


title: "shell escape" is not enabled - chemscheme/chemstyle

text: I am having issues with `-shell-escape`. I do not know really what this is, and how to apply it. Furthermore, I have read elsewhere that I is possibly dangerous to summon this command. Any help would be hugely appreciated. In order to incorporate a simplified numbering system for compounds in my document, I am trying to replace a TMP marker within a `chemdraw` `.eps` file. However, when I include               \usepackage[runs=2]{auto-pst-pdf}      I get this message: ![enter image description here](http://i.stack.imgur.com/FVdG5.png) If I remove the above command then the typset completes, but the TMP markers in the graphic remain TMP1, TMP2 etc. This is my input:               \begin{scheme}[ht]     \schemeref[TMP1]{\CNlabel{MT004}}     \schemeref[TMP2]{\CNlabel{MT002}}     \schemeref[TMP3]{\CNlabel{MT005}}     \schemeref[TMP4]{\CNlabel{MT006}}     \schemeref[TMP5]{\CNlabel{MT007}}     \schemeref[TMP6]{\CNlabel{MT009}}     \includegraphics[width=0.65\textwidth]{RS001.eps}     \caption{Macrocycle synthesis}     \end{scheme}      The tutorial I am following is detailed here: http://www.jkwchui.com/2010/03/writing-chemistry-with-latex-33/ I am using TeXShop for Mac.


title: Alignment in tabularx environment

text: I want to generate a table that looks approximately as follows: I want to use tabularx to have equidistant cells for the cells that are below the second row and right of the first column. ![desired table](http://i.stack.imgur.com/2QvUp.png) Here is my Latex code:               \documentclass{article}          \usepackage{tabularx}     \usepackage{booktabs}          \begin{document}          \begin{tabularx}{.5\textwidth}{l *{6}{X} }     \toprule      & \multicolumn{2}{c}{first} & \multicolumn{2}{c}{second} & \multicolumn{2}{c}{third} \\     \multicolumn{1}{c}{data set} & foo & bar & foo & bar & foo & bar \\     \midrule     d1 & 28.4 & 4.4 & 25.9 & 8.9 & -3.7 & 33.3 \\     d2 & 2.8 & 3.7 & 5.1 & 16.3 & 47.0 & 0.1 \\     d3 & 32.1 & 4.2 & 31.5 & 4.0 & 23.0 & 3.3 \\     \bottomrule     \end{tabularx}          \end{document}      This is generated by pdflatex: ![table generated by latex](http://i.stack.imgur.com/siGJL.png) I need tabularx since I want to give the total width of the table and let tabularx (or a similar package) do the length calculation. All numers should be aligned to the right and a number should not wrap between the minus and the letters.


title: Biblatex - using two languages in one reference entry

text: I'm trying to learn biblatex and have small problem. according of czech style for academic writings, some fields in bibliographic record, like volume, edition or issue, should be in language of source document, others, like pages, should be in language current document is written in. so: > KRSKOVÁ, L.; HILSKÁ, I.; KOPECKÁ, P. aj. Molekulární diagnostika maligních > lymfomů řady B : detekce klonality a stručný přehled problematiky s > vlastními výsledky. _Časopis lékařů českých_. 2004, **roč**. 143, **č**. 3, > **s**. 191-194. ISSN 0008- 7335. vs. > BROWMAN, Howard I.; STERGIOU Konstantinos I. Factors and indices are one > thing, deciding who is scholarly, why they are scholarly, and the relative > value of their scholarship is something else entirely. _Ethics in science > and environmental politics_. June 2008, **vol** 8, **no**. 1, **s**. 1-3. > ISSN 1863-5415. I have no problem to get localized strings with `\bibsstring`, but how I can take string from main language? I tried something like               \DeclareFieldFormat*{pages}{#1}     \newbibmacro{pagecount}{%       \iffieldundef{pages}{}         { **\selectlanguage{czech}** \bibsstring{pages}\addnbspace\printfield{pages}}}          ..     \DeclareBibliographyDriver{article}{%     ..     \usebibmacro{pagecount}      and it works, but I think there must be some more elegant way than hardcode language into style. Does exist some command to switch to main language, or can I use some variable? I have found `\blx@languagename`, but it holds only language of current record. * * * **Edit** My solution bellow has little problem. It add spaces to output.               SMITH, Alan; NEWMAN, Paul; PINKY, John   aj. Some title. 3rd ed.        New York : MIT Press, 1991. 332  s.      there should be of course just one space before aj. and s. biblatex redefines babel macro **\bbl@set@language** , so probably some problem lies there. If we have following sample               \documentclass[a4paper,10pt]{article}     \usepackage[english,czech]{babel}     %\usepackage[backend=biber,style=apa,sorting=nyt,babel=other]{biblatex}     \makeatletter         \newcommand\mainlanguage{\expandafter\bbl@set@language\expandafter{\bbl@main@language}}%     \newcommand\ml{[\bbl@main@language{}--\languagename]}     \makeatother     \begin{document}     \ttfamily     (\mainlanguage) \ml      (\selectlanguage{czech}) \ml      (\selectlanguage{english}) \ml       \end{document}      result is:               () [czech--czech]() [czech--czech]() [czech--english]      if we uncomment \usepackage[...]{biblatex}:               (   ) [czech--czech](   ) [czech--czech]( ) [czech--english]      On base of another question I made macro for discard command output:               \newlength{\trashlength}     \def\ignoreoutput#1{\globaldefs=1 \settowidth{\trashlength}{#1}}      it discards spaces, but references are now without italics and dashes. **Question** So, is there some other way how to discard spaces? Or is it better to find the source of spaces in _biblatex.sty_? (I tried to do that, but with no success)


title: Producing a volume of a journal in LaTeX

text: As a matter of academic curiosity, I've been wondering for a while how one could produce an entire volume of an academic journal (not just a single journal article) using LaTeX. It seems clear to me that a number of publishers use LaTeX to produce their journals (IEEE, American Physical Society, and Elsevier come to mind) especially since many journals provide LaTeX document classes, but it's not clear to me how they go about it. Specific questions that I have include:   1. Supposing every article is submitted in LaTeX format, how are they combined to produce the volume of the journal? Is it possible to use `\input{}` or `\include{}` on the standalone articles (and are there any existing document classes that allow one to do this), or is it necessary to edit the preambles of the individual articles?   2. How does one produce a table of contents for a document consisting of multiple parts, each with their own title and author(s)?   3. How does one handle potential name conflicts between references in different articles (cross-references, citations, etc.)? The only way that I can think of offhand (for cross-references, at least) is to adopt a naming convention for labels, e.g. `\label{author:label}`, which should prevent many (but obviously not all) name conflicts.


title: Longtable: Keep the last two rows on the same page

text: I know there are similar questions, but using `\\*` did not work for me. What I want to achieve is that the last two rows of my table will be on the same page (and therefore no page break between them). Please see the following example               \documentclass[a4paper]{article}     \usepackage{longtable}     \usepackage{lipsum}     \usepackage{geometry}     \geometry{left=1.8cm,right=1.8cm,top=7.3cm,bottom=2.5cm}          \begin{document}         \begin{longtable}{@{}|p{1.7cm}|p{9.9cm}|p{2.6cm}|p{1.2cm}|}             \hline             a & \lipsum[1] & c & d\\\hline             a & \lipsum[1] & c & d\\\hline             a & \lipsum[1] & c & d\\\hline                  \multicolumn{1}{|l}{\textbf{Total}} & \multicolumn{3}{r|}{\bf 0} \\* \hline             \multicolumn{4}{l}{\small I need to be just below Total}                 \end{longtable}     \end{document}      which results in a page break between the last two rows. Do you know why `\\*` isn't working? Am I using it in a wrong way?


title: Automated generation of equation key

text: I am looking for a way to automatically create the legend for an `equation` (let's say embedded in the `align` environment). What I'm currently using is a semi automated to fully manual way. Let me explain: The result should look like this: ![img1](http://i.stack.imgur.com/8zGLm.png). What I am doing to accomplish this requires 3 steps to generate the output shown above: ## 1) Placing equation:               \begin{align}           \dot{D} = \frac{1-\eta_{Deg,r}}{\tau} \label{eq:deg}       \end{align}      ## 2) Defining the corresponding entries in the symbol glossary:               \newglossaryentry{sym:deg}{       type=symbols,       name={$\dot{D}$},       description={Prozentuale jährliche Abnahme des Wirkungsgrades},       user1={\%/a},       sort=deg       }            \newglossaryentry{sym:etadegr}{     type=symbols,     name={$\eta_{Deg,r}$},     description={Verbleibender Wirkungsgrad bezogen auf den ursprünglichen Wirkungsgrad},     user1=\%,     sort=eta deg rest     }          \newglossaryentry{sym:tau}{     type=symbols,     name={$\tau$},     description={Lebenszyklus / Einsatzdauer des betrachteten Systems},     user1=a,     sort=tau     }      ## 3) Custom command to fill table with glossaries reference:               %Command     \newcommand{\items}[1]{\glstext*{#1} & \glsdesc*{#1} [\glsuseri*{#1}] \\}          %Legend Environment     \begin{tabular}{@{} p{1cm} p{0.9 \textwidth}}         \items{sym:deg}         \items{sym:etadegr}         \items{sym:tau}     \end{tabular}      # Question I'd like to create a command which searches the previous `align` environment for elements of my `symbol glossary` and puts them into a legend (in this case tabular) environment. Does this already exist (didn't find anything)? And how would i realize this? Not expecting a perfect solution but I have no clue how to do this. An MWE to tinker with can be found here --> Gist €:   -Additional Information: Using miktex 2.9 and TechniXCenter 2 on Windows.   -Matches for the search could be done with the name key of the glossary entry


title: Horizontal dashed line on page break in listings environment

text: Well, the title says it all. I have code scripts that span over multiple pages. Is it possible to display a dashed line at the bottom and/or top of the page in which the `listings` environment experience a page break, and keep the solid line at the very top and very bottom of the environment? A screen dump illustrating my question is given below. I would like to add dashed lines where the `listings` environment break. ![enter image description here](http://i.stack.imgur.com/3RRKp.png) I use `mcode` in combination with the `listings` enivorment, providing a set of `lstset` parameters. The following MWE illustrates where I would prefer to have horizontal, dashed lines, avoiding that the `lstlistings` environment just breaks to white.               \documentclass{article}     \usepackage{mcode, listings}     \definecolor{cornsilk}{RGB}{255,248,220}     \begin{document}     \section{Section Something}          The following code is just a really long list of comments, really.           \begin{lstlisting}         % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code          % It would be nice with a horisontal dashed line below me.          % Another dashed above me, too.         % Matlab code          % Matlab code          % Matlab code          % Matlab code          % Matlab code      \end{lstlisting}     \end{document}


title: Placing page numbers with Fancyhdr

text: I have looked through many of the posts on this website, but I am still having trouble placing my page numbers in latex the way I want it.   Essentially, I want to mimic the way MS Word formats page numbers when placed in the top right hand corner. The code I am using places the page number at roughly the same level as my section heading. By the looks of it, if I could just move the page# up a few points, but have the section title stay where it is, everything would look okay. Any help would be appreciated!   Here is my code:               \documentclass[12pt, a4paper]{article}      \usepackage{fullpage}     \usepackage{setspace}     \usepackage{subfigure}     \usepackage{amsfonts, amsmath, amssymb}     \usepackage{dcolumn, pstricks, multirow}     \usepackage{epsfig, subfigure, subfloat, graphicx, float}     \usepackage{anysize, setspace}     \usepackage{verbatim, rotating}     \usepackage{epsfig,graphicx}     \usepackage[abbr]{harvard}     \usepackage{graphicx}     \usepackage{graphics}     \usepackage{hyperref}     \usepackage{epsfig}     \usepackage{epstopdf}     \usepackage{xcolor}     \usepackage{caption}     \usepackage[top=1in, bottom=1.5in, left=1in, right=1in]{geometry}     \usepackage{titlesec}     \titleformat{\section}[block]      {\normalfont\Large\bfseries\filcenter}{\fbox{\itshape\thesection}}{1em}{}     \usepackage{fancyhdr}     \renewcommand*{\headrulewidth}{0pt}     \fancyhf{}     \pagestyle{fancy}     \fancyhead[RO,RE]{\thepage} %RO=right odd, RE=right even      \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}          \begin{document}           \setcounter{page}{34}      \section*{Appendix A: Methodology}           stuff here          \end{document}


title: Narrow to Environment in AUCTeX

text: I'd like to be able to use some `org-mode`-like features inside of AUCTeX. In `org-mode`, you can narrow the buffer to a node or you can flatout send the node to a separate buffer for editing. How can this be done in AUCTeX? Specifically, I'd like to be able to perform a function that   * will determine the most specific environment it belongs in   * probably utilize point and mark to capture the environment in its entirety   * do one of two things:      * Narrow the buffer to this region (probably easiest)     * Send this region to another buffer where relevant changes in either buffer are reflected in each, and saving the 'narrowed' buffer saves the original file. (I'm not sure how this works internally in `org-mode`\---see `org-tree-to-indirect-buffer` and Indirect Buffers in the Emacs documentation. The ideal option would be total emulation of `org-tree-to-indirect-buffer`, and would probably involve only a few steps   1. Making an indirect buffer from the current one   2. Rename that indirect buffer to something useful (maybe `buffername<envname>`?)   3. Narrowing the indirect buffer


title: Parsing hexadecimal numbers to binary and iterating over bits

text: I'm currently working on a software for an graphic display, so I recreated it in TikZ for documentation purposes: ![image of the display](http://i.stack.imgur.com/aP6YN.png) I currently use this to set individual pixels on the display:               \setpixel{x}{y}      Where `x` and `y` are coordinates between 0 and 132/64. The real display is separated into 8 pages, each 8 pixels high, and a byte sent to the display is displayed as a column. See this image for details. Since I don't want to always calculate the individual pixels, I'd like the LaTeX variant to behave like the real display, that is, I want some command like               \dispbyte{0x01}     \dispbyte{0x03}     \dispbyte{0x07}     \dispbyte{0x0F}     \dispbyte{0x1F}     \dispbyte{0x3F}     \dispbyte{0x7F}     \dispbyte{0xFF}      (this would create one of the triangles above) I have an idea how I'd implement counting of the current column and page switching and all that -- shouldn't be hard with some counters after all -- but I just can't find out how to parse the hexadecimal values and then iterate over every bit inside them. I've found fmtcount and binhex.tex, but they only display a LaTeX counter in another format, and I can't understand their code at all. The finished source code (display.sty) and some examples are now available at http://cmpl.cc/downloads/disp/


title: How do I explicitly print the labels for a given equation?

text: I am using `mathtools`, only `refeq` equations get actually a number. However, there are several equations which I want to have the equation numbering appear on the right, or more accurately, decide on my own where they would appear. Is there a way to do that, so that I add the equation numbering the place I want them for a certain align environment, _but_ also so that when I refer to them using `refeq`, they won't appear on the left side? EDIT, MWE:               \documentclass{article}          \usepackage{fullpage,times,color,hyperref}          \usepackage{amsmath,amsthm,amssymb}     \usepackage{natbib}     \usepackage{mathtools}     \usepackage{qtree}     \bibliographystyle{plainnat}               \mathtoolsset{showonlyrefs,showmanualtags}          \begin{document}          \begin{align}     aaa \label{eq1}     \end{align}          (Look at equation ~\refeq{eq1}.)          I would want it to look more like:          \begin{align}     (1)\,\,\,\,\, & aaa     \end{align}          only it should be far to the left, and only for a *single* align environment (or a few).          \end{document}


title: How do I add accented characters to PDF info without using hyperref?

text: Using pdflatex, I'm looking to add PDF information into by document, including an accented name (Rónán Daly). Normally I'd use hyperref to do this; however, the conference I'm submitting to is complaining about generated links and bookmarks - I can stop the generation of bookmarks, but not links. So I'm looking at the option of using `\pdfinfo`, with `/Author`, `/Title` and `/Keyword`. However, I can't seem to add the accented characters correctly. I'm currently using ASCII, but could change this if necessary. Any ideas on how to solve either of these problems?


title: How to modify just some nodes' styles in chemfig

text: In the following molecular drawing, I want to only circle the rightmost OH of the first molecule and the leftmost H of the second, to show that they are the ones that are involved in the formation of water:               \documentclass{article}     \usepackage{chemfig} % for typesetting molecules          \begin{document}          \chemfig{CH(-[4]H_2N)(-[6]CH_2(-[6]C(=[5]O)(-[7]OH)))-C(=[2]O)-OH} % I want to circle this last OH     \chemsign{+}     \chemfig{CH(-[4]H_2N)(-[6]CH_2(-[6]*6(=-=-=-)))-C(=[1]O)(-[7]O-CH_3)} % I want to circle the H of the H_2N near the beginning     \chemrel{<>} \\     \chemfig{CH(-[4]H_2N)(-[6]CH_2(-[6]C(=[5]O)(-[7]OH)))-C(=[2]O)-N(-[2]H)-CH(-[6]CH_2(-[6]*6(=-=-=-)))-C(=[1]O)(-[7]O-CH_3)}     \chemsign{+}     \chemfig{H_2O} \\          \end{document}      ![enter image description here](http://i.stack.imgur.com/Kri6S.png) I know that if I put               \setnodestyle{draw,circle}      on the very first line after `\begin{document}`, then I can make all the nodes (atoms) circled, but I only want to circle the two I mentioned, but I'm not having success inserting a `\setnodestyle` inside the `\chemfig` argument. Does anyone know how to custom modify just one node's style in chemfig?


title: Extra alignment tab with longtable

text: I am using `longtable` and I am getting the error `! Extra alignment tab has been changed to \cr.` I have attempted to fix it but nothing I have tried seems to be working. Below is the code for the table                 \centering         \begin{longtable}{rrrrrrrrrrrrrrrrp{2cm}}         \caption{A Table Depicting the Relationship between Meat, Fruit, Oil}        Oil (Barrels) & Fruit (Ton) && Meat (Ton) & Fruit (Ton) && Meat (Ton) & Oil (Barrel) & Oil (Barrels) & Fruit (Ton) & & Meat (ton)  & Fruit (ton) &       & Meat (ton)  & Oil (barrel)  \\     \hline         0     & 500   &       & 0     & 500   &       & 0     & 600   & 0     & 12050   &         & 0     & 12050 &       & 0     & 14460 \\         10    & 491.5 &       & 50    & 466.6 &       & 50    & 560   & 1000  & 11216.6 &         & 1500  & 11050 &       & 1500  & 13260 \\         24    & 480   &       & 100   & 433.3 &       & 100   & 520   & 2000  & 10383.3 &         & 3000  & 10050 &       & 3000  & 12060 \\         42    & 465   &       & 150   & 400   &       & 150   & 480   & 3000  & 9550    &         & 4500  & 9050  &       & 4500  & 10860 \\         48    & 460   &       & 200   & 366.6 &       & 200   & 440   & 4000  & 8716.6  &         & 6000  & 8050  &       & 6000  & 9660 \\         50    & 458.3 &       & 250   & 333.3 &       & 250   & 400   & 5000  & 7883.3  &         & 7500  & 7050  &       & 7500  & 8460 \\         75    & 437.5 &       & 300   & 300   &       & 300   & 360   & 6000  & 7050    &         & 9000  & 6050  &       & 9000  & 7260 \\         100   & 416.6 &       & 350   & 266.6 &       & 350   & 320   & 7000  & 6216.6  &         & 10500 & 5050  &       & 10500 & 6060 \\         150   & 375   &       & 400   & 233.3 &       & 400   & 280   & 8000  & 5383.3  &         & 12000 & 4050  &       & 12000 & 4860 \\         200   & 333.3 &       & 450   & 200   &       & 450   & 240   & 9000  & 4550    &         & 13500 & 3050  &       & 13500 & 3660 \\         250   & 291.5 &       & 500   & 166.6 &       & 500   & 200   & 10000 & 3716.6  &         & 15000 & 2050  &       & 15000 & 2460 \\         300   & 250   &       & 550   & 133.3 &       & 550   & 160   & 11000 & 2883.3  &         & 16500 & 1050  &       & 16500 & 1260 \\         400   & 166.6 &       & 600   & 100   &       & 600   & 120   & 12000 & 2050    &         & 18000 & 50    &       & 18000 & 60 \\         500   & 83.3  &       & 650   & 66.6  &       & 650   & 80    & 13000 & 1216.6  &         & 18075 & 0     &       & 18075 & 0 \\         600   & 0     &       & 700   & 33.3  &       & 700   & 40    & 14000 & 383.3   &         &       &       &       &       &  \\               &       &       & 750   & 0     &       & 750   & 0     & 14460 & 0       &         &       &       &       &       & \\     \hline     \end{longtable}%


title: Empty bibliography generated by Vim-LaTeX in Ubuntu 14.04

text: I use Vim-LaTeX to compile LaTeX documents to PDF by invoking `\ll` command in the editor. I'm getting this warning on compiling a LaTeX document in the new Ubuntu 14.04:               LaTeX Warning: Empty bibliography on input line 728.      The generated PDF has no bibliography section and the citations are not generated either! This same document compiles fine on Ubuntu 12.04 with the same Vim and Vim- LaTeX versions. What has changed in TeX-Live distributed with the newer Ubuntu to generate this error? How can I get back the bibliography section in the generated PDF? The document uses biblatex and has this format:               \documentclass{scrbook}          \usepackage[utf8]{inputenc}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage[citestyle=numeric,bibstyle=numeric,backref=true]{biblatex}          \title{Foobar}     \author{Somejoe}     \addbibresource{books.bib}     \addbibresource{papers.bib}     \addbibresource{links.bib}          \begin{document}          \frontmatter     \maketitle     \tableofcontents     \mainmatter          % Because this is empty document     \nocite{*}          % Content goes here          \printbibliography     \end{document}      A few related questions said that newer versions of biblatex requires biber. I installed biber, but this error still continues to happen.


A lot of the times I get warnings like "hbox overfull" when a specific part of my document is meant to be extra wide on purpose --> so I am purposefully violating the default width threshold. **Or to put it another way I am interested in suppressing any warning that the author "willfully disregards".** In the above example, I purposefully violate some threshold... so IMO the generated warning should be suppressed. Anytime I purposefully break some suggestion I would like to suppress the warning. **How do you suppress specific warnings generated by pdflatex?** So for example how would you suppress one specific "hbox overfull" or one specific "paragraph has no preceding subsection" warning? (For the specific case of "hbox overfull" warning I saw that one solution is to change the default threshold for the entire document but I don't want to change the default threshold. I think the default threshold is good... I am only breaking the rule once... all the other times I want a warning to be generated so I can fix it.) * * * The reason I ask is because when I work I would like to have zero warnings. That way when a warning is generated it is the only warning and I can fix it right away asap... as opposed to having 5 warnings... and then when I get another warning I don't notice till later when I am already past the part that generated the warning.


title: Positioning Labels in Asymptote

text: How can I control the position of the `$x$` label below? Created with `draw("$x$",O--X,blue,Arrow3)` I know I can manually control label positions with `label("$x$",<position>,blue)`, but is there a more automatic way---something analogous to the `tikz` options `node[near end]` or `node[midway, above]`.               \documentclass{article}     \usepackage{asymptote}          \begin{document}          \begin{asy}[width=0.5\textwidth]     import graph3;     import grid3;     currentprojection=perspective(-0.51,3,1,up=Z);          draw("$x$",O--X,blue,Arrow3);      draw(O--Y,green,Arrow3);      draw(O--Z,red,Arrow3);     \end{asy}          \end{document}      ![enter image description here](http://i.stack.imgur.com/3wOgD.png)


title: Nested enumerate labels with parent label appended plus a single set of enclosing parentheses

text: I want to have a list like               (1) foo        (1.1) foo        (1.2) foo     (2) foo      I am using the package `enumitem` and               \begin{enumerate}[label=(\arabic*)]        \item foo     \end{enumerate}      I know that i can append the parent label with `label*=`, but that leads to (1).1. Has anybody an idea?


title: tex4ht + tabu-package does not work

text: I am trying to compile an existing tex-document with tex4ht. However, it seems that the tabu-package does not work together with tex4ht:               \documentclass{book}          \usepackage{tabularx}     \usepackage{tabu}          \begin{document}     Hallo     \end{document}       Already trying to load the tabu-package gives errors:               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=latex  2012.8.13)  13 AUG 2012 15:58     entering extended mode     **\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx\HCode\def\HCod     e##1{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g     @addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\doc     umentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname te     x4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HC     ode}{\documentstyle[tex4ht]}}}\makeatother\HCode .a.b.c.\input  minimal.tex     (C:\Users\swilke\Documents\latex\Test\Testhtml\minimal.tex     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\book.cls"     Document Class: book 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\bk10.clo"     File: bk10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     ... [Lots of lines omitted]          ! Argument of \g:Advance has an extra }.      Any help would be appreciated.


title: How can I define a calculation of a dimension that I can reuse in a \savedanchor declaration?

text: In the following MWE, I declare a new shape `myshape`. In several instances, I plan to use a dimension that is calculated from different pgf keys (`\my@width`). One of these instances includes the declaration of the saved anchor `\base`. At the moment, I have to duplicate the code that calculated this dimension, as I cannot simply use `\my@width` inside the `\savedanchor` declaration (it doesn't seem to be available or default to 0/empty). So I am wondering if there is a way to achieve this or if I am simply putting the cart before the horse, i.e. should I ditch the dimension altogether (I'm assuming I can't use the saved anchor inside the `\saveddimen` declaration either) and rely only on the saved anchor definition?               \documentclass[a4paper]{article}     \usepackage{tikz}          \makeatletter     \pgfdeclareshape{myshape}     {       %       % Saved dimensions       %       \saveddimen{\my@width}{%         \pgfmathsetlength{\pgf@xa}{\pgfkeysvalueof{/pgf/minimum width}}         \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/inner xsep}}         \pgfmathsetlength{\pgf@xc}{\pgfkeysvalueof{/pgf/outer xsep}}         \pgf@x=.5\pgf@xa         \advance\pgf@x by .5\pgf@xb         \advance\pgf@x by .5\pgf@xc       }       \saveddimen{\my@height}{%         \pgf@x=\pgfkeysvalueof{/pgf/minimum height}%       }            %       % Saved anchors       %       \savedanchor\base{%         % Duplicated code, can't use \my@width here         \pgfmathsetlength{\pgf@xa}{\pgfkeysvalueof{/pgf/minimum width}}         \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/inner xsep}}         \pgfmathsetlength{\pgf@xc}{\pgfkeysvalueof{/pgf/outer xsep}}         \pgf@x=.5\pgf@xa         \advance\pgf@x by .5\pgf@xb         \advance\pgf@x by .5\pgf@xc         \pgf@y=0pt       }            %       % Anchors       %       \anchor{center}{%         \base         \pgfutil@tempdima=\my@height         \advance\pgf@y by .5\pgfutil@tempdima       }       \anchor{south}{\base}            %       % Background path       %       \backgroundpath{%         \pgfutil@tempdima=\my@width         \pgfutil@tempdimb=\my@height         \pgf@xa=.5\pgfutil@tempdima         \pgf@ya=0pt         \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}         \advance\pgf@ya by \pgfutil@tempdimb         \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@ya}}         \advance\pgf@xa by -.5\pgfutil@tempdima         \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}         \advance\pgf@xa by \pgfutil@tempdima         \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@ya}}       }     }     \tikzset{       every myshape node/.style={         draw=black, thick, minimum width=1cm, minimum height=2.5cm,       }     }     \makeatother          \begin{document}     \begin{tikzpicture}       \node[myshape] at (0,0) {};       \node[myshape, inner sep=10pt] at (3,0) {};     \end{tikzpicture}     \end{document}


title: Kerning between V and / in Palatino and Euler

text: **Edit 1** I made the test with real palatino font and Neo-Euler, with the same result (As far as I can see)               \documentclass{standalone}     \usepackage{fontspec}     \setmainfont[] {PalatinoLTStd-Roman.otf}     %\setmathrm [] {}     \usepackage{unicode-math}     \setmathfont[math-style=upright]{euler.otf}     \usepackage{siunitx}          \begin{document}          \begin{tabular}{ll}     Text  & MV/m \\     equation & $MV/m$\\     two mathrm & $\mathrm{MV}/\mathrm{m}$\\     one mathrm & $\mathrm{MV/m}$\\     siunitx & \si[per-mode = symbol]{\mega\volt\per\metre}     \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/3vXil.png) **Original** I am using palatino with euler as shown below. I noticed a big space between `V` and `/`. I am not sure if it is because the slash is a binary operator or because the kerning is incorrect. I have this problem with the unit and it shown also with `siunitx`. Do you also think it is too much space?               \documentclass{standalone}          \renewcommand{\rmdefault}{ppl} % rm     \linespread{1.05}        % Palatino needs more leading     \usepackage[scaled]{helvet} % ss     \usepackage{courier} % tt     \usepackage{eulervm} % a better implementation of the euler package (not in gwTeX)     \normalfont     \usepackage[T1]{fontenc}     %\usepackage{verbatim}     \usepackage{siunitx}          \begin{document}          \begin{tabular}{ll}     Text  & MV/m \\     equation & $MV/m$\\     two mathrm & $\mathrm{MV}/\mathrm{m}$\\     one mathrm & $\mathrm{MV/m}$\\     siunitx & \si[per-mode = symbol]{\mega\volt\per\metre}     \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/6PfrS.png)


title: Metrics of natwidth parameter in includegraphics when dealing with PDF

text: I need to get the `.bbl` file from the `.bib` and so need to compile the `.tex` in LaTex, but I have included PDF graphics which can be compiled in LaTex using natwidth, natheight params.               \begin{figure}       \centering       \includegraphics[width=0.55\columnwidth,natwidth=10.57,natheight=7.44]{a.pdf}       \caption{description}       \label{fig1}     \end{figure}      `10.57` and `7.44` I took from PDF document details which is inches, but what metrics is used in the mentioned params? Do I need to convert inches to something?


title: Why is this comment character required for correct rendering?

text: There is a comment between two child nodes down below, that if removed would cause tree to render completely wrong. Why?               \documentclass[10pt]{article}     \usepackage{tikz}     \usetikzlibrary{trees}     \tikzstyle{every node}=[draw=black, thin, minimum height=3em]          \begin{document}     \footnotesize     \begin{tikzpicture}[         supervisor/.style={%             text centered, text width=12em,             text=black         },         teammate/.style={%             text centered, text width=12em,             text=black         },         subordinate/.style={%             grow=down,             xshift=-3.2em, % Horizontal position of the child node             text centered, text width=12em,             edge from parent path={(\tikzparentnode.205) |- (\tikzchildnode.west)}         },         level1/.style ={level distance=4em,anchor=west},         level2/.style ={level distance=8em,anchor=west},         level3/.style ={level distance=12em,anchor=west},         level4/.style ={level distance=16em,anchor=west},         level 1/.style={%             edge from parent fork down,             sibling distance=14em,             level distance=5em         }     ]         \node[anchor=south,supervisor](super){Supervisor\\Supervisory position\\Location}[]              child{node [teammate] {Teammate6\\Position4\\Location4}             child[subordinate,level1] {node {Subordinate1}}             child[subordinate,level2] {node {Subordinate2}}}         % - why is this comment required for proper rendering of the tree???         child{node [teammate] {Teammate7\\Position5\\Location5}             child[subordinate,level1] {node {First\\Subordinate}}             child[subordinate,level2] {node {Subordinate2}}             child[subordinate,level3] {node {Third\\Teammate}}             child[subordinate,level4] {node {Longtext-\\teammate}}};          \end{tikzpicture}          \end{document}      With a comment: ![enter image description here](http://i.stack.imgur.com/E99hT.png) Without a comment: ![enter image description here](http://i.stack.imgur.com/ykAY6.png)


title: Mark parts requiring rework

text: Doing my first more complicated paper using LaTeX, I wonder if there are any possibilities to specially mark sections or parts requiring rework. It would be nice if those sections appeared in a special highlight in the output and could be connected to a short comment. For example, being able to write something like the following would be great:               Lorem ipsum dolor sit amet, \rework[spellcheck]{consetetur sadipscing} elitr.      Are there any predefined tags for doing so?   Or should I simply use highlighting like shown in How to highlight important parts (with a gray background) ?


title: Incompatibility problem of the packages subfig and subcaption

text: I want have three subfigures in a special order. One on the right, two on the left. Therefor I found a snippet here on StackExchange. Alone the snippet works fine, you can check this by comment out the first figure-enviroment. The problem is, that I have a lot of subfloats in my document and the packages subfig and subcaption are incompatible. Is there a way to use normal subfloats and also get the 3-subfigure-example running? Best, TomBoo! **minimal example:**               \documentclass{article}     \usepackage[demo]{graphicx}     \usepackage{caption,subcaption}     \usepackage{subfig}          \begin{document}          \begin{figure}[htb]         \centering             \subfloat[test figure one \label{fig:1:test1}] {\includegraphics[width=0.30\textwidth]{image1}}             \qquad %             \subfloat[test figure two \label{fig:1:test2}] {\includegraphics[width=0.30\textwidth]{image1}}         \caption{test figures}       \label{fig:1:tests}     \end{figure}          \begin{figure}     \begin{minipage}[c][11cm][t]{.5\textwidth}       \vspace*{\fill}       \centering       \includegraphics[width=5cm,height=10cm]{image1}       \subcaption{test figure one}       \label{fig:2:test1}     \end{minipage}%     \begin{minipage}[c][11cm][t]{.5\textwidth}       \vspace*{\fill}       \centering       \includegraphics[width=5cm,height=4.5cm]{image1}       \subcaption{test figure two}       \label{fig:2:test2}\par\vfill       \includegraphics[width=5cm,height=4.5cm]{image1}       \subcaption{test figure three}       \label{fig:3:test3}     \end{minipage}     \caption{another test figures}     \label{fig:2:tests}     \end{figure}          \end{document}


title: Trying to add pagenumbering, but no footer will display

text: All I'm really looking to do is add page numbers to the bottom of each page. However, whatever method I try doesn't seem to show up. I've tried searching for this and come up with nothing. Here's a simple example of what I want to do:               \documentclass{article}          \usepackage{fancyhdr}     \pagestyle{fancy}          \fancyhead{}     \fancyfoot{}     \fancyhead[R]{%     Text     }     \fancyfoot[C]{\thepage}          \begin{document}          \section{Title}          \subsection{Subtitle}          Plain text.          \pagebreak          \subsection{Another subtitle}          More plain text.          \end{document}      And it works just great. However, when I add `\fancyfoot` to my document, nothing shows up. Yet the `\fancyhead` line works just fine. I've tried using `\pagenumbering{arabic}` and `\cfoot` as well and they are similarly ignored. Even going as far as to try to manually add the footer to the content pages doesn't do the job. Obviously this means that somewhere in my document I'm overriding the footer, but the only commands I'm calling after this in my original document are the following:               \tableofcontents     \include     \newcommand     \section     \begin{figure}      None of which, as far as I know, should overwrite the footer for the rest of my document. The following code inserted after my `\begin{document}` does the job, but obviously blows away my previous header.               \pagestyle{headings}     \setcounter{page}{1}     \pagenumbering{arabic}      I apologize in advance that this doesn't cleanly point to the problem, but I wasn't sure how to give enough information without pasting in my entire document. Thanks for your time.


title: Error when using surf in pgfplots

text: I try to make a contour plot with pgfplots similar to the `pyplot.contourf` but I'm getting errors:               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{filecontents}              \begin{filecontents}{testdata.dat}       9.000000000000000000e+02 3.000000000000000000e+01 2.808099937438964844e+01       9.000000000000000000e+02 3.500000000000000000e+01 2.836700057983398438e+01       9.000000000000000000e+02 4.000000000000000000e+01 2.881599998474121094e+01       1.000000000000000000e+03 3.000000000000000000e+01 2.826700019836425781e+01       1.000000000000000000e+03 3.500000000000000000e+01 2.820400047302246094e+01       1.000000000000000000e+03 4.000000000000000000e+01 2.856699943542480469e+01       1.100000000000000000e+03 3.000000000000000000e+01 2.783799934387207031e+01       1.100000000000000000e+03 3.500000000000000000e+01 2.806399917602539062e+01       1.100000000000000000e+03 4.000000000000000000e+01 2.830699920654296875e+01     \end{filecontents}          \pgfplotstableread{testdata.dat}\datatable          \begin{document}     \begin{tikzpicture}     \begin{axis}[       width=10cm,       height=5cm,       small,       colorbar     ]       \addplot3[surf,shader=interp] table{\datatable};     \end{axis}     \end{tikzpicture}     \end{document}      The following error does appear when I'm using `shader=interp`:               ! LuaTeX error /usr/share/texmf-  dist/tex/generic/pgfplots/lua/pgfplots.lua:27: attempt to call global 'unpack' (a nil value)     stack traceback:       /usr/share/texmf-dist/tex/generic/pgfplots/lua/pgfplots.lua:27: in function 'pgfplotsGetLuaBinaryStringFromCharIndices'       [string "\directlua "]:1: in main chunk.       \pgfplotsbinarytoluabinary ...CharIndices({#1}); }


title: Problems with TexLive 2012 on Ubuntu after network installation

text: I totally purged TexLive from my system, and then I installed the latest version of TexLive _from the internet installer_ as described here instead of via the Ubuntu package manager. Next, I installed Winefish (the latex editor) using the package manager, and here is the install log:               me@home:~$ sudo apt-get install winefish      Reading package lists... Done     Building dependency tree            Reading state information... Done     The following extra packages will be installed:       lmodern luatex tex-common texlive-base texlive-binaries texlive-common       texlive-doc-base texlive-luatex tidy tofrodos     Suggested packages:       perl-tk tidy-doc     The following NEW packages will be installed:       lmodern luatex tex-common texlive-base texlive-binaries texlive-common       texlive-doc-base texlive-luatex tidy tofrodos winefish     0 upgraded, 11 newly installed, 0 to remove and 9 not upgraded.     Need to get 46.2 MB/46.5 MB of archives.     After this operation, 101 MB of additional disk space will be used.     Do you want to continue [Y/n]? Y     Get:1 http://archive.linux.duke.edu/ubuntu/ precise/main tex-common all 2.10 [709 kB]     Get:2 http://archive.linux.duke.edu/ubuntu/ precise/main lmodern all 2.004.1-3.1ubuntu1 [17.8 MB]     Get:3 http://archive.linux.duke.edu/ubuntu/ precise/main luatex amd64 0.70.1-1ubuntu1 [2,458 kB]     Get:4 http://archive.linux.duke.edu/ubuntu/ precise/main texlive-common all 2009-15 [94.4 kB]     Get:5 http://archive.linux.duke.edu/ubuntu/ precise/main texlive-doc-base all 2009-2 [1,339 kB]     Get:6 http://archive.linux.duke.edu/ubuntu/ precise/main texlive-binaries amd64 2009-11ubuntu2 [8,054 kB]     Get:7 http://archive.linux.duke.edu/ubuntu/ precise/main texlive-base all 2009-15 [14.7 MB]     Get:8 http://archive.linux.duke.edu/ubuntu/ precise/main texlive-luatex all 2009-15 [975 kB]     Get:9 http://archive.linux.duke.edu/ubuntu/ precise/main tidy amd64 20091223cvs-1ubuntu2 [24.2 kB]     Get:10 http://archive.linux.duke.edu/ubuntu/ precise/main tofrodos amd64 1.7.9.debian.1-1 [21.0 kB]     Fetched 46.2 MB in 3min 22s (228 kB/s)                                              Preconfiguring packages ...     Selecting previously unselected package tex-common.     (Reading database ... 295442 files and directories currently installed.)     Unpacking tex-common (from .../tex-common_2.10_all.deb) ...     Selecting previously unselected package lmodern.     Unpacking lmodern (from .../lmodern_2.004.1-3.1ubuntu1_all.deb) ...     Selecting previously unselected package luatex.     Unpacking luatex (from .../luatex_0.70.1-1ubuntu1_amd64.deb) ...     Selecting previously unselected package texlive-common.     Unpacking texlive-common (from .../texlive-common_2009-15_all.deb) ...     Selecting previously unselected package texlive-doc-base.     Unpacking texlive-doc-base (from .../texlive-doc-base_2009-2_all.deb) ...     Selecting previously unselected package texlive-binaries.     Unpacking texlive-binaries (from .../texlive-binaries_2009-11ubuntu2_amd64.deb) ...     Selecting previously unselected package texlive-base.     Unpacking texlive-base (from .../texlive-base_2009-15_all.deb) ...     Selecting previously unselected package texlive-luatex.     Unpacking texlive-luatex (from .../texlive-luatex_2009-15_all.deb) ...     Selecting previously unselected package tidy.     Unpacking tidy (from .../tidy_20091223cvs-1ubuntu2_amd64.deb) ...     Selecting previously unselected package tofrodos.     Unpacking tofrodos (from .../tofrodos_1.7.9.debian.1-1_amd64.deb) ...     Selecting previously unselected package winefish.     Unpacking winefish (from .../winefish_1.3.3-0dl1ubuntu1_amd64.deb) ...     Processing triggers for doc-base ...     Processing 3 added doc-base files...     Registering documents with scrollkeeper...     Processing triggers for man-db ...     Processing triggers for fontconfig ...     Processing triggers for install-info ...     Processing triggers for menu ...     Processing triggers for hicolor-icon-theme ...     Processing triggers for bamfdaemon ...     Rebuilding /usr/share/applications/bamf.index...     Processing triggers for desktop-file-utils ...     Processing triggers for gnome-menus ...     Processing triggers for shared-mime-info ...     Setting up tex-common (2.10) ...     Not replacing deleted config file /etc/texmf/texmf.d/05TeXMF.cnf     Not replacing deleted config file /etc/texmf/texmf.d/15Plain.cnf     Not replacing deleted config file /etc/texmf/texmf.d/45TeXinputs.cnf     Not replacing deleted config file /etc/texmf/texmf.d/55Fonts.cnf     Not replacing deleted config file /etc/texmf/texmf.d/65BibTeX.cnf     Not replacing deleted config file /etc/texmf/texmf.d/75DviPS.cnf     Not replacing deleted config file /etc/texmf/texmf.d/80DVIPDFMx.cnf     Not replacing deleted config file /etc/texmf/texmf.d/85Misc.cnf     Not replacing deleted config file /etc/texmf/texmf.d/90TeXDoc.cnf     Not replacing deleted config file /etc/texmf/texmf.d/95NonPath.cnf     Not replacing deleted config file /etc/texmf/updmap.d/00updmap.cfg     update-texmf: Basic configuration file /etc/texmf/texmf.d/05TeXMF.cnf missing.     Exiting.     dpkg: error processing tex-common (--configure):      subprocess installed post-installation script returned error exit status 1     dpkg: dependency problems prevent configuration of lmodern:      lmodern depends on tex-common (>= 2.00); however:       Package tex-common is not configured yet.     dpkg: error processing lmodern (--configure):      dependency problems - leaving unconfigured     Setting up luatex (0.70.1-1ubuntu1) ...     No apport report written because the error message indicates its a followup error from a previous failure.                               texlive-base is not ready, cannot create formats     dpkg: dependency problems prevent configuration of texlive-common:      texlive-common depends on tex-common (>= 2.0); however:       Package tex-common is not configured yet.     dpkg: error processing texlive-common (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of texlive-doc-base:      texlive-doc-base depends on tex-common (>= 2.00); however:       Package tex-common is not configured yet.      texlive-doc-base depends on texlive-common (>= 2009-1); however:       Package texlive-common is not configured yet.     dpkg: error processing texlive-doc-base (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of texlive-binaries:      texlive-binaries depends on texlive-common (>= 2009); however:       Package texlive-common is not configured yet.      texlive-binaries depends on tex-common (>= 2.00); however:       Package tex-common is not configured yet.     dpkg: error processing texlive-binaries (--configure):      dependency proNo apport report written because the error message indicates its a followup error from a previous failure.                                              No apport report written because MaxReports is reached already                            No apport report written because MaxReports is reached already          No apport report written because MaxReports is reached already                                                                        No apport report written because MaxReports is reached already                                                      blems - leaving unconfigured     dpkg: dependency problems prevent configuration of texlive-base:      texlive-base depends on texlive-doc-base (>= 2009-1); however:       Package texlive-doc-base is not configured yet.      texlive-base depends on tex-common (>= 2.00); however:       Package tex-common is not configured yet.      texlive-base depends on texlive-binaries (>= 2009-10); however:       Package texlive-binaries is not configured yet.      texlive-base depends on texlive-common (>= 2009-1); however:       Package texlive-common is not configured yet.     dpkg: error processing texlive-base (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of texlive-luatex:      texlive-luatex depends on tex-common (>= 2.00); however:       Package tex-common is not configured yet.      texlive-luatex depends on texlive-base (>= 2009-1); however:       Package texlive-base is not configured yet.      texlive-luatex depends on texlive-common (>= 2009-1); however:       Package texlive-common is not configured yet.     dpkg: error processing texlive-luatex (--configure):      dependency problems - leaving unconfigured     Setting up tidy (20091223cvs-1ubuntu2) ...     Setting up tofrodos (1.7.9.debian.1-1) ...     dpkg: dependency problems prevent configuration of winefish:      winefish depends on tetex-bin | texlive-base-bin | latex; however:       Package tetex-bin is not installed.       Package texlive-base-bin is not installed.       Package texlive-binaries which provides texlive-base-bin is not configured yet.       Package latex is not installed.     dpkg: error processing winefish (--configure):      dependency problems - leaving unconfigured     No apport report written because MaxReports is reached already                                                                   Errors were encountered while processing:      tex-common      lmodern      texlive-common      texlive-doc-base      texlive-binaries      texlive-base      texlive-luatex      winefish     E: Sub-process /usr/bin/dpkg returned an error code (1)      I can successfully use the `latex` binary, but some things don't work. For example, when I try to run `dvips`, I get the following:               me@home:Note$ dvips Note.dvi      warning: kpathsea: configuration file texmf.cnf not found in these directories: /usr/share/texmf/web2c:/usr/share/texmf-texlive/web2c:/usr/local/share/texmf/web2c.     This is dvips(k) 5.98 Copyright 2009 Radical Eye Software (www.radicaleye.com)     dvips: ! Couldn't find header file tex.pro.     Note that an absolute path or a relative path with .. are denied in -R2 mode.      I don't think my installing Winefish actually caused the problem, but I'm including that information in case it did. **[Additionally info added below.]** For diagnostic purposes, I did the following (which I read about elsewhere):               me@home:~$ kpsewhich -var-value=TEXMF     warning: kpathsea: configuration file texmf.cnf not found in these directories: /usr/share/texmf/web2c:/usr/share/texmf-texlive/web2c:/usr/local/share/texmf/web2c.      Then, using `locate`, I discovered that `/usr/share/texmf/web2c/texmf.cnf` does exist, but it's a broken symbolic link to `/etc/texmf/texmf.cnf`. Does this help shed light on the problem?


title: How can I prevent the background from overlapping the rounded corners in an \lstinputlisting?

text: I want to include listings of external files in my document. These listings should have a solid background and rounded corners. The problem is, that if I define a style with `frameround` and `backgroundcolor`, the background overlaps the rounded corners.               \lstdefinestyle{cftemplate}{         frameround=tttt,         rulecolor=\color[rgb]{0.7, 0.7, 0.7},         frame=single,         backgroundcolor=\color[rgb]{0.95, 0.95, 0.95}     }      There already exists a question how this behavior can be prevented in a `lstlisting`. In particular the solution presented in this answer works well for me. So I tried to extend this solution so that it also works with `\lstinputlisting`. However, the obvious attempt to replace "lstlisting" with "lstinputlisting" in the code snippet did not work. So my question is: **How can I create a \lstinputlisting with a background and rounded corners, where the background does not overlap the rounded corners?**


title: Is there any way to shift two \includegraphics images? Having trouble with \begin{figure}

text: I am trying to put two images into my latex document. I want the format to be 2 (a) Text text Image Image Text text When I do the following               %2a     \item Here are the histograms of M and A values. \\     \includegraphics[scale=.4]{2a hist M values.jpeg}      \includegraphics[scale=.4]{2a hist a values.jpeg}     I would not say either of these are normally distributed.       I get what I want, but the second image overflows off the page               %2a     \item Here are the histograms of M and A values.      \begin{figure}[h!]     \includegraphics[scale=.4]{2a hist M values.jpeg}      \includegraphics[scale=.4]{2a hist a values.jpeg}     \end{figure}     I would not say either of these are normally distributed.       This formats the images great but the text continues as if the images are being placed at the end of the chapter or something. The text basically continues right after the first sentence when I want it to continue after the images. Can anyone help me with this?


title: Pgfplots closes plot cycle when it should not

text: I experience a strange behaviour with `pgfplots`. I plot a series of datasets with no problems, but suddenly when I plot my last set of data, a line is drawn from the last point back to the first point (or vice versa, I can't tell). First I thought this is an issue with my dataset, but it is not. The x-axis starts at 600 and ends at 4500. Because of the large number of datapoints, I plot with `LuaLaTex`, but I do not think that this has anything to do with it. Data is read from a table with whitespace separated columns and as I mentioned three ut of four datasets plot perfectly fine. Has anyone seen a behaviour like this before? What might trigger pgfplots to think it needs to close the cycle?               Wavenumber S3-274C S57-470C S61-530C S78-Waven S78-600C     599.79222 0.00111376889640803 -0.00318693372816191 0.000493685423608535 600.03332 0.00245899230729994     600.03332 0.000685106575644899 -0.00300781635600173 -0.00075611249618284 600.51551 0.00355253129408962     600.27441 0.00020054240413265 -0.00292040072006049 -0.00387528077430245 600.99771 0.00322643347723173     .     .     .     4499.0656 -0.000192050912304183 -0.000206136040667906 0.000470869306110851 4498.5834 -7.20299845689941e-06     4499.3067 -0.000229780242038388 -0.000840102422491839 0.000772319837166174 4499.0656 -0.000583129304457668     4499.5478 0.000222526133933754 -0.000688254151215666 0.000522590786071012 4499.5478 -0.000741882168643009      * * *               \documentclass[tikz,12pt]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}          \begin{document}          \begin{tikzpicture}     \begin{axis}[width=0.9\textwidth,     ymin=-0.01,     ymax=0.02,     line width=0.3pt]     \addplot[orange,mark=none%,y filter/.code={\pgfmathparse{\pgfmathresult+0.09}}     ] table[x=S78-Waven, y=S78-600C] {MBTC-only.dat};     \end{axis}       \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/6Sjva.jpg)                *File List*     standalone.cls    2012/09/15 v1.1b Class to compile TeX sub-files standalone     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)      ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional      xkeyval.sty    2012/10/14 v2.6b package option processing (HA)      xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)     standalone.cfg    2012/09/15 v1.1b Default configuration file for 'standalone'      class      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)         tikz.sty    2012/08/29 v2.10-cvs (rcs-revision 1.100)          pgf.sty    2008/01/15 v2.10-cvs (rcs-revision 1.12)       pgfrcs.sty    2010/11/07 v2.10-cvs (rcs-revision 1.25)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v2.10-cvs (rcs-revision 1.7)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)       pgfsys.sty    2012/03/30 v2.10-cvs (rcs-revision 1.38)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v2.10-cvs (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10-cvs (rcs-revision 1.1)       pgffor.sty    2012/08/27 v2.10-cvs (rcs-revision 1.22)      pgfkeys.sty          pgfkeys.code.tex      pgfmath.sty          pgfmath.code.tex       pgffor.code.tex         tikz.code.tex     pgfplots.sty    2013/03/17 v1.8 Data Visualization (1.8-3-gaf58a29)     supp-pdf.mkii      ***********      **UPDATE:** I took the data of the strange dataset and saved it unchanged in another file. Now it works with no problem. Must be some kind of error in the reading of the table or maybe my slightly complicated column naming scheme.


title: ftp tug org tarballs and snapshots

text: # 1. On tug.org FTP (ftp://tug.org/texlive/historic/2014/) there are four tar.xz:               *-bin.tar.xz        (precompilled bins for many platforms)     *-sources.tar.xz    (sources for making bins)     *-devsources.tar.xz (???)     *-extra.tar.xz      (???)     *-texmf.tar.xz      (???)        * What are 'devsources' and 'extra' and 'texmf' archives? # 2. These two tarballs also available in another folder are needed to install tree and future update tlmgr:               ftp://tug.org/texlive/tlnet/install-tl-unx.tar.gz     ftp://tug.org/texlive/tlnet/update-tlmgr-latest.sh        * First is installer (netinstaller, more specific) and second is tlmgr-updater, isn't it? # 3. I have used '*-sources.tar.xz' to build my own binaries (custom) and 'install- tl-unx.tar.gz' to install TexLive.   * What should I download to install TexLive by install-tl script without the internet? Maybe iso-image? or rsync some dir? (I means 'current' version).


title: "\caption outside float" error

text: I am trying to have a caption in a commutative diagram using the `xypic` package. But it is not working. I have written the code below:               \documentclass[a4paper,12pt]{article}     \usepackage{xypic}     \begin{document}          \xymatrix{ A \ar[r] \ar[d]& B\ar[d] \\     C \ar[r]& D     }          \caption{commutative diagram}     \label{fig1}          From \ref{fig1} we...          \end{document}      Is there any way to create a caption and a cross-reference in the diagram?


title: Flushbottom columns when \parskip has no stretchable glue

text: In the following example, the columns on page 1 and 3 "sit" perfectly on the frame, while on page 2 (with the large float) the columns end a bit above the frame. Does anyone have an idea what I could do to get around the problem? (If a perfect solution is not possible, then a difference of 1-2pt would be acceptable). Using a `\parskip` with stretchable part helps naturally but is not what I'm looking for. Setting `\dbltextfloatsep` to a specific value helps, too (in this case to 24.8pt), but it's dependent on the size of the figure and it is tiresome to find the "correct" value.               \documentclass[a4paper,twocolumn]{book}     \usepackage{lipsum}     \usepackage[showframe,                textheight=\dimexpr\topskip+45\baselineskip\relax]{geometry}     %\parskip=0pt plus 1pt     \parskip=0pt           %\dbltextfloatsep=24.8pt          \begin{document}     \begin{figure*}     \rule{\textwidth}{5cm}     \caption{blub}     \end{figure*}          \lipsum \lipsum     \end{document}


title: TikZ: Problem when using shift and rotate

text: I am having an issue when I use `shift` and `rotate`. In one case, the rectangle is being elongated down to the stopping point of the shift and rotate. However, if I issue the same command in another case, the rectangle acts in the appropriate manner by rotating and shifting not elongating to the stopping point.               \documentclass[convert = false, tikz]{standalone}          \begin{document}     \begin{tikzpicture}       \coordinate (O) at (0, 0);            \filldraw[outer color = blue!75!pink!60,       inner color = red!50!black!20, rotate = {-30}, shift = {(2, 0)}] (O) rectangle       (.75, .5);            \filldraw[red] (3, 0) rectangle (4, .75);       \filldraw[red, rotate = {45}, shift = {(1, 0)}] (3, 0) rectangle (4, .75);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/qbOXl.png) I would like the elongated rectangle to behave as the red rectangle. When I issue a `rotate` and `shift`, I want the rectangle to do just that not stretch to the spot. This stretching only occurs with objects placed at the origin.


title: How can I define multiple identifier classes and styles in listings?

text: I'm trying to add different styles (color, etc.) to different groups of words in the `listings` package. Note that my question is different from How can I use multiple declarations (\textbf, \emph) in listings' emphstyle?. Let me show you some code:               \documentclass{article}     \usepackage{listings}     \begin{document}      ...     \begin{lstlisting}         {             "id": {integer},             "login": {string},             "password": {string},             "name": {string},             "picture": {                 File Resource             }         }             ...                PUT /files/{file_id}     \end{lstlisting}     \end{document}      I use the `\lstset` command to define the following:               ...         emph={  % HTTP Request             GET,POST,PUT,DELETE         },         emphstyle={\color{green}},     ...      but I would like to add more words with a different style (color, etc.), like so               ...         emph2={  % Variable Types             integer,string,blob,datetime         },         emphstyle2={\color{darkBlue}},     ...      How can I do that?


title: Adding pictures to moderncv

text: I want to add my institution logos to my CV but unfortunately they don't appear in right place. How should I edit the code to make the picture appear right above the city without making the "institution" to go down, i.e. to make it flow there aligned with other information? ![enter image description here](http://i.stack.imgur.com/7te9l.png)                %% start of file `template.tex'.     %% Copyright 2006-2013 Xavier Danaux (xdanaux@gmail.com).     %     % This work may be distributed and/or modified under the     % conditions of the LaTeX Project Public License version 1.3c,     % available at http://www.latex-project.org/lppl/.               \documentclass[11pt,a4paper,sans]{moderncv}        % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')          % moderncv themes     \moderncvstyle{banking}                            % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'     \moderncvcolor{red}                                % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'     %\renewcommand{\familydefault}{\sfdefault}         % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name     %\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page          % character encoding     \usepackage[utf8]{inputenc}                       % if you are not using xelatex ou lualatex, replace by the encoding you are using     %\usepackage{CJKutf8}                              % if you need to use CJK to typeset your resume in Chinese, Japanese or Korean          % adjust the page margins     \usepackage[scale=0.75]{geometry}     %\setlength{\hintscolumnwidth}{3cm}                % if you want to change the width of the column with the dates     %\setlength{\makecvtitlenamewidth}{10cm}           % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...          % personal data     \name{John}{Doe}     \title{ResumÃ© title}                               % optional, remove / comment the line if not wanted     \address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty     \phone[mobile]{+1~(234)~567~890}                   % optional, remove / comment the line if not wanted     \phone[fixed]{+2~(345)~678~901}                    % optional, remove / comment the line if not wanted     \phone[fax]{+3~(456)~789~012}                      % optional, remove / comment the line if not wanted     \email{john@doe.org}                               % optional, remove / comment the line if not wanted     \homepage{www.johndoe.com}                         % optional, remove / comment the line if not wanted     \extrainfo{additional information}                 % optional, remove / comment the line if not wanted     \photo[64pt][0.4pt]{picture}                       % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file     \quote{Some quote}                                 % optional, remove / comment the line if not wanted          % to show numerical labels in the bibliography (default is to show no labels); only useful if you make citations in your resume     %\makeatletter     %\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}     %\makeatother     %\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}% CONSIDER REPLACING THE ABOVE BY THIS          % bibliography with mutiple entries     %\usepackage{multibib}     %\newcites{book,misc}{{Books},{Others}}     %----------------------------------------------------------------------------------     %            content     %----------------------------------------------------------------------------------     \begin{document}     %\begin{CJK*}{UTF8}{gbsn}                          % to typeset your resume in Chinese using CJK     %-----       resume       ---------------------------------------------------------     \makecvtitle          \section{Education}     \cventry{year--year}{Degree}{Institution}{\includegraphics[scale=0.5]{picture}City}{\textit{Grade}}{Description}  % arguments 3 to 6 can be left empty     \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}          \end{document}               %% end of file `template.tex'.


title: Hide subsection numbering in body, but not in TOC

text: Is there an easy way to use numbering for subsections in the TOC, but to hide the subsection numbers in the document body? I could use `\subsection*{Title}` but then the entries are gone from the TOC.


title: Tabular and grid typesetting

text: In my document, I try to remove most of the vertical stretch, using some of the tricks detailed in this document. Specifically, I have               \setlength{\lineskiplimit}{-10pt}     \setlength{\lineskip}{0pt}      This, however, does not play nicely with `\cmidrule` from `booktabs`. From other posts, I gleaned, that the `tabular` environment uses different spacing methods, i.e., it sets `\baselineskip` to zero and relies on the `\lineskiplimit` to get correct spacing. This breaks when using the trick above, which is made even more clear when using `\setlength{\lineskiplimit}{-999pt}`: any table is rendered as a single line, in which all content is overlapping. What is a good/elegant way to fix this problem? **edit** : The package `grid` is often mentioned as solving (part of) the grid typesetting issue, but this package also breaks `\tabular`:               \documentclass{article}     \usepackage{grid}     \begin{document}     \begin{tabular}{cc}         one & two \\         three & four \\     \end{tabular}     \end{document}


title: Parameter section similar to Input and Output

text: I would like to create a " **Parameter** : ..." section, similar to the " **Input** : ..." and " **Output** : ..." sections in my algorithm description. The parameters are global, user-defined constants, known before the algorithm is run. I have tried to define a new keyword with the text "Parameter" but of course that does the wrong thing (among others: the line is numbered but it should not be, everything behind the "Parameter:" is in italics but I don't want it to be). **How can I create a parameter section similar to Input and Output?** * * * Gonzalo Medina's answer almost does the right thing but I get a superfluous colon on a separate line. ![enter image description here](http://i.stack.imgur.com/aaQn3.png) Code:               \documentclass[preprint,3p,12pt,times]{elsarticle}     \usepackage{ecrc}     \usepackage[linesnumbered,algoruled,boxed,lined]{algorithm2e}     \volume{00}     \firstpage{1}     \journalname{Some journal}          % Would work correctly with these lines:     % \documentclass{article}     % \usepackage[linesnumbered,algoruled,boxed,lined]{algorithm2e}          \SetKwInOut{Parameter}{Parameters}          \begin{document}          \begin{algorithm}[H]       \KwIn{Some input}       \Parameter{Some parameter}       \KwOut{Some output}         \caption{Some algorithm}\label{alg.mainLoop}     \end{algorithm}          \end{document}      I guess it is some macro clash among the packages. Any workaround would be greatly appreciated.


title: Plotting a random function f(x) and f(x)+sin(x) with tikz

text: I'm plotting a function f(x) with random values as follows:               \documentclass[tikz]{standalone}          \begin{document}     \begin{tikzpicture}     \draw[color=blue, samples=150]  plot[domain=0:10] (\x,rand) node[below] {$f(x)$};     \end{tikzpicture}     \end{document}      Now I want to plot a new Function g(x) which is defined as g(x)=f(x)+sin(x). Is there a way to do that? I would really appreciate any help. Thanks


title: How to add a colon after listing label?

text: I want to add a colon ":" after each lstlistingname in the lstlistoflistings. At the moment the it shows me "Code 1 StatusCalculator Initialize....." But I want a colon after lstlistingname "Code 1: StatusCalculator Initialize..." I didn't get it to run. Can anyone help me?               \documentclass[12pt, a4paper, oneside]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage{textcomp}     \usepackage[ngerman]{babel}     \usepackage[hidelinks=true]{hyperref}     \usepackage[final]{pdfpages}          \definecolor{grey}{gray}{0.9}          \usepackage{listings}     \renewcommand\lstlistingname{Code}     \lstloadlanguages{Ruby}     \lstset{%     basicstyle=\small\ttfamily\color{black},     commentstyle = \ttfamily\color{red},     keywordstyle=\ttfamily\color{blue},     stringstyle=\color{orange},     backgroundcolor=\color{grey},     columns=fullflexible}          \usepackage{color}     \usepackage{xcolor}          \usepackage{caption}     \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}          \let\oldlstlistoflistings\lstlistoflistings     \renewcommand{\lstlistoflistings}{%       \begingroup%       \let\oldnumberline\numberline%       \renewcommand{\numberline}{\lstlistingname~\oldnumberline}%       \oldlstlistoflistings%       \endgroup}          \usepackage{geometry}     \geometry{a4paper, top=25mm, left=25mm, right=25mm, bottom=20mm, headsep=10mm, footskip=12mm}          \begin{document}           \renewcommand\lstlistlistingname{Codelisting}      \addcontentsline{toc}{section}{Codelisting}      \lstlistoflistings      \newpage            \begin{lstlisting}[language=Ruby, caption=StatusCalculator Initialize, label=initialize]       def initialize(project_id)         @project = Project.find(project_id)       end       \end{lstlisting}          \end{document}


title: Hyperlinks in ToC

text: I started working with LaTeX some months ago and this forum has been very useful for me. Now I am writing a report and I want to have the ToC, LoF and LoT with hyperlinks. So I use the package:               \usepackage[dvips,breaklinks]{hyperref}      Then I compile via `\latex+dvips+ps2pdf+view pdf`. When the PDF is generated the link text does not break at end line (i.e., in ToC, LoF and LoT). I also used `hypdvips` package but a lot of errors appear.               \usepackage{hypdvips}      Although one solution is to add `linktocpage`, I want to make the text active and not only the page number. I also tried compiling via `latex+dvipdfm+view pdf` with the option `dvipdfmx` in `hyperref`               \usepackage[dvipdfmx]{hyperref}      This time the `breaklinks` problem is solved but the EPS figures are shifted. I am using Texmaker 4.1, MiKTeX 2.9, Ghostscript 9.10 and GSview 5.0 on Windows 7. I would appreciate any guidance.


title: siamltx + amsthm: "LaTeX Error: No counter 'Theorem' defined."

text: When using the LaTeX class `siamltx` (from the SIAM page) together with amsthm (which I need for its `theoremstyle` command), I'm getting the error message               ! LaTeX Error: No counter 'Theorem' defined.      The following code reproduces the error.               \documentclass{siamltex}                                                                  \let\proof\relax                                                                     \let\endproof\relax                                                                  \usepackage{amsthm}                                                                       \begin{document}                                                                          \begin{theorem}                                                                      dasdas                                                                               \end{theorem}                                                                             \end{document}      Any way around this?


title: Model of chapter

text: How I can get the following model of chapter ![enter image description here](http://i.stack.imgur.com/9pdIn.png) Thanks in advance.


title: Unexpected blank lines between paragraphs and lists after \section

text: A `\section` will cause **unexpected** blank lines to appear between paragraphs and lists in a `odt` document created by TeX4ht. If `\section` is dropped, however, no extra blank lines will appear in thoses contexts. My question is: What piece of code exactly in the configuration of `section` is doing this? And why? (See code at the bottom.) _(I'm asking this for educational purposes. I'm not reporting a bug. Nor am I dealing with a real world problem. I'm trying to understand how TeX4ht works.)_ # No `\section`               \documentclass{article}     \begin{document}            Paragraph.              \begin{enumerate}            \item List         \end{enumerate}          \end{document}      ### Good output: ![enter image description here](http://i.stack.imgur.com/80vfX.jpg)                  <!------no section---------------->        <text:p text:style-name="Text-body">Paragraph. </text:p>        <!------no blank line---------------->        <text:list xml:id="list1" text:style-name="Enumerate">         <text:list-item>          <text:p text:style-name="Inside-enumerate">List</text:p>         </text:list-item>        </text:list>      # With `\section`               \documentclass{article}     \begin{document}            \section{My section}            Paragraph.              \begin{enumerate}            \item List         \end{enumerate}          \end{document}      ### Bad output: ![enter image description here](http://i.stack.imgur.com/JJvn1.jpg) By "blank line" I mean this: `<text:p text:style-name="First-line-indent"/>` in the third line:                  <text:h text:style-name="Heading-2" text:outline-level="2">1 Section</text:h>        <text:p text:style-name="Text-body">Paragraph. </text:p>        <text:p text:style-name="First-line-indent"/>        <text:list xml:id="list1" text:style-name="Enumerate">         <text:list-item>          <text:p text:style-name="Inside-enumerate">List</text:p>         </text:list-item>        </text:list>      Notice that a blank line doesn't appear after the heading. It appears **later on** , i.e, after any paragraph which is followed by a list: # Code: Here is the configuration for `section` from `texmf/tex/generic/tex4ht/ooffice.4ht` (line 3460 ff)               \ConfigureMark{section}        {\ifnum \c:secnumdepth>\c@secnumdepth \expandafter\:gobble         \else  \thesection\space\fi }     \Configure{section}        {\IgnorePar\EndP \HCode{<!--start of section-->}}        {\IgnorePar\EndP \HCode{<!--end of section-->}}        {\HCode{<text:h text:style-name="\csname a:Heading-2\endcsname"                        \text:outlinelevel="2"  ><text:span                        text:style-name="section">}\TitleMark\space         \HCode{</text:span>}\IgnoreIndent}        {\HCode{</text:h>\Hnewline}\par\ShowPar}


title: Single spaced footnotes with bigfoot?

text: Can I make footnotes single spaced with `bigfoot`? According to this answer, `setspace` shouldn't affect footnotes -- which is true, as long as I don't use `bigfoot`. **MNWE** (modified version of this):               \documentclass{article}     \usepackage[       paperwidth=.5\textwidth,       paperheight=12\baselineskip,       margin=5pt,       bottom=1.5cm]{geometry}          \usepackage[doublespacing]{setspace}          \usepackage[dont-mess-around]{fnpct}[2012/07/07]      \usepackage{bigfoot}          \DeclareNewFootnote[para]{R}[Roman]     \DeclareNewFootnote[para]{N}          \begin{document}     First sentence.\footnoteR{Here is the first footnote, which gives lots of details that you may or may not find interesting.}\footnoteR{Here is another footnote.}%     And another.     \end{document}


title: Passing command output as a parameter to the other command

text: I created some kind of switch statement with a help of `\ifthenelse` command. Now, I would like to pass its output to another command. In my example I want to colorize each sentence with a color specified by a number. My code is:               \documentclass{article}          \usepackage{ifthen}     \usepackage{color}          \newcommand{\num}{1}           \newcommand{\mySwitch}[1]{      \ifthenelse{#1=1}{red}{        % color no 1 is red      \ifthenelse{#1=2}{blue}{}}}    % color no 2 is blue ... and so on           \begin{document}          \color{\mySwitch{\num}}     \mySwitch{\num} is the color no \num.          \renewcommand{\num}{2}     \color{\mySwitch{\num}}     \mySwitch{\num} is the color no \num.          \end{document}      I would like to obtain something like this: ![enter image description here](http://i.stack.imgur.com/UYcy0.png) but the result of compilation is: ![enter image description here](http://i.stack.imgur.com/RzbnE.png) What is more, I keep getting a number of errors from which the first one is > Missing \endcsname inserted \color{\NoToColor{\num}}. I suppose the proper solution should have something to do with `\expandafter` command but simply putting                \expandafter\color\expandafter{\mySwitch{\num}}       gives no results. I must be missing something but I can't get it to work and I can't find any similar example. Please give some hints.


title: texify: how to invoke bibtex8 instead of bibtex?

text: Suppose that I need to run               bibtex8.exe -B -c cp1251.csf or something like that in order to produce correct bibliography list; cp1251.csf comes with the gost package but it makes no difference in the context of my question since I am getting correct output when I am running bibtex8 from the command prompt of from WinEdt menu. I want for texify to run bibtex8 instead of default bibtex as well. It is possible to instruct texify (from the miktex bundle) to run bibtex8 instead of bibtex by setting the BIBTEX environment variable as follows               SET BIBTEX=bibtex8      But texify fails if I am trying to pass options to the bibtex8 execuatable. In particular, with               SET BIBTEX=bibtex8 -B -c cp1251.csf      texify aborts with the message               texify: "bibtex8 -B -c cp1251.csf" could not be found.      Is there a way to pass options to bibtex8 over texify?


title: Scaling LaTeX output

text: I need to create 2 versions of a University dissertation. The main version has to be done on letter-sized paper with very strict specifications for most of the style elements. But I would also like to create a (for want of a better term) paperback version. What I'd like to do is to scale each page by 0.65 and print 2 pages side by side on one side of a letter-sized sheet (in landscape mode, of course. I realize that there will be extra vertical space.). I've been reading about output routines, including this question, and so am happy to hear that output routines are as dark for others as they are to me. I would appreciate any ideas that anyone has on how to accomplish this. Please note that I don't want to create two versions of the document by, say, creating two distinct class files with different fonts, scaled graphics, etc. I'm hoping that someone will tell me that there are pdf tools or output routines that can easily accomplish this with an option or two. Gracias.


title: Optional but encouraged line break + \hfill

text: How would I write a macro (to be placed immediately before every URL in a bibliography) whose effect is to tell TeX   1. This is a good place to insert a line break, but breaking the line here is not required.   2. If (and only if) you break the line here, insert a `\hfill` (or maybe a `\par`, I'm not sure which makes more sense) immediately before the line break. I tried `\discretionary{\hfill}{}{}\penalty-500\relax` which gave me a bunch of "Improper discretionary list" errors, and I also tried `\discretionary{\par}{}{}\penalty-500\relax` which didn't give me any errors but also didn't seem to have any effect. (Also I'm not sure if `\penalty` is how you encourage a line break.) (What I _really_ want is for TeX to insert a _paragraph_ break before the URL if and only if the URL doesn't fit onto the space remaining in the current line, but -- after that break happens -- not interfere with `url.sty`'s intra- URL line breaking. But I suspect this is not even possible, whereas what I described above, I'm pretty sure _is_ possible, I just don't know how to do it.) **EDIT:** Minimal-ish example of overfull hboxes with TH's currently suggested code:               \documentclass[twocolumn]{article}     \usepackage[hyphens]{url}     \usepackage[letterpaper,margin=1in]{geometry}     \begin{document}     \urlstyle{same}          \begin{thebibliography}{10}     \let\oldurl\url     \makeatletter     \renewcommand*\url{%             \begingroup             \let\do\@makeother             \dospecials             \catcode`{1             \catcode`}2             \catcode`\ 10             \url@aux     }     \newcommand*\url@aux[1]{%             \setbox0\hbox{\oldurl{#1}}%             \ifdim\wd0>\linewidth                     \strut                     \\                     \vbox{%                             \parindent=0pt                             \kern-\lineskip                             \raggedright                             \strut\oldurl{#1}%                     }%             \else                     \hskip0pt plus\linewidth                     \penalty0                     \box0             \fi             \endgroup     }     \makeatother          \bibitem{thinkermade08focus}     ThinkerMade. (2008) {How to Tell if a User is Signed in to Facebook and Other       Services}. Blog entry.       \url{http://replay.waybackmachine.org/20081020072934/http://www.thinkermade.com/blog/2008/07/how-to-tell-if-a-user-is-signed-in-to-facebook-and-other-services/}     \end{thebibliography}     \end{document}      Complaint:               (./argh.tex (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo))     (/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty)     (/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty     (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)     (/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty)     (/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty)) (./argh.aux)     *geometry auto-detecting driver*     *geometry detected driver: pdftex*          Overfull \hbox (20.5556pt too wide) in paragraph at lines 40--43     []      [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./argh.aux) )      This is _not_ just a cosmetic problem; the URL extends into the right margin.


title: Installing TeX Live from tug.org

text: I was trying to install TeX Live (on Ubuntu10.04) following the instructions contended in http://tug.org/texlive/quickinstall.html (c.f. thread Typesetting a document using Arabic script). I've chosen `scheme` -> `customised` mostly to uncheck support for languages I will never need as well as music typesetting and advanced maths. Beside that I've left default. After installation I wanted to run `tlmgr -gui` to install LaTeX and pdfLaTeX but it didn't work: `command not found`. I've checked .log installing file (`/usr/local/texlive/2010/install-tl.log`). I won't post it here entirely (unless somebody asks) - it's pretty long, but here is what I've found in it searching for `error`:               TLDownload::get_file: response error:       404 File 'dprogress.tar.xz' not found          TLDownload::get_file: response error:       404 File 'draftcopy.doc.tar.xz' not found          TLDownload::get_file: response error:       404 File 'natbib.doc.tar.xz' not found          TLDownload::get_file: response error:       404 File 'placeins.doc.tar.xz' not found          TLDownload::get_file: response error:       404 File 'polski.tar.xz' not found          TLDownload::get_file: response error:       404 File 'placeins.doc.tar.xz' not found          TLDownload::get_file: response error:       404 File 'polski.tar.xz' not found          TLDownload::get_file: response error:       404 File 'preprint.tar.xz' not found          TLDownload::get_file: response error:       404 File 'txfontsb.source.tar.xz' not found          TLDownload::get_file: response error:       404 File 'xnewcommand.tar.xz' not found          TLDownload::get_file: response error:       404 File 'active-conf.doc.tar.xz' not found      I have no idea where the problem may lay. I would be very greateful for any tips. If there is any further information I should provide, please ask. **P.S.** The default paths are:               <D> directories:        TEXDIR (the main TeX directory):          /usr/local/texlive/2010        TEXMFLOCAL (directory for site-wide local files):          /usr/local/texlive/texmf-local        TEXMFSYSVAR (directory for variable and automatically generated data):          /usr/local/texlive/2010/texmf-var        TEXMFSYSCONFIG (directory for local config):          /usr/local/texlive/2010/texmf-config        TEXMFVAR (personal directory for variable and automatically generated data):          ~/.texlive2010/texmf-var        TEXMFCONFIG (personal directory for local config):          ~/.texlive2010/texmf-config        TEXMFHOME (directory for user-specific files):          ~/texmf      I haven't change here anything. **UPDATE** It took me some time, but I've proceeded the installation once again. This time, no errors, but still nothing works. I've run installation, than I've added to /etc/profile paths (`PATH=/usr/local/texlive/2010/bin/i386-linux:$PATH; export PATH`). When I try to check `tex --version` I get the message that:               'The program 'tex' is currently not installed. You can install it by typing: sudo apt-get install texlive-binaries.      I have no idea, what could I have done wrong but there should be something...


title: Problem about program code included in LaTeX

text: 1. I have some Matlab code which I would like to include in my LaTeX document. I use fancyvrb package, based on which I define a new environment called code. An complete and minimum example is:              \documentclass[12pt,letterpaper]{article}     \usepackage{fancyvrb}     \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}     \DefineVerbatimEnvironment{example}{Verbatim}{fontsize=\small}          \begin{document}     \begin{code}     addpath('~/plot');      \end{code}     \end{document}      However, in the created pdf file, if I copy the code and paste it in Matlab command window, Matlab will complaint about the single quote is not the one used in Matlab. I was wondering why and how to solve the problem?   2. To generalize, I also hope to know if there may possibly be other characters besides single quote that can cause such error? Not only in Matlab but also other programming languages?   3. Also, I was wondering if my way of including code in LaTeX by using fancyvrb is the best? Do you have other nice ways to recommend? Thanks and regards!


title: General advice on how to manage references between multiple files

text: I need to cut my `.tex` files into several files, and to compile each file separately. I will need to do some work to ensure that the references and the counters work well. Before starting this work, **I wanted to have some advice from the community.** Like:   * does this already exist somewhere? _(partly answered, see Edit)_   * Can I use some tools that will reduce the amount of work? ## Notations I cut `myFile.tex` into `myFile_1.tex`, ..., `myFile_n.tex`. ## Plan of work Here is my plan to do this:   1. For the references (access to the `\label{}` of the previous files): for each file `myFile_i.tex`, create a file `_myFile_i.aux` that will incorporate the references found in `_myFile_{i-1}.aux` _plus_ the references of `myFile_i.tex`. (Hence, it is a recursive procedure) Some questions arise: a. How to "extract" from `myFile_i.aux` only the references? b. How to tell to latex to use the references in `_myFile_i.aux` when compiling `myFile_i.tex`?   2. For the correctness of the counters (`counterA` should not start at `O` in `myFile_i.tex` but at the value it takes at the end of `myFile_{i-1}.tex`): for each file `myFile_i.tex`, create a `.tex` file `countersSetting_i.tex` which will be included at the beginning of `myFile_i.tex`. This file will essentially consist of lines such as `\setcounter{counterA}{k}`. Questions/Remarks: a. How to "extract" from `myFile_i.aux` only the good values for the counters? b. Be sure that if all the file `myFile_i.tex` (with the lines `input{countersSetting_i.tex}`) are merged into one file, the compilation is ok. c. How to deal with the counters of the environment `equation`? ## Edit While writing this question, I saw this other question that partly resolve my problem. It seems that the only remaining problem is to ensure that the counters start at the good value for each file. So, the remaining questions are:   * **how to capture the values of the counters at the end of a document?** Or: **Is there a another better way to deal with this problem?**   * **how to deal with the counters of the environment`equation`?** I don't rewrite the whole message because some users might have interesting remarks on my plan of work (it would be good to know). If you think that I might ask another more specific question or rewrite this one, please leave a comment.


title: Combine several chapters (separate files) in to one report

text: I am writing my final year thesis. I was asked to write my report part by part. First I wrote the Introduction chapter. No I have completed the Literature Survey. Both these were written as two separate articles(document class). Both these tex files reside in different directories and both of them have their own bibliography. All the bibtex files are kept in a common folder               Report        >intro            >introduction.tex        >lit-review            >literature-review.tex        >refs            >refgroup1.bib            >refgroup2.bib      Now I want to combine these two articles in to one document as two chapters, to produce a draft report which will be extended further by adding new parts as my research progresses. The references should be displayed at the end of the whole report. Could someone guide me to do this? Thank you


title: Linux Biolinum O messes up moderncv Package

text: Take the `template.tex` example file from http://www.ctan.org/tex- archive/macros/latex/contrib/moderncv/examples and add these two lines:               \usepackage{fontspec}     \setsansfont{Linux Biolinum O}      Then run it with `lualatex`. Suddenly these thick bars get really slim. Why is that? ![change in line thickness](http://i.stack.imgur.com/PW7WZ.png) Example:               \documentclass[11pt,a4paper,sans]{moderncv}       \usepackage{fontspec}     \setsansfont[Ligatures=TeX]{Linux Biolinum O}          \moderncvstyle{casual}             \moderncvcolor{blue}               \usepackage[scale=0.75]{geometry}               % personal data     \firstname{John}     \familyname{Doe}     \title{Resum√© title (optional)}                    \address{street and number}{postcode city}             \begin{document}          \maketitle          \section{Education}     \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}       \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}               \nocite{*}     \bibliographystyle{plain}     \bibliography{publications}                       \end{document}


title: Indenting with poemscol package

text: I'm trying to typeset a poem collection with `poemscol`. The result looks like this: ![Screenshot showing how poemtitle and attribution are indented](http://i.stack.imgur.com/QiEwX.png) I'd like to control the distances marked in red (I don't want any moving to the right); but all attempts with `\setlength` of `\leftmargin`, `\titleindentamount` etc. don't work, and I've never ventured this far into page setup details. Can someone provide a hint how this usually works? The current code:               \documentclass[9pt, a5paper]{scrbook}     \usepackage[a5paper]{geometry}     \usepackage{fancyhdr}     \usepackage{poemscol}     \begin{document}     \poemtitle{I dwell in Possibility}     \attribution{E. Dickinson (1830--1886)}     \begin{poem}     \begin{stanza}     \textsc{I dwell} in Possibility --\\     A fairer House than Prose --     \end{stanza}     \end{poem}     \end{document}      I tried to track the indentation in the `poemscol` package, but without success. I cannot find the commands in the package that control this behavior. What is their name and where are they?


title: \answerline to the right of a question

text: using `exam` class. I want the answerline on the same line as the question, to be used in mid-sentence actually. I have this:               \documentclass[a4paper]{exam}     \begin{document}     \begin{questions}     \question Write hello  \answerline[hello] to your mother     \end{questions}     \end{document}


title: Labels and Cross-referencing in items

text: I have itemize environment and I want to cross-reference between two items. How do I do that?