title: Adding language to MiKTeX installation

text: My native language is Serbian and it is included in MiKTeX distribution for Windows. However, there is only latin version of it, and I'd like to use cyrillic Serbian. I tried searching the Internet about the issue and found this post. These files are based on Russian language, and after inspecting them, I found that the translations are just fine. I copied the contents of the files to two files (serbianc.ldf and serbianc.sty) and placed these files in tex\generic\babel folder where other language files reside. Next, I added the following line to babel.sty (among other language definitions):               \DeclareOption{serbianc}{\input{serbianc.ldf}}      When trying to use the language in TeX document, LaTeX fails at the following line:               \usepackage[serbianc]{babel}      with the following error:               ! LaTeX Error: File `serbianc.ldf' not found.      I have also tried going to MiKTeX settings and refreshing file name database to no avail. I'm rather new to TeX - it might be a big shot for me, but I do have a lot of programming skills and am eager to learn about it. The resources I found on the Internet are rather scarce and mainly Unix related. What am I missing here? Any help is much appreciated.


title: Asserting reference inequality

text: Is there a way for including assertions in a LaTeX document? I want to check that some condition is true, and only allow compilation of the document if it is (or at least complain otherwise). Specifically, a paragraph contains a reference to a chapter. Before compiling the final version, I'd like to be warned if the chapter is the current chapter, so that I could e.g. substitute the text with "in this chapter".


title: Configure table of contents, figures, tables for classicthesis

text: Hello i'm not so experienced on Latex and have one question .I am trying to configure table of contents, list of figures,list of tables since all of them appear automatically using:               % book example for classicthesis.sty     \documentclass[     % Replace twoside with oneside if you are printing your thesis on a single side     % of the paper, or for viewing on screen.     %oneside,     oneside,     11pt, a4paper,     footinclude=true,     headinclude=true,     cleardoublepage=empty     ]{scrbook}          \usepackage{lipsum}     \usepackage[linedheaders,parts,pdfspacing]{classicthesis}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{acronym}     \usepackage[titles]{tocloft}     \usepackage{tocloft}     \usepackage{minitoc}     \usepackage{times}     \usepackage{setspace}     \renewcommand{\contentsname}{TABLE OF CONTENTS}     \renewcommand{\cftchapfont}{\normalfont}     \renewcommand{\cftchappagefont}{\normalfont}     \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}     \renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}}      \renewcommand{\listfigurename}{LIST OF FIGURES}     \setlength{\cftbeforefigskip}{0.25in}     \renewcommand{\cftchappagefont}{\normalfont}     \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}          \renewcommand{\listtablename}{LIST OF TABLES}     \setlength{\cftbeforetabskip}{0.2in}          \title{Thesis Title}     \author{John Doe}          \begin{document}          \maketitle     \frontmatter     \tableofcontents     \listoffigures      \listoftables           \chapter{Acknowledgements}           I would like to thank my supervisor, Professor Someone. This      research was funded by the Imaginary Research Council.           \chapter{Abstract}           A brief summary of the project goes here.           \chapter{Abbreviations}          \mainmatter           \include{intro2}           \backmatter            \begin{thebibliography}{100} % 100 is a random guess of the total number of       %references      \end{thebibliography}          \end{document}        and for the intro2.tex:               \chapter{Introduction}      \label{ch:intro}      \section{Blabal}          blaalblbla     \subsection{blubl}      blublbu       In the table of contents the page of the subsections are still on the left and not on the right with no dots (don't really care about the dots just want them to be aligned on the right) and the same is also happening in the pages on list of figures and tables. I hope someone can trace the problem. Thanks in advance.


title: Right margin discrepancy between framed and fbox/minipage

text: Here is an MWE which shows that something is weird in the `framed` package.               \documentclass{article}     \usepackage{lipsum}     \usepackage{framed}     \setlength{\FrameSep}{3pt}     \setlength{\fboxsep}{3pt}     \begin{document}     \begin{framed}       \noindent\lipsum[2]     \end{framed}          \noindent\fbox{%       \begin{minipage}{1.0\linewidth}         \lipsum[2]       \end{minipage}     }          \end{document}      ![right margin discrepancy](http://i.stack.imgur.com/KywyH.png) Why does the `framed` environment disagree with minipage about where the right margin should be? Is there an easy way to get the two to line up? (The `framed` package claims to be a "preproduction version" and its documentation is dated 2007. Could we have new maintainers maybe?)


title: Remove node name from tikz style

text: I have this code which I have adapted for my use case. I am creating a bunch of nodes and connecting them together. The problem is, the node name appears in the figure (namely h1,... and v1...). I would like to get rid of that name and have pure circles in my figure. Is that possible? I have attached here the code even though I think it is a rather general question. Thank you!               \begin{figure}[h]     \centering     \def\layersep{2cm} % Gap between visible & hidden units     \def\numvis{5} % Number if visible units     \def\numhid{4} % Number of hidden units     \begin{tikzpicture}[         node distance=\layersep,         line/.style={shorten >=2pt,shorten <=2pt,>=stealth}         ]         \tikzstyle{neuron}=[circle,fill=black!25,minimum size=21pt,inner sep=0pt];         \tikzstyle{visible neuron}=[neuron];         \tikzstyle{hidden neuron}=[neuron];         \tikzstyle{annot}=[text width=4em];              % Iterate over visible units         \foreach \name / \y in {1,...,\numvis}             \node[visible neuron] (V\name) at (\y,0) {$v_\y$};              % Iterate over hidden units         \foreach \name / \y in {1,...,\numhid}             % Calculate the appropriate offset for the hidden unit based on the             % number of visible units.             \pgfmathparse{\y + (\numvis - \numhid) * 0.5}             \node[hidden neuron] (H\name) at (\pgfmathresult, \layersep) {$h_\y$};              % Draw a a line between each unit         \foreach \source in {1,...,\numvis}             \foreach \dest in {1,...,\numhid}                 \draw[line] (V\source) -- (H\dest);              % use if/then/else to decide where to draw the labels         \ifthenelse{\numvis > \numhid}         {             \node[annot,left of=V1, node distance=1.5cm] (hl) {Visible layer};             \node[annot,above of=hl] {Hidden layer};         }         {             \node[annot,left of=H1, node distance=1.5cm] (hl) {Hidden layer};             \node[annot,below of=hl] {Visible layer};         }     \end{tikzpicture}     \label{fig:rbm}     \caption{Restricted Boltzmann with \numvis{} visible units and \numhid{} hidden units.}     \end{figure}


title: Which tabular packages do which tasks and which packages conflict?

text: I've read a couple of questions recently about `tabular` environments, and it seems there's a whole bunch of packages that do stuff in this field. I'd really like a summary of what each package does, and which conflict. For example a quick google (plus my memory) got me `tabularx`, `booktabs`, `multirow`, `collcell`, `array`, `mdwtab`, `longtable`, `supertabular`... Which should I be using for what purposes? And more importantly, **which conflict?** [Should this be CW? One package per answer sort of thing?]


title: How to input current date directly from datetime to pgfgantt

text: I would like to input the current date taken from "datetime" into the "pgfgantt" package to update the date bar automatically at compilation. The date seems to be in the correct format, however when input to pgfgantt, it throws an error:               ! Use of \\ganttchart doesn't match its definition.     \new@ifnextchar ...served@d = #1\def \reserved@a {                                                       #2}\def \reserved@b {#3}\f...     l.23 ]{2014-06-01}{2014-07-30}      Working code is here (replace "today=2014-06-02" with "today=\dashdate\today" to reproduce error):               \documentclass[a4paper,10pt]{report}          \usepackage[pdftex,active,tightpage]{preview}     \setlength\PreviewBorder{2mm}     \usepackage{pgfgantt}     \usepackage{pgfcalendar}     \usepackage{ifthen}     \usepackage{datetime}          \newdateformat{dashdate}{\THEYEAR-\twodigit{\THEMONTH}-\twodigit{\THEDAY}}     %\dashdate\today          \begin{document}     \begin{preview}          \begin{ganttchart}[x unit=.3cm, hgrid,vgrid={dotted},time slot format=isodate,     today=     2014-06-02, %replace "2014-06-02" with "\dashdate\today" to reproduce error     today offset=.5,     today label=Current Date,     today label node/.append style={anchor=north west},     today label font=\itshape\color{red},today rule/.style={draw=blue, ultra thick}     ]{2014-06-01}{2014-07-30}     \gantttitlecalendar{year, month=name, week} \\     \ganttbar{Task-1.1}{2014-06-01}{2014-06-03} \\     \ganttbar{Task-1.2}{2014-06-03}{2014-06-06} \\     \ganttmilestone{Milestone 1}{2014-06-06}           \end{ganttchart}     \end{preview}     \end{document}      Any ideas how I can make this work?


title: Use of shaded box for section numbering only?

text: I have been wondering "how to get shaded box for section numbers only"? Also, How to get grey square in between left mark and page number in the header? In code below I can get solid black square. I have attached image below of the desired output. This example is from TUGINDIA tutorials. ![example](http://i46.tinypic.com/2hs5emr.png)                  \documentclass[12pt,twoside]{report}         \usepackage{titlesec}%for formatting chapter position and names              \titleformat{\chapter}[display]         {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{0pt}{\huge}         \titlespacing*{\chapter}{0pt}{-20pt}{10pt}               \title{\bf \huge xxx}          \author{xxx}          \date{}   %to disable date          \usepackage[top=1.3in, left=1.5in, right=1in]{geometry} %for setting margins          \usepackage{grffile}  %to avoid showing path of figure inserted          \includeonly{chap1/chapter_1}                   \titlelabel{\llap{\thetitle\quad}}% for section headings in margins               \usepackage{fancyhdr}         \pagestyle{fancy}         \newcommand{\helv}{%          \fontfamily{phv}\fontseries{}\fontsize{10}{12}\selectfont}          \renewcommand{\chaptermark}[1]{\markboth{#1}{}}%formatting chapter title          \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}          \fancyhf{}          \fancyhead[RO]{\helv \rightmark{} $\blacksquare$ \thepage}           \fancyhead[LE]{\helv \thepage{} $\blacksquare$ \leftmark}          \renewcommand{\headrulewidth}{0pt}         \usepackage{amssymb}               \parindent=0.5in         \parskip=10pt          \linespread{1.3}               \renewcommand{\abstractname}{\Large Abstract} %To increase Abstract font size          \begin{document}          \maketitle           \begin{abstract}           blahblah          \end{abstract}          blah blah          \end{document}


title: Vertically aligning list bullet when using \infer

text: I have a list where one of the list items is an `\infer{...}{...}` command. In this case, the list bullet is not vertically centered with the item, as you can see in the picture: ![enter image description here](http://i.stack.imgur.com/3rcnc.png) How can I move the list bullet at the height of the bar? **MWE**               \documentclass{scrreprt}     \usepackage{proof}     \linespread{1.5}     \begin{document}     \begin{itemize}     \item item 1     \item item 2     \item \infer{Something}{Something else}     \end{itemize}          \end{document}


title: Axis ticks in radians in polar pgfplots

text: I am using the `polar` library with `pgfplots` to plot a graph like this:               \begin{tikzpicture}     \begin{polaraxis}     \addplot[mark = none, domain = 0.4:12, samples = 600, data cs = polarrad]{sin(x)};     \end{polaraxis}     \end{tikzpicture}      As described in the manual, this uses radians for the function, but the axis labels are still plotted in degrees. Instead of having the 0, 30, …, 330 tick labels, I would like 0π, π/6, … 11π/6 labels. I am convinced the solution must be quite simple, but I have not been able to find it yet.


title: Amsmath and tikz - conflict?

text: I have a problem with:               \documentclass{minimal}      \usepackage[T1]{fontenc}      \usepackage[french]{babel}          \usepackage{amsmath}      \usepackage{tikz}          \begin{document}      \pgfmathparse{ifthenelse(1<0, "100","$\sin(x)$")}\pgfmathresult     \end{document}      The error:                ./MinimalConflit_amsmath.tex:9: Argument of \@gobble has an extra }.      <inserted text>      \par ** l.9 ...thparse{ifthenelse(1<0, "100","$\sin(x)$")}      \pgfmathresult      But the code is ok if I don't load the amsmath package. Is there a "conflict" with amsmath and TikZ?


title: How to install Beamer in Mac OS X lion?

text: I am brand new to LaTeX, and needed `beamer` package for my PowerPoint presentation. How do I install it? I have read something like this: http://www.arthurkoziel.com/2008/06/02/how-to-install-latex-beamer-for-tex- live-on-mac-os-x/ tried in the terminal, still get the error:               ! LaTeX Error: File `beamerthemeumbc3.sty' not found.      I think I am doing something wrong about my directory? I have dragged beamer into TeX folder, which is inside Applications. Hopefully someone can tell me the commands to type in terminal?


title: Switching from onecolumn to twocolumn sends to the next page!

text: I have a simple `documentclass` with `onecolumn` title and `twocolumn` body. When When switching back to `twocolumn` for the body text, it will goes to the next page instead of continuing under the title:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{article2}     \newcommand\@ptsize{}          \DeclareOption{letterpaper}        {\setlength\paperheight {11in}%         \setlength\paperwidth  {8.5in}}          \DeclareOption{10pt}{\renewcommand\@ptsize{0}}          \DeclareOption{final}{\setlength\overfullrule{0pt}}     \DeclareOption{onecolumn}{\@twocolumnfalse}     \DeclareOption{twocolumn}{\@twocolumntrue}          \ExecuteOptions{letterpaper,10pt,twocolumn,final}     \ProcessOptions     \input{size1\@ptsize.clo}          \newenvironment{titlex}         {%             \onecolumn         }%     \twocolumn     \endinput      How to switch back to `twocolumn` by continuing right after the title (in the same page). **UPDATE:** My point is how to safely switch from `onecolumn` to `twocolumn` and vice versa. An example is putting a long formula in the middle of a two- column text.


title: latexmk separate build directory

text: I'm trying to use `latexmk` for the first time in Ubuntu. My project directory is the following:   * Project      * src     * build     * images In the `src` directory are the `.tex` and `.bib` files. I want the `.aux`, `.bbl`, `.log` etc. files to go into the build directory. In the root directory I have the following script:                    #!/bin/sh          if [ $# -gt 0 ];then         if [ $1 = "-c" ];then             cd build             latexmk -c ../src/poly-paper.tex         fi     else         cd build         latexmk -pdf ../src/poly-paper.tex         mv poly-paper.pdf ..     fi           The problem is that using this script causes it to not find the bibliography. My `latexmk` is v4.24 and doesn't support the `-auxdir` commands and I have to do without it so that someone else can compile it too. Could someone suggest a solution please? **EDIT:** I didn't know `latexmk` is a simple script, so I installed the newest version but I have problems using the `-auxdir` and `-outdir` commands. The problems is that Ubuntu comes with TexLive 2009 which does not support the `-output-directory` for `pdflatex`.


title: How to pass in a ratio in fraction form (as opposed to decimal form) to table column definition?

text: My scenario is to pass in a ratio (in fractional form as opposed to decimal form) to each table column definition. **The following code cannot be compiled.**               \documentclass{article}     \usepackage{pgf}     \usepackage{array}     \usepackage{longtable}          \newcommand{\ratio}[2]%     {%         \pgfmathsetmacro\temp{(#1)/(#2)}%         \temp%     }          \newcolumntype{A}[1]%     {%         >{}%         m{#1\linewidth-2\tabcolsep-2\arrayrulewidth}%         <{}%     }          \begin{document}     \ratio{1}{2}     \ratio{2}{5}          \begin{longtable}{|A{\ratio{1}{2}}|A{\ratio{1}{2}}|}\hline     A & B \tabularnewline\hline     A & B \tabularnewline\hline          \end{longtable}     \end{document}


title: Fancyhdr - How to add a footer line outside of the footer area?

text: I am a beginner in LaTeX, tentatively using it for industrial documents. I am trying to mimic a company form. I do not understand why in the MWE, the content of the minipage, that I would like to see underneath the header rule, on the right side, is visible in the area reserved for the header. Also, I would like the the last line "Written by: Writer's name \hfill Approved by: Approver's name" to appear at the bottom of page, immediately above the footer line, regardless of the contents of the first page. I could not find a way to do this or to understand the behavior of the minipage. Perhaps there is also a better way to show the title underneath the right half of the header rule... Added note: The "written by..." statements should appear on the font page only. As a matter of fact there would be some logic in adding this to the contents of the footer of the front page, with additional arguments in the "Document parameters" list (these parameters are located in my original code on a separate file), such as \WriterName, \ReleaseDate, \ApproverName, etc, but it should appear above the footer rule line.               \documentclass[a4paper, oneside,11pt]{article}      \usepackage[top=10mm, bottom=40mm, left=19mm, right=19mm]{geometry}      \usepackage[utf8]{inputenc}      \usepackage[draft]{graphicx}      \usepackage{fancyhdr}     \usepackage{xcolor}     \usepackage[T1]{fontenc}     \usepackage{tgheros,textcomp}     \usepackage{lipsum}     \usepackage{lastpage}      \usepackage[ french,english,]{babel}           \def\LegalStatement{ %     \footnotesize\noindent\raggedright     \parbox[t]{.45\linewidth}{The Great Company Inc \\ MAILBOX 58670 PARIS TEXAS USA} \parbox[t]{.45\linewidth}{\copyright \thinspace \the\year~Company name The Great Company Corporation \\All international rights reserved\\ (\selectlanguage{french}Tous droits réservés)}     \medskip     \parbox[t]{\linewidth}{Ce document est sujet à modifications. Contacter Company Inc pour identifier la dernière révision et en obtenir une copie. Personnel Company name Inc: consultez la base de données "database centrale".     \selectlanguage{english}This document, managed by Company name Inc, is archived in the Central database.      A printout cannot be considered as a controlled document}     }          %ARGUMENTS FOR DOCUMENT     \def\DocumentNumber {XXXXXX}     \def\HeaderLogo {Logo.pdf}     \def\DocumentName{DOCUMENT NAME}      \def\DocumentType{Educational \\Specification}     \def\RevisionNumber{A }     \selectlanguage{english} %main language of document.     %END ARGUMENTS FOR DOCUMENT          \renewcommand{\familydefault}{\sfdefault}     %--------------------------------------------------------------------------     %HEADERS AND FOOTERS EXCEPT FRONT PAGE     \fancypagestyle{plain}{% Redefining in next lines  headers and their style.     \fancyhf{}     \chead{\bfseries\large{\DocumentType}}     \rhead{\textcolor{blue}{\large\bfseries{\DocumentNumber} \\ \footnotesize{\today}  \\ Rev \quad  \RevisionNumber}}     \lhead{\includegraphics[width=2.5cm]{\HeaderLogo}}     \lfoot{\bfseries\large{Rev \RevisionNumber}}     \rfoot{\bfseries{\thepage\ of \pageref{LastPage}}}     \renewcommand{\headrulewidth}{2pt}     \renewcommand{\footrulewidth}{2pt}     \renewcommand{\headheight}{2 cm} %  [thickness header line]-     \renewcommand{\headwidth}{\linewidth}%  [horizontal length header line]     \renewcommand{\headsep}{0.5 cm}%   [distance header-main text]     \renewcommand{\footskip}{2 cm} %  [distance footer-main text]     } %     % END HEADERS AND FOOTERS EXCEPT FRONT PAGE          %HEADER AND FOOTER FOR FRONT PAGE      \fancypagestyle{FrontPage}{% Redefining in next lines  headers and their style.     \fancyhf{}     \chead{\bfseries\large{\DocumentType}}     \rhead{\textcolor{blue}{\large\bfseries{\DocumentNumber} \\ \footnotesize{\today}  \\ Rev \quad  \RevisionNumber - PRELIMINARY }}     \lhead{\includegraphics[height=1.5cm, width=2.5cm]{\HeaderLogo}}     \cfoot{\LegalStatement}     \rfoot{\bfseries{\thepage\ of \pageref{LastPage}}}     \renewcommand{\headrulewidth}{2pt}     \renewcommand{\footrulewidth}{2pt}     \renewcommand{\headsep}{0 cm}%   [distance header-main text] --     \renewcommand{\footskip}{1 cm} %  [distance footer-main text]--     } %      %--END HEADERS FOOTER FRONT PAGE          %---BEGIN FRONT PAGE     \begin{document}            \thispagestyle{FrontPage}     \raggedleft     \vspace{4cm}     \begin{minipage}[c][][c]{.5\textwidth}     \centering\Large{\textcolor{blue}{\textbf{\DocumentName}}} \\     \normalsize\rule{\linewidth}{2pt}     \end{minipage}          \raggedright     \section{Scope}     \lipsum[2-4]          Written by:  Writer's name \hfill   Approved by: Approver's name     \end{document}


title: Drawing outward normal vectors to a regular polygon without specifying the coordinates

text: I would like to replicate the following figure: ![Morley Element Degrees of Freedom](http://i.stack.imgur.com/c1kiw.png) And I tried using `rotate` to circumvent using a specific coordinate together with the predefined anchor for regular polygon, and apparently it doesn't work.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes}     \begin{document}     \begin{tikzpicture}     \node[regular polygon, regular polygon sides=3, draw, minimum size=4cm]     (m) at (0,0) {};          \fill [black] (m.corner 1) circle (3pt);     \draw [black] (m.corner 1) circle (6pt);          \fill [black] (m.corner 2) circle (3pt);     \draw [black] (m.corner 2) circle (6pt);          \fill [black] (m.corner 3) circle (3pt);     \draw [black] (m.corner 3) circle (6pt);          \draw [black, ->, rotate=-90] (m.side 1) -- (m.corner 1);          \end{tikzpicture}     \end{document}      It appears to me that if I named the starting point and ending point for `draw` using the anchors, then the `rotate` wouldn't work?


title: Multi-line indentation using description

text: I'm having trouble using `description`. I would like the separation between my label and my description to be the same distance for each item, and have each additional line also be properly indented to the same distance, like so: ![desired](http://i.stack.imgur.com/wHHqT.png) So far all I seem to be able to get is: ![enter image description here](http://i.stack.imgur.com/HjM4Y.png) Using the following code:               \documentclass{article}     \usepackage{enumitem}          \begin{document}     \begin{description} [leftmargin=*,labelindent=16pt]     \item [To:] blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah     \end{description}     \end{document}      The same code produces itemized lists when description is changed to enumeration, which is not exactly the desired effect. Any help would be greatly appreciated.


title: multline inside gather?

text: I have 3 related equations, two of them do not fit on a single line. I want to present them in a gather-environment, but how to do linebreaks inside equations? `multline` does not work inside `gather`. In isolation, the equations would be typeset as follows:               \begin{equation} eq 1 \end{equation}           \begin{multline} long \\ eq 2 \end{multline}          \begin{multline} long \\ eq 3 \end{multline}


title: make index entries refer to number selected paragraphs

text: For a given work, I have to number some selected paragraphs, with a continuous numerotation throughout all the book. I can do it using this tip. I need the index entries refer to the paragraph numbers and not to the pages. I've seen this post, but I'm not able to customize it for my need, as I am quite a newbie to LaTeX and I don't understand which part of the implemantation I should change to refer to the numbered paragraphes... Till now, I've not choosen the document class -- as the tip for numbering some selected paragraphs is for memoir, I think I will use it. Thanks for your help.


title: Badbox overfull with figures and tables in TexMaker

text: I have a lot of `badbox`type of error in my document. It doesn't seem to affect the layout but what does it means ? Should I resize my figures and tables ?               Overfull \hbox (6.77963pt too wide) in paragraph at lines 179--179     \T1/cmr/bx/n/10 A$[]$/A$[]$|     []     Overfull \hbox (0.7736pt too wide) in paragraph at lines 179--180     [][]     []     <img/ADN_total.png, id=31, 516.93124pt x 373.395pt>     File: img/ADN_total.png Graphic file (type png)     <use img/ADN_total.png>     Package pdftex.def Info: img/ADN_total.png used on input line 196.     (pdftex.def) Requested size: 227.45044pt x 164.2943pt.     Overfull \hbox (0.602pt too wide) in paragraph at lines 196--197     [][]     []


title: Highlighting chunks of text spiral

text: I use the code provided in this question to draw a text spiral and now I want to highlight each chunk separated with a comma in a different color. Is there a way to achieve that?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{decorations.text}          \makeatletter          \let\pgf@lib@dec@text@dobox@original=\pgf@lib@dec@text@dobox%          \def\pgf@lib@dec@text@dobox{%         \pgf@lib@dec@text@dobox@original%         \ifpgfdecorationtextalongpathscaletext%         \pgfmathparse{\pgf@lib@dec@text@endscale+(\pgf@lib@dec@text@startscale-\pgf@lib@dec@text@endscale)*\pgfdecoratedremainingdistance/\pgfdecoratedpathlength}%         \setbox\pgf@lib@dec@text@box=\hbox{\scalebox{\pgfmathresult}{\box\pgf@lib@dec@text@box}}%         \fi%     }     \newif\ifpgfdecorationtextalongpathscaletext     \def\pgf@lib@dec@text@startscale{1}     \def\pgf@lib@dec@text@endscale{1}          \pgfkeys{/pgf/decoration/.cd,         text path start scale/.code={%             \pgfdecorationtextalongpathscaletexttrue%             \def\pgf@lib@dec@text@startscale{#1}%         },         text path end scale/.code={%             \pgfdecorationtextalongpathscaletexttrue%             \def\pgf@lib@dec@text@endscale{#1}%         }     }     \begin{document}         \begin{tikzpicture}[         decoration={         reverse path,         text along path,         text path start scale=1.5,         text path end scale=0,         text={Lorem ipsum dolor sit amet, consectetur adipisicing elit,          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua,          Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris         nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in         reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla         pariatur, Excepteur sint occaecat cupidatat non proident, sunt         inculpa qui officia deserunt mollit anim id est laborum}}     ]     \draw [decorate]          (0,0)          \foreach \i [evaluate={\r=(\i/2000)^2;}] in {0,5,...,2880}{ -- (\i:\r)};      \useasboundingbox (-2.75,-2.75) rectangle (2.75,2.75);      \end{tikzpicture}         \end{document}      I could not find an image that I have in mind but something similar to the below diagram, but there should be also text in the color blocks. I do not care about the arrow like decoration. ![](http://i.stack.imgur.com/4fGJJ.jpg)


title: symbol.cab missing digital signature

text: I am trying to run an Elsevier template, and apparently it needs the file symbol.cab. Miktex (2.9) tries to download this automatically from http://ctan.sharelatex.com/tex-archive/systems/win32/miktex/tm/packages/ but gets the error "Error response from server: 403." Now, I've read the threads about using the package manager and I tried that. The download fails. I even went to the address in my browser to download manually. Turns out, my work network is blocking the download because it is missing a digital signature. Is there anywhere else I can download this (and possible other) files where they might have a digital signature? Or will I have to download this from another computer and email it to myself or carry it in on a flash drive?


title: Math operator resizing in autosized brackets

text: I want to define a new command to format `\mathbb{E}` in the same way as `\sum` \- same size in display/inline formulae, and same treatment of sub/superscripts. The following seems to work...               \newcommand*{\bbe}{%        \ifinner           \mathbb{E}%        \else           \mathop{\displaystyle\vcenter{\hbox{\huge$\mathbb{E}$}}}%        \fi     }      ...except that in display formulae, when inside automatically sized brackets (e.g. `\left( \bbe_x \right)`) it reverts to treating it as if it were in an inline formula (so smaller size, subscripts to the right not beneath). I'm not sure what's causing this issue; any advice would be greatly appreciated!


title: What are the avaliable font sizes in texlive?

text: I'm using texlive 2010, and I'm trying to design the layout for a document in plain tex (because I need the document and also I want to learn tex). The input is the following               \font\fifteenrm=cmr15          \font\eighteenbf=cmbx18          \font\twelvebf=cmbx12          \hrule height1mm     \vskip 2mm          {\fifteenrm \noindent Chapter 1}     \vskip 18mm          {\eighteenbf \noindent Analysis I}     \vskip 35mm          {\twelvebf \noindent This is the title}\par          Here is some text...          \bye      the cmr15, cmbx18, and cmbx12 are font files that tex reads and loads but I didn't understand where are those files actually in the system. I looked in the log and found some hints. The log is the following               This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010) (format=pdftex 2011.2.24)  24 APR 2012 12:12     entering extended mode      restricted \write18 enabled.      %&-line parsing enabled.     **Book.tex     (./Book.tex [1{c:/texlive/2010/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] )      <c:/Users/Felipe/.texlive2010/texmf-var/fonts/pk/ljfour/public/sauter/cmbx18.6     00pk> <c:/Users/Felipe/.texlive2010/texmf-var/fonts/pk/ljfour/public/sauter/cmr     15.600pk><c:/texlive/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb>     <c:/texlive/2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>     Output written on Book.pdf (1 page, 32853 bytes).     PDF statistics:      40 PDF objects out of 1000 (max. 8388607)      18 compressed objects within 1 object stream      0 named destinations out of 1000 (max. 500000)      1 words of extra memory for PDF output out of 10000 (max. 10000000)      My question is why is tex looking in two different paths (one is c:/Users/Felipe/... and the other is c:/texlive/2010/...) and how does tex know where it has to search to find an specific font (e.g. cmbx18)?


title: Automatic \noindent on the first paragraph of each theorem environment

text: I am currently putting a `\noindent` before the first paragraph of each theorem, proof, etc. in my `memoir` document. Is there any way to have `memoir` do this automatically? For example, is there any way to make this MWE more concise?               \documentclass{memoir}          \usepackage{amsthm}     \newtheorem{thm}{Theorem}[chapter]          \begin{document}          \noindent This is my introduction.          This is the next paragraph of the introduction, which should be indented.          \begin{thm} (Theorem Name)          \noindent This is my theorem.     Note that I do want the ``(Theorem Name)'' to appear on the same line as where it says \textbf{Theorem 0.1}.          This is the next paragraph of the theorem, which should be indented.          \end{thm}          \noindent Here is a note about the theorem.          \begin{proof}          \noindent This proof has no name.          This is the next paragraph of the proof, which should be indented.          \end{proof}          \noindent This is my conclusion.          The end.          \end{document}


title: Time calculation for task reports

text: Consider this MWE:               \documentclass{article}          \newenvironment{dayreport}{\begin{tabular}{ll}\hline Task & Time\\\hline}{\hline\end{tabular}}     \newcommand{\task}[2]{#1 & #2\\}          \begin{document}     \begin{dayreport}     \task{a}{1 hr\hphantom{s}}     \task{b}{2 hrs}     \task{c}{1 hr 30 mins}     \end{dayreport}     \end{document}      The output looks like this: ![Tasks](http://i.stack.imgur.com/w991j.png) I would like to automate some tasks like inputing time and calculating total times. Time inputing examples:   * `\task{a}{1}` would produce `a & 1 hr\hphantom{s}`   * `\task{a}{1:30}` would produce `a & 1 hr 30 mins`   * `\task{a}{2}` would produce `a & 2 hrs` Total time calculation:               \begin{dayreport}     \task{a}{1}     \task{a}{1:30}     \task{a}{2}     \begin{endreport}      would produce `Total time: & 4 hrs 30 mins \\` when ending `dayreport`. Is something like that possible in LaTeX (I would probably need string splitting, simple arithmetic and if-then-else constructs)? Should I rather write a short program to parse the input and output the appropriate LaTeX code?


title: How can I top align table cells of variable length?

text: I would like to get the lorem ipsum text to start on the same row as "A" in the table below. How can I do this? ![enter image description here](http://i.stack.imgur.com/QNmT7.png) Here is my code:               \documentclass{article}     \usepackage[hmargin=3cm,vmargin=8cm]{geometry}     \usepackage{array}     \newcolumntype{B}[1]{>{\arraybackslash\hspace{0pt}}p{#1}}     \begin{document}     \begin{tabular}[t]{l@{\hspace{0.7cm}}!{\vrule width 2pt}@{\hspace{0.7cm}}B{10cm}}     X & Y \\     & \\     A \\ B &      lorem ipsum dolor sit amet, consectetuer adipiscing elit. nam cursus. morbi ut mi. nullam enim leo, egestas id, condimentum at, laoreet mattis, massa. sed eleifend nonummy diam. praesent mauris ante, elementum et, bibendum at, posuere sit amet, nibh. duis tincidunt lectus quis dui viverra vestibulum. suspendisse vulputate aliquam dui. nulla elementum dui ut augue. aliquam vehicula mi at mauris. maecenas placerat, nisl at consequat rhoncus, sem nunc gravida justo, quis eleifend arcu velit quis lacus. morbi magna magna, tincidunt a, mattis non, imperdiet vitae, tellus. sed odio est, auctor ac, sollicitudin in, consequat vitae, orci. fusce id felis. vivamus sollicitudin metus eget eros. \\     & \\     \end{tabular}     \end{document}


title: \citep is not working

text: I am new to LaTeX (MiKTeX version) and try to get authoryear citation e.g. (Hugh et al., 2009) using \citep{MCOSW}. But rather it shows the whole list of authors with year at the end e.g. (Hugh Glaser, Afraz Jafri, and Ian Millard, April 2009). How can I force it to show et al. I am using natbib package. List of packages along with style and bib is mentioned below:               \usepackage{epsfig}                \usepackage{graphics}              \usepackage{subfigure}                \usepackage{fancyheadings}               \usepackage{float}               \usepackage{times}            \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}              \usepackage{algorithmic}              \usepackage{algorithm2e}             \usepackage{verbatim}             \usepackage{appendix}              \usepackage[round,authoryear,comma,sort&compress,numbers]{natbib}            \usepackage{hyperref}          \bibliographystyle{plainnat}          @article {MCOSW,     author = "{Hugh Glaser, Afraz Jafri, and Ian Millard}",     title = "{Managing co-reference on the semantic web.}",     journal = "{In WWW2009 Workshop: Linked Data on the Web (LDOW2009)}",     year = "{April 2009}",     }      Could anyone of you please help. Thanks


title: pgfplots: Legends in multiple y-axis plot overlapping

text: I am trying to add a legend for two plots on two different y-axes, however they are overlapping each other and each one is being written in its own box. I would like for both of them to share a single box and not overlap each other. Most of the examples I have seen for creating the legend assume that all series happen within a single `axis` environment, but creating a second y-axis requires me to also create a second `axis` environment, and I am guessing that's where I run into trouble. Here's a MWE. What am I overlooking?               \documentclass{article}          % UNITS     \usepackage{siunitx}     \sisetup{per=slash, load=abbr}          % GRAPHICS     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{width=7cm,compat=1.3}          \begin{document}           \begin{tikzpicture}        \begin{axis}[          scale only axis,          scaled x ticks=base 10:3,          axis y line*=left,          xmin=0, xmax=0.06,          ymin=0, ymax=80,          xlabel=$Q/\si{\metre\cubed\per\second}$,          ylabel=$H/\si{\metre}$]          \addplot[smooth,mark=x,blue]           coordinates{               (0,68.6)               (0.0148,72)                (0.0295,68.6)               (0.0441,53.4)               (0.059,22.8)              };     %        \addlegendentry{$H$}             \legend{$H$}           \end{axis}                \begin{axis}[             scale only axis,             scaled x ticks=base 10:3             /pgf/number format/sci subscript,             axis y line*=right,             axis x line=none,             xmin=0, xmax=0.06,             ymin=0, ymax=100,             ylabel=$\eta/\si{\percent}$]             \addplot[smooth,mark=*,red]              coordinates{               (0,0)               (0.0148,48)                (0.0295,66)               (0.0441,66)               (0.059,45.0)              };      %      \addlegendentry{$\eta$}             \legend{$\eta$}            \end{axis}            \end{tikzpicture}     \end{document}


title: What LaTeX math markup can pandoc translate into MathML?

text: I'm working with a gitit wiki because we can use LaTeX markup for mathematical formulas. However, I am learning that I can't use such sequences as `$\mathbb R$` or `$\mathcal A$` or even `$\mathbf X$`, as they don't get translated into MathML. How can I found out what markup is actually supported?


title: Why do pdflatex and latex LNCS outputs look different?

text: I've found that using embedded postscript (eps) with the `pdflatex` command, as opposed to the `latex` command, may require more effort; and potentially insecure write18 permissions with cygwin. No problem, I thought, I can just use `latex`. However, the two give different results. I made a test by unzipping the Springer LNCS file llncs2e.zip. In the first case I used:               pdflatex llncs.dem && pdflatex llncs.dem      In the second case I used:               latex llncs.dem && latex llncs.dem && dvipdf llncs.dvi      In the second case I find that the bottom margin appears very large, while the top margin is too small; and don't think this looks acceptable. I'm not looking for a way to fix the margins, but would like to know where I went wrong in assuming that both routes would produce identical output.


title: Include both short and long caption in list of figures

text: I'm writing a paper where I'm trying to repurpose the list of figures as a figure legends section. I'd like each figure to have something like "Figure X: Title" at the bottom, with list of figures entries containing "Figure X: Title", followed by the legend on a new line. I've almost got what I want using the tocloft package with the following:               \documentclass{article}          \usepackage[demo]{graphicx}     \usepackage{lipsum}          \usepackage[titles]{tocloft}     \addtocontents{lof}{\cftpagenumbersoff{figure}}     \renewcommand\listfigurename{Figure Legends}     \renewcommand\cftfigpresnum{\bfseries Figure }     \renewcommand\cftfigaftersnum{\bfseries :}     \renewcommand\cftfigaftersnumb{\\}     \renewcommand{\cftdotsep}{\cftnodots}     \setlength\cftbeforefigskip{12pt}          \begin{document}          \lipsum[1]     \begin{figure}[ht]       \centering \includegraphics{image1}       \caption[Normally a much longer legend for the first figure.]{Title for first fig}     \end{figure}     \lipsum[2]          \clearpage     \listoffigures          \end{document}      Note that I've put the legend in the "short" caption and the title in the "long" caption. The one thing I haven't managed to figure out is how to have both the "short" and "long" captions in the list of figures. I considered using the cftXaftersnum command to include the short caption as a variable, but I'm not sure how to go about doing this. UPDATE: The answer is brilliant, but I neglected to point out one additional requirement: I need doublecaption to cooperate with subfigures. I have one figure with two subfigures, and the counter gets double-incremented. Here's an example using the solution:               \documentclass{article}          \usepackage{amsmath}     \usepackage[demo]{graphicx}     \usepackage{lipsum}          \usepackage{subcaption}          \usepackage[titles]{tocloft}     \addtocontents{lof}{\cftpagenumbersoff{figure}}     \renewcommand\listfigurename{Figure Legends}     \renewcommand\cftfigpresnum{\bfseries Figure }     \renewcommand\cftfigaftersnum{\bfseries : }     \renewcommand{\cftdotsep}{\cftnodots}     \setlength\cftbeforefigskip{12pt}          \newlength\mylength     \settowidth\mylength{\cftfigpresnum}     \addtolength\cftfignumwidth{\mylength}          \makeatletter     \def\doublecaption{%       \ifx\@captype\@undefined         \@latex@error{\noexpand\caption outside float}\@ehd         \expandafter\@gobble       \else         \refstepcounter\@captype         \expandafter\@firstofone       \fi       {\@dblarg{\@doublecaption\@captype}}%     }     \long\def\@doublecaption#1[#2]#3{%       \par       \addcontentsline{\csname ext@#1\endcsname}{#1}%         {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #3\newline#2}}%       \begingroup         \@parboxrestore         \if@minipage           \@setminipage         \fi         \normalsize         \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par       \endgroup}     \makeatother               \begin{document}          \lipsum[1]     \begin{figure}[ht]       \centering \includegraphics{image1}       \doublecaption[Normally a much longer legend for the first figure.]{Title for first fig}     \end{figure}     \lipsum[2]          \begin{figure}[ht]       \centering        \begin{subfigure}{0.45\textwidth}         \includegraphics{image2}            \caption{Case one}       \end{subfigure}       \begin{subfigure}{0.45\textwidth}         \includegraphics{image3}          \caption{Case two}       \end{subfigure}       \doublecaption[Not very long legend for fig with subfigs.]{Title for fig with subfigs}     \end{figure}     \lipsum[3]          \clearpage     \listoffigures               \end{document}      I can see in the doublecaption definition that the counter is incremented by:               \refstepcounter\@captype      I guess the subcaption package must do something to prevent double- incrementing counters, but I'm not sure how to do this. I can always just explicitly decrement the list counter after the subfigures, but before the figure's doublecaption, but I suspect there's a better way?


title: How to change / to be horizontal?

text: I like to change a/b to be               a     -      b      how to do that?


title: Draw shifted plots from the same data

text: I need to draw a shifted plot from a data table (or a external file) without edit table coordinates. Using the `shift={(x,y)}` option works but `x` and `y` are not related to the axis coordinates `s` and `f`. Any advice?               \documentclass{article}          \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[         xmin=0, xmax=1,         ymin=0, ymax=360,         xlabel=$s$,         ylabel=$f(s)$     ]     \addplot[shift={(0.0,0.0)}] table[header=true,x=s,y=f] {         s       f         0.0     75.9638         0.380665    75.9638         0.380665    206.565         0.58711     206.565         0.58711     243.435         0.793555    243.435         0.793555    333.435         1.0     333.435     };     \end{axis}     \end{tikzpicture}          \end{document}


title: Align top with multirow tables in Lyx 2.0

text: I'm having trouble doing vertical alignment in tables with multirow in Lyx. I have data that is in a 'tree' format that I need to present in tables. I would like Category 1, Subcategory 1.1 and Value 1 to all align vertically, same for Category 2, subcategory 2.1 etc. Any tips? The normal 'align top' option is disabled in Lyx as soon as I use multirow. ![Example of problem](http://i.stack.imgur.com/AbsGq.png) This is the latex source created by my lyx file:               % Preview source code          %% LyX 2.0.0 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{scrartcl}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{array}     \usepackage{multirow}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          \makeatother          \usepackage{babel}     \begin{document}     \begin{tabular*}{1\columnwidth}{@{\extracolsep{\fill}}>{\raggedright}m{0.33\columnwidth}>{\raggedright}m{0.33\columnwidth}>{\centering}p{0.33\columnwidth}}     Column 1 & Column 2 & Column 3\tabularnewline     \multirow{4}{0.33\columnwidth}{Category 1 With very long text that wraps} & \multirow{2}{0.33\columnwidth}{Subcategory 1.1} & Value 1\tabularnewline      &  & Value 2\tabularnewline      & \multirow{2}{0.33\columnwidth}{Subcategory 1.2} & Value 3\tabularnewline      &  & Value 4\tabularnewline     \multirow{2}{0.33\columnwidth}{Category 2} & Subcategory 2.1 & Value 5\tabularnewline      & Subcategory 2.2 & Value 6\tabularnewline     \end{tabular*}     \end{document}


title: Enumerating contents in Tables and Table stretching

text: In my document, I have a table with pretty much texts in it. One of my problem is that I have about 2, 3 hierchical levels of texts, such as row 1: Description row 2:                 1. Advantages                a. on Structure                    + advantage of structures                    + advantage of structures                b. on Structure                    + advantage of structures                    + advantage of structures            2. Disadvantages                 ...      row 3: Solution row 4:                 1. Main solution                 ...             2. Alternative solution      I know it seems a bit unnatural to use table for that purpose, but it's because I'm trying to apply the template the administrators provide (which they use MSWord to create) on my Thesis. As finding the way to do this, I figure out a pretty simple solution is to use _tabular_ together with the _numerate_ and _itemize_ environment. However, the problem occurs when the table become pretty large as it expand over pages. I also found a way to break the table down using _longtable_ , but it seems not working well in this situation: because the contents in 1 row (say row #2) are all encapsulated between the scope of \begin{enumerate}...\end{enumerate}, the row cannot be broken into 2. Thus, it seems pretty ugly for the first small row 1 in a whole page and the big chunky row 2 in the next page. Actually, as I observe, the {longtable} can only breaks tables at each row (i.e. between row 1 and row 2 or between row 2 and row 3...), thus, even if the second row is more-than-one page long, it still remains in 1 page (leaving a part of content hidden at the page bottom) Dont know it there's a way around this problem or I have to use another technique for my initial problem?


title: How to keep font preferences in TexWorks 4

text: The default font is too small on my screen at the resolution I have it, so I like to reset the font to size 12, but it appears I have to do this everytime I launch the program. How do I make it remember my preferences?


title: Sublime Text 2: LaTeXTools reference completion using cref

text: I am using sublime text 2 and LaTeXTools to write .tex files. In general this works fine. However, I am using the cref package and changed the auto-completion (`ref_completion.py`) for references such that it recognizes cref. All this worked fine until an update came. Now I am back to the old version despite having copied `ref_completion.py` to the user folder. Apparently though, this only works for settings. So here is my question: Is there a smart way (besides copying the old file back into the LaTeXTools folder after each update) to store my changes permanently?


title: Exact scaling with TiKZ-scale

text: I am using `tikzscale` to scale all my figures to the same size. This works quite nicely, but sometimes there is a difference in the scaled width. I can manually tweak the scale parameter (using `pdfcrop` and looking at the resulting page width), but it would be easier if the size would be exact right out of `tikzscale`. In this example the width of the first plot seems a bit too narrow in comparison with the box while the second plot seems too be the widest figure. > ![enter image description here](http://i.stack.imgur.com/W6pkn.jpg) ## **MWE**               \documentclass{article}          \usepackage{filecontents}          \usepackage{tikz, tikzscale, pgfplots}     \usetikzlibrary{calc}          \begin{document}          \begin{filecontents}{fig.tikz}     \begin{tikzpicture}     \begin{axis}[]     \addplot {x^2};     \end{axis}     \end{tikzpicture}     \end{filecontents}          \begin{filecontents}{fig2.tikz}     \begin{tikzpicture}     \draw (0,0) rectangle (1,0.2);     \end{tikzpicture}     \end{filecontents}          \begin{filecontents}{fig3.tikz}     \begin{tikzpicture}     \begin{axis}[yticklabel style={overlay}]     \addplot {x^2};     \end{axis}     \end{tikzpicture}     \end{filecontents}               \includegraphics[width=1.00\linewidth, axisratio=4]{fig.tikz}           \vspace{0.1cm}          \includegraphics[width=1.00\linewidth]{fig2.tikz}           \vspace{0.1cm}          \includegraphics[width=1.00\linewidth, axisratio=4]{fig3.tikz}                \end{document}


title: Why are text format commands used inside braces?

text: Most commands in Latex are written with the arguments inside braces following the command: `\command{arguments}`. But text formatting options, like `\em`, or `\scriptsize` are usually written _inside_ the braces, like `{\em some italicised text}`. Why is this? What makes these commands different? I'm particularly asking because it seems to make standardisation - of which LaTeX really appears badly in need - more difficult.


title: \XeTeXglyph triggers previous character variant. How to avoid this?

text: I’m typesetting a document in Hoefler Text with XeTeX. I am however dissatisfied with the default position hyphens and dashes and much rather use other glyphs instead. I currently achieve this with the `\XeTeXglyph` macro. Unfortunately, the last character before I call the `\XeTeXglyph` macro behaves as it was the last character of the line and is sometimes replaced by a variant glyph, which is often unsuitable.               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass{article}     \usepackage{fontspec}           \setromanfont{Hoefler Text}          % DOCUMENT     \begin{document}          \itshape % italics trigger variants much more readily          n-t % doesn't trigger n variant          n\XeTeXglyph 16 t % does trigger n variant          \end{document}      Is there another (better) way to invoke the right glyph without triggering the variant? Or is there a way to prevent triggering the character variant while using `\XeTeXglyph`, preferably without replacing the n by another `\XeTeXglyph`?


title: Two equations with sub equations

text: I would like to produce the following format. A=A B=B C=C D=D E=E I tried using align. However, I failed to get the required output. Please correct me.               \begin{align*}  A&=A & B&B \\     C&=C  & D&=D  &E&E    \end{align*}       Appreciate your inputs.


title: hyperref changes footnotes of Koma script

text: I defined footnotes to insert a colon between `\footnote{bla}\footnote{bla}`. But when I load `hyperref` this is destroyed. In addition KOMA removes space at the beginning of a footnote, while hyperref modifies this again. Please compare the results of compiling the following MWE:               \documentclass[footnotes=multiple]{scrbook}               \usepackage{hyperref}          \usepackage{bidi}          %\KOMAoptions{footnotes=multiple}          \deffootnote[1.5em]{1.5em}{0mm}{\textsuperscript{\normalfont\thefootnotemark}}          \begin{document}          Test\footnote{%     first footnote     }\footnote{     Second footnote.     }\footnote{       The point of writing this text is that I can insert this footnote here so that Ulrike can see how       a footnote looks like. The lipsum package does not insert footnotes.     }\footnote{       And if they did not die, the wrote another footnote.     }\footnote{       The point of writing this text is that I can insert this footnote here so that Ulrike can see how       a footnote looks like. The lipsum package does not insert footnotes.     }               \end{document}      I found a way to set the footnotes=multiple after loading the hyperref package, but is this the correct way? Seems to be a bug in the `hyperref` package. Furthermore, when I add the `bidi`package, setting the option after loading the packages does not work any longer ...


title: Beamer listings fragile -- Too much space

text: I am using `listings` package in Beamer. If I use inline listing, there is no problem and the listings look good. However, if I use `\begin{lstlisting}`, it is required to use fragile frame and the listings become urly. Too much space between characters. Attached are the minimal running example and the output that describe my problem. Much appreciated if you can help me to fix this.               \documentclass{beamer}     \usetheme{Montpellier}     \usecolortheme{crane}          \usepackage{listings}     \lstset{       language=HTML,       basicstyle={\small\ttfamily},       breaklines=true     }          \begin{document}               \begin{frame}[fragile]     \frametitle{Question -- Beamer-Listings-Fragile}          Inline listing, good looking:      \lstinline!<link rel="stylesheet" type="text/css" href="filename"/>!          \vspace{4ex}     Too much space for this:     \begin{lstlisting}     <link rel="stylesheet" type="text/css" href="filename"/>     \end{lstlisting}          \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/bOlRw.png)


title: How to use only overlay between tikz picture and equation

text: I have a working example here. I want to display tikzpicture and equation one at a time. I don't know how to use only overlay here.               \documentclass{beamer}               \usepackage{tikz}     \usetikzlibrary{shapes, shadows, arrows}          \tikzset{       basic/.style  = {draw, text width=2cm, drop shadow, font=\sffamily, rectangle},       root/.style   = {basic, rounded corners=2pt, thin, align=center,                        fill=green!30},       level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,                        text width=8em},       level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}     }          \mode<presentation>          \begin{document}          \begin{frame}              \begin{tikzpicture}           level 1/.style={sibling distance=40mm},           edge from parent/.style={->,draw},           >=latex]              % root of the the initial tree, level 1         \node[root](start) {Mass Balance};         \draw[->,very thick](0,0) (1.2,0)--(1.9,0);         \draw[->,very thick](-1.8,0)--(-1.1,0);         \draw[->,very thick](0,0.6)--(0,1.4);         \draw[->,very thick](0,-1.4)--(0,-0.6);         \node[right of =start,xshift=2.5cm](spatialpos){$q_c(t,x+\Delta x,\tau)$};         \node[left of =start,xshift=-1.7cm](spatialneg){$q_c(t,x,\tau)$};         \node[above of =start,yshift=0.8cm](agepos){$c(t,x,\tau+\Delta \tau)$};         \node[below of =start,yshift=-0.8cm](ageneg){$c(t,x,\tau)$};         \draw[->,very thick](-4,-3)--(-4,0);         \draw[->,very thick](-4,-3)--(-0.5,-3);         \node[below of = ageneg,yshift=0.2cm](spatial){Spatial dim};         \node[left of = spatialneg,yshift=0.4cm](age){Age dim.};         \end{tikzpicture}                       \begin{align*}              \rho \Delta x \Delta y \Delta z \Delta \tau \partial_t c_i(t,x,\tau) \\             &= \rho \Delta x \Delta y \Delta z \Delta \tau (p_i-d_i)  \\             &- \rho \Delta y, \Delta z \Delta \tau [q_{i,x}(t,x+\Delta x/2, y, z, \tau)\\             &\qquad - q_{i,x}(t,x - \Delta x/2, y, z, \tau)]\\             &- \rho \Delta x, \Delta z \Delta  \tau [q_{i,y}(t,x,y+\Delta y/2, y, z, \tau)\\             &\qquad - q_{i,y}(t,x,y - \Delta y/2, z, z, \tau)]\\             &- \rho \Delta x \Delta y \Delta \tau[q_{i,z}(t,x,y,z+\Delta z/2, \tau) \\             &\qquad - q_{i,z}(t,x,y,z-\Delta z/2, \tau)]\\                 &- \rho \Delta x \Delta y \Delta \tau[q_{i,z}(t,x,y,z+\Delta z/2, \tau) \\             &\qquad - q_{i,z}(t,x,y,z-\Delta z/2, \tau)] \\             \end{align*}          \end{frame}          \end{document}


title: Overbrace height adjustment

text: I have a set of equations which I'd like to annotate with overbraces (or anything else at your discretion). However they are fixed to the top of each individual item which they reference, which looks messy. Can I make them all at a fixed height above the equations? ![enter image description here](http://i.stack.imgur.com/DlPuI.png)               \documentclass{article}     \usepackage{graphicx,amsmath}          \begin{document}               \begin{align}     \overbrace{\dfrac{\partial\rho \mathbf{U}}{\partial t}}^{\text{time derivative}}+\overbrace{\mathbf{U}\cdot \nabla \rho\mathbf{U}}^{\text{advection}}=&\overbrace{-\nabla P}^{\text{pressure gradient}}+\overbrace{\mu\nabla^2\mathbf{U}}^{\text{diffusion}}+\overbrace{\rho \mathbf{g}}^{\text{body force}},&\quad \text{\emph{momentum eq.}}\label{eq:mom}\\        \dfrac{\partial \rho}{\partial t}+\nabla\cdot \rho\mathbf{U}=&\, 0,&\quad \text{\emph{continuity eq.}}\label{eq:cont}     \end{align}          \end{document}


title: Why does a color meant for the first typeset line *only* (with package magaz) affect the *entire* document?

text: I am trying to make a nice layout that gives a different style to the first line in a section using the package magaz. All examples I have seen feature some variation of small caps `{\scshape text}` or upper case `\MakeUppercase{text}`. I would like to change the font and the color. This works well for the font but the color unfortunately affects the entire document rather than just the first line.               \documentclass[12pt,english,american]{article}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}          \makeatletter          \usepackage{mathpazo}     \usepackage{xcolor}      \usepackage{magaz}          \newcommand{\FirstLineCommand}[1]{\noindent\fontfamily{iwona}\fontseries{bc}\selectfont{\textcolor{red}{#1}}}          \renewcommand\FirstLineFont{\FirstLineCommand}          \makeatother          \usepackage{babel}     \begin{document}     \selectlanguage{english}%          Hello just testing.          Normal \textcolor{red}{color switching} should work.          \FirstLine{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}          Some more text.     \end{document}      As you can see, I define a command `\FirstLineCommand` to pass on to the magaz package as a `\FirstLineFont` If I use instead `\newcommand{\FirstLineCommand}[1]{\noindent\fontfamily{iwona}\fontseries{bc}\selectfont{\MakeUppercase{#1}}}` that works just fine. I am clearly not a guru when it comes to latex syntax, so after some tinkering with adding extra braces here and there and moving the color statement around (and trying `{\color text}` instead of `\textcolor{text}`, I'm still stumped. I'd be happy if you could help me color the first typeset line of the paragraph only.


title: colortbl stepping on midrules in booktabs

text: I'm using booktabs and colortbl. I'm get a very annoying problem of the color table overlapping a horizontal rule. Maybe pixel snapping problem or something, but I can't make it go away. And I appreciate that rules and color in the same table are typographically suspect, but let's please pretend otherwise for a moment. Here's my MWE:               \documentclass{article}          \usepackage[table]{xcolor}     \usepackage{tabulary}     \usepackage{booktabs}          \begin{document}     \begin{center}          \newcolumntype{G}{>{\columncolor{gray!15}[0.9\tabcolsep]}C}     \newcommand{\mythickrule}{\specialrule{1em}{0em}{0em}}     \newcommand{\whiterow}{\rowcolor{white}[0.9\tabcolsep]}          \begin{table}       \begin{tabulary}{\linewidth}{LG} \mythickrule             \whiterow foo            & stuff \\ \mythickrule             bar                      & stuff \\ \mythickrule         \end{tabulary}     \end{table}     \end{center}     \end{document}      Here's out it looks for me. Notice the little nubs and cutouts. How do I clean this up so colors and rules are flush? ![colortbl problem](http://i.stack.imgur.com/AT7Xv.png) I found a related link, but this didn't lead to an answer for me: Coloring columns in a table with colortbl and booktabs


title: Trying to do graphical decorations in "ClassicThesis style"

text: Is there a way to obtain an effect like the page below? The gray tones of the effect in the page below are uniforms but I would have different tones among the various shapes. The main gray tone should be the following:               \definecolor{halfgray}{gray}{0.55}     \color{halfgray}% in classicthesis       I think that, this decoration should be applied (if this experiment is successful) only at the first page of each chapter... ![enter image description here](http://i.stack.imgur.com/BGrDp.png)               \documentclass[headinclude,footinclude]{scrbook}          \usepackage[eulerchapternumbers,pdfspacing]{classicthesis}          \usepackage{arsclassica}          \begin{document}     \chapter{graphic test}     \section{graphic test}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin et metus vel diam tempus egestas in ut sem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus justo orci, porttitor at tempor ut, gravida at urna. Donec facilisis purus quis dolor viverra non cursus turpis fermentum. Phasellus elit metus, interdum vitae semper id, consequat at sem. Quisque sollicitudin purus enim. Fusce ultrices libero at neque dignissim eleifend. Vestibulum est libero, accumsan vitae ullamcorper sit amet, laoreet vel mauris. Quisque id odio sapien, non ultrices justo. Nulla sit amet magna nunc, in tempor lectus. Maecenas vitae sem nec mi tincidunt vehicula.     \end{document}      * * * To be clear, I wouldn't this behaviour, but I would that the decoration go always in the bigger margin... (I've have used `openany`) ![enter image description here](http://i.stack.imgur.com/Ayfmz.png)


title: Compare \CurrentOption with a string

text: I encountered a problem that I want to compare the `\CurrentOption` with a string. In the `.tex` file I have a code below.               \usepackage[en-ver]{cufestatletter}      Then I want to use `\ifx` to determine whether I use `en-ver` option or not. This is the code I use now.               \ifx \CurrentOption \en-ver     \chead{\cufestatlogo}     \else     \lhead{\cufestatlogo}     \fi      I have declared the option `en-ver` using:               \DeclareOption{en-ver}{\def\cufestatlogo     {\hspace*{-0.6in} \includegraphics[scale=0.07]{Header_En_ver.jpg}}}       However, this `\ifx` code doesn't work at all.


title: Bold arrows in xymatrix

text: How can I produce a bold arrow in the package `\xymatrix`? I've tried with `\ar@{\bf{->}}[r]` and similar alternatives without success.


title: tikz state initial with vertical orientation?

text: How can I change the orientation of the start arrow to come from the top instead of coming from the left as it is its default behavior. Can anyone advice using as base the TikZ State Machine example:                   \documentclass{article}              \usepackage{pgf}         \usepackage{tikz}         \usetikzlibrary{arrows,automata}         \usepackage[latin1]{inputenc}         \begin{document}         \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,                             semithick]           \tikzstyle{every state}=[fill=red,draw=none,text=white]                \node[initial,state] (A)                    {$q_a$};           \node[state]         (B) [above right of=A] {$q_b$};           \node[state]         (D) [below right of=A] {$q_d$};           \node[state]         (C) [below right of=B] {$q_c$};           \node[state]         (E) [below of=D]       {$q_e$};                \path (A) edge              node {0,1,L} (B)                     edge              node {1,1,R} (C)                 (B) edge [loop above] node {1,1,L} (B)                     edge              node {0,1,L} (C)                 (C) edge              node {0,1,L} (D)                     edge [bend left]  node {1,0,R} (E)                 (D) edge [loop below] node {1,1,R} (D)                     edge              node {0,1,R} (A)                 (E) edge [bend left]  node {1,0,R} (A);         \end{tikzpicture}              \end{document}


title: Just curiosity about the 'LaTeX' name

text: It's common knowledge that the word 'TeX' was inspired by the Greek word 'τεχ' pronounced "tech". Just for satisfying my curiosity, anyone knows from where comes the letters 'La' in LaTeX?


title: tikz automata edges overlap

text: I have two states positioned horizontally and need to connect them i.e. A -> B and A <\- B, how can I position the edges in a way that they don't overlap and my diagram doesn't become a A <-> B but instead it is visible that one can navigate from one another and be able to place the input message above and below.                (APPEND_COL) edge[???] node[anchor=east,above,xshift=+3.0em]{delete column} (DELETE_COL)      (DELETE_COL) edge[???] node[anchor=east,above,xshift=+3.0em]{append column} (APPEND_COL)      I have tried setting ??? to above, below, bend left=20, bend right=20 but none of these produces the intended behavior ... UPDATE: ok here the full code, and another thing, how can I make the loops left and right not so huge?               \begin{tikzpicture}[->,>=stealth']           % State: FULL_QR      \node[initial above,state,anchor=north] (FULL_QR)      {\begin{tabular}{l}       Recompute QR \\      \end{tabular}};           % State: Append column update      \node[state,           % layout (defined above)       below left of=FULL_QR,% Position is to the right of FULL_QR       node distance=5.0cm,  % distance to FULL_QR       anchor=south] (APPEND_COL) % posistion relative to the center of the 'box'      {%      \begin{tabular}{l}     % content       Append column \\       \ \ QR update      \end{tabular}      };           % State: Delete column update      \node[state,            % layout (defined above)       below right of=FULL_QR,% Position is to the right of FULL_QR       node distance=5.0cm,   % distance to FULL_QR       anchor=south] (DELETE_COL) % posistion relative to the center of the 'box'      {%      \begin{tabular}{l}      % content       Delete column \\       \ \ QR update      \end{tabular}      };           % State: Append column update      \node[state,                % layout (defined above)       below right of=APPEND_COL, % Position is to the bottom of APPEND_COL       node distance=5.0cm,       % distance to APPEND_COL       anchor=south] (APPEND_ROW) % posistion relative to the center of the 'box'      {%      \begin{tabular}{l}          % content       Append row \\       \ \ QR update      \end{tabular}      };           % draw the paths and and print some Text below/above the graph      \path (FULL_QR) edge[bend right=20] node[anchor=west,above,xshift=-3.0em]{append column} (APPEND_COL)            (FULL_QR) edge[bend left=20] node[anchor=east,above,xshift=+3.0em]{delete      column} (DELETE_COL)            (APPEND_COL) edge[bend right=20]      node[anchor=west,below,xshift=-3.0em]{append row} (APPEND_ROW)            (DELETE_COL) edge[bend left=20]      node[anchor=east,below,xshift=+3.0em]{append row} (APPEND_ROW)            (APPEND_COL) edge[above]            node[anchor=west,above,xshift=+0.0em]{delete column} (DELETE_COL)            (DELETE_COL) edge[below]            node[anchor=east,below,xshift=+0.0em]{append column} (APPEND_COL)            (APPEND_COL) edge[loop left] node[anchor=west,above,yshift=+1.5em,xshift=+2.0em]{append column}            (APPEND_COL) (DELETE_COL) edge[loop right] node[anchor=east,above,yshift=+1.5em,xshift=-2.0em]{delete column}            (DELETE_COL);          \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/vqSzi.png)


title: TikZ - label on tree edge

text: I have a simple question about tikz tree, in which I want to have a edge label without that round box... I know that I have `every node=circle`, but I don't know how to change it for that specific element. Please help ;) My code:               \documentclass{article}      \usepackage{tikz}     \usetikzlibrary{trees}          \begin{document}     \begin{tikzpicture}[level distance=1.5cm,     level 1/.style={sibling distance=3.5cm},     level 2/.style={sibling distance=1cm}]     \tikzstyle{every node}=[circle,draw]          \node (Root) [red] {3}         child {         node {1}          child { node {4} edge from parent node[left] {help!} }         child { node {1} }         child { node {3} }     }     child {         node {2}         child { node {3} }         child { node {2} }         child { node {5} }     };          \end{tikzpicture}     \end{document}


title: emphasizing "et al."

text: I am using a `.bst` for the bibliography in my thesis; the `.bst` that I am using, I think, was Chicago style originally. I am also using the `natbib` package. Currently, when I use citation, "et al." appears normally in the text. What should I do to emphasize "et al."? I am assuming that it is related to the functions of the names in `.bst` file which are: `FUNCTION {format.names}` or `FUNCTION {format.names.ed}` or `FUNCTION {format.full.names}`, and therefore, I tried to put emphasize before "et al." or before "other" in these name's functions but none is working. I also went through the previous questions about the same issue here, nevertheless, I couldn't find an answer. Please help.


title: tikz and new environment

text: I would like to creat a new environment in order to draw the following matrix :               \begin{tikzpicture}[baseline,every right delimiter/.style={xshift=-8pt},every left delimiter/.style={xshift=8pt}]       \matrix [matrix of math nodes,left delimiter=(,right delimiter=)](m)       {      a  \\      b \\       };     \end{tikzpicture}      Thus I would like the environment be :               \begin{mymatrix}          a  \\          b \\     \end{mymatrix}      However, I do not succeed in making it. Do you know how to proceed ? Regards


title: Drawing primitive shapes with TikZ

text: I want to draw this picture ![enter image description here](http://i.stack.imgur.com/kb5mQ.png) as a noob, the way I usually do (for all other images) is to painstakingly draw line by line and manually adjusting their coordinates to get the shapes I want. I have drawn several images this way and it is a soul-destroying approach. I wonder if there is a better way to draw these types of images.


title: Making LaTeX documents with Hebrew? (in Sweave + RStudio)

text: I would like to write in Hebrew in an `.Rnw` file, and use it with RStudio. Searching around, I found an example for using Hebrew in LaTeX in general: Numbers, punctuation and parenthesis reversed in RTL... But when I try running the example from above in an RStudio session, I get a bunch of errors. e.g:               Sweave('aaa2.Rnw') Writing to file aaa2.tex     Processing code chunks with options ...          You can now run (pdf)latex on 'aaa2.tex'          Warning messages:     1: 'aaa2.Rnw' has unknown encoding: assuming Latin-1     2: invalid char string in output conversion          Running texi2dvi...     Error: running 'texi2dvi' on 'aaa2.tex' failed          LaTeX errors:     ! ! The fontspec package requires either XeTeX or LuaTeX to function. ! The fontspec package requires either XeTeX or LuaTeX to function. ! ! ! You must change your typesetting engine to, e.g., "xelatex" or "lualatex" ! You must change your typesetting engine to, e.g., "xelatex" or "lualatex" ! instead of plain "latex" or "pdflatex". ! instead of plain "latex" or "pdflatex". ! ! ! See the fontspec documentation for further information. ! See the fontspec documentation for further information. ! ! ! For immediate help type H ! For immediate help type H |''''''''''''''''''''''''''''''''''''''''''''''' | This is a fatal error: LaTeX will abort |...............................................          In addition: Warning message:     running command '"C:\PROGRA~2\MIKTEX~1.9\miktex\bin\texi2dvi.exe" --quiet --pdf "aaa2.tex" -I "d:/R/R-214~1.0/share/texmf/tex/latex" -I "d:/R/R-214~1.0/share/texmf/bibtex/bst"' had status 1      Any suggestions?


title: Where to place custom beamer themes

text: I've created a custom theme for beamer that I plan to use for multiple presentations. So while I currently have the .sty file (just one at this point, as I load an inner theme and color theme, then define the outer theme) in the same directory as the presentation I'm working on now, I want it available in the future without have to maintain multiple copies. From this question I understand I can install packages in my home texmf folder (e.g. ~/texmf on Linux, which is where I do most of my work), however should I then structure my texmf folder like the beamer subdirectory in the main texmf folder (i.e. /usr/share/texmf/tex/later/beamer/themes/[color,font,inner,outer,theme] on my Ubuntu machine), or just put put down any/all .sty files in the single directory. Note, while I mentioned I do most of my work on Linux, answers for OS X and Windows would be useful, as I do work on both of these platforms as well - and frequently sync files between machines via Git repositories.


title: Spacing between image and text in pgfplot legend

text: Using the following code:               \begin{tikzpicture}     \begin{axis}[     xmin=0, xmax=4, ymin=0, ymax=10,     width=9cm, height=6cm,     legend style={draw=none}]          \addplot[only marks,color=red] coordinates {     (0, 10) (0.5, 8.5) (1, 2) (2, 0.5) (3.5, 1.9)};     \addlegendentry{Experimental Data Point}          \end{axis}     \end{tikzpicture}      I am getting the image: ![enter image description here](http://i.stack.imgur.com/n9a4n.png) The symbol in the legend is a bit close to the legend text for my taste. Is there anyway to increase the spacing between the two?


title: How to print two reference lists using two bib files and biblatex

text: I have two different bib files (`Literaturverzeichnis.bib` and `EigeneVeroff.bib`). The first one is my "normal" reference list and the other one is a second reference list, which includes my own publications. Now my problem is that I want to have two different reference lists at the end of the document, the second one at a new page, both with their own heading and both listed and numbered in the TOC. The references of the second bib file are not cited in the document, so I want all entries to show up automatically (normally this is done by `\nocite{*}`). I work with `biblatex`. Now I tried (only an abstract - I think this is enough for understanding): In the preamble:               \addbibresource{Literaturverzeichnis.bib}     \addbibresource{EigeneVeroeff.bib}      Then:               \begin {document}     ...     \begin{refsection}[Literaturverzeichnis]        \printbibliography[heading=bibnumbered]                       \end{refsection}     \begin{refsection}[EigeneVeroeff]        \nocite{*}           \printbibliography[heading=bibnumbered]     \end{refsection}     ...     \end {document}      Any ideas about what to do? At this moment it only displays the heading (numbered as it should be) for the first reference list "Literaturverzeichnis" but with entries of the second reference list (EigeneVeroeff).


title: swap a label to inner corner

text: I have below code section, the label "B" is displayed at the outside of the corner, how can we swap it to the inner corner? or any other good suggestion to label it?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning,fit,calc}     \begin{document}          \begin{tikzpicture}[inner sep=0mm,outer sep=0,node distance=4em,       box/.style={draw,anchor=west,minimum width=10em,minimum height=3em},     ]       \node (A) [box] {A};       \node (B) [below=of A.west,box,label=south west:B] {};       \end{tikzpicture}     \end{document}      The output picture is: ![enter image description here](http://i.stack.imgur.com/XAyep.png)


title: How to use color by number?

text: I'm trying to use Bettini's QSource Highlight IDE to colorize my python code. Generated LaTeX output is something like:               \noindent     \mbox{}\textcolor{#121b28}{a}\textcolor{#0000de}{=}\textcolor{#0da344}{10}      But I'm getting error:               ! Illegal parameter number in definition of \iterate.     <to be read again>     1     l.72 }     You meant to type ## instead of #, right?     Or maybe a } was forgotten somewhere earlier, and things     are all screwed up? I'm going to assume that you meant ##.      Examples of `xcolor` and `color` package define colors by a different way. I'm looking for a way to be able to use a color by its hexadecimal RGB value ( generated code) in `xelatex` using `beamer`.


title: dramatist: indentation of characters for \DramPer

text: I'm currently trying to use the dramatist package for LaTeX and would like to have an additional grouping of characters without a parenthesis as is the case with the CharacterGroup environment. What I'm after is an indentation of characters that belong to one supergroup, or my case team:               Team A      Person 1      Person 2          Team B       Person 1       Person 2       Person 3 \       Person 4  | - Strikers (done with CharacterGroup)       Person 5 /      I added an environment that does indent a whole section but it does not work when I issue \DramPer because of the way \DramPer creates the list. I've looked at the code but I don't see a way to change it easily; my LaTeX programming skills are unfortunately not as good as I'd hoped. Is there a way to achieve what I'm after? A quick hack would be to define Characters named Team A and Team B and use a \hspace{1.0em} or so to indent but that's quite an ugly hack, as Team A is not really a character.


title: Latex Bibliography style and citation callout style

text: I'm currently busy writing my masters thesis with latex and I need a certain citation style. Therefore, I used an already existing default bibliography style provided by my university. However, the citation style isn't exactly what I need. Currently, authors get cited like this: (cf. Kek et al. (2009), p. xx). I need it to look like: (cf. Kek et al. 2009, p. xx). Where do I find the respective options in my bibliography style? I found the function:               FUNCTION {format.date}     { year "year" bibinfo.check duplicate$ empty$         {         }         'skip$       if$       extra.label *       before.all 'output.state :=       " (" swap$ * ") " *     }      Erasing the curved brackets doesn't change anything (well, maybe this is due to my editor). Any ideas? edit for MWE: Hey guys, thanks for your answers. here a minimal example (I m using natbib already):               \documentclass[a4paper,12pt,parskip,bibtotoc,liststotoc]{article}     \usepackage{natbib}                 \begin{document}               \pagenumbering{arabic} %rmische Seitennummerierung               \section{Introduction}               Lore ipsum dolum est blablalbalblabla  (cf. \cite{Kek}, p. 15)               \bibliographystyle{custom_build}  %legt die zu verwendende BIBTEX-Stildatei fest          \bibliography{lib}         \end{document}


title: Fill a table cell with empty lines

text: This is a follow-up question of Set table background hatched and shaded using tikz. I want to specify the height of the orange cell as "number of lines" like it is done for the \ShadeCell[5] command (5 means "fill 6 lines"). I want to replace "-- space for 6 lines --" by something which reserves space for 6 normal text lines. How can I do this?               \documentclass[10pt]{article}     \usepackage[margin=2cm]{geometry} % just for the example      \usepackage[table]{xcolor}      \usepackage{array}     \usepackage{tabularx}     \usepackage{tikz}     \usepackage{lipsum}     \usetikzlibrary{calc,shadings,patterns}          % Andrew Stacey's code from     % http://tex.stackexchange.com/a/50054/3954     \makeatletter     \tikzset{%       remember picture with id/.style={%         remember picture,         overlay,         save picture id=#1,       },       save picture id/.code={%         \edef\pgf@temp{#1}%         \immediate\write\pgfutil@auxout{%           \noexpand\savepointas{\pgf@temp}{\pgfpictureid}}%       },       if picture id/.code args={#1#2#3}{%         \@ifundefined{save@pt@#1}{%           \pgfkeysalso{#3}%         }{           \pgfkeysalso{#2}%         }       }     }          \def\savepointas#1#2{%       \expandafter\gdef\csname save@pt@#1\endcsname{#2}%     }          \def\tmk@labeldef#1,#2\@nil{%       \def\tmk@label{#1}%       \def\tmk@def{#2}%     }          \tikzdeclarecoordinatesystem{pic}{%       \pgfutil@in@,{#1}%       \ifpgfutil@in@%         \tmk@labeldef#1\@nil       \else         \tmk@labeldef#1,(0pt,0pt)\@nil       \fi       \@ifundefined{save@pt@\tmk@label}{%         \tikz@scan@one@point\pgfutil@firstofone\tmk@def       }{%       \pgfsys@getposition{\csname save@pt@\tmk@label\endcsname}\save@orig@pic%       \pgfsys@getposition{\pgfpictureid}\save@this@pic%       \pgf@process{\pgfpointorigin\save@this@pic}%       \pgf@xa=\pgf@x       \pgf@ya=\pgf@y       \pgf@process{\pgfpointorigin\save@orig@pic}%       \advance\pgf@x by -\pgf@xa       \advance\pgf@y by -\pgf@ya       }%     }     \newcommand\tikzmark[2][]{%     \tikz[remember picture with id=#2] {#1;}}     \makeatother     % end of Andrew's code               \newcommand\ShadeCell[4][0pt]{%     \begin{tikzpicture}[remember picture,overlay] %     \draw [fill=orange,orange]  ( $ (pic cs:#2) + (0pt,1.9ex) $ ) rectangle ( $ (pic cs:#3) + (-0.4pt,-#1*\baselineskip-.8ex) $ );      \end{tikzpicture}     }%               \newcommand\Text{Quisque ullamcorper placerat ipsum. Cras nibh. Lorem ipsum dolor sit amet}          \begin{document}          \ShadeCell[5]{start4}{end4}{top color=gray!40}          \noindent\begin{tabularx}{0.6\textwidth}{| X | X | X |}     \hline     \Text & \multicolumn{1}{!{\hspace*{-0.4pt}\vrule\tikzmark{start4}}X!{\vrule\tikzmark{end4}}}{-- space for 6 lines --} & \Text \\     \hline     \end{tabularx}          \end{document}


title: Challenging exercises in LaTeX

text: I'm in process of teaching certain skills related to research in graduate school to my juniors. One of them is using LaTeX for writing reports, articles, presentations etc. Students so far have been comfortable with editing existing `.tex` files. For building their confidence, I intend to give them certain challenging exercises, which involves commonly used packages. I would welcome any suggestion in this regard. Any of you , who already offer a "course" in latex, I'd welcome sharing your ideas on this. If you have written .`tex` code, which you found challenging, I'd appreciate if you share it with us.


title: Embed all the fonts during compiling with pdflatex?

text: My paper has the font `TimesNewRomanPS-BoldMT` not embedded in itself, and therefore fails the IEEE submission check. I am able to embed it with Acrobat by printing the PDF. However, I find it changes the colors of my paper a bit. **So I wish for a direct way to produce a PDF that already embeds all the fonts with pdflatex.** As this answer suggests, the `pdftexDownloadBase14` settings in the `updmap.cfg` file is indeed set to true. However, it is still not embedding it. How may I fix this? I am using Texmaker under Window, if that matters.


title: carriage return symbol, new command

text: When I define this:               \newcommand{\return}{\raisebox{1.2pt}{\setlength{\fboxsep}       {2pt}\ovalbox{$\hookleftarrow$} }}      In output compiler types:               Undefined control sequence.     <argument> \setlength {\fboxsep }{2pt}\ovalbox {$\hookleftarrow $}      My packages:               \documentclass[russian,utf8,simple,hpadding=5mm]{eskdtext}     \usepackage[T2A]{fontenc}     \usepackage{pscyr}     \usepackage{listings}     \usepackage{color}     \usepackage{caption}     \usepackage{amstext}     \usepackage{amsmath}


title: Save TikZ plot points calculated with PGF math library to .table file?

text: Is it possible to let TikZ save and in subsequent compilation runs use the plot points generated with the PGF math library? A (simple) example of such a function plotted that way is:               \begin{tikzpicture}       \draw plot (\x,{sin(2*pi*\x r)});     \end{tikzpicture}      Here, the PGF math library is used to calculate `sin(2*pi*\x r)`. For complex expressions, this is quite time-intensive. I assume this time could be saved if the plot points were available as is the case when using a gnuplot ‘`function`’ plot. Then (if the plot is given an `id`) the plot points generated by gnuplot are saved to a `.table` file, so that they need not be regenerated unless the plot parameters have changed.


title: New figures not being included in document

text: I have a list of images in an image folder with all in pdf format. However, I recently added a new image an now the LaTeX console does not recognise it and gives the file not found error.The format I used up till now and in the past has worked.               \floatplacement{figure}{H}     \begin{figure}[htc]     \centering     \includegraphics[width=0.6\textwidth]{folderName/imagename}     \caption{Research Design Constituents}     \label{fig:6}     \end{figure}


title: Justify text from right in two column springer document class

text: I am facing one problem in justifying text in springer document class. my code is as below                \documentclass[twocolumn]{svjour3}     %\documentclass[conference]{IEEEtran}     \usepackage{graphicx}          \usepackage[hidelinks]{hyperref}     %\hypersetup{colorlinks=true}          \usepackage{siunitx}          \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{pgfplots}     \usepackage{ragged2e}     \usepackage{natbib}     \bibliographystyle{humannat}          \begin{document}          \title{Surface roughness analysis for PECVD, PVD and IBD for SiO$_{2}$ by various techniques}     \author{Muhammad Rizwan Amirzada \and author 2 \and author 3}               \maketitle          \begin{abstract}     \justify     In this study, the comparison of surface roughness of SiO$_{2}$ thin layer which was           deposited by PECVD, PVD and IBD process on glass, Si and PEN substrates will be presented.     \end{document}      The output of this code is shown below ![enter image description here](http://i.stack.imgur.com/Yh2J3.jpg) you can clearly see that the 'h' in first row is totally misaligned from the other rows. This problem is in the whole document. Anyone can correct it ? Thanks


title: Configuring TeXworks with SumatraPDF

text: I have TeXworks for creating and viewing LaTeX documents, and that is working great. A while ago, I also downloaded SumatraPDF viewer because some people told me it was better than other ones. I am wondering (1) if there's any advantage to using SumatraPDF instead of the build-in viewer that came with TeXworks, and (2) how to do that, if it's a good plan. Please note that I'm a total computer newbie, I don't know what "DDE" commands are, and I couldn't understand most of what I read in related posts from this (and other) forums. Also I am not interested in spending money, and I will be using these programs primarily for creating mathematics articles. And I'm on a Windows computer. I have Adobe Reader too for viewing docs, but I was told SumatraPDF is faster.


title: Shortcut to writing out long, common, expressions?

text: I'm writing an astronomy paper and have some symbols and variables which are common throughout. It's becoming cumbersome to write them out each time. Is there a way to create a shortcut of sorts for these? Note, most are in math- mode. **For example:**   log(Hi)               $\log(\textrm{H}\textsc{i})$      log(SFR/M*)               $\log(\textrm{SFR} / \textrm{M}_{\odot})$


title: How can I split the log file depending on the input file?

text: I have a large document that I have split into several separate documents. I have one `main.tex` file and several `file_i.tex` files which are included into `main.tex` using the `\input`-command. It also happens that this including is nested, i.e. that one of `file_i.tex` files included another file. The log file `main.log` that is generated looks something like this:               blabla     (main.tex     blabla     blabla     (file_1.tex     blabla     )     (file_2.tex     blablabla     (file_2_1.tex)     )     blabla     )      I wonder if there exists some way/script that splits this file into e.g. `part_main.log`, `part_file_1.log`, `part_file_2.log` and `part_file_2_1.log`. It doesn't seem to difficult to write an ad-hoc script to do this, but it also seems such a common problem, that I would expect some well-tested scripts to already be available.


title: Spaces before biblatex-mla shorttitles

text: I'm using LuaLaTeX with the `biblatex-mla` style for `\autocites*` quotes in my text. But before shorttitles like "OED" the spaces are missing. How can they be inserted? Here is a minimal working example:               \documentclass{minimal}     \usepackage[       backend=biber,       style=mla     ]{biblatex}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}          @BOOK{Delbridge1992,       title = {The Macquarie Dictionary},       shorttitle = {MD},       publisher = {Macquarie Library},       year = {1992},       editor = {Arthur Delbridge}     }          @BOOK{Simpson1989,       title = {The Oxford English Dictionary},       shorttitle = {OED},       publisher = {Oxford UP},       year = {1989},       editor = {J. A. Simpson and E. S. C. Weiner},       address = {Oxford}     }          \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     Looks like: \autocites*[cf.][]{Delbridge1992}[]{Simpson1989} % [cf. ] or [cf.\ ] won't work either          But should look like: (cf.\,\emph{MD},\,\emph{OED})          \end{document}


title: Moving and resizing MindMap elements – TikZ – child nodes and canvas

text: Earlier I asked This question to help me adapt a mind map. Now, I need to move and resize some elements and I don't know how – can someone advise? ![My Mind map in progress](http://i.stack.imgur.com/gm6Y2.png) I need…   1. To move the Orange elements down and to the left;    2. To understand how to control placing of the child nodes   3. To be able to control the size of nodes and text   4. To make my title in the centre of a larger canvas. Source code:               % Author: Edd Turner     % Source: Die Wahrnehmung     \documentclass{article}     \usepackage[utf8x]{inputenc}          \usepackage{tikz}     \usetikzlibrary{mindmap,trees}          \begin{document}     \begin{tikzpicture}       \path[mindmap,concept color=black,text=white]         node[concept] {Die Wahrnehmung}         [clockwise from=0]         child[concept color=green!50!black] {           node[concept] {Sensorische Prozesse}           [clockwise from=90]           child { node[concept] {Sinnes\-organe} }           child { node[concept] {Schwellen}           child {node[concept] {absolute Schwelle}}             child {node[concept] {Unterschiedsschwelle}}             }             child { node[concept] {Optische Täuschungen aufgrund sensorischer Prozesse}                }           }            child[concept color=blue] {             node[concept] {Organisation}             [clockwise from=0]             child { node[concept] {Hauptsatz} }             child { node[concept] {Gestaltgesetze} }           }           child[concept color=red] { node[concept] {Klassifikation}            }           child[concept color=orange]{            node[concept] {Personenwahrnehmung}            [clockwise from=-90]              child { node[concept] {Theorie der Eindrucksbildung}           child {node[concept] {erste Info (erster) Eindruck}}           child {node[concept] {implizite Persönlichkeitstheorie}}           child {node[concept] {Stereotype/Vorurteile}}           child {node[concept] {selbsterfüllende Prophezeiung}}           child {node[concept] {Halo-Effekt}}           child {node[concept] {logischer Fehler}}           child {node[concept] {Kontrastfehler}}           child {node[concept] {Ähnlichkeitsfehler}}           child {node[concept] {Attribution}}           child {node[concept] {Person als Rollenträger}}           child {node[concept] {Interpretation von Verhalten}}           }             child { node[concept] {Personen\-wahrnehmung als Beobachtung} }             };           \end{tikzpicture}           \end{document}


title: Creating left-to-right sliding presentation

text: I found this presentation document by D. J. Bernstein. Is it possible to create it in `latex`? **Screenshot** ![](http://i.stack.imgur.com/mPxpb.jpg)


title: Why does babel not work in Tikz?

text: Adding child nodes to child nodes in TikZ Mindmap has some example code, where German words are not hyphenated correctly. I was trying to fix it by using `inputenc` (for Umlaute) and `\usepackage[ngerman]{babel}`. Unfortunately it has no effect on hyphenation. What must be changed? Below you can see a Working Example of it, showing forced hyphenation and no hyphenation: ![close up of compiled MWE](http://i.stack.imgur.com/zGAcv.png)               \documentclass{article}         \usepackage[ngerman]{babel}         \usepackage{tikz}         \usetikzlibrary{mindmap,trees}              \begin{document}         \begin{tikzpicture}         \path[mindmap,concept color=black,text=white]             node[concept] {Die Wahrnehmung}             [clockwise from=0]             child[concept color=green!50!black] {             node[concept] {Sensorische Prozesse}             [clockwise from=90]             child { node[concept] {Schwellen}      child {node[concept] {Unterschiedsschwelle}}     child {node[concept] {Unter\-schieds\-schwel\-le}}     }     }      child[concept] { node[concept] {Klassifikation} };     \end{tikzpicture}     \end{document}


title: Using ligatures as Unicode

text: I use TeX Live. See my example:               \documentclass{article}     \usepackage[utf8x]{inputenc}     \usepackage[english]{babel}     \begin{document}     Check ligatures: ﬁrst % here I have ligature for "fi"     \end{document}      I have Unicode symbol here: `ﬁ`. When I compile the above LaTeX file I get:               ! Package ucs Error: Unknown Unicode character 64257 = U+FB01 Then I apply the LaTeX system recommendation and compile the following file:               \documentclass{article}     \usepackage[utf8x]{inputenc}     \usepackage[english]{babel}     \DeclareUnicodeCharacter{FB01}{ﬁ}% Here I defined a Unicode ligature     \begin{document}     Check ligatures: ﬁrst     \end{document}      But when I compile this LaTeX file I get:               ! Missing number, treated as zero.     <to be read again>                        F     l.4 \DeclareUnicodeCharacter{FB01}{ﬁ} So my question is: How can I input ligatures in a LaTeX file using just the ligature's Unicode symbol?