title: How could the macro xii.tex be simplified into a better readable form

text: I was reading some TeX guides from where I have found this source:               \let~\catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF     PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP     A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP     AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi     Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx     :76jelse&U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL     RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse     B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI     I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;     ;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%     s$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G     LcYlaDLbJsW,SWXJW ree @rzchLhzsW,;WERcesInW qt.'oL.Rtrul;e     doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye      The text preceding the code is something like: > TeX is a macro language and the meaning of existing commands can be changed > on the fly, and also new commands can be dened on the fly [Knu84]. As > perhaps the most extreme example of this is David Carlisle's xii.tex TeX > code, which is obtainable as ftp://ctan.tug.org/tex- > archive/macros/plain/contrib/xii.tex: Now my question is, how this so-called extreme example of macro could be simplified to be readable to the beginner TeX/LaTeX users? I have run the code through TeX and I was really surprised to see the _result_! One more basic question I do have: Could all `TeX` commands be used from any `LaTeX` file? **EDIT** With the **answer** from **hendrik-vogt** and the **related answer** from **joseph-wright**, I was trying to understand the obfuscated code. TeXifying the code after adding `\traceall` at the beginning gives perhaps useful information, but still quite stumbling blocks to me is something like:               A71->~`7113\def      71<-L     {\catcode}     {\def}      That seems to me something like **BF**. Not very well, but still I am getting some hints what is going on behind the scene. Can someone help me what does the previous block of code means?


title: latex beamer no shadow on title

text: I use beamer class with Warsow Style. I use rounded with shadow box for the : alert, block and example. However I also get a shadow rounded box on the first slide on my title. My question is show to remove the shadow rounded box on my title on the first page ? Thanks


title: Include graphics links in table of contents

text: I've written a simple (automatized) report which includes many graphics by simple `\includegraphics`. Now I'd like to generate a table of contents link for each graphics which I can click due to package `hyperref`. So I wrote               \documentclass{article}     \usepackage{graphicx}     \usepackage{hyperref}     \begin{document}     \tableofcontents     \newpage     \section{Start}     \begin{center}     \includegraphics{mwe/example-image-a.pdf}     \end{center}     \addcontentsline{toc}{subsection}{A}          \begin{center}     \includegraphics{mwe/example-image-a.pdf}     \end{center}     \addcontentsline{toc}{subsection}{A}          \begin{center}     \includegraphics{mwe/example-image-a.pdf}     \end{center}     \addcontentsline{toc}{subsection}{A}          \begin{center}     \includegraphics{mwe/example-image-b.pdf}     \end{center}     \addcontentsline{toc}{subsection}{B}          \begin{center}     \includegraphics{mwe/example-image-a.pdf}     \end{center}     \addcontentsline{toc}{subsection}{A}     \end{document}      (not sure how MWE works :/). However, in the generated table of contents in the PDF, the links in the TOC get me to the wrong pages not showing the correct graphics. In the example clicking on TOC entry "B" does not get me to graphics "B". Is there a way to get correct references to my images?


title: How to make page numbers in a nomenclature hyperref links?

text: I want to create a nomenclature for a very large document using the nomencl. MWE:               \documentclass{article}          \usepackage[refpage]{nomencl}     \usepackage{hyperref}          \makenomenclature          \begin{document}          \nomenclature[N]{$N$}{some number}          \printnomenclature          \end{document}      This correctly creates the Output: ![output](http://i.stack.imgur.com/Rk2UE.png) Is it possible to make nomencl understand that hyperref is available such that 'page 1' or just '1' is a hyperlink you can click on and are actually referred to page 1?


title: understanding how to rotate arrows in tikz

text: I have seen the post on the rotation of arrows and one of the post is mine. However, I don't understand how to do accomplish it myself. For instance, I am making a picture of Hohmann transfer where on the orbits I want triangular arrows pointing counter clockwise and "v" type arrow on the transfer. This part is completed:               My goals is to put on the outer orbit 2 of the triangle arrows: one at 30 degrees and the other at 210 degrees.          The inner orbit 2 triangular arrows at 135 and 315 degrees.      For the Hohmann transfer I want to put 2 arrows: one about 40 percent of the curve and the other 70 percent. However, I also am not sure how to create an arc that goes between the two orbits and arrives at (-3,0). I tried the arc command but that was just guessing and it wasn't looking pretty. For some reason, only one arrow shows up on the Hohmann transfer. I specified at 0.15 and 0.35.               \documentclass[11pt]{article}      \usepackage{tikz, tikz-qtree,kurier, pgfplots}      \usetikzlibrary{arrows, decorations.markings, calc, fadings, decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}     \begin{document}     \begin{center}        \begin{tikzpicture}[line join = round, line cap = round, >=triangle 45]          \filldraw[orange!60!yellow!50!red, opacity = .75] (0,0) circle (.25cm);          \draw (0,0) -- (4,0);          \draw (0,0) -- (3,3);          \begin{scope}[decoration = {markings, mark = at position 0.0416 with {\arrow{>}}, mark = at          position 0.58333 with {\arrow{>}}, }]          \draw[postaction = decorate] (0,0) circle (3cm);        \end{scope}        \begin{scope}[decoration = {markings, mark = at position 0.375 with {\arrow{>}}, mark = at          position 0.875 with {\arrow{>}}, }]          \draw[postaction = decorate] (0,0) circle (1.5cm);        \end{scope}          \filldraw[red] (2.12132,2.12132) circle (.075cm);        \begin{scope}[decoration = {markings, mark = at position 1 with {\arrow{>}}, }]          \draw[postaction = decorate] (1,0) arc (0:45:1cm) node[scale = .75, fill = white,          inner sep = .05cm, circle] at (.5,.2) {$\alpha$};        \end{scope}        \begin{scope}[decoration = {markings, mark = at position 0.15 with {\arrow{>}}, mark = at          position 0.35 with {arrow{>}}, }]          \clip (-3,0) rectangle (1.5,3);          \draw[postaction = decorate] (-.75,0) ellipse (2.25cm and 2.4cm);        \end{scope}        \draw[fill = white] (-3,0) circle (.075cm);        \filldraw[top color = green!75!blue, bottom color = blue!40!green] (1.5,0) circle (.15cm);        \end{tikzpicture}     \end{center}     \end{document}


title: Improve diagram TikZ

text: I want to improve the visual appearance of the following diagram.               \documentclass{standalone}          \usepackage{lmodern}     \usepackage{mathtools}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric,shapes.multipart}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}     \usetikzlibrary{fit}     \usetikzlibrary{backgrounds}     \usetikzlibrary{decorations.pathmorphing}          \tikzset{every fit/.append style = text badly centered} % removes underfull warnings while using fit     \tikzset{%         default/.style = {draw, thick, align = center, shape = rectangle, minimum height = 10mm, minimum width = 20mm, text width = 15mm},         back1/.style = {draw = none, align = center, shape = rectangle, minimum height = 15mm, minimum width = 25mm, inner sep = 2mm},         back2/.style = {back1, draw, dashed, thick, minimum width = 30mm, inner sep = 4mm},         terminal/.style = {draw, thick, align = center, shape = circle, text width = 10mm},     }               \begin{document}     \begin{tikzpicture}          %      \node [default] (AAA) {AAA};     \node [default] (PPP) [right = of AAA] {NNN};     \node [default] (ZZZ) [right = of PPP] {ZZZ};     \draw [thick] (AAA) -- (PPP) -- (ZZZ);     \begin{pgfonlayer}{background}         \node [back1, fit = (AAA) (PPP) (ZZZ) ] (FFF) {};     \end{pgfonlayer}     \node [rotate = 90, anchor = south] at (FFF.west) {\textbf{FFF}};          %      \node [default] (QQQ1) at ($(AAA)!0.5!(PPP)$) [yshift = -20mm] {CCC};     \node [default] (QQQ2) at ($(PPP)!0.5!(ZZZ)$) [yshift = -20mm] {CCC};     \draw node [left = 1em of QQQ1] (DOTS1) {\dots};     \draw node [right = 1em of QQQ2] (DOTS2) {\dots};     \draw [thick] (QQQ1) -- (QQQ2);     \begin{pgfonlayer}{background}         \node [back1, fit = (DOTS1) (QQQ1) (QQQ2) (DOTS2) ] (DDD) {};     \end{pgfonlayer}     \node [rotate = 90, anchor = south] at (DDD.west) {\textbf{III}};          \begin{pgfonlayer}{background}         \node [back2, fit = (FFF) (DDD) ] (HHH) {};     \end{pgfonlayer}     %\node [rotate = 90, anchor = south] at (HHH.west) {\textbf{Network}};          %     \node [terminal] (BB1) at (AAA.west) [yshift = -60mm, xshift = 5mm] {BB};     \node [terminal] (BB2) [right = of BB1] {BB};     %\node [terminal] (BB2) at (BB1.east) [xshift = 15mm] {BB};     \draw[<->, thick] (BB1) -- (BB2);     %     \node [terminal] (BB4) at (ZZZ.east) [yshift = -60mm, xshift = -5mm] {BB};     \node [terminal] (BB3) [left = of BB4] {BB};     %\path [draw, thick, out = 295, in = 90] (HHH) edge (BB3);     %\path [draw, thick, out = 325, in = 90] (HHH) edge (BB4);          \begin{pgfonlayer}{background}         \node [back2, fit = (BB1) (BB2) ] (CCC) {};         \node [back2, fit = (BB3) (BB4) ] (DDD) {};     \end{pgfonlayer}     \draw[<->, thick] (BB3) .. controls +(up:40mm) and +(up:40mm) .. (BB4);          \node [anchor = north] at (CCC.south) {\textbf{CCC Mode}};     \node [anchor = north] at (DDD.south) {\textbf{XXX Mode}};     \draw [<->, thick] (HHH.south) -- (CCC.north) node [midway, left, align = center] {Assistance};          \end{tikzpicture}     \end{document}      Namely,   1. Improve layout to be more flexibility in the nodes distance: vertical and horizontal;   2. Text 'III' and 'FFF' shall be align at left   3. Vertical line (that has label of Assistance), put it straight.


I don't want to hardly code the value `6` in the following code as:   * I have to manually count the number of steps.   * The mechanism breaks when a block of code (`\Atom` in this example) is repeated in the same frame.               \documentclass{beamer}     \usepackage{pstricks}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{pspicture}     \PreviewBorder=12pt          \def\Atom{%         \bgroup         \only<6->{\psset{fillstyle=solid,fillcolor=cyan}}         \pscustom[linejoin=0]         {             \only<+->{\moveto(0,0)}             \only<+->{\lineto(2,0)}             \only<+->{\lineto(2,2)}             \only<+->{\lineto(0,2)}             \only<+->{\closepath}         }         \egroup     }          \begin{document}     \begin{frame}     \begin{pspicture}[showgrid](-3,-3)(3,3)             \Atom             \psscalebox{-1 -1}{\Atom}     \end{pspicture}      \end{frame}     \end{document}      Is it possible to implement a "label-goto"-like workflow in composing overlay? Something similar to               label xxx:          overlay 1     overlay 2     overlay 3          goto xxx


title: Define a macro for citation aliasing

text: How can I define a macro for the following citation               \defcitealias{author:year}{AuthorFirstName AuthorLastName}\citetalias{author:year} \citep{author:year}      such that `\cmdAlias{author:year}{AuthorFirstName AuthorLastName}` executes the above command?


title: Numbering all lines in a presentation

text: I would like everyline of a presentation to be numbered. Like the `lineno` package will do. I tried the following but it does not print line numbers. I don't see why, I know there are some `\par` caveats. But I don't really understand them.               \documentclass{beamer}     \usepackage[mathlines]{lineno}          \linenumbers          \begin{document}          \begin{frame}              A floating line              \begin{theorem}             Some line in a theorem         \end{theorem}              \begin{linenomath}             \begin{eqnarray*}                 x + y              \end{eqnarray*}          \end{linenomath}          \end{frame}          \end{document}      ![output](http://i.stack.imgur.com/kgWrI.png)


title: How to add horizontal line after references (biblatex) and glossary title?

text: I need to have horizontal lines after each title. For `table of contents` this works with:               \renewcommand{\cftaftertoctitle}{\vskip 3em \auftaktvz}      and               \newcommand{\auftaktvz}{{\vspace{-24pt}\rule{\textwidth}{0.5pt}\vspace{-30pt}}{\noindent}}      So it looks like:               Table of contents     ----------------------------------------          1. ABC     2. EDF ...      For chapters this works with:               \chapter{My chapter title}\auftakt      and               \newcommand{\auftakt}{{\vspace{-24pt}\rule{\textwidth}{0.5pt}\vspace{40.5pt}}{\noindent}}      so it looks like               My chapter title     -------------------------------------------          My text goes here...      How can I change the formatting of the references and glossaries titles so that a horizontal line is also drawn there?               \usepackage[bibstyle=authoryear, autocite=footnote, citestyle=authoryear-icomp, autopunct=false, urldate=long, abbreviate=false, dateabbrev=false, backend=biber]{biblatex}     [...]     \usepackage[toc,xindy,nonumberlist,numberedsection=autolabel]{glossaries}          [...]          \printbibliography     [...]     \printglossary[title=\glossaryname,toctitle=\glossaryname]       Currently these title heading are just printing like:               References          o Here comes list of authors...      and               Glossaries          List of Glossaries      How can I also get a horizontal line (rule) below the `References` and `Glossaries` titles?


title: XeLaTeX and unicode-math problems

text: I am using XeLaTeX (TeXLive 2011) on OS X. It seems that unicode-math is not working as it should:               \usepackage{unicode-math}     \setmathfont{XITS Math}      Produces:               kpathsea: Invalid fontname `XITS Math/ICU', contains ' '      Same error occurs with Asana Math and Neo Euler.


title: table of contents has wrong section references (scrreprt)

text: I noticed wrong references in my toc of my document. I'm trying to provide an MWE as goog as possible. Here's my code:               \documentclass[final,12pt,abstracton,oneside,a4paper,bibliography=totocnumbered,     numbers=noenddot,listof=totoc]{scrreprt}          %% *** INCLUDES *** {{{     % my imports     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage[babel,german=quotes]{csquotes}     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{geometry}     \usepackage{lastpage}     \usepackage[usenames,dvipsnames]{color}     \usepackage[ngerman, num]{isodate}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     %\usepackage[novbox]{pdfsync}     \usepackage{enumerate}     \usepackage{listings}     \usepackage[square]{natbib}     \usepackage{setspace}     \usepackage{rotating}          % imports from template     \usepackage{amsfonts}     \usepackage{tabularx}     \usepackage[right]{eurosym}     \usepackage[printonlyused]{acronym}     \usepackage{paralist}     \usepackage{parskip}     \usepackage[titles]{tocloft}     \usepackage[pdfpagelabels=true]{hyperref}          % stay synced within pdf and Vim     %\synctex=1     % --- Icludes (end) --- }}}           \begin{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Abstract & frontmatter goes here     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %%%%%%%%%%%%%%%%%%%%%%%%%     % TOC, TOF, TO... is here     %%%%%%%%%%%%%%%%%%%%%%%%%          \renewcommand{\chaptermark}[1]{\markboth{\thechapter\quad #1}{}}     \onehalfspacing     \renewcommand{\thesection}{\thechapter.\arabic{section}}          %%%%%%%%%%%%%%%%%%%     % Content goes here     %%%%%%%%%%%%%%%%%%%          \end{document}      My lists of X are defined as following:               \renewcommand{\cfttabpresnum}{Tab. }     \renewcommand{\cftfigpresnum}{Abb. }     \settowidth{\cfttabnumwidth}{Abb. 10\quad}     \settowidth{\cftfignumwidth}{Abb. 10\quad}          %\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}     \singlespacing     %\cleardoublepage     %\pagenumbering{Roman}          \cleardoublepage % has no effect     \phantomsection     \addcontentsline{toc}{chapter}{Inhaltsverzeichnis}     \tableofcontents          \lhead{Abbildungsverzeichnis}     \listoffigures          \lhead{Tabellenverzeichnis}     \listoftables          \lhead{Listing-Verzeichnis}     \renewcommand{\lstlistlistingname}{Listing-Verzeichnis}     {\labelsep2cm\lstlistoflistings}      Now the porblem I noticed is that some of my entries in my TOC are referencing a wrong (sub-)section. This is how my current TOC looks like. The **problem** is that the section 2.1 (or 3.1 or 4.1 or 2.2, 3.2, ...) are pointing to my section 1.1. Section 2.2 is pointing to section 1.2 and so on. Only when there is no section 1.6 for example, a section 2.6 will point to the right place. ![enter image description here](http://i.stack.imgur.com/mpVvt.png)


title: Independent publication list with numbered list using biblatex and refsection

text: I would like to add a list of publications to a thesis ordered by the publication date and numbered 1,2,3. Additionally the author of the thesis should be highlighted bold in this list. The approach I tried is to use a refsection with a modified `\defbibenvironment{bibliography}` and `\ExecuteBibliographyOptions{labelnumber}`. This works in principle, but the numbering is according to the bibliography (what I do not want) and not the list index. The numbering can be independent by using the option `defernumbers` but then the number never starts at one. In this example it would be 4,5,6. A minor error is that each list start with a space instead of the authors name. The normal bibliography is with a different style (alphabetic) and must remain unchanged. If the numbered refsection with numbers according to the list index is not possible the second qustion would still be open. I want the thesis writers name in the list of publications to be highlighted (bold). In this case I have no idea how to achieve that. This image shows how the numbering is wrong: ![enter image description here](http://i.stack.imgur.com/vioYZ.png) This is an example one can work on:               \documentclass{article}          \usepackage{filecontents}          \usepackage[       style=alphabetic, % Loads the bibliography and the citation style        %style=numeric,     ]{biblatex}            \ExecuteBibliographyOptions{%     sorting=nty, % Sort by name, title, year.     maxbibnames=15,%     %defernumbers,     }%                \addbibresource{publications.bib}     \ExecuteBibliographyOptions{labelnumber}     \begin{document}          \begin{filecontents*}{publications.bib}     @Article{Pospiech2010,       Title                    = {Single-sweep laser writing of 3D-waveguide devices},       Author                   = {Matthias Pospiech and Moritz Emons and Benjamin V\"{a}ckenstedt and Guido Palmer and Uwe Morgner},       Journal                  = {Opt. Express},       Year                     = {2010},       Number                   = {7},       Pages                    = {6994--7001},       Volume                   = {18},     }          @Article{Pospiech2009,       Title                    = {Double waveguide couplers produced by simultaneous femtosecond writing},       Author                   = {Matthias Pospiech and Moritz Emons and Andy Steinmann and Guido Palmer and Roberto Osellame and Nicola Bellini and Giulio Cerullo and Uwe Morgner},       Journal                  = {Opt. Express},       Year                     = {2009},       Number                   = {5},       Pages                    = {3555--3563},       Volume                   = {17},     }          @Article{Siegel2007,       Title                    = {Theoretical and experimental limits of cavity-dumping in passively mode-locked thin-disk oscillators},       Author                   = {Martin Siegel and Guido Palmer and Andy Steinmann and Matthias Pospiech and Uwe Morgner},       Journal                  = {Opt. Express},       Year                     = {2007},       Month                    = {Dec},       Number                   = {25},       Pages                    = {16860--16869},       Volume                   = {15},     }          \end{filecontents*}          \newcommand{\numberedreferences}{%     \defbibenvironment{bibliography}       {\list          {\printtext[labelnumberwidth]{%             \printfield{prefixnumber}%             \printfield{labelnumber}.%             }%          }%       {\setlength{\labelwidth}{\labelnumberwidth}%        \setlength{\leftmargin}{\labelwidth}%        \setlength{\labelsep}{\biblabelsep}%        \addtolength{\labelsep}{1em}        \addtolength{\leftmargin}{\labelsep}%        \setlength{\itemsep}{\bibitemsep}%        \setlength{\parsep}{\bibparsep}}%        % fails to compile if included        %\renewcommand*{\makelabel}[1]{\hss##1}       }       {\endlist}       {\item}     }%          \section*{Scientific publications}     \begin{refsection}[publications]%     \numberedreferences     \nocite{*}     % supposed to be numbered and with author highlighted (bold)     \printbibliography[heading=none, sorting=ynt]     \end{refsection}          % standard style     \nocite{*}     \printbibliography              \end{document}      EDIT: This code show how the code from the examples below fails if parts are wrapped in a conditional:               \documentclass{article}          \usepackage{filecontents}     \usepackage{ltxcmds}     \makeatletter     \newcommand{\IfPackageLoaded}[2]{\ltx@ifpackageloaded{#1}{#2}{}}     \makeatother          \usepackage{biblatex}       \usepackage{xpatch}          \IfPackageLoaded{biblatex}{%          % \boldnames: etoolbox-list of names to typeset bold in \printbibiliography     \newcommand*{\boldnames}{}          \newbibmacro*{name:bold}[2]{%       \def\do##1{\ifstrequal{#1, #2}{##1}{\bfseries\listbreak}{}}%       \dolistloop{\boldnames}}          \xpretobibmacro{name:last-first}{\begingroup\usebibmacro{name:bold}{#1}{#2}}{}{}     \xapptobibmacro{name:last-first}{\endgroup}{}{}          %     \DeclareNameAlias{default}{last-first/first-last}          }% \IfPackageLoaded{biblatex}          \addbibresource{publications.bib}          \begin{document}          \begin{filecontents*}{publications.bib}     @Article{Pospiech2010,       Title                    = {Single-sweep laser writing of 3D-waveguide devices},       Author                   = {Matthias Pospiech and Moritz Emons and Benjamin V\"{a}ckenstedt and Guido Palmer and Uwe Morgner},       Journal                  = {Opt. Express},       Year                     = {2010},       Number                   = {7},       Pages                    = {6994--7001},       Volume                   = {18},     }     \end{filecontents*}          \begin{refsection}%     \nocite{*}     \printbibliography[heading=none, sorting=ynt, resetnumbers=true] %env=numbered+bold,      \end{refsection}          \end{document}      The error is               ! Undefined control sequence.     <argument> \blx@do                         {Pospiech2009}\blx@listloop@i


title: Using Kile@Ubuntu and getting "*.cls file not found. \begin"

text: I've just started using LaTeX for an assignment and got this error:               File 'assignment_1.cls' not found. ^^M      What can I do about this?


title: Lyx - Missing $ inserted repeatedly

text: I'm lost in the next problem. I am using the last version (2.0) of Lyx to write up one of my final degree projects full of maths formulas, images, drawings and tables. But at the point I'm on right off, I can't obtain the PDF version of the file. I cannot export to PDF. I'm getting the next error continously:               Missing $ inserted          \maketitle          I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.      And before that I get that next problem.               Package Listings error:     \lst@RequireAspects\lst@loadaspects          The following aspects weren't loadable:     ,strings$,comments$,escape$,style$,language$,keywords$,labels$,lineshape$,f     rames$,emph$,index$     This may cause errors in the sequel.


title: Strings and Harps to be drawn

text: I'd like to draw a picture similar to the hand-drawn one below: ![wanted](http://i.stack.imgur.com/dECTB.jpg) With labels `$0$`, `$1$`, `$\Psi_{L,S}$`, `$a_1$`, `$\ell_i + 2\varepsilon$`, `$\Psi_{L,H}$`, `$b_1$`, `$-\varepsilon$`, `$1 + \varepsilon$`, `$\Psi_{L,S}$`, `$a_2$`, `$b_N : \mathbb{N}^{*} \setminus \mathbb{N}$`, `$-t$`, `$t + 1$`, and `$\Psi_{L,H}$`. All three of the dashed line figures should look the same as ![wanted2](http://i.stack.imgur.com/bYo3G.png) without the numerical labels, but with the respective endpoint labels. To draw the second figure, refer to an older post: How to plot a bar graph of decaying values? The lengths are 1/3, 1/9, 1/9, 1/27, 1/27, 1/27, and 1/27. Any succinct code would be most appreciated.


title: Renewcommand labelitem doesn't work with multiple languages

text: I'm having troubles with the bullets for `itemize`.   I need to have one part of my document in English and one part in French. Therefore I use:               \usepackage[english,french]{babel}      then in my document I use when it's needed:               \selectlanguage{english}     \selectlanguage{french}      I also used in the preamble:               \renewcommand{\labelitemi}{$\bullet$}      And the result is that in my list I do not have a bullet but a dash! And I would like a bullet. Something I noticed is that if I only use               \usepackage[english]{babel}      (so the entire document is in English) the problem disappears and I have the bullets. But I need both English and French because of the word "chapter" and "chapitre" for example. So does anyone have a solution to be able to use bullets for the lists in a document with English and French? Here is a working example:               \documentclass[10pt,a4paper]{report}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage[english,french]{babel}     %\usepackage[english]{babel}     \usepackage{amsmath,amsthm}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{enumerate}          \renewcommand{\labelitemi}{$\bullet$}          \begin{document}          \selectlanguage{english}          \chapter{First chapter}          This is my list :           \begin{itemize}         \item Value 1         \item Value 2      \end{itemize}           \selectlanguage{french}      \chapter{Second chapitre}           Ceci est ma liste:           \begin{itemize}         \item Valeur 1         \item Valeur 2      \end{itemize}           \end{document}


title: Front page of a report

text: I've been stuck for hours on this since I'm just a beginner on Latex,can anyone help me build this front page : ![enter image description here](http://i.stack.imgur.com/DRNYd.jpg) Much appreciated! Here's what I tried so far :               \changepage{+2.5cm}{+5cm}{+0cm}{-2.5cm}{+0cm}{-1cm}{+0cm}{+0cm}{+0cm}              \begin{center}     \textsc{ENSA/5.GINFO/2013-2014}\\[0.75cm]                  \textsc{\huge \bfseries Rapport du Projet de Fin d'Etudes}\\[1cm]             \emph{Présenté par : }\\Nom\textsc{Prénom}\\[1cm]                  \textsc{En vue d'obtenir le Diplôme XXXXXXX}\\[0.75cm]     \textsc{Spécialité : XXXXXX}\\[0.75cm]                  \fbox{\parbox[top][2cm][c]{\textwidth}{\begin{center}\Huge \bfseries XXXXXXXXXXXX \end{center}}}\\[1cm]                       \begin{figure}[!htb]                 \begin{center}                     \includegraphics[scale=.75]{Contenu/Images/logo.png}                 \end{center}             \end{figure}             \fbox{\parbox[top][3cm][c]{\textwidth}{\begin{center}\begin{Large}\bsc{Webshore}\end{Large}\\~\\XXXXXXXXXX\\             \vspace{0.5cm}Maître d'apprentissage: M. XXXXXXXXXX\end{center}}}                  \vfill                  \hrule             \begin{center}                 Université Claude Bernard - Lyon 1, IUT A                 \begin{figure}[!htb]                     \begin{center}                         \includegraphics[scale=.25]{Contenu/Images/Logo.png}                     \end{center}                 \end{figure}                 Département Informatique\\                 4XXXXXXXXXXXXXXXX\\                 XXXXXXXXXXX             \end{center}         \end{center}


title: Page styles only work for \thispagestyle under afterpage

text: Using `afterpage` to set a page style _after_ some page only works for `\thispagestyle`, but not for `\pagestyle`. Why is that? How can I make it work? `\lipsum[1-20]` produces 4 pages of text, _Lorem Ipsum_ style. So, the following document consists of 8 pages.               \documentclass{article}     \usepackage{fancyhdr,afterpage,lipsum}% http://ctan.org/pkg/{fancyhdr,afterpage,lipsum}     \fancypagestyle{pagestyleA}{       \fancyhf{}% Clear header/footer       \fancyhead[C]{pagestyleA}% Header       \fancyfoot[C]{A--\thepage}% Footer     }     \fancypagestyle{pagestyleB}{       \fancyhf{}% Clear header/footer       \fancyhead[C]{pagestyleB}% Header       \fancyfoot[C]{B--\thepage}% Footer     }     \pagestyle{empty}     \begin{document}     \afterpage{\thispagestyle{pagestyleA}}\lipsum[1-20]     \clearpage     \afterpage{\pagestyle{pagestyleB}}\lipsum[1-20]     \end{document}      Using `\afterpage{\thispagestyle{pagestyleA}}` at the start prints page 2 with page style `pagestyleA`. ![enter image description here](http://i.stack.imgur.com/Riks3.png) It is expected that the second `\afterpage{\pagestyle{pagestyleB}}` should deliver pages 6-8 with page style `pagestyleB`. However, it does nothing... ![enter image description here](http://i.stack.imgur.com/uAkjD.png)


title: How to cite an exhibition catalogue with bibtex

text: I'm trying to cite an exhibtion catalogue, but I cannot find the right entry type for the bib file. I'm using Texmaker 3.5.2 to write the source code, Tex Live 2012 is my distribution and the command chain to include the bibliography is latex->bibtex8->latex. I want to convert a document written in Libreoffice to Latex. In Libreoffice the entry for the exhibition catalogue looks like this: Berliner Kulturveranstaltungs-GmbH (Hrsg.): _İskorpit. Aktuelle Kunst aus Istanbul_ , Ausst. Kat. Berlin, Haus der Kulturen der Welt, 15.10.-15.11.1998, Berlin 1998. Using               \usepackage[backend=bibtex8]{biblatex}     @misc{Berliner:Iskorpit,         title = {\.{I}skorpit. Aktuelle Kunst aus Istanbul},         author = {Berliner Kulturveranstaltungs-GmbH (Hrsg.)},         howpublished = {Ausst. Kat. Berlin, Haus der Kulturen der Welt, 15.10.-15.11.1998, Berlin 1998},     }      Results in [1] Berliner Kulturveranstaltungs-GmbH (Hrsg.) ˙ _Iskorpit. Aktuelle Kunst aus Istanbul_. Ausst. Kat. Berlin, Haus der Kulturen der Welt, 15.10.-15.11.1998, Berlin 1998. which is almost what I'm looking for. Except for the missing colon before the title, and the period after the title, which has to be substituted by a comma. I don't know if @misc is the appropriate entry type. Is there another one I should use?


title: Stack margin text in ConTeXt

text: If I try the following in ConTeXt:               \starttext           text text\inmargin{this is a note.} text text\inmargin{Another note.}          \input knuth           text text\inmargin[stack=yes]{this is a note.} text text\inmargin[stack=yes]{Another note.}          \input knuth           text text\inmargin[stack=yes]{this is a note. Now longer.} text text\inmargin[stack=yes]{Another note.}          \input knuth           \stoptext       then it only works for short notes. For longer notes I found the suggestion to use `stack=continue`, but I could not make that work either. ![output](http://i.stack.imgur.com/qYwHO.png) So my question is: How to make it work with floating (not overlapping) text [edit: in MKIV]? EDIT1: It only does not work in MKIV , MKII is fine (`ConTeXt ver: 2011.05.18 18:04 MKIV fmt: 2012.5.8 int: english/english`) (`ConTeXt ver: 2011.05.18 18:04 MKII fmt: 2012.5.11 int: english/english`)


title: Tikz: drawing a zig zag line inside a circle

text: I need to draw a zig-zag line inside a circle without using decorations. The size and positioning of the line should be relative to the size of the circle. I used this code:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}          \node[draw,circle,minimum size=1cm] (C) at (0,0){};          \draw    ($($ (C.west)!.1!(C.east) $)-(0,30pt)$)  --($ (C.west)!.1!(C.east) $)            --($ (C.west)!.25!(C.east) $)              --($($ (C.west)!.3!(C.east) $)+(0,3pt)$)            --($($ (C.west)!.4!(C.east) $)-(0,3pt)$)   --($($ (C.west)!.5!(C.east) $)+(0,3pt)$)            --($($ (C.west)!.6!(C.east) $)-(0,3pt)$)   --($($ (C.west)!.7!(C.east) $)+(0,3pt)$)            --($ (C.west)!.75!(C.east) $)              --($ (C.west)!.9!(C.east) $)            --($($ (C.west)!.9!(C.east) $)-(0,30pt)$);     \end{tikzpicture}                    \end{document}      to get this: ![enter image description here](http://i.stack.imgur.com/ltZlu.png) The problem is that if I want to resize the circle, the vertical lines gets too short (or too long) and I have to fix the "vertical coordinate" manually. ![enter image description here](http://i.stack.imgur.com/7PRQi.png) It is possible to anchor the vertical coordinate relative to the node's shape??


title: How to create a command to load my own new .sty file

text: I have created my custom class `myclass.cls` and I've put it into the BASE folder on MiKTeX dis. (`C:\Program Files\MiKTeX 2.9\tex\latex\base`). Then I have created my `xxx.sty` file with some additional code, I've put it into the new folder OWNCLS (`C:\Program Files\MiKTeX 2.9\tex\latex\owncls`) and refreshed the file name database (FNDB) in MiKTeX settings. I hope I did everything how I should. **And my question is:** How do I define `\newcommand` in `myclass.cls` that will load the `xxx.sty` file from its folder? For example, when I want to create a new document, I will use command `\loadmytheme{xxx}` in the preamble. `beamer` class has got something similar `\usetheme{Themename}`. I will appreciate any help.


title: How to get citation with "and" instead of "&"?

text: I use the apa-good style, bibtex and the cite package and try to make a text- citation. Unfortunately, it always comes up with a "&" instead of an "and". E.g. Lagos & Wright (2005) instead of Lagos and Wright (2005). Can you help?


title: removing page numbers, but not headers

text: In my `\documentclass{article}`, I would like the last few pages (in essence appendix) to be without numbers, but retain the header (`\thispagestyle{empty}`) is so out of the question). Is there a way to turn off only page numbering? I use `fancyhdr` to construct my headers.


title: TeXStudio - Cross-reference in case of multiple files

text: I have a master document and for each chapter a separate file like: main.tex               % preamble etc.          \input{chapter1}     \input{chapter2}     \input{chapter3}     % and so on      chapter1.tex               % Some figure with a label, tex code not shown, just the label     \label{fig:chicken}     % Some figure with a label, tex code not shown, just the label     \label{fig:monkey}          This two-legs animal is a chicken as shown in \cref{fig:chicken} % OK! Works within the same chapter! fig. 1      chapter2.tex               Here I like to refer to \ref{fig:monkey} % results in ??      Referring to a label in another chapter results in a double question mark (I did compile multiple times). LyX has the option to set a master document for each "included" tex-file. Document > Settings > Select default master document. How can I do this in TeXstudio? I've already set main.tex as the master document but can't find a way to refer from its childs back to the master document like in LyX.


title: Unwanted offset in title \rule

text: I was trying to make a custom title layout, but the initial rule was getting slightly indented in a way that was not nice. Here's a minimal example of what I was trying to do:               \documentclass[paper=a4, fontsize=11pt]{scrartcl}     \usepackage{graphicx}     \graphicspath{{../resources/}}     \begin{document}     \begin{titlepage}       \normalfont \normalsize       \rule{\linewidth}{1pt}       \flushleft{\Huge\bfseries Company Name Ltd.}       \hfill       $       \begin{array}{r}         \includegraphics[trim = 4px 4px 4px 4px, clip,           width=3cm]{dots}       \end{array}       $ \vspace{0.5cm}       \rule{\linewidth}{1pt}       {\huge \bfseries Important Subtitle} \hfill {\bfseries \today}     \end{titlepage}     \end{document}      And the result: ![slightly off title](http://i.stack.imgur.com/Imn83.png) Notice how the ends of the two rules don't line up.


title: LaTeX editor with inverse search and on the fly output preview

text: I have just formatted my HDD and I am trying to build up my system again. I am running both Windows Vista and Ubuntu. I am planning to install MiKTeX 2.9 - TeX Live and I am in search of an editor. So far I was using TeXniccenter. It isn't bad, but I would like-if possible-to use an editor that will have an inverse search in either Adobe Reader or in Nitro. So far I could use inverse search in TeXniccenter with Sumatra, but it's not a pdf viewer that suits my taste! I would also like it to have an "on-the-fly" change in a preview output. What I mean is, when I change something in the `.tex` file, to be changed on-the- fly on a preview output, similar to Texmaker. I've heard that something like that can be done in Geany, but I've never managed to do it on Ubuntu, which would the ideal case, because someone has to use only one editor in either OS. Do you think that an editor with the two above features exists? Any suggestions, are more than welcome!


title: Automatically getting "V" as the capital letter for "u" when typesetting latin

text: I'm typesetting a large amount of Latin texts using `XeLaTeX` and the package `polyglossia`. I'd like to get the small letter "u" automatically printed as "V" when turned into a capital letter (including small caps). Thus,               \documentclass{book}     \usepackage{fontspec,xltxtra,xunicode}     \usepackage{polyglossia}     \setmainlanguage{latin}     \begin{document}     Lorem ipsum\par     \textsc{Lorem ipsum}\par     LOREM IPSUM\par     \end{document}      should be printed with "u" - then "V" as small capital - the "V", capital letter.


title: Two-column text, landscape pages

text: I wish to create a pdf-file out of a tex-file, so that the text is printed in two columns, and pages are to have the landspace orientation. The standard way to do this, as I see on the Net, is to say               \documentclass[landscape,twocolumn,letterpaper]{article}      However on my system (Win 7, MiKTeX 2.8) it produces a pdf-file with the "portrait" pages. What's the reason of that?


title: Bibtex puts wrong reference name

text: I'm using the style `plainnat` with the `beamer` class. I'm using BibTeX and this happens. I have the following in my `.bib`               @Article{ TiWuNg07,         title = "{Performance analysis and improvement for BitTorrent-like file sharing systems}",         author = "Y. Tian and Di Wu and KW Ng",         journal = "Concurrency and Computation: Practice and Experience",         volume = "19",         number = "13",         pages = "1811--1835",         year = "2007",         publisher = "John Wiley \& Sons"     }      And this is what appears as the `bibitem`:               \bibitem[Tian et~al.(2007)Tian, Wu, and Ng]{TiWuNg07}     Y.~Tian, Di~Wu, and KW~Ng.     \newblock {Performance analysis and improvement for BitTorrent-like file       sharing systems}.     \newblock \emph{Concurrency and Computation: Practice and Experience},       19\penalty0 (13):\penalty0 1811--1835, 2007.      Minimal code for `.tex`:               \documentclass[10pt,pdfpagelabels]{beamer}     \usepackage{tabulary}     \usepackage{snapshot}     \usepackage{todonotes}     \usefonttheme[onlymath]{serif}     \setbeamercovered{transparent=100}     \mode<presentation>     {       \usetheme{Warsaw}       \setbeamercovered{transparent}     }     \usepackage[spanish]{babel}     \usepackage[latin1]{inputenc}     \usepackage{lmodern}     \hypersetup{pdfnewwindow=true}          \begin{document}     \begin{frame}{Tian, Wu, Ng - 2007\cite{TiWuNg07}}     \end{frame}     \section{Referencias}     \begin{frame}[allowframebreaks]{Referencias}     \bibliographystyle{plainnat}     \bibliography{modelo}     \end{frame}     \end{document}      The citation appears as `[Tian et~al.(2007)Tian, Wu, and Ng]` when it should be `[Tian et~al.(2007)]` As you can see, in the citation text, the authors appear again after the year. Why is this happening and how can I solve it without changing it manually? All the other `bibitems` appear correctly.


title: Is it possible to create overlays in beamer inside pgfplots graphics?

text: When working with pgf-tikz, I can create overlays in beamer presentations with               \path<overlay specification> ...      However, I could not get this to work in pgfplots graphics. It would be nice if something like               \addplot<2-> {...};      worked as expected, but it does not. Any ideas?


title: wrong page size using LyX and Koma Script

text: First of all I am new to using Tex so please excuse any obvious things which will not be included in this question. But to the point: I am using LyX 2.0.6 (with Miktex 2.9). I am writing a thesis in polish language. I use Koma Script book class. And I base my thesis on an example thesis included with Lyx. Each chapter is on a different branch and in a different file which is then included to the master file. The problem is: When i create a pdf from a "chapter file" everything is ok but when I create it from a master file, the page size is visibly smaller (there is a lot more space between the text and page borders on each side). I am aiming for A4 paper size. As far as I can see there are no differences in preamble of a single chapter and the whole thesis. I tried specifying paper size in document class and using geometry package. Nothing helps. I am aware that above information may be not enough to help so if anything is missing please write what and I will add it. Single chapter preamble example here paper size is ok:               %% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[12pt,czech,greek,italian,polish,intoc,bibliography=totoc,index=totoc,BCOR10mm,captions=tableheading,titlepage,fleqn,pagesize,a4paper]{scrbook}     \usepackage{lmodern}     \renewcommand{\sfdefault}{lmss}     \renewcommand{\ttdefault}{lmtt}     \usepackage[LGR,T1]{fontenc}     \usepackage[iso-8859-7,latin9,latin2]{inputenc}     \usepackage{listings}          \lstset{captionpos=b,     frame=single}     \usepackage{fancyhdr}     \pagestyle{fancy}     \setcounter{secnumdepth}{3}     \usepackage{amssymb}\usepackage{babel}     \usepackage{array}     \usepackage{float}     \usepackage{calc}     \usepackage{textcomp}     \usepackage{ifsym}     \usepackage{marvosym}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{setspace}     \onehalfspacing     \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=1,      breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]      {hyperref}     \hypersetup{pdftitle={Your title},      pdfauthor={Your name},      pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false}     \usepackage{breakurl}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \DeclareRobustCommand{\greektext}{%       \fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}     \DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}     \DeclareFontEncoding{LGR}{}{}     \DeclareTextSymbol{\~}{LGR}{126}     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     % in case somebody want to have the label "Equation"     %\renewcommand{\eqref}[1]{Equation~(\negthinspace\autoref{#1})}          % that links to image floats jumps to the beginning     % of the float and not to its caption     \usepackage[figure]{hypcap}          \usepackage[paper=A4,pagesize]{typearea}          % the pages of the TOC is numbered roman     % and a pdf-bookmark for the TOC is added     \let\myTOC\tableofcontents     \renewcommand\tableofcontents{%       \frontmatter       \pdfbookmark[1]{\contentsname}{}       \myTOC       \mainmatter }          %------------caption handling---------------------     \usepackage[font={it}]{caption}          \renewcommand{\fnum@lstlisting}{Przykład kodu~\thefigure}     \renewcommand{\fnum@figure}{Ilustracja~\thefigure}          %   makes caption labels bold     %   for more info about these settings, see     %   http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguien.pdf     \setkomafont{captionlabel}{\bfseries}     \setcapindent{1em}          %--------------------------------------------------     % enables calculations     \usepackage{calc}          %indent for the first paragraph after a title     \usepackage{indentfirst}          %enables dingbat symbols     \usepackage{pifont}          %centruje zawarto¶ć tabeli w przypadku laczonych wierszy     %\renewcommand{\multirowsetup}{\centering}          % fancy page header/footer settings     % for more information see section 9 of     % ftp://www.ctan.org/pub/tex-archive/macros/latex2e/contrib/fancyhdr/fancyhdr.pdf     \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}          % increases the bottom float placement fraction     \renewcommand{\bottomfraction}{0.5}          % avoids that floats are placed above its sections     \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}          \makeatother          \begin{document}     ...     \end{document}      Master document, here paper size is not ok:               %% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[11pt,a4paper,czech,english,greek,italian,polish,intoc,bibliography=totoc,index=totoc,BCOR10mm,captions=tableheading,titlepage,fleqn,pagesize,a4paper]{scrbook}     \usepackage{lmodern}     \renewcommand{\sfdefault}{lmss}     \renewcommand{\ttdefault}{lmtt}     \usepackage[LGR,T1]{fontenc}     \usepackage[iso-8859-7,latin9,latin2]{inputenc}     \usepackage{listings}     \lstset{captionpos=b,     frame=single}     \usepackage{fancyhdr}     \pagestyle{fancy}     \setcounter{secnumdepth}{3}     \usepackage{amssymb}\usepackage{babel}     \usepackage{array}     \usepackage{float}     \usepackage{calc}     \usepackage{textcomp}     \usepackage{ifsym}     \usepackage{marvosym}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{setspace}     \usepackage{nomencl}     % the following is useful when we have the old nomencl.sty package     \providecommand{\printnomenclature}{\printglossary}     \providecommand{\makenomenclature}{\makeglossary}     \makenomenclature     \onehalfspacing     \usepackage[unicode=true,pdfusetitle,      bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=1,      breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]      {hyperref}     \hypersetup{      pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false}     \usepackage{breakurl}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \special{papersize=\the\paperwidth,\the\paperheight}          \DeclareRobustCommand{\greektext}{%       \fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}     \DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}     \DeclareFontEncoding{LGR}{}{}     \DeclareTextSymbol{\~}{LGR}{126}     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          \@ifundefined{date}{}{\date{}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     % in case somebody want to have the label "Equation"     %\renewcommand{\eqref}[1]{Equation~(\negthinspace\autoref{#1})}          % that links to image floats jumps to the beginning     % of the float and not to its caption     \usepackage[figure]{hypcap}          \usepackage[pass]{geometry}          % the pages of the TOC is numbered roman     % and a pdf-bookmark for the TOC is added     \let\myTOC\tableofcontents     \renewcommand\tableofcontents{%       \frontmatter       \pdfbookmark[1]{\contentsname}{}       \myTOC       \mainmatter }          %------------caption handling---------------------     \usepackage[font={it}]{caption}          \renewcommand{\fnum@lstlisting}{Przykład kodu~\thefigure}     \renewcommand{\fnum@figure}{Ilustracja~\thefigure}          %   makes caption labels bold     %   for more info about these settings, see     %   http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguien.pdf     \setkomafont{captionlabel}{\bfseries}     \setcapindent{1em}          %--------------------------------------------------     % enables calculations     \usepackage{calc}          %indent for the first paragraph after a title     \usepackage{indentfirst}          %enables dingbat symbols     \usepackage{pifont}          %centruje zawarto¶ć tabeli w przypadku laczonych wierszy     %\renewcommand{\multirowsetup}{\centering}          % fancy page header/footer settings     % for more information see section 9 of     % ftp://www.ctan.org/pub/tex-archive/macros/latex2e/contrib/fancyhdr/fancyhdr.pdf     \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}          % increases the bottom float placement fraction     \renewcommand{\bottomfraction}{0.5}          % avoids that floats are placed above its sections     \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}          \makeatother          \begin{document}          \publishers{\noindent ...\\     ...\\     ...\\     \inputencoding{latin9}\foreignlanguage{english}{\vspace{-3cm}     }}               \author{...}               \title{...}          \begin{onehalfspace}          \lowertitleback{\noindent ...\\     ...\\     ...}     \end{onehalfspace}               \date{...}          \maketitle     \cleardoublepage{}               \lhead{\rightmark}               \rhead[\leftmark]{}               \lfoot[\thepage]{}               \cfoot{}               \rfoot[]{\thepage}          \tableofcontents{}          \cleardoublepage{}          \pagestyle{plain}          \include{Summary}          \cleardoublepage{}          \pagestyle{fancy}          \lhead[\chaptername~\thechapter]{\rightmark}          \include{chapter-1}     \include{chapter-2}     \include{chapter-3}     \include{chapter-4}          \cleardoublepage{}          \lhead[]{Acknowledgments}               \rhead[Acknowledgments]{}          \cleardoublepage{}               \lhead[]{\rightmark}          \rhead[\leftmark]{}          \bibliographystyle{alpha}     \bibliography{bibliography}               \cleardoublepage{}               \lhead[]{Nomenclature}               \rhead[Nomenclature]{}          \printnomenclature[2.5cm]{}     \end{document}      NEW: After adding this to the chapter preamble:               \documentclass[11pt,a4paper,czech,english,greek,italian,polish,intoc,bibliography=totoc,index=totoc,BCOR10mm,captions=tableheading,titlepage,fleqn,pagesize,a4paper]{scrbook}     \usepackage{geometry}     \usepackage{hyperref}          \setlength{\pdfpagewidth}{\paperwidth}     \setlength{\pdfpageheight}{\paperheight}      this single chapter now looks like the master document. So now I don't know which is correct A4 format. I likeed the old chapter size better. paper dimensions are 210mm x 297mm, master document (and now single chapter) has text area : ~136mm x 227mm, old single chapter text area: ~152mm x ~253mm


title: attachfile vs attachfile2

text: I would like to attach a file to a PDF document. I've discovered the `attachfile` and `attachfile2` packages. How should I choose which of those to use? Is there a general rule of thumb (e.g., "always use `attachfile2`, it is strictly better")? I've read the documentation and the changelogs, but I'm still fuzzy on how to choose between them.


title: How to number the ToC?

text: I need to give a Roman number to the ToC. So basically, I want the ToC to internally use `\chapter` instead of `\chapter*.` Is there any way to do that?


title: Siunitx's \micro symbol has serif

text: I am trying to reproduce the look of the micro symbol in the `siunitx` documentation; see for instance the following picture: ![\\micro from documentation](http://i.stack.imgur.com/UyaPH.png) However, when compiling the following code:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \usepackage{textcomp}     \usepackage{siunitx}            \begin{document}          \SI{15}{\micro\metre}          \end{document}      the mu comes out with serif as in the following picture: ![mu from my code](http://i.stack.imgur.com/zNPqW.png) I suppose there is a font issue here but I could find how to solve it by reading the `siunitx` documentation.


title: Beamer: Line spread in headline is ignored

text: I am trying to build my own beamertheme and I want to modify the line spread in the title. I use `{\LARGE \linespread{1.6} \selectfont \inserttitle \par}` to modify the line spread, but it does only work in the main text of a frame and not inside the headline. My minimal theme looks like this               \ProvidesPackage{beamerthememinimum}          \mode<presentation>          \setbeamertemplate{headline}{           {\LARGE \linespread{1.6} \selectfont \inserttitle \par}     }      and my test presentation looks like this:               \documentclass[final]{beamer}       \mode<presentation> {          \usetheme{minimum}           }       \usepackage[english]{babel}           \title{Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. }       \begin{document}       \begin{frame}{}          \vfill         \begin{block}{\large Test}           {\Large \linespread{1.6} \selectfont \inserttitle \par}         \end{block}         \vfill       \end{frame}       \end{document}      Here is a picture of the compiled output: ![Compiled output](http://i.stack.imgur.com/SpZ93.png) As you can see, the text inside the frame is correctly spaced, but the line spread command in the headline does not affect the spacing of the title output. How can I fix this? Thanks!


title: Siunitx installation: I can't find file l3docstrip.tex

text: I have some problem trying to compile `siunitx`. When I do `latex siunitx.dtx`, I get the following message:               ! I can't find file `l3docstrip.tex'.     l.77 \input l3docstrip.tex      Where am I supposed to find it? I have installed both `l3kernel` and `l3packages` as indicated in the README. By the way, I have a working older version of `siunitx` installed; I noticed this issue when I wanted to install siunitx from the latest sources on another computer.


title: a table, fully in highlight background

text: how can i have a table in highlight background like the following? (preferably without using Tikz package) ![enter image description here](http://i.stack.imgur.com/u85AX.jpg)


title: letter document class and babel/magyar not compatible any more?

text: I am recently having trouble with combining the `letter` document class with the `magyar` language option of the `babel` package. The weird thing is that the last time when I had to use this combination (about half a year ago) there was no problem with it. To give an example, even the following code wouldn't compile on my machine at the moment:               \documentclass{letter}     \usepackage[magyar]{babel}          \begin{document}     \begin{letter}{}     Lorem ipsum.     \end{letter}     \end{document}      Does anyone of you have had this problem? I am using TeX Live 2012 on Mac OS X 10.6. I updated all of my packages with the TeX Live Manager, but that didn't solve the problem either. Any ideas? Thank you indeed for the help,   Ádám EDIT: This is what I get when I run LaTeX on the above code (edited again to get the file list):               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)      restricted \write18 enabled.     entering extended mode     (./Lorem Ipsum.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h     ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma     rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,      kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,      piedmontese, polish, portuguese, romanian, romansh, russian, sanskrit, serbian     , serbianc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, u     ppersorbian, welsh, loaded.     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/letter.cls     Document Class: letter 1999/04/29 v1.2z Standard LaTeX document class     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2012/texmf-dist/tex/generic/babel/babel.sty     (/usr/local/texlive/2012/texmf-dist/tex/generic/babel/magyar.ldf     (/usr/local/texlive/2012/texmf-dist/tex/generic/babel/babel.def)))     No file "Lorem Ipsum".aux.          LaTeX Warning: Please use \usepackage{t1enc} with                    \usepackage[magyar]{babel}, to get accented chars hyphenated.               LaTeX Warning: Please use \usepackage[latin2]{inputenc} with                    \usepackage[magyar]{babel}.          (/usr/local/texlive/2012/texmf-dist/tex/latex/base/letter.cls          ! LaTeX Error: Can be used only in preamble.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.181 \@onlypreamble                         \makelabels     ?           ! LaTeX Error: Can be used only in preamble.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.181 \@onlypreamble\makelabels          ?      ) [1{/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./Lorem Ipsum.aux)           *File List*       letter.cls    1999/04/29 v1.2z Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)        babel.sty    2008/07/08 v3.8m The Babel package       magyar.ldf    2007/10/19 v1.5 Magyar support from the babel v3.7 system      ***********           )</usr/local/texlive/2012/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>     Output written on "Lorem Ipsum.pdf" (1 page, 12274 bytes).     SyncTeX written on "Lorem Ipsum.synctex.gz"     Transcript written on "Lorem Ipsum.log".


title: Font changes in latex output file after each compilation

text: I am using Texshop version 2.47 in Mac. Recently I copied some text from somewhere and then it started to change the font (many mathematical/greek symbols started to change in strange signs and the font also changes entirely). Its not giving any warnings or any errors at the time of compilation. I tried deleting the aux files but no use! After at least 10-12 compilations, I am getting the desired font which is quite annoying. I found similar questions on tex.stackexchange without any answer Why does LaTeX change font each time I compile? Some screenshots are attached showing the settings of my file for further description. ![screenshot](http://i.stack.imgur.com/QuJf4.jpg) ![screenshot](http://i.stack.imgur.com/95USk.jpg) ![screenshot](http://i.stack.imgur.com/gfryS.jpg) ![screenshot](http://i.stack.imgur.com/QKNxT.jpg) ![screenshot](http://i.stack.imgur.com/26JnH.jpg) ![screenshot](http://i.stack.imgur.com/S5zMl.jpg) ![screenshot](http://i.stack.imgur.com/mDT7B.jpg) I tried googling and didn't get any explanation anywhere. If somebody please can help me regarding this matter, I'll be highly grateful! My example is the following:               \documentclass [11pt,a4paper] {report}     \usepackage[square]{natbib}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{tabularx}     \usepackage{supertabular}     \usepackage{ulem}     \usepackage{color}     \usepackage{soul}     \usepackage{wrapfig}     \usepackage{subfig}     \usepackage[english]{babel}     \usepackage{float}     \usepackage{pdfpages}     \usepackage[parfill]{parskip}     \usepackage{epstopdf}     \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}          \title{\huge Something important}     \author{{\large Me}}     \date{\today}          \begin{document}     The example $\omega$.     \end{document}


title: Unfitting brace decoration in TikZ

text: I've just created a TikZ image and somehow the delimiter in the right bottom corner is a little bit too wide. The delimiter should be 3 cm wide. Placing its middle at x=6.5 it should end at x=5 and x=8. But that's not the case and I don't find the error. MWE:               \documentclass[12pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}     \begin{tikzpicture}[yscale=0.75]     \draw[help lines] (-2,-2) grid (8,6);          \tikzstyle{every node}=[font=\small, sharp corners, thick]     \tikzset{inner sep=2pt}          \newcommand{\akut}[1]{(0,0) -- node [draw, fill=white] {#1} (1,1)}     \newcommand{\chronisch}[1]{(0,0) -- node [draw, fill=white] {#1} (2,1)}     \newcommand{\schleichend}[1]{(0,0) -- node [draw, fill=white] {#1} +(1,1)}     \newcommand{\Schub}[1]{++(0.5,1.25) node [above, draw] {#1} -- ++(0.5,-0.5)}     \newcommand{\Welle}{+(0,0) to [out=0,in=180] +(0.5,1) node [above, draw] {1991} to [out=0,in=180] +(+0.5,-1)}     \newcommand{\Outcome}[1]{+(3,0) node [midway, above=2pt, draw] {#1}}          \draw [-][very thick, rounded corners]  \akut{1990} -- \Schub{1991} -- \Schub{1992} -- \Schub{1995} -- \Schub{1996} -- \Outcome{1999--2009} ;     \node [draw] (x) at (9,0) {Zeit};     \node [draw,align=center] (y) at (0,7) {Symptom-\\schwere};     \draw [<->] [thick] (y) -- (0,0) -- (x);     \node [above, below delimiter=\}] at (0.5,0) {\parbox{1cm}{\color{white}{.}}};     \node [draw] at (0.5,-0.55) {Beginn};     \node [above, below delimiter=\}] at (3,0) {\parbox{4cm}{\color{white}{.}}};     \node [draw] at (3,-0.55) {9-j\"ahriger Verlauf};     \node [above, below delimiter=\}] at (6.5,0) {\parbox{3cm}{\color{white}{.}}};     \node [draw] at (6.5,-0.55) {Outcome};     \node [left=2pt, draw]at (0,2) {leicht};     \node [left=2pt, draw]at (0,4) {mittel};     \node [left=2pt, draw]at (0,6) {schwer};     \end{tikzpicture}     \end{document}      Example: ![examplying the example](http://i.stack.imgur.com/2afSK.jpg)


title: \includepdf only includes a blank page with file name instead of the actual document

text: I'm trying to use includepdf to insert an external document into my thesis. I'm using Texlive in Linux, I have the package pdfpages installed properly. I'm compiling the document with pdflatex.               ....     \RequirePackage{pdfpages}      ....       \begin{document}     \includepdf[pages=1]{assignment.pdf}     \include{chap-introduction}     \include{chap-problem-specification}     ....      I don't get the "assignment.pdf" included. Instead, I only get an empty page with the text "assignment.pdf". The compilation is successfull, there is no pdfpages-related warning or error in the logs. I tried it with few different files, but no success. How can I troubleshoot this?


title: Syntax highlighting for SPARQL query in a listing? (works fine in minted environment but not in listing with mint)

text: I can do syntax highlighting in the `minted` environment, for any SPARQL query using this Pygments lexer thanks to this answer. My problem is how to get SPARQL syntax highlighting to work with `mint` in a `listing` (so that I can get a label and a caption). I am missing the BOM/EOM escape code. Here's a minimal example:               \documentclass{article}     \usepackage{minted}     \begin{document}          %Minted environment works fine      \begin{minted}{sparql}     PREFIX java: <http://evolizer.org/ontologies/seon/2009/06/java.owl#>     PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>     PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>     SELECT ?url ?name     WHERE {        ?url rdf:type java:Package .        ?url rdfs:label ?name     }     \end{minted}          %Mint in listing gives runaway argument error     \begin{listing}[H]     \mint{SPARQL}     PREFIX java: <http://evolizer.org/ontologies/seon/2009/06/java.owl#>     PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>     PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>     SELECT ?url ?name     WHERE {        ?url rdf:type java:Package .        ?url rdfs:label ?name     \caption{Example of a listing.}     \label{lst:example}     \end{listing}          Listing \ref{lst:example} contains an example of a listing.          \end{document}      When I try to compile the above example with `pdflatex -shell-escape` I get:               Runaway argument?     REFIX java: <http://evolizer.org/ontologies/seon/2009/06/java.owl#>     ! Forbidden control sequence found while scanning use of \FancyVerbGetVerb.     <inserted text>                      \par      l.17 ...zer.org/ontologies/seon/2009/06/java.owl#>      This example from the mint manual works fine:               \begin{listing}[H]     \mint{cl}/(car (cons 1 ’(2)))/     \caption{Example of a listing.}     \label{lst:example}     \end{listing}          Listing \ref{lst:example} contains an example of a listing.       I seem to be missing the escape code (`/` in cl) that signals the beginning and end of a message for SPARQL. Thoughts? I'd also consider other approaches to syntax highlighting (e.g. other libraries that use Pygments); since I want colors, this b+w highlighting solution isn't what I need.


title: Use new fonts in MiKTeX

text: I'm using MiKTeX and TeXnicCenter and I'm trying to change the font for some parameters in mathematical formulas. Specifically, I would like to use capital letters of font "Libris". Is this possible? This font is listed in the LaTeX Font Catalogue and, according to the MiKTeX Package Manager, the package `libris` is installed. I don't know if this information is useful, but I haven't used LaTeX for much time until now.


title: How can I tell TeX Live Utility where my TeX distribution is?

text: So, I was in a hurry, and didn't read the copious verbiage on TeX Live as directed by the TeX Live Utility when you have an out-of-date TeX Live install (I had 2010). So, I'm comfortable with the command line and figured I'd be OK following the directions next to the bolded text: _How to acquire TeX Live_ (using install- tl). That installed something I could use from the command line, but none of the Mac stuff could find it (system panel, TeX Live Utility, ...). Changing the location of my TeX Live distribution in the preferences resulted in a very limited file selection dialog. I tried dragging the `/usr/local/texlive/.../bin` for TeX Live 2012 into this dialog, and it let me do that. But, it still seems to think I'm at 2010. So, I looked around and found the MacTeX Additions package, which seemed to expect an installed TeX Live, and would do the rest. This resulted in no change. Then, I downloaded and installed the full MacTeX 2012 package. Now, TeX Live 2012 shows up in my preferences pane, but TeX Live utility is still borked. So   1. can we please change the documentation so this doesn't happen so much? It seems like people go the install-tl route on OSX with some frequency based on the questions on this site!   2. I am afraid I have no idea how to update my TeX Live Utility so it'll work correctly. Any pointers? I suspect if I just delete the preferences for it, that'd work. I _don't_ think that deleting it and reinstalling will work, as I tried that too!


title: Does a space belong after pt?

text: Does a space always belong after `pt`, e.g. as used in `\hskip1pt`? If a space is used, are there situations where a space will appear where it is not intended? If no space is used, will `pt` be unrecognized, e.g., if a letter immediately follows, as in `1ptThe`?


title: How to customize title page in beamer so that it looks like

text: How can I modify title page so that it looks like it is in this video. Please seek to 16 seconds and watch title page. I do not have permission to post images. I liked this theme and I want to make a beamer theme that looks similar. I tried with beamercolorbox but I failed to position the box to the bottom. ![enter image description here](http://i.stack.imgur.com/y1T3f.png) * * * Edit: Here is my minimum working example               \documentclass[xcolor=dvipsnames]{beamer}     \defbeamertemplate*{title page}{customized}[1][]     {     \usebeamerfont{subtitle}     \usebeamercolor[fg]{subtitle}          {\flushright     \setbeamercolor{author}{bg=white,fg=Red}     \usebeamerfont{author} \insertauthor\par     \usebeamerfont{institute}\insertinstitute\par }          \vspace{0.2in}          \setbeamercolor{postit}{fg=white,bg=YellowOrange}          \begin{beamercolorbox}[sep=1em,wd=1.062\textwidth,ht=3cm,dp=3cm,right]{postit}     \usebeamerfont{title} {\huge \inserttitle}\par     \usebeamerfont{subtitle} {\insertsubtitle}     \end{beamercolorbox}     }     \usecolortheme[named=YellowOrange]{structure}     \useoutertheme{infolines}     \setbeamertemplate{navigation symbols}{}      \institute{Harvard College Professor and\\ Johnstone Family Professor in Psychology, Harvard University}          \title{SAY WHAT?}     \subtitle{Linguistics as a Window to\\ Understanding the Brain}     \author{Steven Pinker}          \begin{document}     {     \setbeamertemplate{footline}{}     \begin{frame}     \titlepage     \end{frame}     }     \end{document}


title: Hyperref and Subfigure warning

text: I am using the `memoir` class, with the `hyperref` package. At one point, I have a couple subfigures:               \begin{figure}[!ht]     \centering     %%% not \center     \subbottom[]{\label{fig:turtled}\includegraphics[height=4cm]{graphics/turtled.png}}     \subbottom[]{\label{fig:capsized}\includegraphics[height=4cm]{graphics/capsized.png}}     \subbottom[]{\label{fig:mast-lift}\includegraphics[height=4cm]{graphics/mast-lift.png}}     \caption{(a) A turtled vessel being brought to the capsized position. (b) A capsized vessel being brought to the upright position. (c) The assisted mast-lift technique.}     \label{fig:righting}     \end{figure}      using the `subbottom` command. I then reference them later in the code:               ... shown in \autoref{fig:mast-lift}.      Unfortunately, I'm getting a warning about this that I can't seem to figure out:               Package hyperref Warning: No autoref name for `subfigure' on input line ###      Anyone have an idea on how to get rid of this warning?


title: How to create the graph only once in Tikz/pgf/pgfplots

text: I saw Why is tikz so much slower when plotting a huge amount of data than WYSIWYG plotting tools? that pgfplots can be configured to do the plotting only once. How to do this? I have a document with many graphs and repeated runs takes so much time.


title: How to allow line breaks after forward slashes in ConTeXt?

text: I have a document containing many forward slashes (`/`). I noticed that ConTeXt does not allow breaks after `/`. For instance, if a text contains `bear/rabbit/tiger`, it will not place a break and the text will flow off the edge into the margins.   * How can I create a special environment, inside of which, the rules for line breaking allows a line break after a `/`, if deemed necessary, with slightly higher or equal preference to what is given to a space?


title: Converting numbers to scientific notations

text: I have some numbers output from Matlab and I want to show them as tables in LaTeX. The numbers are in the form `0.14190949656253118000` or `0.01234e-3` and I want to show them in scientific notation. How can I find/write, a macro that is called like `\scn{0.14190949656253118000}` or `\scn{0.01234e-3}` and results in `$1.41x10^{-1}$` or `$1.23x10^{-5}$`. Note that the number of digits after the decimal points should be configable.


title: Controlling cell width and height simultaneously in a table

text: I'm trying to create a multi-page table with all cells having the same height (as well as certain fixed widths) so that certain manual cut-and-paste operations are a lot easier. One issue is that one column in particular is text-heavy and should line-break within the cell. As I don't want it justified, I looked into alternatives such as Fixed column width table with text left aligned in cells. This is doing exactly what I want for horizontal alignment. For vertical alignment, I've looked at How to specify a fixed height for all rows in a table? and the `\vphantom` method detailed in the above link doesn't seem to be working. Here's what I'm currently working with:               \documentclass[11pt]{article}     \usepackage{array}          \newcolumntype{P}[1]{>{\raggedright\hspace{0pt}\arraybackslash}p{#1}}     \def\Z{\vphantom{\parbox[c]{1.7in}{\Huge Something Long}}}          \begin{document}     \begin{tabular}{| c || P{0.5in} || P{0.5in} || P{5in} |}\hline          1.  \Z &&& Long long long long long long long long long                 long long long long long long long text  \\\hline     2.  \Z &&& More long long long long long long long long                 long long long long long long long text  \\\hline     \end{tabular}      When I compile, the cells do not have a uniform height, and none of them are as large as 1.7 inches vertically. So this suggests that somehow the `\vphantom` method is failing. Does anybody know of a relatively straightforward solution to this problem?


title: Most Efficient Way of Creating Left Aligned Item/Equation List

text: What is the best way to achieve a list where items are seamlessly aligned either left, centered, or right. I am more so interested in the items being left aligned, (for instance a series or (system) of equations). I have an equation " **E** " and want to create a left aligned list describing what the variables represent or equal to as shown in the example below. ![enter image description here](http://i.stack.imgur.com/N10l0.png)


title: LaTeX color and ICC color profiles

text: I have a (pdf|Xe)LaTeX document and trying to keep it CMYK. For some documents, I use a certain color for it's elements, which is RGB #BDCDDA. As my final document should be using the Adobe CMYK profile "CoatedFOGRA39.icc", I need to manually convert that RGB value to e.g. this:               \DefineNamedColor{named}{mycolor}{cmyk}{0.3203,0.1602,0.1172,0.0000}      But, if in the future I want to switch to a different CMYK color profile for maybe another printing company, I have to edit the color definition again, as for example an USWebCoatedSWOP version of RGB #BDCDDA has different CMYK values. Ideally, I would like to write something like               \DefineNamedColor{named}{mycolor}{/path/to/CoatedFOGRA39.icc}{#BDCDDA}      and have the color auto-converted from RGB (can be considered to be sRGB colorspace) to the correct CMYK value. Can any LaTeX package help me here, or do I have to set up an external workflow to pre-generate LaTeX snippets with correct CMYK color definitions? Sidenote: this question is not about embedded figures/pictures, but about using named colors for text and background.


title: \nodexn and savedNodeCoors not playing nicely with each other

text: This question arose from trying to answer a different question previously posted by @StiffJokes (aka user:19356) but now deleted. Each of the following MWE produces different results for the `pspicture` in a manner I find completely counter-intuitive. The first two examples differ only in how the `border` for the `standalone` class has been set. The third example uses the `article` class. MWE #1:               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-node}     %% using pgffor just to see what happens at different values     \usepackage{pgffor}     \begin{document}     \begin{pspicture}[showgrid](-1,-1)(3,3)         \psset{saveNodeCoors=true}         \pnode (0,0){A}         \pnode (2,3){B}         \foreach \myp in {0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.00}         {           \pgfmathparse{1-\myp}           \edef\myq{\pgfmathresult}           \nodexn{\myp(A)+\myq(B)}{V}           \qdisk(V){2pt}           \pnode(!  N-V.x N-V.y ){D}           \psline(A)(D)         }     \end{pspicture}     \end{document}      Resulting in ![enter image description here](http://i.stack.imgur.com/sKBsw.png) MWE #2:               \documentclass[pstricks,border=1in]{standalone}     \usepackage{pst-node}     %% using pgffor just to see what happens at different values     \usepackage{pgffor}     \begin{document}     \begin{pspicture}[showgrid](-1,-1)(3,3)         \psset{saveNodeCoors=true}         \pnode (0,0){A}         \pnode (2,3){B}         \foreach \myp in {0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.00}         {           \pgfmathparse{1-\myp}           \edef\myq{\pgfmathresult}           \nodexn{\myp(A)+\myq(B)}{V}           \qdisk(V){2pt}           \pnode(!  N-V.x N-V.y ){D}           \psline(A)(D)         }     \end{pspicture}     \end{document}      resulting in: ![enter image description here](http://i.stack.imgur.com/NvHVt.png) MWE #3:               \documentclass{article}     \usepackage{pstricks,pst-node}     %% using pgffor just to see what happens at different values     \usepackage{pgffor}     \begin{document}     \begin{pspicture}[showgrid](-1,-1)(3,3)         \psset{saveNodeCoors=true}         \pnode (0,0){A}         \pnode (2,3){B}         \foreach \myp in {0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.00}         {           \pgfmathparse{1-\myp}           \edef\myq{\pgfmathresult}           \nodexn{\myp(A)+\myq(B)}{V}           \qdisk(V){2pt}           \pnode(!  N-V.x N-V.y ){D}           \psline(A)(D)         }     \end{pspicture}     \end{document}      resulting in: ![enter image description here](http://i.stack.imgur.com/a0r9M.png) Can anyone explain what's going on here? Why the differences? On one level, the coordinates for `V` are correct since the points are being plotted where they belong. But as soon as you try to use `! N-V.x N-V.y` to grab the coordinates for the center things go haywire. By changing the coordinates fo points `A` and `B` the new coordinates for `D` can shift dramatically: MWE #4               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-node}     %% using pgffor just to see what happens at different values     \usepackage{pgffor}     \begin{document}     \begin{pspicture}[showgrid](-1,-1)(3,3)         \psset{saveNodeCoors=true}         \pnode (0,0){A}         \pnode (2,0){B}         \foreach \myp in {0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.00}         {           \pgfmathparse{1-\myp}           \edef\myq{\pgfmathresult}           \nodexn{\myp(A)+\myq(B)}{V}           \qdisk(V){2pt}           \pnode(!  N-V.x N-V.y ){D}           \psline(A)(D)         }     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/pA2HN.png)


title: How can I inhibit expansion through several layers of \edef?

text: I'm using a macro I've defined based on some suggestions here to automate the creation of tables. For example something like               \newcommand{\clearrows}{\let\matrixcontent\empty}     \newcommand{\actionsrow}[3]{%       \foreach \i in #3 {%         \pgfmathparse{#1[\i-1]}         \let\c\pgfmathresult         \pgfmathparse{#2[\i-1]}         \let\s\pgfmathresult         \begingroup\edef\x{\endgroup            \noexpand\gappto\noexpand\matrixcontent{\noexpand\node[\s]{\c}; \&}}\x         }%       \gappto\matrixcontent{\\}%     }      lets me easily create the tables I need, with a few lines of code. For example,               \newcommand{\rowhv}[1]{         \actionsrow{{"$e$","$h$","$v$","$hv$"}}{{{"fill=gray!3"},{"fill=gray!33"},{"fill=gray!67"},{"fill=gray!100"}}}{#1} }     \clearrows     \rowhv{{1,2,3,4}} \rowhv{{2,1,4,3}} \rowhv{{3,4,1,2}} \rowhv{{4,3,2,1}}          \begin{tikzpicture}         \matrix[ampersand replacement=\&,nodes={minimum size=7mm}]{\matrixcontent};     \end{tikzpicture}      produces ![enter image description here](http://i.stack.imgur.com/W2X6m.png) which may not seem like much of an accomplishment, but I need to build quite large tables, and a lot of them, so these macros are essential. I need to be able to put arbitrary content in the cells, ranging from arbitrary formatting (e.g., `\textsf{..}`) to imported images (using, for example, `\includegraphics`) or other macros I define to draw node contents. But the code above only works for cell contents that are plain text. If I supply anything other other than plain text among the items in the first argument to `\actionsrow`, which is used for `\c` in the loop there, I get an error, > Argument of \reserved@a has an extra }. even though such content is perfectly valid for nodes. I suspect there's something going on with the way my (pilfered) macro is parsing `\c`, but I don't even know where to begin track that down. How can I modify my `\actionsrow` macro so that I can specify arbitrary LaTeX as contents for my nodes? * * *               \documentclass[]{article}          \usepackage{etoolbox}     \usepackage{tikz}     \usetikzlibrary{matrix}               \begin{document}          % See -- http://tex.stackexchange.com/a/47649/7844     \newcommand{\clearrows}{\let\matrixcontent\empty}     \newcommand{\actionsrow}[3]{%       \foreach \i in #3 {%         \pgfmathparse{#1[\i-1]} % See -- http://tex.stackexchange.com/a/56838/7844; note \let vs \def         \let\c\pgfmathresult         \pgfmathparse{#2[\i-1]}         \let\s\pgfmathresult         \begingroup\edef\x{\endgroup            \noexpand\gappto\noexpand\matrixcontent{\noexpand\node[\s]{\c}; \&}}\x         }%       \gappto\matrixcontent{\\}%     }          % This works fine     \newcommand{\rowhv}[1]{         \actionsrow{{"$e$","$h$","$v$","$hv$"}}{{{"fill=gray!3"},{"fill=gray!33"},{"fill=gray!67"},{"fill=gray!100"}}}{#1} }     \clearrows     \rowhv{{1,2,3,4}} \rowhv{{2,1,4,3}} \rowhv{{3,4,1,2}} \rowhv{{4,3,2,1}}          \begin{center}     \begin{tikzpicture}       \matrix[ampersand replacement=\&,nodes={minimum size=7mm}]{\matrixcontent};     \end{tikzpicture}     \end{center}          % Here, arbitrary specifications work for the nodes, if done manually     \begin{center}     \begin{tikzpicture}     \matrix [nodes={minimum size=7mm}]     {         \node[fill=gray!3]{\texttt{e}}; & \node[fill=gray!33]{\color{red}$h$}; & \node[fill=gray!67]{$v$}; & \node[fill=gray!100]{$hv$}; \\         \node[fill=gray!33]{\color{red}$h$}; & \node[fill=gray!3]{\texttt{e}}; & \node[fill=gray!100]{$hv$}; & \node[fill=gray!67]{$v$}; \\         \node[fill=gray!67]{$v$}; & \node[fill=gray!100]{$hv$}; & \node[fill=gray!3]{\texttt{e}}; & \node[fill=gray!33]{\color{red}$h$}; \\         \node[fill=gray!100]{$hv$}; & \node[fill=gray!67]{$v$}; & \node[fill=gray!33]{\color{red}$h$}; & \node[fill=gray!3]{\texttt{e}}; \\      };     \end{tikzpicture}     \end{center}          % But this fails     \renewcommand{\rowhv}[1]{         \actionsrow{{"\texttt{e}","\color{red}$h$","$v$","$hv$"}}{{{"fill=gray!3"},{"fill=gray!33"},{"fill=gray!67"},{"fill=gray!100"}}}{#1} }     \clearrows     \rowhv{{1,2,3,4}} \rowhv{{2,1,4,3}} \rowhv{{3,4,1,2}} \rowhv{{4,3,2,1}}          \begin{center}     \begin{tikzpicture}       \matrix[ampersand replacement=\&,nodes={minimum size=7mm}]{\matrixcontent};     \end{tikzpicture}     \end{center}          ￼\end{document}


title: xy and circuitikz conflict

text: Following MWE compiles:               \documentclass{beamer}     %\usepackage[all]{xy}     \usepackage{circuitikz}     \begin{document}     \end{document}      Following MWE also compiles:               \documentclass{beamer}     \usepackage[all]{xy}     %\usepackage{circuitikz}     \begin{document}     \end{document}      But following doesn't compile:               \documentclass{beamer}     \usepackage[all]{xy}     \usepackage{circuitikz}     \begin{document}     \end{document}      and gives this error message.


title: Redefining \mathbf without using a new math alphabet

text: If you have:               \documentclass{article}     \DeclareMathAlphabet      {\mathbf}{T1}{futs}{bx}{n}     \begin{document}     \[     \mathbf{123}\quad\mathbf{xyz}     \]     \end{document}      Then numbers 0-9 and letters a-z and A-Z will be typeset using `futs` (considering they are the argument of my `\mathbf` command). However this is not what I want. I only want the digits 0-9 to be typeset in `futs` and the rest (letters a-z and A-Z) to be typeset in a previous font used by `\mathbf` (say LaTeX's default cmr family). This is what I did:               \documentclass{article}     \usepackage{expl3,xparse}     \makeatletter     \ExplSyntaxOn     \cs_new_eq:NN \orig_mathbf:n \mathbf     \NewDocumentCommand \new@mathbf { m } {      \orig_mathbf:n {        \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {          \mathcode ##1 = \numexpr "100 * \symnew@mathbf@font@digits + ##1 \relax        }        #1      }     }      \DeclareSymbolFont{new@mathbf@font@digits}{T1}{futs}{bx}{n}%     \cs_set_eq:NN \mathbf \new@mathbf     \ExplSyntaxOff     \makeatother     \begin{document}     \[     \mathbf{123}\quad\mathbf{xyz}     \]               \end{document}      So far with my testing, this works well but it has one important side effect: it uses one more math alphabet. So my question is, is there any better approach to do what I want without using a new math alphabet?


title: How to type the small letter corresponding to $\mathscr{G}$?

text: how to type ![enter image description here](http://i.stack.imgur.com/9wgoo.png)??? This is a math symbol in the renormalization group theory. The `mathrsfs` can only support capital letter. Sorry everybody, I made a serious mistake! I thought the G in the picture is a lowercase letter. But in fact it is already a uppercase letter. I'am very sorry.


title: multiple relative positioning in tikz

text: How to align a node vertical align to one node, and horizontal align to another one? For example, given below code               \documentclass{standalone}     \usepackage{pgf}     \usepackage{tikz}     \usepackage{makecell}     \usetikzlibrary{arrows,shapes,automata,petri,positioning}     \tikzset{         data/.style={             ellipse,             thick,             draw=black,             minimum size=6mm         },         process/.style={             rectangle,             thick,             draw=black         },     }           \pagestyle{empty}     \begin{document}         \begin{tikzpicture}[node distance=1 and 1,>=stealth',bend angle=45,auto]             \node [data] (a) {a};                  \node [process,align=center] (b) [below= of a] {bbbbbbbbbbb}                 edge[pre] (a);                  \node [data,align=center] (c) [below= of b]{cc\\ccc\\ccccc}                 edge[pre]   (b);                  \node [process,align=center] (d) [below right= of c] {dddd\\ddddddd}                 edge[pre]   (c);                  \node [data]    (e)     [above right= of d] {e}                 edge[post]  (d);                  \node [process] (f) [above= of e]   {f}                 edge[post]  (e);                  \node [data]    (g)    [above= of f]   {g}                 edge[post]  (f);         \end{tikzpicture}     \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/Rn04g.png) I want three nodes _e_ , _f_ , _g_ will be vertical base/mid/center alignment, and ( _a_ , _g_ ), ( _bb_ , _f_ ) ( _ccc_ , _e_ ) will be horizontal base/mid/center alignment. For example, above image is what I want. Note that the red line will not be displayed, it is represented for "base alignment line" ![enter image description here](http://i.stack.imgur.com/TF60H.png) Thanks for your help.


title: How can very long algorithms be automatically split over multiple pages?

text: I have a very long algorithm than spans several pages. I can not get Latex to make it span across several pages. _I know that several questions similar to this one have already been asked, but I haven't been able to find the answer I'm looking for in any of them._ My algorithm comprises several steps, each described in an algorithmic environment, and all those steps are nested together in an algorithm environment, as shown in the MWE below:               \begin{algorithm*}[!h]       \caption*{\textbf{Algorithm}}       \textbf{1)} Step 1       \begin{algorithmic}[1]           \State \textit{code}           \State \textit{pseudo code           \begin{itemize}             \item{item 1}             \item{Item 2}           \end{itemize}                \end{algorithmic}            \textbf{2)} Step 2            \begin{algorithmic}[1]         \State \textit{code}         \State \textit{code}       \end{algorithmic}                 \textbf{3)} Step 3           \begin{algorithmic}             ...        \end{algorithmic}               \end{algorithm*}      I have quite a lot of algorithms all inside a long document and I often have to make changes to the document (by inserting & deleting text, figures, ...) so I'm looking for an **automatic** way for Latex to split the algorithm over multiple pages, that enables me to present my algorithms in multiple steps as shown in the MWE above. Any help very welcome.


title: utopia mathdesign and biber incompatibility

text: I have a problem using utopia fonts with xltxtra and biber when using non- ascii characters. The problem disappears if using computer-modern (off-shelf LaTeX) or bibtex instead of biber. Here's an example:               \documentclass{article}     \usepackage{xltxtra}     \usepackage[utopia]{mathdesign}     \usepackage[style=authoryear,backend=biber,natbib=true]{biblatex}     \addbibresource{biberUTF8test.bib}     \begin{document}       \citet{Babuska:73:article:The-finite} is not ascii.       \printbibliography     \end{document}      where the biberUTF8test.bib is               @article{Babuska:73:article:The-finite,       Author = {Ivo Babuška},       Doi = {10.1007/BF01436561},       Fjournal = {{Numerische Mathematik}},       Issn = {0029-599X; 0945-3245/e},       Journal = {Numer. Math.},       Language = {English},       Msc2010 = {65N30 65N15 35J20},       Pages = {179--192},       Publisher = {Springer-Verlag, Berlin},       Title = {The finite element method with {Lagrangian} multipliers.},       Volume = {20},       Year = {1973}}      running `xelatex`, `biber`, `xelatex` fails to show the š in the author's name, but commenting the third line in the first file and running same sequence works or replacing biber by bibtex in the fourth line of first file and same sequence also works Any clue someone? Many thanks.


title: Where do I define custom glyphs?

text: I want to just add a few symbols, but am having a very hard time finding out where to do it. Specifically, I am wanting to integrate these commands:               \def\angle#1{\leavevmode\hbox{\vtop{\vbox{\hrule\kern1pt             \hbox{{$\scriptstyle #1$}\kern1pt}}           \kern1pt}\vrule}\kern1pt}          \def\tcelife#1{{\buildrel \circ \over e}_{#1}}      to invoke               \tcelife{x:\angle n}      However, I cannot find where to actually put this code. I have `MiKTeX 2.9` installed, using Windows. Edit: I am using Anki, do not deal directly with tex - I only use the syntax to build flash cards, so I am pretty ignorant of the back end. Thanks


title: Smartdiagram is hyphenating too much

text: I am trying to make a constellation style diagram but when I insert the words that I want to use, it is hyphenating too much. I don't have an issue that the diagram is wide. Essentially, I am trying to make: ![enter image description here](http://i.stack.imgur.com/41UKA.jpg) and I'm using the following code to do it:               \documentclass[12pt]{article}     \usepackage{tikz}     \usepackage{smartdiagram}          \begin{document}     \smartdiagramset{set color list={orange!60, green!50!lime!60,magenta!60,     blue!50!cyan},     uniform connection color=true     }     \smartdiagram[constellation diagram]{     Industry Rivalry,Suppliers,Substitutes,Buyers,Potential Entrants     }     \end{document}      and this is the result: ![Not so good version of porter's five](http://i.stack.imgur.com/fIuRm.png)


title: Shell Scheme with pgfplots/gnuplot

text: I have a problem with pgfplots. I want to create a shell scheme from an E-motor characteristics. In the end it should look like this (well, with some more pleasing colours): ![shell scheme example](http://www.compact- dynamics.de/uploads/RTEmagicC_Wirkungsgradkennfeld_deutsch.jpg.jpg) The data is stored in a .CSV-file.               n_max/min-1,M_max/Nm,eta1     1000,10,0.64     1000,20,0.72     1000,30,0.75     1000,40,0.76     2000,10,0.71     2000,20,0.78     2000,30,0.81     2000,40,0.83      And this is the Tex-code that stresses me               \documentclass{article}          \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{width=7cm,compat=1.8}     \usepgfplotslibrary{patchplots}          \begin{filecontents*}{example.csv}         n_max/min-1,M_max/Nm,eta1         1000,10,0.64         1000,20,0.72         1000,30,0.75         1000,40,0.76         2000,10,0.71         2000,20,0.78         2000,30,0.81         2000,40,0.83     \end{filecontents*}          \begin{document}     \pagestyle{empty}          \begin{figure}     \begin{tikzpicture}         \centering         \begin{axis}[             xlabel=\(n~\mathrm{in~min^{-1}}\), xmin=0, xmax=12000,              ylabel=\(M~\mathrm{in~Nm}\), ymin=0, ymax=140,             legend pos = south east,             scaled ticks = false,             view={0}{90},             height=0.7\textwidth,width=1.0\textwidth]             % max values for torque and revs             \addplot[mark=none, very thick, color=gray, domain = 0:5160]{130};             \addplot[mark=none, very thick, color=gray, domain = 5140:12000]{(60*70000)/(2*3.14159*x)};             \addplot[mark=none]                 table [x=n_max/min-1, y=M_max/Nm, col sep=comma] {example.csv};             %\addplot3[contour gnuplot={levels={0.7,0.8},labels over line,number=9},thick]             %   table [x=n_max/min-1, y=M_max/Nm, z=eta1, col sep=comma] {example.csv};         \end{axis}     \end{tikzpicture}     \end{figure}          \end{document}      After compiling LaTeX just says               ! Package pgfplots Error: Sorry, processing the input stream did not lead to en     d-of-scanline markers; the generated temporary file for 'contour external' does      not contain any of them (indicating that matrix structure is lost). To fix thi     s, you have the following options:      - Insert end-of-scanline markers into your input data (i.e. empty lines),      - provide two of the three options 'mesh/rows=<num matrix rows>, mesh/cols=<nu     m matrix cols>, mesh/num points=<total number points>'.          See the pgfplots package documentation for explanation.     Type  H <return>  for immediate help.      An example from pgfplots manual (page 138 of version 1.10) produces the same errors.               \documentclass{article}     \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{width=7cm,compat=1.8}     \usepgfplotslibrary{patchplots}          \begin{document}         \begin{tikzpicture}%         \begin{axis}[view={0}{90}]%             \addplot3[contour gnuplot]%                 coordinates {                 (0,0,0) (1,0,0) (2,0,0) (3,0,0)                 (0,1,0) (1,1,0.6) (2,1,0.7) (3,1,0.5)                 (0,2,0) (1,2,0.7) (2,2,0.8) (3,2,0.5)             };         \end{axis}%         \end{tikzpicture}%     \end{document}      I think the problem is, that gnuplot isn't able to read out the separate data points. Some experimenting with mesh/rows and mesh/cols has shown, that LaTeX interprets one line of the CSV-file as one column instead of three. Can anyone help me with this?


title: Sidenotes and footnotes not working in tufte class

text: I am using the `tufte-book` class, and the `\footnote` and `\sidenote` commands do not seem to be working properly, while marginnotes work. When I use either `\footnote{}` or `\sidenote{}` (no number, but this is, according to the manual, not required), I get two errors: missing number, treated as zero and illegal unit of meassure (pt inserted). Code example:               \documentclass[justified]{tufte-book}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern} % lettertype met alle karakters     \usepackage[dutch]{babel}     \usepackage{natbib}     \usepackage{eurosym}     \usepackage[stable]{footmisc}     \title{Footnotes and sidenotes}     \author{Ben}     \date{}      \begin{document}               \maketitle          \section*{Footnotes and sidenotes}     Main text \footnote{Footnote text}          More main text \sidenote{Sidenote text}     \end{document}      How do I resolve this issue?