title: Editors/IDEs for LaTeX documented source (.dtx) files

text: Similar to the question "Latex Editors/IDEs," I'm curious if there are any editors or add-ons that directly support the LaTeX documented source (.dtx) format. I imagine such an editor would support syntax highlighting for both the implementation as well as the documentation, perhaps with different backgrounds to increase contrast between sections. Just as most editors will preserve indentation on newlines, it would also be helpful to preserve the leading `%` in documentation mode. Extra bonuses to support for `Doc`-specific macros. Does such a thing exist? Do enough people actually edit `.dtx` files for there to be sufficient demand?


title: How to improve accuracy when working with PSTricks?

text: I have tried this with TikZ that produces the same issue, you can try Leo's solution here. In other words, this issue is **NOT** specific to PSTricks. The hidden idea is to avoid cropping with `pdfcrop` so I can improve my web- based system performance. Here I prepare a high resolution bounding box by setting the paper size in advance to tightly fit the PSTricks objects. To get a simpler conversion constant, I also define a new unit for my own purpose, e.g., `xp` that stands for `xport` as follows:               1 inch = 2.54 cm = 2.5 xp = 72 bp      From this convention I have:   * `1 xp = 1.016 cm` It means there is an excessive of `0.16 mm` for `1 xp`   * `1 xp = 28.8 bp` Here is the minimal working example for a standalone PSTricks picture.               % gridoff.tex     \documentclass{minimal}     \makeatletter     \def\xpbp#1{\strip@pt\dimexpr 28.8 \dimexpr #1 pt\relax\relax bp}     \makeatother     \usepackage     [     paperwidth=\xpbp{4.01},     paperheight=\xpbp{3.01},     margin=0bp     ]{geometry}          \usepackage{pstricks}     \psset{unit=\xpbp{1},linewidth=\xpbp{0.01}}     \pagecolor{cyan}     \begin{document}     \noindent%     \begin{pspicture}[showgrid=false](\paperwidth,\paperheight)     \psframe(\paperwidth,\paperheight)     \pscircle*[linecolor=red](2.005,1.505){1.505}     \end{pspicture}%     \end{document}      Note: I set the page color to cyan to ease me to identify whether or not the excessive strip exists in my main document importing the image. I compiled it with               latex %1     dvips -R -t unknown %1 -o     ps2pdf -dAutoRotatePages#/None -dCompatibilityLevel#1.5 -dPDFSETTINGS#/prepress %1.ps     pdftops -eps %1.pdf      I got the following PDF result: ![enter image description here](http://i.stack.imgur.com/IBj0t.png) and EPS:               %!PS-Adobe-3.0 EPSF-3.0     % Produced by xpdf/pdftops 3.02pl4     %%Creator: dvips(k) 5.99 Copyright 2010 Radical Eye Software     %%Title: gridoff.dvi     %%LanguageLevel: 2     %%DocumentSuppliedResources: (atend)     %%BoundingBox: 0 0 116 87     %%HiResBoundingBox: 0 0 115.49 86.69      Note: There are rounding error in `%%HiResBoundingBox` above. The exact values should be `115.488` and `86.688`. I must confirm that this issue is not specific to my own unit `xp` but it also happens in cm. If you try the following code, you will get a cyan thin strip at the top.               % incm.tex     \documentclass{minimal}     \usepackage[paperwidth=4cm,paperheight=3cm,margin=0bp]{geometry}          \usepackage{pstricks}     \psset{linewidth=0.01cm}     \pagecolor{cyan}     \begin{document}     \noindent%     \begin{pspicture}(\paperwidth,\paperheight)     \psframe(\paperwidth,\paperheight)     \pscircle*[linecolor=red](2,1.5){1.5}     \end{pspicture}     \end{document}      ## Problems and Questions: However, when I magnified the PDF image 6400 times, I noticed there is a blue thin strip at the bottom as follows: ![enter image description here](http://i.stack.imgur.com/41bWw.png) It should not be there because in theory PSTricks use `dimen=outer` by default.   1. How to make the resulting EPS have exact high resolution bounding box `0 0 115.488 86.688` rather than `0 0 115.49 86.69`?   2. How to force PSTricks to work more accurately to get rid of the excessive strip as shown above?


title: Preferred method for inline code samples

text: I tend to use the `minted` package for including code samples within my documents, which produces very nice output. However, because Pygments always produces a verbatim _environment_ there's no way to inline the code if I need to discuss particular features of it. What is the best way to typeset inline code to go alongside code produced by `minted`? Using the `listings` package just for `\lstinline` is one option I've considered, but it seems a bit odd to use both `minted` and `listings` together. I've used `listings` in the past, but (in my opinion and with the samples I've tried) I don't think the output is as nice as that produced with `minted`. Are there any other means of producing inline code that I'm unaware of?


title: The word CHAPTERS: in Table of contents before appendices

text: I want to remove the word "CHAPTERS:" that appears above the appendices listing in table of contents a MWE is               \documentclass[ms]{osudissert96}     \usepackage{amssymb,amsfonts,amsmath,amscd,mathrsfs}     \usepackage{url}     \usepackage[dvips]{color}%colortext     \usepackage{longtable}% Using longtable environment     \usepackage{ifthen}% Gives \ifthenelse     \usepackage{graphicx}     \usepackage[labelfont=bf]{caption}     \usepackage{algorithm}     \usepackage{algorithmicx}     \usepackage{multirow}     \usepackage{tablefootnote}     \graphicspath{{figures/}}% Define the path to the figures colorlinks,     \usepackage[]{mcode}     \usepackage{subcaption}     %\usepackage[toc,page]{appendix}     \usepackage[titletoc,toc,page]{appendix}     \newtheorem{mydef}{Definition}     \usepackage{acronym}     \usepackage{booktabs}               % Fix referencing of nested enumerations (put a dot between counters)     \makeatletter     \renewcommand{\theenumii}{\arabic{enumii}}     \renewcommand{\labelenumii}{\theenumi.\theenumii}     \renewcommand{\p@enumii}{\theenumi.}     \makeatother               \makeatletter \@addtoreset{footnote}{chapter} \makeatother % Clear the footnote counter at every new chapter          % The following adds the hyperlinks and makes the page navigator in the pdf viewer cool     \usepackage[breaklinks, hyperindex,pdfborder={0 0 0}]{hyperref}          % This will make chapter titles show up in uppercase (however, they will be normal case in the TOC)     \renewcommand\typesetChapterTitle[1]{\uppercase{#1}}          % Notation:     %\def\listofnotation{\input symbols.tex \clearpage}     %\def\addnotation #1 #2#3{#1\> \parbox{5in}{#2 \dotfill  \pageref{#3}}\\}     %\def\newnot#1{\label{#1}}                              %% To speed up compilation, you can comment all commands that include chapters you're interested in till you finish each chapter separately, or use the includeonly command     %\includeonly{ch1-intro}          \include{commands}               \begin{document}          \setcounter{tocdepth}{3}          \tableofcontents     \listoffigures     \listoftables     \newpage               \chapter{CH1}          \renewcommand\pagenumbering[1]{}     \begin{appendices}          \chapter{MATLAB Code}\label{App:Matlab_Code}     \end{appendices}     \end{document}


title: Extra row appearing in table assembled in pgf for loop

text: I'm constructing a table one line at time inside a `\pgfplotsforeachungrouped`. An unwanted line appears after the `\hline` at the end of the last round of the loop as evidenced by the lone decimal point below the left column in the output. This doesn't make sense right away, surely it's the end of the last step of the loop? I've untangled this from another question where it was a side issue that I solved on my own, so I've answered this myself in case it ends up being useful for anyone else. **Note** : Please see the addendum below for clarification of why I've put this question up. **MWE Output** ![MWE Output](http://i.stack.imgur.com/sKOU0.jpg) **MWE Code**               \documentclass[12pt]{article}     \usepackage[a5paper,margin=14mm]{geometry}          \usepackage{pgfplots}          \newlength{\xval}     \newlength{\fval}          \pgfplotsset{compat=1.9, /pgf/declare function={F(\x)=(\x+5)*(\x-1)*(\x-5);}}          \def\MyEnd{m}          \def\printplainbefore#1.#2\MyEnd{#1}     \def\printplainafter#1.#2\MyEnd{#2}          \newcommand{\leftdigits}[1]{\pgfmathparse{#1}\expandafter\printplainbefore\pgfmathresult\MyEnd}     \newcommand{\rightdigits}[1]{\pgfmathparse{#1}\expandafter\printplainafter\pgfmathresult\MyEnd}          \tracingmacros=1          \begin{document}     %     \par $f(x)=(x+1)(x-1)(x+5)$     \par\begin{tabular}{r@{.}l r@{.}l}     \hline     \multicolumn{2}{l}{\textbf{\em x}} & \multicolumn{2}{l}{\textbf{\em f}(\textbf{\em x})} \\     \hline     \pgfplotsforeachungrouped \kk in {1,...,5}     {%     \pgfmathsetlength{\global\xval}{\expandafter-6+\kk*2}     \leftdigits{\xval} & \rightdigits{\xval} &     \pgfmathsetlength{\global\fval}{F(\xval)}     \leftdigits{\fval} & \rightdigits{\fval} \\     \ifdim\xval=4pt\hline\fi     }     \end{tabular}     %     \end{document}      **Addendum** : I really appreciate the answer below that demonstrates a better way of doing tables but that's not what the question asks for. I've been getting comments left and right telling me not to complicate questions and to try and focus them and ask side issues in separate questions. So I'm doing just that. This question was about why the extra line was appearing in my output and I answered it successfully. I do want to know about better ways of doing tables and I will search this site for answers. If I don't find what I'm looking for I will ask a separate question specifically about recommended ways to do tables.


title: a ∣ b and a ∤ b in formulas

text: **What is the correct way, both semantically and typographically, to typeset _a_ ∣ _b_ and _a_ ∤ _b_ (read “a divides b” and ”a does not divide b”)?** I guess I could simply type `|` (vertical bar, U+007C) or `\vert` for one and a combination of that with `\not` for the other. But I seem to recall that the default interpretation of that was something other then a binary relation. There are unicode symbols U+2223 and U+2224 (which I also used in the title of this question), so some fonts might even ship precomposed characters. And semantically it seems “more correct” to somehow refer to this meaning, even if nobody will be able to tell the difference. Perhaps a screen reader or some other accessibility thingy might make use of it. On the other hand, since I'm mainly using pdflatex and not xetex or luatex, unicode probably isn't that important for me in practice. Using unicode to enter math appears to be a non- trivial task for pdflatex. From this question I learned that there is a command called `\divides` somewhere out there, which apparently has binop spacing, but according to the comprehensive latex symbol list, it comes from `mathabx`, and even though there are guides on how to import individual symbols from that package, there are other voices indicating some kind of resource shortage related to this. And I'm unsure whether importing symbols will also import correct spacing for them. So I don't feel particularly at home with this approach either. It might be that the solution I'll eventually take is already among those outlined above. But I don't know which. So if you find one of these solutions appropriate, feel free to post it as an answer, indicating _why_ you consider it superior. That way, others can vote and I'll get second opinions which will hopefully help me choose among them. If you have another solution I haven't mentioned yet, that's even better.


title: Changing the table row height in all rows except the first row

text: Is there a way to change the row height in a tabular environment in all rows except the first row? I want the rows, except the first one, to be of the same height.


title: How to give a label to nodes which already contain a tikzpicture with nodes.

text: I am a beginner at TikZ and LaTeX. This is what I currently have: ![enter image description here](http://i.stack.imgur.com/R9esh.png) I would like to label each of these rectangles (i.e. graphs) with a single letter, i.e. G. This is the code for a single graph in this picture:                 \node[outer] (L) {       \begin{tikzpicture}         \node [inner,label=below:1] (a) at (0,0) {1};         \node [inner] (ai) at (1,0) {1};         \node [inner,label=below:2] (aii) at (2,0) {1};         \draw[->] (a) edge (ai);         \draw[->] (ai) edge (aii);       \end{tikzpicture}       };      Specifically, this is the code for the top leftmost graph. I would like to give it a label L. I read online that to give a caption (label) to a tikzpicture you have to put it inside the tikz figure. I've done it for the big graph, hence you can see "Figure 3: A double pushout." below the whole picture. But when I put the contains of this node L inside a tikzfigure, i.e.                 \node[outer] (L) {     \begin{figure}     \begin{tikzpicture}       \node [inner,label=below:1] (a) at (0,0) {1};       \node [inner] (ai) at (1,0) {1};       \node [inner,label=below:2] (aii) at (2,0) {1};       \draw[->] (a) edge (ai);       \draw[->] (ai) edge (aii);     \end{tikzpicture}     \end{figure}        };      It throws an error.               ! LaTeX Error: Not in outer par mode.      Also, it's really a lot "figures", which seems unnecessary for me? I also tried this solution (which works for small nodes), so instead                 \node[outer] (L) {      I wrote                 \node[outer, label=above:L] (L) {      But it throws this error:               ! Undefined control sequence.     <argument> pgf@sh@ns@\tikzlastnode      l.15 \draw[->] (a) edge (ai)      My code may seem silly to you, experts. So feel free to point out any mistakes! I have a feeling I'm too "wordy" for what I'm trying to achieve. For completeness, I will say that the big tikzpicture has the following settings:               \begin{figure}[htb!]     \centering     \begin{tikzpicture}[remember picture,     inner/.style={circle,draw,inner sep=4},     outer/.style={draw,inner sep=4, outer sep=2} % deleted thick here after draw      Thanks for help everyone!


title: How to use a single count for tables and figures?

text: In a short document, I wrote reference-based sentence, which ended up reading : > With the previous example (figure 1), the features used are presented in > table 1. I would like both figures and tables to share the same counter, so after figure 1 comes table 2, then table 3, figure 4, etc. **How can I merge the counts for tables and figures ?** A similar question was asked on SO (here) but I couldn't make the answers work.


title: Aligning one minipage to other that is stretched

text: I'm having a problem with the `minipage` option. What I'm trying to do is to align the first `minipage` to the second, since the second is a chemical equation. So here is my code               \documentclass[a4paper,12pt]{scrartcl}     \usepackage[ngerman]{babel}     \usepackage{bpchem}     \usepackage[version=3]{mhchem}     \usepackage{chemexec}      \begin{document}     \begin{minipage}[t]{.25\linewidth}     Oxidation:\\      Reduktion: \\     Redoxreaktion:\\     \end{minipage}%     \begin{minipage}[t]{.5\linewidth}     $\ce{ \ox{+II}{Mn} \op[2] + 4 \ox{-II}{O} \, \ox{+I}{H} \om[] -> \ox{+VI}{Mn} \, \ox{-II}>{O}_{2(s)} + 2 \ox{+I}{H}_2 \, \ox{-II}{O} + 2 e \om[] }$\\     $\ce{ \ox{+VII}{Mn} \, \ox{-II}{O}_4 \om[] + 2 \ox{+I}{H}_2 \, \ox{-II}{O}  + 3 e \om[] -> 3 \ox{+VI}{Mn} \, \ox{-II}{O}_{2(s)} + 4 OH \om[]}$ \\     $\ce{ \ox{+II}{Mn} \op[2] + 2 \ox{+VII}{Mn} \, \ox{-II}{O}_4 \om[] + 4 \ox{-II}{O} \, \ox{+I}{H} \om[] -> 5 \ox{+VI}{Mn} \, \ox{-II}{O}_{2(s)} + 2 \ox{+I}{H}_2 \, \ox{-II}{O}}$     \end{minipage}     \end{document}


title: How to install a beamer theme in Lyx

text: I would like to use the Wuerzburg Beamer Theme for my thesis presentation but i dont know how to install it in Lyx. Can anyone help me please?


title: The rhyme and reason of function argument syntax (brackets versus braces)

text: I'd like to gain some intuition as to the choices of brackets versus braces in function arguments. As in `[...yadda...]` versus `{...yadda...}`. I'm a long-time user of LaTeX but am poorly educated as to the fundamentals. Whenever I try to guess/recall an old function I always seem to confuse if it should be: `\somefunction{argument1}[argument2]` or something like `\somefunction{argument}{argument}`. Is it really ad hoc, like Herbert says here, or is there at least a semblance of logic to the patterns? EDIT: Thanks all for your lucid responses. I found the discussion here to also be very helpful. I'm especially grateful for the links to  _TeX by Topic_ by Victor Eijkhout.


title: sloped text along slanted paths in TikZ

text: Sloped text nodes along paths in a slanted scope seem off. Is there any way to fix this?               \documentclass{standalone}          \usepackage{tikz}     \newcommand{\yslant}{0.5}     \newcommand{\xslant}{-0.6}          \begin{document}     \begin{tikzpicture}[scale=2]         \begin{scope}[every node/.append style={yslant=\yslant,xslant=\xslant}, yslant=\yslant,xslant=\xslant]             \draw (-0.5,5) -- (-0.5,2) node [midway, below, sloped] {weaker control flow};             \draw (-0.5,5) -- (2,5) node [midway, above, sloped] {well-formedness};             \draw (-0.5,5) -- (-2,2.5) node [midway, above, sloped] {number of exits};         \end{scope}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/44ZF7.png) **Edit** : I don't just need the axes, here's the whole figure: ![enter image description here](http://i.stack.imgur.com/2Ba53.png)


title: How to write upper case \varepsilon in LaTeX math environment?

text: I need the uppercase of this sign `$\varepsilon$` how to I get that?


title: Missing } when using \begin{align*}

text: I have scoured my code and tried it out without the alignment. There is nothing i can see wrong with the code, but when I try to use align or eqnarray, I always get some error message. Here's the code               \begin{align*}       \oint_{|\zeta| &= \hat{R_2}} \frac{f(\zeta)}{\zeta - z} d\zeta \\                 &= \oint \frac{f(\zeta)}{\zeta} \frac{1}{1 - \frac{z}{\zeta}}         d\zeta\\                  &= \oint \frac{f(\zeta)}{\zeta} \frac{1}{1 - \frac{z}       {\zeta}} d\zeta \\           &= \oint \frac{f(\zeta)}{\zeta} \cdot \left( 1 +        \frac{z}{\zeta} + \frac{z^2}{\zeta^2} + \cdots \right)  d\zeta \\     &= \oint \frac{f(\zeta)}{\zeta} d\zeta + \oint \frac{f(\zeta)}      {\zeta^2} z d\zeta + \oint \frac{f(\zeta)}{\zeta^3} z^2 d\zeta     %     \end{align*}      And here's the error message:               home/username/Dropbox/Math 132/.2013-07-01.tex.swp:105: Missing } inserted.             <inserted text>                  }       l.105 \end{align*}      /home/username/Dropbox/Math 132/.2013-07-01.tex.swp:105: ==> Fatal error occurred, Thank you !


title: siunitx S column to produce aligned numbers in italics and parentheses

text: My apologies first as it may be that if i spent a sufficient amount of time playing and reading the `siunitx` manual, that I might be able to figure this out. About an hour has failed to yield the answer though. I have a tabular environment and an S column. I wish for all the numbers in this column to be surrounded by () and written in italics (though the () themselves would not be in italics). I'd like this to happen while the alignment features of `siunitx` are still in operation. I have tried the `bracket-numbers=true` option in combination with defining `[...,open-bracket=(, close-bracket=),...]` in this siunitx package options. Even for stand alone numbers `\num[bracket-numbers=true]{12345}` this does not appear to provide parenthesis. Also for the italics part, I can put my number in \textit{1.2345} in the column, and this will work, but to my mind lacks elegance, e.g. it does not keep the specified alignment, just treats it as text. Does any one have a solution. Many thanks


title: Combining Tables and TikZ

text: There are a few accounting figures which I am making, and I need to add curly braces and arrows with boxes of text inside near table environments. Here is an example figure: ![example](http://i.stack.imgur.com/ZfYFE.png) I want to use TikZ for this, in combination with a tabular enviroment maybe? This just looks so difficult that I'm not even sure what to start with to give you a sample code of my attempt. Also, I'm not sure how to use a 'rule' style command which just underlines a certain column as in the figure, not the entire row.


title: Problem with luacode in sty file

text: I'm trying to include a gcd function using lua in a sty file. Here is the code of euclide.sty :               \RequirePackage{ifluatex,luacode,luatextra}     \ifluatex         \begin{luacode}             function euclide(a,b)                 if a < b then a,b = b,a end                 r = a-math.floor(a/b)*b                 if r == 0 then tex.print(b) else euclide(b,r) end             end         \end{luacode}         \newcommand{\euclide}[2]{\luaexec{euclide(#1,#2)}}     \fi      Here is the texfile code :               \documentclass[10pt,oneside]{article}     \usepackage{euclide}          \begin{document}     \euclide{435}{630}     \end{document}      The lualatex compilation give me errors :               Runaway argument?     ! File ended while scanning use of \luacode@grab@lines.     <inserted text>     \par     l.4           I suspect you have forgotten a `}', causing me     to read past where you wanted me to stop.     I'll try to recover; but if the error is serious,     you'd better type `E' or `X' now and fix your file.               ! LaTeX Error: Missing \begin{document}.      Can somebody tell me what's wrong in my code ? (this code works fine in the main tex file, but not in sty file) Thanks, MB.


title: How to add day information into the month field using biblatex

text: Is it possible to add some information about the day of publication in biblatex? Is it also possible to make double month entries with biblatex? The bibtex entries               month=mar#"/"#apr,     month=mar#"15"      do fine with bibtex, but they don't work with biblatex.


title: Looping a code-chunk in LaTeX

text: I want to generate a report for three types of analysis I am performing. But each time when I perform the analysis it can happen that one or more than one type of analysis occur. I want to put condition in the report that will run the part of report according to the type of analysis performed. For each analysis I need to repeat the chunk say n times. I am stuck at writing a for loop for the code chunk. 'a' is a vector eg code:               \myboolean\Sexpr{myboolean}     for(i in 1:n)     \section{Frequency Analysis}     <<for-loop>>=     print(a[i])     @


title: Can't use 'equal' in tikz-cd

text: Ok, here is the problem. I'm trying to draw some commutative diagram in LaTeX that involve some "equal" sign in `tikz-cd`:               \[     \begin{tikzcd}     0 \arrow{r}  & X \ar[equal]{d}\\     0 \arrow{r} & X     \end{tikzcd}     \]      (`\usepackage{tikz-cd}` is already included in the preamble) I get the diagram but **the equal signs appear as simple arrows**. In Kile I get no errors but in TeXMaker the following error appears: > ! Package pgfkeys Error: I do not know the key '/tikz/equal' and I am going > to ignore it. Perhaps you misspelled it. By reading some other threads I got the impression that this is "pgf" related problem. I have several TeX related folder in my `/usr/share`: > texinfo, texmaker, texmf, texmf-dist, texmf-local it seems that pgf files are inside `texmf-dist`: > /usr/share/texmf-dist/tex/generic/pgf I think that TeXMaker is using this folder too, based on the content of TeXMaker log file: http://www.ipaste.eu/view.php?id=4065 So what's wrong with the pgf that can't render the "equal sign"?


title: Reduce space on bottom of title page

text: I want to insert some text at the bottom of my title page, but it always goes to the next page if I put it too low. Can I force the text to stay on the same page, or reducing the margin at the bottom of the page, just for the titlepage?


title: How to define pgfmath local variables?

text: When using `pfgmathsetmacro` in commands (defined by `\newcommand`) we have a problem of locality of variables. For instance if you design two functions               \newcommand\f[4]{%       \pgfmathsetmacro#3{cosh(#1+#2)}%       \pgfmathsetmacro#4{cos(#1+#2)}%     }     \newcommand\g[4]{%       \pgfmathsetmacro#3{sqrt(1+(#1-#2)^2)}%       \pgfmathsetmacro#4{sqrt((#1)^2+(#2)^2)}%     }      and want to define the composed function               \newcommand\h[4]{%       \f#1#2\x\y%       \g\x\y#3#4%     }      How do you protect the variables `\x` and `\y` such that you do not have to worry about not naming other variables `\x` or `\y` ? If you have only one variable, the problem can be avoided using `\pgfmathresult`, but what if you have two (or more !) variables ?


title: How to crop a pstricks figure

text: I wish to create a figure using `pstricks` code, and then to display only a cropped region of the figure. I thought that the arguments to `\begin{pspicture}(...,...)(...,...)` would allow me to do this, but changing those arguments seems to have no effect whatsoever on the output. I am using TeXShop in OSX, so I suppose that compilation is via `epstopdf` and `pdflatex`, etc. I would like a solution that does not involve exporting the figures to external files and then subsequently cropping. Currently 100% of the code to generate the `.pdf` is in the `.tex` file, and I hope to keep it that way.


title: Quotation with double quote and O results in Ö

text: I have an issue with the double quote in my quotation. Using `"OpenGL....."` results in `ÖpenGL...` even with `\"OpenGL...` the result is the same. Using \verb results in double quotes in a wrong font type (at least it looks out of place).               \begin{quotation}     "OpenGL (Open Graphics Library) ist eine Spezifikation für eine plattform-     und programmiersprachenunabhängige Programmierschnittstelle zur     Entwicklung von 2D- und 3D-Computergrafik."     \end{quotation}


title: Quotation mark problem

text: > **Possible Duplicate:**   >  Quotation with double quote and O results in Ö I'm having a problem to write this in LaTeX: "real-world" objects. My code is this               ``real$-$world" objects      But this gives me "realwordöbjects" ... I tried `\glqq` and `\grqq` but that's not really what I want. `\"` didn't work either.


title: TeX-run-Tex wrong type argument in emacs

text: I use such a function for compiling LaTeX in emacs (AUCTeX) taken from here (accepted answer by Jouni K. Seppänen):               (defun run-latexmkk ()       (interactive)       (let ((TeX-save-query nil)             (TeX-process-asynchronous nil)             (master-file (TeX-master-file)))         (TeX-save-document "")         (TeX-run-TeX "latexmk" "latexmk" master-file)         (if (plist-get TeX-error-report-switches (intern master-file))             (TeX-next-error t)           (minibuffer-message "latexmk done"))))      It works really well but today I observed some problem when I compile a multifile document. I have some `master.tex` and `\input{chap1.tex}` in it. When I use `run- latexmk` while editing `chap1.tex` (master file is properly set in chap1.tex) then I get a message               TeX-run-TeX: Wrong type argument: stringp, nil.      Output pdf/dvi file seems to be good but I am curious why I get this message. I tried changing the line `(TeX-run-TeX "latexmk" "latexmk" master-file)` in many ways but without success. Of course when I compile singlefile document then all works good without any messages. What should I change to get rid of this warning? **Edit:** When I `toggle-debug-on-error` as @Thomas suggested in his comment I get this message               Debugger entered--Lisp error: (wrong-type-argument stringp nil)       TeX-synchronous-sentinel("latexmk" "../MSc" 12)       TeX-run-TeX("latexmk" "latexmk" "../MSc")       (let ((TeX-save-query nil) (TeX-process-asynchronous nil) (master-file ...)) (TeX-save-document "") (TeX-run-TeX "latexmk" "latexmk" master-file) (if (plist-get TeX-error-report-switches ...) (TeX-next-error t) (minibuffer-message "latexmk done")))       run-latexmkk()       call-interactively(run-latexmkk nil nil)      **Edit 2:** To clarify, if my document compile without errors (TeX errors) then I get nice output file (and this annoying message). But when my document has some TeX errors then I get only `Wrong type argument` message. It is then pretty unusable.


title: amsproc class, formating \cite command

text: Using `\documentclass{amsproc}`, `\bibliographystyle{amsplain}`. With `\cite{A,B}` one gets something like `[1, 2]`. I would like to decrease the space (for example to thinspace) between `1,` and `2`. I would appreciate any suggestion to do that simply, i.e., by (re)defining a macro, instead using additional package. But if a package is unavoidable, ok, but which one? A minimal working example:               \documentclass{amsproc}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @article{testa,       title= "Title A",       author= "Author A",       journal= "Journal A",       pages= "1-2",       year = "2012"     }     @article{testb,       title= "Title B",       author= "Author B",       journal= "Journal B",       pages= "2-3",       year = "2012"     }     \end{filecontents}          \begin{document}          \cite{testa,testb}     \bibliographystyle{amsplain}     \bibliography{\jobname}     \end{document}      ![enter image description here](http://i.stack.imgur.com/xeq41.png)


title: conflict tkz-euclide and nag?

text: Am I doing something wrong and is this meant to happen?               %\documentclass{minimal} edit: should not be used     \documentclass{article}     \usepackage{tkz-euclide}     \usetkzobj{all}     \RequirePackage[l2tabu,orthodox]{nag}     \begin{document}       \begin{center}       \begin{tikzpicture}          \tkzInit[xmin=-9, xmax=6, ymin=-0.7, ymax=5]          \tkzDefPoint(0,0){x}          \tkzDrawPoints(x)          \tkzLabelPoints[below](x)       \end{tikzpicture}       \end{center}     \end{document}      If I try to compile this (with pdflatex or xelatex) I get the following error               ! Incomplete \iffalse; all text was ignored after line xx.     <inserted text>                      \fi      If I leave off the `\begin{center}` and corresponding `\end{center}` the error message changes to:               Runaway argument?     \@xa \looseends \@xa :\@xa =\nag@envstack \do {\@xa \ifx \looseends \relax \ETC.     ! File ended while scanning use of \@tfor.     <inserted text>                      \par        1. Could someone explain this error message to me.   2. If I comment out either `\RequirePackage[..]{nag}` or `\tkzInit[..]` the error vanishes.


title: natbib error only when using "round" option

text: When I use `sort&compress`, everything works fine:               \usepackage[sort&compress]{natbib}     % ...     \bibliographystyle{unsrt}     \bibliography{refs}      I get the following error _only_ when I include `round` in my natbib options:               \usepackage[sort&compress,round]{natbib}     % ...     \bibliographystyle{unsrt}     \bibliography{refs}      > natbib Error: Bibliography not compatible with author-year citations Does anyone know why this is? I've tried cleaning out temporary files and making from scratch.


title: Triangulated Toruses in Sketch

text: I want to be able to use sketch to generate an image like this: ![enter image description here](http://i.stack.imgur.com/qHBN8.jpg) I am able to get the torus okay using nested sweeps as demonstrated in the tutorial, but my attempts to draw the diagonals using rotations in a sweep distorted the torus in ways I didn't intend. How can I generate this image?


title: LaTeX Photo With Rounded Corners

text: I have a photograph that I'm loading into my LaTeX document. I'd like the photograph to have rounded corners and no visible border. I'd prefer not to edit the original photograph. Any thoughts on how to do this?


title: How to typeset special Apple Mac keyboard symbols?

text: Is there a standard way to typeset the special symbols of the Apple Mac keyboard? That is, the curly rectangle ⌘ and the others? If there is none, what would you suggest as workarounds?


title: Latex error: \begin{document} ended by \end{table}

text: I'm getting the following error from my Latex code: `\begin{document}` ended by `\end{table}` But the error is not what the message says, because the `begin{document}` is ended by `\end{document}`. The problem is with the command `\begin{table}`, when I turn it in comment, the table works fine, but when I turn it on, the table disappear and the message appears.               \begin{table}[ht]     \begin{center}     \begin{tabular}{cc}     \hline     \multicolumn{2}{c}{\textbf{Variância das séries}} \\     \hline     \hline     Dados originais & 0,01065676 \\     1ª diferença & 0,003638648 \\     \hline     \caption{Variância das séries}     \end{tabular}     \end{center}     \end{table}      And these are the packages that I'm using               \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{tikz,blindtext}     \usepackage[T1]{fontenc}     \usepackage{palatino}     \usepackage{chngpage,calc}     \usepackage{hyperref}     \usepackage{kpfonts}     \usepackage{conf}     \usepackage{graphicx}     \usepackage[portuguese, english, brazil]{babel}      \usepackage{setspace}     \usepackage{cite}      Anyone can help me?


title: Automatic \newpage for sections at the end of a page

text: > **Possible Duplicate:**   >  Avoiding page breaks shortly after section/subsection headings Imagine that I've got a `\section` (or `\subsection`, `\subsubsecion`, `\paragraph`) at the end of the page X: in this case, even if a single row of the section can fit into the page, the section is shown into the page X. Since in this case I'd prefer showing the section in the new page, I have to manually insert a `\newpage` before the section. How is it possible to specify that at least N rows of the section have to be shown into the page X (and in the other case, the entire section has to be shown on the page X+1)?


title: Prevent new sections to start on the lower part of page

text: Is it possible to redefine the section-command so that it automatically starts on a new page if say less than a quarter of the current page remains? Below is a minimal working example. In this case LaTeX allows placing a heading under which just two lines of text from the following section can be placed before the pagebreak. This is probably fins for most texts, but is quite disturbing in mathematical texts when the text below the heading is for example a theorem. I know I can fix this manually by inserting \newpage och \clearpage when needed, but is it possible to fix this automatically?               \documentclass[10pt,a4paper]{article}      \usepackage{blindtext}          \begin{document}          \blindtext[4]     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip  ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.           \section{Bad placed section}     \blindtext[1]          \end{document}


title: xeCJK messes with punctuation

text: Neither a question nor really a complain, but I find I cannot use `xeCJK` in multilingual documents (in the present case French + English + Chinese), simply because it messes with the punctuation in the non-Chinese parts. It will, for instance, change "this… that" to "this…that" and "this, that" to "this , that", which is inconvenient. Too bad because the package is otherwise very nice. Here's a minimal example showing the problem:               \documentclass {memoir}     \usepackage{polyglossia}     \usepackage{xeCJK}      \setmainlanguage{french}      \usepackage{fontspec}      \setmainfont{TeX Gyre Pagella}      \setCJKmainfont {STSong}      \begin{document}      This… that This, that      \end{document}      The output is the following: ![output of code](http://i.stack.imgur.com/HpUZK.png) The "this , that" problem appears strictly when I set the main language to French, not if I set it to English. The "this…that" problem appears irrespective of whether the main language is French or English. And, by the way, forgive me if that's the wrong place to draw attention to this, but the package author's email address doesn't appear in the documentation and I just chanced on this site


title: How to make a 3 level deep tree with tikz

text: I am busy making a full binary tree of three levels deep. The code I am having now is (using the trees library):               \begin{tikzpicture}       \node {root}         child {node {left}           child {node {lleft}}           child {node {rleft}}         }         child {node {right}         child {node {lright}}           child {node {rright}}         };          \end{tikzpicture}      The problem is that rleft and rright are printed over each other. Preferably I would like tikz to figure this out by itself, for example if I give a minimum distance between nodes on the same level. Is this possible? (My final nodes will not have text but will be fixed size shapes) Off course it can be that the solution is: "Don't use 'trees'". In that case, what is the best way to do this?


title: How to change the label of one item in an enumitem list

text: I want to change the label of one item in a list. I am using the `enumitem` package, I am very fond of it, and I have to keep using it (lots of other code would break). MWE:               \documentclass[a4paper,10pt]{article}          \usepackage[]{enumitem}          \begin{document}     Foobar          \begin{enumerate}[label={(\arabic*)}]             \item baz     \end{enumerate}     \begin{enumerate}[resume,label={(*\arabic*)}]             \item xyzzy     \end{enumerate}     \begin{enumerate}[resume,label={(\arabic*)}]             \item quux     \end{enumerate}          Lorem ipsum     \end{document}      The result is a list                (1) baz     (*2) xyzzy      (3) quux      However, I would like to do something like               \documentclass[a4paper,10pt]{article}          \usepackage[]{enumitem}          \begin{document}     Foobar          \begin{enumerate}[label={(\arabic*)}]             \item baz             \staritem xyzzy             \item quux     \end{enumerate}          Lorem ipsum     \end{document}      It would be very cool if the `enumitem` package would make code like `\item[label=(*\arabic*)]` possible. But as far as I know, an easy solution is not available. What would you do? Please define a command `\staritem` in your answer, as this would be a more orthogonal solution than hacking it straight into the document text. Alternatively, hacking `\item` to accept options (as in `\item[label=(*\arabic*)]`) would be awesome!


title: acronym - tabular -- weird spacing while using \ac

text: I'm currently writing a Lab-Report, using a lot of acronyms and tables. What I have so far looks like this:               \documentclass{standalone}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}          \usepackage{booktabs}     \usepackage[allowlitunits]{siunitx}     \DeclareSIUnit{\pH}{pH}     \usepackage{chemmacros}     \sisetup{locale=DE}     \usepackage{acronym}          \begin{document}%         \begin{tabular}{cp{26em}}             \toprule%             Lösung & \multicolumn{1}{c}{Beschreibung} \\%             \midrule%             1 & \SI{0.1}{\textsc{n}-Acetatpuffer} \pH \SI{5.0}{} : \SI{70.5}{\milli\liter}             \SI{1}{\Molar} \ch{NaOH +}\SI{100}{\milli\liter} \SI{1}{\Molar} Essigsäure, auf             \SI{1}{\liter} mit destilliertem Wasser auffüllen.\\%                     2 &\acl{tcl}--Lösung \SI{0.38}{\gram\per\liter} in \ac{dmso} bzw.             \SI{189}{\milli\gram} auf \SI{5}{\milli\liter}\\%                 3 &\ac{act}--Lösung \SI{37.8}{\milli\gram\per\milli\liter} in             \SI{1}{\milli\Molar} \ch{HCl} bzw. \SI{189}{\milli\gram} auf             \SI{5}{\milli\liter}\\%                      \bottomrule%         \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/QI52H.png) After changing `\ac` to `\acl` and (`\acs`) it works fine:               \begin{document}%         \begin{tabular}{cp{26em}}             \toprule%             Lösung & \multicolumn{1}{c}{Beschreibung} \\%             \midrule%             1 & \SI{0.1}{\textsc{n}-Acetatpuffer} \pH \SI{5.0}{} : \SI{70.5}{\milli\liter}             \SI{1}{\Molar} \ch{NaOH +}\SI{100}{\milli\liter} \SI{1}{\Molar} Essigsäure, auf             \SI{1}{\liter} mit destilliertem Wasser auffüllen.\\%                     2 &\acl{tcl}--Lösung \SI{0.38}{\gram\per\liter} in \ac{dmso} bzw.             \SI{189}{\milli\gram} auf \SI{5}{\milli\liter}\\%                 3 &\acl{act}--Lösung (\acs{act}) \SI{37.8}{\milli\gram\per\milli\liter} in             \SI{1}{\milli\Molar} \ch{HCl} bzw. \SI{189}{\milli\gram} auf             \SI{5}{\milli\liter}\\%                      \bottomrule%         \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/uRSdC.png) I found a workaround, but still I would like to know what causes this problem. I'm including this standalone in my main document, therefore its not a problem those acronyms aren't defined.


title: How can I globally set pgfmathsetlength?

text: How can I declare a length via `pgfmathsetlength` global? The example results in _20pt -- 5pt -- 20pt_ But I had expected: _20pt -- 5pt -- 5pt_               \documentclass[10pt]{article}     \parindent0pt     \usepackage{tikz}     \newlength\testl     \pgfmathsetlength\testl{20pt}     \begin{document}     \the\testl          {\global\pgfmathsetlength\testl{5pt}\the\testl}          \the\testl     \end{document}      I don't want to discuss possibilities with `\setlength` or `\deflength`.


title: How to insert a \special at every linebreak

text: How can I make TeX/LaTeX insert the token `\special{lb}` into the generated DVI command stream whenever a linebreak occurs? The `listings` package with its prebreak/postbreak option seems already close to the effect I want, however I need this `\special` to show up always, not only in case of a particular listing and I need this as a separate modification not as part of a package which might have side-effects. The DVI commands are read as part of a postprocessing so I really need to see when TeX does a linebreak.


title: Vertically align characters raised with \stackrel

text: I learned from Stefan's reply to Putting a character above another character to use `\stackrel` in math mode to do just that. I'm using that right now to mark segments of a word as having a high (H) or low (L) tone. In some words, however, the characters that I put H or L above are of different heights. How can I align the raised characters H and L vertically?               \documentclass{article}     \usepackage{amsmath}     \begin{document}     h$\stackrel{\text{L}}{\text{a}}$nd$\stackrel{\text{H}}{\text{l}}$     \end{document}      ![enter image description here](http://i.stack.imgur.com/H1qeN.png) * * * **EDIT** : The accepted answer to Adjusting vertical and horizonal spacing in \stackrel suggests (like Barbara below) to use `\strut` for each element. When using double spacing, however, this raises the characters way too high.               \documentclass{article}     \usepackage{amsmath,setspace}     \doublespacing     \begin{document}     h$\stackrel{\text{L}}{\strut{\text{a}}}$nd$\stackrel{\text{H}}{\strut{\text{l}}}$     \end{document}      ![enter image description here](http://i.stack.imgur.com/aNU5U.png)


title: Trying to create simple template for novice users

text: I am trying to create a simple template for students to create a one page abstract. The idea is that they just define their title, author, and abstract, and another file could actually have the main code that uses them. For example:               \title{A Very Simple \LaTeXe{} Template}     \author{author1 \and author2}     \abstract{     Long, drawn out abstract, blah, blah, blah.          }     \captionedimage {myimage.pdf}{caption text}     \captionedimage {myimage2.pdf}{caption text2}      In the second file would be the main document, including the first. Although I have never done anything like this, obviously if I want a new style the thing to do is write a new .sty and .cls file for the new style I want. Hypothetically, the main document could look like this ( I am using C preprocessor includes to illustrate what I'm going for)               #include "individualpage.tex"     \documentclass[12pt]{simpleabstract}          \begin{document}     \maketitle  %% Insert a bold title font at the top of the page          %% insert the abstract defined by the student here          %% if there is an image, insert it here          \end{document}      The first question is whether anything like this exists already, since I would rather not reinvent the wheel. I searched for templates for abstracts, but didn't even find a simple example of just a page I want, let alone a setup that would allow me to generate this page, and then alternately put many of them together. It's work, but I know I could mutate a document class to make the page look I want. However, before I try I would like to know that there isn't something that already exists to do this. Here is what I want the one page to look like: ![enter image description here](http://i.stack.imgur.com/9SWYT.png) The second question is how to automate taking two hundred of these and creating a single document of them. That would presumably take a different document style, one that has a title page, some introductory text, then a table of contents selected from the title of each abstract, and the abstract pages. It is primarily for this reason that I would rather not have the individual students embed the latex code that defines the document, but would rather have that in a separate file. If they embed their document style in a page, then to build the larger document I must wrap that in a larger document. I have tried to illustrate what I want to achieve using the C++ preprocessor to hook files together, and of course one way of implementing this is to use perl or some other text processing language to process these files in some way. But perhaps in my ignorance of LaTeX, I'm not aware that some facility like that already exists, hence this question: is there some standardized way to achieve this or will it require custom programming on my part?


title: A command to move forward to a specific (numbered) column?

text: Suppose I want a `\gotocolumn` command, with the following behavior: in a tabular with n or more columns, `\gotocolumn{n}` would expand to the shortest combination of `\\\` and `&` necessary to bring us forward into the n'th column. So for instance...   * In the first column of a table, `\gotocolumn{3}` would expand to `& &`.   * In the second column of a table, `\gotocolumn{3}` would expand to `&`.   * In the third column of a table, `\gotocolumn{3}` would expand to `\relax`.   * In the fourth or subsequent column of a table, `\gotocolumn{3}` would expand to `\\\ & &`. Has this been done? Could it be done? Thoughts on how?


title: biblatex: reference both by chapter and at the end of the book

text: I currently print my references after the end of each chapter, using:               \usepackage[backend=biber,         bibencoding=utf8,         refsection=chapter,         style=numeric,          firstinits=true,         isbn=false,         doi=true,         url=false,         clearlang=true     ]{biblatex}      and               \printbibliography[heading=subbibliography]      at the end of each chapter. I would like to have also a chapter at the end of the book with all cited references. How could I do ?


title: pgfgantt: Change Link style

text: I'm using the `pgfgantt` package to draw Gantt-Charts. Everything works except for one things: I can not change the style of the links. The documentation shows on page 29 the following example:               \begin{ganttchart}[vgrid, hgrid, link/.style={-latex, red}]{12}     \gantttitle{Title}{12} \\     \ganttbar{Task 1}{2}{3} \\     \ganttbar{Task 2}{2}{5} \\     \ganttbar{Task 3}{6}{11} \\     \ganttbar{Task 4}{8}{11}     \ganttlink[link type=s-s]{elem0}{elem1}     \ganttlink[link type=f-s]{elem1}{elem2}     \ganttlink[link type=f-f]{elem2}{elem3}     \end{ganttchart}      According to the documentation, this should lead to: ![Should be](http://i.stack.imgur.com/wJN9h.png) If I compile this code, I only get: ![Is](http://i.stack.imgur.com/jNpZN.png) I can put whatever style definition I want into the `link\\.style` but nothing works. What am I doing wrong?


title: ways to indicate commutativity and non-commutativity of a diagram when using xymatrix

text: I used the following code, but `\circlearrowleft` looks no good in this diagram. I would like to know if there is a better way to indicate the commutativity. Also, is there any way to indicate non-commutativity?               \begin{equation*}     \xymatrix@-1.75pc{     \overline{A} \ar[dd]_{\overline{F}_q}  &  &  \overline{A}_E         \ar[dd]^{\overline{F}_{q,E}} \ar[ll]_{\pi^{\ast}}  \\      & \circlearrowleft & \\     \overline{A}  & &  \overline{A}_E \ar[ll]^{\pi^{\ast}}     }     \end{equation}      ![enter image description here](http://i.stack.imgur.com/8vfXs.png)


title: How to write in .doc/.odf/.rtf and convert to .tex?

text: I'm using a typical word processor to write a book that I would like to later typeset with LaTeX. I've done some searching and there doesn't appear to be any easy way to do this. I've tried rtf2latex2e but that doesn't preserve italics and doesn't convert double quotes (`"`) to the LaTeX ```` and `''`. I don't have any math formulas or fancy text that needs taking care of. It's just normal text, and the sporadic italics. I don't want to preserve the styling of the original document, I only want the text to be formatted so that it can be easily `\include`d in a LaTeX file. Is there any way I can continue to write in a word processor and convert to .tex later?


title: tex4ht: reuse png images instead of creating new ones

text: I have a lot of PNG images in my document, which (the document) I'd like to convert to HTML using tex4ht (`htlatex`). Now the images need to be in EPS format, as `htlatex` uses DVI mode. So I run `convert foo.png foo.eps` before I run `htlatex`. When generating the HTML, tex4ht creates a new PNG out of these EPS images, although I have the original which could (should) be used instead. That would save me quite some time and space.               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{graphicx}     \begin{document}          \section{something}     \includegraphics[width=5cm]{mill}     \end{document}      (`mill.png` is from the ConTeXt distribution, but could be any PNG file.)


title: Space after et al. too big

text: I have a document as               \documentclass[12pt]{article}     \usepackage{natbib}     \bibpunct{(}{)}{,}{a}{}{;}     \makeatletter     \renewcommand*{\NAT@nmfmt}[1]{\textsc{#1}}     \makeatother          \begin{document}     According to \citeauthor{test01} space is important.          According to \citeauthor{test01}\ space is important.     \bibliographystyle{plainnat}     \bibliography{literature}     \end{document}      And a bib file as follows:               @misc{test01,            author = "Jim Jones and Arthur Miller and Jenny Carter",            title = "My title",            year = "1988"      }      In the resulting PDF the space after the et al. is as big as if a new sentence would begin: ![etal_output](http://i.stack.imgur.com/WgRoY.png) How can I tell Latex to automatically use a normal space there?


title: Using a custom bst file

text: I made a custom Master Bibliographic Style File (, `merlin.bs`) (, with all the source files from CTAN) using `makebst.tex`. But I don't know how to use it with these template files. Thanks for your help.


title: Refrence to a subsubsection of another chapter as hyperlink

text: I wanted to refer to a subsubsection in the text which is in another chapter, in a hyper-link manner. Applied code:               In **section~\ref{4.1.1.1}** required aspects for defining the minimum and maximum limit for gross error check are provided. Hence, for this research gross errors are those observations that lay outside the minimum of $3^\circ$C and maximum of 25^\circ$C.       Where Refereed subsubsection is presented:               **4.1.1.1 Data Cleaning: Gross Error Identication**     Plausible value check (Zahumensky and SHMI, 2004) is used to identify gross errors.


title: dot2texi: using macros inside labels affects sizing

text: ![enter image description here](http://i.stack.imgur.com/7OHSd.png) The two pictures here are generated by essentially the same code, but the LHS one uses more macros -- so for example the LHS has               \newcommand\fouriertransform[1]{\hat{#1}}     \newcommand\applyfn[2]{{#1}(#2)}     \newcommand\sumover[2]{\sum_{#1}#2}     \newcommand\conjugate[1]{\overline{#1}}          1 [label="\sumover{r}{\product{\conjugate{\applyfn{\fouriertransform{g}}{r}}}{\applyfn{\fouriertransform{f}}{r}}}"];      where the RHS has               1 [label="\sum_{r}{\overline{\hat{g}(r)}\hat{f}(r)}"];      For some bizarre reason this is affecting the sizing in the graph... I can't find anything in the dot2tex/dot2texi manuals. I'd be grateful for a fix/explanation. Code:               \documentclass[a4paper, landscape]{article}     \usepackage[autosize]{dot2texi}     \usepackage{tikz}     \usepackage{amsmath, amsfonts}     \usepackage{adjustbox}     \usetikzlibrary{shapes,arrows}          \newenvironment{fit}{\begin{adjustbox}{max width=\textwidth,max totalheight=\textheight,keepaspectratio}}{\end{adjustbox}}          \newcommand\expectation[2]{\mathbb{E}_{#1}#2}     \newcommand\power[2]{{#1}^{#2}}     \newcommand\add[2]{{#1}+{#2}}     \newcommand\addthree[3]{{#1}+{#2}+{#3}}     \newcommand\subtract[2]{{#1}-{#2}}     \newcommand\negative[1]{-{#1}}     \newcommand\product[2]{{#1}{#2}}     \newcommand\productthree[3]{{#1}{#2}{#3}}     \newcommand\deltafn[1]{\delta({#1})}     \newcommand\fouriertransform[1]{\hat{#1}}     \newcommand\applyfn[2]{{#1}(#2)}     \newcommand\sumover[2]{\sum_{#1}#2}     \newcommand\conjugate[1]{\overline{#1}}     \newcommand\two{2}          \begin{document}     \begin{fit}     \begin{dot2tex}[twopi,mathmode]     digraph G {     root=0;     overlap=prism;     node [shape="box"];     0 [label="\sumover{r}{\product{\applyfn{\fouriertransform{f}}{r}}{\conjugate{\applyfn{\fouriertransform{g}}{r}}}}"];     1 [label="\sumover{r}{\product{\conjugate{\applyfn{\fouriertransform{g}}{r}}}{\applyfn{\fouriertransform{f}}{r}}}"];     2 [label="\sumover{r}{\product{\expectation{x}{\product{\applyfn{f}{x}}{\power{\omega}{\negative{\product{r}{x}}}}}}{\conjugate{\applyfn{\fouriertransform{g}}{r}}}}"];     3 [label="\sumover{r}{\product{\expectation{x}{\product{\applyfn{\fouriertransform{f}}{x}}{\deltafn{\subtract{x}{r}}}}}{\conjugate{\applyfn{\fouriertransform{g}}{r}}}}"];     4 [label="\sumover{r}{\product{\applyfn{\fouriertransform{f}}{r}}{\conjugate{\expectation{x}{\product{\applyfn{g}{x}}{\power{\omega}{\negative{\product{r}{x}}}}}}}}"];     5 [label="\sumover{r}{\product{\applyfn{\fouriertransform{f}}{r}}{\conjugate{\expectation{x}{\product{\applyfn{\fouriertransform{g}}{x}}{\deltafn{\subtract{x}{r}}}}}}}"];     0 -> 1;     0 -> 2;     0 -> 3;     0 -> 4;     0 -> 5;     }     \end{dot2tex}     \end{fit}     \begin{fit}     \begin{dot2tex}[twopi,mathmode]     digraph G {     root=0;     overlap=prism;     node [shape="box"];     0 [label="\sum_{r}{\overline{\hat{f}(r)}\hat{g}(r)}"];     1 [label="\sum_{r}{\overline{\hat{g}(r)}\hat{f}(r)}"];     2 [label="\sum_{r}{\mathbb{E}_{x}{f(x){\omega}^{{-rx}}}\overline{\hat{g}(r)}}"];     3 [label="\sum_{r}{\mathbb{E}_{x}{\hat{f}(x)\delta(x-r)}\overline{\hat{g}(r)}}"];     4 [label="\sum_{r}{\hat{f}(r)\overline{\mathbb{E}_{x}{g(x){\omega}^{{-rx}}}}}"];     5 [label="\sum_{r}{\hat{f}(r)\overline{\mathbb{E}_{x}{\hat{g}(x)\delta(x-r)}}}"];     0 -> 1;     0 -> 2;     0 -> 3;     0 -> 4;     0 -> 5;     }     \end{dot2tex}     \end{fit}     \end{document}      [NB. the adjustbox is just o make everything fit on a page -- commenting it out doesn't fix things.]


title: TikZ: how to filldraw a graph

text: How to draw the attached graph using tikz? I do not know how to draw the shaded parts. Thanks. ![enter image description here](http://i.stack.imgur.com/LlDG3.jpg)


title: A table and a figure, with captions, in the same wide float in a two-column document?

text: I'm trying to place a figure and a table inside the same wide float so that they are positioned together within a two-column document. However, they also need separate captions (i.e. a figure caption and a table caption). I tried to wrap the table (`\begin{tabular}...\end{tabular}`) and the figure (`\begin{figure}...\end{figure}`) inside a `figure*`, but then I get a compilation error:               Float(s) lost.      And in the minimal example below, I get               LaTeX Error: Not in outer mode      as error.               \documentclass[twocolumn]{article}          \usepackage{lipsum}          \begin{document}     \begin{figure*}[t]       \centering       \begin{minipage}{\textwidth}         \begin{figure}           stuff           \caption{abc}         \end{figure}         \begin{tabular}           \begin{table}{c}             more stuff           \end{table}           \caption{abc}         \end{tabular}       \end{minipage}     \end{figure*}     \lipsum     \lipsum     \end{document}      Anyone know how to solve this?


title: How to force a label to be a given string?

text: Normally I issue a command like `\label{foo}`, and this means that foo gets entered into a symbol table somewhere that says that it equals 14, or xiv, or aa, or whatever. These symbols are generated and incremented automatically, and to change the numbering system, I can use packages like `alphalph`. Suppose I want to force foo to evaluate to some arbitrary string, such as "Socrates." E.g., I want something like `\mynameis{Socrates}\label{foo}`, and then when I say `\ref{foo}`, the result will not be "14" but "Socrates." I want to completely bypass the normal system involving counters. If Socrates is the name of a chapter, then I don't expect LaTeX to be smart enough to automatically name the next chapter Plato. So, e.g.:               \chapter{The life of Socrates}\mynameis{Socrates}\label{foo}     ...     \chapter{The life of Plato}\label{bar}     ...      This is an error on my part. It's OK with me if `bar` is set to garbage, or if LaTeX chokes, or if `bar` is set to some arbitrary string such as `Socrates2`. Is there some way to do this?


title: Best way to create this image, square and angle

text: I have just started looking into tikz, and trying to create the simple image below. I took a stab at it but could not quite do it. ![enter image description here](http://i.stack.imgur.com/osAWQ.png) ABCD is a square and E is the midpoint on DC and F is the midpoint of BC Ofcourse the labels should be a tad smaler, and closer to the actual figure. I am just trying to learn tikz, so a few examples how to create the image beautifuly would truly help me. Here is my attempt at it. Only using the simple tikzpackage. I had mainly two problems creating this image 1) How do one place points in tex, and anchor text to them? 2) How do one create the angle... I know it is some arc, but yeah               \begin{figure}[h!] \centering     \begin{tikzpicture}[scale=3]     \coordinate [label=left:\textcolor{blue}{$A$}] (A) at (0.,0);     \coordinate [label=right:\textcolor{blue}{$B$}] (B) at (1,0);     \coordinate [label=right:\textcolor{blue}{$C$}] (C) at (1,1);     \coordinate [label=left:\textcolor{blue}{$D$}] (D) at (0,1);     \draw (0,0) -- (1,0);      \draw (0,0) -- (0,1);     \draw (1,0) -- (1,1);     \draw (0,1) -- (1,1);     \draw (0,0) -- (1,0.5);     \draw (0,0) -- (0.5,1);          \end{tikzpicture}     \end{figure}      I also guess there is some simple way to do this, like a built in square command or something... ![My stab at creaing the square](http://i.stack.imgur.com/WLcFV.png)


title: Using biblatex to modify specific citation commands depending on reference type

text: I need to modify specific citation commands to use certain fields, and not others, depending on the type of reference being cited. Is there a way to do this using BibLaTeX (with a `bibtex` backend)? Specifically, I would like to redefine   * `\citeyearpar` for patents so that it prints just the patent number (and no parentheses), and   * `\citealp` for patents so that it prints the patent number with the abbreviated country name associated with the patent _type_ (from § 4.9.2.19 of the BibLaTeX documentation; e.g. "US") prepended (no space); and I would like to define some additional (helper) citations including   * `\citepatass` to print the assignee,   * `\citepatissue` to print the issue date, and   * `\citepatlabel` to a long identifying the issuing country, e.g. "U.S. Patent". For a variety of reasons I need to limit the citation commands I use (primarily) to the `natbib` commands (e.g. `\citep`, `\citet` and all the others listed in § 3.6.9 of the BibLaTeX documentation). Generally I will be using the `verbose` style for both citations and my bibliography. Additionally I'd like for citations of patents after the first to behave like the commands show the patent number rather than shortened verbose output. * * *               \documentclass[nobib]{tufte-handout}     \RequirePackage{xpatch}     % For the patches below     \RequirePackage{hyphenat}   % See -- http://code.google.com/p/tufte-latex/issues/detail?id=60     \RequirePackage[         backend=bibtex,          natbib=true,          bibstyle=verbose, citestyle=verbose,    % bibstyle extensively modifed below         doi=true, url=true,                     % excluded from citations below         citecounter=true, citetracker=true,         block=space,          backref=true, backrefstyle=two,         abbreviate=false            % Ideally, I'd like to abbreviate the patent locations, but nothing else     ]{biblatex}          % For tufte-like behavior (I never use \cite itself); see -- http://tex.stackexchange.com/a/47763/7844     % Not directly related to the question but included for completeness     \let\citep\footcite           % Some reordering and exclusions; see -- http://tex.stackexchange.com/q/46804/7844     % Not directly related to the question but included for completeness     \newbibmacro*{addendum+pubstate+pageref}{%         \usebibmacro{addendum+pubstate}%         \clearfield{addendum}%         \clearfield{pubstate}%         \setunit{\bibpagerefpunct}\newblock         \usebibmacro{pageref}%         \clearlist{pageref}%         \setunit{\adddot\par\nobreak}}          \xpretobibmacro{doi+eprint+url}{\usebibmacro{addendum+pubstate+pageref}}{}{}     \xpretobibmacro{eprint}{\usebibmacro{addendum+pubstate+pageref}}{}{}     \xpretobibmacro{url+urldate}{\usebibmacro{addendum+pubstate+pageref}}{}{}               % Better patent numbers, from -- http://tex.stackexchange.com/a/45584/7844     % Not directly related to the question but included for completeness     \def\mkcommasep#1#2#3#4#5#6{#1#2#3,#4#5#6}     \DeclareFieldFormat[patent]{number}{\mkcommasep#1}          \begin{filecontents}{\jobname.bib}     @book{edisonbook1,          author = {Edison, Thomas},          title = {I'm too busy inventing to write books},          year = {1920}}     @book{edisonbook2,          author = {Edison, Thomas},          title = {Another book I don't have the time to write},          year = {1921}}     @patent{edisonpatant1,         author = {Edison, Thomas},         title = {My first great invention},         type={patentus},location={countryus},         month = jan, year = {1911},         number = {266701}}     @patent{edisonpatant2,         author = {Edison, Thomas},         title = {A second fantastic invention},          type={patentus},location={countryus},         month = feb, year = {1912},         number = {266702}}     @patent{edisonpatant3,         author = {Edison, Thomas},         title = {A third remarkable contraption},            type={patentus},location={countryus},         month = mar, year = {1913},         number = {266703},         year = {1913}}     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     \subsection*{Some things that already work correctly}     This citation\citep{edisonpatant1} of an \citeauthor{edisonpatant1} patent works pretty much as desired. Note that I use \texttt{citep} to generate citations as footnotes. While other \texttt{natbib} citations commands do not.\footnote{This is necessary so that they can be used in footnotes. For example, citing \citealt{edisonpatant2} here embeds the verbose description; similarly for the author (\citeauthor{edisonpatant2}) or the year for a non-patent (\citeyear{edisonbook1})}.      \subsection*{Basic patent-related citation changes}     I'd like to use at least one of the basic \texttt{natbib} macros that do not produce verbose output to print the  \textit{patent number}, in place of its default behavior. For example, instead of the year, for \texttt{citeyear}, instead of "\citeyear{edisonpatant1,edisonpatant2,edisonpatant3}" I want to have "266,701; 266,7021; 266,703". Additionally I'd like to co-opt another command (perhaps  \texttt{citealp}) to work similarly, but prepend the type string, e.g. US 266,701; US 266,7021; US 266,703". I realize that there are issues with combining such output with the normal behavior of these macros, and am happy to accept an error if patents are combined with non-patents in a single such macro invocation.     \subsection*{Patent behavior for subsequent citations}     Finally, I'd like for citations of patents after the first to behave like the commands above: they should show the patent number\footnote{US 266,701} rather than the normal shortened verbose output\citep{edisonpatant1}.     \subsection*{But wait, there's more}     While I'm at it (and only because perhaps it's easier to do in context of these modifications), I'd like to abbreviate \textit{only} the location in the bibliography (even with \texttt{abbreviate=false} in the options to \texttt{biblatex}), and omit location entirely from citations.     \printbibliography     \end{document}


title: Can I save pasted image to last used directory in Lyx?

text: I save figures in ./fig folder. While every time I paste an image, the file dialog always opens ./ folder for me, then I have to select ./fig folder and rename the image file. Can I make it default to open ./fig everytime it saves image so that I don' t have to rename everytime?


title: first names in apacite citations

text: I've got a LaTeX document with two BiBTeX references, like so:               \documentclass{article}     \usepackage[natbibapa]{apacite}          \begin{filecontents}{mybib.bib}     @article{Hurd2011,     author = {Hurd, Michael and van Rooij, Maarten and Winter, Joachim},     doi = {10.1002/jae},     journal = {Journal of Applied Econometrics},     pages = {416--436},     title = {{Stock Market Expectations of Dutch Households}},     volume = {26},     year = {2011}     }     @article{Hurd2012,     author = {Hurd, Michael D. and Rohwedder, Susann},     journal = {NBER Working Paper},     number = {17973},     title = {{Stock Price Expectations and Stock Trading}},     url = {http://www.nber.org/papers/w17973},     year = {2012}     }     \end{filecontents}          \begin{document}          \begin{itemize}      \item \citet{Hurd2011}      \item \citet{Hurd2012}     \end{itemize}          \bibliographystyle{apacite}     \bibliography{mybib}          \end{document}      This produces the following list: ![reference list 1](http://i.stack.imgur.com/mb0eL.png) For some reason the first name of the first author appears in both citations. It shouldn't. What's weird is that when I remove the 2012 reference (removing the in-text citation will do) the remaining 2011 reference is displayed correctly: ![reference list 2](http://i.stack.imgur.com/FOdhv.png) Why is this so and how do I get both to display correctly when both are present?


title: What typesetting system should I use?

text: I have no experience with TeX or any other typesetting system. I am going to university soon and have been told that I should learn LaTeX as it will help with bibliographies and essay writing. I am also self employed and would like to generate invoices in the future. My original intention was just to learn LaTeX, however I found out about ConTeXt and now am a bit confused by the different options! What are the advantages and disadvantages of the different typesetting systems?


title: Problem with option "noclearpage" of \indexsetup, imakeidx

text: I'm using the package `imakeidx` in order to generate the _indexes_ for my document, but i get an issue when i use the option `noclearpage` being that the index is not **printed** (or it don't print all entries - _incomplete index_ ). I use this option to avoid the index in the next page `\clearpage`. ## Problem With               \indexsetup{level=\section,toclevel=section}      works perfect! but the index pass to the next page, and with               \indexsetup{level=\section,toclevel=section,noclearpage}      the _index_ is not printed. ## MWE               \documentclass{article}     \usepackage{imakeidx}     \indexsetup{level=\section,toclevel=section,noclearpage} %     \makeindex     \begin{document}     \tableofcontents     \section{F}     a\index{first}     b\index{second}     \section{G}     c\index{third} d\index{four}     \printindex     \end{document}      I don't understand what is the problem? ## Edit I tried to add the `nonewpage` option suggested in the first answer, but the problem worsens because not even the `.idx` file is generated inclusive after of run _repeatedly_ with `pdflatex` (Neither `pdflatex --enable-write18` nor `pdflatex -shell-escape` work) generating a _`.log`_ like (part)               ...          No file indexsetupproblem.ind.          Package imakeidx Warning: Remember to run (pdf)latex again after calling     (imakeidx)                `makeindex indexsetupproblem.idx'.          [1          {C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}     \indexentry{first}{1}     \indexentry{second}{1}     \indexentry{third}{1}     \indexentry{four}{1}     ]          ...      It seems that to add the `nonewpage` option inhibits definitely the creation of the `.idx` file (the file is created but _empty_ ).


title: Problem with Chapters in appendix mode not having a label

text: I have a main file where I include several chapters including a couple of appendices, like this:               \usepackage{appendix}     \begin{document}     ...          \include{chapter1}     \include{chapter2}     ...     \include{chapter7}          \backmatter          \include{appendixA}     \include{appendixB}      Inside the `appendixA.tex`, I have:               \appendix     \chapter{Appendix A: my Title}     \label{app:A}      When I reference `\ref{app:A}` I get the label               7.3.3      which is the label of the last subsection of the chapter before the Appendix A also, tables in the main sections appear as               Table 1      instead of:               Table A.1      It looks like the top level (chapter) numbering doesn't start at all, since the label refers to the last subsection. How do I make the appendix have a lable of its own? Thanks in advance


title: Encoding compilation problem with Bibtex Texmaker and LinuxMint

text: I had absolutely no problem until my last compilation, and I got no idea why I got this error now, because I didn't absolutely touch this line of code nor this page... Here is the error I get : `Package ucs Error: Unknown Unicode character 8239 = U+202F` and I tells me it's on the line 6 of my main page :               \documentclass[oneside,a4paper,12pt]{scrbook}          \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{tabularx}     \usepackage[a4paper,left=2cm,right=2cm,top=2.5cm,bottom=3cm]{geometry} %/!\ Au bottom     \usepackage{pdfpages}     \usepackage{hyperref}     \usepackage{microtype}     \usepackage{glossaries}     \usepackage{graphicx}     \usepackage{float}     \usepackage{chngcntr} % Permet d'utiliser "counterwithout"     \usepackage{fancyhdr}     \usepackage{listings} % Permet de faire des extraits de code     \usepackage{color}          \usepackage[french]{babel}          \definecolor{javared}{RGB}{42,0,255} % for strings     \definecolor{javagreen}{RGB}{63,127,95} % comments     \definecolor{javapurple}{RGB}{127,0,85} % keywords     \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc          \makeglossaries          \setkomafont{disposition}{\bfseries} % Permet de mettre la police par défaut aux titres de KomaScript          \makeatletter % Pour centrer les remerciements     \newcommand\sectioncentered{\@startsection{section}{1}{\z@}%       {-3.5ex \@plus -1ex \@minus -.2ex}%       {2.3ex \@plus.2ex}%       {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax         \setlength{\parfillskip}{\z@ plus 1fil}\fi         \centering\normalfont\sectfont\nobreak\size@section}%     }     \makeatother          \title{Rapport de stage}     \author{Dorian KURZAJ}     \date{Année Universitaire 2013 - 2014}          \setcounter{secnumdepth}{3} % Numérote les subsubsection     \pagestyle{plain} % Pour que les numéros de pages soit en bas          \counterwithout{figure}{chapter} % On enlève le numéro de chapitre aux numéros de figures          \loadglsentries{glossaire.tex}               \begin{document}     \frontmatter     \pagenumbering{Roman}     % Include la première de couverture     \includepdf[pages=-]{premiere}          % Page blanche numéroté : II     \null          % Avant textes numéroté en chiffres romains à la suite du II précédent     \include{remerciements}     \tableofcontents     \listoffigures     \printglossary          % Contenu du texte numéroté à partir de 1 en chiffres arabes     \mainmatter     \renewcommand*\chapterpagestyle{fancy} % Permet de mettre les en-têtes aux pages commencant un chapitre     %\renewcommand{\thesection}{\arabic{section}}     \include{introduction}     \include{presentation}     \include{cahierDesCharges}     \include{rapportTechnique}     \include{manuelUtilisation}     \include{rapportActivite}     \include{conclusion}          % Après textes numéroté en chiffres romains à partir de I     \appendix     \renewcommand*\chapterpagestyle{plain} % On remet par défaut (sans en-têtes) les pages de chapitre     \pagenumbering{Roman}     \include{biblio-sitographie}     \include{tableDesAnnexes}     \include{annexes}          \end{document}      But even when I try to copy/paste it in another text editor and back in TeXMaker I still got this unknown character ! Even by retyping it myself, I get the error ! It's unbelievable ! I even took an older version of my project which works fine, and copied its file to replace this one but the old file with my new project, makes the same error, so I believe it come from another page of my project. If someone got any idea, I'd really appreciate your help :)


title: Install font in latex results in invisible text when compiling with ‘latex’

text: I tried installing the nimbus font (http://tug.ctan.org/tex- archive/fonts/psfonts/urwvf/) in my local texmf tree by following the README provided with the package (and also on the website above). However, after installing and using the package, all characters are invisible in my document when I use 'latex' to compile the document. When I use 'pdflatex' it works. What could be the reason for it, not working with 'latex'?


title: Getting a value, which has been given to a TikZ key

text: I'm trying to write a package based on TikZ, and this is the problem i'm currently stumbling upon. Let's assume, that I have a key, for example **/tikz/circuit symbol unit** , which executes some code. I'm wandering if it is possible to get the value, which has been passed on to this key to use it somewhere else within my code? I want to use the value, which has been passed on to the **/tikz/circuit symbol unit** key to draw an arc of the appropriate radius in the foreground of the shape i've made. So instead of **\pgfpatharc{50}{130}{6pt}** i'd have something like this **\pgfpatharc{50}{130}{[some function to get the value passed to circuit symbol unit key]}** Here's the code for the shape - you can skip to the "Drawing the arc" section of the code, which is at the very end:                  % The measurement gate shape - rectangle with an arc inside        \pgfdeclareshape{meter}        {%               % All anchors are taken from the 'rectangle' shape:          \inheritsavedanchors[from={rectangle}]%          \inheritanchor[from={rectangle}]{center}%          \inheritanchor[from={rectangle}]{mid}%          \inheritanchor[from={rectangle}]{base}%          \inheritanchor[from={rectangle}]{north}%          \inheritanchor[from={rectangle}]{south}%          \inheritanchor[from={rectangle}]{west}%          \inheritanchor[from={rectangle}]{east}%          \inheritanchor[from={rectangle}]{mid west}%          \inheritanchor[from={rectangle}]{mid east}%          \inheritanchor[from={rectangle}]{base west}%          \inheritanchor[from={rectangle}]{base east}%          \inheritanchor[from={rectangle}]{north west}%          \inheritanchor[from={rectangle}]{south west}%          \inheritanchor[from={rectangle}]{north east}%          \inheritanchor[from={rectangle}]{south east}%          \inheritanchorborder[from={rectangle}]%               % Drawing a white background          \backgroundpath{          \pgfpathrectanglecorners{\southwest}{\northeast}          \pgfsetfillopacity{1}              \pgfsetfillcolor{white}              \pgfusepath{fill}          }                      \foregroundpath          {            % Drawing the rectangle              \pgfpathrectanglecorners          {\pgfpointadd{\southwest}          {\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}          {\pgfkeysvalueof{/pgf/outer ysep}}}}          {\pgfpointadd{\northeast}{\pgfpointscale{-1}          {\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}          {\pgfkeysvalueof{/pgf/outer ysep}}}}}                                  \northeast         \pgf@xa=\pgf@x         \pgf@ya=-\pgf@y             %        %            % Drawing the arc             \def\arcstart{\pgfpoint{.8\pgf@xa}{.7\pgf@ya}}        \pgfpathmoveto{\arcstart}                 %        %        % This is the line i'm interested in - how do i put in the value passed on to        % /tikz/circuit symbol unit key instead of 6pt. It should be something like        % \pgfpatharc{50}{130}{some function to get the value passed to circuit symbol unit}        \pgfpatharc{50}{130}{6pt}                  }


title: How do I display a slightly long equation in one line?

text: I want to write the following in one line               \documentclass{article}     \usepackage{amsmath}     \begin{document}           $\left |\hspace{0.1cm}\int \limits_{\Omega_1 \times \Omega_2 \times \cdots \times \Omega_{n-1}}\left|\int_{\Omega_n}\overline{f_{x_1, \cdots ,x_{n-1}}}e_{nj_n}\,d{\mu_n}\right|^2\,d{(\mu_1 \times \cdots \times \mu_{n-1})}\right|\leq\left|\hspace{0.1cm}\int \limits_{\Omega_1 \times \Omega_2 \times \cdots \times \Omega_{n-1}} \int_{\Omega_n}\left( \overline{f_{x_1, \cdots ,x_{n-1}}}\right)^2. 1\,d{\mu_n}\,d{(\mu_1 \times \cdots \times \mu_{n-1})}\right|$          \end{document}      Is there any way?


title: Why is my paper shorter in LaTeX than in Libreoffice?

text: I typeset the same paper in Libreoffice and in LaTex. Both were in the same font and used the same (MLA) format. Why is the LaTeX version produce a PDF that is a few lines shorter?


title: Inserting graphics into asymptote or pgfplots

text: How another graphics can be inserted into Asymptote or pgfplots? The following is a MWE in pgfplots that creates three figures in the document. The main figure which I want to insert graphics in is a pgfplot graphics and the other two are a vector or a raster graphics.               \documentclass{article}     \usepackage{pgfplots}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{graphicx}          \pgfplotsset{compat=newest}          \begin{document}     Figure 1 is the main figure that will be used for the insertion of a vector or a raster graphics.     \begin{figure}         \begin{tikzpicture}             \begin{axis}[                 colormap={bw}{gray(0cm)=(0); gray(1cm)=(1)}]             \addplot+[scatter,only marks,                  domain=0:8,samples=100]                 {exp(x)};             \end{axis}         \end{tikzpicture}         \caption{This is the main figure.}     \end{figure}          Figure 2 is a graphics which I want to be inside figure 1, which is a vector graphics. I want to place it in the upper left corner position.     \begin{figure}         \begin{tikzpicture}             \begin{axis}[colormap/bluered]             \addplot+[scatter,                  scatter src=x,samples=50]                 {sin(deg(x))};             \end{axis}         \end{tikzpicture}         \caption{This figure needs to be inside figure 1.}     \end{figure}          Figure 3 is another graphics which I want to be placed inside figure 1 in the upper left corner.     \begin{figure}         \includegraphics[width=\linewidth]{piv.jpg}         \caption{This figure needs to be inside figure 1}.         \end{figure}          \end{document}      This is figure 1, which is a pgfplots graphics. ![This is figure 1](http://i.stack.imgur.com/vLF4X.jpg) This is figure 2, which is a pgfplots graphics. ![This is figure 2](http://i.stack.imgur.com/ftSEz.jpg) This is figure 3, which is a jpg image. ![This is figure 3](http://i.stack.imgur.com/1GVnM.jpg) This is combined figure 1 and figure 2. Figure 2 is placed inside figure 1 in the upper left corner. I would like this figure to be a vector graphics ![This is combined figure 1 and figure 2](http://i.stack.imgur.com/wHtjU.jpg) This is combined figure 1 and figure 3. Figure 3 is placed inside figure 1 in the upper left corner. I would like figure 1 to be still a vector graphics. ![This is combined figure 1 and figure 3](http://i.stack.imgur.com/5nLeG.jpg) I would be thankful if someone could help me how I can insert other vector graphics as well as raster graphics in Asymptote and pgfplots.