title: font in MATLAB figures (type1 / type3)

text: I have some figures generated in MATLAB. I want to include the figures in a tex file. First I save the figure as eps format. and then I include the **eps** file in the latex. The default font of the figures in MATLAB is **Helvetica** but after making the Latex file the final PDF file includes type-3 fonts. Which MATLAB font should I use in my figures that after converting (saving) the figure as **eps** format and including it in the tex file the font becomes type-1 (embedded subset) in the final PDF? I have checked this question, but is there any way to change the default font to some more standard font in MATLAB figure and solve the problem without using any external tools? I use WinEdt7.0 in windows.


title: \Omega not working in math mode [Workaround]

text: I have a problem typing in math mode. Every symbol seems to work without any flaws, yet the command \Omega in math mode results in a . instead of a symbol. Every other symbol works without problems.               \documentclass{tudelft-report}     \usepackage{mcode}        % allows for matlab code copy pasting     \usepackage{fixltx2e}     % used for subscript in text     \usepackage{rotating}     % used for rotating text (sideways tables) and figures     \usepackage{hhline}       % allowing for broken double lines     \usepackage{printlen}     \usepackage{amsmath}      % used for numbered matrices check if needed!!!     \usepackage{breqn}        % splitting equations over multiple line (matrices)     \usepackage{epstopdf}     % used for importing EPS matlab figures     \usepackage{pdflscape}    % in combination with \begin{landscape} shows the page in landscape both in content as in the PDF     \usepackage{longtable}      above my active packages. If anyone could be able to help it would be really appreciated. The problem is solved. WorkAround: using `\varOmega` seems to have enabled me to draw the Omega symbol. * * * Example               \begin{equation}       %eq:rotDimVel       \mu_{pre cor,i}=\frac{1}{{\Omega{}}_iR_i}       \begin{bmatrix}         u_{r,i}\\ v_{r,i}\\ w_{r,i}       \end{bmatrix}         = \frac{1}{\Omega_iR_i}           \left(             \begin{bmatrix}               u_{heli}\\               v_{heli}\\               w_{heli}             \end{bmatrix}             +            \begin{bmatrix}              0 & z_{r,i} & {-y}_{r,i} \\              -z_{r,i}& 0 & x_{r,i} \\              y_{r,i} & {-x}_{r,i} & 0             \end{bmatrix}            \begin{bmatrix}              p_{heli}\\              q_{heli}\\              r_{heli}            \end{bmatrix}          \right)       \label{eq:rotDimVel}     \end{equation}


title: pdfpages & includepdf not working

text: I compiled the following file (through MiKTeX which I have just updated all files), and I do not get the `junk.pdf` file inserted.               \documentclass{report}     \usepackage{pdfpages}     \begin{document}     qwe     \includepdf[pages=-]{./junk.pdf}     \end{document}      The `.log` and `junk.pdf` file are there: `junk1.log`; `junk.pdf` OK, yes it works with `pdflatex`, but I have to use `latex`->`dvips`->`ps2pdf` because of other constraints insertion of EPS figures). Beside, I do not know how to use the suggested `lastpage` option. Using `\includepdf[nup=2x2,frame,pages={1-13}]{./junk.pdf}` I do correctly get 5 pages which should have included `junk.pdf`, but I get blank pages with a black dot in the center.


title: pst-circ: figure and caption overlapping

text: I'm writing a thesis and need to get this problem solved. I just started to use `pst-circ` as an alternative to `cirtuitikz` (seemed to me like it has better documentation), however I'm kinda stuck with the caption overlapping partially the circuit. I don't know if I should use `\vspace{something}`, but I was looking for a cleaner solution (if possible). I'm not really sure I used the correct encapsulation. Maybe I should use a minipage as well. ![enter image description here](http://i.stack.imgur.com/CotIf.png) I used the following code:               \begin{figure}[H]     \begin{center}     \begin{pspicture}[showgrid=false](9,8)         \Cnode(0,0){P1} \psdot(P1) \nput[labelsep=0.25]{180}{P1}{R}         \Cnode(9,0){P2} \psdot(P2) \nput[labelsep=0.25]{0}{P2}{S}            \pnode(4,0){C}              \multidipole(P1)(C)             \coil{$L$}                   \capacitor{$C$}.              \multidipole(P2)(C)             \coil{$L$}                   \capacitor{$C$}.     \end{pspicture}              \caption{Filtre LC simple en configuration étoile}         \label{filtre_lc_etoile_simple}     \end{center}     \end{figure}      (ignore the text inside the caption: it doesn't make any sense at all, since this is just a truncated copy-paste from another part of the document) I'm not sure this is really a `pst-circ` problem: it may be a regular figure problem (though using external PNG / PDF files as source I never got this behaviour), maybe because dimensions where specified and known. I encapsulated between a figure because I wanted to add some caption to it. Any suggestions?


title: Where to find a list of all available symbols for ConTeXt?

text: As mentioned in Which symbols need to be escaped in ConTeXt?, one can type commands, such as `\textdollar` to display symbols in a document. In some situations, using such commands seems advantageous, for instance, in allowing one to distinguishing content from code and for allowing one to make consistent, document-wide changes to symbols which should appear as text, but not to those symbols being used in ConTeXt and Lua code. Where can I find a comprehensive list of text commands which display symbols in Unicode using the currently selected font?   * How to look up a symbol? provides instructions for finding symbols, but the solutions, such as Detexify do not seem relevant to ConTeXt.   * The ConTeXt wiki has an article about symbols, however, this does not contain many of the items mentioned in Which symbols need to be escaped in ConTeXt?, which suggests to me that more special commands might be available.   * The Comprehensive LaTeX Symbol List contains a list of symbols, some of which function in ConTeXt, but the document does not single out which symbol commands have been implemented in ConTeXt.


title: Is my \date broken?

text: When using `\date{}`, I get this weird result: ![enter image description here](http://i.stack.imgur.com/hpLoa.png) _(I've blurred out some parts, since they're, well, sensitive for me)_ Why is it doing this? I'm using `isodate`, but it's not the issue, I've commented it out, and it's still doing those weird numbers. I'm using XeLaTeX to compile my documents.


title: limiting align-current in LaTeX-mode

text: When working on a LaTeX document in Emacs `align-current` aligns `&` and `\\\`, but does so for entire sections at a time. Anyone have any idea as to how one limits its range (in a new macro) to say the current environment? I seldom need to do an align of anythis other than a matrix or a table. My attempts to build something on top of `align-regexp` have not been successful. Ideas? Edit: Given the following test data `M-X align-current` will normally align the `&`'s and `\\\`'s, but on a sectional basis. I'd like them to work only on the current environment.               \begin{tabular}{xxx}       a & bbbb & sdssd & \\     ccsssssss & jj& bb     \end{tabular}     \begin{tabular}{xxx}           a & bbbb & sdssd & \\     cc & jj& bb     \end{tabular}      If I run it in this example, it aligned them in both tabulars at the same time.


title: Changing BibTeX "format.names" function in .bst file to force "et al." citations for entries with more than 3 authors

text: I'm using `natbib` package for my reference list. I have been struggling with BibTeX. I'm writing for Journal of Finance, and they want > 3 citations to be in "et al." format for the body of the paper. But the Journal's `.bst` file makes it such that no amount of authors will make natbib `\citet` or `\citep` (or any other method of citing) truncate the author list to "Jones et al. (2009)" (for example); all authors will always be listed. I've found a solution to a different `.bst` (not the Journal of Finance's `.bst`). But the journal's `.bst` has a `format.names` function that's completely different to this and I can't edit it such that every paper that has > 3 authors gets truncated to "et al." in the body of the paper. Please assist. Here's the code for the Journal's `format.names` function (SOURCED FROM http://www.ivo-welch.info/computers/bstfiles/):                FUNCTION {format.names}     { 's :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=     { namesleft #0 > }     { nameptr #1 >         { s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't := }         { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := }       if$       nameptr #1 >         {           namesleft #1 >             { ", " * t * }             {               ", " *               t "others" =                 { " et~al." * }     %                { " {\small and} " * t * }                 { " and " * t * }        %%%KCB: added \small  %%KD removed small               if$             }           if$         }         't       if$       nameptr #1 + 'nameptr :=       namesleft #1 - 'namesleft :=     }       while$     }


title: Putting full paragraph path in page header

text: I have a document of a deep structure, in sense Part, Chapter....Paragraph which are all used, I want to make full paragraph path to be displayed in the header of each page, something like: > Physics->Quantum Physics->Foundations->Harmonic Oscillator->Ladder > Operators... I managed to do that in MS Word some time ago, but how can that be done in LaTeX ? and please note that it may need more than one line to display it fully.


title: Biblatex induced headache: Bibliography bst style not found

text: I'm new to LaTeX and have been trying to get my document to use a specified `.bst` bibliography style file, but to no avail. I downloaded my preferred `.bst` file (`amnat.bst`) from here into the same folder as my document. I've fruitlessly tried various combinations to try to get it to work (including `\bibliographystyle{amnat}`). I'm not sure if it's a matter of different libraries clashing or what, but I'm incredibly frustrated. I've also tried just setting the bibstyle to equal `plain` and it still doesn't work (also `\bibliographystyle{plain}`). When I run:               pdflatex myTexDocument      I get the error message:               !Package biblatex Error: Style 'amnat' not found.      Also,               \RequireBibliographyStyle{\blx@bbxfile}      And (after pressing the Return key):               !Package biblatex Error: No driver found.      When I run the document without the extra `bibstyle=amnat` parameter for biblatex, I do not run into any errors. Here is an abridged version of myTexDocument.tex:               \documentclass[12pt]{article}     \usepackage[english]{babel}     \usepackage{csquotes}     \usepackage[style=authoryear,sorting=none,natbib=true,bibstyle=amnat]{biblatex}     \usepackage[pagebackref=false,hidelinks]{hyperref}  %For cross-referencing papers to biliography     \usepackage[pdftex]{graphicx}   %Add images     \usepackage{setspace}   %Set line-spacing     \usepackage[hmargin=2cm,vmargin=2.25cm]{geometry}   %Set document margins     \usepackage{amsmath}    %For mathematic formulas     \usepackage{appendix}     \usepackage{pdflscape}  %For configuring page orientation     \usepackage{varwidth,array,ragged2e}    %To adjust table row heights accordingly     \usepackage{multirow}     \usepackage{mathptmx}   %Set font so compatible with math font too     \usepackage{titlesec}   %For adjusting section headings     \usepackage{paralist}   %For lists     \addbibresource{../../../../Bibtex/library.bib} %Load bibiliography          \titleformat{\section}[block]     {\normalfont\bfseries\large}     {}{0em}{}          \titleformat{\subsection}[runin]     {\normalfont\itshape}     {}{0em}{}[--- ]     \titlespacing{\subsection}{0pt}{*2}{0pt}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}          \begin{document}         \input{titlePage} %My title page document         \raggedright    %Left Justify document         \setlength{\parindent}{0.6cm}   %Set paragraph indent         \doublespacing         \renewcommand{\abstractname}{Summary}             \begin{abstract}                 Blahblah \autocite{Webb2002,Graham2008}             \end{abstract}               \section{Conclusion}             Blah blah         \phantomsection %Create a hyperlink to the References section in Table of Contents         \addcontentsline{toc}{section}{References}         \printbibliography              \input{tables} %This is just a document with tables     \end{document}


title: Problem with bibtopic package and sectioned bibliographies

text: I'm using LyX 2.0.1.5 on Windows 7 (MiKTeX 2.9.4813). Since my thesis covers a very specific topic (QM of Retinal's Photoisomerization) I have to divide my Bibliography in two sections:   1. Essential Bibliography   2. Further Reading First I looked up the package `biblatex`, which I found very useful for this purpose, the only bad thing is that I have to use only LyX (I even searched http://wiki.lyx.org/BibTeX/Biblatex but the procedure described is too tricky). After consulting the "Additional LyX Features" I searched the package `bibtopic` and, after following to the letter the description on paragraph 3.1.2, I get this unexpected looking division: > ## Essential Bibliography > > `[1]` Document... > > `[2]` Document... > > ## Further Reading > > `[3]` Document... > > `[4]` Document... The problem is that the citation numbering doesn't stop for each paragraph, even if two BibTeX Bibliographies have been generated; maybe it is determined by the absence of an appropriate Bibliography title: since `bibtopic` removes it, I had to manually re-add that (as a `\chapter*` or `\section*`, for instance). I know that `biblatex` offers a better result, since the citation numbering is divided properly, but to use this feature I have to switch to TeXworks: > ## Essential Bibliography > > `[1]` Document... > > `[2]` Document... > > ## Further Reading > > `[1]` Document... > > `[2]` Document... So can I still use BibTeX (and the related extensions) and be able to generate the same result as `biblatex`? P.S.: I apologize fot the possibly bad English and the request itself, because on other forums I've been told to switch directly to `biblatex` and forget about LyX.


title: Indenting multi-line list items in an enumeration

text: I have an enumeration environment in my LaTeX document consisting of several numbered steps. Now I need to indent some of these steps. I am using the following command to achieve this indentation for one item:               {\setlength\itemindent{2cm}         \item Some item text...     }      It works for short item texts, but in the case of longer texts that lead to line breaks, the subsequent lines are not indented. See the following LaTeX code for an example:               \begin{enumerate}     \item This is a normal item without any indentation.     {\setlength\itemindent{2cm}      \item This is an indented item with a long text that causes a line break. Unfortunately, the new line is not indented.      }     \item This is a normal item without any indentation.     \end{enumerate}       (Unfortunately I am not allowed to post an image of the output as I'm a new user...) The first line of the second item is indented by 2cm, but all subsequent lines are not. Can anyone give me a hint on how to get the subsequent lines indented, too?


title: Define command either with or without \csname

text: I'm trying to do the same as this one, but with `\def`, `\gdef` or `\xdef` instead. Very quick summary of the other question:   I wanted to print the command (not the contents of the command) regardless of it being defined by `\csname` or not. Solution was to check whether the first string is `\csname` or the command. So `\def` needs an `\expandafter` if used with `\csname`. If not then everything is ok:               \def\str{String}     \expandafter\def\csname str\endcsname{String}      Both are correct. But if I wanted to change `\str` or `\csname str\endcsname` with an argument (`#1`). Now it's not known whether I need to use `\expandafter` or not. If used when not needed, it results in an error. I wrote this (in analogy with the other question)               \def\defcmd#1{       \ifx\csname#1         \expandafter\def\csname       \else         \def#1       \fi     }          \defcmd\str{String}     \defcmd\csname str\endcsname{String}      This will absorb the first string after `\defcmd` as argument (`#1`), check whether it's `\csname` or anything else and will then replace itself either with `\expandafter\def` or `\def` and place the argument back.   When running that code, no problem at all. But when I try to output the command (either directly or in a file) I get the following error:               ! Use of \str doesn't match its definition     l.24       And I have no clue why that is. (l.24 is one line after the use of `\str`)


title: The different meanings of LaTeX's \stop command

text: we know that               \stop      will cause LaTeX to stop parsing and output what it has processed up to this command. But then I discovered another way to use it, as demonstrated in this minimum working example:               \documentclass{article}       \def\demo#1-#2\stop{#2}     \begin{document}       \def\sample{foo-bar}       \expandafter\demo\sample\stop       There's the Word 'bar' above this text and       this made it into the output despite a stopping command.     \end{document}      How is `\stop` used here and why didn't it actually interrupt the LaTeX?


title: Automatically convert \left to \Bigl

text: I have a LaTeX file, which includes tons of other auto-generated LaTeX files containing TikZ figures. Suppose I want to make every `\left(` in the TikZ figure appear at the same, fixed size, say `\Bigl(`. It's not impossible to change the auto-generator side, but I'd like to solve the problem on the side which includes the figures. I tried               \def\includetikzfile{#1}{{\let\left\Bigl\input{#1.tikz}}}      but it quickly went to an infinite loop, exceeding the TeX capacity. How can I do it?


title: Space before and after section [no need for it]

text: I have additional space inside a text [see picture] between paraghraps. Beside of that it is diffrent size [this space]. What's more before Section, and after section title there is additonal space also. Also with diffrent size in diffrent section title. ![enter image description here](http://i.stack.imgur.com/Ruie7.jpg) ![enter image description here](http://i.stack.imgur.com/cd0e4.jpg) ![enter image description here](http://i.stack.imgur.com/0tfxF.jpg) How to fix it?                   \documentclass[openany]{book}         \usepackage[utf8]{inputenc}         \usepackage[MeX]{polski}         \usepackage{xcolor}         \usepackage{lipsum}         \usepackage[explicit]{titlesec}         \usepackage[dotinlabels]{titletoc}         \usepackage{setspace}         \onehalfspacing         \usepackage[protrusion=true,expansion=true]{microtype}         \usepackage{lettrine}         \usepackage{titlesec}         %\titleformat{\section}{\normalfont\bfseries}{\thesection}{1em}{}         %\linespread{0.9}         \newlength\BoxWd         \setlength\BoxWd{0.75cm}         \newlength\Aux         \usepackage[left=4.65cm, right=4.65cm, top=4cm, bottom=4.25cm]{geometry}              % chapter tiltes formatting         \titleformat{\chapter}[display]          {\normalfont\sffamily\huge}          {\renewcommand{\thechapter}{\Roman{chapter}}%           \settowidth\Aux{\textcolor{white}{\Huge\thechapter}}           \ifnum\Aux>\BoxWd             \setlength\BoxWd{\Aux}           \else\fi          \hspace*{0.3em}\colorbox{black}{%          \parbox[c][1.2cm][c]{\BoxWd}{%           \centering\textcolor{white}{\Huge\thechapter}}}}           {-1ex}           {\titlerule\vspace{.7ex}\filleft\MakeUppercase{#1}}           [\vspace{.2ex}\titlerule]          \titlespacing*{\chapter}{0pt}{50pt}{80pt}          \titleformat{\section}           {\scshape\normalsize\bfseries}{\MySecSquare\ \thesection.}{0.15em}{#1}            \titlespacing*{\section}{0pt}{2.5pt}{1.5pt}                 \titleformat{\subsection}            {\normalfont\scshape\normalsize\bfseries}{\MySecSquare\ \thesubsection.} {0.10em}{#1}           \titlespacing*{\subsection}{0pt}{1.5pt}{0.5pt}                % formatting for chapter entries in ToC             \titlecontents{chapter}           [3em]{\vspace*{5.5pt}}           {\small\bfseries{\hspace*{-2.63em}{\chaptername}\hspace*  {5pt}\contentslabel{0.25em}\hspace*{1.25em}}}           {\hspace*{-3em}}           {\titlerule*[1pc]{.}\small\sffamily\bfseries\contentspage}                % formatting for section entries in ToC             \titlecontents{section}           [4em]{\vspace*{-2pt}}           {\small\contentslabel{2.5em}}           {\hspace*{2.75em} }%\hspace*{-2.3em}           {\titlerule*[1pc]{.}\small\sffamily\contentspage}                \titlecontents{subsection}           [7em]{\vspace*{-2pt}}           {\small\contentslabel{2.85em}}           {\hspace*{6em}}           {\titlerule*[1pc]{.}\small\sffamily\contentspage}                \newcommand\MySquare{%           \leavevmode\hbox to 1.2ex{\hss\vrule height .9ex width .7ex depth -.2ex\hss}}                \newcommand\MySecSquare{%           \leavevmode\hbox to 1.2ex{\hss\vrule height 1.3ex width 1.1ex depth -.2ex\hss}}                \renewcommand\labelitemi{\MySquare}                \newenvironment{myquote}{\list{}{\leftmargin=15pt\rightmargin=0.0pt}\item[]}{\endlist}           \newcommand\MyTitle{Some title}           \usepackage{fancyhdr}           \fancyhf{}           \fancyhead[EL,OR]{\thepage}           \fancyhead[OL]{\scriptsize\scshape{\leftmark}}           \fancyhead[ER]{\footnotesize\scshape{\MyTitle}}           \renewcommand\headrulewidth{0.2pt}                     \pagestyle{fancy}                \newcommand{\initial}[1]{%             \lettrine[lines=2,lhang=0.35,nindent=0em]{                         \color{black}                         {{#1}}}{}}            \renewcommand\chaptermark[1]{\markboth{\thechapter.\ #1}{}}              \usepackage{hyperref}            \hypersetup             {                colorlinks,             citecolor=black,             filecolor=black,             linkcolor=black,             urlcolor=black,             pdfauthor = {Pdfautor},             pdftitle = {My title},             pdftex              }                   \begin{document}                  \frontmatter                  \tableofcontents             \clearpage                  \newpage             \thispagestyle{empty}                            \mainmatter             \chapter*{Na wstępie}\label{chap:one}             \addcontentsline{toc}{chapter}{\bfseries{Na wstępie}\vspace*{2em}}             \setcounter{page}{9}                  \section{Section One}             \lipsum[1-10]             \section{Section two}             \lipsum[1]             \section{Section 3}             \section{Section 4}             \lipsum[1-10]             \section{Section 5}             \lipsum[1-2]             \section{Section 6}             \lipsum[1]             \section{Section 7}             \lipsum[1-20]             \chapter{Second chapter}             \section{someSection}             \lipsum[1-20]             \section{someSection2}             \lipsum[1-20]             \chapter{Last chapter}             \end{document}


title: Migrating from Debian texlive to vanilla

text: I had been using the native Debian texlive on Mint Linux for a time, with Texmaker. Now I installed the "vanilla" texlive, in order to have a better package control with `tlmgr`. However, I believe I have to do something on Texmaker, or perhaps somewhere else, in order to recognize the new installation, because it isn't finding the new packages I just installed. For example, after successfully running `tlmgr install mathdesign`, Texmaker (running `pdflatex`) will output:               ! LaTeX Error: File `mathdesign.sty' not found.


title: Comparing typographic traditions for different languages

text: Sometimes students using LaTeX ask me how to do the typesetting of documents in French or Spanish. I'm not able to help them because I never learned to speak or write French or Spanish. Different languages have different typographic rules to typeset documents. For English documents one can read Robert Bringhurst's "The Elements of Typographic Style" or for German documents, for example, "Detailtypografie" by Friedrich Forssman and Ralf de Jong. Do you know a document (book, article or URL) comparing the styles for some languages (English, German, French, ...)? For example:   * abbreviations are written in German with `\,` (`z.\,B.` = e.g.), in English without any space,    * a dash in English is `\---` without spaces before and after the character, in German `~--` (with spaces),    * the quotation marks are different (“Foo” vs. „Bar“ vs. « Baz »; package `csquote`),    * vertical, horizontal and double rules in tables (package `booktabs`),   * in German the ampersand & is only allowed in company names (Paul & Söhne), in English ?   * there are different style formatting footnotes in German (e.g. normal number, hanging, footnote text left justified or right left justified). Other languages?


title: Syntax highlighting in listings for C# that it looks like in Visual Studio

text: Community, I want to get my C# `listings` syntax highlighted like in Visual Studio but I did not get it so far. Here's an image of the syntax highlighting of Visual Studio: ![enter image description here](http://i.stack.imgur.com/C6PtC.jpg) Here is the code I have:               \documentclass{article}          \usepackage{color}     \usepackage{listings}     \usepackage{courier}          \lstloadlanguages{% Check Dokumentation for further languages ...     %[Visual]Basic     %Pascal     C,     C++,     csh,     %XML     %HTML     Java     }          \definecolor{red}{rgb}{0.6,0,0} % for strings     \definecolor{blue}{rgb}{0,0,0.6}     \definecolor{green}{rgb}{0,0.8,0}     \definecolor{cyan}{rgb}{0.0,0.6,0.6}          \lstset{     language=csh,     basicstyle=\footnotesize\ttfamily, % Standardschrift     numbers=left, % Ort der Zeilennummern     numberstyle=\tiny, % Stil der Zeilennummern     %stepnumber=2, % Abstand zwischen den Zeilennummern     numbersep=5pt, % Abstand der Nummern zum Text     tabsize=2, % Groesse von Tabs     extendedchars=true, %     breaklines=true, % Zeilen werden Umgebrochen     %keywordstyle=\color{red}\bfseries,     frame=b,     %keywordstyle=[1]\textbf, % Stil der Keywords     % keywordstyle=[2]\textbf, %     % keywordstyle=[3]\textbf, %     % keywordstyle=[4]\textbf, \sqrt{\sqrt{}} %     stringstyle=\color{blue}\ttfamily, % Farbe der String     showspaces=false, % Leerzeichen anzeigen ?     showtabs=true, % Tabs anzeigen ?     xleftmargin=17pt,     framexleftmargin=17pt,     framexrightmargin=5pt,     framexbottommargin=4pt,     commentstyle=\color{blue},     morecomment=[s][\color{green}]{//}{},     %backgroundcolor=\color{grey},     showstringspaces=false, % Leerzeichen in Strings anzeigen ?     %morekeywords={__global__} % CUDA specific keywords     morekeywords={  abstract, event, new, struct,                     as, explicit, null, switch,                     base, extern, object, this,                     bool, false, operator, throw,                     break, finally, out, true,                     byte, fixed, override, try,                     case, float, params, typeof,                     catch, for, private, uint,                     char, foreach, protected, ulong,                     checked, goto, public, unchecked,                     class, if, readonly, unsafe,                     const, implicit, ref, ushort,                     continue, in, return, using,                     decimal, int, sbyte, virtual,                     default, interface, sealed, volatile,                     delegate, internal, short, void,                     do, is, sizeof, while,                     double, lock, stackalloc,                     else, long, static,                     enum, namespace, string},% list your attributes here     keywordstyle=\color{cyan},     identifierstyle=\color{red},     }     %\DeclareCaptionFont{blue}{\color{blue}}          %\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue}, textfont={blue}}     \usepackage{caption}     \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{\colorbox{8}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}          \lstset{       % keyword style       language=csh,       }          \begin{document}               \begin{lstlisting}[label=some-code,caption=Some Code]     using System.Diagnostics;     using MathNet.Numerics.LinearAlgebra.Double;      using MathNet.Numerics.LinearAlgebra.Double.Factorization;          namespace App     {         public partial class Form_Main : Form         {             private void saveObjectToTemp()             {                 //path to the tempfolder of this application.                 string path = Path.GetTempPath() + @"\temperatureapp";                      //check if the folder "temperatureapp" exist in the local temp folder (if not create it)                 bool folderExist = System.IO.Directory.Exists(path);                 if (!folderExist)                     System.IO.Directory.CreateDirectory(path);             }                  private void saveObjectToTemp(object chart, string chartname)             {                 //path to the tempfolder of this application.                 string path = Path.GetTempPath() + @"\temperatureapp";                      //check if the folder "temperatureapp" exist in the local temp folder (if not create it)                 bool folderExist = System.IO.Directory.Exists(path);                 if (!folderExist)                     System.IO.Directory.CreateDirectory(path);                      Chart tmpChart = (Chart)chart;                      tmpChart.SaveImage(path + @"\" + chartname, ChartImageFormat.Png);                  }         }     }     \end{lstlisting}               \end{document}      The key words are not correctly identified and colored. Comments are also not identified and colored. (Comment lines in C# start with "//") Any hints are taken gratefully by me!


title: beamer stepwise alerts with nested lists

text: In beamer, I would like to use alert in a nested list so that each line is red (i.e., the default alert color) stepwise, one line at a time. This code produces the output I would like:               \documentclass[pdf]{beamer}     \begin{document}     \begin{frame}     \begin{itemize}         \item\alert<+>{Parent 1}         \item\alert<+>{Parent 2}         \begin{itemize}             \item\alert<+>{child 1}             \item\alert<+>{child 2}         \end{itemize}         \item\alert<+>{Parent 3}     \end{itemize}     \end{frame}     \end{document}      However, the code above requires using `\alert<+>{...}` with every `\item`. I would like to generate this output using a specification for the entire list with the `\begin{itemize}`. Without the nested list, the following works:               \documentclass[pdf]{beamer}     \begin{document}     \begin{frame}     \begin{itemize}[<alert@+>]         \item Parent 1         \item Parent 2         \begin{itemize}[<alert@+>]             \item child 1             \item child 2         \end{itemize}         \item Parent 3     \end{itemize}     \end{frame}     \end{document}      This makes 5 slides, as does my first example. The first slide is the same, with "Parent 1" in red. The second slide, however, has "Parent 2", as well as "child 1" and "child 2", all in red. This is the part I would like to behave differently. I would like the second slide to have only "Parent 2" in red, but not "child 1" or "child 2". Then slides 3, 4, and 5 would have "child 1", "child 2", and "Parent 3", respectively, in red, just as occurs in both examples. I've looked through similar questions (e.g., this doesn't highlight all children, but still highlights the first child with the parent and requires manually specifying slide numbers which I'd like to avoid). I tried putting the `[<alert@+>]` with the inner `\begin{itemize}` as well as the outer `\begin{itemize}` and various combinations of `.` and `,` with the `+`, etc. It seems like there must be a way to get it to make each line red one at a time using a default alert specification with the `\begin{itemize}`, but nothing I've tried has worked. I would be ok with defining a new list environment (e.g., a "nestedStepwiseAlert" environment) but haven't had luck getting that to work either.


title: Create a LibreOffice spreadsheet from luatex

text: After reading this amazing answer, I'm wondering if it possible to do the same thing but the other way round, that is create a LibreOffice spreadsheet from luatex, exporting data from the `tex` file to the spreadsheet. The example I have in mind is: say I'm typesetting the solution of an exam with a documentclass that defines a macro `\answer` to be used in the following context.               \documentclass{myclass}          \begin{document}          \section{Test 1}          \begin{enumerate}     \item The \answer{definition of entropy} states that \answer{$S = k_B         \ln \Omega$}.      \end{enumerate}          \end{document}      I grade my students with a LibreOffice spreadsheet. So I'd like `luatex` to create (or modify) a spreasheet so I can have automatically something like in the screenshot below. ![screenshot of spreadsheet](http://i.stack.imgur.com/V0fx1.png) I understand that a lua interface to LibreOffice does not exist. So I see three ways here:   1. Creating a zip file from scratch meeting the `.ods` standard.   2. Using some magic to interface LibreOffice API with luatex (with LuaJava?).   3. Using some perl or other kind of magic to do the job. As @canaaerus suggested in comments, I could export things from `tex` with a csv file but I'd like to have a real `.ods` out of the box so that I could have style information (like bold face, centered text, etc.) and formulas.


title: Tex capacity exceeded (string characters) (well it's about to be exceeded)

text: As per my earlier question TeX capacity exceeded (save size), I am generating a fairly large index of `.txt`, `.tex`, and `.pdf` files. This process has worked for a long time, and the size of the index is not the issue. I have added logic to insert additional links in the index and now am about to exceed the `string characters` limit:               Here is how much of TeX's memory you used:          134371 strings out of 493308          9799992 string characters out of 9887816           4157963 words of memory out of 5000000          59945 multiletter control sequences out of 15000+600000          167812 words of font info for 205 fonts, out of 8000000 for 9000          959 hyphenation exceptions out of 8191          87i,12n,83p,10548b,16447s stack positions out of 5000i,500n,10000p,200000b,80000s      I have exceeded this several times in the past few months, and have optimized much of my code, but am running out of ideas as to where to further optimize. So, am trying to resolve this before I get stuck again, which seems imminent. As a benchmark, processing a _single_ file results in:               Here is how much of TeX's memory you used:          52846 strings out of 493308          1137494 string characters out of 9887816          1523413 words of memory out of 5000000          54776 multiletter control sequences out of 15000+600000          167812 words of font info for 205 fonts, out of 8000000 for 9000          959 hyphenation exceptions out of 8191          87i,11n,83p,10548b,1042s stack positions out of 5000i,500n,10000p,200000b,80000s      ## Notes:   * The `string characters` sometimes decreases slightly for no apparent reason. Since my indexing is processing a list of files, I can not see how adding another file to this list can possibly reduce the number of `string characters` required, but I have seen this happen.   * I have already increased the `pool_size` in my `/usr/local/texlive/2013/texmf.cnf`:              pool_size=10000000        * Apologies for not providing a MWE. This process access my file system and to duplicate it would require setting up a bunch of files. # Questions:   1. What are `string characters`?   2. What kind of constructs should be avoided, and what kind are preferred to minimize using `string characters` ?   3. Is there a way that I can see the number of `string characters` used in the middle of the run. If I could get this report _before_ and _after_ a macro invocation, I could possibly narrow down the main culprit.   4. What does it take to increase this limit _much_ further? A solution to Question 4 would be ideal. I don't mind things taking longer. Currently takes about 40 minutes to generate the 600 page index, but even an overnight solution would be acceptable so lots of room left in terms of run time. ## References:   * Compiling a 870 mb latex file   * Increasing TeX's main memory


title: Tikz How to unset/cancel/disable text width?

text: I want to style a bunch of nodes using a complex Tikz style `generalStyle`, defined as               \tikzstyle{generalStyle}=[draw,... lots of options here..., text width=50pt]      Now, the design of an illustration is never as perfectly regular as a code, and I want to make one exception: One node must be styled exactly like the others, except that its content must be displayed without line-breaks. In other words, I want to locally _cancel_ the `text width`. I have tried the _usual suspects_ , including:               \node[generalStyle, text width=none] {A long text};     \node[generalStyle, text width=0]    {A long text};     \node[generalStyle, text width=-1]   {A long text};      but none of them work (1st=>Error, 2nd and 3rd are interpreted literally). How can I cancel the `text width` styling option in TikZ? _Update:_ As pointed out by user4035 below, the following will work perfectly               \node[generalStyle, text width=]   {A long text};      Here is a complete example:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{matrix,positioning}     \begin{document}     \begin{tikzpicture}         \tikzstyle{generalStyle}=[draw,rounded corners=3pt, text width=50pt,text centered]         \matrix[matrix of nodes,nodes=generalStyle] (a) {             x & \ldots &  |[fill=blue!20]| I'd like to see the complete label of this node over a single  line (no wrapping)         \\};         \matrix[matrix of nodes,nodes=generalStyle, below=of a.south west, anchor=north west] (b) {             x & \ldots &  |[fill=blue!20, text width=150pt]| I could extend the node width\ldots         \\};         \matrix[matrix of nodes,nodes=generalStyle, below=of b.south west, anchor=north west] (c) {             x & \ldots &  |[fill=blue!20, text width=150pt]| \ldots but then it would not work if the text changes. It would be much better to locally {\bfseries unset} the {\ttfamily text width} option: How to do that?         \\};     \end{tikzpicture}     \end{document}      and the output of its compilation: ![Use case for a post-facto cancellation of text width in TikZ](http://i.stack.imgur.com/LpDk2.png)


title: Text not covering full linewidth

text: I am making a project report for college. In the instructions regarding report,it is written that "The matter contained in the report should be typed in MS word (1.5 spacing) Times New Roman,12 pt or equivalent with other software" So,I decided to make my report with LaTeX.Here is some code,I am experimenting with:               \documentclass [a4paper,12pt,oneside,fullpage]{report}     \pagestyle{empty}     \usepackage{setspace}     \begin{document}          \section*{Acknowledgement}     \begin{onehalfspace}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vitae justo dolor. In justo felis, facilisis et rhoncus in, feugiat eu elit. Aenean mollis arcu ut nunc pharetra vitae sagittis sapien feugiat. Pellentesque feugiat egestas nulla eleifend accumsan. Suspendisse fermentum dignissim erat vitae congue. Praesent adipiscing erat in nunc tristique porttitor. Ut vitae erat sit amet dui ultricies semper non et enim. Mauris vel sem a risus egestas elementum et vel neque. Mauris consequat, nulla eu aliquet tincidunt, dui libero molestie ligula, nec convallis metus metus vitae elit. Etiam turpis ante, mattis quis elementum et, fermentum a mi. In in sem massa, vel egestas arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non iaculis libero. In nibh mauris, interdum ut imperdiet ut, eleifend nec dolor.     \end{onehalfspace}         \end{document}      which on compilation generated this PDF ![](http://i.stack.imgur.com/WKjPh.jpg) But if I copy,paste the same text in Libreoffice (12 font-size and Times New Roman) and then export it to PDF,it looks like ![](http://i.stack.imgur.com/iqhim.jpg) LaTeX prints the same paragraph in 12 lines,while Libreoffice prints it in 9 lines. So,is it safe to go with LaTeX (the instructions has to be followed strictly)? Is this the default behaviour of LaTeX or am i missing something (most probably) perhaps something (margin,linewidth,text alignment) ? Thanks in advance...


title: Cropping 3D Graphs in Asymptote

text: I would like to crop the 3D graph below at the plane z=1. I have tried using `limits((-1,-1,0),(1,1,1),Crop);`, but this just removed my frame. ![enter image description here](http://i.stack.imgur.com/bMlYu.png)               \documentclass{article}     \usepackage{asymptote}          \begin{document}          \begin{asy}[width=0.5\linewidth]     import graph3;     size(200,200,IgnoreAspect);          currentprojection=perspective(4,2,3);          real f(pair z) {return sqrt(4*(z.x)^2+(z.y)^2);}          draw(surface(f,(-1,-1),(1,1),nx=30,Spline),green+opacity(0.4),render(merge=true));          limits((-1,-1,0),(1,1,1),Crop);          xaxis3("$x$",Bounds,InTicks);     yaxis3("$y$",Bounds,InTicks(beginlabel=false));     zaxis3("$z$",Bounds,InTicks);     \end{asy}          \end{document}      Note: I'm sure I could the graph I want by scaling a cone, but I would like to be able to crop the graph of f(x,y) in other circumstances too. I am aware of this question How to cut a surface at the intersection with another surface in Asymptote?, but its answer is insufficient and I would guess that an easier way exists.


title: Please tutor the usage of patchcmd and xpatch

text: I understand that the `patchcmd` package provides a command `\patchcommand` that can be used to add material at the beginning and/or end of the replacement text of an existing macro. It works for macros with any number of normal arguments but has limitations for macros with optional arguments. `xpatch` was introduced to take care of the above limitations as well as provide some additional functionality. Now, when I try to comprehend the usage of the above packages by reading the user documentations (patchcmd, xpatch), I get the feeling that they move to implementation details a little too quickly compared to other package documentations. There are not enough explanations or examples. I also tried to grasp the concepts by reading the relevant portion of TeX FAQ and more or less understood whatever is presented there. However, that is not enough. So, do you think we can ask for a complete tutorial on the usage of `patchcmd` and `xpatch`? Explaining the usage of the relevant commands like `\patchcmd`, `\pretocmd` and `\apptocmd` as well as, `\xpatchcmd`, `\xpretocmd` and `\xapptocmd` with sufficient examples should suffice.


title: siunitx with product-units, scientific-notation and exponent-to-prefix

text: When using the `siunitx` package I have noticed some strange and unwanted behaviour. I was hoping someone can help me determine if this is a bug or I'm just using it incorrectly. I've created two cases:               \documentclass{article}     \usepackage{siunitx}          \begin{document}          Case one: \SI{0.9x3.5}{\mm}          Case two: \SI[scientific-notation = engineering, exponent-to-prefix]{0.9x3.5}{\mm}          \end{document}      which gives the following output: ![siunitx comparison of scientific-notation = engineering, exponent-to-prefix](http://i.stack.imgur.com/evka8.png) Clearly, _Case two_ is incorrect. I would expect either 0.9mm x 3.5mm or 900um x 3500um, preferably the former. I've used the options in _Case two_ as part of the `siunitx` package options for my document, and the incorrect behaviour occurs throughout my document. I know it is possible, but I'd rather not manually unassert the options for each case where this occurs for the sake of code flexibility. I'd really appreciate any help or suggestions. Thanks in advance!


title: How to put white spaces in JLaTeXMath

text: We are using JLatexMath library in java project to export some expression into JLatexMath. Code:               texCode="\\mathrm {let} {x}"      It shows `Letx`. What I need is `Let x`, space between `Let` and `x`. Does anybody knows how to put spaces between them. Thanks forward.


title: Using oldstyle numbers in XeLaTeX math mode for ONLY inline math

text: Is there any way to use OldStyle numbers for text and inline math only, while using Lining in the align and equation environments? Ideally via mathspec, but I'm open to other solutions.


title: How to get microtype to work with mathematical minus sign and package lmodern?

text: Using the package microtype by including the line               \usepackage{microtype}      in the preamble subtly alters the appearance of a typeset document by, amongst other things, letting optically less dense characters, like dashes or punctuations, protrude slightly in the margins. When I use a mathematical minus sign in a document written in the class article, I write it like this:               $-$      If I include \usepackage{lmodern} in the preamble, the minus sign does not get moved out a little bit if it happens to become the first character of a line, but stays at the same horizontal position as for example an "m" letter. Microtype does work for the plus sign and dashes, including when the plus sign is written in math mode:               $+$      Does anyone know how to enable microtype also for the mathematical minus sign when using lmodern? When not using lmodern, the problem can be fixed as suggested by Mico by using \usepackage[protrusion=allmath]{microtype}. edit: MWE, for which the fix to use \usepackage[protrusion=allmath]{microtype} **does not** work. Here is some example code that generates the incorrectly placed mathematical minus sign:               \documentclass{article}     \usepackage{lmodern}     \usepackage[protrusion=allmath]{microtype}     \begin{document}     \section{Test Section}     \label{Test Label}     Test text to reproduce the microtype mathematical minus sign problem that I experienced. I am putting in a few more words to get some text to demonstrate the effect. This is just some text with mathematical minusaaaaaaaaaaaa signs $-$inserted (that was a mathematical minus sign in front of ``inserted'')aaaaa. A +plus sign looks like that. In a longer text that I had, the plus sign looked fine, but the minus sign clearly looked like it was to far in. I am now putting in some more text, just to get one more line to show the look of the left margin.     \end{document}      Compiled result (first an enlargement to show the left margin, and then the entire page): ![Crop of the compiled page](http://i.stack.imgur.com/hB7vi.png) ![enter image description here](http://i.stack.imgur.com/zkoMK.png)


title: Integration of arara in Texmaker

text: The documentation of `arara` has a chapter about _IDE integration_. However the often used editor Texmaker is missing. The installation of the tool itself is well described in the documentation of `arara`   * How can I integrate the great tool `arara` in Texmaker?    * Is it possible to define a new button?   * Are there any differences between the integration in different OS? A small introduction with pictures would be nice :-)


title: WinEdt Tree to the right

text: Is there any way to move the tree panel in Winedt to the right? By default it is in the left side, and I am wondering how one can move it to the right side?


title: hyperref package - link boxes are too small (overlap the text)

text: The boxes the hyperref package creates around links in my document are too small, hiding out the characters. I'm using latex to get a DVI, then dvi2pdfm to get a PDF. Both from MikTex 2.8. Here's an example:               \documentclass[letter,10pt]{article}     \usepackage[dvipdfm]{hyperref}     \begin{document}     \section{Example}     \section{Example} \label{example}     Section \ref{example}.     \end{document}      As you can see in the picture below, the resulting box overlaps the "2". Below it is how I expect it to look, copied from some PDF on the web (not mine). ![enter image description here](http://i.stack.imgur.com/X6RV2.png) I get the same problem if I use the "hypertex" driver in hyperref. Any ideas on how to fix this?


title: Is there a way to pad zeros to the end of a rounded number with Expl3?

text: I've been able to put a table of trig values together using `expl3`. However, I would like to pad zeros to the end so that all values have four decimal places. Is there a straight-forward way to do this in `expl3` or do I need to build my own macro to handle this? This is related to a similar question I just posted: Is there a simple way of improving the precision of pgfmath for trig functions? Here's my MWE:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{calc}          \def\mynum{0}     \def\myvoffset{0pt}          \usepackage{xparse}     \ExplSyntaxOn     \def\aetan#1{\fp_eval:n { round ( tand ( #1 ), 4 )}}     \def\aesin#1{\fp_eval:n { round ( sind ( #1 ), 4 )}}     \def\aecos#1{\fp_eval:n { round ( cosd ( #1 ), 4 )}}     \def\aemod#1{\fp_eval:n { #1 - round0 ( #1 / 5 , 0 ) * 5}}     \ExplSyntaxOff          \usepackage[margin=0.5in]{geometry}          \begin{document}          Using \LaTeX3          \begin{tikzpicture}            \coordinate(UL) at (0,0);            \node at (UL) {Degrees};       \node[anchor=west] at ($(UL.west)+(1cm,0)$) {$\sin$};       \node[anchor=west] at ($(UL.west)+(2.75cm,0)$) {$\cos$};       \node[anchor=west] at ($(UL.west)+(4.50cm,0)$) {$\tan$};                 \foreach \myn in {1,2,3,...,45}       {         \ifnum\aemod{(\myn-1)}=0\relax           \xdef\myvoffset{\dimexpr\myvoffset+1.350\baselineskip}%%         \else           \xdef\myvoffset{\dimexpr\myvoffset+1.00\baselineskip}%%         \fi              \coordinate (DEG/\myn)   at ($(UL.west)-(0,\myvoffset)$);         \coordinate (DEG/S/\myn) at ($(DEG/\myn)+(1cm,0)$);         \coordinate (DEG/C/\myn) at ($(DEG/S/\myn)+(1.75cm,0)$);         \coordinate (DEG/T/\myn) at ($(DEG/C/\myn)+(1.75cm,0)$);              \node[anchor=east] at (DEG/\myn)   {$\myn^\circ$};         \node[anchor=west] at (DEG/S/\myn) {\texttt{\aesin{\myn}}};         \node[anchor=west] at (DEG/C/\myn) {\texttt{\aecos{\myn}}};         \node[anchor=west] at (DEG/T/\myn) {\texttt{\aetan{\myn}}};            }          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Ffy8J.png)


title: How does this macro for augmented matrices work?

text: I've used this code I found somewhere to typeset literally hundreds of augmented matrices, and it's been amazing:               \documentclass[a4paper,12pt]{article}     \usepackage{amsmath}     \usepackage{arydshln}     \makeatletter       \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%         \hskip -\arraycolsep         \let\@ifnextchar\new@ifnextchar       \array{#1}}     \makeatother          \begin{document}     \(\begin{bmatrix}[ccc:c]       1&2&3&0 \\       4&5&6&0 \\       7&8&9&0 \\     \end{bmatrix}\)     \end{document}      My TeX and LaTeX skills are, um, fledgling. But I'm doing my best to learn. However, I'm having trouble figuring out exactly how the redefined matrix command as above works. Here's my best guess. Can you correct me and/or fill in the gaps?   1. `\makeatletter`: The `@` character by default entails some special significance and this command temporarily removes that special significance.   2. `\renewcommand*`: This is for redefining an existing macro. The starred variation here prevents the accidental inclusion of multiple paragraphs (`\n\n` or `\par`) when the macro is used.   3. `\env@matrix`: This is the command we're renewing, presumably. Is it defined somewhere in `amsmath`? Does it really have an `@` symbol in its name?   4. `[1]`: This means the newly renewed command takes one optional argument.   5. `[*\c@MaxMatrixCols c]`: I don't know what the `*` at the beginning of this does. `\c` (afaik) is for doing cedillas, but that doesn't seem to fit here. `MaxMatrixCols` is a variable defined in `amsmath` that's 10 by default, are we doing some math with it here? Or re-setting it? Or what? The final `c` I also have no idea about. In fact, what is this entire construction? Is it some pattern matching for the optional parameter?   6. `{%`: The clever use of a comment here is presumably to ignore the newline. However, I don't see any difference in the spacing without it.   7. `\hskip -\arraycolsep`: This is a backspace by the amount of `\arraycolsep`   8. `\let\@ifnextchar\new@ifnextchar`: This is shadowing the command `\@ifnextchar` or something, but why? Neither `\@ifnextchar` or `\new@ifnextchar` seem to be used.   9. `\array{#1}}`: This inserts a raw array, and passes along the parameter. I'm unsure if `#1` here refers to the optional `[ccc:c]` specification, or the actual contents of the matrix.   10. `\makeatother`: This presumably returns the `@` symbol to its normal status.


title: Text boxes with scalable image as background

text: Is it possible to define text boxes with modifiable with and height which use a background image which should scale when you modify the width or height of the box. More complicated, it should be allowed in some way, that the background image has some elements which should scale and other which are not allowed to scale. For example consider something like this: ![](http://i.stack.imgur.com/em3mV.jpg) ![](http://i.stack.imgur.com/Rudnd.jpg) ![](http://i.stack.imgur.com/hHkip.png) ![](http://i.stack.imgur.com/zPohn.png) In that cases the pins for example should not scale, but the slip of paper should do.


title: Changing the format of ordinal numbers (\the…) and related strings

text: I develop a package that improves LaTeX support for the Latvian language. One of the things I have here is different style used for things like _Chapter 1_ , _Theorem 1.1_ etc. First, the phrase is written using ordinal numbers. Second, there is an ordinal indicator in a form of a period. By these rules, _Chapter 1_ becomes _1. nodaļa_ , which literally means _1st chapter_. Accordingly, in the package I have to:   * swap the name and the number in places like `\@makechapterhead` and `\@part`;   * make the period appear everywhere where the number is printed or referenced, such as headings, `\ref`-s etc. Of course, I want to support not only the standard classes, but also packages the user might load. I can see three ways how to do this: **Method 1:** Redefine all relevant `\the…` commands to contain the period, and also swap `\the…` and text in appropriate places. Cons:   * This is not a universal solution — we add the `\the…` commands to the list manually   * Per every new object type to be supported, up to two redefinitions may be needed — one for the number and one for the macro typesetting the heading/caption text   * When a number not ending with a digit is constructed by some third-party package, it might end up with a period in the middle ( _Figure 1.a_ ), which is wrong. In general, if a `\the…` macro we don't know about tries to use a `\the…` macro we have redefined, the output may contain superfluous periods. **Method 2:** Eliminate the first method's Con #1 and partially Con #2 by altering `\arabic` instead of the `\the…` macros. But this will produce a period in all places where `\arabic` is used, meaning that there is a good chance to break something elsewhere. **Method 3:** Do not change the number format directly, but rather add the period in places where the number is typeset, for example, figure/table captions, `\@seccntformat`, `\ref`, `\numberline`. Pros:   * The number of places where the value of `\the…` is output is largely limited, and packages usually don't introduce new ways to do it. This looks better than redefining all `\the…` commands.   * If, however, a package has a custom place where the number is typeset, then it's most likely the new heading (like `amsthm` defines a macro to output _Theorem 1_ ). But we need to swap the number and the text, thus we have to change the new heading anyway! When we do this, we might as well add the period. Therefore, now only one redefinition per package (more precisely, per object type) suffices. Cons:   * Since now `\ref`, `\numberline` and similar things have to add the period, they have to expand and analyze the number to tell if it ends with a digit (we shouldn't put a period after the number _1a_ ).   * Not very semantic Currently I have implemented method 3. But I don't particularly like the implementation. On the other hand, I also don't see any more convenient way to achieve the goal. So, the question: can the task specified in the first paragraph be done better than in the described solutions?


title: skipping the first line of a data file for pgfplotstable

text: I need to skip the first row of a csv file, which is auto-generated by some magic measurement apparatus. It contains its own filename as the first line. The second line contains the column names (no problem) and then the data follows:               C:\someFolder\measure\....\measurement.csv     "F_1k", ....     134.56, ....      I have found the method of reading the whole file line by line and then writing every line but the first one to a temporary file, but that seems brutal. TH.'s answer to File input and output can be modified to do just that. As far as I know, pgfplots and datatool can not skip lines of a csv file. Manually removing the first line is not an option, I have several hundreds of these beasts. I also try to avoid external programs because the resulting code will be used on different platforms.


title: Problems with error message when using listings-package and inputenc.

text: I want to include the code of some script in my LaTeX document. In a "minimal" example, it works perfectly well - but **only if I leave out the line`\usepackage[latin1]{inputenc}`**:               \documentclass[]{scrbook}     \usepackage{listings}     \usepackage{xcolor}          \usepackage[latin1]{inputenc}          \begin{document}          % % % % Definitionen der Code-Darstellung mit listings-Package     \lstset     {breaklines=true,         tabsize=3,         showstringspaces=false}          \lstdefinestyle{VBACommon}     {extendedchars=true,         language={[Visual]Basic},         frame=single,         %===========================================================         framesep=3pt,%expand outward.         framerule=0.4pt,%expand outward.         xleftmargin=3.4pt,%make the frame fits in the text area.          xrightmargin=3.4pt,%make the frame fits in the text area.         %===========================================================          %rulecolor=\color{Black}     }          \lstdefinestyle{A}     {style=VBACommon,     %    backgroundcolor=\color{Yellow!10},         basicstyle=\scriptsize,         keywordstyle=\bfseries,         identifierstyle=\scshape,         stringstyle=\ttfamily,         commentstyle=\color{grau}     }                    \lstdefinestyle{B}     {style=A,     %    backgroundcolor=\color{Yellow!10},         language=VBScript,         basicstyle=\scriptsize,         keywordstyle=\bfseries,         identifierstyle=\scshape,         stringstyle=\ttfamily,         commentstyle=%\color{}     }          \lstinputlisting[style=B]{/Volumes/Daten/Martin/FZK-Diss/Daten/_DISSschrift/Diss/ProgrammCode/VBScript/LIB_AcquireScriptingMB.wsf}          \end{document}      The input file looks like that and is (says my text editor) in TextEncoding **ISO Latin 1** :                 If dblPunkteX = dblPunkteY and dblRangeX = dblRangeY then                     strSchrittweite = "dxy" & dblPunkteX & "µm"'(dblSchrittweiteBerechnen(dblRangeX, dblPunkteX))          else strSchrittweite = "dx" & dblPunkteX & "µm" & "_dy" & dblPunkteY & "µm" '& dblSchrittweiteBerechnen(dblRangeX, intPunkteX) &     "dy" & dblSchrittweiteBerechnen(dblRangeY, intPunkteY)   end if       'Rueckgabewert   strDateinameErstellenAut =  strVerz & strTeilBez &     intZaehler & "-" & strTeilZust & "-" _                       & strMessPos & "_" & strMessbereich & "_" & strSchrittweite End Function      I get **error messages** like that - it seems to be the quotation signs `"` or the `µ`s:               (/usr/local/texlive/2010/texmf-dist/tex/latex/listings/lstlang2.sty)     /Volumes/Daten/Martin/FZK-Diss/Daten/_DISSschrift/Diss/ProgrammCode/VBScript/LI     B_AcquireScriptingMB2.wsf:3: Extra }, or forgotten $. \lst@OutputToken     ...@token \@empty \lst@righthss }                                                       \lst@CalcLostSpaceAndOutpu... 3 ...strSchrittweite = "dxy" &     dblPunkteX & "µm"                                                       '(dblSchrittweiteBerechnen...          ?      Unfortunately I don't know how to fix that, as I need the `inputenc` for other purposes.


title: How can I put a name's prefix in front in citations but *not* in the bibliography?

text: For my Dutch thesis I need to have the prefix to a name when using the `\cite` command but not in the bibliography. So basically what I need is > Cite: ‘De Jonge’ > > Bibliography: ‘Jonge, Marinus, de’ I cannot achieve this at the same time with `biblatex`, as it seems that I need `useprefix=true` for the citations and `useprefix=false` for the bibliography. Can anyone help?


title: Horizontal and Dashed lines in caption

text: What I'm looking to do is caption a graph with something like "It can be seen from x (solid line) and y (dashed line)" Where "solid line" and "dashed line" are replaced by two solid and dashed lines centered vertically inline with the text of the caption. Using               \protect\rule{1cm}{.4pt}      Gives a solid line, but it is not centered with respect to the height of the text. Is this possible?


title: Error using line break in 'cases' environment

text: I'm trying to display quite a simple 'cases' type equation in Texmakerx, but it appears to be ignoring the \\ and & uses.               \documentclass[journal]{IEEEtran}     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage[T1]{fontenc}     \usepackage{amsfonts}          \begin{document}          \begin{equation}       f_i^* =        \begin{cases}         \frac{4}{9}  &  i = 0 \\          \frac{1}{9}  &  i = 1,2,3,4 \\          \frac{1}{36} &  i = 5,6,7,8        \end{cases}     \end{equation}          \end{document}      When I display it in http://www.codecogs.com/latex/eqneditor.php it works just fine But Texmakerx and pdflatex give me the whole thing on a single line and with no spaces between the terms. (Would post a picture to clarify, but it won't let me) I'm using Texmakerx, MikTek, and pdflatex on windows 7. Any ideas? Thanks in advance for your patience with a newbie!


title: How to insert a landscape normal-sized pdf page between beamer slides?

text: Since I have too large a table to show during a presentation, I would like to insert a landscape pdf page between slides.


title: Chaptername in header except for Chapter page using fancyhdr

text: I am trying to achieve a header that displays topic, chapter and page number on every page except on pages where a new chapter begins. In that case the chapter space should be empty. I use fancyhdr and tried the following:               \documentclass[fontsize=12pt, paper=a4, headinclude, twoside=false, parskip=half+, pagesize=auto, numbers=noenddot, open=right, toc=listof, toc=bibliography]{scrreprt}          \usepackage{fancyhdr}     \fancyhf{}     \lhead{\itshape BA TOPIC}     \chead{\itshape{\nouppercase{\leftmark}}}     \rhead{\thepage}     \lfoot{}     \cfoot{}     \rfoot{}          %define header style for chapter pages     \fancypagestyle{chapt}{         \fancyhf{}         \fancyhead[L]{\itshape{BA THEMA}}         \fancyhead[C]{}         \fancyhead[R]{\thepage}     }          \renewcommand*{\chapterpagestyle}{chapt}          \begin{document}     \pagestyle{empty}     \pagenumbering{Roman}          %Titlepage     \input{title.tex}          %ToC etc     {     \hypersetup{linkcolor=black}         \pdfbookmark[1]{Inhaltsverzeichnis}{toc}         \tableofcontents         \listoffigures         \listoftables     }          \clearpage     \pagestyle{fancy}          % actual Content     \chapter{Einleitung}     \pagenumbering{arabic}          \end{document}      now i get the topic+pagenumber header for my chapter pages, but also for the ToC, and more important - i dont get any of the following pages to display the corresponding chapter name in its header. Any help would be appreciated.


title: \autocite Highlighted yet works?

text: I have problem in which I am using `\autocite` within TexMakerX and it is being highlighted as an unrecognized command yet, when I use the LaTeX to PDF command, it seems to work. There is no error when I run LaTeX on the document. In addition, I would like the citation to include the author's name in the footnote, currently it is just the title, publisher, etc. My document looks like this               \documentclass{article}     \usepackage[notes]{biblatex-chicago}     \bibliography{bibliography}     \begin{document}          Hello World!\autocite{clare2}          \end{document}


title: How to type Eastern Arabic Numerals

text: Is there any easy way to type Eastern Arabic Numerals in TeX? I mean these numbers: `(٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩)`. Please note that I don't want to change the localization settings of my computer to non-US languages. I use US keyboard with US-English localization and need to type eastern Arabic numbers easily.


title: Beamer - How to customise the header of a frankfurt slide?

text: I use the following options:               \usetheme{Frankfurt}     \setbeamercolor{section in head/foot}{fg=black, bg=white}      and this yields a slide which looks like this: ![enter image description here](http://i.stack.imgur.com/kvMr9.png) Is it possible   * to bring 'Section 1' and 'Section 2' closer together?   * to draw a separation line before the frame title ?


title: Matrix column spacing

text: I am using a matrix in `Plain TeX`, and the spacing between columns is too large. Since I'm also changing the paper size, the matrix runs off the side of the page. A minimal example is               \input eplain          $$       A =         \left\{           \matrix{             (1&1&(1&0&0)^6&||&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1^{30})\cr             (1&1&(1&0&0)^6&||&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1^{30})\cr             (1&1&(1&0&0)^6&||&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1^{30})\cr             (1&1&(1&0&0)^6&||&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1^{30})\cr           }         \right\}     $$          \bye      I can shrink the columns by inserting an `\hskip` before each `&`, but that makes the source difficult to read. Is there a nicer way to control this spacing?


title: Creating double arrow / parallel arrows with tikz

text: I just spent a couple of hours trying to figure this out, using google etc. but I couldnt find the answer. I made this diagram and the only thing I want are two parallel arrows that go from node A to B and vice versa, so that I can label both arrows differently, because both nodes interact. I dont care which "nodes" of the matrix you use. I would be REALLY THANKFUL, if you could help me, it shouldnt be that difficult I suppose.               \begin{tikzpicture}[description/.style={fill=white,inner sep=2pt}]     \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}     \matrix (m) [matrix of math nodes, row sep=6em,     column sep=6em, text height=3ex, text depth=0.5ex]     { & (T_t)_{t\geq 0} & \\     (\mathcal{A},\mathcal{D}(\mathcal{A})) & & (R(\lambda,\mathcal{A}))_{\lambda\in \rho(\mathcal{A})} \\ };     \path[->] (m-2-3) edge (m-1-2);     \path[->] (m-1-2) edge (m-2-1) edge node[above left] {$ \mathcal{A}f=\lim_{t\downarrow 0}\frac{P_tf-f}{t}$} (m-2-1);     ;     \path[->] (m-2-1) edge (m-2-3);     \end{tikzpicture}


title: Have page number on the left side of the empty page before the start of a chapter

text: I've been working a while now to get the layout the way I want it, but I still have two things that I can't seem to get fixed. I would like to have the page number of the empty page before the start of a chapter on the left side instead of the right side. Furthermore, I would like to have the content page to start on an odd page and again have the page number on the empty page before the content page on the left side. So far, I have:               \documentclass[10pt,twoside]{book}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{etoolbox}     \usepackage{amssymb}     \usepackage{bbold}     \usepackage{amsmath}     \usepackage{bm}     \usepackage{fancyhdr}     \usepackage[PetersLenny]{fncychap}     \usepackage{courier}     \usepackage[a4paper,inner=4cm,outer=1.5cm]{geometry}     \usepackage[nottoc]{tocbibind}     \usepackage[font=small,format=plain,labelfont=bf,up,]{caption}     \usepackage{flafter}          \let\origdoublepage\cleardoublepage     \newcommand{\clearemptydoublepage}{%       \clearpage       {\pagestyle{plain}\origdoublepage}%     }          \newcommand{\tstamp}{\today}        \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{#1}}     \lhead[\fancyplain{}{\thepage}]         {\fancyplain{}{\rightmark}}     \chead[\fancyplain{}{}]                 {\fancyplain{}{}}     \rhead[\fancyplain{}{\rightmark}]       {\fancyplain{}{\thepage}}     \lfoot[\fancyplain{}{}]                 {\fancyplain{\tstamp}{\tstamp}}     \cfoot[\fancyplain{\thepage}{}]         {\fancyplain{\thepage}{}}     \rfoot[\fancyplain{\tstamp} {\tstamp}]  {\fancyplain{}{}}          \fancypagestyle{plain}{%     \fancyhf{} % clear all header and footer fields     \fancyhead[RO,RE]{\thepage} %RO=right odd, RE=right even     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}}               \let\cleardoublepage\clearemptydoublepage          \begin{document}          blabla          \end{document}      To be honest, I don't know what any of the code means (mainly used Google, this forum and trial/error to get it like that). But I was wondering if anybody knows the answers to the two problems I have? This is an edit to clarify what my specifications are: Ok, I would like to have on all even pages, the page number on the left top side and on all the odd pages the page number on the right side. Furthermore, I would like to have the chapter name on the right side of all the even `\textit{after}` the start of the first chapter (i.e. after the `\mainmatter` command and the section title on the left side of odd pages. So to clarify, all the pages with roman number should only have the page number, but once the first chapter after the table of content has started I would like to have the chapter name on the even pages and section name on the odd pages.


title: How to make a text { in alltt

text: I am trying to type computer code in my document using the `alltt` environment. Some symbols, such as ' and {, do not appear in the document the way they do in the code. I solved the problem with ' by using the `upquote` package. But I still have a problem with { and }; these symbols are taller than the surrounding text in the `alltt` environment. For example,               \documentclass{article}     \usepackage[margin=2cm]{geometry} %set margins     \usepackage{color}     \usepackage{alltt}     \usepackage{upquote}          \begin{document}              \begin{alltt}         for (i in 1:3){             print(i^2)             }         \end{alltt}          \end{document}      doesn't do what I want (since the braces do not appear), and neither does using `\\{` and `\\}` in place of { and } (the braces are too tall). I think this question is something similar, but I do not understand the answers given there.


title: Custom Date on Latex

text: I have the following code:               \shortdayofweekname{<day>}{<month>}{<year>}.      Packages:               \documentclass[a4paper]{article}       \usepackage[english]{babel}       \usepackage[utf8]{inputenc}       \usepackage{amsmath}       \usepackage{graphicx}       \usepackage[colorinlistoftodos]{todonotes}       \usepackage{amsthm}       \usepackage{amssymb}       \newtheorem{thm}{Theorem}       \newtheorem{lma}{Lemma}       \newtheorem{df}{Definition}        \newtheorem{axiom}{Axiom}       \theoremstyle{definition}        \newtheorem{exmp}{Example}[section]       \usepackage{amsthm}       \newtheorem{theorem}{Theorem}        I want to customize the date on my paper so that it only says "May 2014" with custom size. How can I do this? I don't have any special packages imported. I'm also using writeLatex. Help is much appreciated.


title: Subscript and superscript in lstlisting?

text: I need to use subscript and superscript in a lstlisting block. lstlisting can replace strings by Latex commands, but is it also possible to replace some kind of regular expression like               _<something> and ^<something>      to identify the strings, that shall be replaced? Thanks :-)


title: Adding fields to title page / customizing title page

text: I need to add 3 supervisors to my titlepage. I found suggestions to make them part of \author, but it looks horrible, because every row is aligned by center (see picture). I would like to align somehow labels "Author" and "Supervisors" and in addition, all supervisors' names.               \author{Author: Me \\ Supervisors: First supervisor \\ Second \\ Third}      I tried to use tabular environment:               \author{\begin{tabular}[t]{p{3.5cm}}     test\\     test 1\\     \end{tabular}     }      But LaTeX gives an error: > ! Use of \begin doesn't match its definition. ![enter image description here](http://i.stack.imgur.com/mLpRn.jpg)


title: Graph not properly rendered in tikz

text: I have the following data in data.dat file .               TA   | OP      * * *               6    | 20     17   | 24     18   | 17     19   | 17     22   | 19     33   | 27     19   | 28     13   | 18     24   | 16     19   | 19     9    | 18     21   | 22     16   | 10     19   | 12     22   | 19     26   | 19     27   | 19     11   | 11     25   | 16     15   | 17     24   | 22     24   | 17     21   | 20      Here TA means Traditional approach and OP means Our Approach . I have to show a relation between these two columns . For this purpose I have the following code:               \begin{tikzpicture}[x=0.4cm,y=0.4cm]            \def\xmin{0}       \def\xmax{40}       \def\ymin{0}       \def\ymax{40}            % grid       \draw[style=help lines, ystep=1, xstep=1] (\xmin,\ymin) grid       (\xmax,\ymax);            % axes       \draw[->] (\xmin,\ymin) -- (\xmax,\ymin) node[right] {$x$};       \draw[->] (\xmin,\ymin) -- (\xmin,\ymax) node[above] {$y$};            % xticks and yticks       \foreach \x in {1,2,3,...,40}         \node at (\x, \ymin) [below] {\x};       \foreach \y in {1,2,3,...,40}         \node at (\xmin,\y) [left] {\y};            % plot the data from the file data.dat       % smooth the curve and mark the data point with a dot       \draw[color=blue] plot[smooth,mark=*,mark size=1pt] file {data.dat}        node [right] {data};          \end{tikzpicture}      But surprisingly I have got the following picture: ![enter image description here](http://i.stack.imgur.com/7ioDu.png) Why ? What Have I to do to get the right relationship ? The graph that shows the relationship between two column is as follows: ![enter image description here](http://i.stack.imgur.com/SXxYh.png)


title: Aligning a \marginnote to a theorem title

text: I want to create a `\marginnote` which is aligned to the title of a theorem. However, the `\marginnote` is always placed over or under the title, when I put the `\marginnote` command before or into the `theorem` environment.               \documentclass{article}          \usepackage{ntheorem}     \usepackage{marginnote}     \theoremstyle{break}     \theorembodyfont{\normalfont}     \newtheorem{definition}{Definition}          \begin{document}          \begin{definition}[my title]         \marginnote{my comment}         my definition     \end{definition}          \end{document}


title: pgfplots: "group" legend entries?

text: Actually, I'm working on a study where I've to plot a lot of temperature data etc. Therefore, I use "pgfplots". Everything works pretty well, so that I get the result as shown in the attached picture ![Nodal Temperatures](http://i.stack.imgur.com/glpMI.png). by using the following code:               \documentclass[tikz,border=1pt]{standalone}          \usepackage[ngerman]{babel}                              \usepackage[ansinew]{inputenc}     \usepackage[T1]{fontenc}                                 \usepackage{graphicx}      \usepackage{pgfplots}     \usepackage{amsmath}           % Settings for tikz-Image     \pgfplotsset{compat=1.10,         01_temp/.style={           %title=Knotentemperaturen,           legend columns=4,           legend style={               font=\scriptsize,              legend pos=north east,              draw=none,              /tikz/column 2/.style={                 column sep=5pt,              }           },            xmin=0,           xmax=200,           xlabel={Zeit $t$ [h]},           x tick style={             color=black,             thin           },                 ymin=15,           ymax=50,           ylabel={Knotentemperatur $T$ [$^\circ$C]},           y tick style={             color=black,             thin           },           height=9cm,           width=15cm,           grid=major,           grid style={              solid,              ultra thin,              gray           },           /pgf/number format/.cd,           use comma,           set thousands separator={},        }      }           \begin{document}            \begin{tikzpicture}          \begin{axis}[01_temp]            \addplot[black, thin, solid] table [x index=0,y index=1, skip first n=8] {01_temp.dat};             \addlegendentry{K 70101}             \addplot[black, very thick, solid] table [x index=0,y index=1, skip first n=8] {01_temp.dat};             \addlegendentry{K 70101}             \addplot[red, thin, dotted] table [x index=0,y index=2, skip first n=8] {01_temp.dat};             \addlegendentry{K 70201}             \addplot[red, very thick, dotted] table [x index=0,y index=2, skip first n=8] {01_temp.dat};             \addlegendentry{K 70201}             \addplot[green, thin, dashed] table [x index=0,y index=3, skip first n=8] {01_temp.dat};             \addlegendentry{K 70301}            \addplot[green, very thick, dashed] table [x index=0,y index=3, skip first n=8] {01_temp.dat};             \addlegendentry{K 70301}            \addplot[blue, thin, dashed] table [x index=0,y index=4, skip first n=8] {01_temp.dat};             \addlegendentry{K 70401}            \addplot[blue, very thick, dashed] table [x index=0,y index=4, skip first n=8] {01_temp.dat};             \addlegendentry{K 70401}            \addplot[pink, thin, dashed] table [x index=0,y index=5, skip first n=8] {01_temp.dat};             \addlegendentry{K 70501}            \addplot[pink, very thick, dashed] table [x index=0,y index=5, skip first n=8] {01_temp.dat};             \addlegendentry{K 70501}            \addplot[gray, thin, solid] table [x index=0,y index=1, skip first n=4] {01a_temp.dat};            \addlegendentry{Klima}            \addplot[gray, very thick, solid] table [x index=0,y index=1, skip first n=4] {01a_temp.dat};            \addlegendentry{Klima}         \end{axis}       \end{tikzpicture}          \end{document}       Both files (used in the code-example above) that contain the data look like (extract!):                     My office.       My project.       Nodal Temperature            Table of function values               t          K1          K2          K3          K4          K5              [h]        [°C]        [°C]        [°C]        [°C]        [°C]            0.000       20.00       20.00       20.00       20.00       20.00            1.000       19.98       19.98       19.98       19.99       20.00            2.000       19.95       19.95       19.95       19.98       19.99            3.000       19.92       19.91       19.92       19.98       19.99            4.000       19.94       19.94       19.94       20.04       20.04            5.000       20.07       20.07       20.08       20.19       20.17            6.000       20.33       20.33       20.33       20.46       20.41            7.000       20.70       20.70       20.70       20.81       20.72            8.000       21.16       21.16       21.17       21.22       21.08            9.000       21.69       21.69       21.70       21.66       21.47           10.000       22.27       22.27       22.28       22.12       21.88           11.000       22.89       22.89       22.89       22.58       22.28           12.000       23.52       23.52       23.51       23.01       22.66           13.000       24.16       24.16       24.14       23.42       23.02           14.000       24.80       24.79       24.76       23.80       23.35           15.000       26.61       26.61       26.55       25.22       24.61           16.000       28.55       28.55       28.44       26.64       25.85           17.000       30.53       30.52       30.36       27.99       27.03           18.000       31.27       31.26       31.06       28.14       27.14           19.000       31.97       31.96       31.72       28.25       27.24           20.000       32.63       32.62       32.32       28.33       27.30           21.000       33.26       33.25       32.89       28.38       27.34           22.000       33.86       33.84       33.43       28.41       27.36           23.000       34.43       34.41       33.93       28.41       27.36           24.000       34.98       34.95       34.40       28.40       27.34           25.000       35.49       35.46       34.84       28.38       27.32           26.000       35.98       35.95       35.26       28.34       27.28           27.000       36.45       36.41       35.64       28.29       27.23           28.000       36.89       36.84       36.00       28.23       27.17           29.000       37.31       37.26       36.33       28.16       27.11           30.000       37.71       37.65       36.64       28.09       27.04      Now to my question: If you look at the data-plot, you can see that I get always two lines (thin and thick) for every node. For example, Node "K 70101" has a thin and a thick data plot. In the example, both lines lie upon each other. (That's why it is a little bit difficult, to find the thin plots ...). Anyway: is it possible to generate a kind of "grouping" in the legend in that way that both lines (thin and thick) just get one legendentry? It's a little bit difficult to describe - that's why I created an image to show what I mean: ![grouped legend](http://i.stack.imgur.com/seJVE.png) It would be nice, if someone could help me. Unfortunately I didn't found some examples that I can modify to get the result I need ... Thank you in advance! * * * So, during the night I got a little idea and made a small step closer to the result I want to get. I managed it to "group" the legend-entries - unfortunately in one single column: ![one single column](http://i.stack.imgur.com/PlbXc.png) The "new" code is the following:               \documentclass[tikz,border=1pt]{standalone}              \usepackage[ngerman]{babel}                              \usepackage[ansinew]{inputenc}                           \usepackage[T1]{fontenc}                                 \usepackage{graphicx}      \usepackage{pgfplots}     \usepackage{amsmath}           \pgfplotsset{compat=1.10,         01_temp/.style={              %%   legend columns=2,          legend style={             font=\scriptsize,                legend pos=north east,            draw=none,     %%           /tikz/column 2/.style={     %%            column sep=5pt,     %%         }           },            xmin=0,           xmax=200,           xlabel={Zeit $t$ [h]},           x tick style={             color=black,             thin           },                 ymin=15,           ymax=50,           ylabel={Knotentemperatur $T$ [$^\circ$C]},           y tick style={             color=black,             thin           },           height=9cm,           width=15cm,           grid=major,           grid style={              solid,              ultra thin,              gray           },           /pgf/number format/.cd,           use comma,           set thousands separator={},        }      }           \begin{document}       \begin{tikzpicture}          \begin{axis}[01_temp]            \addplot[black, thin, solid] table [x index=0,y index=1, skip first n=8] {01_temp.dat};             \addlegendentry{}             \addplot[black, very thick, solid] table [x index=0,y index=1, skip first n=8] {01_temp.dat};             \addlegendentry{\smash{\raisebox{-0.3ex}{K 70101}}}             \addplot[red, thin, dotted] table [x index=0,y index=2, skip first n=8] {01_temp.dat};             \addlegendentry{}             \addplot[red, very thick, dotted] table [x index=0,y index=2, skip first n=8] {01_temp.dat};             \addlegendentry{\smash{\raisebox{-0.3ex}{K 70201}}}             \addplot[green, thin, dashed] table [x index=0,y index=3, skip first n=8] {01_temp.dat};             \addlegendentry{}            \addplot[green, very thick, dashed] table [x index=0,y index=3, skip first n=8] {01_temp.dat};             \addlegendentry{\smash{\raisebox{-0.3ex}{K 70301}}}            \addplot[blue, thin, dashed] table [x index=0,y index=4, skip first n=8] {01_temp.dat};             \addlegendentry{}            \addplot[blue, very thick, dashed] table [x index=0,y index=4, skip first n=8] {01_temp.dat};             \addlegendentry{\smash{\raisebox{-0.3ex}{K 70401}}}            \addplot[pink, thin, dashed] table [x index=0,y index=5, skip first n=8] {01_temp.dat};             \addlegendentry{}            \addplot[pink, very thick, dashed] table [x index=0,y index=5, skip first n=8] {01_temp.dat};             \addlegendentry{\smash{\raisebox{-0.3ex}{K 70501}}}            \addplot[gray, thin, solid] table [x index=0,y index=1, skip first n=4] {01a_temp.dat};            \addlegendentry{}            \addplot[gray, very thick, solid] table [x index=0,y index=1, skip first n=4] {01a_temp.dat};            \addlegendentry{\smash{\raisebox{-0.3ex}{Klima}}}         \end{axis}       \end{tikzpicture}         \end{document}       It would be fine if someone could help me, solving the **remaining problems:**   1. How is it now possible, to use a kind of **"3 column"-layout** with those grouped legend-entries?   2. How is it possible to **reduce the vertical space** of the 'sample-lines' in the legend? * * * So, I managed to move another step. My legend looks now like that: ![enter image description here](http://i.stack.imgur.com/WAsvr.png) ... the code is the following:                   \documentclass[tikz,border=1pt]{standalone}          \usepackage[ngerman]{babel}                              \usepackage[ansinew]{inputenc}                       \usepackage[T1]{fontenc}                                 \usepackage{graphicx}      \usepackage{pgfplots}     \usepackage{amsmath}           \pgfplotsset{compat=1.10,         01_temp/.style={           title={\textbf{Knotentemperaturen, $\varphi(t) = 0$}},           legend columns=6,          legend style={             font=\scriptsize,                legend pos=north east,            draw=none,            /tikz/column 1/.style={              yshift=-0.2em,            },            /tikz/column 2/.style={              column sep=-2em,            },            /tikz/column 5/.style={              column sep=-2em,            },            /tikz/column 9/.style={              column sep=-2em,            }           },            xmin=0,           xmax=200,           xlabel={Zeit $t$ [h]},           x tick style={             color=black,             thin           },                 ymin=15,           ymax=50,           ylabel={Knotentemperatur $T$ [$^\circ$C]},           y tick style={             color=black,             thin           },           height=9cm,           width=15cm,           grid=major,           grid style={              solid,              ultra thin,              gray           },           /pgf/number format/.cd,           use comma,           set thousands separator={},        }      }           \begin{document}            \begin{tikzpicture}          \begin{axis}[01_temp]            \addplot[black, thin, solid] table [x index=0,y index=1, skip first n=8] {01_temp.dat};             \addlegendentry{}             \addplot[black, very thick, solid] table [x index=0,y index=1, skip first n=8] {01_temp.dat};             \addlegendentry{K 70101}            \addplot[red, thin, dotted] table [x index=0,y index=2, skip first n=8] {01_temp.dat};             \addlegendentry{}               \addplot[red, very thick, dotted] table [x index=0,y index=2, skip first n=8] {01_temp.dat};             \addlegendentry{K 70201}            \addplot[green, thin, dashed] table [x index=0,y index=3, skip first n=8] {01_temp.dat};             \addlegendentry{}              \addplot[green, very thick, dashed] table [x index=0,y index=3, skip first n=8] {01_temp.dat};             \addlegendentry{K 70301}              \addplot[blue, thin, dashed] table [x index=0,y index=4, skip first n=8] {01_temp.dat};             \addlegendentry{}              \addplot[blue, very thick, dashed] table [x index=0,y index=4, skip first n=8] {01_temp.dat};             \addlegendentry{K 70401}              \addplot[pink, thin, dashed] table [x index=0,y index=5, skip first n=8] {01_temp.dat};             \addlegendentry{}              \addplot[pink, very thick, dashed] table [x index=0,y index=5, skip first n=8] {01_temp.dat};             \addlegendentry{K 70501}         \end{axis}       \end{tikzpicture}      \end{document}       Unfortunately, I didn't manage it to change the vertical spacing between those sample lines in the legend. - I tried a little bit with "yshift" but as I had to notice, this seems to be not the right way ... Maybe someone could help me ... that would be really nice! =) Thank you in advance, eniem


title: Two dimensional error bars in pgfpot

text: How can one plot a graph with specified error bars on both coordinates x and y in pgfplots? I have been trying to use the following:               \addplot[scatter,only marks,         scatter src=explicit symbolic,          error bars/.cd,         y dir=both,y explicit,         x dir=both,x explicit]      but then how do I specify the errors in the data?


title: Centering an asymmetric tabular

text: I'm trying to center a payoff table asymmetrically but I give up and I ask to you.   The problem is that this type of table appears different than how LaTeX sees it. In fact, the first column should not be considered part of the table when centering. How can I tell this to LaTeX? Here is the table: ![enter image description here](http://i.stack.imgur.com/vbv1i.png) As you see the table appears right shifted.   And here is the code found on tex.stackexchange.com and modified:               \documentclass{article}     \usepackage{caption}     \usepackage{adjustbox}     \newcommand{\mc}[3]{\multicolumn{#1}{#2}{#3}}          \begin{document}          \begin{center}     \begin{tabular}{rcccc}     \label{tab:inspectionGame}     &&$a$&$b$\\     \cline{3-4}     &\multicolumn{1}{p{0.3cm}}{\vfill\centering$A$}&     \multicolumn{1}{|p{1.5cm}}{\hfill $4$\newline $3$\hfill}&     \multicolumn{1}{|p{1.5cm}|}{\hfill $1$\newline $-3$\hfill}\\     \cline{3-4}     &\multicolumn{1}{p{0.3cm}}{\vfill\centering$B$}&     \multicolumn{1}{|p{1.5cm}}{\hfill $4$\newline $-3$\hfill}&     \multicolumn{1}{|p{1.5cm}|}{\hfill $-1$\newline $-4$\hfill}\\\cline{3-4}     \end{tabular}     \captionof{figure}{ Ash nazg durbatulûk, ash nazg gimbatul.}     \end{center}          \end{document}      EDIT: curiously someone had exactly my same problem (Center table by end of cell) just few hours ago. I try to apply that solution and if it works I'll delete my question. EDIT2: Maybe that solution is not exactly what I need or maybe I'm still too noob to generalize :-(


title: How to glue these cubes together to form one big cube?

text: \documentclass[tikz]{standalone}     \usepackage{pgfplots}          \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         view={110}{45},         hide x axis,          hide z axis,          hide y axis,             ]          \addplot3[only marks,scatter,mark=cube*,mark size=20] coordinates {%         (0,0,0) (0,0,1) (0,0,2) (1,0,0) (1,0,1) (1,0,2) (2,0,0) (2,0,1) (2,0,2)          (0,1,0) (0,1,1) (0,1,2) (1,1,0) (1,1,1) (1,1,2) (2,1,0) (2,1,1) (2,1,2)          (0,2,0) (0,2,1) (0,2,2) (1,2,0) (1,2,1) (1,2,2) (2,2,0) (2,2,1) (2,2,2)          } ;     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/RGEiA.png) **Edit 1** Empirical try with xmin, xmax ... and view, but if some on knows a more scientific approach ... Anyway seems too long in z direction ?               \documentclass[tikz]{standalone}     \usepackage{pgfplots}          \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}     \begin{axis}[xmin=0,xmax=3.5,ymin=0,ymax=7.5,zmin=0,zmax=5.5,         view={113}{20},         hide x axis,          hide z axis,          hide y axis,             ]               \addplot3[only marks,scatter,mark=cube*,mark size=20] coordinates {%         (0,0,0) (0,0,1) (0,0,2) (1,0,0) (1,0,1) (1,0,2) (2,0,0) (2,0,1) (2,0,2)          (0,1,0) (0,1,1) (0,1,2) (1,1,0) (1,1,1) (1,1,2) (2,1,0) (2,1,1) (2,1,2)          (0,2,0) (0,2,1) (0,2,2) (1,2,0) (1,2,1) (1,2,2) (2,2,0) (2,2,1) (2,2,2)          } ;     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/i5xP1.png) \documentclass[tikz]{standalone} \usepackage{pgfplots}               \newcommand{\MyCube}[1][]{%     \begin{scope}[very thin,line cap=round,line join=round,#1]       \draw[fill=blue!20] (0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--cycle ;     \draw[fill=red!20] (1,0,0)--(1,0,1)--(1,1,1)--(1,1,0)--cycle ;     \draw[fill=yellow!20] (0,1,0)--(0,1,1)--(1,1,1)--(1,1,0)--cycle ;     \end{scope}     }          \newcommand{\LineCubeX}[3][]{%         \begin{scope}[shift={#2}]         \foreach \x in {0,1,...,\the\numexpr#3-1} {%         \MyCube[shift={(\x,0,0)},#1] }         \end{scope}         }     \newcommand{\LineCubeY}[3][]{%         \begin{scope}[shift={#2}]         \foreach \y in {0,1,...,\the\numexpr#3-1} {%         \MyCube[shift={(0,\y,0)},#1] }         \end{scope}         }     \newcommand{\LineCubeZ}[3][]{%         \begin{scope}[shift={#2}]         \foreach \z in {\the\numexpr#3-1,\the\numexpr#3-2,...,0} {%         \MyCube[shift={(0,0,\z)},#1] }         \end{scope}         }          \pgfplotsset{compat=newest}          \begin{document}          \begin{tikzpicture}[z=.4cm]          \foreach \z in {3,2,1,0} {%         \foreach \y in {0,1,2,3} {%             \foreach \x in {0,1,2,3} {%                 \MyCube[shift={(\x,\y,\z)},opacity=.7] }}}          \end{tikzpicture}          \begin{tikzpicture}[z=.4cm]     % Face arrière       \LineCubeX{(0,0,8)}{9} ;     \LineCubeY{(0,1,8)}{7} ;     \LineCubeY{(8,1,8)}{7} ;     \LineCubeX{(0,8,8)}{9} ;     % montants horizontaux     \LineCubeZ{(0,0,1)}{7} ;     \LineCubeZ{(8,0,1)}{7} ;     \LineCubeZ{(8,8,1)}{7} ;     \LineCubeZ{(0,8,1)}{7} ;     % face avant     \LineCubeX{(0,0,0)}{9} ;     \LineCubeY{(0,1,0)}{7} ;     \LineCubeY{(8,1,0)}{7} ;     \LineCubeX{(0,8,0)}{9} ;     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/hIR5m.png)