title: Write LaTeX section title to an additional file

text: I have a book that comes with an answer manual. So when I define a section or subsection I want to also write the name of that to the file containing the answers. Thus, I want to end with this type of thing in `bookans.tex`.               \subsection{One.I.1: Gauss' Method}     \begin{ans}{One.I.1.17}           We can perform Gauss' method can in different ways ..      (I write to that file using the _answers_ package.) I see in the LaTeX source that the last thing in argument 6 to `\@startsection`, the _style_ , can be a command that takes an argument, so I tried variations on this.               \renewcommand{\subsection}{\@startsection        {subsection}{2}{0em}{-10ex plus1ex minus1ex}{1em}%        {\raggedright\usefont{T1}{fvs}{b}{n}\large\SetSectioningName}}          \def\SetSectioningName#1{\gdef\sectioningname{#1}%       \typeout{SUBSECTION\space START:\space\sectioningname}}      But it does not get the name; it gets "`\setbox \@tempboxa \hbox {{\hskip 0em\relax I.1\hskip 1em\relax \relax }}\hangindent \wd \@tempboxa \noindent \box \@tempboxa \interlinepenalty \@M Gauss' Method\@@par`". Then, for instance, _hyperref_ gets annoyed at the section title. To write the Chapter name I modified `\@chapter`. Do I need to do the same torturous thing with the sectioning commands (maybe `\@sect`)? It seems perilous to me; for instance, what if the LaTeX3 folks change those definitions?


title: How to write formulas in arabic letters and numbers?

text: How can I write formulas in Arabic letters and numbers, is there any package or some sort of template to do so. > Hint: I am new to Latex.


title: Removal of binding offset when submitting digital version of document

text: I'm writing my dissertation in LaTeX, and we're required to submit a paper copy and a PDF copy. For the paper copy, I'm using:               \documentclass[twoside]{scrartcl}          \usepackage{fullpage}     \usepackage[top=2cm, bottom=3cm, left=1cm, right=1cm]{geometry}     \geometry{bindingoffset=1cm}      ...so that it can be printed double-sided and bound with the correct margins. But for the PDF copy, would you comment out the `bindingoffset` so that the document is "symmetrical"? Forgetting about what my organisation's rules might be, are there any guidelines for creating both a digital and a paper copy?


title: How to specify an arbitrary (possibly non-integer) font size in LaTeX

text: I may be wrong, but it seems to me that I cannot obtain non-integer (or non- preloaded) font sizes (say, 9.876pt) using `\fontsize`. If this is true, how do I do this in LaTeX? Do I have to resort to the `\font ... at ...` primitive? (The reason I need this is that I'd like to implement a more LaTeXy way to do the `\diminuendo` macro from http://tug.org/texshowcase/.)


title: Align TikZ grid with geometry crop marks

text: I am drawing a grid on top of the `layout` defined with `geometry`.               \documentclass[letter]{article}     \usepackage{geometry}     \geometry{         showcrop,         paper = a4paper,         layout = a5paper,         layoutoffset={1cm,1cm}     }     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{lipsum}% just to generate text for the example          \makeatletter     % Code from:     % http://tex.stackexchange.com/questions/85064/grid-for-textpos-layout     \newcommand\rectangulargrid[2]{%     \tikz[       remember picture,       overlay,       yscale=-1,       xstep=\Gm@layoutwidth/#1,ystep=\Gm@layoutheight/#2,       xshift= -\Gm@layouthoffset, yshift=-\Gm@layoutvoffset,       ]       \draw ($(current page.north west) - (\Gm@layouthoffset, \Gm@layoutvoffset)$) grid      ($(current page.north west)+ (\Gm@layoutwidth, \Gm@layoutheight) + (\Gm@layoutwidth/#1, \Gm@layoutheight/#2) $);}     \makeatother               \begin{document}     \lipsum[1-3]     \rectangulargrid{16}{16}     \end{document}      I don't know why the grid lines are not aligned with the crop marks.   Any idea?


title: Stripping a pair of double-quote characters surrounding a word and define it as a macro

text: I have an external program who writes a text file as follows:               <number> "<nameA>"     <number> "<nameB>"     <number> "<nameC>"     ...      How would I parse all lines and assign each number to a macro of the given name? Here is a prototype of what I'm looking for:               \documentclass{article}     \usepackage{filecontents}% http://ctan.org/pkg/filecontents     \usepackage{siunitx}          \begin{filecontents}{myinput.txt}     0.45 "wingTaperRatio"     12.0 "wingSpanMT"     10.2 "wingAreaMTSquared"     \end{filecontents}          \begin{document}          %     % We want to assign      %   0.45 to \wingTaperRatio     %   12.0 to \wingSpanMT     %   10.2 to \wingAreaMTSquared     %     \parseInput{myinput.txt}          % So that we can write     Given a wing whose planform has     a taper ratio $\lambda=\num{\wingTaperRatio}$,     a span $b=\SI{\wingSpanMT}{\metre}$,      and a reference surface $S=\SI{\wingAreaMTSquared}{\metre^2}$,     solve the following problem \ldots          \end{document}      How the macro `\parseInput` would be implemented? EDIT: There's one more need here, i.e. that the macro names should admit repetitions. This is because I want to prepare more subfolders, each one with its own `myinput.txt`. Each subfolder will be related to a different proposed exercise in a book. The data and results of the exercises are handled and written on file by the external program. But some of them may be related to the same physical quantity and values may change from one exercise to the next. So, I may have to use the macro `\parseInput` several times, with the need of redefining some macros. I may want to have something like:               \section{Exercise 1}     \parseInput{exerciseOne/myinput.txt}          Given a wing whose planform has     a taper ratio $\lambda=\num{\wingTaperRatio}$,     a span $b=\SI{\wingSpanMT}{\metre}$,      and a reference surface $S=\SI{\wingAreaMTSquared}{\metre^2}$,     solve the following problem \ldots          \section{Exercise 2}     \parseInput{exerciseTwo/myinput.txt}          Now, the taper ratio $\lambda$ is not given,     while the wing has a new span $b=\SI{\wingSpanMT}{\metre}$,      and a reference surface $S=\SI{\wingAreaMTSquared}{\metre^2}$.     Find the new value of $\lambda$.


title: What do \makeatletter and \makeatother do?

text: Many TeX “hacks” begin with `\makeatletter` and end with `\makeatother`. What do these commands do?


title: Redefining sectioning commands

text: I'm trying to redefine the `\subsubsection` of the report class to behave like `\paragraph` and not have a linebreak after the title. It's closely related to this question but I have no idea how to extrapolate the reverse effect from it. I tried to get the code for paragraph using `\show\paragraph` and redifining `\subsubsection` with it as follows, but although it does compile, it doesn't work when I try to use it.               \renewcommand{\subsubsection}{\long macro :->\@startsection{subsubsection}{4}{\z@ }{3.25ex \@plus 1ex \@minus .2ex}{-1em}{\normalfont \normalsize \bfseries}}      I'm would like to know how to solve my original problem, but now, I'm also curious as to what I did wrong with that `\renewcommand` since it seems to me like I'd encounter it again with other problems I'd try to solve by modifying how latex does its thing. MWE:               \RequirePackage[l2tabu, orthodox]{nag}     \documentclass[12pt]{report}          \usepackage{listings}          \def\thesection{\Roman{section}}     \def\thesubsection{\thesection.\Alph{subsection}}     \setcounter{secnumdepth}{2}          %\renewcommand{\subsubsection}{\long macro :->\@startsection{subsubsection}{4}{\z@ }{3.25ex \@plus 1ex \@minus .2ex}{-1em}{\normalfont \normalsize \bfseries}}          \begin{document}          \chapter{Chapter 1}     \label{c:c1}          \section{Section 1}     \label{s:s1}          \subsection{Subsection 1}     \label{ss:ss1}          \subsubsection{\lstinline{<Upper|Lower> Triangular}} defines a triangular matrix ...          \end{document}


title: \@ title and You can't use `\spacefactor' in vertical mode

text: > **Possible Duplicate:**   >  What do \makeatletter and \makeatother do? I'm trying to use a template with the following content:               \documentclass[a4paper,twoside,10.5pt]{report}     \usepackage{a4wide}          \usepackage{styles/thesis_style}     \usepackage{styles/functions}          \usepackage[latin1]{inputenc}      \usepackage{polyglossia}     \usepackage{fontspec}     \setromanfont[BoldFont={Helvetica Bold},ItalicFont={Helvetica Oblique}]{Helvetica}          \title{Towards Storing Point Clouds in PostgreSQL}     \author{Michel Ott}     \date{\today}          \begin{document}     \include{./titlepage}      Then in the ./titlepage file there is the following:               { \huge \bfseries \@title}\\[2cm]     ...      Now I get the following error:               ! You can't use `\spacefactor' in vertical mode. \@->\spacefactor \@m {} l.29      { \huge \bfseries \@ title}\\[2cm] ?      How can I fix this?


title: Replacing brackets with parentheses for \textcite, Biblatex numeric-comp

text: I'm trying to modify the numeric-comp style so in-text citations appear with parentheses rather than brackets for both `\cite` and `\textcite` i.e. `[1]` becomes `(1)` and `Smith et al. [1]` becomes `Smith et al. (1)`. This was no problem for `\cite` - I just changed the command:               \DeclareCiteCommand{\cite}[\mkbibparens]       {\usebibmacro{cite:init}%        \usebibmacro{prenote}}       {\usebibmacro{citeindex}%        \usebibmacro{cite:comp}}       {}       {\usebibmacro{cite:dump}%        \usebibmacro{postnote}}      For `\textcite`, I assumed that I could redefine the `textcite` macro replacing `\bibopenbracket` with `\bibopenparen` and `\bibclosebracket` with `\bibcloseparen`, like so:               \renewbibmacro*{textcite}{%       \iffieldequals{namehash}{\cbx@lasthash}         {\usebibmacro{cite:comp}}         {\usebibmacro{cite:dump}\cbx@tempa         \usebibmacro{cite:init}%      \ifnameundef{labelname}            {\printfield[citetitle]{labeltitle}}            {\printnames{labelname}}%          \addspace\bibopenparen          \ifnumequal{\value{citecount}}{1}            {\usebibmacro{prenote}}            {}%          \usebibmacro{cite:comp}}%       \savefield{namehash}{\cbx@lasthash}%       \gdef\cbx@tempa{\bibcloseparen\multicitedelim}}      But when I compile (after running biber) this I get the error "Argument of `\@secondoftwo` has an extra }". In fact this happens even if I renew the `textcite` macro to be exactly as it appears in `numeric-comp.cbx`. Is there something I'm not understanding here, or is it a bug? And is there another way? (I'm using TeXShop 3.21 on Mac OS X.) Minimal example to reproduce the error:               \documentclass{article}     \usepackage{filecontents}     \usepackage[style=numeric-comp, sorting=none, backend=biber, firstinits=true, maxcitenames=1]{biblatex}          \begin{filecontents}{testref.bib}     @article{a_reference,         Author = {Smith, A A and Jones, Z Z},         Journal = {A Journal},         Number = {4},         Pages = {267--277},         Title = {A title},         Volume = {75},         Year = {2008}}     \end{filecontents}                    \renewbibmacro*{textcite}{%       \iffieldequals{namehash}{\cbx@lasthash}         {\usebibmacro{cite:comp}}         {\usebibmacro{cite:dump}\cbx@tempa          \usebibmacro{cite:init}%          \ifnameundef{labelname}            {\printfield[citetitle]{labeltitle}}            {\printnames{labelname}}%          \addspace\bibopenparen          \ifnumequal{\value{citecount}}{1}            {\usebibmacro{prenote}}            {}%          \usebibmacro{cite:comp}}%       \savefield{namehash}{\cbx@lasthash}%       \gdef\cbx@tempa{\bibcloseparen\multicitedelim}}          \bibliography{testref}     \begin{document}          We \textbackslash cite \cite{a_reference} and then \textbackslash textcite -\textcite{a_reference}.          \printbibliography     \end{document}


title: LaTeX @ (at) symbol

text: > **Possible Duplicate:**   >  Why do LaTeX internal commands have an @ in them? What does the `@` symbol mean in LaTeX? I'm looking at the source of `apa.cls`, and there's a declaration:               \newsavebox\gr@box      and later on               \sbox\gr@box{\includegraphics[width=\linewidth]{#2}}.      It seems like `@` isn't acting as a normal character, but I can't figure out exactly what it's doing, and couldn't find anything after bit of googling (how I would love a Google regex feature!) Thanks. EDIT: Thanks for the help; of the links I looked through I found http://www.tug.org/pipermail/tugindia/2002-January/000178.html to be very helpful and concise. To summarize, the `@` character is not normally allowed in the names of macros, so as a hack for scoping, LaTeX packages declare it internally to be a valid name character and use it for their macros. You can use `\makeatletter` in a document to access these macros, but you obviously must be very careful since you have can now overwrite essential LaTeX kernel macros; use `\makeatother` to revert.


title: Why do LaTeX internal commands have an @ in them?

text: Does the @ mean anything specific? For example, is it substituted? Does it split the command into parts, like `\s@foo` could internally mean "foo of type s"? Is the purpose of the @ only to make internal commands break when used outside a class definition or a package? If so, how is that a Good Thing?


title: What does "@" at the beginning of a command name mean?

text: The answers to this question mention commands such as `\@author` and `\@director`, and latex.ltx is full of them. However, when I use `\@author` in my document, it just outputs the word "author". What does the `@` in command names mean?


title: What is the use of @ and @@ in variables names in TeX/LaTeX?

text: > **Possible Duplicate:**   >  Why do LaTeX internal commands have an @ in them?   >  What do \makeatletter and \makeatother do?   >  What is the difference between \myname and \my@name while writing a .cls > file? I have tried a few times to write/understand other peoples packages. Though I'm no good yet, I keep running into a definition using `@` or `@@` in the name. Why is this done ? Is there any special meaning ? Is this in any way related to the use of _ and __ in python, where a variable starting with `@` shouldn't really be messed with while one with __ definitely should not be messed with ? As an example : `\@author` is used in the class files article.cls but is not defined anywhere. So I assumed the `@` to mean it was some kind of command internal to LaTeX/TeX. While in a custom class file (`res.cls` by Michael DeCorte to be exact) I've seen `\@name` is specifically defined as both               \def\name#1{\def\@name{#1}}      and               \def\@name{}      To my knowledge the latter ensures a default value is set up in case the `\name` command is not used by the document writer. But this still doesn't indicate why the `@` is used.


title: pdf option for pstricks conflicts with babel french option

text: Today I had this error message on compiling a document:               ! Package babel Error: The character '"' is not a shorthand character in french      After commenting a lot of things I finally identified the culprit: Using the `pdf` option with `pstricks`. Here is a minimal example:               \documentclass[11pt, a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          % \usepackage{auto-pst-pdf, pstricks}     \usepackage[pdf]{pstricks}     \usepackage{pstricks-add}          \usepackage[french]{babel}          \begin{document}          \psset{xunit = 0.5cm, plotstyle = curve}     \begin{pspicture}(-10,-1)(10,2)     \psaxes[labels=none]{->}(0,0)(-10,-1)(10,2)%     \psplot[linecolor=blue,linewidth=1.5pt, algebraic]{-10}{10}{1/(1 + x^2)}%     \end{pspicture}          \end{document}      Replacing `[french]` with, say, `german` results in no error message. Same thing if I comment `usepackage[pdf]{pstricks}` and uncomment `\usepackage{autopst-pdf,pstricks}`. Is there something to be done? Another question about the `pdf` option of `pstricks`: Packages like `pst- plot` or `pstricks-add` load `pstricks`; why don't they pass the `pdf` option on to `pstricks`? For most of my work, I only have to load `pstricks-add`. If I want to use this option I also have to explicitly write `\usepackage[pdf]{pstricks}` first.


title: "Can be used only in preamble" when using the "import" package

text: My code, which is actually supposed to work according to import's official readme if I understand it correctly: `./main.tex`:               \documentclass[a4paper]{article}     \usepackage{import}          \begin{document}          \import{FirstChapter/}{main}          \end{document}      `FirstChapter/main.tex`:               Test      I get the following errors:               Line 1: Can be used only in preamble. \documentclass     Line 2: Can be used only in preamble. \usepackage     Line 4: Can be used only in preamble. \begin{document}     Line 1: Can be used only in preamble. \documentclass     Line 2: Can be used only in preamble. \usepackage     Line 4: Can be used only in preamble. \begin{document}          ... (always the same pattern: lines 1, 2, 4)               Line 6: TeX capacity exceeded, sorry [text input levels=50] \import{FirstChapter/}{main}      I think LaTeX tries to include `./main.tex` over and over again. Is that right?


title: Add pdf slides to a lyx document?

text: I want to add the pdf slides into a lyx document. That means: for each page in pdf document insert it to the lyx document and seperate it from other slides. I need it for adding notes to lectures. In Microsoft PowerPoint I can add to each slide notes. I need the same thing in Lyx.


title: Cannot use ampersand as argument in user defined command with optional arguments

text: I'm trying to produce a command for an equation that may or may not be used inside an `align` element, and therefore sometimes needs a `&` next to the `=` to align the equation. I therefore defined the command `\newcommand{\optal}[1][=]{a #1 b}` so that when called as simply `\optal` it outputs the equation, but when called as `\optal[&=]` I can use the equation inside an align. The problem is that for some reason the command fails; it seems one cannot use `&` as a parameter. The problem goes away if I make the argument mandatory (ie, `\newcommand{\optal}[1]{a #1 b}`) Here is the MWE. I'm using Miktex 2.9 and pdflatex.                   \documentclass[a4paper, 12pt]{book}         \usepackage{amssymb}         \usepackage{amsmath}              \begin{document}         % new command         \newcommand{\optal}[1][=]{a #1 b}         %trying it out         $\optal$ \\         $\optal[ \neq ]$ \\         % trying it out inside align         \begin{align}         \optal[=]         \end{align}         %so far, so good         % trying it out with & as parameter         \begin{align}         \optal[&=]         \end{align}         % Fails with "Argument of \\optal has an extra } \end{align}"         % Paragraph ended before \\optal was complete \end{align}         \end{document}      Am I missing something? Can you think of a workaround?


title: space between lines \huge

text: I created a title page for my thesis. I used the code `\huge` for title. But, my title has words with accents. So, the space between first e second line is different than second and third line. ![enter image description here](http://i.stack.imgur.com/GfDaz.png)


title: Moderncv - Centering name and informations

text: I'm using `moderncv` to write my CV but right now, the name is in the top-left of the page, and the information (Age, address, email etc...) in the top- right. Is that possible to align name and information in the top-middle of the page ? I'd like something like this: >   * Full name >   * Adress >   * Phone number >   * email > (Centred). If you could explain me how to do it (I don't know how to use '\renewcommand').


title: Authors and affiliations

text: \documentclass[authoryear]{elsarticle}     \begin{document}     \begin{frontmatter}     \title{A Very Clever Paper Title}          \author[add1]{Author1}     \ead{email1@domain.ca}     \author[add2, add3]{Author2}     \ead{email2@domain.ca}     \author[add2, add3]{Author3}     \ead{email3@domain.ca}               \address[add1]{Department of Redundancy Department}     \address[add2]{Centre for Study of Things}     \address[add3]{Department of Interests}      In the above case, how to merge affiliations for Author2 and Author3 if they are same....


title: indentation of enumerate items inside quotation

text: I have the following LaTeX code:               \documentclass[10pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \begin{document}     This is some text. This is still more text. Here is a few more words.     \begin{quotation}     \begin{enumerate}     \item First item     \item Second item     \item Third item     \end{enumerate}     \end{quotation}     \end{document}      I would like to create the following:               This is some text. This is still more text. Here is a few more words.              1. First item         2. Second item         3. Third item      But instead I end up with this:               This is some text. This is still more text. Here is a few more words.               1. First item      2. Second item      3. Third item      That is, the first item is being more indented than the others. How could this behaviour be changed? I suppose I could use the `enumitem` package, but unfortunately could not figure out how to do it. Thanks in advance for any assistance you can provide. With warmest regards,


title: Formatting back references in bibliography [BibTeX]

text: I'm using the option `pagebackref` in `hyperref` package and I get just the links list at the end of each reference name. It should print something like "Cited on page/s ", but I don't manage it even to do that. My aim is to change some command to make it say that in Spanish, and I found it already considers Spanish in `backref.sty`, which is called by `hyperref`, I think... Reading `hyperref`, `backref`, `backrefx`'s documentation didn't help. Any guess? Related: Formatting back references in bibliography


title: Set [out=up, in=down] as default path segment parameters

text: I'm drawing lots of paths that look like this:               \draw (1) to [out=up, in=down] (2) to [out=up, in=down] (3) to [out=up, in=45] (3);      Can I set the [out=up, in=down] part as a global default, to avoid me having to specify it for every segment? I'll still need to be able to override these defaults occasionally, as with the in=45 segment in the example above. So I want to be able to write something like this:               \setdefaults{out=up, in=down};     \draw (1) to (2) to (3) to [in=45] (4);


title: How to cite bibliography in foot notes using TeXmaker?

text: I would like to cite bibliography in foot notes using TeXmaker and display **ibid** if I have already cite the work. All the solutions I've found use BibLaTeX but actually I don't see the possibility to compile my `.bib`file with BibLaTeX in TeXmaker but only with BibTeX. If I type `tlmgr show biblatex` in the terminal it seems installed why I can't use it with teXmaker?Is there a simple way to use it?


title: File extension .pdf automatically added to link

text: Here's a minimal example:               % File: test.tex     \documentclass[]{article}          \usepackage[pdftex]{hyperref}          \hypersetup{colorlinks=true}          \begin{document}          (1) Rendered as link (red). Normal behaviour.          \href{abc.html}{abc}          (2) Rendered as citation (cyan). File extension .pdf appended.          \href{abc}{abc}          \end{document}      After running pdfLaTeX on this minimal example, the link in (2) is rendered as a citation with a `.pdf` extension appended. Mousing over it shows 'Go to file "doc.pdf"' (when viewed with evince). How can I get it rendered as a link and also get rid of the added `.pdf` extension? I'm using TeXLive 2013 and pdfTeX version is 3.1415926-2.5-1.40.14.


title: How to use fontawesome package with article class, using Sharelatex.com?

text: I'm using the article class, also worth mentioning is that I use Sharelatex.com. I have the compiler set to XeLaTex.               \documentclass{article}     \usepackage{fontspec}     \usepackage{fontawesome}     \begin{document}     \faTwitter     \end{document}      Why is it not working, is it because of Sharelatex? I have also tried to implement this strategy https://coderwall.com/p/r67dyq, but it won't work either.


title: \label does not work

text: am looking help for two things. (1) I would like to write the text as 'In Fig. (1) and in Fig. (2a)', for which the TEX is written as follows:               Shown in Fig. (\ref{fig:main}) and shown in Fig. (\ref{fig:2})'          \begin{figure*}[t]       \centering     \label{fig:main} \caption{main}            \subfloat[ 1]{\label{fig:1}\includegraphics[width=3.5cm]{11}}       \subfloat[ 2]{\label{fig:2}\includegraphics[width=4.1cm]{22}}       \subfloat[ 3]{\label{fig:3}\includegraphics[width=4.1cm]{33}}       \subfloat[ 4]{\label{fig:4}\includegraphics[width=4.1cm]{44}}            \subfloat[ 5]{\label{fig:5}\includegraphics[width=4.1cm]{55}}       \subfloat[ 6]{\label{fig:6}\includegraphics[width=4.1cm]{66}}       \subfloat[ 7]{\label{fig:7}\includegraphics[width=4.1cm]{77}}       \subfloat[ 8]{\label{fig:8}\includegraphics[width=4.1cm]{88}}          \end{figure*}      But the output does not link to **Fig. (2a)**. (2) Also, with this code the captions are above the image, how can we move them below the image, something like this:                   11      22      33      44     (a) 1   (b) 2   (c) 3   (d) 4               Fig. (1) main      where, 11, 22, ...so on are the images. Packages used:               \usepackage{caption}     \usepackage{subcaption}      Any solution? Or Any other way of working on it, where labels for individual images can also be referred? Thank you.


title: Getting no pagebreaks in numbered paragraph mode using eledmac

text: Could someone help with getting no page breaks while typing 4 line-paragraphed texts in `\pstart` and `\pend` paragraph groups in eledmac. I'm typesetting a multilingual critical edition using XeLaTeX (memoir, book, two-sided) and would like each paragraph to be completely contained on a page.


title: A "math font error" I fixed but, don't know what was wrong

text: I was typing my homework and got this error: `! LaTeX Error: \mathfrak allowed only in math mode.` Recently I added some macros to my macro file that gives mathfrak text when used so, I figured I must have used that command without using math mode. I looked around and saw that since I last compiled I had not used that command, so I start commenting out stuff till my document would compile. Anyway long story short it looked like when my document got over a page it would output the error and not compile. I confirmed this by opening a new document (a template I use) that loads my macros file and typed a bit, then made a new page then typed a bit, no math at all, and it would output the same error. I guess the culprit was this command: `\renewcommand{\sl}{\mathfrak{sl}}`. I changed it to `\newcommand{\sla}{\mathfrak{sl}}` and now I can get over a page without an error. I would like to know why it would only output an error after a page. Also it would be cool to know how I could get the `\sl` command I defined without that undesirable behavior. Edit: Here is an example               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{amssymb}     \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\sl}{\mathfrak{sl}}     \begin{document}     P     \end{document}      For some reason this example doesn't need a second page. Also it looks like the error has something to do with `fancy`.


title: Different captions for float and non float figures

text: I use following code for nonfloat figures..               \begin{minipage}[c]{\textwidth}     \centering         \includegraphics[width=3.0in]{myimage.eps}         \captionof{figure}{Caption for image}         \label{fig:sample_figure}     \end{minipage}      I want caption as > Caption for image and for float figures                  \begin{figure}         \includegraphics[width=3.0in]{myimage.eps}         \caption{Caption for image}         \label{fig:sample_figure2}        \end{figure}      Here i want caption as > Figure 1.1 Caption for image How to achieve this?


title: Beamer Template - Disable Margins in Title page

text: I am working on an own latex beamer template. Currently, I try to design the title page using `\defbeamertemplate*{title page}{}`. It should look similar to the other pages going from the top to the bottom:   * headline without any title in it (only a Logo on the right hand side)   * a hrule (in head- and footline I realized this by using tikz)   * a background image with basic information on it (title, author, etc.)   * another hrule   * footline without any information but only another logo again flushed to the right I already got stuck with placing the hrules and the background image. This was my first try:                   \defbeamertemplate*{title page}{my theme}         {         \leavevmode%         \vbox{             \vspace{14ex}             \begin{tikzpicture}                 \draw [] (0,0) -- (\paperwidth, 0);             \end{tikzpicture}             \includegraphics[width=\paperwidth]{pictures/cover}             \begin{tikzpicture}                 \draw [] (0,0) -- (\paperwidth, 0);             \end{tikzpicture}             \vspace{10ex}             }         }      Then I realized that I had a margin on the left as well as another on the top of the page. My question ist now, how can I disable margins for the title page only? Or how would you design a title page as described above? Thanks for your help!


title: How can I include subfiles in to a subfiles?

text: First of all, I am a newbie here and I have no idea to post a query but I have a problem for which I require your help. I even don't know what should be the title of my problem but what my intuition said, I just titled it above. Apologize if I am wrong. Let me tell you my situation first. I am writing a problem book in mathematics. The book (say book.tex) is divided in several chapters (say chapter1, chapter2, ..., chapter 7). Each chapter will have three sections: "Notes" followed by "Exercises" and then "Solution" with not less than 100 pages. I know how to use `\input` or `\include` in a latex document to include multiple files in a single latex document. But while I was doing so, I found that each chapters are much bigger in amount individually and the latex file itself(for the concerned chapter) is getting bigger. I mean to say that suppose I am writing chapter 1. I found even chapter 1 is getting so bigger that the parts "Notes", "Exercise" and "Solution" are making it too complicated. So what the alternative I have chosen is that I am writing chapter 1 as another new latex document (say CH1.tex) using `\input` with NotesCH1.tex, ExercisesCH1.tex and SolutionsCH1.tex Once the document for chapter 1 is finished, I will have to copy-paste busyness in the actual chapter1.tex my book.tex file. Although I am working on this way, but some times its getting too tedious. Because unless the chapters individually are completed, I can't copy them and paste them in the main latex file. Today I came to know about the package `subfiles`. I have read about it. Tried also and found helpful. It helps to include subfiles in to the main files. So what I did, I created book.tex as master file, under it chapter1.tex as subfile using `\include`. But still my problem is not solved. I found that Notes, Exercise and Solution all must be in the same file chapter1.tex Can't I do like this: in the chapter1.tex I use `\include` with Notes.tex, Exercise.tex and Solution.tex and run the master file so that every thing will be compiled together? For the master file Book.tex               \documentclass{book}     \usepackage{subfiles}     \begin{document}     \include{ch1.tex}     \end{document}      For chapter 1               \documentclass[Book.tex]{subfiles}      \begin{document}          \include{NotesCh1.tex}     \include{ExerciseCh1.tex}     \include{Solutions.tex}          \end{document}      For NotesCh1.tex               This is some notes      For ExerciseCh1.tex               Some exercises      For Solutions.tex               The solutions      I tried as much information about my problem to provide. Please help me. If possible please provide me the latex command or procedures how shall I overcome it. If this has been discussed before, at least provide me that link. Thanks in advance for your valuable advise


title: how to align an arrow head to the center of a snaked line

text: I'm trying to generate a snaked line with an arrow head at the end of the line, I can use the following code:               \documentclass[12pt]{article}     \usepackage[margin=1in]{geometry}     \usepackage{tikz}     \usetikzlibrary{snakes}          \begin{document}     \begin{tikzpicture}[decoration=snake] % used for wavy arrows     \draw[>=stealth, ->, snake=snake,segment amplitude = .4mm, segment length = 2mm] (1.5,6.5) -- (0,9.5);     \end{tikzpicture}          \end{document}      However, the placement of the arrowhead does not look correct in the sense that it is not in the center at the end of the line. How can I solve this?


title: Removing a backslash "\" when passing arguments to newcommand

text: Consider the following minimal example:               \documentclass{article}          \usepackage{glossaries}     \makeglossaries          \newcommand{\NewS}[4]{         % Q1: How can I use argument #1 without the backslash in the following line?         \newglossaryentry{symb:#4}{             name=\ensuremath{#2},             description={\nopostdesc #3},              sort=sym#4,         }              % Q2: Why is the space between the '}' necessary?         \def#1{\ensuremath{#2} }      }          \NewS{\power}{P}{the power of something}{power}          \begin{document}         One can refer to the symbol via \power and \gls{symb:power} and.      \end{document}      The two questions I have are already inserted in the example. In particular I am searching for a way to remove the backlash of the string `\power` which I pass as a first argument to the `newcommand` so that I can write something like:               \newglossaryentry{symb:WITHOUT_BACKSLASH(#1)}{      And secondly I don't understand why I have to leave a space between the two braces in the `\def` in order to get "P and" in the output and not "Pand" - which is what I get when I remove the space. If I directly write `\ensuremath{P} and` I don't see any problems so I am just curious. Thanks for your help! Regards


title: Creating a csname from a macro

text: Say I have a macro `\bob` and that macro is passed to another macro as an argument:               \makemacro{\bob}      I want `\makemacro` to create another macro, based on the name of the passed macro, say `\bob@two`. This is easy with etoolbox if I passed a csname (just "bob") and not a macro:               \cslet{#1@two}{...}      but if I'm passed a macro, this of course doesn't work:               \letcs#1@two{...}      I have a feeling there is painfully obvious way of doing this but I can't see it. EDIT: I found an answer here: Removing a backslash "\" when passing arguments to newcommand


title: Warning message: "The marginal notes overrun the paper"

text: \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm,headheight=0cm,headsep=0cm,footskip=0cm}     \pagestyle{empty}     \setlength{\parskip}{0bp}     \setlength{\parindent}{0pt}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{setspace}     \usepackage{babel}     \begin{document}          \end{document}      I've been using TexMaker 4.0.1 since this morning. It keeps giving me this warning message whenever I compile my document. I don't understand the terminology (marginal notes) in the message. I guess this warning is due to the values specified along with the `\geometry` command. However, there is no negative value written there. Also I tried making those zeros ones, but it still gave this same warning. What is the cause of this warning message, and how do I fix it?


title: Titlesec, paragraph title disappears using \titleformat

text: I am using th `titlesec` package to redefine paragraphs (as well as a few minor changes). Essentially, I just want to change the format from bold to italic font. Here's my code:                   \usepackage[compact,             explicit]{titlesec}             \titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries}{}{2pt}{}      While LaTeX compiles just fine, the paragraph title disappears when the `\titleformat{...` command is used. Instead, there is just a blank space. I tried the example command from Standard Classes in the titlesec manual (p. 23):               \titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}       which gives the same error, i.e. the title disappears.


title: l3fp "Number too big" error

text: Consider the following example:               \documentclass{article}          \usepackage{pstricks-add}     \usepackage{expl3}          \ExplSyntaxOn       \cs_new_eq:NN \calc \fp_eval:n     \ExplSyntaxOff          \newcommand*\SideLength[1]{\calc{sqrt(#1)}}     \newcommand*\Angle[1]{\calc{asin(1/sqrt(#1))}}          \begin{document}          \begin{pspicture}(-2.9,-3.5)(4.5,2.2)       \multido{\iA = 2+1, \iB = 1+1}{16}{%         \psRelLine[angle = \Angle{\iA}](0,0)(2,0){\SideLength{\iB}}{A}}     \end{pspicture}          \end{document}      When compiling, I get the error               ! Number too big.     <argument> 7853981633                          974483     l.17 ...ngle{\iA}](0,0)(2,0){\SideLength{\iB}}{A}}      How do I fix this?


title: Algorithm: write if-then-return or else-return in one line?

text: I can easily generate the following algorithm statements using `algorithm2e` package. As can be seen from the image, `return` statement (should hold for other statements too) will be placed in a new line even it is very short. How can I write `if-then-return` or `else-return` in one line? ![enter image description here](http://i.stack.imgur.com/EikS4.png) P.S. the code to generate the above is as follows:               ... ...     \uIf{$\max_{\mathcal{AV}} > \theta_5$}     {         \Return the tracklet with $\max_{\mathcal{AV}}$.     }     \Else     {         \Return no speaker.     }        ... ...      * * * **Update:** After applying @karlkoeller's method (i.e. use `\lIf` and `\lElse` instead), it will generate result as follows: ![enter image description here](http://i.stack.imgur.com/BWOWA.png) You can see that, all are in one-line, is there any way to make the `else`-statement in a new line? * * * **Update2:** I finally make it work by further put `\newline` before `\lElse`. Here is the final code:               ... ...     \lIf{$\max_{\mathcal{AV}} > \theta_5$}     {         \Return the tracklet with $\max_{\mathcal{AV}}$. \newline     }     \lElse     {         \Return no speaker.     }        ... ...      And the final result: ![enter image description here](http://i.stack.imgur.com/6qYYV.png)


title: Format fonts and individual cells in Tables?

text: Is it possible to directly modify the fonts in a table ? For example I have :               \begin{tabular}{ |l|l| }       \hline       \multicolumn{2}{|c|}{Table of Bla } \\       \hline       test & test2 \\       yes  & no    \\       \hline     \end{tabular}      I would like to have the title `Table of Bla` in bold, is that possible ?


title: LaTeX error: missing $

text: I have some math equations within my LaTeX file and I usually denote these with `$` to enter math mode. For longer equations, I will use `\begin{math} ...` but for some reason this is giving me an error telling me I am missing a `$`.               \begin{center}     \begin{math}     \example{ \Delta G = \Delta H - T\Delta S }     \label{1st_ex}     \end{math}     \end{center}      gives me               Missing $ inserted <inserted text> $ l.302 \example {\Delta ....      Even if I insert `$` it still gives me that error. The example function is               %list of equations     \usepackage[titles]{tocloft}     \newcommand{\listexamplename}{List of Equations}     \newlistof{example}{exp}{\listexamplename}     \newcommand{\example}[1]{%     \refstepcounter{example}     \par\noindent\text{Equation \theexample. #1}     \addcontentsline{exp}{example}     {\protect\numberline{\thechapter.\theexample}#1}\par}


title: Is there a way to set character align in the preamble

text: So I haven't been able to find an answer to this and sorry if it's actually simple and I'm kind of an idiot for not finding a solution but I can't find anything in any of the wiki's for the align environment. What I want to know is if there is some sort of preamble declaration that allows me to set a character that the align environment aligns on rather than having to constantly throw in the ampersand. Like if I'm listing equations can I set in the preamble to align everything based on the equals sign?


title: How to undo \usepackage?

text: I would like to use two packages which conflict with each others. I hope I can apply them separately whenever I need and then cancel them so as to solve the problem. Is it possible? For example, I would like the following works:               \documentclass{article}     \usepackage{A}     \begin{document}     ABC     \end{document}          \documentclass{article}     \usepackage{B}     \begin{document}     EFG     \end{document}


title: Splitting a formula

text: What is the best way to split an overlong formula such as the following one to multiple lines:               \documentclass{scrartcl}     \usepackage{amsmath}          \begin{document}          \begin{eqnarray}     P2‘‘ &=&      \begin{pmatrix}     (1-\cos \alpha) \times x\times x + \cos \alpha (1-\cos \alpha) \times  x\times  y -\sin \alpha \times  z  (1-\cos \alpha) \times x\times z +\sin \alpha \times  y \\     (1-\cos \alpha) \times  x\times y + \sin \alpha \times  z (1-\cos \alpha) \times y\times y + \cos \alpha  (1-\cos \alpha) \times y\times z - \sin \alpha \times  x  \\     (1-\cos \alpha) \times  x\times z - \sin \alpha \times  y (1-\cos \alpha) \times y\times z + \sin \alpha \times  x  (1-\cos \alpha) \times z\times z + \cos \alpha        \end{pmatrix} \\      &\times &       \begin{pmatrix}       p2‘_X \\       p2‘_Y \\       p2‘_Z      \end{pmatrix}     \end{eqnarray}          \end{document}      ![long formula](http://i.stack.imgur.com/pIJT6.png)


title: Varying Error Bar Length In Timeplot Graph

text: I have a quick question about the Error Bars functionality in LaTeX, specifically - I am using pgfplots and tikzpicture packages. I was wondering if it is possible to vary the length of the Error bar in each given observation? I am trying to have the length of the error bar gradually increase with each observation. My current data-set is a plot of price through time and I am loading the data-set to LaTeX using a delimited text file. Thanks for your help.


title: Using gnuplot in tikzpicture enviroment using pgf-package

text: I´m trying to use `gnuplot` in the `tikzpicture` enviroment with the `pgf` package. **Example**               \documentclass[paper=a4,12pt,version=last]{scrartcl}     \usepackage[miktex]{gnuplottex}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \pgfplotsset{compat=newest}          \begin{document}     \section{PGFPLOTS}     Note how the tick labels match the document font.          \begin{tikzpicture}     \begin{axis}[domain=-10:10, samples=50, smooth, no markers, enlargelimits=false]     \addplot gnuplot {sin(x)}; \addlegendentry{$\sin(x)$}     \addplot gnuplot {cos(x)}; \addlegendentry{$\cos(x)$}     \end{axis}     \end{tikzpicture}     \end{document}      As you can see I´m using MikTeX. I already changed the options for `pdflatex` from               pdflatex -synctex=1 -interaction=nonstopmode %.tex      to               pdflatex -shell-escape -synctex=1 -interaction=nonstopmode %.tex      as recommended on several websites and by MikTeX itself. But still I get error lines like: > ! Package pgfplots Error: Sorry, the gnuplot-result file 'pgf- > external*data.pgf -plot.table' could not be found. Maybe you need to enable > the shell-escape feat ure? For pdflatex, this is '>> pdflatex -shell- > escape'. You can also invoke '>> gnuplot .gnuplot' manually on the > respective gnuplot file.. See the pgfplots package documentation for > explanation. for both               \addplot gnuplot ...      So here is what I did so far:   1. pdflatex -shell-escape in some variations. (--shell-escape, --enable-write18, -enable-write18)   2. checked the `PATH`. MikTeX and `gnuplot` path exist till the .exe files   3. various other things not so related to the problem Edit: When I try to create a pdf-file with the following code               \documentclass[paper=a4,fontsize=12pt,version=last]{scrartcl}     \usepackage{pgfplots}     \pgfplotsset{compat= newest, width=10cm, }     \begin{document}     \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}[     height=9cm,     width=9cm,     grid=minor,     ]     \addplot gnuplot[id=filesuffix]{(-x**5 - 242)};     \addlegendentry{model}     \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}      the log file gives me > This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit) (preloaded > format=pdflatex 2013.6.4) 21 JUN 2013 21:04 entering extended mode


title: Plotting a function defined with \pgfmathdeclarefunction

text: I've got a few macros that perform floating point lookups and calculations for me and I'm interesting in plotting their results. They're the kind of calculation which requires if/else, so they can't be easily written as a simple math formula for `\addplot`. Thanks to a previous question (Using PGFPlots to plot macro result), I now know to use `\pgfmathdeclarefunction`, but after trying it I've found that `addplot` seems to prepend a "0Y" or "1Y" to values before passing them as function arguments. My external macros aren't prepared to handle this extra text, and I'm not sure why it's there. In the course of testing things out, I've also found that calling a function defined with `pgfmathdeclarefunction` can also change the positioning of the graph...               \documentclass{article}          \usepackage{xparse}          \usepackage{pgfplots}     \pgfplotsset{compat=1.10}          \begin{document}          % Example of a macro which does math outside of pgf         \ExplSyntaxOn         \DeclareExpandableDocumentCommand \doubleMacro { m }%          {%           \fp_eval:n { #1*2 }%Math performed by a package other than pgfplots          }%         \ExplSyntaxOff            %Demo: macro does work in regular text     \doubleMacro{1.1}.          % Defining custom pgf functions for plotting              \pgfmathdeclarefunction{mathDoubleMacro}{1}{%             \pgfmathparse{\doubleMacro{#1}} %Calls macro which performs math done by another package         }              \pgfmathdeclarefunction{mathDoublePgf}{1}{%             \pgfmathparse{#1*2} %Uses pgf to do the same thing as an external macro could         }          %Generic plot with function given directly to \addplot     \begin{center}     \begin{tikzpicture}         \begin{axis}             \addplot[domain=0:1] {2*x};         \end{axis}     \end{tikzpicture}     \end{center}          %Plot using first macro: complains about 'Unknown fp word Y.'     \begin{center}     \begin{tikzpicture}         \begin{axis}             %\addplot[domain=0:1] {mathDoubleMacro(x)};%Commented out because it gives problems         \end{axis}     \end{tikzpicture}     \end{center}          %Plot using second macro: works, but graph is displaced to the right of the expected position     \begin{center}     \begin{tikzpicture}         \begin{axis}             \addplot[domain=0:1] {mathDoublePgf(x)};         \end{axis}     \end{tikzpicture}     \end{center}          \end{document}      If I define `mathDoubleMacro` as calling a non-existent macro, then the errors show which x-values which the `addplot` is trying to evaluate y at:   * 0Y0.0e0    * 1Y4.1666e-2   * 1Y8.3332e-2   * ...    * 1Y9.9998401e-1 What are these nY's all about, and why does `\addplot[domain=0:1] {mathDoublePgf(x)}` give a graph with different positioning?


title: LaTeX problem: The \rightleftarrows symbol is too short

text: The `\rightleftarrows` symbol is too short horizontally for my liking. My search engine finds no helpful results for "latex longrightleftarrows". Is there some way to extend the symbol horizontally?               \documentclass[12pt,letterpaper]{article}     \usepackage[utopia]{mathdesign}     \usepackage{amsmath}     \usepackage{mhchem}     \usepackage{gensymb}      ...     \begin{document}     \ce{\rightleftarrows}     \end{document}


title: how to modify the position caption with subcaption pack?

text: How to vertical modify the caption? ![enter image description here](http://i.stack.imgur.com/hurv6.png) The code is               \documentclass[pstricks,border=12pt]{article}     \usepackage{pstricks,pst-node,pst-blur}     \usepackage{subcaption}     \usepackage[utf8]{inputenc}     \usepackage{eurosym}          \newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue}     \newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink}     \newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green}     \newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur}          \definecolor{azultenue}{RGB}{65,170,193}     \definecolor{rojotenue}{RGB}{192,2,3}     \definecolor{naranjatenue}{RGB}{241,101,35}     \definecolor{verdetenue}{RGB}{144,169,61}     \definecolor{gris135}{RGB}{135,135,135}          \begin{document}          \begin{figure}[h!]     \centering     {               \psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm,nodesep=0.12cm}     %     \def\pscolhookii{\hskip 1cm}     \def\pscolhookiii{\hskip 1cm}     \begin{psmatrix}[rowsep=2.2, colsep=5.2]% defines the distance between two frames      [name=Inicio]       \psframegray(-2.5,-2.5)(2.5,2.5)     %      \rput(0,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p1}{\textcolor{black}{$p_1$}}}     %      \rput(-1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c1}{\textcolor{black}{$c_1$}}}      \rput(-0.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c2}{\textcolor{black}{$c_2$}}}     %      \psdots[dotsize=0.06](0.1,-1)      \psdots[dotsize=0.06](0.4,-1)      \psdots[dotsize=0.06](0.7,-1)     %      \rput(1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{cl}{\textcolor{black}{$c_\lambda$}}}     %      \ncline[arcangle=0]{->}{p1}{c1}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$}}     %      \ncline[arcangle=0]{->}{p1}{c2}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$} }     %      \ncline[arcangle=0]{->}{p1}{cl}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$} }     \rput(0,-1.8){$\bullet$ Crear $\lambda$ mutantes de $p_1$}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     &[name=Conjunto]     \psframegray(-2.5,-2.5)(2.5,2.5)     \pstriangle[fillstyle=solid,fillcolor=gris135,linestyle=dashed,linecolor=red,linewidth=0.06cm,linearc=0.4](0,-1.56)(5.0,4.2)     %      \rput(0,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p1}{\textcolor{black}{$p_1$}}}     %      \rput(-1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c1}{\textcolor{black}{$c_1$}}}      \rput(-0.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c2}{\textcolor{black}{$c_2$}}}     %      \psdots[dotsize=0.06](0.1,-1)      \psdots[dotsize=0.06](0.4,-1)      \psdots[dotsize=0.06](0.7,-1)     %      \rput(1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{cl}{\textcolor{black}{$c_\lambda$}}}          \rput(0,-1.8){$\bullet$ Evaluar Padres e Hijos}     \rput(0,-2.2){$\bullet$ Elegir el más apto del conjunto}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     &[name=EM]     \psframegray(-2.5,-2.5)(2.5,2.5)     %      \rput(0,0){\circlenode[fillstyle=solid,fillcolor=verdetenue]{pnuevo}{\textcolor{black}{\hspace{0.36cm}}}}     %     \rput(0,-1.8){$\bullet$ El individuo elegido}     \rput(0,-2.3){ sustituirá a $p_1$}     \end{psmatrix}     \psset{linewidth=3pt, linecolor=red, arrows=->, nodesep=4pt,  linearc=0.25, angleB=180, shortput=nab, npos = 0.4,nodesep=2.6cm}     \ncline{Inicio}{Conjunto}     \ncline{Conjunto}{EM}          }     \caption{\vspace{4.5cm}Esquema $(1+\lambda)$}\label{1maslambda-ilustracion}     \end{figure}          \end{document}


title: how to draw a cut through a graph in latex

text: I want to draw a cut through the graph, like a line passing through the edges from the `source` to `gamma`, `source` to `alpha` and `source` to `omega`. I am doing that to demonstrate a minimum cut in a network ((Algorithm analysis ))               \begin{tikzpicture}     [scale=.8,auto=left,every node/.style={circle,fill=blue!20}]     \tikzset{vertex/.style = {shape=circle,draw,minimum size=1.5em}}     \tikzset{edge/.style = {->,> = latex'}}            \node (s) at (0,5){source};       \node (v1) at (5,9){alpha};       \node (v4) at (13,9){beta};       \node (v2) at (5,1){omega};       \node (v3) at (6,5){gamma};       \node (v5) at (13,1){theta};       \node (v6) at (16,5){delta};       \node (t) at (20,5){sink};          \tikzset{EdgeStyle/.style={->}}     \Edge[label=$1/1$](s)(v1);     \Edge[label=$4/4$](s)(v2);     \Edge[label=$2/2$](s)(v3);     \Edge[label=$2/2$](v2)(v4);     \Edge[label=$2/2$](v2)(v5);     \Edge[label=$1/1$](v1)(v4);     \Edge[label=$1/1$](v3)(v4);     \Edge[label=$4/4$](v6)(t);     \Edge[label=$1/1$](v5)(t);     \Edge[label=$2/2$](v4)(t);     \Edge[label=$1/4$](v5)(v6);     \Edge[label=$1/1$](v3)(v6);     \Edge[label=$2/2$](v4)(v6);               \end{tikzpicture}


title: LuaLaTeX, fontspec and tracking with microtype

text: I try to get microtype's tracking working but without success: up-to-date TeXlive 2011 (lualatex 0.70.1) with microtype v2.5 beta 07. Sample code:               \documentclass{article}     \usepackage[no-math]{fontspec}     \usepackage[tracking,letterspace=500]{microtype}     \begin{document}\parindent0em          \fontspec[SmallCapsFont={Latin Modern Roman Caps}]{Latin Modern Roman}     \textsc{stealing sheep}          \fontspec{Linux Libertine O}     \textsc{stealing sheep}     \end{document}      Latin Modern works fine (letterspaced small caps) but not Libertine (letterspaced lowercase letters). The only difference between both fonts is that Latin Modern has small caps in a separate file. Any ideas how I could get the same working for Libertine? The following does not work, however:               \fontspec[SmallCapsFont={Linux Libertine O}]{Linux Libertine O}      Nor does:               \fontspec[SmallCapsFont={Linux Libertine O},SmallCapsFeatures={Letters=SmallCaps}]{Linux Libertine O}      Any suggestions are very welcome. Edit: the following does work (with side effects, see below):               \fontspec[Renderer=Basic]{Linux Libertine O}      2nd edit: See related question.


title: How do I edit a cover page for my thesis like this template?

text: I'm trying to dive under this incredible world of non-WYSIWYG. So, for my first main challenge I need to write my master's thesis with LaTeX. And I found some difficulties at the very beginning of my work: the cover page. I need to customize the cover page like this model (it's the mandatory model for our thesis in my university): ![enter image description here](http://i.stack.imgur.com/YaeOz.png) I need the university logo to be within the dotted retangle. I tried to fit it there without success.


title: How to identify and install a specific math & text font?

text: **Remark** : It turned out that text font inside the figures is _not_ DeVinne, _however, since editing this question would deviate from its topics, consider that I'd like DeVinne installed anyway._ * * * Yesterday I was assigned to study an old fashioned 1967 book _"Group Theory for Engineers"_ , and I found a rather intriguing math & text font: > ![enter image description here](http://i.stack.imgur.com/TL1fw.jpg) after some research on how to properly install and use it with `pdflatex` under MiKTeX on Windows 7; I found that the text font belongs to Bitstream DeVinne, available with this "package" on CTAN. The main page on the directory says that the package comes as support: > Font metrics, dvips maps, and macro support in LaTeX2ε, for Bitstream > fonts that were (allegedly) freely available at some time. All the fonts > are listed for purchase on font distribution sites. > > Font families supported are: De Vinne Text, ... so I suspected that if the font itself is not present, then it would be useless to try and install this. But if that is true, why inside the "support" folders there are many `*.tfm`,`*.map` and even `*.fd` files? This question will be generalized later. Nevertheless, I decided proceed: after reading the guide to manual installation I got stuck at the end of the first step, because I didn't know where to put the `.\build` folder. The problem is that I don't really know what it is (at least I recall installing `fontinst`, but again, I don't see the connection) nor what it does to the installation process; so as a result the poor concepts I've learned on the topic became more confused than before. Then again, this whole problem is related _only to the text font_ , because I didn't find any clue on the math font (although I recognized the summation symbol, but I can't yet recall where). Basically, my request can be summed up to this (questions and my ignorant thoughts):   * _I've found a "font support archive", does this mean that I canmanually install and use it? And why on earth is there a "build" TeX file?_ (I think it's a _no_ , because I think I need something else than pure definition files, some kind of "kernel definition", otherwise it wouldn't be called "support"; but it's just my intuition. The second question's solution is unknown to me.)   * _What's this math font? Am I allowed to freely install it?_ I know this might not be appropriate, but I came up with nothing so far. More evidence: > ![enter image description here](http://i.stack.imgur.com/jD5vL.jpg) (It's clear that this couldn't be Computer Modern, the book was published even before TeX was completed.) To summarize some more, **I'd like to make my LaTeX documents look like this book** ; but even if that turns out to be impraticable, I'll be way happier to have my doubts on font installation clarified; since it's a topic that has bothered/intrigued me for a while.


title: Specific nested input

text: I have to compile a long article with the following structure: -Abstract -Contents -Preface -1 article_A (saved in separate folder)   * -1 Introduction (`intro.tex` in folder of A)   * -2 Model (`model.tex` in folder of A)   * -3 Result (`result.tex` in folder of A)   * -4 Reference (BibTeX in folder of A) -2 article_B (saved in separate folder)   *     * (similar structure as A) -3 article C (save in separate folder)   *     * (similar structure as A) -Conclusion Actually, new each article can be compiled individually within their own main.tex. But I want to compile them together without modify internal order but taking into account the modification of page numbers. What I need: Not modify the content of files of A, B, and C; numbers within each article remain the same, don't follow the numbering of articles; table of content shows this structure; at the end of each article there is its own reference (I have BibTeX file in each folder). I have checked a lot of existing documents online, `import` or `subfiles` packages, or `input`+`include` didn't work. Could anyone please help me?


title: date in titlepage

text: So I want to create a titlepage for my document and I would like to print the last date of compilation on it but I can't seem to be able to. I've found people with similar problem but somehow haven't been able to make the solutions work for me. here is my code               \documentclass{article}     \begin{document}     \begin{titlepage}     \begin{center}         \vspace*{1cm}              \Huge         \textbf{Thesis Title}              \vspace{0.5cm}         \LARGE         Thesis Subtitle              \vspace{1.5cm}              \textbf{Author Name}              \vfill              A thesis presented for the degree of\\         Doctor of Philosophy              \vspace{0.8cm}              \Large         Department Name\\         University Name\\         Country\\         \date           \end{center}     \end{titlepage}     \end{document}      I have tried to use the titling package but it prints the date in english and I want it in french.


title: Tikz - Using calculated coordinates inside the plot function

text: I'm wondering if its possible to use calculated coordinates inside the function plot, somehow like this:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc, positioning}               \begin{document}     \begin{tikzpicture}          \node (ea) at (20,10em) {$e_a$};     \draw plot coordinates{($(ea.north east) + (15,12)$) (0,0)};          \end{tikzpicture}     \end{document}      Or if I need to use something like:               \coordinate (test) at ($(ea.north east) + (15,12)$);     \draw plot coordinates{(test) (0,0)};


title: Bibliography not showing

text: citations.bib contains:               @Book{hicks2001,      author    = "von Hicks, III, Michael",      title     = "Design of a Carbon Fiber Composite Grid Structure for the GLAST                   Spacecraft Using a Novel Manufacturing Technique",      publisher = "Stanford Press",      year      =  2001,      address   = "Palo Alto",      edition   = "1st",      isbn      = "0-69-697269-4"     }      The tex file:               \documentclass[a4paper, 11pt, notitlepage]{report}     \usepackage[backend=bibtex]{biblatex}     \addbibresource{citations.bib}     \begin{document}          \nocite{*}     \printbibliography           \end{document}      This command will **not** print the bibliography, although there is no compiling error. What's the problem? I'm using TeXstudio in Windows 8.1. I have tried using XeLatex + Biber, PdfLatex + Biber, PdfLatex + BibTeX. Update: Now, I included               \usepackage[backend=bibtex]{biblatex}      and I got error:               No file untitled.bbl


title: How to change font size in the command window in TexMaker

text: I don't know how to change the font size in the window where I type the TeX commands, in TexMaker. Any help?


title: Instant preview and Vi commands for LaTeX on a Mac?

text: I have Sublime Text 2 and Skim installed along with MacTeX and LaTeXTools on my Macbook. I think this setting is really great, especially because Sublime Text 2 supports Vi commands via the 'Vintage mode'. But in addition to that, I would really like **'instant preview features'** like the gummi LaTeX editor. (An example image of 'instant preview features' here.) I'm willing to give up my current LaTeX working enviroment, if I can have instant previews, that work with a text editor that supports Vi commands on my Mac. (My Mac OS is Mountain Lion.) Does anybody know any tools, apps, or libaries that support such features?


title: How to reescale a pstricks image with subcaption?

text: I have an image and a code, that works well. When I try to scale the PSTRickis image, I have problems-errors How can I resize an image using subcption package?? I put at the end of the code %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \resizebox{11cm}{!}{ and too at the end of the code other %%%%%%%%%%%%%%%%%%%%%%%% } I think that removing the %%%%..%%% in these 2 lines, I should be able to resize the imge, but I have errors. Could you help me?               \documentclass[pstricks,border=12pt]{article}     \usepackage{pstricks,pst-node,pst-blur}     \usepackage{subcaption}     \usepackage[utf8]{inputenc}     \usepackage{eurosym}          \newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue}     \newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink}     \newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green}     \newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur}          \definecolor{azultenue}{RGB}{65,170,193}     \definecolor{rojotenue}{RGB}{192,2,3}     \definecolor{naranjatenue}{RGB}{241,101,35}     \definecolor{verdetenue}{RGB}{144,169,61}     \definecolor{gris135}{RGB}{135,135,135}          \begin{document}          \begin{figure}[h!]     \centering               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \resizebox{11cm}{!}{                  \psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm,nodesep=0.12cm}     %     \def\pscolhookii{\hskip 1cm}     \def\pscolhookiii{\hskip 1cm}     \begin{psmatrix}[rowsep=2.2, colsep=5.2]% defines the distance between two frames      [name=Inicio]       \psframegray(-2.5,-2.5)(2.5,2.5)     %      \rput(0,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p1}{\textcolor{black}{$p_1$}}}     %      \rput(-1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c1}{\textcolor{black}{$c_1$}}}      \rput(-0.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c2}{\textcolor{black}{$c_2$}}}     %      \psdots[dotsize=0.06](0.1,-1)      \psdots[dotsize=0.06](0.4,-1)      \psdots[dotsize=0.06](0.7,-1)     %      \rput(1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{cl}{\textcolor{black}{$c_\lambda$}}}     %      \ncline[arcangle=0]{->}{p1}{c1}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$}}     %      \ncline[arcangle=0]{->}{p1}{c2}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$} }     %      \ncline[arcangle=0]{->}{p1}{cl}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$} }     \rput(0,-1.8){$\bullet$ Crear $\lambda$ mutantes de $p_1$}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     &[name=Conjunto]     \psframegray(-2.5,-2.5)(2.5,2.5)     \pstriangle[fillstyle=solid,fillcolor=gris135,linestyle=dashed,linecolor=red,linewidth=0.06cm,linearc=0.4](0,-1.56)(5.0,4.2)     %      \rput(0,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p1}{\textcolor{black}{$p_1$}}}     %      \rput(-1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c1}{\textcolor{black}{$c_1$}}}      \rput(-0.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c2}{\textcolor{black}{$c_2$}}}     %      \psdots[dotsize=0.06](0.1,-1)      \psdots[dotsize=0.06](0.4,-1)      \psdots[dotsize=0.06](0.7,-1)     %      \rput(1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{cl}{\textcolor{black}{$c_\lambda$}}}          \rput(0,-1.8){$\bullet$ Evaluar Padres e Hijos}     \rput(0,-2.2){$\bullet$ Elegir el más apto del conjunto}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     &[name=EM]     \psframegray(-2.5,-2.5)(2.5,2.5)     %      \rput(0,0){\circlenode[fillstyle=solid,fillcolor=verdetenue]{pnuevo}{\textcolor{black}{\hspace{0.36cm}}}}     %     \rput(0,-1.8){$\bullet$ El individuo elegido}     \rput(0,-2.3){ sustituirá a $p_1$}     \end{psmatrix}     \psset{linewidth=3pt, linecolor=red, arrows=->, nodesep=4pt,  linearc=0.25, angleB=180, shortput=nab, npos = 0.4,nodesep=2.6cm}     \ncline{Inicio}{Conjunto}     \ncline{Conjunto}{EM}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}               \caption{\vspace{4.5cm}Esquema $(1+\lambda)$}\label{1maslambda-ilustracion}     \end{figure}          \end{document}


title: Cross-referencing in multiple chapters

text: I have a document organized into several chapters. In each chapter, theorems are numbered by section (1.1, 1.2, ... even in chapter 5). I often would like to refer to theorems in different chapters. However, if I am in chapter 6 and refer to theorem 1.3 in chapter 1, it is rather ambiguous, and the reader might assume that "theorem 1.3" meant the current chapter. Is there an automatic way of configuring things so that the cross-referencing will say "theorem 1.3" only if it is really the current chapter, but "theorem I.1.3" (or something like that) if the cross-referencing spans chapters?


title: How do I produce an equation of mostly text that is not too long for the page?

text: So what I want is an equation something like the following:               Volume of diluted cell suspension      or number of Petri dishes =      volume of undiluted    X  density of undiluted                                         cell suspension             cells                                                         (all over/divided by)                                                           1.7X10^6 cells/ml      How would I do this in LaTeX? I've tried `\equation` if `\textsl`, as well as `\align` and many other things but I can't get the line breaks in the right place or the line breaks will not appear at all.


title: No room for a new \mathgroup

text: Using `MnSymbol`, `bm` and `pxfonts` together causes > No room for a new \mathgroup MWE:               \documentclass{article}     \usepackage{MnSymbol}     \usepackage{bm}     \usepackage{pxfonts}          \begin{document}     \end{document}      This answer to a similar question suggests using `etex`, but that doesn't help here. The `bm` documentation suggests inserting `\newcommand\hmmax{0}` to cut down on the number of fonts allocated, but again that doesn't help. (Possibly relevant: I only need a few glyphs from each of `MnSymbol`, `pxfonts`, and a few `\bm` glyphs.)


title: Texmaker isn't matching my labels

text: I'm currently editing a latex file together with a colleague. She's uses technixcenter as editor and I use texmaker 4.1.1. My compiler refuses to match the references with the labes when I insert them. Though if she compiles first, the problem doesn't occur. Any of you familiar with this kind of troubles with texmaker? Here's an example of my code               [...] For an example see the appendix \eqref{appendix}.     [...] \section{Appendix} \label{appendix}


title: subfigure counters not resetting

text: My subfigure counter isn't working properly for 2 figures. In the first figure there is an a) and then b) -which is fine, (that I both mark with a begin and end command) but for the second figure, that I also mark with a begin and end command, the subfigure counter doesn't reset back to a), b), c) and d); but it rather jumps to c), d) , e) and f). What is a possible workaround for this problem? I noticed that I used a tabular inside the second figure to insert some figure's, and maybe that messed up the subfigure counter. Any other ideas? Here is the code: *Preamble:               \documentclass[runningheads]{llncs}     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage{amsmath,amssymb} % define this before the line numbering.     \usepackage{ruler}     \usepackage{color}     \usepackage[width=122mm,left=12mm,paperwidth=146mm,height=193mm,top=12mm,paperheight=217mm]{geometry}          \usepackage{verbatim}     \usepackage{color}     %\usepackage{epsfigure}     \usepackage{multirow}     \usepackage[font={small}]{caption}          \usepackage{xspace}     \newcommand*{\eg}{e.g.\@\xspace}     \newcommand*{\ie}{i.e.\@\xspace}     \newcommand{\etal}{\mbox{\emph{et al.\ }}}          \newenvironment{packed_enumerate}{     \begin{enumerate}       \setlength{\itemsep}{0pt}       \setlength{\parskip}{0pt}       \setlength{\parsep}{0pt}     \vspace{-4pt}     }{\end{enumerate}}                    \begin{figure}[!t]     \centering     \subfigure[caption1]{              \includegraphics[scale=0.15,clip=true,draft=false,]{title1.pdf}              %\vspace{-10pt}         \label{fig:relative_graph}     %\vspace{-10pt}     }     \subfigure[Caption2]{     \begin{tabular}{cc|c|c|}     \centering     \cline{2-3}     & \multicolumn{1}{ |c| }{column1} & \multicolumn{1}{ |c| }{column2} \\ \cline{1-3}     \multicolumn{1}{ |c| }{AA} & $65.16\%$ & $66.64\%$  \\ \cline{1-3}     \multicolumn{1}{ |c| }{BB} & $68.60\%$  & $65.56\%$  \\ \cline{1-3}     \multicolumn{1}{ |c| }{CC} & $\mathbf{52.24\%}$ & $65.00\%$ \\ \cline{1-3}     \end{tabular}     \label{table:mambo}     \vspace{-30pt}     }          \vspace{-10pt}     \end{figure}               \begin{figure}[!t]     \setlength{\abovecaptionskip}{-5pt}     \setlength{\belowcaptionskip}{-5pt}     \addtolength{\subfigcapskip}{3pt}          \centering     \begin{tabular}{ccc}     \subfigure[caption1]{\includegraphics[scale=0.17]{img1.jpg}         \label{fig:img_pair_1}} &%&      %\subfigure[B]{\includegraphics{logo.png}} &      \multirow{-4}[2.5]{*}{\subfigure[caption2]{\includegraphics[scale=0.136]{img2.jpg}    \label{fig:img_complete_1}}} &     \multirow{-4}[2.5]{*}{\subfigure[caption3]{\includegraphics[scale=0.136]{img3.jpg}\label{fig:img_complete_2}}} \\     %\subfigure[E]{\includegraphics{logo.png}}% &      \subfigure[caption4]{\includegraphics[scale=0.17]{img4.jpg}         \label{fig:img_pair_2}}\\     \end{tabular}     \vspace{10pt}     \caption[]{     Comments     }     \label{fig:affinity}     \vspace{-10pt}     \end{figure}


title: Why does anyone prefer Metapost?

text: TikZ (together with its PGF backend) is the most widely used picture drawing tool by regulars here, having more than 50x as many questions as for Metapost, alongside a wealth of documentation and user support elsewhere. TikZ is supported by several of the most popular TeX engines, while Metapost has native support only in LuaTeX, needing invocation as a separate program from other platforms. And TikZ uses familiar TeX syntax, not requiring another macro-based language to be learned. Yet Metapost has a band of loyal followers. There are "traditional" reasons for this: Metapost is more "Knuthian", being derived from Knuth's Metafont and by report is Knuth's preferred tool; Metapost is rather older than TikZ, and so some prefer it for reasons of sticking with the better-understood tool. Are there other reasons why users might prefer Metapost to TikZ?


title: Beamer: Exclude TOC from increasing pagecounter

text: I would like to exlude the TOC slide which appear when ever a new 'section' starts to increase the pagecounter, automatically. Furthermore, it would be nice to hide the pagenumber of these TOC slides. An example: Currently its like this: Titlepage ( in the right bottom corner: 1 / 34) new section / TOC (2/34) Content 1 (3/34) new section / TOC (4/34) ... Desired: Titlepage ( in the right bottom corner: 1 / 34) new section / TOC (no pagenumber ) Content 1 (2/34) new section / TOC (no pagenumber ) ...


title: order of multiple keys in \cite-command

text: The `biblatex`-command `\cite{key}` can take several keys, separated by a comma: `\cite{ckey1,akey2,bkey3}`. The output is a list **ordered alphabetically by surname** : `akey2; bkey3; ckey1` (where `key` of course is a bibliographic item). I wonder whether or not it is possible to control this feature, i.e., to decide somehow if the resulting list is ordered alphabetically or if the order of that list is as they appear within the brackets of `\cite`: `ckey1; akey2; bkey3` (which is useful if you want to retain that order or, e.g., want to list several bibliographic items chronologically). (In case it is significant: I use `style=authortitle-icomp`)


title: How to prevent a tex4ht or pdftohtml html document from breaking justification?

text: Text is ragged to the left, hyphenation is off. Furthermore, the lettrine package otherwise perfectly indented types are misaligned as a result. Rules and graphics are in an image of its own. So, for example:                           \documentclass[twocolumn]{scrartcl}            \usepackage[utf8]{inputenc}            \usepackage[T1]{fontenc}                        \usepackage{graphicx}            \usepackage{blindtext}            \usepackage{fancyhdr}            \setlength{\columnsep}{0.7cm}                        \usepackage{lettrine}            \renewcommand{\footrulewidth}{0.4pt}            \title{bla bla}            \date{}            \begin{document}            \maketitle            \fontfamily{ptm}\selectfont                        \begin{figure}            \includegraphics[width=0.45\textwidth]{/Path/to/file}            \end{figure}                        \cfoot{}            \thispagestyle{fancy}\blindtext                        \lettrine[lines=2,slope=2pt,findent=2pt,nindent=3pt,loversize=0.1]{B}{}\blindtext                        \begin{tabular}{ l l l }            \multicolumn{3}{c}{Bla bla bla)} \            \hline            \multicolumn{1}{c}{blo}            & \multicolumn{1}{c}{blu}            \            \cline{1-3}            Test & 18.5 \% \            Test & 17.4 \% \            Test & 17.5 \% \            Test & 13.6 \% \            \hline            \end{tabular}                        \end{document}                                ` Then run in a terminal: `tex4ht [filename.tex]` or `pdftohtml -c [filename.pdf]` that will convert it to html. As a result, the graphics and rules and lines end up as an image file of its own. `(*.png)` The lettrine type is misaligned. and the text of the document, which in this case, had been specified earlier with the `twocolumn` option, is no longer justified. ![enter image description here](http://i.stack.imgur.com/Iz17N.png) ![enter image description here](http://i.stack.imgur.com/G231i.png)


title: Problems with including page references in a citation

text: I'm trying to cite a page reference for reference item ABC:               \cite[p2]{ABC}      However, LaTeX seems to interpret this as me trying to               \cite[      and returns, quite sensibly, the error that there is no reference with the name [. I've been using natbib and cite for quite some time and have never seen this error occur. For reference, I am using the Tufte book environment, but I doubt that has much to do with it. Has anybody else encountered this error, and found solutions? **UPD:** @moewe asked me to prepare a short MWE. Here:               \documentclass{tufte-book}     \title{title}     \author{someone}     \usepackage{natbib}     \usepackage{booktabs}          \begin{document}     \maketitle          \chapter{Chapter title}     \section{Section title}          This is some text.\cite[2]{ABC}          \bibliography{mybiblio}     \bibliographystyle{plain}          \end{document}      And mybibliography.bib is:               @book{ABC,          Title = {Whatever.}}      If I try to do [p2]ABC, I get a 2 in the text stream and only the title in the reference. If I do it in the \marginnote{} environment, I get the aforementioned '[' error.


title: Magnified plot / Vertical Markers

text: I've been trying to use the `spy` library to magnify a part of my plot, but I don't really understand how it works, and I can't find a manual/tutorial anywhere. Right now I am doing something based on this for the magnification part, although not exactly what I was looking for, might do the trick. ![enter image description here](http://i.stack.imgur.com/dKEct.png) However, my question is how exactly do I get the "x 2000" line, along with the second plot?


title: inset plot with pgfplots

text: I am using pgfplots to plot some data I have, and I wanted to generate a large plot with another plot inside of it, showing a zoom on a region of the large plot. I have noticed that when you do               \begin{tikzpicture}      \begin{axis}[width=0.45\textwidth]       %small plot      \end{axis}      \begin{axis}[width=\textwidth]       %large plot      \end{axis}     \end{tikzpicture}      the second plot starts at the same position than the first one. Is there a way to move the origin of the small plot to an empty region of the big one? Or maybe you know a better alternative... thanks


title: How to begin a package (newbie style)

text: I am kinda new in LaTeX, but I'm trying to make a "package" to display abstract _structs_ algorithms in `beamer`. Ex: `\binarytree[]{a->b.c, c->e.f}` and my plan is to make this visual algorithm to `beamer`. Any advices or tutorials are welcome, and the major question, is it possible?


title: Showcase of nice looking headers

text: So I was searching through tex.stackexchange about headers, and I haven't seen this kind of topic. I was thinking of including header in my thesis but I'm still not sure whether to do it or not. Still regardless of my own issues, I was wondering do you guys, here on tex.stackexchange, have any preferred style or custom code to make your headers look nice and shiny :D So if you have, why not boast a bit, and in turn help someone out who might need it in the future :)


title: Going back to the end of the previous paragraph

text: Is there a way to define a TeX command that checks if the current position in the text is at the beginning of a paragraph, and if true, then to go back to the end of the previous paragraph? **Edit:** The aim is to solve the following problem. I have a bunch of files that contain several multiple choice questions, in the following format:               \begin{problem}     ... the statement of the question ...          \choices     \end{problem}      where `\choices` is some command that I defined to display the choices for the answer. The problem is that now I want to have the choices displayed in the last line of the previous paragraph (separated by `\hfill` from the statement of the question) in order to gain some space; instead, now the choices for the answer start a new paragraph. I want to modify `\choices` such that it automatically clears the previous empty line(s), if there is one (or more), so I don't have to do it manually (which would be quite painful).


title: Liberation Mono: The current roman font does not contain the Cyrillic script!

text: Ok, so the problem is next, I use Liberation fonts in my XeLaTeX document:               \setmainfont{Liberation Serif}     \setsansfont{Liberation Sans}     \setmonofont{Liberation Mono}          \setmainlanguage{ukrainian}     \setotherlanguage{english}      And _Liberation Serif_ as well as _Liberation Sans_ work as they should. But when an error > Package polyglossia Error: The current roman font does not contain the > Cyrillic script! Please define \cyrillicfont with \newfontfamily. occurs at the very end of the document where the monospace font appears for the first time as URL. Also my friend has no problems like this on Mac. Is this a problem with Tex-live distribution for Linux, or a problem with _Liberation Mono_ ?


title: Problem with long limits in \lim command

text: When I write a long limit there is a big gap between the limit and the function. How can I fix this? Furthermore is there a way to make the limits smaller so as not to be longer than the limit symbol? Also why is that gap there and that size difference between the length of the symbol and the limit under it? Shouldn't all be under it?               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{unicode-math}     \begin{document}          $\displaystyle \lim_{n\to +\infty}x(n)$          \end{document}      ![enter image description here](http://i.stack.imgur.com/f8JT3.png)


title: Tabular unwanted padding

text: I want my document to be a really long (multiple page) list if definitions. I want to do it in a table format. Here is what I have at the moment:               \documentclass{article}          \usepackage{fancyhdr}     \usepackage{array}     \usepackage{tabularx}     \usepackage{pbox}     \pagestyle{fancyplain}          \title{Definitions \\ \large{G484 - Newtonian World}}     \author{Todd Davies}     \date{\today}          \begin{document}          \rhead{Definitions}     \lhead{\today}          \maketitle          \thispagestyle{empty}          \begin{tabularx}{\textwidth}{>{\bf\centering\arraybackslash}m{1in} | X}       \large{Name} & \large{\textbf{Definition}}\\ \hline       Newton's first law & An object will remain at rest or keep          travelling at a constant velocity unless it is acted upon by an external          force.\\ \hline       Newton's second law & The net force acting on an object is equal         to the rate of change of it's momentum. The net force and change in momentum         are in the same direction.\\ \hline       Newton's third law & When two bodies interact, the forces they         exert on each other are equal and opposite.\\ \hline       Linear momentum & The product of an object's mass and velocity         ($p=mv$). Momentum is a vector quantity.\\ \hline       Net force on a body & Is said to be equal to the rate of change         of the momentum of the body (Impulse).\\ \hline       Impulse of a force & The product of the force ($F$) and the time ($\Delta t$)         for which it acts ($impulse = F \Delta t$).\newline \newline This is the         area under a force time graph.\newline \newline Impulse = change in momentum         ($impulse = \Delta p$)\\ \hline       Principle of conservation of momentum & In a closed system, when bodies         interact, the total momentum in any specified direction remains constant.\\         \hline       Perfectly elastic collision & A collision is perfectly elastic         when kinetic energy is conserved. Momentum and total energy are always         conserved.\\ \hline       Inelastic collision & A collision is inelastic when the kinetic         energy is not conserved, and some is transferred to other forms such as         heat. Momentum and total energy are always conserved.\\ \hline       Radian & $\pi$ radians = $180^\circ$\\ \hline       Gravitational field strength & The gravitational force          experienced by an object per unit mass ($g = \frac{F}{m}$).\\ \hline       Newton's law of gravitation & Any two point masses attract each other with a force that is directly proportional to the square of their masses and inversely proportional to the square of their seperation\\ \hline     \end{tabularx}          \end{document}      This is the output: ![enter image description here](http://i.stack.imgur.com/2Rr4w.png) I have **two problems** :   1. I want the table to span multiple pages. This doesn't seem to be happening   2. Notice the top padding on cells in the right column when the corresponding cell on the left runs onto multiple lines. How do I get rid of this? I suspect that I'm doing the whole thing wrong, and am open to a new suggestion of how I achieve my desired layout or just fixes for these two problems. Many thanks!


title: Problems with right text margin in user-defined beamer class

text: I started to rebuild the cooperate design of my research group (designed in powerpoint) with an own document class based on the beamer package itself. Basically, I managed to get everything transfered, but I've some troubles with the right text margin. Currently, it seems as if my definition of the right text margin is ignored. I used `\setbeamersize{text margin left=15pt, text margin right=15pt}` and whenever I change the left margin I see an effect, but regardless of what I'm defining for the right margin, my frame contents (frame title, block environment, etc.) are running out of the frames :( In addition contents centered with the center environment, are not centered, but shifted a bit to the right. If I use the flushright environment, the content is placed outside the frame, too. I'd be very happy for any advise or idea! **@edit** Thanks for your replies :) I found the problematic line: `\setlength\textwidth{0.9\paperwidth}`, after adding the 0.9 the content is not running out of the page anymore. One question I do still have: Would you suggest me to define rather a style sheet than a document class to provide our cooperate design? Depending on our different working groups the logo is slightly different and needs to be adapted... I thought about using a class- option for the selection of the appropriate logo version.


title: How to use \leftrightarrows

text: Can anybody tell me how to use`\leftrightarrows`? Besides what should I do if I insert text above and below it? Thanks.


title: Can't use \left. ... \right| in a custom environment

text: I'm writing a Hebrew (RTL) document with equations and I compile it with xelatex. The equation numbers are wrong and I have found that placing `\LTR` tag before the equation fix this. I have created an environment that with it but something is amiss. When I try to compile this for example:               \documentclass[11pt]{article}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{hyperref}     \usepackage{xltxtra}      \usepackage{bidi}      \setmainfont{Arial}      \tolerance=1000     \providecommand{\alert}[1]{\textbf{#1}}     \newenvironment{ltreq}[1]{       \LTR       \begin{equation}         {1}}       {\end{equation}       \RTL}          \begin{document}     \RTL          \begin{ltreq}     \left . \frac{\partial f}{\partial y} \eta \right |_{x_1}^{x_2} -\int_{x_1}^{x_2} \frac{\partial f}{\partial y'} \eta dx     \end{ltreq}     \RTL          \end{document}      I get this error:               l.22 ...frac{\partial f}{\partial y} \eta \right |                                                       _{x_1}^{x_2} -\int_{x_1}^{...      I guess that my approach was to naive there. How can I achieve this?


title: tikz decorations.markings cause 'dimension too large'

text: I want to draw a bunch of smooth curves with arrow in the middle. So I have to combine `decoration` and `smooth` options. However, both options result in `dimension too large` error. If I remove `smooth` option, it compiles. On the other hand, inappropriate marking position also causes the same error.               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{calc,decorations.markings}          \begin{document}     \begin{tikzpicture}         \newcommand\arrowcurve[3][]{\addplot[#1,decoration={markings,mark=at position #2 with {\arrow{>}}},postaction={decorate}]   coordinates {#3} }          \begin{axis}[hide x axis, hide y axis]     \foreach \i/\j in {1/1,-1/1,-1/-1,1/-1} {     \foreach \t in {20,35,50,60,70,80} {         \arrowcurve[smooth]{0.4}{({cos(\t)*2*\i},{sin(\t)*2*\j}) ({cos(\t*3/4+22.5)*\i},{sin(\t*3/4+22.5)*\j}) (0,0)};     }     }     \end{axis}     \end{tikzpicture}     \end{document}


title: Spacing Between environment

text: I want to define an environment to detach text from the document. I would like to have one blank line before and after my quote. I defined the following environment:               \newenvironment{myenv}{     \bigskip\noindent\newline     }{\par\bigskip}      But it happens that I need to put two of theses environments, and I get a double blank line. Is there a way to put a definite distance to the last paragraph and not a number of lines?


title: Different justification in cells

text: The following code will center the text in all cells.               \begin{table}         \centering         \small         \caption{my caption}         \label{my label}         \begin{tabular}{| C{5cm} | C{2cm} |}             \hline             Name           &     Age   \\             \hline             First person   &  20  \\             \hline              Second person  &  25  \\                   \hline         \end{tabular}     \end{table*}          So the output is                +-------------------+---------+      |        Name       |   Age   |      +-------------------+---------+      |    First person   |    20   |      +-------------------+---------+      |   Second person   |    25   |      +-------------------+---------+      However I want to center the first row only. Other rows should be left justified                +-------------------+---------+      |        Name       |   Age   |      +-------------------+---------+      | First person      | 20      |      +-------------------+---------+      | Second person     | 25      |      +-------------------+---------+      What is the correct code?


title: htlatex does not seems to like $\mathit{}$ in subscripts

text: When I compilethis MWE:               \documentclass[a4paper,12pt]{article}     \begin{document}     Test $x_\mathit{in}$     \end{document}      ...it works perfectly with `latex` and `pdflatex`. If I try to use `htlatex` on it, it chokes:               ! Argument of \new:mfont has an extra }.     <inserted text>                      \par      l.7 Test $x_\mathit{                         in}$      What am I doing wrong? (BTW: if someone can point me to a comprehensive document about `htlatex`, please do... my google-fu is quite low today). **EDIT** I discovered that if I write:               ...$x_{\mathit{in}}$       (with the extra set of braces) it works. But I am still wondering why... This is standard (distribution-provided) full LaTeX installation in Ubuntu 14.04.


title: newcommand for $\frac{\mathrm{d}^4q}{\left(2\pi\right)^4}$

text: Can you give any hints on how to define a new command that writes               $\frac{\mathrm{d}^4q}{\left(2\pi\right)^4}$      with the options that one can write `$p$` instead of `$q$` (say) and also if one could controll the exponent somehow i.e. the 4?


title: How to put this table in full page

text: could you help me please I want to put this table in full page .Itried without success Thank you               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}      \usepackage[french]{babel}     \usepackage{array}     \usepackage{fancyvrb}     \usepackage{colortbl}      \usepackage{changepage}      \usepackage{lscape}      \usepackage{rotating}          \begin{document}     \begin{sideways}     \begin{adjustwidth}{-4em}{-0.8em}     \scalebox{0.71}{     {\arraystrech{3pt}\arrayrulecolor{v3!20}      \begin{tabular}{|>{\columncolor{gray!10} }*{27}{c|}|}           \rowcolor{gray!10}&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y\\      \rowcolor{gray!10} $i$& âge&sexe&taille&Bac&$Hc_{hab}$&$Hc_{veil}$&décal&$N_{for}$&$N{fat}$ &trav/sem&MoyBac&noteTU&mathsQ1&mathsQ2&mathsTotal&mathsQ1b&mathsQ2b&mathsTb&SpanC&SpanM&motsCo&motsLo&fluP&fluA&fluMoy \\     \rowcolor{gray!10} &&&&&&&&&&&&&&&&&&&&&&&&&\\     \hline      &&&&&&&&&&&&&&&&&&&&&&&&&\\     1& \rowcolor{blue!10}    19&      1&      174&   T&    23&   24&   60&   2&  9&   5&  4& 0&  4&   0&   4&   C&   A&  A&6 &   4&  12& 9  &12    & 15  &13.5    \\      \hline     2&     18&     2&      159&    L& 23.5& 23.75& 15&  3&     3&  20&  12&  10&   6&  4&  10&  D&  C&  C&  7&  4&  14& 10&  17&20 &18.5 \\     \hline     3& \rowcolor{blue!10}20&2&163&S&    23&1&120&1&11&15&15&11&7&5&12&D&C&C&5&5&10&8&13&18&15.5 \\     \hline     4&  22   & 1  &  151     &    L      &  22.5 &22.5  & 0    &  4&0 &10  &  8   &   3 &7     & 0  &7  &D    &A    & B  &  8&  5& 13   &10     &15   &   21 &  18   \\     \hline     5&\rowcolor{blue!10}24&1&190&E&22&22.75&15&4&0&10&8&2&4&0&4&C&A&A&7&5&9&6&13&16&14.5\\     \hline     6&18&2&165&L&22&23&60&2&8&15&11&9&5&4&9&C&C&B&7&4&15&11&12&22&17\\     \hline     7&\rowcolor{blue!10}17&2&157&T&22&22.5&30&3&5&20&9&6&3&3&6&B&B&B&6&5&12&8&12&17&14.5\\     \hline     8&30&2&160&S&22&22.75&45&3&6&5&10&7&7&4&11&D&C&C&8&6&14&10&14&19&16.5\\     \hline     9&\rowcolor{blue!10}19&1&175&S&23&23.25&45&2&9&20&16&14&6&5&11&D&C&C&6&4&11&8&15&20&17.5\\     \hline     10&20&2&176&L&23.25&1&105&1&9&5&4&0&6&0&6&D&A&B&6&4&12&9&13&23&18\\     \hline     11&\rowcolor{blue!10}19&2&160&S&23&0.25&75&1&10&5&8&6&7&0&7&D&A&B&7&5&12&10&16&18&17\\     \hline     12&18&2&162&S&23&24&60&2&8&20&16&15&7&7&14&D&D&C&8&4&15&12&13&19&16\\     \hline     13&\rowcolor{blue!10}17&1&178&L&22.5&23&30&3&4&15&14&12&7&5&12&D&C&C&7&4&13&9&15&24&19.5\\     \hline     14&18&1&185&S&23.5&0.75&75&1&11&15&15&11&6&5&12&D&C&C&7&5&13&10&14&20&17\\     \hline     15&\rowcolor{blue!10}19&2&167&L&23&23.25&15&4&2&10&7&2&6&2&8&D&B&B&6&4&10&6&16&25&20.5\\     \hline     16&18&2&162&T&22.5&23.75&75&2&9&10&6&1&2&1&3&B&A&A&7&5&12&8&12&16&14\\     \hline     17&\rowcolor{blue!10}17&2&160&S&22&22.5&30&3&4&15&10&7&7&3&10&D&B&C&8&6&13&9&15&18&16.5\\     \hline     18&20&1&178&S&23&23.15&10&3&5&20&14&13&6&5&11&D&C&C&7&4&13&10&15&19&17\\     \hline     19&\rowcolor{blue!10}19&1&182&S&22&23&60&2&7&15&10&5&7&2&9&D&B&B&6&5&10&7&16&20&18\\     \hline     20&18&2&166&E&22.5&23.5&60&2&8&5&2&0&6&0&6&D&A&B&6&4&10&7&13&18&15.5\\     \hline     21&\rowcolor{blue!10}19&2&170&L&22&22.75&45&2&8&20&12&9&6&5&11&D&C&C&8&6&15&11&14&20&17\\     \hline     22&20&2&158&T&23&0.5&90&1&10&5&1&0&4&0&4&C&A&A&7&5&12&8&16&15&15.5\\     \hline     23&\rowcolor{blue!10}19&1&172&S&23&24&60&2&9&15&11&7&7&6&13&D&B&C&6&4&12&8&13&18&15.5\\     \hline     24&18&1&190&L&22.5&23.05&60&2&8&20&15&10&5&2&7&C&B&B&5&4&11&8&14&21&17.5\\     \hline     25&\rowcolor{blue!10}19&2&156&L&21&21&0&4&1&5&6&1&6&0&6&D&A&B&7&5&12&9&15&22&18.5\\     \hline     26&20&1&180&L&23&1&120&1&9&15&9&6&6&1&7&D&A&B&7&4&11&7&17&23&20\\     \hline     27&\rowcolor{blue!10}19&2&167&L&23&23.25&45&2&9&15&8&5&7&1&8&D&A&B&8&6&14&10&16&24&20\\     \hline     28&18&1&186&S&22&22.5&30&3&3&20&14&12&7&7&14&D&D&C&7&5&10&7&14&19&16.5\\     \hline     29&\rowcolor{blue!10}26&2&165&L&22.25&22.75&30&3&5&10&11&6&7&2&9&D&B&B&7&4&13&9&13&25&19\\     \hline     30&19&2&168&L&23.5&0.5&60&2&10&15&13&10&6&5&11&D&C&C&5&3&10&6&14&20&17\\     \hline           \end{tabular}}}           \end{adjustwidth}      \end{sideways}     \end{document}


title: Problem with babel and tikz using \draw

text: I'm trying the next code:               \documentclass[pdftex,spanish]{article}     \usepackage{babel}     \usepackage{tikz}          \begin{document}          Simple arrow:           \begin{tikzpicture}         \draw[->] (-1.5,0) -- (1.5,0);     \end{tikzpicture}          \end{document}      but it doesn't work. It throws the errors:   * `! Argument of \language@active@arg> has an extra }.`   * `! Paragraph ended before \language@active@arg> was complete.<to be read again>\par \draw[->]` What can I do if it works right without the babel package?