title: Translation of words according to babel language

text: I've got a template that is to be used in french or english, is there a name in babel defining the "of" of "page x of yy" than I want to translate automaticaly to "page x sur y" If not, is there a way of setting a name according to language selected in babel.


title: fancyhdr plus fontsize 12pt causes varying vertical alignment of sections

text: Looking at the example provided in Different headers for different chapters, I noticed something strange: The vertical alignment of sections is varying. I was able to strip the effect down to the following (hopefully minimal) example:               \documentclass[12pt]{report}          \usepackage{fancyhdr}     \pagestyle{fancy}          \begin{document}          \chapter{My First Chapter}     \clearpage     \section{Section 1}     \clearpage     \section{Section 2}     \clearpage     \section{Section 3}          \end{document}      If you look closely, the vertical alignment of "Section 1" differs from those of "Section 2" and "Section 3" (which are the same). The effect disappears if you either a) refrain from using the `fancyhdr` package and `\pagestyle{fancy}` or b) switch to the `10pt` class option. What is causing this strange vertical alignment?


title: fancyhdr moves the header on first page after title

text: In the code below I have the problem that the 'TOO HIGH' on the first page after the title page is shifted into the header. I want this on the same height as the 'IN THE RIGHT PLACE' on the second page after title page. anyone knows the answer?               \documentclass[a4paper, 11pt]{article}     \usepackage{fancyhdr}          \pagestyle{fancy}     \fancyhead[L]{     \scshape     \begin{tabular}[t]{@{}l@{}}     asdf     \end{tabular}}     \fancyhead[R]{     \scshape     \begin{tabular}[t]{@{}r@{}}     asdf \\ asdf \\ asdf     \end{tabular}}          \begin{document}          \thispagestyle{empty}     Title          \clearpage     TOO HIGHT -> INSIDE HEADER          \newpage     IN THE RIGHT PLACE          \end{document}


title: Automate Controls for Curves

text: I am looking to automate (simplify) the path drawn in blue on my MWE. I am trying to avoid nodes if possible as this is nested in a `tikzpicture`. Ideally I was hoping to simply specify the begin and end coordinates and adjust the step so to speak and perhaps amplitude. Perhaps using `pgfplots` This is the result of my MWE: (crappy screenshot) ![Sample](http://i.stack.imgur.com/9hvug.png)               \documentclass{standalone}     \usepackage{tikz}          \usetikzlibrary{snakes,backgrounds,arrows,decorations.markings}     \tikzset{rbox/.style= {draw=black,fill=white,thick,rectangle,rounded corners,inner xsep=2pt, inner ysep=2pt},         fancytitle/.style={fill=blue!15,draw=black,thick,text=black,rectangle,rounded corners},}     \begin{document}     \begin{tikzpicture}[transform shape]     \node [rbox] (box) {     \begin{minipage}{.8\linewidth}          {      \begin{center}     \begin{tikzpicture}[line width=1pt,sharp corners,x=1cm,y=1cm,                     every node/.style={font=\footnotesize}]     \clip       (0,-0.5)            rectangle           (6,6);     \draw    [help lines]    (0,0)          grid        (6,6);     %   Axes     \draw   [<->,>=triangle 45]         (0,3)           --          (6,3);     \draw   [<->,>=triangle 45]         (3,0)           --          (3,6);     \draw   [decoration={ticks,amplitude=.75mm,segment length=5mm},decorate,line width=0.75pt]                                 (0.5,3)     --          (5.5,3);     \draw   [decoration={ticks,amplitude=.75mm,segment length=5mm},decorate,line width=0.75pt]                                 (3,0.5)     --          (3,5.5);     %   Line     \draw   [*-*]                   (0.5,0.5)       --          (5.5,5.5);     %   Counting     \draw       [->,line width=1pt,blue]                (0.5,0.5) .. controls (.65,0) and (.85,0) .. (1,0.5)                                                 .. controls (1.15,0) and (1.35,0) .. (1.5,0.5)                                                 .. controls (1.65,0) and (1.85,0) .. (2,0.5);     \end{tikzpicture}      \end{center}          }     \end{minipage}     };     \node[fancytitle,right=8pt] at (box.north west) {Grid:};     \end{tikzpicture}     \end{document}


title: Tikz coordinates, arrows, and stopping short

text: So, I'm drawing velocity arrows with labels over them. The minimal example is that I have a node (a) and I want an arrow pointing towards the origin, but only part way. The distance could be long or short, maybe based on the magnitude of velocity. I've found a solution, but I want to know what others are out there, because it's not that elegant and LaTeX-y. What I just got working is this line:               \draw[->, shorten >=1cm] (a) -- (0,0)     node [near start, sloped, above] {12 m/s};      The parts I dislike about this solution are that I'm specifying how much to reduce the length rather that its actual length, and that as the length varies I have to change the label position, when I really just want it centered on the arrow length. I'm imagining there might be some way to specify a relative polar coordinate as "towards that point, this long" instead of explicit angle. Any ideas?


title: Positioning of image within an equation

text: I have the following problem: I would like to have images of Feynman diagrams as part of equations. Using               \newcommand{\imineq}[2]{     \includegraphics[height=#2ex]{#1}}      I had success in as far as               \begin{equation}     H\left(\imineq{Feynman_image}{7}\right)=     \end{equation}      does put the image roughly where it's meant to be but shifted upwards to the top half of the brackets. Anyone have any ideas as to how I can get the image to appear vertically centered and ideally get the brackets to scale properly?


title: Why the item style has changed to dashed instead of bullets?

text: I'm writing a thesis in LaTeX whose main language is English, with also a French abstract at the beginning (I suppose this fact to be relevant). Inside `\itemize`, all items are by default formatted as a dashed list, although I would like it to be a "normal" bullet list, (as it was at the beginning of writing). I'm not sure about the exact moment when the whole formatting has changed, but I think it was with the addition of all the abstract and introduction parts (but I noticed that after). If it is the case, why does it happen (and, of course, how can I fix it)?


title: Drawing a 2 x 2 Square and an L

text: I would like to draw the following two images. I heard using tikz may be of some help. ![enter image description here](http://i.stack.imgur.com/mssPI.png)


title: How to reverse name and first name?

text: With biblatex and verbose-trad2 style, I would like to reverse the order of the last name and the first name **for inline references.** The default behavior is: > John DOE, Title, place : publisher, year for inline references (in my case, in a footnote with `footcite` command) and: > DOE, John, Title, place : publisher, year in the bibliography at the end of the document. I would like to have both inline and final references in the following format (similar to the bibiography style). > DOE, John, Title, place : publisher, year P-S : There are some close questions (like this one) but only about the final bibliography (and no inline references). `\DeclareNameAlias{sortname}{last- first}` works only for the ending references (not inline ones).


title: Print a single page multiple times, counting up the page number

text: I (still :) have a ham-radio logbook, a single a4 page which I fill out manually (so this is just an empty form/a template of sorts). Please see below for the code. The page number is on the bottom left. I'd like to automatically print this one page multiple times, counting up the page numbers (whenever I need more pages to fill out - ham radio _is_ fun sometimes!). So basically I'd like to tell TeX "Take this template and print it 10 times, numbering the pages from 13 to 22". Any ideas would be highly appreciated, as always.               \documentclass[12pt,a4paper,oneside,landscape]{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[ngerman]{babel}     \usepackage{ragged2e}     \usepackage{array}     \usepackage[table]{xcolor}     \usepackage[a4paper, left=0.6cm, right=0.5cm,top=3.7cm, bottom=0.5cm]{geometry}     \usepackage{graphicx,type1cm,eso-pic}     \makeatletter         \AddToShipoutPictureBG{                 \setlength{\@tempdimb}{.5\paperwidth}                 \setlength{\@tempdimc}{0.85\paperheight}                 \setlength{\unitlength}{1pt}                 \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){                 \makebox(0,0){\rotatebox{0}{\textcolor[gray]{.4}                 {\fontsize{2cm}{2cm}\selectfont{Amateurfunk-Log DC1TS}}}}}         }              \AddToShipoutPicture*{                 \setlength{\@tempdimb}{0.02\paperwidth}                 \setlength{\@tempdimc}{0.12\paperheight}                 \setlength{\unitlength}{1pt}                 \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){                 \makebox(0,0){\rotatebox{270}{\textcolor[gray]{0.65}                 {\fontsize{1cm}{1cm}\selectfont{Seite 004}}}}}         }          \newcolumntype{M}[1]{>{\Centering}m{#1}}     \newcolumntype{C}{>{\rule[-3ex]{0pt}{8ex}}c}          \begin{document}     \sffamily         \rowcolors{3}{gray!5}{white}         \begin{tabular}{         | M{2cm} %Datum         | M{1.3cm}  %Zeit Start         | M{1.3cm}  %Zeit Ende         | M{2cm}  %Frequenz         | M{1.5cm}  %Mode         | M{3cm}  %Rufzeichen         | M{3cm}  %Name         | M{3cm}  %QTH         | M{1.3cm} %Power         | M{0.9cm} %Report gegeben         | M{0.9cm} %Report erhalten         | M{0.8cm} %QSL gesendet         | M{0.8cm} %QSL erhalten         |}         \hline         Datum & \multicolumn{2}{c|}{Zeit UTC} &         Frequenz & Mode & Rufzeichen & Name & QTH & Power &         \multicolumn{2}{c|}{Report} & \multicolumn{2}{c|}{QSL}  \\ [1ex]              & Start & Ende & (MHz) &  &  & & & (W) & geg. & empf. & ges. & erh. \\ [1ex]         \hline         \hline         & : & : & & & & & & & & & & \\ [4ex]        \hline         \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline         \hline         & : & : & & & & & & & & & & \\ [4ex]        \hline         \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline         \hline         & : & : & & & & & & & & & & \\ [4ex]    \hline         \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline         \hline         & : & : & & & & & & & & & & \\ [4ex]        \hline         \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline         \hline         & : & : & & & & & & & & & & \\ [4ex]        \hline         \multicolumn{13}{|C|}{\textcolor{black!10}{\Huge\bfseries Notizen}}\\\hline         \end{tabular}          \end{document}      Error: ![Picture of error occuring](http://i.stack.imgur.com/ueydd.png)


title: Creating table using TikZ matrix

text: I'm trying to create a table in TikZ with   1. the first column right-aligned, and the texts in each cell on the same line   2. the rest of the columns center-aligned, and each has width of 1cm My attempt is as follows:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}          \begin{tikzpicture}       \matrix(dict)[matrix of nodes,below=of game,         nodes={align=center,text width=1cm},         row 1/.style={anchor=south},         column 1/.style={text width=2cm,align=right},       ]{         meaning & $b_1$ & $b_2$ & $b_3$ & $b_1b_2$ & $b_1b_3$ & $b_2b_3$ & $b_1b_2b_3$\\         common list \\         private list\\       };       \draw(dict-1-1.south west)--(dict-1-8.south east);       \draw(dict-1-1.north east)--(dict-3-1.south east);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/09WnN.png) The output is not as desired, since the texts in cells `dict-2-1` and `dict-3-1` spread over two lines. Also, texts in column 1 is not right aligned, despite `column 1/.style` being specified after `node/.style`. What should I do?


title: Each time that I compile, kile creates another Pdf with same file

text: I read this question and I know that this not happens, if I use pdf viewers like evince or okular, but now I use FoxitReader because is lightweight and because I have Fedora 15 spin with LXDE and this edition uses epdfview (that I don't like) for default. Therefore, I uninstalled epdf and I'm happy with Foxit, but when I'm using kile and each time that I compiled a document, kile opens a new pdf. Then my question is: This happens me for the choice of FoxitReader or is a problem of kile's configuration? How can I fix this problem? Thanks in advance


title: I want the QED symbol to be 1 line lower at the end of proof

text: Just as my title says, I would prefer to have my qed symbol to be 1 line lower than the last line of my proof. By default its on the same line and aligned to the right. How can I achieve this? EDIT: See below code for an example:               \documentclass[11pt,a4paper]{article}     \usepackage[margin=3cm]{geometry}     \usepackage[english]{babel}     \usepackage{amsmath, amsthm}     \begin{document}          \begin{proof}         Hello there good chap! I'll put in another line here just to be sure its clear what I mean.     \end{proof}                    \end{document}


title: Problems with BibLaTeX and origyear in bibliography

text: This is my first time posting a question here so please excuse some mistakes. What I want to do is to cite something with its original publication year and have it appear as such in my bibliography. I am using BibLaTeX with the following options:               \usepackage[style=authoryear-icomp, bibstyle=authoryear-comp]{biblatex}      To get my citation label to show the `origyear` I was happy to find the following solution:               \DeclareLabelyear{\field{origyear}\field{year}}      This gives me the original publication date in citations, if available. Sadly, the bibliography does not include this label, but the `year` field, so that I cite "lastname (1891) and my bibliography has an entry much like               lastname, first (2002): titel...      for example. To accommodate for this I did the following:               \AtEveryBibitem{%     \iffieldundef{origyear}{%       \printnames{author} (\printdate)\addcolon\addspace       }{%         \setunit*{\addspace}%         \printtext[]{\printnames{author} (\printorigdate)\addcolon\addspace}%       }%     \clearname{author}%     \clearfield{year}}      So, now I have the right label, meaning my bibliography entry is               lastname, firstname (1981): titel...      but the actual publication date is lost. I would like something like               lastname, firstname (1981): titel... published in booktitel (or whatever) 2002..."      Two questions come to mind here:   * is there an easier way to get to where I am at, that is why does the `\DeclareLabelyear` not change the label in my bibliography, too?   * how do I include the actual publication date in my bibliography as well, and where? (Perhaps a third question would also make sense at this point:   * does the citation style I have in mind make any sense in the first place, or should I just go with something like the APA suggests and have a (1981/2002) label in citations and my bibliography?) EDIT: I was told to include a minimum working example, so here it comes (hopefully sufficient):               \documentclass[]{scrartcl}          \usepackage{csquotes}          \usepackage[backend=biber,         style=authoryear-icomp,         bibstyle=authoryear-comp,          ]{biblatex}          \addbibresource{bibliography.bib}          \defbibenvironment{bibliography}       {\list          {}          {\setlength{\leftmargin}{\bibhang}%           \setlength{\itemindent}{-\leftmargin}%           \setlength{\itemsep}{\bibitemsep}%           \setlength{\parsep}{\bibparsep}}}       {\endlist}       {\item}          \DeclareNameFormat{author}{%     \ifthenelse{\value{listcount}=1}     {\textsc{#1}%     \ifblank{#3}{}{\addcomma\space \textsc{#3}}}     {\ifblank{#3}{}{\textsc{#3}\space}%     \textsc{#1}}%     \ifthenelse{\value{listcount}<\value{liststop}}     {\addcomma\space}     {}}          \AtEveryBibitem{%     \iffieldundef{origyear}{%       \printnames{author} (\printdate)\addcolon\addspace       }{%         \setunit*{\addspace}%         \printtext[]{\printnames{author} (\printorigdate)\addcolon\addspace}%       }%     \clearname{author}%     \clearfield{year}}          \DeclareLabelyear{\field{origyear}\field{year}}          \begin{document}           Some text \cite{Frege.2002a}, some text \cite{Frege.2002b}.          \printbibliography     \end{document}      This is everything (as far as I see) that may have to do with my problem. Of course, here is my `.bib` entry:               ï»¿@incollection{Frege.2002c,      author = {Frege, Gottlob},      title = {{\"U}ber Sinn und Bedeutung},      pages = {23--46},      bookpaginationtype = {page},      volume = {4},      publisher = {Vandenhoeck {\&} Ruprecht},      isbn = {978-3-525-30603-1},      series = {Sammlung Philosophie},      editor = {Textor, Mark},      booktitle = {Funktion - Begriff - Bedeutung},      year = {2002},      origdate = {1892},      location = {G{\"o}ttingen},      number = {4}     }               @incollection{Frege.2002b,      author = {Frege, Gottlob},      title = {Funktion und Begriff},      pages = {2--22},      bookpaginationtype = {page},      volume = {4},      publisher = {Vandenhoeck {\&} Ruprecht},      isbn = {978-3-525-30603-1},      series = {Sammlung Philosophie},      editor = {Textor, Mark},      booktitle = {Funktion - Begriff - Bedeutung},      year = {2002},      origdate = {1891},      location = {G{\"o}ttingen},      number = {4}     }       Additionally you can see from this that this problem concerns an `@incollection`entry, but I would like to fix it generally.


title: How to get new TOC format?

text: This is what I want :                                   CONTAINT           CONTAINT .............................................................. i          TABLE ...................................................................... ii          FIGURE .................................................................... iii          APPENDIX ................................................................ iv          CHAPTER I   PENDAHULUAN .................................... 1                         1.1 Latar Belakang ................. 2                   1.2 Kontribusi ..................... 3     CHAPTER II  KAJIAN TEORI ...................................... 4                        2.1 Landasan Teori ................. 4                   2.2 Studi Pendahuluan .............. 5      I use the `report` class. Could anyone help me please? I'm very beginner in LaTeX and I have to write a large document with LaTeX for my bachelor graduation. my code doesn't work well :               \renewcommand{\cftchapfont}{\large\MakeUppercase}      \makeatletter      \renewcommand*\l@chapter[2]{%          \ifnum \c@tocdepth >\m@ne              \addpenalty{-\@highpenalty}%              \vskip 1.0em              \@plus\p@              \setlength\@tempdima{4.5em}%              \begingroup                  \parindent \z@                  \rightskip \@pnumwidth                  \parfillskip -\@pnumwidth                  \leavevmode \normalfont % mengganti bfseries menjadi normal font                 \advance\leftskip\@tempdima                  \hskip -\leftskip                  #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par                  \penalty\@highpenalty              \endgroup         \fi     }     \makeatother


title: Replace character defined by ASCII code (by something else)

text: I am trying to replace, in a given string, some characters. The characters to be replaced is given by its ASCII code. So for example, in `abc`, I want to replace character `97` (which is `a`, but I don't know this yet) by something else, let's say a dot (`.`). Now, `a`, `\char97` and `\char\thenumber` all look the same to me when printing them in a document, but replacing this respective argument in a string `a` only works with the first. Why is that, and how can I solve it? This is my MWE (unchanged from the original question):               \documentclass{book}     \usepackage{xstring}     \newcounter{number}     \setcounter{number}{97}     \newcommand{\replace}[1]{\StrSubstitute{#1}{a}{.}}     \begin{document}     a          \char97          \char\thenumber          \replace{a}          \expandafter\replace{\char97}          \expandafter\expandafter\expandafter\replace{\char\thenumber}          \end{document}


title: moderncv user variable in section

text: How can I use a variable (e.g. a first name) in `\cvitem`?               \firstname{Firstname}       \begin{document}              \makecvtitle % Print the CV title       \section{Personal Data}       \cvitem{}{\firstname}


title: How to slash number at the picture below?

text: How to slash numbers how it done at the picture? ![enter image description here](http://i.stack.imgur.com/kP6P7.png) It's the part of equation:                \usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools}      ...      \[           \begin{Bmatrix}                (000)\\                (100)           \end{Bmatrix}      \]      I suppose that need to use TikZ, but don't sure that it is a good way for solve this problem.


title: Can't display article titles in the bibliography using utphys.bst

text: I'm using utphys.bst bibtex style which does not display titles for article entries..! See the following picture, where an article, an electronic source and a book have been cited in the text: ![enter image description here](http://i.stack.imgur.com/ae7Hx.png) I'd like to add article titles, within quotes and, possibly, with _italic_ font, as per the other entries. I think that utphys.bst style doesn't allow to do this so I have to "customize" it adding this desired feature. Does someone know where can I operate in the code to do this? Or, do you know any other bibtex styles which maintain the hyperlinks and add the article titles? Thank you all in advance!


title: Fix line spacing with the hieroglf package

text: I'm using the hieroglf package to display hieroglyphic characters. I need to display some of these characters in the same lines as regular text. The problem is that the hieroglf fonts seem to need more space, so extra space gets inserted between the line with hieroglyphics and the one above it. Example: ![Line spacing problem](http://i.stack.imgur.com/8YRtY.jpg)               This is a normal line \\     This is a normal line. \\     This is a normal line.\\     This line \pmglyph{\HAi} has extra space above it. \\     So does this one. \pmglyph{\HSxxxix}\\     This one is fine.      How can I:   1. Force the line spacing to be "normal", even if this causes the lines to overlap?   2. Resize the hieroglyphs to "minimally" fit within the normal line spacing instead?


title: pdflatex error \write18 and pdflatex.fmt not found

text: I have a TexLive 2014, but it doesn't work as I expected! It's seem to be an issu ever seen but I don't understand what can I do!               This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)      restricted \write18 enabled.          kpathsea: Running mktexfmt pdflatex.fmt     tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found (ls-R missing?).     fmtutil: config file `fmtutil.cnf' not found.     I can't find the format file `pdflatex.fmt'!      I'm on fedora 20


I'm drawing a diagram for a physical phenomenon, "motion in one dimension". I have this `figure` with a `tikzpicture`:               \documentclass{article}     \usepackage{tikz}          \definecolor{particle}{rgb}{1.0,0.7,0.3}          \begin{document}          \begin{figure}[h]        \centering        \begin{tikzpicture}           \draw[help lines] (0,0) grid (8,2);           \draw[thick] (0,0) -- (8,0);           \node [right] at (8.25,0) {x (m)};           \node [below] at (0,0) {-40};           \node [below] at (1,0) {-30};           \node [below] at (2,0) {-20};           \node [below] at (3,0) {-10};           \node [below] at (4,0) {0};           \node [below] at (5,0) {10};           \node [below] at (6,0) {20};           \node [below] at (7,0) {30};           \node [below] at (8,0) {40};           \draw [draw=black, fill=particle, opacity=0.5]              (1,0) rectangle (2,1);           \draw [draw=black, fill=particle]              (6,0) rectangle (7,1);        \end{tikzpicture}        \caption{Motion in one dimension} \label{fig:tbh1}     \end{figure}          \end{document}      Compiling with pdflatex, I get this error:               ! Package pgfkeys Error: The key '/tikz/opacity' requires a value. I am going to ignore this key.      ... on this line:               l.73 ...w [draw=black, fill=particle, opacity=0.5]      Didn't I specify a value for the opacity already? Why am I getting this error? EDIT: Edited the code to be compilable.


title: TexStudio ignores some accent keyboard input

text: I am using TexStudio as an editor and everything works great so far. But since I entered the "typing" phase of my document production, I realized that it has some problem with some french accents input. When I am typing , if I type the "^" sign and then the "e", it will, most of the time, only enter "e" and not "ê". If I "insist", meaning that if I delete it and enter it a second time, it will mostly work and type "ê". The input language is set to french and I don't have any problem rendering the letters with XeLaTeX. I tried with 2 different keyboards and on different softwares and it is not a hardware issue. My question is then: Is there a way to make TexStudio recognize and input the accented letters on the first attempt?               \documentclass[11pt,twoside,titlepage]{article}     \usepackage[francais]{babel}     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \usepackage{lipsum}     \begin{document}     \lipsum     \end{document}      I compile using XeLaTeX, so entering "ê" or any special character is no problem at all (and much faster when you are writing a non-english text...) In fact, my issue is precisely to be able to keep using french letters without having to use the basic latex encoding. Is there any encoding specification missing in the preamble? Since the building of the output worked flawlessly, I thought it would be irrelevant to my keyboard input problem. EDIT: Just to make clear, the problem is NOT related to the absence of the accents in the built PDF file. The problem is related to the action of typing on the keyboard and having texstudio not entering the accented letters, as if it would be "protecting" the code against wrong characters.


title: How can I define a mathematical function as a LaTeX macro?

text: I am attempting to create a usable function within LaTeX such that its inputs are transformed mathematically. However, I cannot find any documentation that can perform such mathematical function definition. Here is an example of what I am seeking: Having defined a function entitled `\myMathFunction` which accepts only one parameter, the follow usage:               \myMathFunction{2}      should output 6 if the function is defined as follows: `({#1} * 5) - {#1}^2` Where `{#1}` is the parameter, and in the case of my example, is equal to `2`. Additionally, the function should be usable within a PSTricks plot. E.g.               \psplot[         algebraic,         linecolor   = red,         linewidth   = 1pt     ]{0}{TwoPi}     {\myMathFunction{x}}


title: Tikz how to extract spherical coordinates

text: I have `X` coordinate defined in Spherical coordinate system (the point is to be situated on the circle so it's easier):               \def\Sx{0} \def\Sy{0} \def\Sz{2}     \pgfmathsetmacro\Sρ{"sqrt((\Sx)^(2)+(\Sy)^(2)+(\Sz)^(2))"}     \pgfmathsetmacro\Sθ{ifthenelse(\Sx==0&&\Sy==0&&\Sz==0,0,"acos(\Sz/(sqrt((\Sx)^(2)+(\Sy)^(2)+(\Sz)^(2))))")}     \pgfmathsetmacro\SΦ{ifthenelse(\Sx==0&&\Sy==0,0,ifthenelse(\Sy<0,"-acos(\Sx/(sqrt((\Sx)^(2)+(\Sy)^(2))))","acos(\Sx/(sqrt((\Sx)^(2)+(\Sy)^(2))))"))}     \tdplotsetcoord{S}{\Sρ}{\Sθ}{\SΦ}     \coordinate (X) at ($(S)+(xyz spherical cs:radius=2,longitude=-40,latitude=0)$);      However `X` coordinate defined this way cannot be extracted into `x,y,z` components:               % calc library         \newdimen\Xx \pgfextractx{\Xx}{\pgfpointanchor{X}{center}} % this doesn't work for me      How can be coordinate defined in Spherical coord. system and then extracted into `x,y,z` or `ρ,θ,Φ`? Thanks.


title: Altering index sort order in bibleref

text: Original post: The **bibleref** package affords tidy citation and indexing of Bible passages; sort order is by default alphabetical by book. According to the documentation, one can change the to another desired sequence by issuing suitable **\biblerefmap** commands for each book. However, having tried various scenarious, this appears to work for the default citation style, but not when an alternate built-in style is invoked, whether by package option or by issuing **\biblerefstyle**. Also, an attempt to get around the problem using **\setbooktitle** and **\setindexbooktitle** causes the desired sort order to be ignored as well. Here's my minimal example:               % !TEX TS-program = xelatexmk     \documentclass{memoir}     \usepackage{bibleref}     % Replacing the previous line with the following causes the sort to revert to alphabetical     %\usepackage[jerusalem]{bibleref}     % Adding the next line after the \usepackage does the same.     %\biblerefstyle{jerusalem}     \biblerefmap{Genesis}{01}     \biblerefmap{Exodus}{02}     \biblerefmap{Leviticus}{03}     \biblerefmap{Numbers}{04}     \biblerefmap{Deuteronomy}{05}     \biblerefmap{Joshua}{06}     \biblerefmap{Judges}{07}     \biblerefmap{1Samuel}{08}     \biblerefmap{2Samuel}{09}     \biblerefmap{1Kings}{10}     \biblerefmap{2Kings}{11}     \biblerefmap{Isaiah}{12}     \biblerefmap{Jeremiah}{13}     \biblerefmap{Ezekiel}{14}     \biblerefmap{Hosea}{15}     \biblerefmap{Joel}{16}     \biblerefmap{Amos}{17}     \biblerefmap{Obadiah}{18}     \biblerefmap{Jonah}{19}     \biblerefmap{Micah}{20}     \biblerefmap{Nahum}{21}     \biblerefmap{Habbakuk}{22}     \biblerefmap{Zephaniah}{23}     \biblerefmap{Haggai}{24}     \biblerefmap{Zecharaiah}{25}     \biblerefmap{Malachi}{26}     \biblerefmap{Psalms}{27}     \biblerefmap{Job}{28}     \biblerefmap{Proverbs}{29}     \biblerefmap{Ruth}{30}     \biblerefmap{Song of Songs}{31}     \biblerefmap{Ecclesiastes}{32}     \biblerefmap{Lamentations}{33}     \biblerefmap{Esther}{34}     \biblerefmap{Daniel}{35}     \biblerefmap{Ezra}{36}     \biblerefmap{Nehemiah}{37}     \biblerefmap{1Chronicles}{38}     \biblerefmap{2Chronicles}{39}     % Need the Bible citations in a separate index     \renewcommand{\biblerefindex}{\index[biblecites]}     \makeindex[biblecites]          \begin{document}     Dummy text citing \ibibleverse{Genesis}(1:1) and \ibibleverse{Exodus}(10:11-20).     \printindex[biblecites]     \end{document}      BTW, XeLaTeX is used here because in my actual project, I use Hebrew text. However, regular LaTeX doesn't seem to offer any improvement. Neither does using regular **\makeindex** and **\printindex**. Can anyone advise on a solution? Update (13 August): I'd seen a change proposed to **bibleref** here but it didn't at first seem relevant. Nevertheless, I decided to try it... and it seemed to solve my problem. Further testing suggested this worked for the various predefined styles. BUT--when I recompiled my actual project, the order remained unchanged! I brought it back down to the minimal example, step by step, and it still didn't work. I finally discovered that in the MWE, I had used               \ibibleverse{Genesis}(1:1)      whereas in my actual project, I had               \ibibleverse{Gn}(1:1)      etc. In other words, the patch alluded to above seems to work, so long as actual citations use the full rather than abbreviated forms of books. Consequently, I view this as an interim solution only. Update (10 September): As it happens, the original author of **bibleref** is no longer supporting this package; maintenance has passed to the authors of **biblref-mouth** and **bibleref-parse** , who are aiming to merge the three packages (http://www.dickimaw-books.com/notlisted.html). However, I understand from communicating briefly with them that progress at the moment is quite slow; therefore users should be prepared to use **bibleref** as is for the time being.


title: biblatex: How to set maxbibname to different values in different refsections?

text: I have a document with several `refsections`. In one of them I'd like to set `maxbibnames=99` (or rather: keep the value global set in the preamble), but in another I'd like to set `maxbibnames=3`. Is that possible? (A workaround in which I manually edit the 5 to 10 bibentries with too many authors in the .bib-file would be ok, but changing the actual names in these entries is what I'd like to avoid.)


title: How to edit bibtex entry for a bimonthly IEEE journal?

text: IEEE bibtex style uses the following entry for a typical journal paper:               @article{foobar,       author  = "A. Boo, C. Foo",       title   = "Paper Title of His",       journal = IEEE_J_IA,       volume  = "40",       month   = jan,       year    = "2012",       pages   = "1-11"     }      The journal "IEEE Transaction of Industry Applications" is bimonthly, so IEEE usually says "January-February 2012" (example). How do I edit the month field? The following issues error               Warning--string name "jan/feb" is undefined      at compile time due to               month = jan/feb


title: Beamer highlight only a part in an itemize frame

text: How could I highlight only certain points in itemize environment. The examples I found here shows other parts also highlighted in the next slide. What I want is a single slide with one part highlighted and other blurred in the itemize environment.


title: TeXworks and Command Line Compilation ok, But TeXShop yields different result

text: ## Background: As per my earlier question, Can't get real currfile if used in precompiled .fmt file, I am trying to speed up compilation by generating a `.fmt` file. The example below tests that the value of the token `\MyToken` is set to the portion of the file name between the two dashes. I am **not** getting the desired behavior when I use `TeXShop` **and** the precompiled `.fmt` file. But, things work as expected if I use `TeXworks`, or command line compilation. I suspect something is not quite right with the `MyLaTeX.engine` script invoked by `TeXShop`, but don't know for sure. After saving `MyPreamble.tex` defined below, I first compile the preamble via the command line:                   pdflatex -ini -jobname=MyPreamble "&pdflatex MyPreamble.tex\dump"      Then I try to use this preamble in four different ways to process `foo-x- bar.tex`: * * *   1. Command Line compilation ( _works_ ):              pdflatex  --file-line-error --shell-escape -fmt=MyPreamble -recorder --synctex=1 \               foo-x-bar.tex      yields the correct result (no red error message): ![enter image description here](http://i.stack.imgur.com/EuY3W.png) Furthermore, the following (change how the file name is specified, see the "Update" section below) also works:              pdflatex  --file-line-error --shell-escape -fmt=MyPreamble -recorder --synctex=1 \                ./foo-x-bar.tex        2. Using TeXworks ( _works_ ): With `MyLaTeX` configured as ![enter image description here](http://i.stack.imgur.com/7JKeD.png) I get identical results as command line compilation (again, no red error message).   3. Using `TeXShop` ( **does not** work): With TeXShop things are _not_ quite the same. I have the following file saved as `MyLaTeX.engine`:              #!/bin/sh     bfname=$(dirname "$1")/"`basename "$1" .tex`"     pdflatex --file-line-error --shell-escape -fmt=MyPreamble -recorder --synctex=1 "$bfname"      and invoking `MyLaTeX` from `TeXShop`, I get the dreaded red error message: ![enter image description here](http://i.stack.imgur.com/FUImO.png)   4. Compiling the `foo-x-barComplete.tex`, which is simply:              \input{MyPreamble.tex}     \input{foo-x-bar.tex}      directly via `LaTeX` on `TeXShop`, and `pfdlatex` on `TeXworks`, things also work fine (no red error message). * * * So, the problem _only_ occurs on `TeXShop` **with** the precompiled `.fmt` file. * * * ## Update:   * After posting the question, I do see one difference in the `TeXShop` run in that the file name is prefixed with `./`. And I am extracting the text between the first and second dash with:              \StrBefore{\themainfile}{.}[\CurrentFileName]%     \StrBetween[1,2]{\CurrentFileName}{-}{-}[\ExtractedValue]      This seemed to be the problem (since there are now two dots in the file name). So, I attempted the obvious fix which is to extract the file name _before_ `.tex`:              \StrBefore{\themainfile}{.tex}[\CurrentFileName]%      Now I get identical results with both `TeXShop` and `TeXworks`, **but** now both show the dreaded error messages!!! Ok, so the fix lies in this code, or the `.engine` file. However it should be noted that the command line invocation with a leading `./` before the file name does not have a problem. ## Temporary Solution: Found a temporary solution:                   \StrBetween[1,2]{\themainfile}{-}{-}[\ExtractedValue]%      but I would prefer to find a method that extracts this from the file name with the extension removed, which is what the above code attempts to do. * * * ## Code: `MyPreamble.tex`:               % Based on egreg's answer at http://tex.stackexchange.com/questions/80453/cant-get-real-currfile-if-used-in-precompiled-fmt-file     \documentclass{article}     \usepackage{xcolor}     \usepackage{xstring}     \usepackage{lipsum}     \usepackage[realmainfile]{currfile}%           \newcommand*{\Debug}[1]{\par\noindent\textcolor{blue}{#1}\par}%     \newcommand*{\Error}[1]{\par\noindent\textcolor{red}{#1}\par}%          \newtoks{\MyToken}     \MyToken={oo}% set default value     \AtBeginDocument{%         \getmainfile         \Debug{Debug: themainfile = "\themainfile"}%         \StrBefore{\themainfile}{.}[\CurrentFileName]%          \Debug{Debug: CurrentFileName = "\CurrentFileName"}%         \StrBetween[1,2]{\CurrentFileName}{-}{-}[\ExtractedValue]%         \Debug{Debug: ExtractedValue = "\ExtractedValue"}%         %         %\StrBetween[1,2]{\jobname}{-}{-}[\ExtractedValue]% this works         \IfStrEq*{\ExtractedValue}{\the\MyToken}{}{%             \Error{Error: MyToken (middle) was "\the\MyToken",                     but was expected to be "\ExtractedValue".}%         }%     }     %% ----- preamble ends here      * * * ## Code: `foo-x-bar.tex`:               % This file need to be named in three parts separated by two dashes.     % This need to be set to be the value in between the two dashes. So,     % if this file is named "foo-x-bar.tex", then this needs to be "x"     \MyToken={x}%          \begin{document}         \lipsum[1]     \end{document}      ## Code:


title: LaTeX to HTML - Square roots

text:
I used SimpleTeX4ht to convert a LaTeX file to HTML. The file is fine except that square roots are rendering badly in juxtaposition with the rest of the text, e.g. like: ![like this](http://mathisbeauty.org/error.png) Any suggestions on how to get the square roots to render better? (Whether by using a different converter, using different LaTeX, etc.) My LaTeX code is               \noindent \textbf{Example:} Failure of unique prime factorization in $\mathbb{Z}[\sqrt{-5}\hspace{0.1 cm}]$:\\      $6 = (1 + \sqrt{-5})\cdot (1 + \sqrt{-5}) = 2 \cdot 3$.\\      and the corresponding HTML is something like
Example: Failure of unique prime factorization in ℤ[ ]:
6 = (1 + ) ⋅ (1 + ) = 2 ⋅ 3.


title: tikz, intersection of four circles WITHOUT any fill, but text

text: Hej, I´ve got a problem with the following diagram. I want the intersection of all four circles to be white, not filled but transparent as there has to be a text in the intersection. I am appreciating any ideas... Another question is, how to insert more "textboxes" filled with a white background, but leaving the intersections where they will be placed untouched. Thank you very much! :)               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{shapes,backgrounds}     \usepackage{verbatim}     \begin{document}          \def\firstcircle{(0,0) circle (3 cm)}     \def\secondcircle{(45:2cm) circle (3 cm)}     \def\thirdcircle{(0:3cm) circle (3 cm)}     \def\fourthcircle{(-45:2cm) circle (3 cm)}          \begin{tikzpicture}     \draw \firstcircle node[below] {$$};     \draw \secondcircle node [above] {$$};     \draw \thirdcircle node [below] {$$};     \draw \fourthcircle node [below] {$$};          \node[draw,text width=2.5cm] at (1.5,0) {some text spanning three lines with automatic line breaks};          \begin{scope}[shift={(0cm,0cm)}, fill opacity=0.4]        \fill[red] \firstcircle;         \fill[black!30!green] \secondcircle;         \fill[black!30!blue] \thirdcircle;         \fill[black!30!violet] \fourthcircle;        \draw \firstcircle node[below] {$$};         \draw \secondcircle node [above] {$$};         \draw \thirdcircle node [below] {$$};         \draw\fourthcircle node[below]{$$};           \draw \firstcircle node [anchor=south] at (current bounding box.north {Crassostrea gigas};      \draw \secondcircle node [anchor=north] at (current bounding box.south) {Mytilus edulis};      \draw \thirdcircle node [anchor=west] at (current bounding box.east) {Helix pomatia};      \draw \fourthcircle node[anchor=east] at (current bounding box.west) {Loligo forbesi};           \end{scope}           %    \begin{scope}      %      \clip \firstcircle;      %      \clip \secondcircle;      %      \clip \thirdcircle;      %      \fill[white]\fourthcircle;      %    \end{scope}           \end{tikzpicture}      \end{document}`      ![Result, but intersection is still filled :\( ](http://i.stack.imgur.com/lx4ue.png)


title: mktextfm ptmr8t errors

text: Switching environments (to a machine with Cygwin), I got errors like this from pdflatex:               kpathsea: Running mktextfm ptmr8t     /usr/share/texmf-dist/web2c/mktexnam: Could not map source abbreviation  for ptmr8t.     /usr/share/texmf-dist/web2c/mktexnam: Need to update ?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t     This is METAFONT, Version 2.718281 (TeX Live 2013/Cygwin)               kpathsea: Running mktexmf ptmr8t     ! I can't find file `ptmr8t'.     <*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t          Please type another input file name     ! Emergency stop.     <*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t          Transcript written on mfput.log.     grep: ptmr8t.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t' failed to make ptmr8t.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font T1/ptm/m/n/12=ptmr8t at 12.0pt not loadable: Metric (TFM) file not found     .     <to be read again>      What's the problem?


title: Adobe Garamond and LaTeX (Linux)

text: I'm currently writing a math-heavy Ph.D. thesis (more about this in a minute) and, as I truly love **Adobe Garamond** , I would like to use it. However, given its cost, I would like to **make sure that I make the right choice of format, and that I will be able to use it without problem** in my documents. Note that focusing on this particular font makes sense to me, as it is one of the most discussed font around. Many people ask questions about using fonts in LaTeX, and I've spend many hours (really) **searching for a bulletproof and up-to-date method** to use them. For the record, note that I am working under Debian and I'm not at all used to handling fonts. **Constraint.** You see, there is a constraint: as _I'm using arxiv.org_ , I'm somehow stuck with LaTeX (pdfLaTeX). Many "easy solutions" I have found involve switching to XeLaTeX, LuaLaTeX or ConTeXt. However, _I simply cannot switch permanently for LuaLaTeX or XeLaTeX_ (but I can however use them, if it's not too involved, for CV and letters), ConTeXt being even less suitable. **Uses.** Now, I'm thinking of two different uses for the font:   * in CV, letters and such;   * in my Ph.D. thesis, which I would like to upload on arxiv.org once finished. **Format.** Given the circumstances, should I go for:   * OpenType or   * Type1? OpenType is totally fine for XeLateX, from what I understand, thanks to fontspec. On the other hand, Type1 is what LaTeX natively uses (but I do not know how to handle it). Also, are Type1 fonts extracted somehow from OpenType as good as native Type1 fonts or is there a quality loss? **Installation & use.** Depending on the answer(s) to the previous question:   * how to install the font (either as it is or via a conversion) and   * how to use it in LaTeX in a minimal example? Most threads in SX typically only focus on very specific parts of the process, and it's extremely confusing. Usually, I would just go for trials and errors but as I have to purchase first, it doesn't seem to be the best option. **What about maths?** How should one deal with mathematical expressions? Possibly: which alternative fonts should one use? **Humble request.** I could not find an _A-to-Z method to install fonts and use them in LaTeX for a Linux distribution_ , but I've seen many topics in SX where people display a great knowledge of those things. I truly believe that, if one such person would accept to make a _comprehensive and detailed walkthrough_ , _it might be one of the most useful post around_. I'd be more than happy to offer as much of my current reputation as I can to such a person. But tell me what you think about that. **I thank you very much for your time.** * * * Edit: I am well aware that arxiv.org does not accept proprietary fonts, but not putting my thesis there is not an option. I'll just revert back to the default font when I upload it there. Edit: Apparently OpenType should be the way to go, even though they are harder to use in pdflatex.


title: Spellchecking in TexStudio

text: I just switched from TexMaker to TexStudio - one of the main reasons is the improved spellchecker that lets you add words your ignore list directly (instead of manually modifying the .dic file, as you had to do with TexMaker). All in all I am quite happy, but something is still bugging me. _TexStudio spellchecker does not ignore special characters._ So if I write...               The boy walked past the `house'.                              ^^^^^^^      TexStudio will actually check for `house'.` and will not recognize it. Meaning I'll have to add every such combination to the ignore list manually. Is there any way to **not** spellcheck special character-containing words? And possibly ignore all LaTeX variables and command parameters too? Getting tired of the spellchecker also checking `htp!`, which is the placement parameter on image import commands... :/ * * * P.S.   I am aware that some people prefer to write               The boy walked past the `house.'      but that is not really the discussion I'd like to get into here...


title: Why do you need both list-pair-separator and list-final-separator in siunitx?

text: I wanted to translate the automatically written words in the `siunitx` package to Danish (at least the parts I use) and found the answer to Problem with \SIlist with two values and list-final-separator = {, }. I used the following code to do it:               \documentclass{memoir}     \usepackage[danish]{babel}       \usepackage[range-phrase={ til },             list-final-separator={ og },             list-pair-separator={ og },             detect-all,             separate-uncertainty=true,             group-digits=false]{siunitx}               \begin{document}          \SIlist{8;9;10}{\keV}          \SIlist{8;10}{\keV}          \end{document}      and got the output: ![SIlist](http://i.stack.imgur.com/gwIWg.jpg) My question is (probably for Joseph Wright): Why do I need to state both `pair` and `final` (list separator)? Is it just me who wants the same separator in both cases? I thought (from the name of the option) that `final` was all I needed and that `pair` could be used if I wanted them to differ. Wouldn't that be a better option? (I'm just asking, not criticising.)


title: Using achemso class - need not-default italicized "et al" in references for ACS Nano submission

text: I'm using the `achemso` **class** to submit a paper to ACS nano and I need "et al" in my references to be italicized. I'm using bibtex. I've tried going into my Miktex bst folder and changing the achemso.bst file such that all instances of "et~al" are replaced by `\emph{et~al}` but that didn't fix it. Since the class automatically sets the `\bibliography` style, I'm not actually sure which file is being used to format the bibliography so maybe I'm changing the wrong one. Any help would be greatly appreciated!               \documentclass[journal = ancac3,manuscript = article]{achemso}


title: Drawing bipartite graph

text: I want to draw graphs with white and black vertices, such as square-octagon graph. Someone knows the easy way to draw in Latex? Thanks a lot!


title: My DVIWindo's text outline doesn't work right with \begin...\end{align*}

text: I'm probably out of date, but I use DVIWindo (32) (version 2.2.4) to preview the DVI files I make. It draws a blue box around the rectangular area used for text; it's turned on and off with the "Draw Text Outline" checkbox under "Preferences". Usually this blue box is exactly the dimensions of the text block, so if a word breaks the margin, it's obvious. However, if a display created with `\begin...\end{align}` breaks the margin, the blue box is drawn so that the display just fits within it, which means that on a page with no margin breaks, the blue box looks way too big. This doesn't seem to occur with other equation environments, like `equation` and `gather`. Does this mean anything, or is it just annoying? It seems that no matter how big the blue box gets in this situation, the text block falls on the exact same place on the page when I make a PDF, which is what everything I make ultimately ends up as. The DVIWindo help says, "This text outline is not always meaningful since it is based on incomplete information obtained from the DVI file."


title: Error when using REVTeX 4.1

text: I've tried to upgrade to REVTeX 4.1 but am getting compile error even with the simplest document:               \documentclass{revtex4-1}     \filelist     \begin{document}     test     \end{document}      produces:               ...snip...     ! LaTeX Error: Command \url already defined.                    Or name \end... illegal, see p.192 of the manual.     ...snip...      Did I install improperly, or is this a bug? EDIT (Requested file list):                *File List*     revtex4-1.cls    2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)       aps4-1.rtx     aps10pt4-1.rtx     textcase.sty    2004/10/07 v0.07 Text only upper/lower case changing (DPC)          url.sty    1999/03/02  ver 1.4  Verb mode for urls, email addresses, and file names       natbib.sty    2007/02/05 8.0 (PWD)     revsymb4-1.sty    2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)      ***********


title: Defining a new key combination in emacs to run Latex

text: I want to define a new key combination in my .emacs such that it will directly run the latex command, unlike C-c C-c Ret which gives me different options every time (like view). I am using xdvik for post processing and I don't need to run the view command each time I compile. Focusing on xdvik rereads the file, so there is no point. Another problem: is there a way to remove the icon labels, which have been introduced in emacs 24? It is the main reason I am asking the previous question, since I have to go into some sub-menus to click the latex commands because the labels take unnecessary space on the window. Thanks in advance


title: how to draw squares, circles and triangles

text: I'd like to explain the markers of a figure in the caption by drawing small marker symbols. I have seen in a previous question that you can do this with the `tikz` package. I am using               \usepackage{tikz}          \newcommand{\square}[1]{\tikz{\filldraw[draw=#1,fill=#1] (0,0) rectangle (0.2cm,0.2cm);}}      and then `\square{red}` in the text when I want to draw a red square. Could anyone show me how can I do the same for circles and triangles? Thank you


title: TexMaker (Ubuntu 12.04) Cannot open a style file

text: I am trying to compile a document in TexMaker with the following document class               \documentclass[aps,prl,showpacs,twocolumn]{revtex4-1}      I am using bibtex to display my bibliography. I have created a file 'ferroelectrics.bib' and use the following command at the end of my document               \bibliography{ferroelectrics}      When I try to compile this document using latex -> bibtex, the process exits with errors and the following error is reported in the .blg file that is generated:               I couldn't open style file apsrev4-1.bst      What's weird about this error is that when I compile using only the command line, I get no such error and the document compiles just fine. I have been doing various google searches all day trying to figure this out, but to no avail. What can I do to enable TexMaker to open apsrev4-1.bst? Thanks!


title: How do I make a beamer presentation with customized title page and footage

text: I'm going to make slides with a lot of math for my company, but I'm only given template for power point and keynote. I saved the title page from power point template and tried to set it as the background of the title page in my beamer presentation. But I have not been successful. Can some one here help me with this? Thanks a lot! Here is a title page from power point. I want to use it as the background of the title page in my beamer presentation: ![title page](http://i.stack.imgur.com/39urX.png) Here is a regular page from power point. I want to use it as the background of all the subsequent slides in my beamer presentation. ![regular page](http://i.stack.imgur.com/hXogb.png) Your help is highly appreciated! by the way, I tried \titlegraphic, it couldn't put the image in the right position. Here is the theme I used (two theme files below). beamerthemeAtlanta.sty               \ProvidesPackageRCS $Header:     /cvsroot/latex-beamer/latex-beamer/themes/theme/beamerthemeAtlanta.sty,v 1.1     2007/07/05 10:00:00 tantau Exp $          % Copyright 2007 by Rajbabu Velmurugan <rajbabu@ece.gatech.edu>     %     % This program can be redistributed and/or modified under the terms     % of the GNU Public License, version 2.          % This beamer 'Atlanta' theme is a modified version of the Warsaw theme.     % The main differences from the Warsaw theme include     %     - Uses a color theme relevant to Georgia Tech, Atlanta (gold, yellow, white, navy blue)     %       (beamercolorthemeyellowjacket.sty)     %     - Places the logo in the top-left corner of the slide     %     - Provides an option to modify the bullets used in item to be balls or triangles     %     \mode<presentation>          \newif\ifbeamer@itemtriangle%     \beamer@itemtrianglefalse%     \DeclareOptionBeamer{itemtriangle}[false]{\csname beamer@itemtriangle#1\endcsname}%          \newif\ifbeamer@tocitemnumbered%     \beamer@tocitemnumberedtrue%     \DeclareOptionBeamer{tocitemnumbered}[true]{\csname beamer@tocitemnumbered#1\endcsname}%          \dimen0=\beamer@leftmargin%     \dimen1=\beamer@rightmargin%     % left text margin     \DeclareOptionBeamer{lessleftmargin}{%     \multiply \dimen0 #1     \divide \dimen0 100     \setbeamersize{text margin left=\dimen0}}%          \ProcessOptionsBeamer          % right text margin     \DeclareOptionBeamer{lessrightmargin}{%     \multiply \dimen1 #1     \divide \dimen1 100     \setbeamersize{text margin right=\dimen1}}%          \ProcessOptionsBeamer               %% Styles from Warsaw     \useinnertheme[shadow=true]{rounded}     \useoutertheme{shadow}     \usecolortheme{yellowjacket}          \setbeamerfont{block title}{size={}}          %%     %% Inner theme modifications in Atlanta     %% Use ball or triangle as bullet for 'items'     \ifbeamer@itemtriangle         \setbeamertemplate{items}[triangle]     \else         \setbeamertemplate{items}[ball]     \fi          %% Use numbered ball or unnumbered ball in TOC of outline     \ifbeamer@tocitemnumbered         \setbeamertemplate{sections/subsections in toc}[ball]     \else         \setbeamertemplate{sections/subsections in toc}[ball unnumbered]     \fi               %% Outer theme modifications in Atlanta     %% Right Sidebar - navigation symbol     \defbeamertemplate*{sidebar right}{atlanta}     {       \vfill%     %  \llap{\insertlogo\hskip0.1cm}%       \vskip2pt%       \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%       \vskip2pt%     }     %% From beamerouterthemesplit.sty, to add logo at the top left corner of the frame     % Head     \ifbeamer@compress          \setbeamertemplate{headline}     {%       \leavevmode%       %% Remove logo when we use 'compress' in beamer option     %    \begin{beamercolorbox}[wd=.15\paperwidth,ht=\@tempdimb]{section in head/foot}     %    \insertlogo     %    \end{beamercolorbox}%       \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%         \insertsectionnavigationhorizontal{.5\paperwidth}{\hskip0pt plus1filll}{}%       \end{beamercolorbox}%       \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%         \insertsubsectionnavigationhorizontal{.5\paperwidth}{}{\hskip0pt plus1filll}%       \end{beamercolorbox}%     }          \else          \setbeamertemplate{headline}     {%       \leavevmode%       \@tempdimb=2.4375ex%       \ifnum\beamer@subsectionmax<\beamer@sectionmax%         \multiply\@tempdimb by\beamer@sectionmax%       \else%         \multiply\@tempdimb by\beamer@subsectionmax%       \fi%       \ifdim\@tempdimb>0pt%         \advance\@tempdimb by 1.125ex%         \begin{beamercolorbox}[wd=.15\paperwidth,ht=\@tempdimb,center]{section in head/foot}         \vbox to\@tempdimb{\vfil\insertlogo\vfil}         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.35\paperwidth,ht=\@tempdimb]{section in head/foot}%           \vbox to\@tempdimb{\vfil\insertsectionnavigation{.35\paperwidth}\vfil}%         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%           \vbox to\@tempdimb{\vfil\insertsubsectionnavigation{.5\paperwidth}\vfil}%         \end{beamercolorbox}%       \fi%     }          \fi               % toc: sphere - reduced size compared to the default size in 'beamerbaseauxtemplates.sty'     \normalsize     \pgfdeclareradialshading[bg,parent.bg]{tocsphere}{\pgfpoint{-0.4ex}{0.6ex}}%     {%       color(0ex)=(bg!35!white);       color(0.3ex)=(bg!75!white);       color(0.6ex)=(bg!70!black!90!parent.bg);       color(0.8ex)=(bg!50!black!90!parent.bg);       color(1.0ex)=(parent.bg)}           \mode <all>      **And beamercolorthemeyellowjacket.sty**               \ProvidesPackageRCS $Header:     /cvsroot/latex-beamer/latex-beamer/themes/color/beamercolorthemeyellowjacket.sty,v     1.0 2007/07/05 10:00:00 tantau Exp $          % Copyright 2007 by Rajbabu Velmurugan <rajbabu@ece.gatech.edu>     %     % This program can be redistributed and/or modified under the terms     % of the GNU Public License, version 2.          % This beamer 'yellowjacket' color theme is used in 'Atlanta' theme. It is a modified version     % of the 'Whale' and 'Orchid' themes used by the 'Warsaw' theme.     %     % The main differences from the Warsaw theme include     %     - Uses a color theme relevant to Georgia Tech, Atlanta (gold, yellow, white, navy blue)     %       (beamercolorthemeyellowjacket.sty)     %     - Places the logo in the top-left corner of the slide     %     - Provides an option to modify the bullets used in item to be balls or triangles     %          \mode<presentation>          %% Authorized colors for Georgia Tech are gold (PMS 124), metallic gold (PMS 874), navy (PMS 539), and black.     %% RGB - #f0ad00 (PMS 124) 0.9, 0.67, 00     %% RGB - #cc9900 (PMS 874) 0.8, 0.6, 0     %% RGB - #00274d (PMS 539) 0.0, 0.15, 0.3     %% RGB - #050403 (black) 0.02, .015, 0.01     \definecolor{gtgold}{rgb}{0.9, 0.7, 0} % use structure theme to change     \definecolor{gtyellow}{rgb}{0.8, 0.6, 0}     \definecolor{gtnavy}{rgb}{0,0.2,0.3}          \setbeamercolor{structure}{fg=gtgold}          \setbeamercolor*{normal text}{fg=gtnavy, bg=white}%     \setbeamercolor*{alerted text}{fg=red}%     \setbeamercolor*{example text}{fg=green!50!white}%          %% From beamercolorthemewhale.sty (outer color)     % the 'palette primary' and 'palette quaternary' control the color shading in the     % 'frametitle' field of the frame.     \setbeamercolor*{palette primary}{use=structure,fg=gtnavy,bg=structure.fg}     \setbeamercolor*{palette secondary}{use=structure,fg=gtnavy,bg=structure.fg!75!black}%     \setbeamercolor*{palette tertiary}{use=structure,fg=gtnavy,bg=structure.fg!50!black}%     \setbeamercolor*{palette quaternary}{use=structure,fg=gtnavy, bg=white}%          \setbeamercolor*{sidebar}{use=structure,bg=structure.fg}     \setbeamercolor*{palette sidebar primary}{use=structure,fg=structure.fg!10}     \setbeamercolor*{palette sidebar secondary}{fg=gtnavy}%     \setbeamercolor*{palette sidebar tertiary}{use=structure,fg=structure.fg!50}%     \setbeamercolor*{palette sidebar quaternary}{fg=gtnavy}          \setbeamercolor*{titlelike}{parent=palette primary}          \setbeamercolor*{separation line}{}     \setbeamercolor*{fine separation line}{}          %% From beamercolorthemeorchid.sty (inner color)     \setbeamercolor{block title}{use=structure,fg=gtnavy,bg=structure.fg}%     \setbeamercolor{block title alerted}{use=alerted text,fg=gtnavy,bg=alerted text.fg!75!black}%     \setbeamercolor{block title example}{use=example text,fg=gtnavy,bg=example text.fg!75!black}%          \setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}%     \setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg!10!bg}%     \setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!10!bg}%          %\setbeamercolor*{titlelike}{parent=palette primary}%     %\setbeamercolor*{frametitle}{bg=gtgold!90!white}%     %\setbeamercolor*{frametitle right}{bg=gtgold!90!white}%      \mode **Update here** Thank you so much cfr for spending time on helping me! I tried your code, but once I have sections in the slides, the navigation bar on the top shows up and block the blue bar on the background. Please see my code below. Also Can I change the color of "yellow" theme to "blue"? Because the theme color is not compatible with the background picture. Can you let me where I should change in the beamercolorthemeyellowjacket.sty file? Thanks!               \documentclass[font=9pt]{beamer}     \usetheme{Atlanta}     \makeatletter       \defbeamertemplate*{frametitle}{mytitle}[1][left]       {         \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%         \@tempdima=\textwidth%         \advance\@tempdima by\beamer@leftmargin%         \advance\@tempdima by\beamer@rightmargin%         \begin{beamercolorbox}[sep=0.3cm,#1,wd=\the\@tempdima]{}           \usebeamerfont{frametitle}%           \vbox{}\vskip-1ex%           \if@tempswa\else\csname beamer@fte#1\endcsname\fi%           \strut\insertframetitle\strut\par%           {%             \ifx\insertframesubtitle\@empty%             \else%             {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%             \fi           }%           \vskip-1ex%           \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...         \end{beamercolorbox}%       }     \makeatother     \setbeamertemplate{footline}{}     \setbeamertemplate{frametitle}[mytitle]               \defbeamertemplate*{title page}{customized}[1][]     {       \usebeamerfont{title}\inserttitle\par       \usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par       \bigskip       \usebeamerfont{author}\insertauthor\par       \usebeamerfont{institute}\insertinstitute\par       \usebeamerfont{date}\insertdate\par       \usebeamercolor[fg]{titlegraphic}\inserttitlegraphic     }                         %\usepackage{Warsaw}     %\usepackage{beamercolorthemeyellowjacket}     \usefonttheme{serif}     \usepackage{amsmath,amssymb,amsthm,amsfonts}     \usepackage{algorithmic,algorithm}     \usepackage{graphicx,ifpdf}     \usepackage{mathrsfs}     \usepackage{natbib}     \usepackage{dsfont}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{times}     \usepackage{verbatim}     \usepackage{multirow}     \usepackage{multicol}     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage{booktabs}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{wasysym}     \usepackage{tabularx}     \usepackage{tabulary}          \def\Ze{\mathbb{Z}}     \def\Qe{\mathbb{Q}}     \def\Re{\mathbb{R}}     \def\Ne{\mathbb{N}}     \def\E{\mathbb{E}}     %\def\Pr{{\rm Pr}}     \def\newblock{}          \DeclareMathOperator*{\wg}{\wedge}     \newcommand{\set}[1]{\left\{ #1 \right\}}     \newtheorem{thm}{Theorem}     \newtheorem{lem}{Lemma}     \newtheorem{obs}{Observation}     \newtheorem{prop}{Proposition}     \newtheorem{cor}{Corollary}     \newtheorem{dfn}{Definition}     \newtheorem{asp}[theorem]{Assumption}     \newcommand{\rv}{\mathcal{T}}     \newcommand{\rr}{\mathbb{R}}     \newcommand{\zz}{\mathbb{Z}}     \newcommand{\nn}{\mathbb{N}}     \newcommand{\rw}{W}               \newcommand{\rc}[1]{\textcolor{Black}{#1}}     \newcommand{\bc}[1]{\textcolor{Black}{#1}}                    \title[Presentation ] % (optional, use only with long paper titles)     {Presentation Title}     \institute[my institute]{       }     \author[my name ] % (optional, use only with lots of authors)     {my name}          \date[]          \begin{document}     \setbeamertemplate{navigation symbols}{}     \setbeamertemplate{background}{\includegraphics[width=\paperwidth,height=\paperheight]{blue}}     \frame[plain]{\titlepage}          \setbeamertemplate{background}{\includegraphics[width=\paperwidth,height=\paperheight]{background}}          \begin{frame}\frametitle{Outline}     \begin{enumerate}     \item Introduction     \item A two-stage chance-constrained model     \item Case study     \item Solution approaches      \item Conclusions           \end{enumerate}     \end{frame}          \section{Introduction}     \begin{frame}\frametitle{}          \begin{center}     \bfseries{Thank you!}\\          \vspace{2cm}          \bfseries{Comments?}\\               \end{center}          \end{frame}          \section{A two-stage chance-constrained model}     \begin{frame}\frametitle{}          \begin{center}     \bfseries{Thank you!}\\          \vspace{2cm}          \bfseries{Comments?}\\               \end{center}          \end{frame}          \section{Case study}     \begin{frame}\frametitle{}          \begin{center}     \bfseries{Thank you!}\\          \vspace{2cm}          \bfseries{Comments?}\\               \end{center}          \end{frame}          \section{Solution approaches }     \begin{frame}\frametitle{}          \begin{center}     \bfseries{Thank you!}\\          \vspace{2cm}          \bfseries{Comments?}\\               \end{center}          \end{frame}                              \end{document}


title: Glossaries with numberlist also counts TOC, LOF, LOT

text: I am using glossaries to maintain a list of acronyms. I want it to display the page number where it appears. I usually use `\acs{}` or `\acl{}` in sectioning title or in caption. However I noticed that glossaries also displays the page of TOC, LOF or LOT if I use `\acs{}` or `\acl{}` inside `\section{}` or `\caption` (as this entries will appear in TOC, LOF, or LOT). How can I disable this behavior of glossaries and only consider what is really the text, there is, not consider what is written in TOC, LOF, or LOT?               \documentclass{report}          \usepackage[section,xindy,nomain,acronym,toc,shortcuts]{glossaries}          \newcommand{\acro}[2]{\newacronym{#1}{#1}{#2}}          \acro{MIMO}{Multiple Input Multiple Output}     \acro{SISO}{Single Input Single Output}          \makeglossaries          \newcommand{\acroname}{Acronym}          \begin{document}          \tableofcontents          \printglossary[type=\acronymtype,style=tree,title=\acroname,toctitle=\acroname]          \newpage          \section{\acs*{MIMO} and \acs*{SISO}}          bla          \end{document}      If I take the previous code and do:               pdflatex test     makeglossaries test     pdflatex test     makeglossaries test     pdflatex test      The output is in the attached file. Note that the second `makeglossaries` runs automatically because I also have `biber`. If the second `makeglossaries` does not run, everything is ok. ![Output file](http://i.stack.imgur.com/6Pl6S.png) Is there a way to prevent this and allow the run of second `\makeglossaries`?


title: Writing to and extracting from aux not working?

text: Consider the following MWE:               \documentclass{article}     \newlength{\templen}     \makeatletter     \AtEndDocument{%       \immediate\write\@auxout{\noexpand\setlength{\noexpand\templen}{150pt}}}     \makeatother     \begin{document}     \typeout{Document start}     \verb!1:! \the\templen \par     \setlength{\templen}{100pt}     \verb!2:! \the\templen     \end{document}      Compiling twice gives the output               1: 0.0pt     2: 100.0pt      even though the `.aux` contains               \relax      \setlength {\templen }{150pt}      According to the `.log`, the `.aux` is read before the document start as indicated by `\typeout`:                (./latex_stuff.aux)% <------------- This is where the .aux is read     \openout1 = `latex_stuff.aux'.     %...     Document start      % <------------- This is the document start      So, why doesn't the output resemble               1: 150.0pt     2: 100.0pt


title: Escape comment syntax in strings with listings

text: Consider the following:               \documentclass{standalone}     \usepackage{listings}     \lstset{       language=Python,       morecomment=[s]{<<}{>>},     }          \begin{document}     \begin{lstlisting}     def expand():         """<<expand documentation>>"""         for hook in noweb:             <<expand noweb hook>>     \end{lstlisting}     \end{document}      How can I get _both_ occurrences of the syntax to be styled as the latter? ![output](http://i.stack.imgur.com/kK7p6.png) * * * Edit for the wonderful Jubobs: (a _less_ minimal working example :)               \documentclass{standalone}     \usepackage{listings}     \lstset{       language=Python,       showstringspaces=true,       showspaces=false,       showtabs=false,       moredelim=*[s][\lst@stringstyle]{"""}{"""},       moredelim=[s][\lst@commentstyle]{<<}{>>},     }     \renewcommand*\lstlistlistingname{List of Listings}     \lstMakeShortInline[basicstyle=\small\ttfamily]"          \begin{document}     \begin{lstlisting}     def expand():         """foo <<expand documentation>>"""         for hook in noweb:             <<expand noweb hook>>          def marked_alone(node, neighbors):         """\forall n \in N(n), "marked"(n) = 0              There are no marked nodes in this node's neighborhood."""              return not any(map(lambda n: n['marked'], neighbors))     \end{lstlisting}     \end{document}      with output ![output 2](http://i.stack.imgur.com/IkzBu.png)


title: How to put the equation right at figure?

text: ![enter image description here](http://i.stack.imgur.com/I8aOH.png) I want to put the equation right at the figure and center they both. How I can realize it?


title: Efficient use of several lists of ... in a document

text: Friends, I'm stuck with a design issue. I'm writing a songbook with thousands of songs (using the `songs` package). So far so good. These days I decided to create indices for each song style/genre, e.g. rock, blues, pop and so forth. I came up with 22 styles/genres. By using the `tocloft` package, I managed to set all lists I wanted. But then: > `No room for a new write` The `tocloft` package clearly states: > If you try and create too many new listings LaTeX will respond with the > error message: > > `No room for a new write` > > If you get such a message the only recourse is to redesign your document. > The `tocloft` package does not provide a simple means of specifying new > Lists of Floats or float environments. For those, I recommend the `ccaption` > package. That was the first time I saw that error. Then I read the `ccaption` manual as well: > If you try and create too many new listings LaTeX will respond with the > error message: > > `No room for a new write` > > If you get such a message the only recourse is to redesign your document. So, I decided to dig a little. After reading about the `No room for a new write` issue (we have great answers/references on this subject here!), I see I need to change my strategy. Unfortunately, I have no idea of what to do at first. Is there a way of having so many lists in a document in an efficient way (at least, that LaTeX won't run out of registers)? I'm open to all suggestions. Other packages, hacks, new approaches. _(On a sidenote: I couldn't come up with a MWE in this case. If I'd include my code, the M would stand for maximum or monstruous.)_


title: Hide LaTeX parts through JavaScript

text: I'm creating an interactive pdf form with the `hyperref` package. The form is quite comprehensive, so the current goal is to only show parts that are relevant to the specific user. For example, the user indicates that he is male --> only the items that concern males are displayed. Usually it's not difficult to display only certain parts of a document, e.g. using the `ifthen` package:               \documentclass{article}     \usepackage{ifthen}          \begin{document}         \newboolean{boolvar}         \setboolean{boolvar}{false}         \ifthenelse{\boolean{boolvar}}{show if true}{show if false}     \end{document}      I'm lost, however, when it comes to combining variables like that with user input from form fields. Using JavaScript and the `insdljs` package, I've gotten as far as hiding form fields, but not text outside of these form fields: (Note: `insdljs` is not part of TeX Live, but available here)               \documentclass{article}     \usepackage[pdftex]{hyperref}     \usepackage[pdftex]{insdljs}          \begin{insDLJS}{mydljs}{some comment}         function hide(){              if(this.getField("somefield").display == display.visible){                  this.getField("somefield").display = display.hidden;              } else{                  this.getField("somefield").display = display.visible;              }         }     \end{insDLJS}          \begin{document}         \begin{Form}             \PushButton[onclick={hide();}]{Hide/Show}\\             \TextField[name=somefield, width=4em]{Any way to hide e.g. this text?}         \end{Form}     \end{document}      Hiding form fields like that is very handy, but I'd like to apply that to entire tables or sections. Any idea? Thanks!


title: Suppressing pagebreaks within paragraphs

text: > **Possible Duplicate:**   >  How to avoid page-breaks inside paragraphs? The style spec for a document requires that pagebreaks come between paragraphs _or_ list items, so paragraphs are never split across pages. (The content is specced so that paragraphs are always short enough for this to be sane.) How do I accomplish this? I looked into `\penalty`, which is mentioned in this answer, but it appears to be undocumented both on the ConTeXt Garden wiki and on the mailing list. There are a number of un(der)documented "penalty" commands such as `\widowpenalty` that control various aspects of paragraph breaking, but nothing that I can find that directly controls "to break or not to break" in absolute terms.


title: Oneside cover within a twosided LaTeX document

text: I'm writing my thesis and I'd like to have a onesided cover while the rest of the document is twoside, so to obtain the text and figures well-centered within the cover. Here is my main .tex file:               \documentclass[11pt,a4paper,twoside,onecolumn,openany]{book}     \usepackage{thesis}     \graphicspath{{plots/}}     \begin{document}          %\setboolean{@oneside}{false}     \include{cover/cover}     %\setboolean{@oneside}{true}           \include{chapter1\chapter}     ...      Furthermore, the default margins are too big, and so I'd like to change them. A first solution to this last problem was to change the document into a _twocolumn_ one in the very first line of the code, and then, after the cover page, changing it into _\onecolumn_. **EDIT** : my own answer (see below) doesn't give the _exact_ result I wanted. Now the number of the pages are correctly put on opposite corners depending whether it's an odd or even page, but the left and right margins are the same. Actually, I would like "external" margins to be a little wider, to put there some notes (using _\marginpar_ ). Thanks!


title: \emph yields bold-italic using the package "libertine"

text: How can I make `\emph` use italics again after loading the package `libertine`? I suspect that this may be a bug in the font itself. I tried reinstalling the font and upgrading it onto the most recent version. I am using XeTeX and Linux. (Ubuntu)


title: Beamer ovalbox frame thickness

text: I'm working with Beamer and I would like to create boxes with round corners. I use `\ovalbox`, but I would like to control the thickness of the line. How can I do this? I also tried `\thinlines`, but I still not understand the sintax since I didn't find a minimal example.


title: Rounded box around placeholder text that supports line breaking

text: I want to draw a rounded box around a piece of text like that: ![Mockup](http://i.stack.imgur.com/MJFyb.png) The left and right borders should be _half circles_ and _line breaking_ should be supported. This my code so far:               \setuppapersize[A7]     \setupwhitespace[medium]     \setupinterlinespace[line=3.5ex]          \definecolor[PlaceholderBGColor][h=65a6ff]     \definecolor[PlaceholderBorderColor][h=0051be]          \definetextbackground[PlaceholderBackground]       [location=text,        background=color,backgroundcolor=PlaceholderBGColor,        frame=on,rulethickness=1pt,framecolor=PlaceholderBorderColor]          \def\Placeholder#1{\starttextbackground[PlaceholderBackground]#1\stoptextbackground{}}          \def\PlaceholderFramed#1{\inframed[         background=color,backgroundcolor=PlaceholderBGColor,         frame=on,rulethickness=1pt,framecolor=PlaceholderBorderColor,corner=00]{#1}}          \starttext     /foo/\Placeholder{placeholder}/bar/          /foo/\PlaceholderFramed{placeholder}/bar/     \stoptext      ![Code result](http://i.stack.imgur.com/RhD7s.png) But the boxes don't look like drawn in the first picture: They are too high, line breaking does not work and `corner=00` is not round enough. :) How to define a command that creates boxes like the ones in the first picture? * * * **EDIT:** Here are two variants for multiline output: 1) Single rows (probably better):   ![multiline variant 1](http://i.stack.imgur.com/E7RSZ.png) 2) Merged rows:   ![multiline variant 2](http://i.stack.imgur.com/btHoj.png) But I think _variant 1)_ might be easier to implement and additionally good looking regardless of inter-line space.


title: Export beamer slides to powerpoint/openoffice-impress/keynote editable format

text: I usually prepare my talks using powerpoint/openoffice-impress/keynote, where I explaing programs, pseudocodes, etc. Recently I was thinking about creating text-only, code-only and pseudocode-only slides with beamer and then exporting them somehow to powerpoint where I modify them to add figures or some minor details for polishing the presentation, which are usually hard to do with beamer. I googled a bit around and found that beamer can export to PDF or PS but not to powerpoint. I wonder anyway if you know some possibility of conversion from beamer to on-screen editable powerpoint/openoffice- impress/keynote.


title: Always use \NewDocumentCommand instead of \newcommand?

text: Are compelling reasons to stick with `\newcommand` or should one always use `\NewDocumentCommand` instead, even when not using any of the additional features offered by `xparse`? In addition and more specifically,   * If I already require `xparse` to define one of the macros of my document / package / class, is it a good idea to use `\NewDocumentCommand` for all my other macro definitions?   * Will `\newcommand` eventually get deprecated / discouraged in favor of `\NewDocumentCommand` with LaTeX3?


title: Why is it so difficult to get good results from a .tex to .doc conversion?

text: I couldn't find a duplicate to this question and hope there isn't one. I'm not concerned with methods of converting LaTeX documents to Word Documents (I know a few). The question I have is why are the results often so shoddy? Where does the difficulty come in? Is it the proprietary nature of Microsoft technology? Is it that TeX has more robust functionality than whatever background mark-up language Word uses? Something else?


title: Including a jpg image, source code compilation in pdflatex doesn't create pdf

text: I'm writing a report on a programming project in LaTeX and need to insert some images. I created images using a Finite Element program Freefem++, and saved the results in image files. I've tried png, jpeg, eps, and ps, but would like to use jpg, and none of them work so far. I've searched all over the internet, and it seems like my code should work, so I'm not sure what I'm missing.               \documentclass[a4paper,11pt]{article}          \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage[pdftex]{graphicx}     %\graphicspath{{images/}}      \DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg}             \usepackage[english]{babel}     \begin{document}          \section*{Introduction}     \addcontentsline{toc}{section}{Introduction}               The domain considered will be          \begin{figure}     \begin{center}     \includegraphics{domain.jpg}     \end{center}     \end{figure}          \end{document}      I've tried with the file in a folder images and in the same folder as the doc, I've tried with and without the file extension, with and without `[pdftex]` and `\DeclareGraphicsExtensions`, etc. It compiles with `pdflatex` and gives no errors, exit code 1, then when I try to view the pdf it says it doesn't exist, and asks if I've compiled the source code. If I compile with `pdftex`, it just creates a blank first page. I've tried everything I can think of, I don't know what I'm missing. Perhaps a package I need to install on my computer? Or just a stupid mistake in the code? Does anyone see my error? Thanks in advance!


title: Missing labels with feynmp

text: my question is exactly the same as Missing labels with feynmf/feynmp? but the answer there did not solve my problem. I am using WinEdt 7, installed Metapost, and copy and pasted that user's code into my WinEdt. I then   1. PDFTexify   2. Opened up `fgraphs.mp` and then did Tex > MetaPost > MetaPost to generate the `fgraphs.1` file   3. Placed `\includegraphics{fgraphs.1}` into a separate tex file. When I PDFTexify, I get a diagram that has no labels.  This holds true if I change the `fmfgraph` environment to `fmfgraph*`. Any help would be greatly appreciated!


title: Bug in label for legend with beamer, tikz, animate

text: I am very puzzled by this small bug. This example does not work because compilation crashes on the line containing `\label{Temp\iIdPic}`.               \documentclass[11pt]{beamer}     \usepackage[latin1]{inputenc}     \usepackage{animate}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{frame}     \frametitle{mwe}     \begin{animateinline}[]{3}     \multiframe{4}{iIdPic=1+1}{     \begin{tikzpicture}[scale=0.6]     \begin{axis}[ytick=\empty,xmin=0,xmax=5,hide x axis]     \addplot+[mark=none] {3*x+\iIdPic};     \label{Temp\iIdPic}     \end{axis}     \begin{axis}[ytick=\empty,xmin=0,xmax=5,ymin=0,ymax=1,xlabel={Time (s)},%             legend cell align=left,legend style={at={(axis description cs:1.0,1.05)},anchor=south east}]     \draw[gray,ultra thin] (axis cs:\iIdPic,\pgfkeysvalueof{/pgfplots/ymin}) -- %             (axis cs:\iIdPic,\pgfkeysvalueof{/pgfplots/ymax});     \addlegendimage{/pgfplots/refstyle=Temp\iIdPic}\addlegendentry{problem}     \end{axis}     \end{tikzpicture}     }     \end{animateinline}     \end{frame}     \end{document}      What I want to do: Have an animation where the grey line is passing through the graph. The crashing bug is to have the legends correctly set-up. If you remove the line `\label{Temp\iIdPic}`, it compiles fine but in the legend the line identifying the referenced line is not of the correct colour. * * * Even though it does NOT solve the problem, I have narrowed down the problem to being an incompatibility between `\label` and the `animateinline` environnement.               \documentclass[11pt]{beamer}     \usepackage{animate}     \begin{document}     \begin{frame}     \frametitle{mwe}     \begin{animateinline}[]{3}         \label{Temp};     \end{animateinline}     \end{frame}     \end{document}


title: Quality of R plots in LaTeX

text: In `R`, I use `par` to prepare four boxplots (using `boxplot`) as a single image, which I save with the `png()` command. This image is included in a LaTeX document with `\includegraphics`. I have experimented with exporting different image sizes, and changing the scaling in LaTeX, but the image quality is still poor. I don't really have time to learn `Sweave` or `knitr` right now. What settings should I use to optimize the image quality?


title: gostbibliography environment

text: I use biblatex-gost package for formatting bibliography. I use the experimental environment gostbibliography, which provides unnumbered list of references. Is it possible to use the formatting from this environment but still be able to change the bibliography list spacing and numbering with               \defbibenvironment{bibliography}{%     \begin{enumerate}[       label=\arabic*,%       leftmargin = 0pt,%       rightmargin = 0pt,%       itemindent = \parindent,%       itemsep = 1em,%       parsep = \bibparsep]}%     {\end{enumerate}}     {\item}          \printbibliography[env=gostbibliography]      I want use item formatting provided by `gostbibliography` environment, which removes spacing and numbering of bibliography items, what does not fit me.


title: Problem with encoding

text: I have a problem with my tex file encoding. In my text in tex file I have something like this:               1. Wykonuje zaw??d z kt??rego zupe??nie nie jest zadowolony.      Which should be:               1. Wykonuje zawód z którego zupełnie nie jest zadowolony.      The problem is with polish diactric signs as you can see. I've tried to change the encoding but it doesn't work and I really don't know what to do. Thanks in advice for your help Here is my example code:               \documentclass[a4paper,11pt]{article}        \usepackage[T1]{fontenc}        \usepackage[latin1]{inputenc}       %\usepackage[polish]{babel}          \title{T??umaczenie - ??galit?© entre hommes et femmes}          \begin{document}          \maketitle          1. Wykonuje zaw??d z kt??rego zupe??nie nie jest zadowolony.          2. Wsp????czynnik umieralnoÂ¶ci jest o wiele wiÄ?kszy ni?? ten urodzin.          3. Na poczÂ±tku roku cena ropy zaczÄ???a siÄ? obni??aÄ? a teraz wzrasta.          4. ZaprowadÄ? dziecko do nia??ki!           5. Przesta??em karmiÄ? siÄ? z??udzeniami.          6. To danie jest bardzo po??ywne.          7. Rozw??j us??ug powoli poprawia siÄ?.          8. Istnieje wiele dysproporcji miÄ?dzy p??acami w firmach prywatnych i pa??stwowych.          9. Z tego starego zamku pozosta??o tylko rilka ruin.          10. Jakie sÂ± pana Â¶rodki na utrzymanie?          11. JeÂ¶li chodzi o mnie to muszÄ? wyznaÄ? ??e to dobry spos??b aby wyjÂ¶Ä? z kryzysu.          12. WiÄ?kszoÂ¶Ä? kobiet powinna pracowaÄ? na p???? etatu.           13. MuszÄ? znieÂ¶Ä? konsekwencje mojego wyboru.          14. Pobra??em za te prace sporÂ± sumÄ?.          15. Ten kr??l pomno??y?? bogactwo swego kraju.          16. MogÄ? wykonywaÄ? r????ne zajÄ?cia domowe.           17. WiÄ?kszoÂ¶Ä? czasu poÂ¶wiÄ?cam na pracÄ?, a poza tym czytam.           18. MyslÄ?, ??e ta praca pozwoli mi nabyÄ? doÂ¶wiadczenia.          19. Pana liczne pobyty za granicÂ± sÂ± powa??nym osiÂ±gnieciem.          20. Cel zosta?? osiÂ±gniÄ?ty!          \end{document}


title: Mixing normal and inline lists in one environment

text: I'm redoing my résumé and would like to produce a certain style of lists using `enumitem`, as shown in the image below. If it isn't possible, it isn't the end of the world, but I'd really like it if `enumitem` could take care of all my formatting for me, while I could just focus on my content. Basically, I want an inline list to be treated as one "item" in a normal itemized list. Is it possible to produce the layout below strictly using `enumitem`? ## MWE Image: ![image of MWE output](http://i.stack.imgur.com/I3gYm.png) ## MWE Code:               \documentclass{article}          \usepackage{setspace}     \onehalfspacing     \setlength{\parindent}{0mm}          \usepackage[inline]{enumitem}     \setlist[itemize]{%       , label      = \textbullet       , leftmargin = *       , nosep      = true     }     \setlist[itemize,1]{%       , leftmargin = 0mm     }     \setlist[itemize,2]{%       , label      = \textasteriskcentered     }          \begin{document}          \section*{Normal lists (via \texttt{enumitem})}     %     \begin{itemize}       \item fruits:             \begin{itemize}               \item apple               \item banana               \item cherry             \end{itemize}       \item vegetables:             \begin{itemize}               \item asparagus               \item broccoli               \item celery             \end{itemize}     \end{itemize}          \section*{Inline lists (via \texttt{enumitem})}     %     \begin{itemize}       \item fruits             \begin{itemize*}[after={{.}}, before=\unskip{: }, itemjoin={{; }}]               \item apple               \item banana               \item cherry             \end{itemize*}       \item vegetables             \begin{itemize*}[after={{.}}, before=\unskip{: }, itemjoin={{; }}]               \item asparagus               \item broccoli               \item celery             \end{itemize*}     \end{itemize}          \section*{Desired list (manual)}     %     \begin{itemize}       \item fruits:             \begin{itemize}               \item apple; \textasteriskcentered{} banana; \textasteriskcentered{} cherry.             \end{itemize}       \item vegetables:             \begin{itemize}               \item asparagus; \textasteriskcentered{} broccoli; \textasteriskcentered{} celery.             \end{itemize}     \end{itemize}          \end{document}


title: How to get small caps in Classico (texlive 2014)?

text: After installing texlive 2014 (via macports) all my documents using the "Classico" font stopped compiling. I scratched my head for a while (RTFM, STFW), and then I discovered that I should not invoke the font with this any more:               \renewcommand*\sfdefault{hop}     \renewcommand\familydefault{\sfdefault}      but now I'm now supposed to write this instead:               \usepackage[sfdefault]{classico}      And indeed, with this I can compile _some_ documents. But my problem remains, because pdflatex still chokes on small caps ( `\textsc{}` ) and maybe other things. My question is: **What did I do wrong ?** Post scriptum:   * minimal not-working example: http://pastebin.com/raw.php?i=cZKMq0bc   * pdflatex console output: http://pastebin.com/raw.php?i=xBYf0mfm   * pdflatex log: http://pastebin.com/raw.php?i=p90EqFbq


title: Images stacked horizontally : unwanted vertical gap

text: I am trying to stack three images horizontally. The images have the same size, I want to align them without any vertical gap. I followed the instructions that I found on this answer:               \blindtext              \begin{figure}[!htb]             \minipage{0.32\textwidth}             \includegraphics[width=\linewidth]{Immagini/teiera-ambientale.png}             \caption{Componente ambientale}             \label{fig:Componente ambientale}             \endminipage\hfill             \minipage{0.32\textwidth}             \includegraphics[width=\linewidth]{Immagini/teiera-diffusa.png}             \caption{Componente ambientale e diffusa}             \label{fig:Componente ambientale e diffusa}             \endminipage\hfill             \minipage{0.32\textwidth}             \includegraphics[width=\linewidth]{Immagini/teiera-speculare.png}             \caption{Componente ambientale, diffusa e speculare}             \label{fig:Componente ambientale, diffusa e speculare}             \endminipage         \end{figure}              \blindtext            But that's the result I get: ![enter image description here](http://i.stack.imgur.com/gK43l.png) I suppose it's because the captions have different length. But I can't change the title in the caption, is there a way to make the gap go away?


title: Edit margins in res.cls (How to pass through correct value for "margin"?)

text: I'm creating a resumé using the `res.cls` package and need to make the left and bottom margins smaller. I know I can use e.g. `\topmargin=-0.5in` to decrease the space at the top of the page, but neither `\bottommargin` nor `\leftmargin`, used similarly, have the same effect. I've also tried `\usepackage[margin=1.0in]{geometry}` with no effect (and errors from the keyval package in the TeX log output). Does anyone know of a way to set the margins for documents created using `res.cls`? **Edit (09/08):** I found an old email thread from 2006 that made me go "duh!". Both res.cls and geometry try to handle the `margin` option. I guess I have to somehow send geometry the value instead of the class option, but I don't know how to do that.


title: Numbers in tables: align by decimal point *and* flush right?

text: This is a followup question to siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers and Aligning numbers by decimal points in table columns. While the solutions to both questions worked, there is a final change I hope it is possible. Currently, while the numbers are aligned by decimal points, they are centered within the column. Below is the code and its output. **Is there a way to make the numbers in the rightmost column be flushed right as well, while maintaining the alignment by decimal point**? It is alright if a little bit of help is needed, such as declaring in advance how many digits are in each part (integer and fractional). Thus it is known which decimal position will be the rightmost one and the alignment can be determined. Thanks in advance.               \begin{table}[htp]         \centering         \begin{tabular}{@{}l r r>{\bfseries}S[table-format=3.2]@{}}               \toprule               \textbf{Product Group} & \textbf{Production Size} & \textbf{Number of Failures} & \textbf{Failure Rates} \\               & & & \textbf{(per 1,000 items)} \\               \midrule               %  \addlinespace               foo1 & 11,111 & 1,111 & 11.11\\               foo2 & 22,222 & 2,222 & 222\\               foo3 & 33,333 & 3,333 & 3.33\\               foo4 & 44,444 & 4,444 & 44.4\\               foo5 & 55,555 & 5,555 & 5.5\\               \bottomrule         \end{tabular}     \end{table}      ![alt text](http://i.stack.imgur.com/jmRl4.png)


title: L-Systems and TikZ

text: I'm trying to use L-Systems in LaTeX, but the following minimal example exits with an error:               \documentclass[a4paper, pdftex]{book}      \usepackage{tikz}          \begin{document}          \begin{tikzpicture}          \draw [green!50!black, rotate=90]         [l-system={rule set={F -> FF-[-F+F]+[+F-F]}, axiom=F, order=4, step=2pt, randomize step percent=25, angle=30, randomize angle percent=5}]         lindenmayer system;      \end{tikzpicture}          \end{document}      The error is:               ! Missing \endcsname inserted.     <to be read again>                         \pgf@arrows@invertl      l.8 ...t=25, angle=30, randomize angle percent=5}]      * * * **UPDATE** : It seems I might be missing something like:               \usetikzlibrary{lindenmayersystems}      Which, incidentally, results in the following error:               ! I can't find file `tikzlibrarylindenmayersystems.code.tex'.     <argument> ...nput tikzlibrary\pgf@temp .code.tex                                                        \catcode `\@ =\csname tikz...      * * * Thoughts?