title: How can I place conditional statements in a LaTeX file dependant on how I'm processing it?

text: > **Possible Duplicate:**   >  Detect which TeX engine is used   >  Conditional typesetting / build I'm currently writing a document in LaTeX (using the `article` `documentclass` for now, thinking about switching to `memoir` later on). I'm using the `navigator` package to generate additional meta-fields in the resulting `pdf` and I use `pdflatex` to generate my PDF. However, when I use `latex` to generate a `.dvi` I do get errors because the meta-fields for `pdf` don't make sense now. How can I put some conditional statements in the file so that certain sections would be included or excluded depending on what command is used to generate (or what target format is being generated)? Here are the statements that now I have to manually comment out to compile my document with `latex`.               \usepackage{navigator}     \setparameter navigator:     author = Andy     title = Agile     \par      If this is a FAQ/stupid question please point me in the right direction.


title: A flag to switch between simple and full mode

text: > **Possible Duplicate:**   >  How to write hidden notes in a LaTeX file?   >  Conditional typesetting / build Is it possible to add a flag (variable) in my `.tex` file, so that I can switch among two modes: a light version and a full version? The text which is supposed to be displayed in full mode could be wrapped in an environment:               ... flag ...     \begin{fullmode}     ...     \end{fullmode}       So when `flag` is 0, the text wrapped in `fullmode` is hidden in the pdf file generated; while `flag` is 1, the text wrapped in `fullmode` is displayed ... Does anyone know how to realize that?


title: Detect which TeX engine is used

text: How can I detect inside a TeX file which engine (`pdftex`/`xetex`/`luatex`) is used to compile the file? Is there a LaTeX package that provides this functionality?


title: Testing if XeTeX is being used

text: I'm writing a package. One of its options is supposed to do some font selection. However, the commands it uses are XeTeX-specific, as far as I know: `\newfontfamily`, `\setromanfont` and so forth. So I would like to tell LaTeX to execute those commands only if XeTeX is compiling. How do I do that?


title: Can I use" \iffalse ... \fi" to solve this problem?

text: > **Possible Duplicate:**   >  How to write hidden notes in a LaTeX file?               \documentclass{article}          \def\hide{\iffalse}          \def\show{\hi}          \begin{document}          111111          \hide          222222          \show          333333          \hide          444444          \show          555555          \end{document}


title: Include subsections depending on variables/ifthen

text: I am making a template for several books. I have a mainfile which includes the .tex files for my chapters. For each book, some chapters are always almost the same except for a few subsections. How can I define a macro or something to only include this subsection under a specific condition? It should be like this pseudo code:                 type=(A,C) <-- defined at the beginning of each book            \chapter{blabla}            if type=B, include: \section{first}        \section{second} <-- this is included always       if type=B,C, include: \section{third}       if type=A, include: \section{fourth}      so only sections second, third and fourth would appear in this particular case. Any idea how to realize that?


title: How to write hidden notes in a LaTeX file?

text: How can I write notes in a LaTeX file, that don't appear in the PDF file?


title: How to define a if-condition?

text: I found several entries about the fact that the `ifthen` package is obsolete. So my question is: how to define a condition check then? I have searched and I find several example for `ifthenelse` (contained in the `ifthen`) package OR the statement _"ifthen package is obsolete"_.


title: Homework generation

text: > **Possible Duplicate:**   >  Conditional typesetting / build I have a database of LaTeX homework questions like this:               question1          question2          question3          etc      Is it possible to create a flag to select questions? Example:               flag question1          question2          flag question2          flag question3


title: Compile full project in main folder and partial chapters in subfolders

text: I have a project like this               Project/       MakeFile       main.tex       bibliography.bib       Chapter_1/         file.tex         figs/       Chapter_2/         file.tex         figs/       ...       Chapter_n/         file.tex         figs/      When compiling, I would like to aggregate all the chapters into a single two- column pdf in 'Project', and at the same time generate individual pdfs files in each 'Chapter_i'. I'm guessing this shouldn't be too complicated. Any help would be appreciated. Thanks.


title: Can LaTeX create graphics with mathematical curves?

text: I am trying to see how good LaTeX is. Can someone show me whether graphics like this. Thank you due to copyright complains removed the figure.


title: ConTeXt: Define word space dimensions

text: How would you define the length of a common word space? The word space length ConTeXt uses by itself is okay on the longer end, but way too short on the most compressed end. The wiki entry for `\setuptolerance` suggests changing word spaces with:               \spaceskip .5em plus .25em minus .25em      So it sounds like there is a way to define the mean length, as well as maximum deviations for word spaces. How would I use that setting throughout my document as the default word space?


title: Date on the bottom of the page without drafting option in ClassicThesis

text: I'm using `classicthesis` to write my document. I don't use the option `drafting` but I can see on the bottom of the page the date (there is a part of the date that is not readable, but when I copy and paste this part I obtain `[ December 1, 2011 at 20:50 ]`). This is my code:               \documentclass[a4paper]{scrreprt}   % classe report di KOMA-Script          \usepackage[english]{babel}     % Per scrivere in inglese     \usepackage[T1]{fontenc}        % Imposta la codifica dei font     \usepackage[utf8]{inputenc}     % Lettere accentate da tastiera     \usepackage{classicthesis-preamble} % Preambolo classicthesis     \usepackage{classicthesis}      % Classicthesis          \begin{document}          \input{Chapters/0_Introduction}     [...]          \end{document}      I would like to avoid this little issue. I use TeXworks in Windows7 x64.


title: TikZ: How to draw an helicoid and fill area below curve

text: I am trying to draw an helicoid and to fill the area below the curve. Since the aim of the figure is just to "give an idea", I would prefer to keep it simple and to avoid using `PGFplots` and `GNUplot` \-- with which I am not familiar. Referring to the MWE below, I drew the curve and the shading, but the latter does not seem right for negative values of `x`, i.e. the horizontal direction. Thus I am asking how to make it right. Moreover, I would like to draw lines starting from the axis of the helicoid, i.e. the `z` axis in TikZ coordinate system, to the corresponding point on the helicoid itself. The piece of code I commented out should serve this purpose, but it does not work as it is now. Can someone help me?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{intersections}     \begin{document}     \begin{tikzpicture}       \draw [name path=E-wave] [red,thick,->] plot [domain=0:13,samples=100] ({sin(\x r)},{cos(\x r)},\x);       \fill [red,fill opacity=0.2] (0,0,0) -- plot [domain=0:13,samples=100] ({sin(\x r)},{cos(\x r)},\x) -- (0,0,13) -- cycle;       %\foreach [evaluate={\xpos=1.1*sin(\zpos*180/pi);\ypos=1.1*cos(\zpos*180/pi);}] \zpos in {0,0.25*pi,...,4*pi} {       %  \path [name path=mgntd] (0,0,\zpos) --  (\xpos,\ypos,\zpos);       %  \draw [name intersections={of=E-wave and mgntd,by={isect\zpos}}] (0,0,\zpos) -- (isect\zpos);       %}       \draw [->] (0,0,0) -- (0,0,14.5);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/j67B8.jpg)


title: Changing ToC subsection entry font in scrartcl

text: I have changed the default serif font of my document to use old-style numerals (I think they look quite nice). However, in the serif entries of the subsections (section entries are in a sans-serif font) in the table of contents, the old-style numerals are quite strange as section and page numbers. I would like to change them to the "normal" numerals. I can set the section entry font with `\setkomafont{sectionentry}` and `\setkomafont{sectionentrypagenumber}`, but there is no such facility for other entries, and setting the font in the block around `\tableofcontents` doesn't help either. How could I achive the effect I desire? **EDIT** Here is a MWE.               \documentclass{scrartcl}          \usepackage{fontspec}     \setmainfont[Numbers=OldStyle,Mapping=tex-text]{Linux Libertine}     \setsansfont[Mapping=tex-text]{Linux Biolinum}     \newfontfamily\NoOldStyleNumsSerif[Mapping=tex-text]{Linux Libertine}          \begin{document}          {\NoOldStyleNumsSerif \tableofcontents}          \section{foo}          \subsection{bar}          Some text 0123456789          \end{document}      Notice that the page number is still rendered with old-style numerals: ![Example rendering](http://i.stack.imgur.com/SfqDM.png)


title: Drawing a proper shadow for overlapping objects

text: I draw images that are composed of several overlapping nodes. If I add a `drop shadow` to each node, the shadow of the second node is drawn over the first node, as seen in the picture below (which consist of two `cylinder` nodes drawn from bottom to top, each with a shadow): ![example](http://i.stack.imgur.com/TIBte.png) (Thanks to zeroth for providing the image in reply to this related question. ) The documentation to TikZ states it clearly: You can apply a shadow only to a path, but not to a scope. The workaround I'm using is this:   * Create a `\foreach` loop that loops over `{drop shadow,}`, thus assigning first `drop shadow`, then the empty string to a macro, say, `\s`   * Use `\s` for the options of every node. (Perhaps I could append `\s` to `every node` and `every path`, didn't try that yet.) Of course the image is drawn twice in the resulting PDF, which somewhat affects rendering speed and perhaps the size of the resulting PDF. In addition, the resulting code is rather ugly. My questions are:   1. Is there a clean way of achieving the desired result using a TikZ/pgf feature? Perhaps it is possible to turn a sequence of TikZ/pgf commands into a single path?   2. If not:      * Is it possible to add some style parameters to nodes and paths in the first pass so that the details of the image are not rendered when drawing the shadow?     * Would it be technically feasible to implement an environment `shadowgroup` that would hide the complexity and ugliness behind that?


title: How to generate a PDF/E with pdflatex?

text: I'm interested to generate a PDF/E subset file with pdflatex. I know the pdfx package, but it's only works with PDF/A and PDF/X.


title: Figures and Tables 'push down' text in the right column

text: When I use the IEEE two-column latex template, sometimes the text in the right column does not start at the top, but gets 'pushed down'. This happens sometimes when adding figures or table. A similar problem was already discussed HERE in this forum My problem just occurs with specific text length and figure sizes. My usual solution is to vary those parameter until everything fits. Has anybody got a 'real' solution? Here are example files which show the problem: http://dl.dropbox.com/u/25824831/misalignment.tex http://dl.dropbox.com/u/25824831/IEEEtran.cls


title: (Lyx) How to add a graphic to titlepage

text: I'm using mostly standard setting, artlcle class, custom=titlepage. I generate a separate titlepage, and separate abstract page. I would like to add a graphic to the titlepage, either between title and author, or below author. How do I do this with Lyx?


title: How to paramerize a tikz chain picture with list of nodes

text: I want to draw several tikz picture like these ones, but with different numbers of nodes in each row and arrows between the top and bottom row between different nodes. e.g ![parallel chains](http://i.stack.imgur.com/823L6.png) and ![another parallel chain](http://i.stack.imgur.com/6OVcq.png) etc. I want to create a macro, that I can reuse for every drawing. For example that is parametrized with 3 lists, 2 lists listing the nodes in the top and bottom rows e.g. [h_0,h_1,h_2], [h'_0,h'_1] and one that is a list of pairs [(h_0,h'_0), (h_2,h'_1)] - so the macro will draw the two chains and then draw an arrow between the node in the top row and the node in the bottom row for each of the given pairs. I am quite a Latex beginner and I am unsure really where to start or what is a reasonable way in Latex to approach this sort of parametrization and iteration. This is the markup I used to draw the above diagram:               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{arrows,chains,scopes}          \begin{document}     \begin{tikzpicture}      {[node distance=0.4cm,       start chain=going right,       every join/.style=->]      \node [on chain] (start) {$h_0$};      \node [on chain,join] {$h_1$};      \node [on chain,join] {$h_2$};      \node [on chain,join] (C1) {$h_3$};            \node [on chain, below=1cm of start] (start) {$h_0'$};      \node [on chain,join] {$h_1'$};      \node [on chain,join] {$h_2'$};      \node [on chain,join] {$h_3'$};       \node [on chain,join] (C2) {$h_4'$};            \draw[thick,<->] (C1.south east)--(C2.north west);     }     \end{tikzpicture}          \end{document}


title: How can i create volume and number in the custom bst file ? (Latex)

text: I started modifying my osajnl.bst file. (http://www.opticsinfobase.org/submit/templates/wordwp/osajnl.bst) I want to modify the .bst file. There is a big problem as following. I need to get the citation style like **1** (2). In this OSA bst file, i can get volume **1** , but i do not have volume+number **1** (2)!! How can i change the original OSA file to get the proper citation style ? Thanks for your help.


title: Package flashmovie removed from TeX Live?

text: Since my last update of Tex Live (10 days ago), the package `flashmovie` has been removed from TeX Live repository. I'm wondering if it is intentional? Does any one have an idea? It is sort of annoying: after the update this morning, all the users of my team (20 persons) get compilation errors ...


title: Tagging for PSFrag

text: What programs do people use to put their tags on ready to be replaced by psfrag? I've tried inkscape but if I write in the text "hello" say with inkscape then export as eps PSfrag doesn't seem to replace the tags I added (although it does replace tags I put on in Mathematica). Is there a better graphics program out there for doing this tagging?


title: Font and Style considerations for business reporting

text: I read through this question on general considerations about using LaTeX for business reporting. I am interested in any advice on how to style LaTeX appropriately for business type reports. For example, at the moment I am writing a scope of work description for a company and I am feel that the document looks more like an academic paper, rather than a formal business document. Are there packages or templates out there that can help with such a layout?


title: insert MAPLE algorithm to LaTeX

text: I am writing my dissertation through LaTeX, and I want to insert the code from MAPLE, it is about 2 pages and I am not sure how to include the algorithm, do you have any idea how am I going to do it?


title: Automatically center array of images inside table cell

text: I have this kind of table:               \begin{tabular}{p{0.5\textwidth}|p{0.5\textwidth}}     caption1 & caption2 \\     \includegraphics[params]{path11} \includegraphics[params]{path12} ... \includegraphics[params]{path1N} & \includegraphics[params]{path21} \includegraphics[params]{path22} ... \includegraphics[params]{path2N} \\      \end{tabular}      I want images to be like array, but they should consider column width and make new row of images automatically if there is no room. all images should be placed equally with margins so they don't touch each other.


title: Referencing part of a book that's by multiple authors, but not in an edited collection

text: I need to add a bibliographic reference to a section of a book in bibtex, which is a paper with its own title, by a single author, but in a book that's written by four authors, and not an edited collection. In an edited collection, I would use @incollection, and put down the author of the paper, and the editor of the collection. But in this case, the book has four authors and no editor. It's a collaboration in which each author has written a separate paper, and then a separate response to the other authors. This means I need a separate field for the book authors (which needs to contain all four names), and for the paper author (which needs to contain just the author who wrote this particular paper). I can't use @inbook, since this only has one author field, for the book as a whole. If I put put in all four book author names, it looks as if I am mean to imply that the claims I am citing are endorsed by all of them, and that would be misleading. If I only put the name of the author who wrote the particular chapter I want to cite, it gives the impression that one author wrote the whole book, failing to credit the others for their roles in authoring the book. And I can't use @incollection, because this means I either have to ignore the other authors completely, and leave the editor field blank (which again fails to credit the other authors for their part in the book), or else I would have to put the other authors (misleadingly) in the editor field (they did not edit the collection, they authored the other parts of the book, which is not the same thing). I couldn't put all four names in the author field, since this would once again give the impression that the claims I am attributing to one author are equally endorsed by the others, and that would be misleading too. Is there any way to add a separate field for book authors and chapter authors?


title: Beamer, alltt environment and \only

text: I have got the following problem using an `alltt` environment in a beamer document. I placed an `alltt` environment inside a block environment. Then all line breaks are correct in the output document. But if I enclose the block with an `\only` command, the line breaks in the `alltt` environment are removed. How can I remove this problem? A minimal example is:               \documentclass{beamer}          \usepackage[utf8x]{inputenc}     \usepackage{default}     \usepackage{xcolor}     \usepackage{alltt}          \begin{document}     \begin{frame}[t,fragile]     This text should be on all 3 overlays.     \only<1,2>{     \begin{block}<1,2>{}     \footnotesize     \begin{alltt}     [user@{\color{red}nodeXX} ~]\$ {\color{blue}module load comp/gcc/4.5.1}     [user@{\color{red}nodeXX} ~]\$ {\color{blue}module load mpi/openmpi/1.6.0}     [user@{\color{red}nodeXX} ~]\$ {\color{blue}mpirun ./prgm}     \end{alltt}     \end{block}     \begin{block}<2>{}     Next Step...     \end{block}     }     \begin{block}<3>{}     This block is shown next directly below the text.       \end{block}          \end{frame}     \end{document}      If the \only is commented out, the alltt environment creates the lines breaks but block 3 is at the bottom of the page.


title: Editing Biblatex BibliographyDriver @online: using \iffieldundef and using different languages

text: I just started using LaTeX some weeks ago and I'm getting better and better. But now as I try to make up my own `.bbx` style for `biblatex` I'm at a point where I'm stuck: I'm having trouble editing the `online` Driver for the bibliography to fit my needs. I want to mention, if the article I found online also was published in a book or journal. This is how I got so far:                \DeclareBibliographyDriver{online}{%        \usebibmacro{bibindex}%        \usebibmacro{begentry}%        \usebibmacro{author/editor+others/translator+others}%        \setunit{\labelnamepunct}\newblock        \usebibmacro{title}%        \newunit        \printlist{language}%        \newunit\newblock        \usebibmacro{url+urldate}%        \usebibmacro{addendum+pubstate}%        \setunit{\addspace}%        \iffieldundef{crossref}{}{\usebibmacro{in:}}%        \usebibmacro{bybookauthor}%        \setunit*{\addslash} \newblock        \usebibmacro{byeditor+others}%        \setunit{\addcolon\space}\newblock        \usebibmacro{maintitle+booktitle}%        \newunit\newblock        \usebibmacro{journal+issuetitle}%        \printfield{edition}%        \newunit\newblock        \printfield{note}%        \newunit\newblock        \usebibmacro{publisher+location+date}%        \newunit\newblock        \usebibmacro{chapter+pages}%        \newunit\newblock        \iftoggle{bbx:isbn}        {\printfield{isbn}}        {}%        \newunit\newblock        \printfield{doi}%        \newunit\newblock        \printfield{eprint}%        \usebibmacro{finentry}}      As you see I tried working with `\iffieldundef{crossref}`, so that whenever the `field{crossref}` is defined the `bibmacro{in:}` is shown and left out if the field is not defined. But with the definition above it doesn't print “In:” at all! Also I would like to modify the text that is printed by `bibmacro{in:}`. For example if `field{crossref}` is defined using english:                  Huber, Gerald (2013): Having trouble with biblatex. www.goforlatex.com.         [Visited on 02/19/2013] **Also in**: Jacobs, Daniel (ed.) (2013):         Solvingall the biblatex problems. Vienna: Latex University Press, pp. 1-999.      on the other hand using german:                  Huber, Gerald (2013): Having trouble with biblatex. www.goforlatex.com.         [Besucht am 19.2.2013] **Auch in**: Jacobs, Daniel (ed.) (2013): Solving all         the biblatex problems. Vienna: Latex University Press, S. 1-999.      No `field{crossref}` should simply result in:                  Huber, Gerald (2013): Having trouble with biblatex. www.goforlatex.com.         [Visited on 02/19/2013]      So on the one hand I need to make the `bibmacro{in:}` dependent on the `field{crossref}` and modify it to show “Also in:” when using english or “Auch in:” when using german. I don't know wheter or not it was a good idea trying to solve the first problem with `\iffieldundef` and concerning the language problem, I have no idea where to start. So I'm reaching out for your help, big cyberspace-(bib)latex-community. Here I have an example of what I have so far:               \documentclass[a4paper,12pt]{scrreprt}          \usepackage[ngerman]{babel}           \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}      \usepackage[babel]{csquotes}          %%%bibliography entries     \begin{filecontents}{literatur.bib}          @online{huber.12o,%         author = {1 Crossref},         title = {Having trouble with biblatex},         year = {2013},         url = {www.goforlatex.com},          urldate = {2013-02-19},         crossref = {huber.12},         }          @article{huber.12,%         author = {1 Crossref},         title = {Having trouble with biblatex},         year = {2013},         journal = {The Great Biblatex Journal},         volume = {3},         number = {11},         pages = {1-999},         }          @online{huber.13o,%         author = {2 Crossref},         title = {Having trouble with biblatex},         year = {2013},         url = {www.goforlatex.com},          urldate = {2013-02-19},         crossref = {huber.13},         }             @inbook{huber.13,%         crossref = {jacobs.13},         title = {Having trouble with biblatex},         author = {2 crossref},         pages = {1--999},         year = {2013},          }          @book{jacobs.13,%         editor = {Daniel Jacobs},         year = {2013},         address = {Vienna},         publisher = {Latex University Press},         title = {Solving all the Latex problems},         edition = {5}         }          @online{nocrossref,%         author = {Crossref No},         title = {Some articles are just available in the www},         url = {www.whereisthecross.com},         urldate = {2013-02-19},         year = {2013},         }     \end{filecontents}          \usepackage[citestyle=authoryear,bibstyle=authoryear,sorting=nyt,maxbibnames=3,bibencoding=utf8,backend=biber]{biblatex}           %%% here is where it gets interesting...           \DeclareBibliographyDriver{online}{%         \usebibmacro{bibindex}%         \usebibmacro{begentry}%         \usebibmacro{author/editor+others/translator+others}%         \setunit{\labelnamepunct}\newblock         \usebibmacro{title}%         \newunit         \printlist{language}%         \newunit\newblock         \usebibmacro{url+urldate}%         \usebibmacro{addendum+pubstate}%         \setunit{\addspace}%         \iffieldundef{crossref}{}{\usebibmacro{in:}}%         \usebibmacro{bybookauthor}%         \setunit*{\addslash} \newblock         \usebibmacro{byeditor+others}%         \setunit{\addcolon\space}\newblock         \usebibmacro{maintitle+booktitle}%         \newunit\newblock         \usebibmacro{journal+issuetitle}%         \printfield{edition}%         \newunit\newblock         \printfield{note}%         \newunit\newblock         \usebibmacro{publisher+location+date}%         \newunit\newblock         \usebibmacro{chapter+pages}%         \newunit\newblock         \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%         \newunit\newblock         \printfield{doi}%         \newunit\newblock         \printfield{eprint}%         \usebibmacro{finentry}}          \bibliography{literatur.bib}          \begin{document}          \nocite{huber.12o}     \nocite{huber.13o}     \nocite{nocrossref}          \printbibliography          \end{document}      Hope someone can help me out, any hint is appreciated...


title: Problem with psfrag + fncychap in TeXLive 2013

text: I am working with psfrag to do my plots and fncychap to have nice chapter titles. Please check the **minimal example** : http://solidosunalmzl.wikispaces.com/file/view/minimal_example.zip/519340810/minimal_example.zip When I compile it with LATEX->DVIPS->PS2PDF, in TeXLive 2009, MikTeX 2009 I get the correct result: ![](http://s21.postimg.org/vqfda9vs7/tl2009.png) However, when I compile my .tex files with LATEX->DVIPS->PS2PDF, in TeXLive 20013, the resulting PS and PDF files do not render well the PSFRAG-ged pictures. That is: ![](http://s27.postimg.org/7whqie82b/tl2013.png\]) Look that all the text is shifted to the right!!! I have noticed that this error is produced by an incompatibility between psfrag and fncychap. I have to stick to PSFRAG because I am writing a book with hundreds of PSFRAGged pictures. All pics suffer the same problem. Any clue? Thank you very much, Diego


title: Solution for typesetting interviews in LaTeX?

text: Are there any packages for typesetting interviews in LaTeX? Of course, I could manually format all the text but I am sure that there are typographical rules for interview sections that I would probably miss.


title: Why the renewcommand doesn't work as I expect?

text: I re-defined two environment               \newtheorem{exmp}{Example}     \newenvironment{examp}{\begin{exmp}}{\renewcommand{\proofname}{Sol.}\end{exmp}}     \newenvironment{pf}{\begin{proof}}{\renewcommand{\proofname}{Proof}\end{proof}}      to make sure that when the proofname which is **right after the`examp` environment** should change to **Solution** , while keep it be **Proof** for other environment(THEOREM, Lemma and so on). But it seems that it is not worked as I expected. WHY?


title: Can eledmac's xxref be used with non-arabic linenumbers?

text: I am using polyglossia and eledmac to typeset a Tibetan document. I'm running into problems when using eledmac's xxref. It seems the numbers it expects are not in the right format, since they are changed by polyglossia into Tibetan numerals. For example, the following document does not compile properly after the second run of xelatex on it (the first two runs actually work well):               \documentclass{article}          \usepackage{polyglossia}     \setdefaultlanguage{tibetan}     \setotherlanguage{english}          \usepackage{fontspec}     \newfontfamily\tibetanfont[Script=Tibetan,Scale=1.3]{Tibetan Machine Uni}          \usepackage{eledmac}     \firstlinenum{1}     \linenumincrement{1}          \listfiles          \begin{document}     \begin{tibetan}     \beginnumbering     \pstart     ཀ་ \edlabel{start}ཁ་ ག་ ང།      \pend          \pstart     ཅ་ \edlabel{end}\edtext{ཆ་}{\lemma{ཁ་...ཆ་}\xxref{start}{end}\Afootnote{འོ་ན།}} ཇ་ ཉ།     \pend     \endnumbering     \end{tibetan}     \end{document}      The error message I get is this (the example above is in a file called test.tex):               Section 1 (./test.1)     ! Missing number, treated as zero.     <to be read again>                         ༡     l.25 \pend      And the file test.1 contains:               \@l[1][༡]     \@lab     \@l[1][༡]     \@lab     \@ref[3][     ]      I suppose that the problem is that xxref somehow sees a tibetan numeral, which I suppose is due to polyglossia changing the numbering system. So my question is:   1. Can I do something to make polyglossia not change the numbering system, or otherwise   2. how could I set up eledmac to accept these linenumbers as arguments? If I switch the default and other language, the document compiles nicely. I.e.:               \setdefaultlanguage{english}     \setotherlanguage{tibetan}      In this case the line numbers are Arabic numerals. And, fyi, the packages loaded here:                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     polyglossia.sty    2013/06/27 v1.33.4 Babel replacement for XeLaTeX and LuaTeX     etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     makecmds.sty    2009/09/03 v1.0a extra command making commands      xkeyval.sty    2012/10/14 v2.6b package option processing (HA)      xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)     fontspec.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX        expl3.sty    2014/01/07 v4646 L3 Experimental code bundle wrapper      l3names.sty    2014/01/04 v4640 L3 Namespace for primitives     l3bootstrap.sty    2014/01/04 v4640 L3 Experimental bootstrap code     l3basics.sty    2014/01/04 v4642 L3 Basic definitions      l3expan.sty    2014/01/04 v4642 L3 Argument expansion         l3tl.sty    2013/12/27 v4625 L3 Token lists        l3seq.sty    2013/12/14 v4623 L3 Sequences and stacks        l3int.sty    2013/08/02 v4583 L3 Integers      l3quark.sty    2013/12/14 v4623 L3 Quarks        l3prg.sty    2014/01/04 v4642 L3 Control structures      l3clist.sty    2013/07/28 v4581 L3 Comma separated lists      l3token.sty    2013/08/25 v4587 L3 Experimental token manipulation       l3prop.sty    2013/12/14 v4623 L3 Property lists        l3msg.sty    2013/07/28 v4581 L3 Messages       l3file.sty    2013/10/13 v4596 L3 File and I/O operations       l3skip.sty    2013/07/28 v4581 L3 Dimensions and skips       l3keys.sty    2013/12/08 v4614 L3 Experimental key-value interfaces         l3fp.sty    2014/01/04 v4642 L3 Floating points        l3box.sty    2013/07/28 v4581 L3 Experimental boxes     l3coffins.sty    2013/12/14 v4624 L3 Coffin code layer      l3color.sty    2012/08/29 v4156 L3 Experimental color support     l3luatex.sty    2013/07/28 v4581 L3 Experimental LuaTeX-specific functions     l3candidates.sty    2014/01/06 v4643 L3 Experimental additions to l3kernel        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)       xparse.sty    2013/12/31 v4634 L3 Experimental document command parser     fontspec-patches.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTe     X     fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX     fontspec-xetex.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX      fontenc.sty       eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings       eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many oth     er characters in Unicode lower plane      eu1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live        xetex.def    2014/04/07 v0.99 LaTeX color/graphics driver for XeTeX (RRM/JK)          fontspec.cfg     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     gloss-tibetan.ldf    polyglossia: module for tibetan     gloss-english.ldf    polyglossia: module for english      eledmac.sty    2014/04/14 v1.10.5 LaTeX port of EDMAC        xargs.sty    2008/03/22 v1.1  extended macro definitions  (mpg)       suffix.sty    2006/07/15 1.5 Variant command support      xstring.sty    2013/10/13  v1.7c  String manipulations (C Tellechea)        t3cmr.fd    2001/12/31 TIPA font definitions         test.1      ***********


title: Beamer preventing display of headlines

text: Can we prevent the display of headlines only but retain the footers for a particular slide in beamer? Thanks


title: listings 'escapeinside'-option is not working for me

text: this is my first question here. I'm not exaclty new to LaTeX, but to be honest I've never really gotten too much into it. So here's my problem: I have this minimal example:               \documentclass{scrreprt}          % Quellcode     \usepackage{listings} % für Formatierung in Quelltexten     \lstset{         escapeinside={(*@}{@*)},          % if you want to add LaTeX within your code     }          \begin{document}          \chapter{some chapter}          \section{some section}     some text \lstinline|some code (*@ \textbf{TRYING TO ESCAPE HERE} @*) some more code|          \end{document}      What I get in my pdf-file is this: ![enter image description here](http://i.stack.imgur.com/YGPLV.png) I guess you can see I'm trying to escape the `\lstinline` command to insert a basic LaTeX one but it's not working for me. I'm referring to the `escapeinside`-option from the listings-manual section 4.14. I hope I've stuck to all the standards with my post. Please let me know if any further information about package versions and what not is required. Any help will be very much appreciated!


title: \hat{} not appearing in equation with transpose?

text: Why does the first bracket not display the \hat{\beta}, I cut and pasted from the second one so they are exactly the same? I guess it has to do with the fact that the first expression is transposed?               \documentclass{article} % Your input file must contain these two lines     \usepackage{fancyvrb}     \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}      \DefineVerbatimEnvironment{example}{Verbatim}{fontsize=\small}     \usepackage{natbib}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{bm}     \usepackage{grffile}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{booktabs}     \usepackage{siunitx}     \usepackage{longtable}      \usepackage[%       font=small,       labelfont=bf,      figurewithin=section,       tablewithin=section,       tableposition=top      ]{caption}     \numberwithin{equation}{section}          \makeatletter        \def\env@matrix{\hskip -\arraycolsep         \let\@ifnextchar\new@ifnextchar         \array{*\c@MaxMatrixCols l}}     \makeatother          \begin{document} % plus the \end{document} command at the end     \parskip = 1pc %change spacing between paragraphs     \parindent = 0pc %change paragraph indentation     \pagestyle{empty}          \clearpage     \setcounter{page}{1}     \pagestyle{plain}                    \begin{equation}          SSR = (y-X \hat{\beta})^{T}(y-X \hat{\beta})             \end{equation}          \end{document}


title: How can I input UTF-8 CJK character in .sty file

text: I compile my tex file with xelatex and I want to renew the `\lstlistlistingname` In this case, I just use `\renewcommand` to do this job. It success if I put this command after package in tex file but how can I move this command to `.sty` file. Notice, The new `lstlistlistingname` is some CJK character and the file encoding with UTF-8


title: TikZ: Decorated paths without straight segment

text: When a path is decorated in TikZ a straight segment might be added at the end, depending on the length of the path. This is undesirable in some cases, and a resolution for the snake decoration has appeared in this question. I would like to get an integer or half-integer number of wavelengths in a path for a snake and a coil decoration, with the wavelength calculated automatically so that there is no straight segment at the end. I would also like a switch for each of the endpoints that allows me to choose if the path at that endpoint points in one or the other direction.


title: How to define a listing example environment

text: I have read the listing manual document. I would like to use the `lstsample` environment. It looks like below: ![example](http://i.stack.imgur.com/SkfUx.jpg) Basically, the output is on the left and the code is placed on the right. But I don't find where this environment is defined. Is it easy to define a new environment like this?


title: Automatically replace all |foo| with \abs{foo}

text: Technically speaking, this isn't a LaTeX specific question, but there are so many useful tools in LaTeX, and I'm using it to solve a LaTeX problem, so I thought here would be a good place to ask. I have a rather large document with lots of math notation. I've used `|foo|` throughout to indicate the absolute value of foo. I'd like to replace every instance of `|foo|` with `\abs{foo}`, so that I can control the notation via an abs macro I define. Does anybody know of a way to do this? Possibly using regular expressions of some sort? Are there editors with tools built in for this?


title: Why can't pdflatex print EPS figures?

text: The images in my paper are in EPS format. If I execute `pdflatex` to get a PDF version of my paper, the figures won't appear. I have to typeset using the `latex` command, and then convert the DVI file to PDF using `dvipdf`. Why doesn't `pdflatex` support EPS figures?


title: EPS figure shows error when compiling with pdflatex

text: I have trouble with EPS figure when compiling with `pdflatex`. I have compiled the following TeX code with `pdflatex`.               \documentclass{book}     \usepackage{graphicx}     \begin{document}          \begin{figure}     \begin{center}     \includegraphics[height=3 cm,width=4 cm,angle=0]{fig1.jpg}     \caption{Flower}     \end{center}     \label{fig2}     \end{figure}          \end{document}      It is OK, there is no problem. But when I am using EPS image extension and compiling `pdflatex`, shows an error : 'unknown file extension `.eps`'. Now my question is : How can I compile TeX file containing EPS image extension with `pdflatex`?


title: LaTeX compiles but not pdfLaTeX

text: I have a "project", which has a `main.tex` in `Main` folder, and in `Main` folder, there are subfolders called `tex` and `fig`. In `fig` folder, there is a `logo.eps` file. In `tex` folder, there is a `content.tex` file. In `content.tex`, there is a line               \raggedright \includegraphics[height=50px]{logo}      When I use `latex` (`Latex` button in `WinEdt`) to compile `main.tex`, it is fine. But if I use `pdflatex` to compile it, I get error message:               ..     ! LaTeX Error: File `logo_amu' not found.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.6 ...ght \includegraphics[height=50px]{logo_amu}          ?           Process has been terminated .      I would like to use pdfLaTeX to compile my documents. So how do I solve this issue?


title: error including eps in my document

text: > **Possible Duplicate:**   >  Why can’t pdflatex print EPS figures? I'm trying to add eps graphic to my document but I got this error when I compile it                Package pdftex.def Error: File `immagini/pwr_consumption_in_wnc-eps-converted     -to.pdf' not found.          See the pdftex.def package documentation for explanation.     Type  H <return>  for immediate help.      where pwr_consumption_in_wnc is my eps file


title: Problem with .eps images in Texmaker 3.5.2

text: I'm using Texmaker 3.5.2 (with Texlive) to write a paper having .eps-images. If I try to include .eps-images, I get the following error: ![enter image description here](http://i.stack.imgur.com/bP7Jo.png) Here is my Texmaker configuration: ![enter image description here](http://i.stack.imgur.com/CEbmB.png) Any ideas how to fix this? P.S. here is MWE:               \documentclass{sig-alternate}          \begin{document}          \begin{figure}     \centering     \epsfig{file=fly.eps}     \caption{A sample black and white graphic (.eps format).}     \end{figure}          \end{document}      Please let me know if you need more information :)


title: Winshell not uploading eps file to pdf file in Windows 8

text: I just installed winshell for windows and I am trying to include an eps file with the directive \includegraphics{./new}   where new is an eps file, however everytime I run pdflatex, it says the file not found. So I tested it by replacing it with jpg and it works. Could anyone tell me what I am doing wrong? Does it have something to do with eps files? I was using latex without GUI on my linux os and I faced no such problems. Any suggestions for a windows system?


title: Plotting a reciprocal of a sine function in tikz + pgfplots

text: This is my code at the moment:               % Rest of document omitted brevity...     \subsection*{f(x) = cosec(x)}     \begin{tikzpicture}     \begin{axis}[every axis plot post/.append style={       mark=none,       domain=0:360,       samples=500,       smooth}, % All plots: 50 samples, smooth, no marks       axis x line=middle,       axis y line=center,       xmin=0,       xmax=360,       ymin=-1,       ymax=1,       enlargelimits=upper] % extend the axes a bit to the right and top       \addplot {1 / sin(x)};     \end{axis}     \end{tikzpicture}     % Rest of document omitted brevity...      This looks right to me, however, when I try and compile, I get: `C:/Users/Todd/Dropbox/Homework/Notes/A-level_Maths/Core 3/Graphs/Graphs.tex:111: Dimension too large. [\end{axis}]` When I change `\addplot {1 / sin(x)};` to `\addplot {sin(x)};` the document compiles without any issues. What am I doing wrong?


title: write contents of an environment to document and toc

text: I want to write the contents of an environment to the document and the toc. Here's a MWE hacked to look (almost) like what I need.               \documentclass[pdftex,12pt]{book}     \usepackage{hyperref}          \newenvironment{g}     {}     {\newline}          \begin{document}          \tableofcontents{}          \chapter{First}          \begin{g}     first goal first chapter     \addcontentsline{toc}{section}{first goal first chapter}     %\addtocontents{toc}{first goal first chapter} %% yields error message     \end{g}     \begin{g}     second goal first chapter     \addcontentsline{toc}{section}{second goal first chapter}     \end{g}          Chapter contents here \ldots          \chapter{Second}          \begin{g}     first goal second chapter     \addcontentsline{toc}{section}{first goal second chapter}     \end{g}          Chapter contents here \ldots          \end{document}      That produces this toc: ![the actual toc](http://i.stack.imgur.com/YtEiC.png) What I'd like is this (with no hyperref links for the extra lines): ![the desired toc](http://i.stack.imgur.com/XRMK8.png) Problems I don't know how to solve:   * Most important: how can I capture the write twice behavior in the environment definition so that I don't have to specify the extra toc line with cut and paste each time?   * Secondary: Why does `\addtocontents` produce an error when commented in? (An answer to this might solve the entry formatting and link problem.)  I can use the `xparse` package to define the environment if that makes for an easier solution.


title: What is the LaTeX convention for typing "xy-plane"?

text: I want to type "xy-plane" in a document so that it "looks right" when I print the document. (1) `xy-plane` does not look right to me.   (2) `$xy-$plane` looks bad.   (3) `$xy$-plane` looks ok, but I feel uneasy. What is the accepted convention for typing "xy-plane" in a (La)TeX document?


title: APA formatting and changing the parameters

text: So my teacher is being really picky with the APA formatting of my paper and I decided to use LaTeX to typeset my paper (currently its 21 pages). I used the package \usepackage[man]{apa} which has double spaced it for me, and put a running head on it. I need to move the running head on the title page up an inch or so, and I need to change what it says. I also have to change the spacing on the title page so that my name, school name and project title are all together and not spaced far apart. The other issue is that the \subsection{} command gives me an italicized heading instead of an upright bold face heading. I also have to write the bibliography, but since I have to submit my paper to a number of places (each with its own format) I need to constantly change the format (that's why I dumped MS Word and stuck with a TeX system) and I need to know how to write a bibliography in BibTeX. Thank you!


title: Recursive Multiple subscripts and superscripts with xparse (Modified Version)

text: How can I modify the command below to obtain a version (of the question: recursive multiple subscript and superscript with xparse) which does not stack the sub/superscripts horizontally but moves all together like               T_{bc}^{arf}      I tried to remove the `\object` but this did not work "double superscript error" I don't want to change the command syntax (so that I am flexible :-)!               \documentclass{article}     \usepackage{xparse}     \NewDocumentCommand{\tensorkor}{m >{\SplitList{,}}O{}}      {\begingroup       \mathsf{#1}%       \newcommand\object{\vphantom{\mathsf{#1}}}%       \ProcessList{#2}{\dotensorkor}%       \endgroup}     \NewDocumentCommand{\dotensorkor}{m}      {%       \object#1%      }     \begin{document}     $\tensorkor{T}[^a,_b,_c,^r,^f]$          what I want is $T_{bc}^{arf}$     \end{document}      ![enter image description here](http://i.stack.imgur.com/sKSRq.png)


title: problems with tkz-linknodes

text: doesn't this example work because? `\LinkNodes` doesn't work               \documentclass[a4paper,11pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[upright]{fourier}     \usepackage{amsmath,tkz-linknodes}     \usepackage{tikz}          \begin{document}     \begin{NodesList}     \begin{displaymath}     \begin{aligned}     3(2a&-5b)&-7a(2a&+3b)&+5(a^2&+3b)& \AddNode[1] \AddNode[2] \AddNode[3] \AddNode[4] \AddNode[5] \AddNode[6] \AddNode[7]\\     6a+&\AddNode[1]\\      & -15b&   \AddNode[2]\\     && -14a^2&   \AddNode[3]\\         && &-21ab&   \AddNode[4]\\     &&& &+5a^2&   \AddNode[5]\\     &&&& &+15b&   \AddNode[6]\\     6a&-15b&-14a^2&-21ab&+5a^2&+15b&\AddNode[7]\\        \end{aligned}     \end{displaymath}          \LinkNodes{$3\cdot 2a$}%         \LinkNodes{$3\cdot(-5b)$}%     \LinkNodes{$-7a\cdot(2a)$}%     \LinkNodes{$-7a\cdot(3b)$}%     \LinkNodes{$5\cdot(a^2)$}%     \LinkNodes{$5\cdot(3b)$}%          \end{NodesList}     \end{document}


title: Using \ref in a ylabel of a pgfplot

text: When I use `\label` and `\ref` to distinguish two y axes the marks drawn by `\ref` are no longer on the lines after rotating it together with the rest of the label (see example below). Any ideas?               \documentclass{article}          \usepackage{pgfplots}          \begin{document}       \begin{tikzpicture}         \begin{axis}[axis y line*=left, scale only axis,                      ylabel={estimation 2 \ref{pgf:allsamples}}]           \addplot[blue,mark=+] table {data2.csv};           \label{pgf:allsamples}         \end{axis}         \begin{axis}[axis y line*=right, scale only axis,                  ylabel={estimation 1 \ref{pgf:swingvotes}}, ylabel near ticks]           \addplot[red,mark=x] table {data1.csv};           \label{pgf:swingvotes}         \end{axis}       \end{tikzpicture}     \end{document}      ![ref does not work as expected](http://i.stack.imgur.com/50COc.png)


title: Placing edges side by side?

text: I have **two nodes** which should be connected by edges, one going from **A to B** and one from **B to A**. The problem is, that **they do overlap** but I want to show them as **separate arrows** \- so one might shift slightly to the right the other slightly to the left. How might achieve this? (There seems to be a solution in there TikZ parallel Edges between Nodes but the examples are too complex, so I cannot separate the automation stuff from the placing edges side by side stuff.) **minimal example:**               \documentclass[border=3mm]{standalone}     \usepackage{tikz}     \begin{document}      \begin{tikzpicture}[->]         \node (1) {A};         \node (2) [below of=1] {B};         \path[every node/.style={font=\sffamily\small}]         (1) edge node [left] {edge1} (2)         (2) edge node [right] {edge2} (1)         ;       \end{tikzpicture}     \end{document}      **result:** ![enter image description here](http://i.stack.imgur.com/SJRKm.png)


title: mdframed package + align gives extra vertical space

text: I think I may have stumbled upon a bug in the mdframed package. I have an mdframed environment with just one align environment inside it. Consider this minimum working example:               \documentclass[11pt]{article}          \usepackage{amsmath}     \usepackage{mdframed}     \usepackage{blindtext}          \begin{document}     \blindtext \\ \blindtext \\ \blindtext           \begin{mdframed}     \begin{align*}     x^2 + y^2 = z^2 \\     x^2 + y^2 = z^2 \\     x^2 + y^2 = z^2 \\     x^2 + y^2 = z^2 \\     x^2 + y^2 = z^2 \\     x^2 + y^2 = z^2     \end{align*}     \end{mdframed}          \end{document}      This gives the following output: ![](http://i.stack.imgur.com/Mm0Jq.png) As you can see, the \begin{mdframed} command is issued around the bottom of the page. Because align is not splittable, the whole frame plus contents gets placed on the next page, which is absolute what expect to happen. However, extra vertical white space appears on the bottom inside the mdframed environment, so that the mdframed environment is much higher than it should be. From experimenting a bit, I think that the amount of extra white space is about the same amount of remaining vertical space on the previous page, which implies that the mdframed could be up to twice as high as it should be. Is there a workaround for this?


title: Citing a reference and the equation therein

text: I am citing a book in my report. I want to add the equation number to the reference i.e. I want the reference to appear like [10, eq.8.145]. Thank you.


title: pdf overwrite - how?

text: > **Possible Duplicate:**   >  TeXnicCenter on Windows: Building Problems When writing a paper I keep a YAP viewer open and constantly overwrite the contents. I am trying to get the same behaviour for a presentation but the system (beamer/pdflatex within TeXnicCentre running miktex 2.9) won't allow me. I understand there is a problem with adobe so I installed another pdf viewer (foxit reader) but am still running into the same problem. So - how to make the system overwrite the pdf in a smooth way? Thanks!


title: TikZ picture wrecks page on Adobe Reader

text: The following MWE contains the offending code. The page that this code is on does not show up when the PDF is seen in Acrobat Reader. I do not use Acrobat myself, but my advisor does, so my thesis has to be compatible with the program. I could write this anew, but not knowing what the error is makes me wary. It compiles without error, and shows up as should be in SumatraPDF. On Acrobat, though, the faded radial streaks do not show up, and whatever else is on the same page after this figure is not rendered at all.               \documentclass[tikz]{standalone}     \usepackage{tikz}     \usetikzlibrary{fadings}     \begin{document}     \begin{tikzpicture}         %I draw the circle.             \draw[purple!70!black,fill](0,0) circle(1.5);             \draw[path fading=circle with fuzzy edge 10 percent,fill=purple!80](0,0) circle(1.5);             \foreach \x in {0,30,...,360}{         %I generate two random numbers and store them             \pgfmathparse{rand}\pgfmathsetmacro{\randomnbr}{\pgfmathresult}             \pgfmathparse{rand}\pgfmathsetmacro{\randomnbrpos}{\pgfmathresult}         %I now draw the radial streaks.                 \draw[line cap=round,line width=\randomnbrpos*.5mm,purple!80!black,path fading=east,fading transform={rotate=5*\randomnbr+\x},rotate=5*\randomnbr+\x] (rand*.1+.5,0)--(\randomnbrpos*.5+1.0,0)++(0,1pt);             }         \end{tikzpicture}     \end{document}      This is how it should look   ![This is how it should look](http://i.stack.imgur.com/f5ufd.png)


title: How to reduce the space before & after \section and \subsection

text: How to reduce the space before and after titles specified by \section and \subsection   * \subsection ## ![\\subsubsection](http://i.stack.imgur.com/xGNN4.png) * * *   * \section ![\\section](http://i.stack.imgur.com/SUAOT.png)


title: Is there such thing as "p{height}"

text: I am making a table right now and it's really annoying that items in my cell are getting crunched               \begin{center}     \begin{tabular}{|c| c | c|}     Critical Points $P_0$ & $f(P_0)$ & Conclusion \\      \hline     (0,0,1)     & 0 & Local Extrema\\ \hline     (0,0,-1)    & -2  & Absolute minimum \\ \hline     $\left ( 0,0,\frac{1}{2} \right ) $ & $\frac{1}{4}$ & Local Extrema \\  \hline          $(0,0, \frac{\sqrt{12}}{5})$ & $\frac{8}{5}$ & Absolute maximum \\ \hline          $(0,0, -\frac{\sqrt{12}}{5})$ & $\frac{8}{5}$ & Absolute maximum \\      \end{tabular}     \end{center}      My fractions are getting crushed and there is no such thing as "p{height}" to fix.


title: What is the best way to indicate repeated off diagonal elements in a matrix/array?

text: I'd like to typeset a matrix of the following kind: When the symbols involved are big, like, in place of `$r$`, suppose we had `$\mu(k-1)$` and in place of `$\lambda$`, we had `$\mu(k-2)$`, the matrix B below becomes very ugly, especially due to the `$\ddots$` looking so ugly. Is there a nicer way to typeset a matrix like the one below. ![matrix](http://i.stack.imgur.com/YmFFK.png) * * * I have seen that the off diagonal entries are often replaced by a big and prominent entry if they are all same. I'd be happy if someone comes up with a trick to do that as well. Probably, it is something standard and I am unaware of it.


title: Citation format and style in biber

text: > **Possible Duplicate:**   >  Name delimiters in biblatex I'm trying to format my citations according to my supervisors wishes and getting stuck. The first problem is getting citations with parentheses right. I summon it with the latex `\citep{alpha2013}`. This is fine for single names like (Alpha, 2013) and many names like (Aplha et al., 2013), however when there is only two names I get (Alpha, Beta, 2013) and my super wants (Alpha & Beta, 2013). How do I get this? The second problem is that written in line like Alpha (2013) and I don't know how to do this. Currently I use `\cite{beta}` and I get Alpha, 2013. In addition, my super wants to have the same style as before where if there is only 2 authors, it becomes Alpha & Beta (2013). My preamble is thus:               \usepackage[         backend=biber,         block=space,         date=long,         doi=false,         eprint=false,         firstinits=true,         isbn=false,         minnames=2,         maxnames=2,         mincitenames=2,         maxcitenames=2,         natbib=true,         sortcites=false,         sorting=nyt,         style=authoryear-comp,         terseinits=true,         uniquelist=false,         uniquename=false,         url=false             ]{biblatex}     \addbibresource{../../BibTex/library.bib}          %Put initials after names...     \DeclareNameAlias{sortname}{last-first}     \DeclareNameAlias{default}{last-first}         %Remove "and" before last name. However, this also removes "and" in a textcite...     \renewcommand*{\finalnamedelim}{\addcomma\space}      Now I know that if you remove the last line in the preamble `\renewcommand*{\finalnamedelim}{\addcomma\space}` I get 'and' in the citation, but its how to get '&' instead that I don't know.


title: Centering consecutive two lines of text without extra space between them

text: I have two lines of text written in Lyx. I'm trying to center it without placing extra vertical space between lines. I selected the text, then went to _Menu > Edit > Paragraph Settings_. There, I can either remove spacing between lines or center the lines. But I can't do both of it at the same time. The codes generated by Lyx are below for both two cases. Centered, but there is space between lines:               \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm,headheight=0cm,headsep=0cm,footskip=0cm}     \pagestyle{empty}     \setlength{\parskip}{0bp}     \setlength{\parindent}{0pt}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{babel}     \begin{document}          \noindent \begin{center}     Hello     \par\end{center}          \noindent \begin{center}     World     \par\end{center}      There is no space, but not centered either:               \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm,headheight=0cm,headsep=0cm,footskip=0cm}     \pagestyle{empty}     \setlength{\parskip}{0bp}     \setlength{\parindent}{0pt}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{setspace}     \usepackage{babel}     \begin{document}          \begin{singlespace}     \noindent Hello          \noindent World     \end{singlespace}      Looking at these sources, I can feel that it should have been something like               \begin{singlespace}     \noindent \begin{center} Hello \end{center}     \noindent \begin{center} World \end{center}     \end{singlespace}      but as you know, user is not allowed to edit the source directly in Lyx. How do I do it in proper way?


title: Is it possible to place standalone graphics in subdirectories

text: When using standalone sub-directories do not seem to work properly. While               \documentclass{article}     \usepackage[subpreambles,mode=buildnew]{standalone} %standalone tikz          \begin{document}       \includestandalone{standalonepic}     \end{document}      works               \documentclass{article}     \usepackage[subpreambles,mode=buildnew]{standalone} %standalone tikz          \begin{document}       \includestandalone{../fig/MAP/standalonepic}     \end{document}      Will fail. The figure will be inserted in the document but no pdf will be generated. Compilation states: > >       Description Resource    Path    Location    Type Graphic >       '../fig/MAP/ray-casting.pdf' could not be >       build.  thesis_main.tex /Thesis/src line 60 Texlipse Build Error >   The files are at the fitting locations and the document is produced but no pdf for the figure in the latter case. I like to keep figures separated. Is there a way to do this and use standalone?


title: How does \everyhbox work?

text: Knuth in the TexBook Chapter 24, gives a short list of the `every` commands. The `\everyhbox` command inserts a token list - as its name implies- before a horizontal box. Here is a short example:               \documentclass[11pt]{article}      \begin{document}      \begingroup          \everyhbox{a} % change this to $a$ to see the issue!          \def\oneLineBox#1#2%          {%               \hfuzz=0pt               \overfullrule=0.25pt               \setbox0=\hbox spread#2{#1}%               \setbox1=\hbox{\the\badness}%                \setbox2=\hbox to 5cm{\box0\hfil\box1}%               \box2          }          \oneLineBox{Badness of line }{-1em}          \oneLineBox{Badness of line }{-0.50em}          \oneLineBox{Badness of line }{-0.39em}          \oneLineBox{Badness of line }{0em}          \oneLineBox{Badness of line }{1em}          \oneLineBox{Badness of line }{2em}          \oneLineBox{Badness of line }{3em}      \endgroup          \end{document}      The `oneLineBox` macro above set ups some boxes and using `\everybox` we add the letter `a` in each horizontal box. But when we change the letter to a math letter say `$a$`, the badness is shown as zero, why? Surely the badness of the line did not disappear? Similar results can be obtained by changing `\badness` to `\hbadness`, this time TeX displays 1000 for all the lines. The `overfullrule` also seems to go a bit awry!


title: Figures in llncs class

text: I would like to display the figure in my LaTeX file. I use the class               \documentclass{llncs}      and downloaded `psfig.sty` and add to `/miktex 2.9/tex/latex/base` and then from Setting -> Refresh FNDB. I also include this part of code               \input{psfig.sty}      then I used this code to insert the image               \begin{figure}     \psfig{figure=File.eps}     \caption{my figure label}     \label{fig:f1}     \end{figure}      and no image is shown. I have tried to include this as well `\usepackage{graphicx}` but nothing happens in fact, I have download the template and recompiled it but no images also appear.


title: What does "overfull hbox" mean?

text: I often see output from TeX with the warning `overfull hbox, badness 10000`. What does this message mean?


title: Warning message overfull \hbox what does it mean?

text: When I run my latex the document is set, but it takes a long time and I have lots of warnings like this: > Overfull \hbox (4.0pt too wide) has occurred while \output is active What does this mean?


title: Automatically switch header style at a specific (but unknown) point in the document

text: On the page _after_ an environment ends, I would like to switch header style. The code below works as I would like it to. However, the use of `everypage` feels a little like overkill and I wonder whether there is a means built into one of the loaded packages (including `zref`), or otherwise "better" way to accomplish the same.               \documentclass{article}     %\usepackage{zref}     \usepackage{enumitem}     \usepackage{titleps}     \usepackage{xparse}     \usepackage{everypage}          \newpagestyle{before}{         \sethead{}{before}{}     }     \pagestyle{before}          \newpagestyle{after}{         \sethead{}{after}{}     }          \ExplSyntaxOn          \int_new:N \g_last_item_page_int     \int_gset:Nn \g_last_item_page_int {\c_max_int}          \newlist{mylist}{enumerate}{1}     \setlist[mylist]{      label = (\arabic*),      after = \int_gset:Nn \g_last_item_page_int {\thepage}     }          \AddEverypageHook{         \int_compare:nT {\thepage > \g_last_item_page_int}           {\pagestyle{after}}     }          \ExplSyntaxOff          \begin{document}     Header should be "before".     \newpage     \begin{mylist}         \item Header should be "before".         \newpage         \item Header should be "before".     \end{mylist}     Header should be "before".          \newpage          Header should be "after".          \end{document}


title: symbols of pencil, ruler and compass

text: How can I produce the codes to get the symbols of pencil, ruler and compass in `LATEX`? I'm gonna write a sentence `I can draw this figure by using simple tools` in my presentation. So I prefer to include symbols pencil, ruler and compass instead of the words `simple tools`. Is it possible?


title: how to vertical-align a figure

text: how can I vertical-align a figure? I've tried with:               \documentclass[a4paper,10pt]{article}          \usepackage[utf8]{inputenc}     \usepackage[margin=1in]{geometry}     \usepackage{chngcntr}     \usepackage{tabularx}     \usepackage{graphicx}     \usepackage{subcaption}     \usepackage{amsmath}     \usepackage{color}     \usepackage{colortbl}     \usepackage{epstopdf}     \usepackage{amsmath}     \usepackage{paralist}          \begin{document}          \begin{figure}[c]      \centering     \includegraphics[width=15cm]{./img/mcarlo_ch.eps}     \caption{IRFs, Monte Carlo simulation} \label{mcarlo}     \end{figure}          \end{document}      It works, but it overwrite the subsubsections that should be in the next pages. PS: I'm using pdflatex


title: bclogo page breaks

text: I am using the Bclogo package http://www.ctan.org/pkg/bclogo. I have created environments for lemmas and proofs with it. The proof was too big to fit on the bottom of the page, so it just inserted a page break and moved it to the next page (see image below). Is there a way to have it start on the page below the lemma and then continue on the next page rather than moving everything to the next page and leaving a large gap between? I currently have the following commands set up in a different file and just call them in the document for typing the lemmas and proofs.               \newcounter{LemmaBoxCounter}     \newcommand{\lem}[1]{\begin{bclogo}[logo=\bclampe, noborder=true, couleurBarre=Red, couleurBord=Black, couleur=blue!20, arrondi = 0.2, epBarre=0]{Lemma \arabic{LemmaBoxCounter}}     \raggedright #1     \addtocounter{LemmaBoxCounter}{1}     \end{bclogo}}          \newcounter{ProofBoxCounter}     \renewcommand{\proof}[1]{\begin{bclogo}[logo=\bclampe, noborder=true, couleurBarre=Red, couleurBord=Black, couleur=orange!10, arrondi = 0.2, epBarre=3.5]{Proof \arabic{ProofBoxCounter}}     \raggedright #1 \qed     \addtocounter{ProofBoxCounter}{1}     \end{bclogo}}      ![Page Break](http://i.stack.imgur.com/Mtc6W.png)


title: Suppress indentation on the opening line of a letter

text: Here's a simple example:               \documentclass[12pt]{letter}     \setlength{\parindent}{15pt}     \signature{Doorknob}          \begin{document}     \begin{letter}{}         \noindent \opening{Dear TeX Stack Exchange,}              Waffles are pancakes with built-in syrup reservoirs.              Unicorns are magically weaponized ponies.              This is a generic paragraph.              \closing{Sincerely,}     \end{letter}     \end{document}      When I try viewing a document created with that code, the opening line ("Dear TeX Stack Exchange") is still indented, despite the `\noindent` command. How can I tell LaTeX not to indent the opening line of a letter?


title: Putting labels on arrow mark in Tikz's picture

text: I've tried to manually put labels (1-2-3-4) on the arrows tip in the center of the connection lines but it seems not working good..How can i fix this? ![enter image description here](http://i.stack.imgur.com/3VLiF.jpg)               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning,intersections,shapes.geometric,decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,patterns,calc,fit,arrows,backgrounds,matrix}          \begin{document}     \begin{tikzpicture}[auto]          \tikzset{deco/.style={decoration={markings, mark=at position #1 with {\arrow{>} }},postaction={decorate}}}     \tikzset{trape/.style={trapezium,draw,shape border rotate=90,minimum width=2cm}}     \tikzset{box/.style={rectangle,draw,minimum height=1cm,minimum width=2.5cm}}     \tikzset{cerchi/.style={circle,draw,minimum size=1cm}}          \matrix [row sep={1.5cm}]     {                                 &[2cm]  \node [box] (genera) {}; &[2cm]                         &[1cm] \\      \node [cerchi] (pompa) {}; &                                & \node [trape] (turbina) {};  & \node [cerchi] (ultiliz) {}; \\                                 & \node [cerchi] (condensa) {};  &                              &      \\     };          \begin{scope}[>=triangle 60]      \draw [deco=0.6]  (genera)                      -|  node[pos=0.6]{2} (turbina.top right corner);      \draw [deco=0.6]  (turbina.bottom left corner) |-   node[above=1mm,pos=0.71]{3} (condensa);      \draw [deco=0.4]  (condensa)                    -|  node[above=1mm,pos=0.31]{4} (pompa);      \draw [deco=0.6]  (pompa)                      |-   node[below=1mm,pos=0.63]{1} (genera);     \end{scope}          \draw [->,>=latex,very thick, shorten >=4 pt,shorten <=4pt] (pompa.south)--(pompa.north);          \node [coordinate] (B) at ($ (condensa.center)!.6!(condensa.west) $) {};     \node [coordinate] (C) at ($ (condensa.center)!.6!(condensa.east) $) {};     \node [coordinate] (A) at ($ (B)+(0,-1.5cm)$) {};     \node [coordinate] (D) at ($ (C)+(0,-1.5cm)$) {};     \draw (A)--(B);     \draw[decorate,decoration={zigzag,amplitude=3pt,segment length=8pt}] (B)--(C);     \draw (C)--(D);     \end{tikzpicture}                    \end{document}


title: Typesetting a directed hypergraph in tikz

text: Similar to several other questions, I am trying to draw hypergraphs in tikz. I want to draw a directed hypergraph that looks something like those in this image from here: ![image of hypergraph](http://i.stack.imgur.com/pWMW5.png) As opposed to other questions, I do not want to draw an arc between the associated edges. Instead I want the edges to join for a segment and then split again. I don't mind specifying the position of the join point, but I would rather not have to manually specify the angle of the incoming and outgoing edges. I would prefer that lines smoothly separate from the join point. This is my poor attempt at recreating this figure:               \documentclass{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{tikz}          \begin{document}     \tikz{       \node [circle,draw] (v1) at (0,0)   { $v_1$ };       \node [circle,draw] (v2) at (-1,-3) { $v_2$ };       \node [circle,draw] (v3) at (2,-2)  { $v_3$ };       \node [circle,draw] (v4) at (1,-4)  { $v_4$ };       \node [circle,draw] (v5) at (3,1)   { $v_5$ };       \node [circle,draw] (v6) at (5,-1)  { $v_6$ };       \node [circle,draw] (v7) at (4,-5)  { $v_7$ };       \node [] (e1) at (1,-2) { $e_1$ };       \node [] (e2) at (2,0) { $e_2$ };       \node [] (e3) at (3,-3) { $e_3$ };       \node [] (e4) at (4,0) { $e_4$ };     %       \path     % edge 1             (v1) [-]  edge node { } (e1)             (v2) [-]  edge node { } (e1)             (e1) [->] edge node { } (v3)             (e1) [->] edge node { } (v4)     % edge 2             (v1) [-]  edge node { } (e2)             (v3) [-]  edge node { } (e2)             (e2) [->] edge node { } (v5)     % edge 3             (v7) [-]  edge node { } (e3)             (e3) [->] edge node { } (v3)             (e3) [->] edge node { } (v4)     % edge 4             (v5) [-]  edge node { } (e4)             (e4) [->] edge node { } (v6)             (e4) [->] edge node { } (v7)             ;     }     \end{document}      This produces this figure: ![attempt](http://i.stack.imgur.com/kCcHo.png)


title: Ignoring whitespace in a custom environment

text: I know there has been questions similar to this previously but none of the proposed solutions seem to work for me. I have a few custom environments I am using in LaTeX. Below is the code for a "licenses" environment. This environment is basically a table and I use the "license" command to specify each row of the table.               \newenvironment{licenses}     {%     \def\lwidth{0.25\textwidth}%     \def\rwidth{0.69\textwidth}%     %     \newcommand\license[3]{%     \ifdef{\separator}{\separator}{}%     ##1 & ##3 %     \def\separator{\\}%     }%     %     \begin{longtable}{>{\bfseries}L{\lwidth}!{\VRule}R{\rwidth}}%     }     {\end{longtable}}      I then use the environment as follows... however I have a problem in that the whitespace between each `\license` command affect the output.               \begin{licenses}     \license{...}{...}          \license{...}{...}          \license{...}{...}          \end{licenses}      I have tried the `\ignorespaces` command and also commands similar to `\catcode32=9\relax`, but none of these seem to work in my case. Here is a minimum working example:               \documentclass[10pt]{article}          \usepackage{etoolbox}           % for ifdef     \usepackage{longtable}          % for tables that span more than one page     \usepackage{tabularx}           % for newcolumntype     \usepackage{xcolor}             % for colours          \definecolor{lightgray}{gray}{0.8}     \newcolumntype{L}[1]{>{\raggedleft}p{#1}}     \newcolumntype{R}[1]{p{#1}}     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}          \newenvironment{licenses}      {%     \def\lwidth{0.25\textwidth}%     \def\rwidth{0.69\textwidth}%     %     \newcommand\license[3]{%     \ifdef{\separator}{\separator}{}%     ##1 & ##3 %     \def\separator{\\}%     }%     %     \begin{longtable}{>{\bfseries}L{\lwidth}!{\VRule}R{\rwidth}}     }     {\end{longtable}}          \begin{document}     \section*{Licenses}     \begin{licenses}     \license{Test1}{Test1}{Test1}          \license{Test2}{Test2}{Test2}          \license{Test3}{Test3}{Test3}          \end{licenses}     \end{document}


title: Using hfill to prevent expansion of text in table environment

text: I am using inline lists (from the enumitem package) within a table (see Comma- separated list environment) Originally, I had an issue where the inline list would expand horizontally to the width of the table. I mostly fixed this using a `\hfill` after the inline list, but this doesn't seem to work for the last table row. Does anyone have any ideas how I could fix this? ![](http://i.stack.imgur.com/qBv1F.png) Here is the relevant LaTeX code:               \newlist{commalist}{description*}{4}     \setlist[commalist]{itemjoin={{,}},itemjoin*={{ and}},afterlabel=\unskip{{~}}}`          \newenvironment{technicalSkills}%     {%     \def\lwidth{0.3\textwidth}%     \def\rwidth{0.64\textwidth}%     %     \newcommand\technicalSkillsItem[2]{%     \ifdef{\separator}{\separator}{}%     ##1 & %     \begin{commalist}%     ##2 %     \end{commalist}. \hfill %     \def\separator{\\[0.5em]}%     }%     %     \begin{longtable}{>{\bfseries}L{\lwidth}!{\VRule}R{\rwidth}}%     }     {\end{longtable}}               \section*{Technical Skills}     \begin{technicalSkills}     %     \technicalSkillsItem{Programming Languages}     {\item C     \item C++     \item Java     \item Perl     \item Python}     %     \technicalSkillsItem{Web-Based Development}     {\item PHP     \item JavaScript     \item CSS     \item HTML}     %     \technicalSkillsItem{Document markup}     {\item \LaTeX}     %     \technicalSkillsItem{Databases}     {\item Oracle     \item MySQL     \item postgreSQL}     %     \technicalSkillsItem{Operating Systems}     {\item Microsoft Windows     \item Linux     \item Solaris}     %     \technicalSkillsItem{Tools}     {\item Git     \item Subversion     \item Eclipse IDE}     %     \end{technicalSkills}


title: Venn diagrams, relative so size of its content

text: Now I am looking if there is any easy way to create venn-diagrams where the circles/ellipses change size relative to its content. I am basically looking for simple compliments either on the form ![\[\\img\]http://i.stack.imgur.com/8Irn9.gif\[img\]](http://i.stack.imgur.com/EtxOD.gif) or with three elements The output I am looking for is somewhat along these lines ![enter image description here](http://i.stack.imgur.com/4JCQP.png) Where the size of the circles are relative to their percentages or probability. (Larger circles, larger probability) and the largest circle represents 1 or 100% Now is it possible creating a macro that allows one to create such images? Example, given that A=40 , B=60 , A \cap B = 20


title: Vector graphics format

text: I have noticed that the PDF of some of the books have vector graphics with tranparancy feature, which is very illustrative. Could someone tell me what the format of these graphics could be? I was researching online and found out that `EPS` cannot encapsulate transparency and therefore it should be other formats. In my `LaTeX` manuscript, I would like to use vector graphics with transparency. My ultimate goal is to be able to submit to scientific journals. Since journals ask for figures in separate files, what format is generally used for vector graphics with transparency? Has someone had this experience before?


title: How can I produce a mosaic chart / Marimekko chart?

text: I would like to make a stacked ybar plot with three stacked components on each bar, with each component divided vertically into three percentage components (the total width of these components stay the same: 100%). One bar of the plot could be described by the following matrix: > 23 30% 50% 20% > > 55 10% 40% 50% > > 32 60% 30% 10% meaning that the first (base) part of the bar would have a hight of 32, and be devided into three parts vertically with relative widths 60:30:10 (so three narrow lines with different widths standing next to each other and touching). The second (middle part) would have a hight of 55, added on top of the 32-high first bar, and be divided into three parts with relative widths 10:40:50. The third (top) part would have a height of 23, divided into three parts with relative widths 30:50:20. (The input format is not important, and flipping around the numbers or dividing the matrix into two or more does not matter---the important part is getting plot as described.) Does anyone have any suggestions on how to achieve this? edit: Clarification: The above example and table describes only one of the bars. Another way to describe it would be to make a ybar plot, where each ybar is a mosaic chart or a Marimekko chart, so that each bar contains the kind of chart that is presented below in the answer by Jake.


title: How to make author-specific citations with BibTeX?

text: I'm preparing a document with 100+ references, all sourced from a single `.bib` file. Many -- but not all -- of the references are articles previously written by me and/or some of my current co-authors. We would like these to appear differently in the generated bibliography: preferably using boldface for the citation number, both in the main text and in the (plain-style) bibliography. Just defining a new command (`\mcite` is what we call it) as `\textbf{\cite[#1]}` works for the in-text part, but of course, doesn't affect the appearance of the bibliography at all. So far, we've used BibTeX and simple styles, like `plain`. I've looked through the documentation for BibTeX & `biblatex`, as well as `natbib`. Nothing seems to address this; can it be done?


title: PSTricks error "Undefined control sequence <recently read> \c@lor@to@ps"

text: I have a problem with this file tex:               \begin{document}     \begin{figure}     \begin{center}     \begin{pspicture}(0,0)(1,3.8)     \psline{-<}(0,0)(0,.2)     \psline{-}(0,.2)(0,.4)     \psline{*->}(0,.4)(0,.9)     \psline{-*}(0,.9)(0,1.4)     \psline{-<}(0,1.4)(0,2.4)     \psline{-}(0,2.4)(0,3.4)     \psline{*-}(0,3.4)(0,3.6)     \psline{>-}(0,3.6)(0,3.8)     \rput(1,.4){$y=0$}%testo     \rput(1,1.4){$y=1$}     \rput(1,3.4){$y=3$}     \end{pspicture}     \end{center}     \caption{}     \end{figure}     \end{document}      but I don't understand where is the error.


title: Error: Undefined control sequence \c@lor@to@ps

text: I got this error               ! Undefined control sequence.     <recently read> \c@lor@to@ps           l.122 }          ?      on compiling a TeX file which has a code copied from LaTeX Draw. This mysterious error has remained so for two days or so! Now I have some time to attend to it. Here is a screenshot showing the LaTeX code fragment:               % Generated with LaTeXDraw 2.0.8     % Wed Oct 02 09:43:45 IST 2013     % \usepackage[usenames,dvipsnames]{pstricks}     % \usepackage{epsfig}     % \usepackage{pst-grad} % For gradients     % \usepackage{pst-plot} % For axes     \scalebox{1} % Change this value to rescale the drawing.     {     \begin{pspicture}(0,-2.7)(9.84,2.7)     \psline[linewidth=0.04cm](0.32,-1.1)(5.46,1.72)     \psline[linewidth=0.04cm](1.94,1.7)(6.1,-2.54)     \psline[linewidth=0.04cm](4.7,2.64)(3.2,-2.68)     \psline[linewidth=0.04cm](0.0,1.26)(9.82,-1.84)     \psline[linewidth=0.04cm](3.5,2.68)(2.96,-2.5)     \end{pspicture}      }      I ensured that the packages that were commented in the code are included: My question: How to correct this? It's hard to figure out, for I never wrote `\c@lor@to@ps` anywhere and didn't find it in the code fragment copied from LaTeX Draw either! Thanks in advance for any help!


title: A little problem with pst-plot

text: I am getting error with this code:               \documentclass[12pt]{article}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}      \usepackage[ukrainian]{babel}     \usepackage{fontenc}     \usepackage{inputenc}     \usepackage{calc}     \usepackage{pstcol}     \usepackage{pstricks,pst-plot}     \usepackage{pst-text}     \usepackage{pst-char}     \psset{xunit=0.7cm,yunit=5cm}     \begin{document}          \begin{pspicture}(-7.5,-0.4)(7.5,1.2)     \psaxes[Ox=0,Oy=0,Dx=1,Dy=0.2,linecolor=black]{->}(0,0)(-7,-0.3)(7,1.1)     \end{pspicture}          \end{document}      Code error:               ! Undefined control sequence.     <recently read> \c@lor@to@ps     l.17 \end     {pspicture}      Help me please. Whats wrong? P.S. Sorry for my bad english


title: Problem with PSTricks graph

text: I get the error:                   ! Undefined control sequence.<recently read> \c@lor@to@ps }      when trying the following graph               \documentclass[11pt]{article}     \usepackage[usenames,dvipsnames]{pstricks}     \usepackage{epsfig}     \usepackage{pst-grad} % For gradients     \usepackage{pst-plot} % For axes     \usepackage{mathtext}          \begin{document}          \psscalebox{1.0 1.0} % Change this value to rescale the drawing.     {     \begin{pspicture}(0,-2.4101124)(5.36,2.4101124)     \psline[linecolor=black, linewidth=0.04, arrowsize=0.05291666666666667cm     2.0,arrowlength=1.4,arrowinset=0.0]{->}(0.8,-2.3398876)(0.8,2.4601123)     \psline[linecolor=black, linewidth=0.04, arrowsize=0.05291666666666667cm                 2.0,arrowlength=1.4,arrowinset=0.0]{->}(0.4,-1.9398876)(5.2,-1.9398876)     \psline[linecolor=red, linewidth=0.04](1.2,-1.5398877)(4.8,2.0601122)(4.8,2.0601122)     \rput[bl](0.0,2.0601122){\textcolor{red}{f(x)}}     \rput[bl](5.2,-2.3398876){\textcolor{red}{x}}     \end{pspicture}     }          \end{document}      It should be something easy, but I'm not a pro. Please, help me!


title: psmatrix error - Undefined control sequence

text: When executing the following code, I get the error: > >     Undefined control sequence. >     <recently read> \c@lor@to@ps l.7 [name=A] 1 & [name=B] 8 \\[0pt] ? >   Here is the code:               \documentclass{article}     \usepackage{pstricks}     \usepackage{pst-node}          \begin{document}     \begin{psmatrix}[fillstyle=solid,mnode=circle,colsep=1]     [name=A] 1 & [name=B] 8 \\[0pt]     [name=C] 2 & [name=D] 9     \end{psmatrix}     \end{document}       I have updated my packages as well but no affect.


title: psframe " Undefined control sequence"

text: I am trying to create a book cover by using PSTricks. I follow the source from here :http://tug.org/pracjourn/2007-1/robbers/robbers.pdf (page 22). When I compile, it annouces the error that :               ! Undefined control sequence.      \c@lor@to@ps           l.29 ...tyle=solid,fillcolor=Maroon](0,0)(13.24,9)          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined. And the error is in fact at the line :               \psframe[fillstyle=solid,fillcolor=Maroon](0,0)(13.24,9) Please tell me what I should do? Thanks in advance.


title: Filling rectangle in TikZ with more than one color

text: To draw a rectangle and fill it in gray in TikZ:               \draw [fill=gray,very thick] (0,0) rectangle (2,1);      Now, I want to fill it in both gray and yellow. The best way would be if I can make diagonal stripes of gray and yellow alternately. Is there a way to do that?


title: inserting figure or table affect \chapter and \section

text: I am using `scrreprt` with this preamble:               \documentclass[fontsize=12pt,a4paper,oneside,      listof=totoc, bibliography=totoc, titlepage, headsepline, DIV12,     ]{scrreprt}      I have a document with `\chapter` and `\section` and if I try to include a figure or table like this:               \chapter{bla}     \section{interviews}     \begin{table}[hbt]     \centering     \begin{tabular}{c|c|c}     \hline Diese & Tabelle & ist \\      \hline zentriert & und  & verwendet \\      \hline vertikale & Trennzeichen &  .\\      \hline      \end{tabular}     \caption{test}      \end{table}          \begin{figure}[hbt]     \centering     \includegraphics[scale=2.0]{Bilder/logo_dhbw}     \caption{Das Logo der DHBW Karlsruhe}     \end{figure}     \section{test2}      then I get a huge problem. This causes LaTeX to create a new page with the chapter name bla and in addition the section test2 to be at the same place on top of the page. They mix together. This also ignores any layout formatting I had previously done for chapter, section etc. `\section{test2}` is still displayed correctly after that.![enter image description here](http://i.stack.imgur.com/quRPv.png)


title: use of limits after a non-math operator

text: I would like to write the following:               $ \mu_{s,r} = \mbox{mean}_ {i \in N}(X_{i,s,r})$      but where the `{i \in N}` is underneath the word "mean". I tried `\limit` but it doesn't work unless it's a math operator. I understand this can ruin the look but I am making slides and want to see how it appears. Thanks!


title: Change math font only in some parts of a document?

text: Within a larger document with lots of formulas, I use a self-defined "Example" environement for illustrational purposes from time to time. In order to better set it apart from the rest of the text, I have decided to use another font family within those example surroundings. But - and here's my problem - the code I use only changes the text font. How can I use another math font for the formulas within the defined enviromenent?               \newenvironment{Ex}{\fontfamily{ppl}\selectfont\par\vspace{1ex}\begin{quote}\textbf{Example: }}{\end{quote}\par}      Thanks in advance for any help! Edit: More details regarding my question. Let me illustrate it with an example:               [Here's some default-formatted text]         \begin{Example}          [some example text I want in another font family]          \begin{equation}           and now I need a formula within the example-environement set in a different style than the standard layout to underline it's still part of the example-surrounding          \end{equation}          [maybe some more text within the example]         \end{Example}         [And now back to the main body of the text set once again in the default layout]      I hope this clarifies (rather than confuses) my question.


title: Prevent double-frame with mdframed/tikz

text: I want to create a digression using mdframed. I want it to have rounded corners, so I load it with option [framemethod=tikz]. Because of this, the problem arises that the standard framebox I use for my tikzpictures is also put around the mdframed-box, resulting in a really ugly double-frame. I tried the advice I got in this question, but I couldn´t pass the TikZ-key to mdframed. ![MWE-pic](http://i.stack.imgur.com/MK9UW.png) What I ultimately want to achieve is a frame with rounded corners and grey background. Here is my MWE:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{backgrounds}     \usepackage[framemethod=tikz]{mdframed}     \tikzset{every picture/.style={framed,background rectangle/.style={draw=black!80,rounded corners=.5ex}}}          \begin{document}     \begin{mdframed}[backgroundcolor=black!10!white]     Plain text.     Or something else.     \end{mdframed}     \end{document}      How can I prevent the outer frame?


title: \Sexpr shows only one value from a vector with two elements in sweave

text: I can't get the two elements of the vector using:               <<>>=     z=c(1,2)     @          \Sexpr{z}      I have googled a lot but don't understand why I get just the first element.


title: Avoid page break between line and quote environment

text: I encountered a little problem while writing my homework in LaTeX. I wrote the following code:               \documentclass{article}     \begin{document}     \center{Title}     \vspace{18cm}\\     This line should be on the same page as the next one.     \begin{quote}     This line should be on the same page as the previous one.\\     This one could be broken to another page if needed.     \end{quote}     \end{document}        But LaTeX breaks the page right after the first line, which I want to avoid. Both `\nopagebreak` and `\\*` do not seem to work for me here. Any advice? Thanks in advance.


title: Centering \inputminted inside a figure?

text: I'm using `minted` package to import some code and also kind of images using ASCII art. I've wrapped the `\inputminted` with `\figure` with a caption and all works fine. The only thing I can't accomplish is centering the ASCII art figure. I've tried:               \begin{figure}[ht]         \begin{center}             \inputminted[fontsize=\scriptsize]{text}{./samples/styles.txt}         \end{center}         \caption{Example programming styles}     \end{figure}


title: Using Greek symbols in section title

text: How can I use Greek symbols as a part of section? For example, how may I create a section 'k-epsilon Turbulence Model'?


title: Problems with horizontal aligment of figures using subcaption package

text: The subfigures do not align horizontally, the (a) subfigure is placed approx. 3 cm lower then the (b)-figure. Can you please see what I'm doing wrong.               \documentclass[english]{article}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{float}     \usepackage{epstopdf}          \begin{document}     \begin{figure}     \caption{Coloured lines}     \centering        \begin{subfigure}[a]{0.45\textwidth}          \centering          \includegraphics[width=\textwidth]{Colourlines1}          \caption{No treatment}        \end{subfigure}        \begin{subfigure}[b]{0.45\textwidth}          \centering          \includegraphics[width=\textwidth]{Colourlines2}          \caption{Treatment}        \end{subfigure}     \end{figure}     \end{document}


title: Long table to fit on 2 pages

text: In a middle of a page I have a long table with a lot of maths formulas and I would like to make it fit on 2 pages automatically. Here the code :               \documentclass[11pt, a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}  %%% new     \usepackage{amsmath,amssymb,amsfonts,amscd}     \usepackage{enumerate}     \usepackage[page]{appendix}     \usepackage{wasysym}     \usepackage{amsfonts,bbm}     \usepackage[retainorgcmds]{IEEEtrantools}          \usepackage{amsthm}      \usepackage{supertabular} % tableaux qui tiennent sur plusieurs pages          %\usepackage{epsfig}     \usepackage{mathrsfs}     \usepackage{amsfonts}     \usepackage[T1]{fontenc}     \usepackage[french]{babel}     \usepackage{amssymb}     \def\ds{\displaystyle}     \usepackage{latexsym}     \usepackage{amsfonts}     \usepackage{syntonly}     \usepackage{tracefnt}     \usepackage{amsmath}     %\addtolength{\textwidth}{1.6cm}     \usepackage{fancyhdr}     \usepackage{graphicx}     \usepackage{setspace} % permet de définir l'interligne     \usepackage{a4wide}     %%\usepackage{xtab} %% commented out because loading this package causes an error                    %\textheight 22.5cm \textwidth 15.8cm     \usepackage{geometry}     \geometry{hmargin=3cm,vmargin=3cm}          %%%%%%%%%%%%%%% LYX's packages     \usepackage{float}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{esint}     \PassOptionsToPackage{normalem}{ulem}     \usepackage{ulem}               %%%%%%%%%%%%%%%%          \newcommand{\bea}{\begin{eqnarray*}}     \newcommand{\eea}{\end{eqnarray*}}     \newcommand{\cc}{\mathcal}     \newcommand{\bb}{\mathbb}     \newcommand{\bacc}{\left\{}     \newcommand{\eacc}{\right\}}     \newcommand{\evacc}{\right.}     \newcommand{\bp}{\left(}     \newcommand{\ep}{\right)}     \newcommand{\bint}{\left[}     \newcommand{\eint}{\right]}     %\newcommand{\bea}{\begin{eqnarray*}}     %\newcommand{\eea}{\end{eqnarray*}}     \newcommand{\bnorme}{\left\|}     \newcommand{\enorme}{\right\|}     \newcommand{\babsolu}{\left|}     \newcommand{\eabsolu}{\right|}     \newcommand{\ba}{\begin{array}}     \newcommand{\ea}{\end{array}}     \newcommand{\bdes}{\begin{description}}     \newcommand{\edes}{\end{description}}     \newcommand{\benu}{\begin{enumerate}}     \newcommand{\eenu}{\end{enumerate}}     \newcommand{\implique}{\Rightarrow}     \newcommand{\ssi}{\Leftrightarrow}     \newcommand{\associe}{\mapsto}     \newcommand{\avaleur}{\rightarrow}     \newcommand{\rn}{$\mathbb{R}^N$}     \newcommand{\sla}{\textbackslash}     %\newcommand{\pp}{\textit{Preuve.}}     \newcommand{\bdisp}{\begin{displaymath}}     \newcommand{\edisp}{\begin{displaymath}}     \newcommand{\bsplit}{\begin{split}}     \newcommand{\esplit}{\end{split}}     \newcommand{\petit}{\footnotesize}     \newtheorem{deff}{Définition}[section]     \newtheorem{lem}[deff]{Lemme}     \newtheorem{prop}[deff]{Proposition}     \newtheorem{thm}[deff]{Théorème}     \newtheorem{coro}[deff]{Corollaire}     \newtheorem{rmq}[deff]{Remarque}     \newcommand{\pre}{{\textit{\petit{{\textbf{Démonstration.  }}}}}}     \newcommand{\p}{\mathbb{P}}     \newcommand{\pp}{\mathbb{P}^{'}}     \newcommand{\ppp}{\mathbb{P}^{''}}     \newcommand{\R}{\mathbb{R}}     \newcommand{\N}{\mathbb{N}}     \newcommand{\Z}{\mathbb{Z}}     \newcommand{\C}{\mathbb{C}}     \newcommand{\BB}{\mathscr{B}}     \newcommand{\KK}{\mathscr{K}}     \newcommand{\CC}{\mathcal{C}}     \newcommand{\X}{\mathsf{X}}          \newcommand{\YY}{\mathsf{Y}}          \newcommand{\HH}{\mathsf{H}}     \newcommand{\XX}{\mathsf{X}}     \newcommand{\NN}{\mathsf{N}}     \newcommand{\RR}{\mathsf{R}}     \newcommand{\EE}{\mathsf{E}}     \newcommand{\FF}{\mathsf{F}}     \newcommand{\MM}{\mathsf{M}}     \newcommand*{\defeq}{\mathrel{\vcenter{\baselineskip0.5ex \lineskiplimit0pt                          \hbox{\scriptsize.}\hbox{\scriptsize.}}}% definie le symbole :=                          =}          \begin{document} %%% new          {\textbf{fonctions de référence}}          $$\begin{array}{ll}          \displaystyle{\tau(n)=\mbox{card\,}\bacc p\, /\, p\mbox{ divise }n\eacc}     & \displaystyle{\mu(n)=\bacc\ba{ccc}0&\mbox{ si }     &n\not\in \pp\\ (-1)^{\tau(n)}     &\mbox{ si }&n\in \pp\ea\right.} \mbox{\petit{(fonction de Möbius)}}\\\\     \displaystyle{{\delta(n)=\sum_{k/n}\mu(k)}}     &\Lambda (n)=\bacc\ba{ccc}0     &\mbox{ si }     &n\not\in \ppp\\     \log(p)     &\mbox{ si }     &n= \p^\nu\ea\right.\mbox{\petit{(fonction de Mangoldt)}}\\\\     \displaystyle{b(n)=\sum_{kl=n}\Lambda(k)\,\Lambda (l)-\Lambda(n)\log(n)}     &\displaystyle{c(n)=\sum_{kl=n}\Lambda(k)\,\Lambda (l)+\Lambda(n)\log(n)}\\\\     \displaystyle{[x]=\sum_{k\leq x}1} (\petit{\mbox{partie entière de }} $x$)     & \beta(x)=x-[x] (\petit{\mbox {partie fractionnaire de }} x)\\     \ &\ \\     \pi(x)=\mbox{card}\bacc p\in\p\,/\, p\leq x\eacc&\pi'(x)=\mbox{card}\bacc p'\in\pp\,/\, p'\leq x\eacc\\     \ &\ \\     U(x)=\displaystyle{\sum_{k\leq x}\frac{x}{k}}&M(x)=\displaystyle{\sum_{k\leq x} \mu(k)} \mbox{\petit{(fonction de Mertens)}}\\     \ &\ \\     V(x)=\displaystyle{\sum_{k\leq x}\frac{x}{k}\log\bp\frac{x}{k}\ep}& \varphi(x)=\babsolu M(x)\eabsolu \log^2 x-2x\log x\\     \ &\ \\     \sigma(x)=\displaystyle{\sup_{t\geq x}\babsolu \frac{M(t)}{t}\eabsolu}& \nu_p(x)=\bint \frac{\log (x)}{\log (p)}\eint=\bacc\ba{ccc}0&\mbox{ si }&p>x\\     \max\bacc \nu/\ p^\nu\leq x\eacc&\mbox{ si }&p\leq x\ea\right.\\     \ &\ \\     \theta(x)=\displaystyle{\sum_{p\leq x}\log(p)}&\Psi(x)=\displaystyle{\sum_{p\leq x}\nu_p(x)\log(p)}=\displaystyle{\sum_{n\leq x}\Lambda (n)}\mbox{\petit{ (f. de Tchebychev)}}     \end{array}$$          \end{document} %%% new      ![enter image description here](http://i.stack.imgur.com/phByT.png)


title: referring the same author

text: I would like to input items in a bibliography as follows: Author(for example: Mike) item 1: article item 2: book item 3；... How can I do this? Could anybody help me? Thanks in advance. There is a little difference from others. I need the following form Milnor, J.: [1]. Construction of universal bundles: I, Ann. Math., (2)63:272-284 (1956). [2]. Construction of universal bundles: II, Ann. Math., (2)63: 430-436 (1956). Milnor, J., and M. A. Kervaire: [3]. Bernoulli numbers, homotopy groups, and a theorem of Rohlin, Proc. Intern. Congr. Math., 1958.


title: Non-alternating margins in book class

text: For a `book` class, I specify margins like this:               \usepackage[top=1.25in, bottom=1.25in, left=1.5in, right=1.25in]{geometry}      But `left` and `right` appear to behave as `inner` and `outer`. I need to have the left margin 1.5 inch, and not have it alternate from page to page. It looks like the `assymetric` option should do this, but it does not appear to have any effect.