title: Need to change citation from [1] ,[2] to [1.1][1.2] depending on the chapter

text: References in chapter 1 should appear as > [1.1] This A.B, That C.D, et al, 2010 > > [1.2] These A.B, That C.D, et al, 2012 References in chapter 2 should appear as > [2.1] They A.B, That C.D, et al, 2010 > > [2.2] Them A.B, That C.D, et al, 2012 **MWE**               \documentclass[12pt, a4paper]{book}     \usepackage[sectionbib]{chapterbib}     \usepackage[square, numbers, comma, sort&compress]{natbib}          \begin{document}          \input{./Chapters/Chapter1}     \input{./Chapters/Chapter2}           \end{document}      * * *               %-----------Chapter1.tex----------     \chapter{CHAPTER 1}     This is the text \citep{Reference1} from chapter 1. Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts\citep{Reference2}  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts          \bibliographystyle{ieeetr} %     \addcontentsline{toc}{chapter}{REFERENCES} %  adds "REFERENCES" to the table of content     \bibliography{Bibliography}        * * *               %-----------Chapter2.tex----------     \chapter{CHAPTER 2}     This is the text \citep{Reference3} from chapter 2 Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy\citep{Reference4} texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts  Dummy texts Dummy texts          \bibliographystyle{ieeetr} %     \addcontentsline{toc}{chapter}{REFERENCES} %  adds "REFERENCES" to the table of content     \bibliography{Bibliography}      * * * **%Expected Output** > **CHAPTER 1** > > This is the text[1.1] from chapter 1 Dummy texts Dummy texts Dummy texts > Dummy texts Dummy texts Dummy texts Dummy texts Dummy texts Dummy texts > Dummy texts Dummy texts Dummy texts Dummy texts Dummy texts Dummy[1.2] texts > Dummy texts Dummy texts Dummy texts Dummy texts Dummy texts > > **Reference** > > [1.1] This A.B, That C.D, et al, 2010 > > [1.2] These A.B, That C.D, et al, 2012 > > **CHAPTER 2** > > This is the text[2.1] from chapter 2 Dummy texts Dummy texts Dummy texts > Dummy texts Dummy texts Dummy texts Dummy texts Dummy texts Dummy texts > Dummy texts Dummy texts Dummy texts Dummy texts Dummy texts Dummy[2.2] texts > Dummy texts Dummy texts Dummy texts Dummy texts Dummy texts > > **Reference** > > [2.1] They A.B, That C.D, et al, 2010 > > [2.2] Them A.B, That C.D, et al, 2012


title: How to customize chapter heading style?

text: I have customized the default chapter style like below. The chapter number font is `Garamond` number font, whereas the main text is `Times` font. ![enter image description here](http://i.stack.imgur.com/j9WHW.png) The codes:               \documentclass[a4paper, 12pt]{book}     \usepackage[T1]{fontenc}     \usepackage{newtxtext, newtxmath}     \usepackage{color}     \definecolor{RoyalRed}{RGB}{157,16, 45}     \renewcommand{\sfdefault}{mdugm} %Garamond     \usepackage[ ]{titlesec}  %     \titleformat{\chapter}[display]       { \normalsize \huge  \color{black}}       {\flushright \normalsize \color{RoyalRed} \MakeUppercase { \chaptertitlename } \hspace{1 ex} { \fontsize{60}{60}\selectfont \color{RoyalRed} \sffamily  \thechapter }} {10 pt}{\huge}         \begin{document}          \chapter{Introduction}     ...     bla bla     ...     \chapter{State of the art}     ...     bla bla     ...     \end{document}      So how to set the chapter title `state of art` as bold font?


I have tried to compress pdf outputs produced by XeLaTeX. Is it necessary to use GhostScript to compress pdf outputs of XeLaTeX? YES. It is necessary. See Benchmark: xelatex v.s. latex-dvips-ps2pdf, there is a screenshot showing the file size there.


title: limiting effect of \huge{} to only specified text

text: I am creating a beamer presentation where I want a heading for a slide in larger font, followed by the body of the slide in smaller font. Problem being, my current approach appears to cause all of the text (even when not in the \huge{} brackets) to be larger font. My setup:               \documentclass[9pt,t]{beamer}          \usetheme{Berkeley}     \usepackage{thumbpdf}     \usepackage{wasysym}     \usepackage{ucs}     \usepackage[utf8]{inputenc}     \usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}     \usepackage{verbatim}     \usepackage[utf8]{inputenc}      \usepackage{listings}     \usepackage{color}     \usepackage{amsfonts}     \usepackage{amsmath,amssymb,epsfig,color}     \usepackage{psfrag,subfigure}     \usepackage{times}     %\usepackage{textcomp}     %\usepackage{eurosym}     \usepackage{amsthm,amsmath,amsfonts,mathbbol,mathrsfs,stmaryrd,textcomp}          \begin{document}          \begin{frame}[t]         \huge{I want this text to be large}              \bigskip     But this text is also appearing as large. Not what I want!          \end{frame}     \end{document}      So after \bigskip - I need the text to be the normal sized font specified in the \documentclass command. Also forgive me, I don't know how to compile my code within this post to show the result. Could anyone give me a tip on how to do that? Thanks


title: LaTeX3: problem with .generate_coices:n after l3kernel update

text: I'd like to report an issue I encountered with the `l3keys` sub-package of `l3kernel` (Hope it is ok to be done here). The test code at the end produces the error               ! Undefined control sequence.     <argument> \l_keys_choice_int      test code:               \documentclass{article}     \usepackage{expl3}          \ExplSyntaxOn     \keys_define:nn{user}{       colour .choice_code:n = {\l_keys_choice_tl},       colour .generate_choices:n = {black,white},       colour .default:n = {black},     }     \newcommand\cat[1][colour]{\keys_set:nn{user}{#1}}     \ExplSyntaxOff          \begin{document}     My cat is \cat. Your cat is \cat[colour=white].     \end{document}


title: Glossaries: Print acronyms with indentation

text: hey there, when I print the glossary of the package 'glossaries' like that: `\printglossary[type=\acronymtype] % acronyms` I get something without indentation:               A aaaskjdh     BADR alksjd blaa     FO text text      But I want something like that:               A    aaaskjdh     BADR alksjd blaa     FO   text text      I tried `style=long4col` and `style=long` but that prints out the acronysm non-bold and there's some sort of indentation in front of the acronym itself:                  A    aaaskjdh        BADR alksjd blaa        FO   text text      I really JUST want the plain style with indentation ONLY between the acronym and the description. ANy way to do it? Thanks!


title: What is the advantage of using widetext package instead of cuted package?

text: I was looking for an answer to this question which is, by the way, unanswered :( After searching this site, I read many questions similar to this one, and I found out that all of the answers suggested the use of `widetext` package. But after looking in the code of `widetext` package, I found that it basically uses the `strip` environment from `cuted` package. Am I missing something? Apart from those rules (which I don't understand/like) what is the advantage of using `widetext` package rather than `cuted` package? Here are two examples where the code looks similar (the `widetext` package just paints those rules, adds a `\par` and adds `\parindent \@parindent`, two indents?).               \documentclass[twocolumn]{scrartcl}          \usepackage{kantlipsum,widetext}          \begin{document}     \kant[1-2]     \begin{widetext}         \kant[4]     \end{widetext}     \kant[5]     \end{document}      And the other one               \documentclass[twocolumn]{scrartcl}          \usepackage{kantlipsum,cuted}          \begin{document}     \kant[1-2]     \begin{strip}         \kant[4]     \end{strip}     \kant[5]     \end{document}      Here you can download the package `widetext`.


title: Everyrow works with tabu but not with longtabu

text: I've been wrestling with `longtable`s/`longtabu` for a while now, and I have it almost working the way I want. The last thing that I want to be able to do is have a `\hline` inserted for every row. Here's what I'm trying:               \documentclass{article}     \usepackage{longtable}     \usepackage{tabu}          \begin{document}          \everyrow{\hline} % If I comment out this, or use anything but \hline it works     \begin{longtabu}{|X|X|X|}     First & First & First \\     \endfirsthead     Rest & Rest & Rest \\     \endhead     Foot & Foot & Foot \\     \endfoot     Last & Last & Last \\     \endlastfoot     hello & banana & world     \end{longtabu}          \end{document}      The error I'm getting is:               ! Misplaced \omit.     \multispan ->\omit                         \@multispan      l.18 \end{longtabu}      Any help would be great!


title: Glossaries: Print first occurence by using ACRONYM (DESC)

text: Is there a way to change the way how the acronyms in `glossaries` package are printed on the first occurence when defining them via `\newacronym{cd}{CD}{compact disk}`. Currently I'm using the following to achieve it:               \newglossaryentry{BLAS}{%       type=\acronymtype,        name={BLAS},        description={Basic Linear Algebra Subprograms},        first={\glstext*{BLAS} (\glsdesc*{BLAS})}%     }      which works, but is somehow to quite optimal yet since I need to particularly set the `first`-item. Any other ideas?


title: Automatically label groupplots (A), (B), (C),

text: Is there a way to automatically label a set of `groupplots` from the `pgfplots` package (A), (B), (C), ...?               \documentclass[margin=2pt]{standalone}          \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \pgfplotsset{compat=1.8}          \begin{document}     \begin{tikzpicture}[shorten >=4pt,shorten <=4pt]       \begin{groupplot}[group style={group size=2 by 2,vertical sep=15mm},         height=3.5cm,width=3.5cm,/tikz/font=\small]         \nextgroupplot[title=(A)]         \addplot coordinates {(0,1) (1,0)};         \nextgroupplot[title=(B)]         \addplot coordinates {(0,1) (1,0)};         \nextgroupplot[title=(C)]          \addplot coordinates {(0,1) (1,0)};         \nextgroupplot[title=(D)]          \addplot coordinates {(0,1) (1,0)};       \end{groupplot}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/e4i7W.png)


title: tikz label coordinates using mathematical expression from foreach variables

text: \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}              \foreach \x [count=\xi from 1] in {-3.0,-2.8,...,1.8}             \draw[thin] (0,0) ++(\x,2) rectangle ++(0.2, 0.2) coordinate [pos=.5] (one\xi);              \foreach \x [count=\ai from 1] in {1,0.8,...,0.2}             \foreach \y [count=\bi from 0] in {1,0.8,...,0.2}                 \draw[thin] (0,0) ++(-\x, -\y) rectangle ++(0.2, 0.2) coordinate [pos=.5] (two);                 %label should be \ai + (\bi * 5)         \foreach \x  in {1,...,25}                       \draw[->] (one\x) -- (two\x);     \end{tikzpicture}          \end{document}      In the above stated example is an error where the name range from `two1` to `two25` is unknown. How can i rewrite this line:               \draw[thin] (0,0) ++(-\x, -\y) rectangle ++(0.2, 0.2) coordinate [pos=.5] (two);      so that names are set from `two1` to `two25`. I would like to calculate the names based on               \ai + (\bi * 5)


title: Emulating book-class-sectioning using titlesec and modifiying it

text: **In short:**   * Prerequisite: Need to emulate book-class for `\part` and `\chapter` using `titlesec`   * Change both to hang, start on same page   * Add `titlerule` to `\chapter` * * * I want to optimize my rather hacked template. First, as it isn't possible to do the changes below using `titlesec` without defining the sectioning title/head as a whole, I need it to be exactly like predefined by the standard `book`-class. That needs to be the starting point. Then I want to use `titlesec` to make `\part` and `\chapter` "hanged" (like `\titleformat{\part}[hang]`) and on the same page with the following chaptertext: Not this:                     Part A               Parttitle          -------newpage--------     Chapter 1          Chaptertitle      but this:               A Parttitle          1 Chaptertitle      At last I need to replace the following newcommand               \newcommand{\addchapterunderline}{\vspace{-4ex}\hrule height 1.5pt \vspace{7ex}\thispagestyle{empty}}      for `\chapter` AND `\chapter*`, wich I utilized like this until now:               \chapter[Test]{Test}     \addchapterunderline      The final structure should look like this using `\titlerule[1.5pt]`:               A Parttitle          B Chaptertitle     ________________________          Lorem ipsum ...      In this example I already tried my best (<\-- still beginner). But I cannot prove whether this is `book`-class-like with only my changes above, as I could not find the heading-definitions in the `book.cls`:               \documentclass{book}                  \usepackage[ngerman]{babel}                          \usepackage[T1]{fontenc}             \usepackage{lmodern}             \usepackage[ansinew]{inputenc}                   \usepackage{tgheros}                                         \usepackage[expert]{mathdesign}                  \usepackage{amssymb}                                         \usepackage{ae,aecompl}                                  \usepackage{charter}                                      %\newcommand{\addchapterunderline}{\vspace{-4ex}\hrule height 1.5pt \vspace{7ex}\thispagestyle{empty}} %I don't want to use this          \usepackage{titlesec}          \titleclass{\part}{top}     \titleformat{\part}[hang]       {\usefont{T1}{qhv}{b}{n}\selectfont\huge} % global formatting (number and title)          {\thepart}          {20pt} %spacing between number and title         {\huge}     \titlespacing*{\part}        {0pt}% left        {1cm}% before        {1.2em}% after     \titleclass{\chapter}{straight}     \titleformat{\chapter}[hang]       {\usefont{T1}{qhv}{b}{n}\selectfont\huge} % global formatting (number and title)         {\thechapter}  % label: number and its formatting         {20pt} %spacing between number and title         {\huge}[\vspace{2ex}{\titlerule[1.5pt]}]     \titlespacing*{\chapter}        {0pt}% left        {1cm}% before        {6.2em}% after                    \begin{document}     \part{This is a Testpart}     \chapter{This is a Testchapter}     \chapter*{This is a unnumbered Testchapter}     \end{document}


title: Setting text in a tabular

text: I want to make a long table (over all the page), at the moment i am using `tabular` for it, because everything in it is text. How can i make a line with text in my `tabular` environment? It shall be for a recipe, between the ingredients there is sometime a text. Right now i have something like               \documentclass{scrartcl}     \begin{document}     \[     \begin{tabular}{rl}     60 & ab\\        & some text here \\        & even more text\\     40 & bc \\     \end{tabular}     \]     \end{document}       I would prefer a formatting like               \documentclass{scrartcl}     \usepackage{amsmath}     \begin{document}     \begin{align*}     60 &\ ab     \intertext{some text and even more text here}     40 &\ bc\\     \end{align*}     \end{document}


title: How do I get a table like this?

text: How do i get the table output like this? I tried following few threads in this forum. But couldn't help to ask this question. Help me out guys !! Thanks in advance :) ![Tabl 3.1](http://i.stack.imgur.com/9DpO7.png)


title: Meaning of font size

text: What is font size in LaTeX? More precisely, What does LaTeX mean for 12 point? How space does get a letter in output of LaTeX's file in 12 pt?               \documentclass[12pt]{article}


title: Addition doesn't work properly with some numbers in TikZ/PGF

text: I have a problem with very simple calculations in TikZ/PGF. After displaying many calculations properly i ecountered the problem, that pgfmathadd returns 5.40001, if i want to add 1.6 and 3.8, witch i thought is not a real problem. If i add 0.1 in one number and -0.1 to the other, the problem vanishs. I'm confused, no expert in PGF or TikZ and too concerned to use it again, if i can't be sure wether the calculations are precise enough or not. I also have no clue what's so special in 1.6 and 3.8. Here's a basic code, witch returns the following answers after compilation. a) 3,8 + 1,6 = 5.40001 b) 3,6 + 1,8 = 5.40001 c) 3,7 + 1,6 = 5.3 d) 3,7 + 1,5 = 5.4 e) 3,8 + 1,6 = 5.4 f) 3,8 + 1,6 = 5.40001 g) 3,8 + 1,6 = 5.40001 h) 3,8 + 1,6 = 5.40001               \documentclass[a4paper,11pt]{scrartcl}     \usepackage{amsmath} % Erweiterter Formelsatz - Hauptpaket!     \usepackage{pgfplots}     \usepackage{pgf,tikz}     \begin{document}     \begin{xalignat*}{4}      &a)\,\,3,8+1,6=\pgfmathadd{3.8}{1.6}\pgfmathprintnumber[fixed, precision=6]\pgfmathresult &        &b)\,\,3,6+1,8=\pgfmathadd{3.6}{1.8}\pgfmathprintnumber[fixed, precision=6]\pgfmathresult   &      &c)\,\, 3,7+1,6=\pgfmathadd{3.7}{1.6}\pgfmathprintnumber[fixed, precision=6]\pgfmathresult &       &d)\,\,3,7+1,5=\pgfmathadd{3.9}{1.5}\pgfmathprintnumber[fixed, precision=6]\pgfmathresult\\      &e)\,\,3,8+1,6=\pgfmathadd{3.8}{1.6}\pgfmathprintnumber[fixed, precision=4]\pgfmathresult &        &f)\,\,3,8+1,6=\pgfmathadd{3.8}{1.6}\pgfmathprintnumber[fixed, precision=5]\pgfmathresult &      &g)\,\,3,8+1,6=\pgfmathadd{3.8}{1.6}\pgfmathprintnumber[fixed, precision=6]\pgfmathresult &      &h)\,\,3,8+1,6=\pgfmathadd{3.8}{1.6}\pgfmathprintnumber[fixed, precision=7]\pgfmathresult      \end{xalignat*}     \end{document}      I hope someone could help me out, because it would make work much easier. I use it for big amounts of calculations, witch i don't want to do myself. Sorry for the crude english.


title: scrpage2 headers in classic thesis

text: I am trying to modify the headers in the classicthesis document class, which uses {scrpage2} of koma-script. What I want to have is no number in the sections header on the odd page. I have looked on the questions here and found some answer that I tried. However, the result is that there still appear numbers, albeit 0 for the section and the chapter number. (example: 0.0 in the introduction, and 1.0, 2.0 etc. for chapter 1, chapter 2). Also, I would like to make the unnumbered chapters such as "Introduction", "Conclusion", and "bibliography" in small caps as the regular chapters. MWE:                 \documentclass{scrbook}          \PassOptionsToPackage{automark}{scrpage2}     \RequirePackage{scrpage2}      \clearscrheadings     \setheadsepline{0pt}     \ifthenelse{\boolean{@nochapters}}         {\relax}         {\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}   {\spacedlowsmallcaps{#1}}}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\enspace\spacedlowsmallcaps{#1}}}      \lehead{\mbox{\llap{\small\thepage\kern2em}\headmark\hfil}}     \rohead{\mbox{\hfil{\headmark}\rlap{\small\kern2em\thepage}}}     \renewcommand{\headfont}{\small}          \DeclareRobustCommand{\fixBothHeadlines}[2]{}          \def\toc@heading{%             \ifthenelse{\boolean{@nochapters}}%             {\section*{\contentsname}}%nochapters             {\chapter*{\contentsname}}%chapters             \@mkboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}}              \usepackage[english]{babel}      \usepackage{blindtext}          \begin{document}     \blinddocument     \Blinddocument          \end{document}            I get these results: ![odd number, section, caps, but chapter number and zero](http://i.stack.imgur.com/L0m4u.jpg) ![even page, no chapter, not in caps](http://i.stack.imgur.com/NbvCw.jpg)


title: LaTeX class for creating markdown style output

text: I am a long time user of LaTeX. I have found, however, that using Markdown gives me a document which is "easier on the eyes". LaTeX often looks like textbooks. Does anyone know LaTeX classes (or something else) which replicate Markdown styles such as "Github", "Github v2", "Markdown Pro" and "Real". These titles come from the Markdown Pro application. More generally, learning ways to create documents which don't feel so "textbook"ish would be helpful to me.


title: Can you help me with the tables ? ( or How to get the tables right ? )

text: I am writing my bachelor thesis and I have a problem with my tables. They look ugly. Here an example what it looks like (click to enlarge): ![tables](http://i.stack.imgur.com/TeLLc.png) Here is a testcode:               \documentclass{article}     \usepackage{graphicx}     \usepackage{booktabs}     \begin{document}          \begin{table}     \caption{Überblick über die in dieser Arbeit verwendeten Medien mit der jeweiligen Verwendung und Referenz} % title of Table     \centering % used for centering table     \begin{tabular}{l l l} % centered columns (4 columns)     \hline\hline %inserts double horizontal lines     Medium & Verwendung & Referenz  \\ [0.5ex] % inserts table     %heading     \hline % inserts single horizontal line     SOC  & Kultivierung von \textit{E.coli} nach DNA-Transfer & (Danquah and Forde 2007) \\ % inserting body of the table     Tween 40/60/80 & fehlt & fehlt  \\     LB & Kultivierung/fehlt  & Invitrogen/fehlt \\      [1ex] % [1ex] adds vertical space     \hline %inserts single line     \end{tabular}     \label{table:nonlinret} % is used to refer this table in the text     \end{table}          \begin{table}     \caption{Überblick über die in dieser Arbeit verwendeten Kits mit ihrer jeweiligen Anwendung sowie Referenz} % title of Table     \centering % used for centering table     \begin{tabular}{l l l} % centered columns (4 columns)     \hline\hline %inserts double horizontal lines     Kit & Anwendung & Referenz  \\ [0.5ex] % inserts table     %heading     \hline % inserts single horizontal line     GeneJET Plasmid Miniprep Kit  & Plasmid-DNA-Aufreinigung & Fermentas \\ % inserting body of the table     5'/3' RACE Kit & Race-PCR & Roche Diagnostics  \\     RNeasy Mini Kit & RNA-Isolierung  & Qiagen  \\      [1ex] % [1ex] adds vertical space     \hline %inserts single line     \end{tabular}     \label{table:nonline} % is used to refer this table in the text     \end{table}               \begin{table}     \caption{Überblick über die in dieser Arbeit verwendeten Enzyme, ihre optimalen Puffer, ihre spezifische Anwendung und die jeweilige Referenz} % title of Table     \centering % used for centering table     \begin{tabular}{l l l l} % centered columns (4 columns)     \hline\hline %inserts double horizontal lines     Enzym & Puffer & Anwendung & Referenz \\ [0.5ex] % inserts table     %heading     \hline % inserts single horizontal line     Taq-Polymerase & 10x NH$_4$ Reaktionspuffer + 50 mM MgCl$_2$ & Polymerase-Kettenreaktion & Bioline \\ % inserting body of the table     Phusion& 10x NH$_4$ Reaktionspuffer/fehlt + 50 mM MgCl$_2$ & Polymerase-Kettenreaktion & Bioline/fehlt \\     DNA-Ligase & Ligationspuffer  & Verknüpfung von DNA-Strängen & Fermentas \\     DNase I & 10x Inkubationspuffer      RDD-Puffer & Hydrolyse von DNA & Roche Diagnostics     Qiagen \\     RNase & fehlt  & fehlt & fehlt \\      [1ex] % [1ex] adds vertical space     \hline %inserts single line     \end{tabular}     \label{table:nonlinwa} % is used to refer this table in the text     \end{table}     \end{document}      any tips?


title: why the hyperlink cannot jump to the right place

text: Today ,I use the package `hyperref` to create hyperlink .However ,some links can jump to the right place while some hyperlinks cannot jump to the destination . my mini code                 \documentclass[UTF8]{ctexrt}       \usepackage {hyperref}       \usepackage {graphicx}       \begin{document}       \section{welcome}       Hi,welcome to latex  \hyperref[fig1 ]{fig1 }       Hi,welcome to latex        \hyperref[fig2 ]{fig2}       Hi,welcome to latex      \includegraphics{fig2.eps}      \label{fig2}            \includegraphics{fig3.eps}      \label{fig3}       Hi,we       \includegraphics{fig1.eps}      \label{fig1}       come to latex       Hi,welcome to latex       Hi,welcome to latex       Hi,welcome to latex            \end{document }      so I wonder how to.solve .


title: How to handle TTF fonts with strange names with XeLaTeX?

text: I am trying to use this font http://www.dafont.com/ecran- monochrome.font?fpp=100, called "Écran Monochrome" in XeLaTeX. As you can see it has a strange name, both because the accent and the space. XeLaTeX seems to be confused by this and it doesn't compile this document:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Écran Monochrome}     \begin{document}     123     \end{document}      The question is **how do I specify this font in the document?** I tried many variants of this name, like removing the accent, the capitalization and the space (see below for current error messages.) Gives the error:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !      ! The font "Écran Monochrome" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................        The TTF is well installed and usable from other applications (like LibreOffice in Linux.)               $ fc-list | grep cran     /home/user/.local/share/fonts/ecran-monochrome---monochrome-display.ttf: écran monochrome / monochrome display:style=Regular


title: Spread letters to a given length?

text: I have made a fancy title page using `titleformat` and `tikz`, but I now face the following problem. The `\chaptertitlename` command returns `\chaptername` or `\appendixname`. I would like to spread the letters of the text returned by `\chaptertitlename` to a given length. For example I would like to be able to call: `\mycommand{\chaptertitlename}{3cm}` in order to space the letters of `\chaptertitlename` on a total length of `3cm`. How to do that ? EDIT: This example illustrates a nearly working thing:               \documentclass[11pt]{article}     \usepackage{fontspec}     \newcommand{\spreadletters}[2]{\makebox[#2][s]{#1}}          \begin{document}     \spreadletters{m y w o r d}{3cm}     \end{document}      How to convert `myword` to `m y w o r d` ? EDIT 2: Can someone explain me why the first work and not the second one (and how to make it work) ?               \documentclass[11pt]{book}     \usepackage{fontspec}     \usepackage{seqsplit}     \usepackage[explicit]{titlesec}          \newcommand{\spreadletters}[2]{\makebox[#2][s]{\seqsplit{#1}}}          \begin{document}     \chapter{First}     \spreadletters{myword}{10cm} \linebreak % This is working     \spreadletters{\chaptertitlename}{10cm} % This is not working     \end{document}


title: How to generate a .bib file with citations in a TeXmaker project?

text: I am relatively new to LaTeX, so please bear with me, just started using it for my thesis. I am using JabRef to manage my citations and TeXmaker as the editor. I really don't know the workflow people normally use to manage their citations, but the way I am doing it is: I have a `.bib` I manage with JabRef in which I have all the papers relevant to my thesis, however, I am not citing them all. **What I would like to know is if there is some kind of way (maybe a plugin), I can use to automatically export the citations I am using in my TeXmaker project in JabRef**. I used to be able to do this with EndNote. It would have a filter for which references I am using in the MS Word Document. Hope to have made it clear. P.S. Using TeXmaker is not a requirement for me. So, if the solution consists of using another editor, that won't be a problem.


title: What are these characters Ö and Þ supposed to be and how do I configure my internet browser to have them load properly?

text: tl;dr: My internet browser is not configured properly so characters are not loading properly. I am using the default Firefox 24.0 in Linux Mint 16, and have not installed any typesetting software. I am doing a math test and I am getting unusual characters. Ö and Þ are being displayed, but I think a √ and | should be displayed instead, respectively. What do I need to install to get these to load properly. I am currently doing an online math test. There are four tests that I need to do. If I exit the test, it will automatically submit whatever answers I have selected. The test I am doing right now is a very easy basic algebra test, about middle school level. All the questions on it are true or false questions. To illustrate how easy the test is supposed to be, the first question is asking if the following statement is true or false: a/(a/b) = a/b After this, I am getting unusual characters in the questions: |-7|=Ö49=7 Ö8-Ö29=Ö(-21) Ö8-Ö29=-Ö21 3x=6 Þ x=2 (x-2)(x+2) = 1 Þ x-2 = 1 or x+2 = 1 Based on how they are being used, I assume Ö should be a √, and that Þ should be a | Am I correct? I know very little typesetting software. What do I need to install to get these to display properly on future tests? The course's section on the university website does not specify what needs to be installed, but it recommend using Internet Explorer or else there's a chance that "fonts will not load properly".


title: Define \shearbox with \rotatebox and \scalebox

text: Similar to this problem, I want to define `\shearbox` with `\rotatebox` and `\scalebox` using singular value decomposition: ![singular value decomposition](http://i.stack.imgur.com/8nkwT.png) The latex code is as follows:               \documentclass[12pt]{article}     \usepackage[nomessages]{fp}     \usepackage{graphicx}     \newcommand\xshearbox[2]{%       \FPeval{\sheark}{(root(2,(#1)*(#1)+4)+#1)/2}\FPeval{\shearl}{1/\sheark}%       \FPeval{\sheara}{arctan(-\sheark)*180/pi}\FPeval{\shearb}{90+\sheara}%       \rotatebox{\shearb}{\scalebox{\sheark}[\shearl]{\rotatebox{\sheara}{#2}}}%     }     \begin{document}     pefgh\xshearbox{0.2}{pefgh}pefgh\xshearbox{0.4}{pefgh}pefgh\xshearbox{0.6}{pefgh}%     pefgh\xshearbox{0.8}{pefgh}pefgh\xshearbox{1}{pefgh}pefgh     \end{document}      ![enter image description here](http://i.stack.imgur.com/NrTwx.png) But there are still two problems here:   1. There are extra spaces between shearing text and normal text;   2. The baselines of shearing text is a little higher than normal text.


title: Draw parallels of a sphere with tikz

text: How to draw properly parallels of a sphere properly? The equator is ok:               \documentclass{article}         \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \fill[ball color=blue!20] (0,0) circle (1.5);     \draw [thick,dotted] plot [domain=0:pi] ({1.5*cos(\x r)},{0.2*sin(\x r)},0);     \draw [thick] plot [domain=pi:2*pi] ({1.5*cos(\x r)},{0.2*sin(\x r)},0);     \end{tikzpicture}     \end{document}      Yet the other parallels are tricky to put in place.


title: \[ Active string in WinEdt

text: I have an active string that when I type `\[` it enters               \[          *          \]          *      I obviously have problems when I want to type               \\[8pt]      I was wondering if there is a way that I can change the active string to take care of this problem.


title: Conditions for fancy chapter title

text: I use a `book` class and here is a part of my fancy title page for the `mainmatter` chapters.               \newlength\chapterwidth     \settowidth\chapterwidth{\huge\chaptertitlename}     \titleformat{\chapter}[display]     {\normalfont\filcenter}     {\tikz[remember picture,overlay]{     \node[fill=nicedarkblue,font=\sffamily\fontsize{96}{72}\bf\selectfont\color{white},anchor=north east, minimum width=3cm, minimum height=3.4cm]      at ([xshift=-1cm,yshift=-1cm]current page.north east)      (numb) {\thechapter};     \node[rotate=90,anchor=south,inner sep=4pt,font=\Huge\sffamily] at (numb.west) {Chapter};     }     }{20pt}{\scshape\Huge\color{nicedarkblue}#1}[\vskip10pt\Large***]      I do not master conditions in latex, but I would like to have four different styles:   * chapter in frontmatter   * chapter in mainmatter   * appendix in mainmatter   * chapter in backmatter How to branch on these conditions ?


title: Configuring Kile - Updating the TeX Distribution

text: I installed kile using the command in linux `sudo apt-get install kile`. It installed kile and the TeXLive distribution as well. The version which got installed , I found through the command `latex -v`. I got the following output:               pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)     kpathsea version 6.1.1     Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.2.49; using libpng 1.2.49     Compiled with zlib 1.2.8; using zlib 1.2.8     Compiled with poppler version 0.24.1      Now, in my tex files, I am not able to use ordinary packages e.g `lipsum`. If I include and run , it says `lipsum.sty not found`. I tried updating my TeX Distribution using `tlmgr update --all` but this is what I get : `(running on Debian, switching to user mode!) cannot setup TLPDB in /home/subham/texmf at /usr/bin/tlmgr line 5308. ` When I searched the TeX.StackExchange site, I found the problem with tlmgr not **initialized**. So I ran `tlmgr init-usertree`. But again the same error `cannot setup...`. What should I do to get a full fledged TeXLive. Yes I can run the setup of TeXLive script but it clashes with the distribution installed by kile and I am not able to run them. In either cases the results are the same (Installing texlive and then kile or vice versa).


title: Is it possible to automatically get a Bold \subref

text: I am using the `subcaption` package to render my images. In the caption I refer to the subfigure using `\subref`. Due to requirements I am required to refer to the subfigures by a boldface letter in parentheses i.e. **(a)**. I currently use               \textbf{\subref{fig:figurelabel}}.       I managed to add the parentheses by adding the option `subrefformat=parens` to my preamble:               \usepackage[position=t,singlelinecheck=off]{subcaption}     \captionsetup{subrefformat=parens}      Is there I could add that also makes this boldfaced? Kind regards, Adriaan


title: Roman marker numbering with Endfloat

text: How come this doesn't change the marker numbering to roman from arabic in Endfloat?               \documentclass[a4paper,12pt,twoside]{book}     \usepackage{graphicx}     \usepackage[nolists]{endfloat}               \renewcommand{\theposttbl}{\Roman{theposttbl}}     \renewcommand{\thepostfig}{\Roman{postfig}}          \begin{document}     \chapter{This is Chapter 1}     Some text in chapter 1.  See my figure \ref{fig:MyFigure}.          \begin{figure}                     \centering                     \includegraphics{histoOne1}                     \caption{My caption for this figure}                     \label{fig:MyFigure}     \end{figure}          \let\cleardoublepage\clearpage     \chapter{This is Chapter 2}     Some text in chapter 2.           \end{document}


title: How to have half circle arrow?

text: The following MWE:               \documentclass{article}          \usepackage{pgfplots}     \usepackage{filecontents}          \pgfplotsset{compat=1.8}          \begin{filecontents}{depensezero.dat}     2010,14.0,67.0,19.0     2011,33.0,39.0,28.0     2012,64.0,12.0,24.0     \end{filecontents}          \begin{document}          \begin{tikzpicture}       \begin{axis}[xmin=0,xbar stacked, ytick=data, symbolic y coords = {2012, 2011, 2010}]         \addplot[fill=blue] table [y index=0, x index=1, meta index=1, col sep = comma] {depensezero.dat};         \addplot[fill=orange] table [y index=0, x index=2, meta index=2, col sep = comma] {depensezero.dat};         \addplot[fill=yellow] table [y index=0, x index=3, meta index=3, col sep = comma] {depensezero.dat};         \node at (axis cs:0,2010) (src) {};         \node at (axis cs:0,2011) (dest) {};       \end{axis}       \draw[->, >=latex, draw=red, red, thick, bend right=90] (src.west) to node[left, text=red] {+12\%} (dest.west);     \end{tikzpicture}          \end{document}      generates an arrow between two y ticks of the graph. i want to modify this arrow to have it representing a full half circle I.e the arrow should go a little bit more far to the west.


title: Page starts in the middle of the header

text: The text on any of my pages starts right where the header is. So in the following document the section, which is the first text of the paper, will be right where the header is. Has anyone experienced this issue, or can explain why it happens? My document looks like this:               \documentclass[11pt]{article}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{psfrag}     \usepackage{fullpage}     \usepackage{color, colortbl}      \usepackage[table]{xcolor}     \usepackage[latin1]{inputenc}      \usepackage{subfig}     \usepackage{float}      \usepackage{subfloat}     \usepackage{amsmath}      \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{cleveref}     \usepackage{pdfpages}     \usepackage{fancyhdr}     \usepackage{listings}     \usepackage{LastPage}     \lstset{language=Matlab}     \usepackage[numbers]{natbib}     \usepackage{url}          \pagestyle{fancy}     \lhead{XX\\     XX     }     \rhead{XX\\     \today}          \begin{document}     %\hspace{1cm}     \section*{Bla bla bla}     \end{document}


title: wrapping inside preview pane of TeXstudio

text: I'd like text in the _inline_ preview pane to wrap according to its width. Currently the preview pane assumes the width of the document class and I have to use the horizontal scrollbar to see all of the preview.


title: Pagenumbering with romanbar compatible to hyperref

text: Is there a good way to use the package romanbar also for page numbering, with compatibility to hyperref? The following example works without hyperref but not with it.               \documentclass[12pt,a4paper,ngerman]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{babel}     \usepackage{romanbar,hyperref}          \begin{document}     \makeatletter     \renewcommand*{\thepage}{\Roman@bar{\Roman{page}}}%     \makeatother     \jobname          \end{document}      It would even better to activate this with \pagenumbering{Roman}. This is just an example. I know that changing \thepage in that way is probably not a good idea.


title: Beamer: displaying all labels in description environment, then descriptions sequentially

text: In beamer, I'd like to display all the labels in a description environment at once, then fill in the descriptions sequentially. I want the labels to be positioned correctly on the first slide, with enough room for the descriptions, so that the labels don't jump around as the descriptions are displayed. The code               \documentclass{beamer}     \begin{document}     \begin{frame}     \begin{description}       \item<1->[Label1] Description1       \item<2->[Label2] Description2     \end{description}     \end{frame}     \end{document}      displays Label1 and Description1 on the first slide and Label2 and Description2 on the second slide, which is not what I want. I want Label1, Description1, and Label2 on the first slide, and, in addition, Description2 on the second slide. I tried               \documentclass{beamer}     \begin{document}     \begin{frame}     \def\reveal<#1>#2{\alt<#1>{#2}{\phantom{#2}}}     \begin{description}       \item[Label1] \reveal<1->{Description1}       \item[Label2] \reveal<2->{Description2}     \end{description}     \end{frame}     \end{document}      but that puts extra _vertical_ space between the items. (Is that a bug in beamer, or do I misunderstand `\phantom`?) My current solution is               \documentclass{beamer}     \begin{document}     \begin{frame}     \def\reveal<#1>#2{\alt<#1>{#2}{\color{white}{#2}}}     \begin{description}       \item[Label1] \reveal<1->{Description1}       \item[Label2] \reveal<2->{Description2}     \end{description}     \end{frame}     \end{document}      although that works for me only because the background color of my slides is white and does not work if #2 contains a paragraph break. Is there a better solution?


title: XeLaTeX, fontspec, Arial (TTF), umlauts?

text: How do I get german umlauts in a PDF using Arial TT-Font and XeLaTeX or luaLaTeX? The following example produces a box instead of "ü":               \documentclass[12pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{fontspec}     \setmainfont{Arial}          \begin{document}     \section{Einführung}     Text.     \end{document}


title: Problems with compiling a lyx document (error is related to limits of sum)

text: I am having problems compiling a lyx document I created, the problem seem to be with the limits on the summation I made, can someone please tell me how can I fix this problem ? The problems are in two areas:               The LHS: $(A(t)B(t))_{i,j}=\sum\limits _{k=1}^{n}a_{ik}(t)b_{kj}(t)$,     since each element in the matrices is in $C^{1}(\mathbb{R})$ it holds     that: $\forall k\in[n]:\,(a_{ik}(t)b_{kj}(t))'=a'_{ik}(t)b_{kj}(t)+a_{ik}(t)b'_{kj}(t)$     hence $(A(t)B(t))'_{i,j}=\sum(\limits _{k=1}^{n}a_{ik}(t)b_{kj}(t))'=\sum\limits _{k=1}^{n}(a'_{ik}(t)b_{kj}(t)+a_{ik}(t)b'_{kj}(t))$.      and:               The RHS: $(A'(t)B(t))_{ij}=\sum\limits _{k=1}^{n}a'_{ik}(t)b_{kj}(t),\,(A(t)B'(t))_{ij}=\sum\limits _{k=1}^{n}a{}_{ik}(t)b'_{kj}(t)$     hence $(A'(t)B(t)+A(t)B'(t))_{ij}=(A'(t)B(t))_{ij}+(A(t)B'(t))_{ij}=\sum\limits _{k=1}^{n}a'_{ik}(t)b_{kj}(t)+\sum\limits _{k=1}^{n}a{}_{ik}(t)b'_{kj}(t)=\sum(\limits _{k=1}^{n}a{}_{ik}'(t)b{}_{kj}(t)+a{}_{ik}(t)b'{}_{kj}(t))$.


title: Problem using macros to define tree substructures

text: Relatively simple problem: I want to use macros to define substructures of a tree. In the following example for illustration, I want to define some children (left and right) to be used several times in a tree.               \documentclass{article}     \usepackage{tikz}          \begin{document}       \begin{tikzpicture}             \newcommand{\leftchildren}{%          child{node[circle,draw] {l}} child{node[circle,draw] {l}} %        }%             \newcommand{\rightchildren}{%          child{node[circle,draw] {r}} child{node[circle,draw] {r}} %        }%            \node[circle,draw] (root) {}  \leftchildren \rightchildren;      \end{tikzpicture}     \end{document}      The problem is   * Without the label `(root)` it does not even compile (Why?)   * The macros are not expanded on the same level: the right children become children of the left children   * Using more macros, or nesting them, makes it worse.  This is a very simplified version of what I want to do. Often I want to be able to add other children by hand (without using macro). I also would like to be able to define entire subtrees as macros, for example a long chain, as a macro. I think there is a problem with the expansion of the macros, but I was not able to figure it out myself. Help please. Cheers, Oliver


title: Formatting of heading 'Glossary" to match chapter and index heading

text: Earlier I asked a question to match the heading of `List of Acronyms and Symbols` to that of `List of table` (instead of chapter heading). That was solved by Nicola via Formatting of heading List of Acronyms and list of tables glossaries package link. However, now it is kind of reverse problem that my `Glossary` heading has the same style as `List of Symbols` etc but I want it to be same as my chapter and index heading (smaller and centered) as it comes at the end. I am attaching a `MWE` which also reflects the code sent by Nicola to solve my earlier problem. I hope it is humanly possible to do that :)               \documentclass[12pt]{report}     %%%%%%%%%%%%%% For page header/footer       \usepackage{fancyhdr}     \pagestyle{fancyplain}      \fancyhf{}     \setlength{\headheight}{15pt}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}     \lhead{\bfseries{\rightmark}}     \rhead{\bfseries{\thepage}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{makeidx}     \usepackage{sectsty}     \allsectionsfont{\bfseries}     \chapterfont{\centering\Large}      \sectionfont{\normalsize}     \subsectionfont{\normalsize}     \usepackage[subfigure]{tocloft}     \usepackage{tocloft}     \renewcommand{\cftchappresnum}{Chapter }     \renewcommand{\cftchapaftersnum}{:}     \renewcommand{\cftchapnumwidth}{7em}     \newcommand*\updatechaptername{%     \addtocontents{toc}{\protect\renewcommand*\protect\cftchappresnum{Appendix }}     }     \makeindex     \usepackage[nogroupskip,nonumberlist,acronym]{glossaries}      \newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols}     \makeglossaries       % Code provided by Nicola Talbot to make heading of  List of Acronyms and     % List of Symbols same as heading of List of Tables.      \renewcommand{\glossarysection}[2][\theglstoctitle]{%       \def\theglstoctitle{#2}%       \vspace{\cftbeforelottitleskip}%       \par\noindent       {\cftlottitlefont #2}{\cftafterlottitle}%       \vskip\cftafterlottitleskip     }     % % % % % % % % % % % % Glossary Entries  % % % % % % % % % % % %      \newacronym{sa}{SA}{sample acronym}     \newglossaryentry{Pi}{     name=$\pi$,     description={A mathematical constant whose value is the ratio of any circle's circumference to its diameter.},     sort=symbpi, type=symbolslist     }     \newglossaryentry{glos:ia}{     name=Integer Ambiguity,     description={The unknown number of whole carrier phase cycles between the user and the satellite at the start of tracking (Sometimes ambiguity for short).}      }     % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %     \usepackage{subfigure}     \begin{document}     \tableofcontents     \clearpage     \listoftables     \clearpage     \printglossary[type=\acronymtype,style=long,title=List of Acronyms \& Initialisms]     \clearpage     \printglossary[type=symbolslist,style=long] %Print list of symbols     \include{Sample}     \chapter{Sample}     This is my \gls{sa} and I can use it again. This is a symbol \gls{Pi}. This document\index{document} also has an index\index{index}.     \begin{table}      \caption{Sample Table}     \end{table}     \updatechaptername     \clearpage     \glsaddall     \printglossary[] % Print list of symbols     \clearpage     \printindex     \end{document}


title: Define a color in a tikz style

text: How do I do a `definecolor` in a `/.style`?               \pgfkeys{/IMMstyle/.style={              inputnode/.style={shape=ellipse,draw,inner sep=2pt,minimum size=5.0mm},              \definecolor{dpred}{rgb}{0.50,0.35,0}             }}      doesn't work.


title: break a line of function in algorithm2e

text: I tried various ways to break a line of function but did not succeed. ![enter image description here](http://i.stack.imgur.com/26cIs.png) As you can see from the image, I was trying to break the line at the position of a function parameter. Can anybody please take a look?               \begin{algorithm}[t]     \DontPrintSemicolon % Some LaTeX compilers require you to use \dontprintsemicolon instead          \SetKwFunction{proc}{XXXXXXXXX}       \SetKwProg{myproc}{XXXX}{}{}     \SetKwData{Kn}{XXXXXX}     \SetKwData{Dep}{XXX}     \SetKwData{Mt}{XXXXXXX}     \SetKwData{OMt}{XXXX}     \SetKwData{Con}{XXXXXXXX}     \SetKwData{OCon}{XXXXXXXXXXXXX}          \myproc{\proc{int \Dep,  Knowledge \Kn}}{          \Begin{              \If{\Dep $< 3$} {                     \Mt $\gets \mathit{XXXXXXXXXXXXXXX}(\Kn)$\;                      \ForEach{\OMt in \Mt}{                         \Con $\gets \mathit{XXXXXXXXX}(\OMt)$                          \ForEach{\OCon in \Con}{                             \Kn.$\mathit{XXXXXXXXXXX}(\OCon)$\;                         \If{\Kn.$\mathit{XXXXX}()$} {                                 \Return{\Kn.$\mathit{XXXXXX}()$}                              }                         \Else{                                  \Return{XXXXXXXXX{$\Dep+1$, \Kn}}                          }                                                   }                      }                   }               }     }      Thanks a lot!!!!


title: Transliteration in Devanagari

text: This is a follow up of my previous question. To get sanskrit in devanagari I type               {\dn brahma.nyaadaaya karmaa.ni sa.nga.m tyaktvaa karoti ya.h | \\\ lipyate na sa     paapena padmapatramivaambhasa}      To be precise what command should I use to get the below translation of the above. > brahmaṇy ādhāya karmāṇi sańgaḿ tyaktvā karoti yaḥ lipyate na sa pāpena > padma-patram ivāmbhasā `\dnnum` command does nothing but exactly copies what ever I have written in English.


title: Blurred Chapter Title

text: How can I create a blurred Chapter title such as this? ![enter image description here](http://i.stack.imgur.com/4Xs0H.png)


title: How to easily determine the full name of the latex file when a build error occurs?

text: I have recursive makefiles that I run to build my large tree which has many 100's of latex files (I use latex for everything). These makefiles travel the tree and build pdf's and generate HTML files using htlatex. The problem I have is when there is an error, it is always very hard for me to find which file actually caused this error. For some reason, Latex does not show the file name, only the error and the line number. This is something I always found very strange. How hard is it to give the file name as well? For example, here is an error I have now:               (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd)     (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd)     ! Missing \endcsname inserted.     <to be read again>                         \protect      l.88 \end{tabularx}      So now I try to find the file name by scrolling up the terminal. But there is so much output generated, many times it takes me long minutes searching up and down the buffer just to find the latex command in order to find which file was being compiled when the error occurred. Is there an option to either just tell latex/pdflatex to only show the actual command used and not all other logging it does to make it easy to see the command, or better, is there a way to tell it to show the file name in addition to the line number? using texliver 2012 debian based.


title: kpfonts, siunitx and math alphabets

text: This is a follow up question to this rather vague one. The problem is trying to work out where my 16 math alphabets are going. In using `egreg`'s answer to the previous question I have diagnosed something. So check out this madness:               \documentclass{article}     \usepackage{kpfonts}          \newcommand{\PrintMathFonts}[1]{%       \count255=0       \loop\ifnum\count255<16         \typeout{#1 (\the\count255: \fontname\textfont\count255)}         \advance\count255 by 1      \repeat}     \usepackage{siunitx}          \begin{document}     \PrintMathFonts{Initial}     \SI{10}{\celsius}     $X$     \PrintMathFonts{Final}     X     \end{document}      This prints out what math alphabets have been allocated at various points. Here's the relevant part of the log file:               Initial (0: jkpmn7t)     Initial (1: jkpmi)     Initial (2: jkpsy)     Initial (3: jkpex)     Initial (4: jkpmia)     Initial (5: jkpsya)     Initial (6: jkpsyb)     Initial (7: jkpsyc)     Initial (8: jkpexa)     Initial (9: jkpssmn7t)     Initial (10: jkpttmn7t)     Initial (11: nullfont)     Initial (12: nullfont)     Initial (13: nullfont)     Initial (14: nullfont)     Initial (15: nullfont)     Final (0: jkpmn7t)     Final (1: jkpmi)     Final (2: jkpsy)     Final (3: jkpex)     Final (4: jkpmia)     Final (5: jkpsya)     Final (6: jkpsyb)     Final (7: jkpsyc)     Final (8: jkpexa)     Final (9: jkpssmn7t)     Final (10: jkpttmn7t)     Final (11: jkpmn7t)     Final (12: nullfont)     Final (13: nullfont)     Final (14: nullfont)     Final (15: nullfont)      So, before I have typed _anything at all_ TWELVE of my sixteen fonts are already used. `siunitx` appears to cause the math alphabets to be used before anything is written. OK. That's fine, I'll leave that aside for now. What's doubly weird is that once I've used `\SI` to typeset so units, another alphabet is used up (position 11). What's odd about this is that it's the same font as position 0. Why is this? Isn't this a waste? Can I don something about it? Using standard computer modern means only 6 alphabets are used up at `Initial` and that's the same as at `Final`. Using `fouriernc` seems to cause the same problem (duplicate font) as with `kpfonts`. However, fewer fonts are used up.


title: How to make a bib entry appear also in the main document

text: I have a reference which has a bib entry and appears in the bibliography. I want to be able to include the entire entry, exactly as it appears in the bibliography, somewhere else in the document. Is there any way to do that other than to manually write it and format it to look similar?


title: Why does >{\centering} in my column spec produce an error?

text: I want to create a column in a tabular with column specifier 'p' and centred text. I have tried to achieve this using the example below.               \documentclass{article}          \usepackage{array}          \begin{document}          \begin{table}       \begin{tabular}{c l >{\centering}p{2cm}}         a & b & c \\         a & b & c        \end{tabular}     \end{table}          \end{document}      Why does this create the following error, and what is the correct way to do this?               ! Extra alignment tab has been changed to \cr.     <recently read> \endtemplate           l.10     a &                  b & c     You have given more \span or & marks than there were     in the preamble to the \halign or \valign now in progress.     So I'll assume that you meant to type \cr instead.      I'm using Miktex 2.9


title: Detokenizing without extra spaces?

text: I have a need to pass through potentially arbitrary characters untouched and found this macro:               \def\test#1{\expandafter\zap@space\detokenize{#1} \@empty}      The problem is that `\detokenize` inserts spaces after commands in the expansion so I get rid of these with LaTeX's `\zap@space`. Unfortunately, I need to keep any spaces which `\detokenize` did not produce. I suspect that there is some cunning way to do this by redefining the catcode of the space character but it is somewhat beyond me. For example (yes, it's regular expressions I need to pass through ...),               \test{\A\d{2,}.+\z}      Should expand to `\A\d{2,}.+\z` but               \test{A test}      should expand to `A test` and not lose the space that was there originally. I should say, that `\verb` doesn't work as these regexp strings are the value of a keyval pair:               \macro[key=\test{#1}]      **Update** It seems too hard to do this in general without making other things rather messy so I've settled for requiring that any regexps used are canonicalised to use no literal spaces in them. It's always possible to replace them with '\x20' for example in anyway so this means that `\zap@space` will only be zapping spaces created by `\detokenize`, which is fine. Many thanks for all of the answers though as they are very instructive.


title: TikZ line thickness seems to inappropriately affect label position

text: The following code produces two parallel vertical lines of the same length, but of different thicknesses, with labels at the top.               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw (0pt,0pt)         to +(0pt,10pt) node [above] {x};     \draw [ultra thick, red] (2pt,0pt)         to +(0pt,10pt) node [above] {x};     \end{tikzpicture}     \end{document}      Here's the output: ![labels in the wrong place](http://i.stack.imgur.com/RaQzN.jpg) The problem is that the labels at the top are put in different heights, even though the lines are exactly the same length. A trivial fix would be to adjust the label placement carefully for each line. But I have lots of labels at the top of vertical lines like this, and several of my lines have different thicknesses -- I really want to correct placement to be automatic.


title: In Tikz, how can I specify where an edge connects to a child node?

text: I have a `Tikz` graph that looks something like this:               \usepackage{tikz}     \usetikzlibrary{shapes,positioning,shadows,arrows}          ...          \begin{tikzpicture}[         singleNode/.style={rectangle, draw=none, rounded corners=1mm, fill=green, drop shadow,             text centered, anchor=north},         subtree2/.style={regular polygon, regular polygon sides=3, draw=none, fill=blue,             drop shadow, text centered, anchor=north, minimum height=6em},         subtree3/.style={regular polygon, regular polygon sides=3, draw=none, fill=blue,             drop shadow, text centered, anchor=north, minimum height=9em},         level distance=1em, growth parent anchor=south     ]         \node (k3) [singleNode] {$k_3$} [sibling distance=20em]         child{ [sibling distance=14em]             node (k1) [singleNode] {$k_1$}             child{                 node (A) [subtree3] {$A$}             }             child{ [sibling distance=8em]                 node (k2) [singleNode] {$k_2$}                 child{                     node (B) [subtree3, fill=red] {$B$}                 }                 child{                     node (C) [subtree2] {$C$}                 }             }         }         child{             node (D) [subtree3] {$D$}         }     ;     \end{tikzpicture}      `subtree2` and `subtree3` represent subtrees of height 2 and 3, respectively. This graph looks almost as I intend it, but the edge from a parent to a subtree connects at the **side** of the triangle, rather than the **top**. How can I specify that the edge should connect to the **top** of my triangles?


title: BibTeX : skip$ vs. 'skip$

text: Looking through few bst files (BibTeX styles) I noted that `skip$` built-in function is sometimes referred to as `'skip$` (i.e. by name) and sometimes as `skip$` (i.e. by value). I think I understand the construct such as               "string value" 'foo :=      which means that the function `foo` gets the value "string value" but I don't understand what is the difference between `'skip$` and `skip$`? Can one explain that issue. And how `'pop$` does differ from `pop$`? For example `plainnat.bst` from natbib package has the following chunck of code:               FUNCTION {output}     { duplicate$ empty$         'pop$         'output.nonnull       if$     }          FUNCTION {output.check}     { 't :=       duplicate$ empty$         { pop$ "empty " t * " in " * cite$ * warning$ }         'output.nonnull       if$     }      Second pair of examples is borrowed from aipauth4-1.bst (revtex package):               FUNCTION {date.block}     {       new.block.comma       skip$     }      but               FUNCTION {field.or.null}     { duplicate$ empty$         { pop$ "" }         'skip$       if$     }


title: SCfigure fly around

text: I've used the `SCfigure` to make a side caption. The caption/comment works very good, but the picture are located to the place where it is not spouse to. Like the picture here. I would like to dock the picture below the sub title (4.4.3.....) ![enter image description here](http://i.stack.imgur.com/mNbFu.jpg) here is the code               \subsubsection*{4.4.3 Variance-covariance propagation: some examples}     \begin{SCfigure}[\sidecaptionrelwidth][!htb]     \centering     \includegraphics[scale=0.65]{E:/CloudStore/Dropbox/3SM/AdjOne/PicSet/4_43a.jpg}     \caption{\minibox{Angles $\alpha$ $\&$ $\beta$ have been measured with \\ standard deviation of $s_\alpha=s_\beta=1$ mgon \\     \\ Compute the Standard Deviation $S_\gamma$}}     \end{SCfigure}      Cheers SL


title: Table with multiple columns error

text: I've been working on the following table:                \vspace{1mm}      \begin{table}[hb]         \begin{tabular}{cc|c|c|c|c|l}         \cline{1-6}         & & \multicolumn{2}{ |c| }{\bf Annotator B} \\ \cline{3-4}         & & Yes & No \\ \cline{1-5}         \multicolumn{1}{ |c| }{\multirow{2}{*}{\bf Annotator A} } &          \multicolumn{1}{ |c| }{Yes} & $P_{1.} . P_{.1}$  & $P_{1.} . P_{.2}$  & $P_{1.}$   \\ \cline{2-5}         \multicolumn{1}{ |c  }{}                        &         \multicolumn{1}{ |c| }{No} &  $P_{2.} . P_{.1}$  & $P_{2.} . P_{.2}$  & $P_{2.}$    \\ \cline{2-5}         \multicolumn{1}{ |c  }{}                        &         \multicolumn{1}{ |c| }{} &  $P_{.1}$ & $P_{.2}$   \\ \cline{3-4}     \end{tabular}      It's currently producing this table: ![enter image description here](http://i.stack.imgur.com/oOu5V.jpg) I obviously want the cells with annotator a and b to have full borders but I can't seem to get it to work. I've tried inserting \ \hline and modifying my cline's and no luck.


title: Update the default autocompletion of `itemize` in TeXStudio

text: I want to change the auto-completion of `itemize` from               \begin{itemize}     content ...     \end{itemize}      to               \begin{itemize}       \item content...       \item content...       \item content...     \end{itemize}      However, I tried to find the `latex-document.cwl`, `latex-mathsymbols.cwl`, and `tex.cwl` (which are the defaults autocomplete files) with no luck. So, how can I make TeXStudio to change the autocomplete behavior of this specific macro?


title: Chapter formating, and TOC

text: I want to modify the chapter title in chapters without number (Namely, table of contents and bibliography). For this porpoise I used the following:               \def\@makeschapterhead#1{        \fbox{\parbox{\linewidth}{\centering           \large\bfseries #1     }}}      The problem is that now I cannot use the `\tableofcontents` command since it sends a warning stopping the compilation:               ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.4 ...umberline {1}CV D\'etaill\'e}{2}{chapter.1}          ? error: unknown file type      It is just a warning, because by pressing enter, it continues compiling. But it is a quite annoying warning. Any help?


title: Garamond is the cheapest font. How to make it as default font LaTeX?

text: I have just read a news about ink saving, and apparently changing font would lead to a non-negligible ink saving when printing: http://edition.cnn.com/2014/03/27/living/student-money-saving-typeface- garamond-schools/ Given that I found it as an extremely interesting discovery, is there any method to make Garamond (which is the less ink consuming font) the default font for LaTeX? How to do that? I use both TexLive for both Win7 and Mac. My front-end editors are TexWorks and TexSHop, respectively.


title: Misplaced path in a surprising way

text: Why is the upper ellipse is misplaced ? It is defined by same way as the two other. **Edit** Remarque: even the bottom ellipse is not properly placed too. The for nodes calculated to be the big axis are _on_ the ellipses. Maybe there are calculation errors due to pgftransformtriangle ? **Edit 2** I try with \pgftransformreset, but it is the same. ![enter image description here](http://i.stack.imgur.com/ctPvI.png)               \documentclass[tikz]{standalone}          \usepackage{tikz,ifthen}     \usetikzlibrary{calc,intersections,fpu}          \def\Azi{30}%30     \def\Alt{20}%20          \def\Radius{1.5}     \def\Length{5}     \def\AngleMax{atan(2*\Radius/\Length)}          \newcommand{\SetRelAngle}[1]{%         \def\RelAngle{#1}            % max +23 Min -30         \def\Angle{\AngleMax+#1}              \pgfmathsetmacro\RadCos{\Radius*cos(\Angle)}         \pgfmathsetmacro\RadSin{\Radius*sin(\Angle)}         \pgfmathsetmacro\LCos{\Length*cos(\Angle)}         \pgfmathsetmacro\LSin{\Length*sin(\Angle)}              \pgfmathsetmacro\CosAlt{cos(\Alt)}         \pgfmathsetmacro\SinAlt{sin(\Alt)}         \pgfmathsetmacro\CosAzi{cos(\Azi)}         \pgfmathsetmacro\SinAzi{sin(\Azi)}              \pgfmathsetmacro\SinAziSinAlt{\SinAzi*\SinAlt}         \pgfmathsetmacro\CosAziSinAlt{\CosAzi*\SinAlt}              \pgfmathsetmacro\CosAngle{cos(\Angle)}         \pgfmathsetmacro\SinAngle{sin(\Angle)}         \pgfmathsetmacro\TanAngle{tan(\Angle)}              %                           ----- Centre         %                           ----- de l'ellipse surface         \pgfmathsetmacro\CX{\LCos-\RadCos/\TanAngle}         \pgfmathsetmacro\CZ{\LSin-\RadCos}              %                           ---- Contact surface bord         %                           ---- sup cylindre          \pgfmathsetmacro\CXX{\LCos+\RadSin}                   %                           ----- grand axe au fond         \pgfmathsetmacro\GAZ{1.5}         \pgfmathsetmacro\GAX{-\GAZ*tan(\Angle)}         \pgfmathsetmacro\GAY{%             \GAZ*(tan(\Angle)*tan(\Azi)+tan(\Alt)/cos(\Azi))}         }          % #1 premier point               ---- Angle entre 2 nodes ----     % #2 second point     % On récupère le résultat dans \MyAngle     \newcommand{\NodeAngle}[2]{%     \pgfextra{         \pgfmathanglebetweenpoints%             {\pgfpointanchor{#1}{center}}%             {\pgfpointanchor{#2}{center}}%             \global\let\MyAngle\pgfmathresult     }}          %                                   ---- Calculate projection     \newcommand{\CoorXY}[4][MyNode]{%         \pgfmathsetmacro\PjX{%              #2*\CosAzi             -#3*\SinAzi}         \pgfmathsetmacro\PjY{%              #2*\SinAziSinAlt             +#3*\CosAziSinAlt             +#4*\CosAlt}         \coordinate (#1) at (\PjX,\PjY) ;         }          %                               ---- with a dot for debugging     \newcommand{\CoorXYT}[4][MyNode]{%         \CoorXY[#1]{#2}{#3}{#4}         \node[small dot,label={[font=\scriptsize]#1}] at (#1) {}         }          %%%%                        ---- Use path several times     %%%%                        ---- thanks to Andrew Stacey     \makeatletter     \tikzset{       use path for main/.code={%         \tikz@addmode{%           \expandafter\pgfsyssoftpath@setcurrentpath\csname tikz@intersect@path@name@#1\endcsname         }%       },       use path for actions/.code={%         \expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\expandafter\let\expandafter\tikz@actions@path\csname tikz@intersect@path@name@#1\endcsname}%       },       use path/.style={%         use path for main=#1,         use path for actions=#1,       }     }     \makeatother          %%%%                        ---- Définition des styles ----     \tikzset{%         small dot/.style={fill=black,circle,scale=0.3},         surface/.style={blue!75!black!75,fill=blue!10,smooth},         fond/.style={blue!75!black!75,fill=blue!80!black!20}         }          % ##############     \begin{document}     % ##############     %\foreach \An in {36,15,1,0,-1,-12}{%     %\SetRelAngle{\An}          \SetRelAngle{5}     \begin{tikzpicture}[scale=2]               \clip (-\Radius-.5,-1.5*\Radius)         rectangle (\Length+1,\Length+.5) ;          %%%% Debugging          % Repère      \CoorXY[CB]{0}{0}{0} ;      %\CoorXYT[X]{2}{0}{0} ;      %\CoorXYT[Y]{0}{3}{0} ;      %\CoorXYT[Z]{0}{0}{2} ;      %\draw[red,<-] (X) -- ($ (X)!2!(CB) $) ;     %\draw[red,<-] (Y) -- ($ (Y)!2!(CB) $) ;     %\draw[red,<-] (Z) -- ($ (Z)!2!(CB) $) ;          % Ellipse du haut     \CoorXY[CH]{\LCos}{0}{\LSin} ;     \CoorXY[XH]{\LCos}{-\Radius}{\LSin} ;          % Ellipse surface     \CoorXY[SH]{\CX}{0}{\CZ} ;     \CoorXY[SXH]{\CX}{-\Radius}{\CZ} ;     \CoorXY[SYH]{\CXX}{0}{\CZ} ;          %\draw[thin,dashed] (SH)--(SYH) ;          % Ellipse du bas     %\CoorXYT[BD]{0}{\Radius}{0} ;     \CoorXY[BG]{0}{-\Radius}{0} ;     \CoorXY[BH]{-\RadSin}{0}{\RadCos} ;     %\CoorXYT[BB]{\RadSin}{0}{-\RadCos} ;          % Grand Axe     \CoorXY[GA]{\GAX}{\GAY}{\GAZ} ;               %%%%                        ---- Plan cylindre bas ----     \begin{scope}     \pgftransformtriangle         {\pgfpointanchor{CB}{center}}         {\pgfpointanchor{BG}{center}}         {\pgfpointanchor{BH}{center}} ;     %\draw (-1pt,-1pt) rectangle (1pt,1pt) ;     %\draw (0pt,-1pt) -- (0pt,1pt) (-1pt,0pt) -- (1pt,0pt) ;     \NodeAngle{CB}{GA} ;         \coordinate (GaBL) at (\MyAngle:1pt) ;     \coordinate (GaBR) at (180+\MyAngle:1pt) ;          \path [name path global=fondL]         (GaBL) arc (\MyAngle:\MyAngle+180:1pt) ;     \path [name path global=fondR]         (GaBL) arc (\MyAngle+360:\MyAngle+180:1pt) ;          \end{scope}          %%%%                        ---- Plan cylindre haut ----     \begin{scope}     \pgftransformtriangle         {\pgfpointanchor{CH}{center}}         {\pgfpointanchor{XH}{center}}         {\pgfpointanchor{SYH}{center}} ;     %\draw (-1pt,-1pt) rectangle (1pt,1pt) ;     %\draw (0pt,-1pt) -- (0pt,1pt) (-1pt,0pt) -- (1pt,-0pt) ;     %\draw (0,0) circle (1pt) ;     % Attention dans ce plan l'axe y est vers le bas     \coordinate (GaHL) at (-\MyAngle:1pt) ;     \coordinate (GaHR) at (180-\MyAngle:1pt) ;            \path [name path global=hautL]         (GaHL) arc (-\MyAngle:180-\MyAngle:1pt) ;     \path [name path global=hautR]         (GaHL) arc (-\MyAngle+360:-\MyAngle+180:1pt) ;          %\draw (GaHR)--(GaHL) ;     \end{scope}          %%%%                        ---- Plan de la surface ----     \begin{scope}     \pgftransformtriangle         {\pgfpointanchor{SH}{center}}         {\pgfpointanchor{SXH}{center}}         {\pgfpointanchor{SYH}{center}} ;     %\draw (-1pt,-1pt) rectangle (1pt,1pt) ;     %\draw (0pt,-1pt) -- (0pt,1pt) (-1pt,0pt) -- (1pt,-0pt) ;     \coordinate (bobR) at (180-\MyAngle:1pt) ;     \coordinate (bobL) at (-\MyAngle:1pt) ;     \path [name path global=surface] (0pt,0pt) circle (1pt) ;     \end{scope}               %\pgfmathifthenelse{\AngleMax>\Angle}{0}{1} ;     %\ifthenelse{\pgfmathresult=1}{%         %%%%%%%%%%%%%%%%%%%%%         %%%% Cas ellipse %%%%         %%%%%%%%%%%%%%%%%%%%%              % remplissage         %\fill[fond]         %   (GaBL)--(bobL)--(bobR)--(GaBR) --cycle ;              % dessin de la surface         \draw [use path=surface,surface] ;         \draw [use path=fondL] ;         \draw [use path=fondR] ;         \draw [use path=hautL] ;         \draw [use path=hautR] ;              %}{%         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         %%%% cas ellipse tronquée %%%%         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%              %}                \draw (GaBL)--(GaHL) ;     \draw (GaBR)--(GaHR) ;     \end{tikzpicture}     \end{document}


title: How to customize the standard report template

text: I am tired of writing company reports using MS Word, so I am looking for a way to define a custom template that follows the company branding. Basically what I would need to define is the following:   * Enforce font-type and font-size   * Custom color for normal text (some sort of blue) and custom color for the section title, sub-title and sub-sub-title (each have different colors)   * Standardized title page with watermark, document title, author and date   * Standardized last page with watermark, and list of office addresses in a tabular way Could any one help me?


title: Double Names being included in Table of Contents

text: I have a final report that I am writing in LaTeX. I have a code to make the section headings appear in the center of the page (thanks to Jubobs):               \titleformat{\section}     {\vspace*{\fill}\centering\normalfont\Large\bfseries}     {\thesection}     {1em}     {\Large}     [\vspace*{\fill}\newpage]      This unfortunately creates two entries in the tableofcontents page. Deleting this code solves the ToC problem, but I still want the section headings to be centered on the page. How can this be resolved? MWE :               \documentclass{article}     \usepackage{enumerate,a4wide,graphicx,pdfpages,titlesec}     \title{Final Report}     \setcounter{secnumdepth}{0}     \begin{document}          \titleformat{\section}     {\vspace*{\fill}\centering\normalfont\Large\bfseries}     {\thesection}     {1em}     {\Large}     [\vspace*{\fill}\newpage]          \begin{titlepage}     \begin{center}         \includegraphics[scale=0.15]{name}\\[0.2cm]         {\Large XYZ}\\[0.2cm]         {\Large ABC}\\[2.5cm]         {\huge \textbf{Final Report}}\\[5cm]     \end{center}     \begin{minipage}{0.5\textwidth}         \begin{flushleft}             \emph{ABC :} \\             \textbf{ABC} \\ ~\\             \emph{XYZ : }\textbf{ABC}         \end{flushleft}     \end{minipage}     \begin{minipage}{0.5\textwidth}         \begin{flushright}             \emph{XYZ :}\\             \textbf{ABC} \\             \emph{XYZ :} \\             \textbf{ABC} \\         \end{flushright}     \end{minipage}     \vfill     \begin{center}         \today     \end{center}     \end{titlepage}          \tableofcontents          \newpage               \section{Test Section}     Test.     \newpage          \section{Test Section 2}     This is a filler.     \newpage     \end{document}


title: subfigures with memoir

text: I switched to memoir and stopped including subfig and now all my subfigures interpret the caption as actual text, i.e., "[caption...]" shows up in the document with the square brackets. How do I have captioned subfigures with memoir?


title: Syntax to setup environment using environ package with multiple arguments

text: I can't get the syntax right. I am trying to use this answer below to help me. how to use conditional to define different \begin and \end environment at compile time I am trying to setup an environment for tex4ht vs. pdflatex. If tex4ht is running, then the environment will be               \begin{Verbatim}        .......     \end{Verbatim}      If pdflatex is running, then it will be               \begin{Verbatim}[samepage,fontsize=\small,frame=single]        .......     \end{Verbatim}      I am not able to figure the API to `\NewEnviron` to pass those additional arguments above inside the `[....]` Here is a MWE               \documentclass{article}%         \usepackage{fancyvrb}     \usepackage{array}%for m option          \usepackage{environ}     \NewEnviron{X}[4][]{%  takes 4 arguments, samepage,fontsize=..,frame=...,Verbatim       \ifdefined\HCode %htlatex         \begin{#4}           \BODY         \end{#4}       \else% pdflatex         \begin{#4}[#1,#2,#3]  %is this right?           \BODY         \end{#4}       \fi%     }          \begin{document}          \begin{tabular}[c]{|m{4in}|m{2.5in}|}\hline     \textbf{Mathematica}     \begin{X}[samepage][fontsize=\small][frame=single]{Verbatim}  %is this right?              {(10 E^(-t/10) HeavisideTheta[t]             Sin[(3 Sqrt[11] t)/10])/(3 Sqrt[11])}   some Verbatim stuff          \end{X}     &        some text     \\\hline     \end{tabular}          \end{document}      The above should become the following (if pdflatex is running)               \begin{tabular}[c]{|m{4in}|m{2.5in}|}\hline     \textbf{Mathematica}     \begin{Verbatim}[samepage,fontsize=\small,frame=single]             {(10 E^(-t/10) HeavisideTheta[t]             Sin[(3 Sqrt[11] t)/10])/(3 Sqrt[11])}          \end{Verbatim}     &        some text     \\\hline     \end{tabular}      and if tex4ht if running, it should become               \begin{tabular}[c]{|m{4in}|m{2.5in}|}\hline     \textbf{Mathematica}     \begin{Verbatim}              {(10 E^(-t/10) HeavisideTheta[t]             Sin[(3 Sqrt[11] t)/10])/(3 Sqrt[11])}          \end{Verbatim}     &        some text     \\\hline     \end{tabular}      I tried calling it as follows               \begin{X}[samepage,fontsize=\small,frame=single]{Verbatim}       But that did not help. I keep getting syntax error `Missing $ inserted \end{X}` and `extra }` etc.... Also tried               \begin{X}[samepage],[fontsize=\small],[frame=single]{Verbatim}       What is the correct syntax to setup this environment? Using texlive 2013 and Miktex


title: How to generate Bourbaki style script font

text: Bourbaki's script font is a little different than the usual ones I see in LaTeX (See Bourbaki's General Topology). How do I generate this type of font? For example: ![enter image description here](http://i.stack.imgur.com/XhmNW.jpg)


title: draw an ellipse into a Tree picture -tikz package

text: I have draw a tree using tikz package like this               \begin{tikzpicture}      \tikzstyle{level 1}=[sibling distance=40mm]      \tikzstyle{level 2}=[sibling distance=20mm]      \tikzstyle{level 3}=[sibling distance=10mm]       \node{S}            child{node{N} child{node{mary}} }           child{node{VP}                      child{node{V} child{node{brought }}}                 child{node{NP}   child{node{D} child{node{a}}} child{node{N} child{node{cat}}}  }                 child{node{PP}  child{node{IN} child{node{to}}}     child{node{N}  child{node{school}}} }                          }      ;       \end{tikzpicture}      the result of my picture it is like this ![enter image description here](http://i.stack.imgur.com/OkPs9.png) Now i want to draw an ellipse an some text in my picture to describe her like this ![enter image description here](http://i.stack.imgur.com/hUDn1.png) How i can do that , any answer will be appreciate


title: How to create this simple model with arrow and text on the top?

text: How to create this simple model with arrow and text on the top ? Regards ![How to create this simple model with arrow and text on the top ? Regards](http://i.stack.imgur.com/bzLOf.jpg)


title: How to read a file with luatex

text: I tried to read a file with lua and set the content as normal text in my document, but I didn't worked it out. Here my code:               \documentclass{scrartcl}     \usepackage{luatextra}     \usepackage{filecontents}          \begin{filecontents}{testdata.dat}       A  B       1.0 20       1.1 21       1.2 22     \end{filecontents}          \begin{luacode}       function readtxt()         file = io.open("testdata.dat", "r")         text = file:read("*all")         print(text)         return tex.print(text)        end     \end{luacode}          \begin{document}       \directlua{readtxt()}     \end{document}      But nothing is printed to the document although lua diplays the content of the file in the terminal.


title: Customizing Chapter style in scrbook

text: I want to obtain styles like those showed in the next two images (I do not need the picture in the background (parabolas)): ![Image 1](http://i.stack.imgur.com/0W1PT.jpg) ![Image 2](http://i.stack.imgur.com/qWzKi.jpg) My original LaTeX code (to be customized but should keep font as they are):               % !TEX TS-program = latex     \documentclass[11pt, pagesize=auto, version=last, chapterprefix=true]{scrbook}     %% En 12pt c'est possible aussi     %% packages utilises     %%---------------------     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc} % pour taper les lettres accentues     %====Perso====%     \usepackage{charter}     \usepackage[expert]{mathdesign}     %=================%     %\usepackage{etoolbox}     %\pretocmd{\ref}{\bgroup\small}{}{}     %\apptocmd{\ref}{\egroup}{}{}     %=============%     \usepackage[frenchb]{babel}     \usepackage[babel=true]{csquotes} % csquotes va utiliser la langue définie dans babel     %%========Headings(perso)======================%     \usepackage{titlesec}     %%%%%Chapter%%%%%%%     \setkomafont{chapter}{\usefont{T1}{qhv}{b}{n}\selectfont\huge}     %%%%%Section%%%%%%%%     \titleformat{\section}[hang]{         \usefont{T1}{qhv}{b}{n}\selectfont} % "qhv" - TeX Gyre Heros, "b" - bold         {}          {0em}        {\hspace{-0.4pt}\Large \thesection\hspace{0.6em}}     \begin{document}          \chapter{Test chapter}     \section{Test section}          \end{document}


title: Table of Contents with Chapter and Appendix

text: I'm using this code to get word Chapter in TOC before each chapter.               \documentclass[a4paper]{book}     \usepackage{tocloft,calc}          \renewcommand{\cftchappresnum}{Chapter }     \AtBeginDocument{\addtolength\cftchapnumwidth{\widthof{\bfseries Chapter }}}          \begin{document}     \tableofcontents          \include{Intro}               \cleardoublepage     \begin{appendices}     \renewcommand{\thesection}{\arabic{section}}     \include{Appendix}     \end{appendices}          \end{document}      This code also adds Chapter word before appendix. I wonder how to get word Appendix before the appendix in TOC.


title: Multiline equation with cases

text: I am trying to get a system of equations, that will have cases only on some of the equations. I made this:               \documentclass[a4paper]{article}     \usepackage{amsmath}     \usepackage{mathtools}     \begin{document}          \begingroup     \begin{equation*}     \setlength{\arraycolsep}{0pt}     \begin{array}{rl}         b_0 & = p(0)\\     \begin{rcases}         1^n+b_{n-1}1^{n-1}+\ldots+b_11+b_0&= p(1)\\         2^n+b_{n-1}2^{n-1}+\ldots+b_12+b_0&= p(2)\\         \hdotsfor{2}\\         (n-1)^n+b_{n-1}(n-1)^{n-1}+\ldots+b_1(n-1)+b_0&= p(n-1)\\     \end{rcases}     \quad     \text{\parbox{4cm}{reset}}     \end{array}     \end{equation*}     \endgroup          \end{document}      But for the output I get is this: ![enter image description here](http://i.stack.imgur.com/icX5W.png) I've tried with `eqnarray`, but my first equation is flushed right :\ Is there a way to make the first one aligned with the rest?


title: Latexian vs. TexShop

text: I've recently started using LaTeX and have been using Latexian on my Mac, a program which offers a live preview of the document. However, I've head that TexShop is a superior program. What is better about TexShop? I just want to be using the best one for the Mac.


title: pgfplots: adds "-indexX" to duplicate columns when pulling column name by \pgfplotstablegetcolumnnamebyindex

text: I am making graphs from a huge CSV with a macro hacked from http://tex.stackexchange.com/a/45125 and http://tex.stackexchange.com/a/24023 Which selects start/end column and adds them etc. But duplicate legend entries have a -index# where # is the column number. Can pgfplots be helped to display legend entries exactly as they are in first line of the csv? I have tried protecting entries with {}. This did not work. It is not really an option to manually add legends.               \documentclass{standalone}          \usepackage{pgfplots,pgfplotstable}          \usepackage{filecontents}          \begin{filecontents}{testdata.dat}     AB;AB+;AB;ABerror;AB+error;ABerror;     1; 2; 3; 0.2; 0.1; 0.1;     2; 3; 4; 0.3; 0.2; 0.2;     3; 4; 5; 0.4; 0.3; 0.3;     4; 5; 6; 0.5; 0.4; 0.4;     \end{filecontents}          \begin{document}          \pgfplotsset{%       table/col sep = semicolon}          \newcommand{\plotfile}[1]{%       \pgfplotstableread{#1}{\table}       \pgfplotstablegetcolsof{#1}       \pgfmathtruncatemacro\numberofcols{\pgfplotsretval - 1}       \pgfplotsinvokeforeach{0,...,\numberofcols}{%     \pgfplotstablegetcolumnnamebyindex{##1}\of{\table}\to{\colname}     \addplot+[] table [x expr=\coordindex,y     index=##1] {#1};      \addlegendentryexpanded{\colname}       }     }          \newcommand{\plotfileLegend}[4]{%           \pgfplotstableread{#1}{\table}           \pgfplotstablegetcolsof{#1}           \pgfmathtruncatemacro\numberofcols{(#3+1-#2)/2}           \pgfmathtruncatemacro\startcol{#2-1}           \pgfmathtruncatemacro\endcol{#3-\numberofcols-1}              \pgfplotsinvokeforeach{\startcol,...,\endcol}{%           \pgfmathtruncatemacro\errorcolumn{##1+\numberofcols}           \addplot table [x expr=\coordindex/#4,y index=##1, y error index = \errorcolumn] {#1};           \pgfplotstablegetcolumnnamebyindex{##1}\of{\table}\to{\colname}            \addlegendentryexpanded{\colname}         }     }          \begin{tikzpicture}       \begin{axis}[xlabel={Influx},     ylabel={Center of mass},     ymode=log,     legend style={       font=\footnotesize,       at={(1.3,1)},       anchor=north east},        error bars/y dir=both,       error bars/y explicit,       error bars/error mark=none,       error bars/error bar style={line width=0.8,solid}]     \plotfileLegend{testdata.dat}{1}{6}{1}       \end{axis}     \end{tikzpicture}          \end{document}      I am still not 100% on how this works. Where are the references to \pgfplotstablegetcolumnnamebyindex in the manuals?


title: Installing LaTeX in a server

text: I need to run LaTeX in a server using an explorer (just like Safari or Chrome). The thing is that I can't find a software that allows me to do that, as, for example, R Studio does (they have the program in their web page). Is that possible? I do not need much security. The thing is that I need to run it from my iPad, for example thru safari. The reason why I'm using a server is because I use a lot of packages and most of the computers take a lot of time processing the document.


title: Automatic line breaking of camel case within \url

text: I would like to break camel case text that is handed to the `\url{}` macro of `url.sty`. The solution here does not work for text in captions, so it seems, ans in particular does not work for `\url{}`. Is there a way to break the camel case as in:               \documentclass{article}          \usepackage{url}          \begin{document}     \noindent{}Here some text, and     then \url{BreakThisCamelCaseForMeItWasChosenToMakeSomeTasksEasierButAlas.txt},     and then some more text to indicate the text width, showing that     the URL should break earlier.     \end{document}


title: How do instantiate Hebrew letters

text: I want to make use of a Hebrew lamedh in a document instead of the Greek equivalent lambda as the latter is reserved another purpose. How do I get hold of this and other Hebrew letters?


title: Splitting delimited token list argument

text: I wrote a little piece of code (function `\getfirst:w`) that splits its delimited argument at the first embedded `:`. The code works well if used standalone, but I am unable to place it into the `.code:n` of a key definition. The document command (`\separatethis`) that executes the key evaluation stops with error:               ! Argument of \getfirst:w has an extra }.      What is going wrong?               \documentclass{article}     \usepackage{expl3}     \usepackage{xparse}          \ExplSyntaxOn     \cs_new:Npn\getfirst:w#1:#2\q_stop{#1}     \keys_define:nn{mypkg}{         myopt .code:n = {           \tl_set:Nx\myarg_tl{#1}           \tl_set:Nx\first_tl{\exp_after:wN\getfirst:w\myarg_tl\q_stop}         }     }     \NewDocumentCommand\separatethis{O{}}{         \keys_set:nn{mypkg}{#1}         \tl_use:N\first_tl     }     \ExplSyntaxOff          \begin{document}          %works     \ExplSyntaxOn     \tl_set:Nn\myarg_tl{foo:bar}     \tl_set:Nx\first_tl{\exp_after:wN\getfirst:w\myarg_tl\q_stop}     \tl_use:N\first_tl     \ExplSyntaxOff          %doesn't work     \separatethis[myopt=foo:bar]          \end{document}


title: Align-environment: Align on the left side

text: Why doesn't the following code align the two equations in the middle? It does only if I remove the alignment on the left.               \begin{align*}         &ABC  &= ABC - AB\\         &ABCD &= ABC - ABCDEFG     \end{align*}      ![enter image description here](http://i.stack.imgur.com/iNEGL.png)


title: PDF Latex lastpage does not work

text: I've added the last page package tried to display the pager but the last page wont display. What's wrong with my code, the last page will just display a "??":               {.select date_format(now()," %M %d, %Y %r") as  run_date}     {.select username from deskpad.user where user_id=@user_teller}          \documentclass{article}     \usepackage[paperheight=11in,paperwidth=8.5in,margin=0.1in,headheight=0.5in,footskip=0.4in,includehead,includefoot]{geometry}     \usepackage{graphicx}     \usepackage{fancyheadings}     \usepackage{fancybox}     \usepackage{longtable}     \usepackage{setspace}     \usepackage{textcomp}     \usepackage{colortbl}     \usepackage{booktabs}     \usepackage{fancyhdr}     \usepackage{lastpage}          \usepackage[absolute]{textpos}          \renewcommand{\familydefault}{\sfdefault}          \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}          \fancyhf{}     \fancyhead[l]{     }     \fancyfoot[l]{     \small{     \begin{tabular}{p{4.0in} p{4.0in}}     \hspace{15pt} \small{ \emph{ Date Printed: {.\run_date\} } } & \raggedleft{ \small{ \emph{ Page \thepage\ of \pageref{Last Page} } } \hspace{15pt}} \tabularnewline     \end{tabular}     }     }


title: How can I produce a Hasse (or lattice) diagram?

text: I want to produce a some kind of lattice diagram, such as a Hasse diagram. How can I do so? I tried using matrix with letters and slashes but it seems ugly. Do I need any additional packages? **EDIT:** I mean graph like this one (for zessenhaous lemma):![enter image description here](http://i.stack.imgur.com/sQIZg.png)


title: Long text in multirow

text: I have long text in a multirow cell. And the text takes more rows than the rows in the second column.               \documentclass[a4paper,12pt]{report}     \usepackage{multirow}     \usepackage{longtable}          \begin{document}          \begin{longtable}[H]{|p{\dimexpr0.5\linewidth-2\tabcolsep}|p{\dimexpr0.5\linewidth-2\tabcolsep}|}     \caption{Title}     \tabularnewline\hline     \multirow{2}{\linewidth}{\centering \tiny \textbf{Long long  long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text}} & \tiny 11 \tabularnewline \cline{2-2}      & \tiny 11 \tabularnewline \cline{1-2}     \end{longtable}          \end{document}      I get this: ![enter image description here](http://i.stack.imgur.com/Rt2iX.png) How can I fix it? I generate table automatically, and I do not know how many lines of text in the multirow cell takes. So I can not manually add blank lines in the second column. **Update for Bernard** When I compile this code:               \documentclass[a4paper,12pt]{report}     \usepackage[utf8]{inputenc}          \usepackage{multirow}     \usepackage{longtable}          \usepackage{makecell}          \begin{document}          \begin{longtable}{|m{\dimexpr0.5\linewidth-2\tabcolsep\relax}|m{\dimexpr0.5\linewidth-2\tabcolsep\relax}|}     \caption{Title}     \tabularnewline\hline%     \multirow{2}{*}{\parbox{\linewidth}%[24pt]     {\centering \scriptsize \textbf{Long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long}}}     & \Gape[12pt]{\scriptsize 11} \tabularnewline     \cline{2-2}     & \Gape[12pt]{\scriptsize 11} \tabularnewline      \cline{1-2}     \end{longtable}\bigskip          {\normalsize     \begin{longtable}{|m{\dimexpr0.5\linewidth-2\tabcolsep\relax}|m{\dimexpr0.5\linewidth-2\tabcolsep\relax}|}     \caption{Title}     \tabularnewline\hline%     \multirowcell{8}{\parbox{\linewidth}     {\centering \textbf{Long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long}}}     &\multirowcell{4}{11} \tabularnewline & \tabularnewline & \tabularnewline & \tabularnewline     \cline{2-2}     & \multirowcell{4}{11} \tabularnewline & \tabularnewline & \tabularnewline & \tabularnewline      \cline{1-2}     \end{longtable}     }     \end{document}       I see this result: ![enter image description here](http://i.stack.imgur.com/ssXso.png) ![enter image description here](http://i.stack.imgur.com/LciUs.png)


title: How can I reduce the amount of whitespace in a chapter heading?

text: I'm a beginner in LaTeX and I've picked up a university template for a group report. I can't figure out where I can change the chapter headings which have too much white space, both top and bottom. The template uses fncychap but I can't seem to find anything in there to change it. There's also a class file. Where am I likely to find an option for this? What should I look for? Can I manually override this? For instance, our table of contents page is about a quarter whitespace at the top, which results in that it leaks out onto two pages which is completely unnecessary. For starter's, I've gathered there are templates in fncychap, but I can't seem to figure out which one is used. This is the contents in the class file:               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%     %%  Fancy Chapter Headings     %%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %     % (must be loaded before hyperref)     \RequirePackage{./local/fncychap/fncychap}     %     % customizations     \makeatletter       \ChNameVar{\raggedleft\Huge\rm}       \ChNumVar{\Huge\rm}       \ChTitleVar{\raggedleft\Huge\sf\bfseries}       \ChRuleWidth{2pt}            \renewcommand{\DOCH}{%         \vskip -0.5\baselineskip         \mghrulefill{\RW}\par\nobreak         \CNV\FmN{\@chapapp}\space \CNoV\thechapter         \par\nobreak         \vskip -0.5\baselineskip        }       \renewcommand{\DOTI}[1]{%         \mghrulefill{\RW}\par\nobreak         \CTV\FmTi{#1}\par\nobreak         \vskip 60\p@         }       \renewcommand{\DOTIS}[1]{%         \mghrulefill{\RW}\par\nobreak         \CTV\FmTi{#1}\par\nobreak         \vskip 60\p@         }      What is DOCH/DOTI etc.? I tried to play around with \vskip but it didn't seem to have any noticeable effect. (The Template in Question)


title: Drawing Solids with LaTeX

text: I want to know if there is a package that automatically draw solids (spheres, cylinders, cubes, prisms). I know I can do this kind of drawing using TikZ or PSTricks. But what about a package where you can type `\cube{2cm}` and it draws a cube of side 2 cm. I am not posting a MWE because I just want to know if such package exists.


title: Multi-Line/Wave Generator Package for LaTeX?

text: I'm looking at my professors slides now: http://www.math.ucla.edu/~virtanen/40a.1.14s/schedule/lec1.pdf The first slides always have these intricate wave lines. If you Google search for "wave lines," you'll get similar results, as, for example, here: http://www.featurepics.com/online/Vector-Wave-Lines-Abstract- Background-588098.aspx I'm wondering, is there a package that allows you to create these within the document? If not, how can I get one going diagonally across the page all wild and wave-like from the extreme left to the extreme right of the document.


title: Can't make table with non-standard multicolumns

text: I want to create a table like this: ![enter image description here](http://i.stack.imgur.com/GsvCc.png)   1. 1-st row: 2 columns, 50% each.   2. 2-nd row: 9 columns, sizes given. I tried to use the approach from this answer: Table with non-standard multicolumns Created 10 `X` columns and united them according to scheme. But instead of the desired outcome I got this: ![enter image description here](http://i.stack.imgur.com/P0uf3.png)               \documentclass[8pt]{extarticle}     \usepackage[a5paper]{geometry}     \geometry{verbose,tmargin=1cm,bmargin=1.5cm,lmargin=0.7cm,rmargin=0.7cm}     \usepackage{array}     \usepackage{tabularx}     \setlength{\parindent}{0cm}     \begin{document}     \begin{tabularx}{\textwidth}{ |*{10}{X} }       \hline       \multicolumn{5}{|X}{50\%} & \multicolumn{5}{|X|}{50\%}\\       \hline       \multicolumn{1}{|m{12mm}}{12mm} &       \multicolumn{1}{|m{9mm}}{9mm} &       \multicolumn{1}{|m{17mm}}{17mm} &       \multicolumn{1}{|m{11mm}}{11mm} &       \multicolumn{2}{|X}{X} &       \multicolumn{1}{|m{18mm}}{18mm} &       \multicolumn{1}{|m{17mm}}{17mm} &       \multicolumn{1}{|r}{r} &       \multicolumn{1}{|r|}{r}\\       \hline     \end{tabularx}     \end{document}      How to fix?


title: Easiest way of having directory tree with hyperref links

text: I would like to have a dirtree like structure which allows me to have hyperrefs for sections labeled as the file nodes. Something like this:               root       |       |--- dir1       |     |       |     |-- \hyperref[dir1-file1]{''file1''}       |     |-- \hyperref[dir1-file2]{''file2''}       |     |-- \hyperref[dir1-file3]{''file3''}       |--- dir2       |     |       |     |-- \hyperref[dir2-file1]{''file1''}       |--- dir3          \section{dir1/file1}     \label{dir1-file1}     .     .     .      Any idea on how to get this done easily? It's my first crack at putting a document together in LaTex, so the easier the better.