title: LTXtable does not work in an environment

text: I'm trying to write an environment that gathers the content of an `LTXtable` writes it to an file (with predefined header/footer) and then txpesets this table. Gathering the content is no Problem and I can manually typeset the table using the `\LTXtable` command. But I'm not ably to get `\LTXtable` command to work inside my environment definition. Here is a minimal example showing the problem:               \documentclass{scrartcl}          \usepackage{ltxtable}     \usepackage{filecontents}          \parindent=0pt     \parskip=2.5em          \makeatletter          \newcounter{LTXTableNum}     \newlength{\@LTXTable@width}     \newenvironment{myLTXTable}[4]{%       \stepcounter{LTXTableNum}%       \global\setlength{\@LTXTable@width}{#1}%       \global\edef\@LTXTable@file{myLTXTable\theLTXTableNum.tex}%       \filecontents{\@LTXTable@file}%       \immediate\write\reserved@c{\unexpanded{\begin{longtable}{#2}}}%       \immediate\write\reserved@c{\unexpanded{\caption{#4}}}%       \immediate\write\reserved@c{\unexpanded{\label{#3}\\}}%     }{%       \immediate\write\reserved@c{\unexpanded{\end{longtable}}}%       \endfilecontents%     %  \LTXtable{\@LTXTable@width}{\@LTXTable@file} % Missing number, Missing \endcsname, ...     %  \LTXtable{\the\@LTXTable@width}{\@LTXTable@file} % Missing number, Missing \endcsname, ...     %  \noexpand\LTXtable{\@LTXTable@width}{\@LTXTable@file} % => Missing number treated as zero.       \noexpand\LTXtable{\the\@LTXTable@width}{\@LTXTable@file} % Is compiling, but does not typeset the table. The arguments are printed instead     }          \begin{document}     This should print the table:     \begin{myLTXTable}{0.75\textwidth}{|>{\bfseries}r|l|X|}{tbl:table}{A Table}       \hline       1 & a & b \\\hline     \end{myLTXTable}     But it doesn't.          Calling LTXtable manually works fine:     \LTXtable{\linewidth}{myLTXTable1.tex} % works          It also works with manually generated filename:     \LTXtable{\linewidth}{myLTXTable\theLTXTableNum.tex} % works          And it works when we use the filename generated by the environment:     \LTXtable{\linewidth}{\@LTXTable@file} % works          And the length provided to the environment may also be used:     \LTXtable{\@LTXTable@width}{\@LTXTable@file} % works     \end{document}      Anyone an idea how to fix this?


title: Space before referencing an equation

text: when I label an equation in the `equation` environment and refer to it via `\ref{eq1}` and when I write in the text                Eq. \ref{eq1}      there is a one more white space between `Eq.` and the reference.


title: Creating "solution" sectioning - page break problem

text: I want to create my own sectioning, which counts and displays solutions to the problems, e.g. **1.1 Kinematics** 1.1 Solution to problem 1.1 1.2 Solution to problem 1.2 1.3 Solution to problem 1.3 **1.2 Dynamics** 1.4 Solution to problem 1.4 Since creating new sectioning is complicated, I tried (on advice from David Carlisle) to "borrow" from `subsections` in the following way:               \newcounter{solution}[chapter]     \renewcommand{\thesolution}{\thechapter.\arabic{solution}}          \newcommand{\solution}{\refstepcounter{solution}\subsection*{\thesolution}}      This works fine, but I cannot independently control the format of `\subsection` and "`\solution`" Perhaps the best way would be to create some sectioning _parallel_ to `\subsection`. Is that possible to do in KOMA?


title: Hyperref with pagebackref requires manual escaping of percentage signs in URLs

text: URLs in bibliography items with a `%20` (to represent a space) work fine with the package `hyperref` as long as the option `pagebackref` is not used. If it is used, Latex fails with:               xxx.bbl:xx: Paragraph ended before \BR@@bibitem was complete,      ie, the percentage sign is not automatically escaped and thus the URL field is not properly terminated. Escaping it in the .bib file with a backslash solves the issue but requires manual work every time I generate a new .bib file. Is there another way to solve this problem? MWE:               \RequirePackage{filecontents}     \begin{filecontents}{\jobname.bib}     @MISC{refID,       title="title",       url = {http://www.somesite.com/8%20report}       }     \end{filecontents}     \documentclass{article}     \usepackage[pagebackref=true]{hyperref}     \begin{document}     \cite{refID}     \bibliography{\jobname}     \bibliographystyle{IEEEtran}      \end{document}


title: Beamer error - no output file

text: I am making a beamer file. While there's nothing in math mode, everything runs perfectly well, however, when sentences like               $P_A\subseteq E_X$      is inserted, it cannot output a `.pdf` file, but its ok with only `$\subseteq$`. I don't know what went wrong.


title: Get full name twice in Bibliography

text: I use `biblatex` with `style=authoryear` and when there are two references of the same author in the bibliography there is just a dash. How can I get the full name in the second entry too?


title: Biblatex: 1) changing separator, 2) repeating author

text: (La)TeX newbie here. I'm writing my philosophy thesis in LyX. Loving it so far but trying to hack myself around the limitations of BibTex has been exhausting. Now – finally – I've gotten Biblatex to work in LyX - what a huge relieve! With babel it beautifully renders everything in the bibliography in to my language. I just have two issues that I hope are easier to resolve now that I'm using Biblatex I'm using the author-year style with this in my preamble:               \usepackage[style=authoryear,natbib=true,backend=bibtex8]{biblatex}      **1. I would like to separate year and cited page with colon instead of comma:** This: > Wittgenstein 1961: §4.003, 36 Instead of this: > Wittgenstein 1961, §4.003, 36 **2. I would like to have the name of an author with multiple works repeated:** This: > Wittgenstein, Ludwig (1961). Tractatus Logico Philosophicus. Routledge & > Kegan Paul. Wittgenstein, Ludwig (2010). Philosophical Investigations. en. > John Wiley & Sons. Instead of this: > Wittgenstein, Ludwig (1961). Tractatus Logico Philosophicus. Routledge & > Kegan Paul.   >  – (2010). Philosophical Investigations. en. John Wiley & Sons. Your help is much appreciated. I'm hoping that I soon will be able to spend more time on actually writing my thesis than familiarizing myself with TeX :)


title: How to specify an entry for a book where no author is given

text: I'm using `biblatex`. I want to store an entry in my `.bib` file that has the following semantics:   * It refers to a book as a whole   * The book contains articles from different authors   * The book itself has no author   * For citing, the editor is named   * It has to be distinguishable when citing, since the editor is stated with an added '(Hg.)' (That's German abbrevation for _'Herausgeber'_ which would be editor) instead of the author. How do I do this?


title: hyperref is pointing always the first page

text: I am typing my thesis in latex. I used hyperref. Two papers are in the bibliography. Paper no 1 is cited in the first page and paper no 2 is cited in the 2nd page. When I am clicking the red coloured number below the paper number 1 in the bibliography it is pointing wrongly to the title page of the document. But there is NO PROBLEM with paper no 2. Please help me. I want the paper number 1 to point the correct page. Also in my document, I don't want "Chapter 0, Synopsis". I want only "Synopsis" i.e. no mention of chapter 0 mark. This I want only for this chapter not in the later chapters. I also want synopsis to occur in the content of the document. Please help me to figure out this. I am attaching my tex code below.               \documentclass[12pt, reqno, a4paper]{book}          \usepackage{fancyhdr}%, setspace}                    \usepackage[pagebackref]{hyperref}     \hypersetup{          colorlinks = true, linkcolor = red,          citecolor   = blue,          urlcolor    = blue,     }                              \begin{document}               \begin{titlepage}     \begin{center}     {\bf Title page}     \end{center}      \end{titlepage}                         \pagestyle{plain}     \pagenumbering{roman}     \addtocounter{page}{1}           %\thispagestyle{empty}          $\textnormal{ }$     \vspace{9cm}      \begin{center}     {\bf \Large{To my Parents}}     \end{center}                                             {\Large     \tableofcontents}                         \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}     \renewcommand{\headrulewidth}{0.1pt}     \renewcommand{\footrulewidth}{0.1pt}     \fancyhf{}     \fancyhead[LE,RO]{\bfseries\thepage}     \fancyhead[LO]{\bfseries\rightmark}      \fancyhead[RE]{\bfseries\leftmark}     \lfoot{Anjan Gupta, TIFR, Mumbai.}                         \pagenumbering{arabic}     \setcounter{chapter}{-1}  % to start Chapter numbers from 0          \chapter{synopsis}     \setcounter{page}{1}     In \cite[Theorem 4.1]{cr} it is shown that this is indeed true in the absolute case.          \newpage          we shall now use the result \cite{sfmaa}          \begin{thebibliography}{VAST}          \bibitem{cr} Paper 1.          \bibitem{sfmaa} Paper 2.          \end{thebibliography}          \end{document}


title: Change ordering of initials in biblatex style

text: I'm not very experienced with `biblatex`, but I hope that the answer to this question will be relatively simple. I'm using the `authoryear` style, and my references in the reference list appear like the following: > Wilson, R. T. and E. J. Milton (2010). Automated Selection of Suitable > Atmospheric Correction Sites. In: Remote Sensing and Photogrammetry Society > Annual Conference, September 2010, Cork, Ireland. This looks great, apart from the fact that the first author and the second author have their initials in a different order. For the first author it is `Surname, Initials` and the second author is `Initials, Surname`. So, my question is threefold: Is there a simple option to change this? If not, can I simply modify the `.bbx` file to change this? If not, is there another `biblatex` style already available that does this without changing the rest of the reference style too much?


title: Biblatex / Biber.exe not displaying unicode characters in reference

text: I'm using Xelatex with biblatex and the biber.exe backend:               \documentclass{article}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{polyglossia}     \setmainlanguage{english}     \defaultfontfeatures{Scale=MatchLowercase}     \setmainfont{Sabon LT}     \setsansfont{Syntax LT}     \setmonofont{Courier New}      \usepackage{csquotes}     \usepackage[bibstyle=nature, citestyle=numeric-comp, sorting=none,backend=biber]{biblatex}%this style compresses the numbering      \bibliography{cluster.bib}          \begin{document}     some text     some unicode text áâäæèê\\     some unicode text: Parenicovà          áâäæèê with an unicode reference \autocite{Parenicova2000a}\\     unicode reference two Jørgensen \autocite{Joergensen2009}\\     Reference without unicode \autocite{Wu2004}     \printbibliography     \end{document}      Unicode characters are displayed correctly in the text body, however in the reference list the unicode characters are omitted (see attached image) This is not a problem related to my .bib library, I encod my library in UTF-8 (UTF-16 tested too, no difference) when I use normal pdflatex and biblatex characters are displayed normally. I think the error is related to biber.exe in combination with my Windows Vista, the following error is displayed when I run biber.exe on the .bcf file manually:               F:\LaTeX\xetex_testing>biber.exe testB.bcf     Could not find or check module 'IPC::Run' [THIS MAY BE A PROBLEM!] at IPC/Cmd.pm      line 125     Already tried to use 'IO::Select', which was unsuccessful [THIS MAY BE A PROBLEM     !] at IPC/Cmd.pm line 154     INFO - Logfile is 'testB.blg'     INFO - Found 'testB.bcf'     INFO - Reading testB.bcf     WARN - Warning: You are using biblatex version 1.0 :     biber is more likely to work with version 0.9e.     INFO - Found 3 citekeys in bib section 0     INFO - Processing bib section 0     INFO - Found 'cluster.bib'     INFO - Processing file 'cluster.bib' for section 0     INFO - Decoding LaTeX character macros into UTF-8     Unicode::Collate: Can't locate Unicode\Collate\allkeys.txt in @INC (@INC contain     s: C:\Users\Tim\AppData\Local\Temp\par-Tim\cache-ef9b516290b60f6dc5518a4b5db3004     32676b908\inc\lib C:\Users\Tim\AppData\Local\Temp\par-Tim\cache-ef9b516290b60f6d     c5518a4b5db300432676b908\inc CODE(0x2cc0b14) CODE(0x2cc0e14)) at Biber.pm line 1     403      So is this specifically a biber related error, or am I doing something wrong? All help is much appreciated. ![alt text](http://i.stack.imgur.com/saZBF.png) * * * ## Solution Althought my bib file was showing all unicode characters properly in my reference program (jabref) the encoding of the bib file seemed to be the problem (apparently jabref saved it as Cp1252?) After converting the bib file with an external text editor to UTF8, Everything works perfectly!


title: Is there are way to annotate pdfs with LaTeX?

text: > **Possible Duplicate:**   >  How to annotate PDF files generated by pdflatex? Is there a way to annotate pdfs with LaTeX annotations? I mean a pdf that I do not have the source code for (or may not have even been written in LaTeX itself, for that matter). The motivation behind my question is that I would really like to annotate my lecture notes digitally to stop me losing important notes, but the lecturer does not like the idea of releasing the source code to his notes to students. (i.e. I don't think asking for the source code went down well and I would like to not feel the need to ask another lecturer the same question if I can avoid it :-)) I could try to type them out myself but when time is limited it would be ambitious at best, to try it when there are more urgent work I need to prioritise. I use linux, my pdf viewer is okular and it mainly for maths/physics type work if that is useful information to add. It would be handy to be able to do it one way or another so I am open to any suggestions that might help out!


title: "Invalid Equation" on codecogs.com/latex/eqneditor.php but It's ok on stackedit.io

text: I have this equation in latex:               \{\Theta, \{\phi, \psi \}\} + \{\phi, \{\psi,\Theta \}\} + \{\psi, \{\Theta, \phi\}\} = 0      and codecogs.com/latex/eqneditor.php show me "Invalid Equation": ![enter image description here](http://i.stack.imgur.com/NEMxt.png) but stackedit.io/ is ok: ![enter image description here](http://i.stack.imgur.com/jBBbz.png) Because codecogs.com/latex/eqneditor.php doesn't work?


title: Using \multicolumn with beamer inside an overlay command

text: I'd like to have a conditional `\multicolumn` command depending on the slide, so I put it inside an alt or an only command, as follows:               \documentclass{beamer}     \usepackage[latin1]{inputenc}     \begin{document}     \begin{frame}     \begin{equation*}       \begin{array}{rlll}       a&b&c&d\\       A&\multicolumn{3}{l}{BCD}\\ %this is OK        A&B&C&D\\ %as is this obviously...       A&\only<-+>{\multicolumn{3}{l}{BCD}}\only<.->{B&C&D}\\ %but this       A&\alt<-+>{\multicolumn{3}{l}{BCD}}{B&C&D}\\% and this do not compile       A&\multicolumn{3}{l}{\only<-+>{BCD}\only<+->{\begin{tabular}{lll}B&C&D\\\end{tabular}}} %this line works, but, of course, gives the wrong alignment...     \end{array}     \end{equation*}     \end{frame}     \end{document}      The problem seems to be that LaTeX wants the `\multicolumn` command to appear as the first thing after an & or a newline...but then, as the last line shows, I don't know how to align with the other columns... Currently I'm solving the problem using `\hspace*` but this is a bit of a ugly hack. Any ideas on how I could get this to work properly??


title: texdiff for multi-file documents in subversion

text: I've been looking for a convenient way to highlight changes between subversion revisions of my Latex document in the generated PDF. I am working on a reasonably complex document that pulls together various .tex files. By virtue of using multiple `\input{}`s, _latexdiff-svn_ doesn't seem to offer a solution. _texdiff_ , despite being more amenable to multi-file documents, unfortunately doesn't have the necessary magic in place to handle SVN diffs. I have hacked together a solution which works for me, but I'm wondering if there's something more coherent that I've missed. My solution is a fairly short script which does the following:   1. Given a revision number, ask SVN for all the files that have changed between then and HEAD.   2. Export only those files to a temporary location, and run _texdiff_ between the exported copy and the working copy.   3. Build another temporary directory, which stores either the output from _texdiff_ or, if no changes were made, a copy of the working copy. The directory contains all the .tex files I need to build my document. A little _sed_ ensures all `\input{}` commands point to the correct (i.e., temporary) location. This does the trick! But, a solution that hooks directly into _svn diff_ would be much neater. I played around earlier with svn wdiff and tried to hook it directly into _texdiff_ , but I gave up on it when I realised I was breaking all the nice bracket matching that _texdiff_ does. My searches have otherwise proved fruitless. Although I'm happy with my solution, does anyone know a neater way to achieve what I want?


title: Several symbols -- check with box etc.

text: I have several symbols I don't know how to make. I have already gone to http://detexify.kirelabs.org/classify.html to try to get answers, but I failed. Please help me. ![](http://i.stack.imgur.com/SJvOA.jpg) ☑☒ For the check with a box around, I use the following code, but it doesn't look as nice as the above one.               \fbox{$\surd$}


title: Displaying normal size symbols in formula

text: How can I make the following part of code:               \sum_{i=1}^n \sum_{j=1}^n w_{ij}      in normal size and not in subscript size?               \documentclass[a4paper]{article}     \usepackage[english]{babel}          \begin{document}          \begin{equation}     I = \frac{n}{\sum_{i=1}^n \sum_{j=1}^n w_{ij}}     \frac{\displaystyle\sum_{i=1}^n \sum_{j=1}^n w_{ij}(x_i - \bar{x})(x_j -       \bar{x})}{\displaystyle\sum_{i=1}^n (x_i - \bar{x})^2}     \end{equation}          \end{document}


title: How does one fetch the arguments of \title and \author?

text: When using the simple `\maketitle` command, one can use `\title`, `\author`, `\date` etc to define the corresponding contents. Now if one desires to for example make a custom title page, how can this information then be retrieved? MWE:               \documentclass{report}     \title{My report}     \author{Me \and Myself}     \date{\today}     \begin{document}     \begin{titlepage}     %\thetitle?     %\theauthor?     %\thedate?     \end{titlepage}     Hello world!     \end{document}


title: How to put \title in the header?

text: I am just starting with TeX so please be tolerant for my lack of knowledge. I am using `fancyhdr` for footers and headers and I would like to put the title from `\title` into `\fancyhead{}` How can I do it ? My code :               %usepackages and all sorts of stuff     %...          % ------     % Header/footer     \usepackage{fancyhdr}         \pagestyle{fancy}         \fancyhead{}         \fancyfoot{}         \fancyhead[C]{\title}         \fancyfoot[C]{\thepage}               % ------     % Clickable URLs (optional)     \usepackage{hyperref}          % ------     % Maketitle metadata     \title{\vspace{-15mm}%         \fontsize{24pt}{10pt}\selectfont         \textbf{Android}         }        \author{%         \large         \textsc{Patryk} \\[2mm]         \normalsize University\\         \vspace{-9mm}         }     \date{\today}                    %%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}          \maketitle     \thispagestyle{fancy}          % ...     % ...


title: Access title and author in custom class

text: > **Possible Duplicate:**   >  Use the values of \title, \author and \date on a custom title page How can I access the title and author in my custom class based on article, so that I can insert them in the footer that I automatically set up? I tried `\@title` and `\@author` but nothing shows up.


title: Fundamental Physical Constants in SI Units with siunitx

text: I would like to write e.g. the Bohr magneton in SI units without writing yJ/T and the nuclear magneton (the following code is inconsistent with `siunitx`-notation: `$\mu_\text{N}\approx \SI{5\times 10^{-27}}{\joule\per\tesla}$`), for which exists no SI prefix. The following MWE provides correct working example (for Bohr magneton):               \documentclass{article}     \usepackage{siunitx}     \begin{document}       Bohr magneton ($\mu_\text{B}\approx \SI{9.27400968}{\yocto\joule\per\tesla}$) and       nuclear magneton ($\mu_\text{B}\approx {5.05078353\times 10^{-27}}~JT^{-1}$)     \end{document}      How can I write the nuclear magneton in the such a SI-form?


title: TikZ: lineto to a just created node

text: Often, when drawing diagrams with TikZ, I’d like link nodes by edges just as I draw them. But when doing it the naive way, e.g.               \draw (0,0) node {A} -- (1,0) node {B};      the line intersects with the node labels. I get the desired result by drawing the edge after the nodes:               \path (0,0) node (A) {A} (1,0) node (B) {B};     \draw (A) -- (B);      But for that, I have to hand out names to the nodes. Is it possible to obtain that result in one `\draw` command, without using names? Preferably a solution less involved than the chain library.


title: How change font family in algorithmic package

text: Is there any way to set a specific font family for algortihm environment, especially for the comment that placed inside it?


title: How do I set the document body to be Times New Roman and Section headings to be Arial?

text: > **Possible Duplicate:**   >  Change section fonts for a University Assignment I have been given some 'House Style' rules which must be adhered for all the documentation. These are: **Main Text Body:** Times New Roman, 12pt **Heading 1:** Arial, 16pt **Heading 2:** Arial, 14pt **Heading 3:** Arial, 12pt I know that I need to use XeLaTeX in order to use system fonts, however, no matter what I try, I cannot get the document to display correctly. Any idea on how I would implement this is Tex?


title: TikZ manual example won't compile

text: I tried the following example from the `pgfmanual`, but it creates an error. MWE:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{angles}     \usetikzlibrary{calc}     \pagestyle{empty}     \begin{document}          \tikz        \draw (2,0) coordinate (A) --              (0,0) coordinate (B) --              (1,1) coordinate (C)             pic ["$\alpha$", draw, ->] {angle};          \end{document}      Error:               ! Missing \endcsname inserted.     <to be read again>                         \alpha      l.10 pic ["$\alpha$", draw, ->]                                     {angle};     ?


title: An equation tag which goes over two lines

text: I would like to make an 2-line equation tag, for a single equation. I am using the \tag command, and it works as long as I don't store a label for the equation. The moment I store a label, LaTeX barfs at me. In other words this code fails:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{equation}     \label{mylabel}     \tag{\parbox[c][3em][c]{4em}{1st tag \\ 2nd tag}}     x = y^2     \end{equation}     \end{document}      But this code works:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{equation}     %\label{mylabel}     \tag{\parbox[c][3em][c]{4em}{1st tag \\ 2nd tag}}     x = y^2     \end{equation}     \end{document}      Any ideas?


title: One verbatim column in pgfplotstable and a non-verbatim header

text: I wanted to create a `pgfplotstable` in which one column would be treated as verbatim. I first tried to straightforwardly use `\verb` but I almost expected this to fail spectacularly and it did. I found Multicolumn verbatim but it was a different problem. The best solution I found myself was to use `\lstinline` and `collcell`. The next big problem now was how to get the header back to normal since the cell content was verbatim after all. I ran into a lot of other smaller problems with this table and I'm convinced there is a better solution than what I found, so I wanted to share this hoping it might help others and also to see if someone has a better solution. So if you know a more elegant way to have a verbatim column with a non- verbatim header in `pgfplotstable`, I'll gladly accept it.


title: biblatex: DOI for just one citation

text: I want to have the DOI field explicitly printed for just one (or two) citations (`\fullfootcite` in my case). For the rest of the document, I use the `doi=false` option of biblatex combined with a DOI link included in the title of the reference. The other questions about per citation options found here and here are only concerned with modifying the number of printed author names.


title: Create squared sphere with Asymptote

text: I want to create a sphere with a grid on it using Asymptote. I have been able to create a sphere with horizontal lines, but I can't find how to make vertical lines. Here's my code so far:               \documentclass[12pt]{article}     \usepackage{asymptote}          \begin{document}     \begin{figure}     \begin{asy}     //import three;     import solids;     unitsize(2.5inch);     //size(5inch);          settings.render=0;     settings.prc=false;          currentprojection=orthographic(3, 1, 1);     currentlight=nolight;          real RE=0.6, RS=0.7, inc=100, lat=45, lon=45, tlat=50, tlon=100;               revolution Earth=sphere(O, RE, n=4*nslice);     draw(surface(Earth), lightgrey+opacity(.4));     draw(Earth,m=10,gray);          \end{asy}     \end{figure}     \end{document}      How can I add vertical lines?


title: align inside of tabular

text: Today I failed using an `align`-environment inside of a `tabular`-environment. Consider the following example:               \documentclass[12pt]{scrbook}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{amsmath}          \begin{document}          \begin{tabular}{ll}           A & B \\%           & %     \begin{align}         A &= B \\         C &= D     \end{align}%           \\%         \end{tabular}%          \end{document}      When I try this I'll get an error claiming: "Argument of \align has an extra }." and "Paragraph ended before \align was complete." and much more. When I enclose everything in paraphrases (like `{\begin{align}.....\end{align}}`) I'll get some other errors: "Missing \endgroup inserted." and multiple "Missing } inserted." **How can I use the`align`-environment properly inside of a table?**


title: Executive Summary

text: I want to present an executive summary of a project I'm working on to my company and boss, i.e., I want to deliver a couple of pages that do not look like an article, but at the same time look nice and do not look like a high- school paper. Are there any special templates for this? I know there are A LOT of templates for academia work (I have even contribute to them), but I want something more... "professional" let's say and less "scholar". Some examples that seem interesting: This one This two This three


title: Tabstop and line wrap inside itemize

text: What I am trying to achieve:               some list:     - some text     - Def.:  Some long text which should both automatically wrap to a new line              and be tabbed as displayed here.     - some sublist       * with the new counter       * Def.:  same as above, but note that the counter matches the list level      This answer comes closest, but if used _inside_ some other list, the counter (I mean the bullet point symbol) doesn't match, and the spacing before/after is larger. Also, I do not need the tabbing to work across multiple bullet points (as opposed to the original question), which might simplify things. I hope my question is clear. Please let me know if not! It's not that I'm too lazy for a MWE, I just couldn't get anywhere close to what I want (other than a simple `itemize`). Thanks! (Just to clarify: I do not want to specify any bullet point styles myself, it's just that they change with increasing list levels.)


title: The size of roots

text: I can't get to the root of this problem: I need the second root to be the same height as the first one               $\sqrt{F} \: \sqrt{F_{x_x}}$      I know I can use `\vphantom`, but I don't know how.


title: How to resize font size of a column in a table?

text: I have this kind of table ![enter image description here](http://i.stack.imgur.com/gatOs.png) where I would like to make the titles in normal size and all stuff under them in smaller font. How can I do it easily without copy-pasting `\scalebox{0.7}{...}`? **Code**               \begin{tabular}{| l | c | c | c | c | c | c | c |}         \hline         Mlf             & A & $\text{A}_s$     & MM & $\text{MM}_s$ & Lower bounds & Upper bounds & Output\\         \hline         \scalebox{0.7}{$p_3p_1-p_3p_2$} & 3&3 & 3&3 & \scalebox{0.7}{$[1,0,0.2]$}  & \scalebox{0.7}{$[1,0.5,0.5]$} & 1\\         \scalebox{0.7}{$-p_3p_1+p_3p_2$}    & 3&3 & 4&3 & \scalebox{0.7}{$[1,0,0.2]$}  & \scalebox{0.7}{$[1,0.5,0.5]$} & 0\\             \scalebox{0.7}{$p_3p_1-p_3p_2$} & 12&11 & 25&11 & \scalebox{0.7}{$[0.01,0.01,0.01]$}  & \scalebox{0.7}{$[0.03,0.03,0.03]$} & 0\\         \scalebox{0.7}{$p_3p_1-p_3p_2$} & 6&5     & 6&5     &  \scalebox{0.7}{$[0.01,0.01,0.02]$}  & \scalebox{0.7}{$[0.03,0.03,0.02]$} & 0\\            \scalebox{0.7}{$p_3p_1-p_3p_2$} & 16&7    & 16&7    &  \scalebox{0.7}{$[0.02,0.01,0.01]$}  & \scalebox{0.7}{$[0.02,0.03,0.03]$} & 0 \\         %\hline         \scalebox{0.7}{$p_3p_1-p_3p_2+p_4p_3-p_2p_1$} & 29&25 & 31&21  & \scalebox{0.7}{$[0.01,0.01,0.01,0.01]$} & \scalebox{0.7}{$[0.03,0.03,0.03,0.03]$} & 0 \\         \scalebox{0.7}{$-p_3p_1+p_3p_2-p_4p_3+p_2p_1$} & 12&15 & 29&19  & \scalebox{0.7}{$[0.01,0.01,0.01,0.01]$} & \scalebox{0.7}{$[0.03,0.03,0.03,0.03]$} & 0 \\                  \scalebox{0.7}{$p_3p_1-p_3p_2+p_4p_3-p_2p_1+p_4p_1-p_4p_2$} & 29&29 & 31&13  & \scalebox{0.7}{$[0.01,0.01,0.01,0.01]$} & \scalebox{0.7}{$[0.03,0.03,0.03,0.03]$} & 0 \\         \scalebox{0.7}{$-p_3p_1+p_3p_2-p_4p_3+p_2p_1-p_4p_1+p_4p_2$} & 6&13 & 21&13  & \scalebox{0.7}{$[0.01,0.01,0.01,0.01]$} & \scalebox{0.7}{$[0.03,0.03,0.03,0.03]$} & 0 \\              \hline     \end{tabular}      **Related questions**   1. change font size of particular column yet with some other package


title: Inserting Custom Commands with Emacs+AucTeX

text: I would like Emacs or AucTeX to do the following: `here's some SELECTED TEXT for testing` Then, I could hit a key stroke and convert the highlighted text "SELECTED TEXT" to `here's some \mycustomcommand{SELECTED}{TEXT} for testing`


title: Does longtable not support the m column type?

text: I have the following problem: I would like to use the `m` column type in a `longtable`. But if I typeset               \documentclass{minimal}     \usepackage{longtable}     \begin{document}         \begin{longtable}{p{5cm}m{5cm}}             skdlbf & asljkdh\\         \end{longtable}     \end{document}      I get an error about an `Illegal character in array arg` in the line of `\begin{longtable}{..}`. If I change the `m` to a `p`, all runs well. So why does `longtable` not support the `m` (and `b`) column type? Am I missing a package?


title: Fancy Header is not at the same place on first page

text: I'm currently writing a latex code generator to make invoices and I have a problem with my headers. I'm using fancy headers to make my headers and I'm using the output of the compiler to set the height of the header and the text. My problem is that my header is not at the same position on the first and the second page. It is higher on the first page and I don't find any solution to this problem. Here is the code :               \documentclass[a4paper]{article}                                                                          % setting language                                                                               \usepackage[frenchb]{babel}                                                                           % geometry --> margin ++                                                                         \usepackage[includeheadfoot]{geometry}                                                                            \geometry{a4paper,margin=1cm}                                    \usepackage{tabularx}                                                                                \usepackage{booktabs}                                                                                %\usepackage[absolute,overlay]{textpos}                                                               \usepackage{fancyhdr}                                                                            \pagestyle{fancy}                                                                                \renewcommand{\headrulewidth}{0pt}                                                               \renewcommand{\footrulewidth}{0.4pt}                                                             \newcommand\VRule[1][\arrayrulewidth]{\vrule width #1}                                                                                \usepackage{lipsum}                                                                               \fancyhead[L]{        \renewcommand{\arraystretch}{1}        \raisebox{0\height}{                                                                              \begin{tabular}{p{4.99cm}l}                                                                           Left part                                                       &                                                                                Right part                    \\                                                                                \end{tabular}                                                                                }}                                                                                \fancyhead[R]{ \vtop{\begin{tabular}{l} \textbf{Devis n° 5}\\\textbf{Original}\\Page  \end{tabular}}}                                                                \fancyfoot[C]{\textbf{Masidaso Consulting - N° TVA :BE0834757576}\\}                                  \setlength{\headheight}{64pt}          % début du corps                                                                                \begin{document}           \parskip=0pt\parindent=0pt                                                                                \renewcommand{\arraystretch}{1.4}                                                                     \begin{tabularx}{\linewidth}{!{\VRule[2pt]}X!{\VRule[2pt]}X!{\VRule[2pt]}X!{\VRule[2pt]}}  \specialrule{2pt}{0pt}{0pt} Client & Intelocuteur & Page \\   \specialrule{2pt}{0pt}{0pt} 2 - Minou Chat & Mr le vendeur & page \\  \specialrule{2pt}{0pt}{0pt} \end{tabularx}                                                                                \lipsum                                                                                \lipsum                                                                                \renewcommand{\arraystretch}{1}          \end{document}


title: How to increase margins using a .cls file

text: Sorry if this an easy question (relatively new to Latex!), however I'm getting a bit confused by this pre-done .cls file which I am trying to understand. I'm trying to decrease the margins in the A4 document, as currently the gaps are quite large and was wondering if anyone could give any light to what I could/should change?               \newcommand{\bookclass}{book}          % Font size, this option is passed to book class. T.G. : use regular, 10- to 12-     % point size for text. Default is 12pt.     \newcommand{\@ftsize}{}     \DeclareOption{10pt}{\renewcommand{\@ftsize}{10pt}}     \DeclareOption{11pt}{\renewcommand{\@ftsize}{11pt}}     \DeclareOption{12pt}{\renewcommand{\@ftsize}{12pt}}          % Left side margin.      % [1.5in], [1.7in]     % T.G. : the left margin must be at least 1.5 inches (recommend 1.7). default is     % 1.7, unless [1.5in] is specified.     \newcommand{\@lmarwidth}{}     \newcommand{\@smarwidth}{}     \newcommand{\@texwidth}{}          \DeclareOption{1.5in}{%       \renewcommand{\@lmarwidth}{.5in}%       \renewcommand{\@smarwidth}{.0in}%       \renewcommand{\@texwidth}{6.0in}%     }     \DeclareOption{1.7in}{%       \renewcommand{\@lmarwidth}{.7in}%       \renewcommand{\@smarwidth}{.0in}%       \renewcommand{\@texwidth}{5.8in}%     }          % One and half or double spacing?     % [onehalf], [double]     % T.G. : use either double or 1.5 line spacing for the body of text. default is     % double, unless [onehalf] is specified.     \newcommand{\@spacing}{}     \DeclareOption{onehalf}{\renewcommand{\@spacing}{\onehalfspacing}}     \DeclareOption{double}{\renewcommand{\@spacing}{\doublespacing}}     \AtEndOfClass{\@spacing}          % Draft or final version?     % [preprint], [submission]     % Default is submission.     \newif\if@preprint          \DeclareOption{preprint}{\@preprinttrue}     \DeclareOption{submission}{\@preprintfalse}          % [seploa]     \newif\if@seploa     \@seploafalse     \DeclareOption{seploa}{\@seploatrue}          % Other options are passed to the book class.     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\bookclass}}          % These are the default options.     \ExecuteOptions{12pt,1.7in,double,submission}     \ProcessOptions\relax          \if@preprint     \PassOptionsToClass{twoside,openright}{\bookclass}     \else     \PassOptionsToClass{oneside,openany}{\bookclass}     \fi          \PassOptionsToClass{\@ftsize}{\bookclass}          \LoadClass[letterpaper,onecolumn]{\bookclass}          % -------------------------------------------------------------------------------     % Set up page layout.          % \evensidemargin is used when [twoside] is set (by [preprint]).     \setlength{\oddsidemargin}{25pt}     \setlength{\evensidemargin}{25pt}     \setlength{\textwidth}{\@texwidth}     % Other margins. T.G.: all other margins must be at least 1 inch.     \setlength{\topmargin}{0in}     \setlength{\headheight}{.5in}     \setlength{\headsep}{0.3in}     \setlength{\footskip}{.5in}      Thank you in advance,


title: Four side by side figures each pair have one common caption

text: I am using the following LaTeX code to put four figures in two rows with two figures side by side so that both of them are on a line and have a one common caption. Unfortunately when I am using the caption the LaTeX file does not execute properly. How can I do the above procedure? There is other code that does not work. I am using MiKTeX 2.8 and TeXnicCenter stable 2.3. Here is my code:               \begin{figure}[htp]          \begin{tabular}{cc}          % Requires \usepackage{graphicx}     \includegraphics[width=13cm]{fig1.eps}&          \hspace{-5cm} \includegraphics[width=13cm]{fig2}\caption{}\          \includegraphics[width=13cm]{fig3.eps}& \hspace{-5cm} \includegraphics[width=13cm]{fig4.eps}\caption{}\     \end{tabular} \end{figure}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     SECOND CODE IS     \begin{figure}     \centering     \begin{tabular}{cc}     \includegraphics{fig1} &     \includegraphics{fig2}     \end{tabular}     \caption{.....}     \end{figure}     \begin{figure}     \centering     \begin{tabular}{cc}     \includegraphics{fig3} &     \includegraphics{fig4}     \end{tabular}     \caption{.....}     \end{figure}


title: How can I draw 16 pin macro by use circuit-tikz package?

text: ![macro 16 pin](http://i.stack.imgur.com/Z73rL.png) I want to draw this macro by use circuit-tikz package.


title: Drawing 3d crystal lattice with molecular layer in tikz

text: I would like to achieve the following diagram (may be colored) wit Tikz. ![enter image description here](http://i.stack.imgur.com/c6wIL.jpg)   Here is what I have done till now:   i)Drawing a 3d cube with Tikz   ii)Get the Molecular layer from here   Here is my code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,fadings,decorations.pathreplacing}     \begin{document}     \begin{tikzpicture}     \pgfmathsetmacro{\cubex}{4}     \pgfmathsetmacro{\cubey}{4}     \pgfmathsetmacro{\cubez}{4}     \draw (0,0,0) -- ++(-\cubex,0,0) -- ++(0,-\cubey,0) -- ++(\cubex,0,0) -- cycle;     \draw (0,0,0) -- ++(0,0,-\cubez) -- ++(0,-\cubey,0) -- ++(0,0,\cubez) -- cycle;     \draw (0,0,0) -- ++(-\cubex,0,0) -- ++(0,0,-\cubez) -- ++(\cubex,0,0) -- cycle;     \end{tikzpicture}     \\[1cm]     \begin{tikzpicture}       \def\nuPi{3.1459265}       \foreach \i in {11,10,...,0}{% This one doesn't matter         \foreach \j in {5,4,...,0}{% This will crate a membrane                                    % with the front lipids visible           % top layer           \pgfmathsetmacro{\dx}{rand*0.1}% A random variance in the x coordinate           \pgfmathsetmacro{\dy}{rand*0.1}% A random variance in the y coordinate,                                          % gives a hight fill to the lipid           \pgfmathsetmacro{\rot}{rand*0.1}% A random variance in the                                           % molecule orientation           \shade[ball color=red] ({\i+\dx+\rot},{0.5*\j+\dy+0.4*sin(\i*\nuPi*10)}) circle(0.45);           \shade[ball color=gray] (\i+\dx,{0.5*\j+\dy+0.4*sin(\i*\nuPi*10)-0.9}) circle(0.45);           \shade[ball color=gray] (\i+\dx-\rot,{0.5*\j+\dy+0.4*sin(\i*\nuPi*10)-1.8}) circle(0.45);           % bottom layer           \pgfmathsetmacro{\dx}{rand*0.1}           \pgfmathsetmacro{\dy}{rand*0.1}           \pgfmathsetmacro{\rot}{rand*0.1}           \shade[ball color=gray] (\i+\dx+\rot,{0.5*\j+\dy+0.4*sin(\i*\nuPi*10)-2.8}) circle(0.45);           \shade[ball color=gray] (\i+\dx,{0.5*\j+\dy+0.4*sin(\i*\nuPi*10)-3.7}) circle(0.45);           \shade[ball color=red] (\i+\dx-\rot,{0.5*\j+\dy+0.4*sin(\i*\nuPi*10)-4.6}) circle(0.45);         }       }     \end{tikzpicture}     \end{document}       ![enter image description here](http://i.stack.imgur.com/l3Btf.png) > How do I fix the layer onto the cube is my ultimate question and drawing the > inner cube as in the diagram (preferably with axes)


title: Sectionnumber right in beamer

text: I'm fortunately allowed to use LaTeX instead of PowerPoint for a teaching lesson but I have to recreate the original design of the PowerPoint slides. Now I need to bring the section numbers on section frames on the right side of the frame (see picture below). ![enter image description here](http://i.stack.imgur.com/cDxs4.png) How could I achieve that in beamer (background an position of the section text is no problem - i just don't know how to move the section number)?


title: Eqnarray help (disadvantage) when breaking across columns

text: I'm a first time TeX user and had typed out certain (long) equations in a single column format for submission to a journal (that part worked fine). Unfortunately, I accidentally missed the fact (!) that Physical Review journals have a two column format. Directly converting to the two column format results in them spilling over the column width. So, now, I need to break all these beautiful long equations so that nothing spills over columns. Q.1 - Is there any way to do this automatically, without changing too much (time constraint)? Q.2 - Using `eqnarray` has one disadvantage -               \begin{eqnarray}          LHS & = & RHS1 \nonumber \\\           & & + RHS2 \nonumber\\\           & & + RHS 3           \end{eqnarray}      Of course I want the three RHS to be aligned, so that the equation displays well, but even if LHS is not a very big string, I'm wasting some space = width of ``LHS = '' (which is conspicuously large in a two column format). (THOSE OF YOU WHO ARE PLANNING TO MARK THIS AS A DUPLICATE, PLEASE ENSURE THAT YOU REFER TO THE RIGHT POST SO THAT MY QUERY GETS ADEQUATELY ANSWERED. THANKS.) PS - As demanded by @egreg and @daleif, I'm also adding a sobered up Minimum Working Example (MWE) -               \documentclass{article}           \begin{document}           \begin{eqnarray}      \Pi(\rho, \sigma, \delta) & = & \frac{1}{B} (4\rho_p + 2\rho_n + \rho_{\Lambda} + 2\rho_{\Sigma^+})-2\rho_{\Sigma^-} + 2\rho_{\Sigma^0} + 2\rho_{\Xi^0} - 2\rho_{\Xi^-}) - \frac{(\sigma_1 + (\sigma_3)_z)}{2\sigma_2\delta} \nonumber\\      & & + \frac{\sigma_1}{\sqrt{2}\delta}(4\rho^s_p + 2\rho^s_n + \rho^s_{\Lambda} + 2\rho^s_{\Sigma^+})-2\rho^s_{\Sigma^-} + 2\rho^s_{\Sigma^0} + 2\rho^s_{\Xi^0} - 2\rho^s_{\Xi^-})      \end{eqnarray}           \end{document}       Now, of course, this has been `broken' at the appropriate places for a single column format, but needs to be revamped for a two column format.


title: ConTeXt: Substitute em-dash for double-hyphens

text: # Background I am trying to substitute an em-dash for double-hyphens (`\--`) whenever they occur in user-generated text. The fonts that I am using (Chivo and Gentium Basic) result in double-hyphens added to the document, rather than `\emdash{}` (—). # Problem The substitution code resembles:               \def\SubEmdash#1{%       \ctxlua{context(string.gsub("#1", "[-][-]", "\\emdash{}"))}     }          \starttext       \SubEmdash{Escaping ampersands -- \& -- is troublesome.}     \stoptext      This fails for strings that contain ampersands. # Question An answer to either of these questions would be tremendously helpful:   * How do you force `\--` to produce em-dashes throughout the text, regardless of font?   * How would you escape user-generated text so that the `\SubEmdash` macro never fails? # Related The following answers also cannot handle ampersands in parameterized text:   * http://tex.stackexchange.com/a/41363/2148   * http://tex.stackexchange.com/a/43411/2148   * http://tex.stackexchange.com/a/43376/2148


title: Beamer.el not loaded

text: from what I have learnt from my research so far, auctex should load beamer.el automatically once a `*.tex` file with `\documentclass{beamer}` is loaded. However, this is not the case here and I find the following error in `*messages*`:               File mode specification error: (file-error "Cannot open load file" "beamer")      As I have not found any usefull ideas so far what could be wrong, here two further pieces of information that could help to solve the problem. First, I have the following in my `.emacs`:               (add-hook 'LaTeX-mode-hook           (lambda ()             (require 'beamer)             (require 'reftex)      ))      Second, I use Ubuntu 12.04 and did a manual upgrade from Texlive 2009 to Texlive 2012. As I am not really sure, if my problem occurred already before I can't say if this latter might be the source of the problem. Please ask for any further information that might help. Thank you very much.


title: How to make a bar diagram with several "levels"

text: I just started using TikZ and I am trying to make the following bar diagram: ![The bar diagram](http://i.stack.imgur.com/5v5i3.jpg) My main problem is to define bar type in which I could put the following arguments (for every bar separately!): (1) the height on which the bar starts, (2) the height of the bar, (3) the distance of the "nodes near coords" marks above the bars, or find something already implemented that simulates that. In this way, I would be able to make my graph in three "levels" (or three graphs in one), as the picture shows. Another problem are those vertical lines that do not overlap with bars and the numbers above them. What I have so far is this:               \documentclass[border=2pt]{standalone}     \usepackage{pgfplots}     \usepackage{tikz}          \begin{document}               \pgfplotsset{mystyle/.style=     {     font=\tiny,     ybar,     bar shift={0pt},     xtick={1,1.25,1.5,1.75,2,2.25,2.5,2.75,3,3.25,3.5,3.75,4,4.25,4.5,4.75,5,5.25},     ytick=\empty,     xmin=0.75,     xmax=5.25,     ymin=0,     ymax=100,     bar width=10,     nodes near coords={\pgfmathprintnumber{\pgfplotspointmeta}},     }}          \begin{tikzpicture}     \begin{axis}[mystyle]     \addplot [draw=green, fill=green] plot coordinates     {(1,1) (1.5,2) (2.5,3) (3, 7) (3.5, 10) (4, 17) (4.5, 18) (5,8)};     \end{axis}     \end{tikzpicture}          \end{document}      Any help would be very appreciated!


title: Change text from "chapter" to "section" for each new chapter

text: I'm trying to write an assigment using an LaTeX template I found. However, I would like to change the template so that the text next to the title whenever the `\chapter` command is used is "Section" instead of "Chapter" as I don't think the assignment is big enough to name it "Chapters". It would be greatly appreciated if you can help me do that. If you need my code you can find it below. However, it is quite long. I don't know how to format code in another than indenting by 4 spaces, which is quite tiresome for this amount of code.               %\RequirePackage[l2tabu, orthodox]{nag} % Old habits die hard     \documentclass[10pt,twoside,b5paper,showtrims]{memoir}     %\RequireXeTeX          % Stock and paper layout     \showtrimsoff     \pagebv     \setlrmarginsandblock{26mm}{20mm}{*}     \setulmarginsandblock{35mm}{30mm}{*}     \setheadfoot{8mm}{10mm}     \setlength{\headsep}{7mm}     \setlength{\marginparwidth}{18mm}     \setlength{\marginparsep}{2mm}          \checkandfixthelayout                 % Check if errors!     \sideparmargin{outer}                 % Put sidemargins in outer position (why the fuck is this option not default by the class?)          % Large environments          \usepackage{listings}                 % Source code printer      % Symbols     \usepackage{amsmath,amssymb, latexsym} % AMS and other symbols               % Graphics and colors     \usepackage{graphicx}                 % Including graphics and using colours     \usepackage{xcolor}                   % Defined more color names     \usepackage{eso-pic}                  % Watermark and other bag     \usepackage{dtucolors}     \graphicspath{{graphics/}}               % Floating objets, captions and references     \usepackage[noabbrev,nameinlink,capitalise]{cleveref} % Clever references. Options: "fig. !1!" --> "!Figure 1!"     \hangcaption     \captionnamefont{\bfseries}     \subcaptionlabelfont{\bfseries}     \newsubfloat{figure}     \newsubfloat{table}     \letcountercounter{figure}{table}     % Consecutive table and figure numbering     %\usepackage{cite}          % Table of contents (TOC)     \setcounter{tocdepth}{1}              % Depth of table of content     \setcounter{secnumdepth}{2}           % Depth of section numbering     \newcommand{\shorttableofcontents}[2]{       \newcounter{oldtocdepth}\setcounter{oldtocdepth}{\value{tocdepth}}        \let\oldcontentsname\contentsname       \renewcommand*{\contentsname}{#1}       \setcounter{tocdepth}{#2}       \tableofcontents       \setcounter{tocdepth}{\value{oldtocdepth}}       \renewcommand*{\contentsname}{\oldcontentsname}     }          % Todos     \usepackage{totcount}                 % For total counting of counters     \usepackage[colorinlistoftodos]{todonotes} % Todonotes package for nice todos                                                % (disable by option [disable])     \newtotcounter{todocounter}           % Creates counter in todo     \let\oldtodo\todo     \newcommand*{\newtodo}[2][]{\stepcounter{todocounter}\oldtodo[#1]{\thesection~(\thetodocounter)~#2}}     \let\todo\newtodo     \let\oldmissingfigure\missingfigure     \newcommand*{\newmissingfigure}[2][]{\stepcounter{todocounter}\oldmissingfigure[#1]{\thesection~(\thetodocounter)~#2}}     \let\missingfigure\newmissingfigure     \makeatletter     \newcommand*{\mylistoftodos}{% Only show list if there are todos     \if@todonotes@disabled     \else         \ifnum\totvalue{todocounter}>0             \markboth{\@todonotes@todolistname}{\@todonotes@todolistname}             \phantomsection\todototoc             \listoftodos         \else         \fi     \fi     }     \makeatother     \newcommand{\lesstodo}[2][]{\todo[color=green!40,#1]{#2}}     \newcommand{\moretodo}[2][]{\todo[color=red!40,#1]{#2}}          % Prefrontmatter     \newcommand{\prefrontmatter}{\pagenumbering{alph}}          % Chapterstyle     \makeatletter     \makechapterstyle{mychapterstyle}{         \chapterstyle{default}         \def\format{\normalfont\sffamily}              \setlength\beforechapskip{0mm}              \renewcommand*{\chapnamefont}{\format\LARGE}         \renewcommand*{\chapnumfont}{\format\fontsize{40}{40}\selectfont}         \renewcommand*{\chaptitlefont}{\format\fontsize{32}{32}\selectfont}              \renewcommand*{\printchaptername}{\chapnamefont\MakeUppercase{\@chapapp}}         \patchcommand{\printchaptername}{\begingroup\color{dtugray}}{\endgroup}         \renewcommand*{\chapternamenum}{\space\space}         \patchcommand{\printchapternum}{\begingroup\color{dtured}}{\endgroup}         \renewcommand*{\printchapternonum}{%             \vphantom{\printchaptername\chapternamenum\chapnumfont 1}             \afterchapternum         }              % egen ændring         \renewcommand*{\chaptername}{Section}              \setlength\midchapskip{1ex}              \renewcommand*{\printchaptertitle}[1]{\raggedleft \chaptitlefont ##1}         \renewcommand*{\afterchaptertitle}{\vskip0.5\onelineskip \hrule \vskip1.3\onelineskip}          }     \makeatother     \chapterstyle{mychapterstyle}          % Header and footer     \def\hffont{\sffamily\small}     \makepagestyle{myruled}     \makeheadrule{myruled}{\textwidth}{\normalrulethickness}     \makeevenhead{myruled}{\hffont\thepage}{}{\hffont\leftmark}     \makeoddhead{myruled}{\hffont\rightmark}{}{\hffont\thepage}     \makeevenfoot{myruled}{}{}{}     \makeoddfoot{myruled}{}{}{}     \makepsmarks{myruled}{         \nouppercaseheads         \createmark{chapter}{both}{shownumber}{}{\space}         \createmark{section}{right}{shownumber}{}{\space}         \createplainmark{toc}{both}{\contentsname}         \createplainmark{lof}{both}{\listfigurename}         \createplainmark{lot}{both}{\listtablename}         \createplainmark{bib}{both}{\bibname}         \createplainmark{index}{both}{\indexname}         \createplainmark{glossary}{both}{\glossaryname}     }     \pagestyle{myruled}     \copypagestyle{cleared}{myruled}      % When \cleardoublepage, use myruled instead of empty     \makeevenhead{cleared}{\hffont\thepage}{}{} % Remove leftmark on cleared pages          \makeevenfoot{plain}{}{}{}            % No page number on plain even pages (chapter begin)     \makeoddfoot{plain}{}{}{}             % No page number on plain odd pages (chapter begin)          \setlength\parindent{0pt}


title: Customizing font used by algorithmicx

text: I am using `algorithmicx` to typeset my algorithms in XeTeX. Using `fontspec`, I set the default font to be Linux Libertine with historical ligatures (e.g., `ct`, `st`). Unfortunately, this is also the font used by `algorithmicx` to typeset my algorithms and historical ligatures look very much out of place there. This is likely a newbie question, but is there any way to customize the font used within the `algorithmic` environment without specifying the custom font at the beginning of each such environment? A simple solution is to define a new environment               \newenvironment{halgorithmic}        { \begin{algorithmic}\algofont }        { \end{algorithmic} }      and use `halgorithmic` instead of `algorithmic`. Is there a cleaner method that comes to mind?


title: Simple Presentation Question

text: I have a simple question for `beamer` programming. I've been looking around and was quite surprised not to have found a quick answer for a seemingly simple thing, so I am posting it here. I have a list and would like to uncover the sentences of a single item from the enumeration one by one (basically, it shows resolutions of multiple choice question; but I would like the resolution of each item to be shown little by little). I would be grateful for any help. My failed attempts used `only`, `uncover`, and `pause`, but couldn't do the trick with those.


title: How to frame a figure in Lyx

text: I use Lyx 2.1. I want to frame the figures. I inserted a simple box and I put the figure inside it. But, I encountered these errors : ![enter image description here](http://i.stack.imgur.com/Xj5Su.png)


title: Figure at the wrong vertical and horizontal position

text: I'm trying to add an eps figure to my document. I'm using Texniccenter 2.02 and Miktex. In the output document the picture moves about a third to the right and to the top. It then exceeds the page border. If I set a frame around the figure with `\fbox{\includegraphics{..}}` the frame appears at the correct position, but the figure is still on the top, right corner. Using other pictures is not a problem. I exported the picture from coreldraw X5


title: currvita - right-aligning cvlist item

text: Let's say I have the following:               \documentclass[12pt,a4paper]{article}     \usepackage{currvita}     \begin{document}     \begin{cv}{Hello}     \begin{cvlist}{Something}          \item[item name]                         %%% make this...         Lorem ipsum dolor     \item[slightly longer item]              %%% ...align with this.         sit amet, consectetur adipiscing          \end{cvlist}     \end{cv}     \end{document}      How can I make `item` and `slightly longer item` align to the the right?


title: How can I draw a *manual input* and *Multi-document* nodes in a flowchart using TiKz?

text: I am drawing flowcharts using TiKz. I have found a number of suggestions here and here. However, I have not found code to draw a manual input node![node images](http://i.stack.imgur.com/QKP1a.png) (image source) I could eventually figure this out, but I am new to TiKz, and would help to know if someone already has the code.


title: dmath inside dgroup writes over equation number

text: The following gives an output where the second eqaution writes over the equation number               \documentclass{report}     \usepackage{amssymb,amsmath}     \usepackage{breqn}          \begin{document}          \begin{dgroup}       \begin{dmath}         a = a       \end{dmath}       \begin{dmath}         a = a +a+a+a+ b+b+b+b+b+b+b+b+b+b+b+b+b+a+a+a      \end{dmath}     \end{dgroup}          \end{document}      Using just                 \begin{dmath}         a = a +a+a+a+ b+b+b+b+b+b+b+b+b+b+b+b+b+a+a+a      \end{dmath}      without the `dgroup` environment leads to correct output. It looks like this ((1a) and (1.b) are in the `dgroup` environment whereas (2) is not): ![enter image description here](http://i.stack.imgur.com/hJbbx.jpg) Did I make a mistake or is this a bug? What is the correct way to handle this situation?


title: TikZ positioning: is it possible to use arithmetics?

text: I would like for the blue box (`text3`) to be below the other two boxes and to have the width of the other two boxes together. So basically I want to make the blue box (the large one in `%Row2`) wider without messing with the width measurements. Would that be possible? Something like `below=of node1 and node2` would do the trick but I haven't figured out a way to do it.               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{shapes,positioning}     \begin{document}          \begin{tikzpicture}[auto,       SmallBox/.style={rectangle, draw=black, fill=#1!20, minimum width=8em, align=center, minimum height=3em},       LargeBox/.style={rectangle, draw=black, fill=#1!20, minimum width=8em,align=center, minimum height=3em}     ]          \matrix[row sep=0.5em]     {       % row 1       \node {}; & \node (cell32) {}; & \node {}; & \node (cell34) {}; & \node {}; & \node {}; \\            % row 2       \node {}; &       \node {}; &       \node {\tikz{           \node [SmallBox={red}] (node1) {text1};           \node [SmallBox={green}, right=of node1] (node2) {text2};           \node [LargeBox={blue}, below=of node2] (node3) {text3};       }}; &       \node {}; &       \node {}; &       \node {}; \\     };          % horizontal line     \draw [thick] (cell32.east) -- (cell34.west);          \end{tikzpicture}     \end{document}


title: Moving the chapter name in a titlesec frame?

text: I'm messing around with titlesec to make a frame with the chapter name in it. I can't figure out how to move the chapter name ("Chapter Foo" in the example). Here's the MWE:               \documentclass[a4paper,book,openany,twocolumn]{memoir}     \usepackage[utf8]{inputenc}     \usepackage{lipsum}      \usepackage{titlesec}     \titleformat{\chapter}[frame]     {\normalfont\huge\bfseries}{\thechapter}{5em}{\Huge}     \titlespacing*{\chapter}{0pt}{-40pt}{15pt}     \begin{document}     \chapter*{Chapter Foo}     \lipsum     \lipsum[3-6]     \end{document}      This is what I have: ![enter image description here](http://i.stack.imgur.com/9AL7u.png) This is what I want: ![enter image description here](http://i.stack.imgur.com/r8Csf.png) I hope someone can help!


title: Is it possible to put a block inside another block in Beamer?

text: Basically I want to insert two blocks within a bigger block. I've tried doing this:               \begin{block}{heading}         \begin{block}{heading1}          content         \end{block}         \begin{block}{heading1}          content         \end{block}     \end{block}      but it doesn't work. The error message is : > File ended while scanning use of \beamer@collect@@body. I would like to add that this is the first time I've used the LaTeX language, so I'm basically a _noob_ here =)


title: Creating bibliographies with biblatex and moderncv

text: I wanted to use the moderncv class together with biblatex. To this end, I redefined the `bibliography` bibenvironment               \defbibenvironment{bibliography}{}{}%     {\cvline{\printfield[labelnumberwidth]{labelnumber}}%     {}     }      The labels were adjusted correctly, but the text of the bib entry (unsurprisingly) started below the label, took the whole line and was not adjusted at all. My question is if there is a neat solution for this, or if one must define a new `BibliographyDriver` as is done here Sorted list of publications in moderncv from bibtex or even resort to some low level hackery as in this answer tabular bibliography with biblatex? If so, what do I have to do?


title: Change `\overline` command with `\uc`

text: I'm trying to change `\overline` command with `\uc` completely. But pdflatex is giving error below:               ! TeX capacity exceeded      The code:               \documentclass[10pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{mathpazo}     \newcommand{\uc}[1]{\mkern 1.5mu\overline{\mkern-1mu#1\mkern-0.3mu}\mkern 0mu}     \let\overline\uc     \renewcommand*{\uc}[1]{\overline[#1]}          \begin{document}     \noindent X $\uc{X}$ X\\     Y $\uc{Y}$ Y     \end{document}      What should I do?


title: Resolve the citations but do not include the list of references

text: I need to prepare a separate abstract file without the list of references. However, I do have some citations in the abstract and I want them to be resolved, but without producing the list of refs in the end. Is there any solution? Thanks - Baskaran


title: Setting thesis margins

text: My university requires theses to be bound and printed with the following specification:               There should be a margin of at least 1.5 inches, preferably 2 inches (5cm),        on the left side of the page,      both for typescript and diagrams, to allow for binding. Other margins should     be of at least 1 inch (2.5 cm).       If I plan to double-side print on `A4`, how can I ensure this in latex? Would the following in the preamble suffice?               \setlength{\oddsidemargin}{16mm}      \setlength{\textwidth}{140mm}       \setlength{\textheight}{200mm}       \setlength{\topmargin}{8mm}      I found this in someone else's thesis. My understanding is that `oddsidemarin` sets the left margin for odd-numbered pages, minus 1 inch, so this gives 1 inch(25.5mm)+16mm: 1.63inches on the left side of the odd-numbered pages. Then `A4` dimensions are `210mm w x 297mm` so `\setlength{\textwidth}{140mm}` along with my `oddsidemargin` means there will be `210-41.5-140=28.5mm=1.11inch` left for the right margin of odd-sided pages. Similarly, `\setlength{\textheight}{200mm}` means there is `297-200=97mm=3.8inches` left for both the top and bottom margins, so `1.9inches` each. Not sure what `\topmargin` is doing here. Do I need to set `evensidemargin` too? Are the above settings correct to match the university specifications?


title: Citing page numbers in parentheses with year but author outside

text: So I want the following: The three parameter inverse gamma distribution is described by Malamud et al. (2004, p. 694) as... The script I'm using is:               The three parameter inverse gamma distribution is described by \cite[p. 694]{Malamud2004c} as...      And I'm getting: The three parameter inverse gamma distribution is described by (Malamud et al., 2004, p.694) as... Any ideas??


title: Make no content cells in a table to be full of parallel black lines

text: I have a table and I want to make two cells of it full of parallel lines to show that there is no content in them. How can I do that? A MWE is the following:               \documentclass[12pt]{article}          \usepackage{setspace}     \setlength{\parindent}{0cm}          \usepackage{xltxtra}     \usepackage{xgreek}     \setmainfont[Mapping=tex-text]{GFSDidot.otf}     \setsansfont[Mapping=tex-text]{GFSDidot.otf}          \usepackage{amsmath}          \everymath{\displaystyle}          \usepackage{booktabs}          \begin{document}          \begin{tabular}{|l|l|l|l|l|}     \hline     {} & \multicolumn{2}{|c|}{Κινητήρας} & \multicolumn{2}{|c|} {Γεννήτρια}\\     \hline     {} & Y & Δ & Υ & Δ\\     \hline     Cell 1 & $2$ & 2 & $2$ & $2$\\     \hline     Cell 2 & $25.477$ & $25.477$ & {} & {}\\      \hline     Cell 3 & $0.9823$ & $0.9765$ & {} & {}\\     \hline     \end{tabular}          \end{document}      The cells in question are the ones with the `{}` Edit I: I had forgotten some words in Greek having deleted the code regarding language. I have edited it with these lines of code.


title: glossaries package - How to format the positions of the columns and width of the glossary?

text: I am very fond of the `glossaries` package, since I am able to use multiple glossaries with different styles and so on. However, I have a problem with formatting it. I would like to use the predefined glossarystyle `altlong4colheader`, since I need the possibility to have multirow descriptions, a header and the possibility to easily sort entries. I wanted my glossary entries to have a name, a description and a unit. So I got rid of the last column. I have defined the new style as follows:                \newglossarystyle{formel_altlong4colheader}{\setglossarystyle{altlong4colheader}     %      \renewcommand*{\glossaryheader}{%        \bfseries sign       & \bfseries description       & \bfseries unit       & \\       \hline       \\\endhead}%     \renewcommand{\glossentry}[2]{%      \glstarget{##1}{\glossentryname{##1}}%      & \glossentrydesc{##1}%      & \glossentrysymbol{##1}%      \tabularnewline % end of row      }%      }      The outcome looks like this, which is pretty close to what I want: ![Example](http://i.stack.imgur.com/glMRv.png) As seen, the width of the glossary is not as wide as my text. How do I change this? I also would like the sign-column to be left-aligned and the unit-column to be right-aligned, according to my textwidth. Being able to set the position and width of the columns would also be very nice and helpful. I hope there is someone who can help me. Thanks.


title: How do I make \text{} in math mode fit the math font?

text: I am having a problem with text in formulas. I am setting tables in sans-serif in order to improve the readability. The math font stays serif for formulas or symbols within the table, when I switch with `\sffamiliy` directly before `\begin{tabular}`. I think that's good, because the symbols stay the same over the whole document and are recognizable. But, when setting indices which are used as abbreviations with `_\text{index}`, this text of course changes to sans, too. That gives me three different symbols where two different what be easier to understand.               \documentclass{article}     \usepackage{mathtools}     \begin{document}     The mass flow $q_m$ is different from the average heat flow $q_\text{m}$          \sffamily     The mass flow $q_m$ is different from the average heat flow $q_\text{m}$     \end{document}      First of all I wonder how to prevent this behavior and second: What is best practice for this case? How do you type set text indices? Should the math mode follow the text mode and possibly confuse the lector? An other example are characteristic numbers which should be (Forssmann/Jong) set to `circumferential Mach-number $\textit{Ma}_u$` or `Reynolds-number over hyd. diameter $\textit{Re}_{D_{\text{h}}}$`. **Edit** I am playing around a little with `\mathrm` and `\text`. Still not sure, what should be used where. The font is the same for serifs. Using `unicode-math` or redefining `\mathrm` however would give different appearances for those outputs. I think that is good, as `d` for differential should/could look different as `d` for abbreviation of dynamic. `$\frac{\mathrm{d}p_\text{d}}{\mathrm{d}t}$` What I noticed further more:   * `\mathrm` ignores spaces but not `\,` etc.   * `\mathrm` and `\text` are setting indices in a different distance This code:               Mach-number, total, mean and mass specific values:          $\textit{Ma}_u$; $\mathit{Ma}_u$          $q_m$; $q_{\text{m\,tot}}$; $q_{\text{m tot}}$; $q_{\text{m,tot}}$; $q_{\text{m, tot}}$          $q_m$; $q_{\mathrm{m\,tot}}$; $q_{\mathrm{m tot}}$; $q_{\mathrm{m,tot}}$; $q_{\mathrm{m, tot}}$          \sffamily     Mach-number, total, mean and mass specific values:          $\textit{Ma}_u$; $\mathit{Ma}_u$          $q_m$; $q_{\text{m\,tot}}$; $q_{\text{m tot}}$; $q_{\text{m,tot}}$; $q_{\text{m, tot}}$          $q_m$; $q_{\mathrm{m\,tot}}$; $q_{\mathrm{m tot}}$; $q_{\mathrm{m,tot}}$; $q_{\mathrm{m, tot}}$      looks like: ![enter image description here](http://i.stack.imgur.com/DO6V7.png)


title: Upside down tikz-qtree with concentrated edges

text: I would like to create an upside down tree with concentrate edges and labels inside the nodes as labels above them. ![desired result](http://i.stack.imgur.com/NVSj9.jpg) Right now I've come so far. But I still need the edges to concentrate/combine and put the labels `+` and `*` next to the overlapping bit. And I need to add the extra labels `x`, `y`, and `z` to the top nodes. ![current situation](http://i.stack.imgur.com/osant.png) How do I get the tree from the first image? (The corners do not need to be rounded.) It is not absolutely necessary to use tikz-qtree.               \tikzstyle{var} = [draw,shape=rectangle,minimum size=2em,                             inner sep=2pt,fill=white!20]     \tikzstyle{operator} = [draw=none,fill=none,minimum size=2em,                             inner sep=2pt,fill=white!20]     \begin{tikzpicture}[grow'=up,level distance=1.25cm,sibling distance=1cm,]       \tikzset{every node/.style={var}}       \Tree [.7 \edge node[auto=right,style={operator}] {$+$};                 [.6 \edge node[auto=right,style={operator}] {$*$};                     [.2 ] [.3 ] ]                           [.1 ] ]     \end{tikzpicture}


title: '=' and '-' characters single quotation

text: I have a problem getting the **-** and **=** characters between single quotations. ``-'` and ``='` both produces `-'` in the generated pdf. If I put an alphabetical character between ``` and `'` it works as expected. I guess `-` and `=` are special characters. How do I treat them? MWE:               \documentclass[12pt]{report}          \def\magyarOptions{defaults=hu-min}          \usepackage{t1enc}           \usepackage{times}           \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{latexsym}     \usepackage{fancyhdr}      \usepackage{array}     \usepackage{graphicx}     \usepackage{listings}     \usepackage[usenames,dvipsnames]{color}     \usepackage[toc,page]{appendix}     \usepackage{float}     \usepackage{alltt}     \usepackage{anysize}     \usepackage{hyperref}     \usepackage[utf8]{inputenc}     \usepackage[magyar]{babel}     \usepackage[section]{placeins}     \usepackage{subcaption}     \usepackage{caption}     \usepackage{tikz}     \usepackage[shortlabels]{enumitem}     \usepackage{longtable}     \usepackage{mathtools}     \usepackage{setspace}     \usepackage{csquotes}          \begin{document}          Hello TeX! This is how I try to add single quotation marks before and after the characters `-' and `='.          \end{document}


title: Tikz flow chart and beamer

text: I am creating a beamer presentation. I have following tikz flow chart. The problem is the chart appears to be cluttered and is not accomodated on a single slide. Here is the code               \documentclass[12pt,a4paper]{beamer}     \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \usepackage{graphicx}     \usepackage{lmodern}     \usetheme{CambridgeUS}     \usefonttheme{professionalfonts}     \usepackage{tikz}     %\usetheme{AnnArbor}     \author{Dr Vaibhav Banait}     \title{Dysphagia - a serious symptom}     \begin{document}     \begin{frame}     \maketitle     \end{frame}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{frame}{Dysphagia}     \begin{center}          % Define block styles     \tikzstyle{block} = [rectangle, draw, fill=blue!20,          text width=5em, text centered, rounded corners, minimum height=4em]          \begin{tikzpicture}[scale=0.15, node distance=2cm, auto]         % Place nodes         \node [] (Dysphagia) {Food sticks in chest after swallowing};         \node [ below of=Dysphagia] (Esophageal){Esophageal dysphagia};        \node [ below left  of=Esophageal] (Mechanical) {Solids only };      \node [ below of = Mechanical](Mechanical1){Mechanical};         \node [ below left of =Mechanical1](Intermittent){Intermittent};         \node [ below right of =Mechanical1](Progressive){Progressive};         \node [ below left of =Progressive](heartburn){Chronic heart burn};     \node [below of=heartburn](peptic){Peptic stricture};     \node[below right of =Progressive](age){Age more than50};        \node[below of =age](ca){Ca Esophagus };      \node [below of =Intermittent](Web){Esophageal web };     \node [below right of=Esophageal](Solidliquids){Solid and liquids=motor };          \node[below right of =Solidliquids](Intermittent1){Intermittent };     \node[below left of =Solidliquids](Progressive1){Progressive};     \node [below of =Intermittent1](chestpain){Chest Pain};     \node [below of =chestpain ](DES){Diffuse esophageal spasm};     \node [below left of = Progressive1](heartburn1){Chronic heart burn};     \node [below of =heartburn1](scleroderma){Scleroderma};     \node [below right of = Progressive1](resp){Respiratory symptoms};     \node[below of =resp](achalasia){achalasia};         % Draw edges      \path [draw] (Dysphagia)--(Esophageal);     \path [draw] (Esophageal)--(Mechanical);     \path[draw](Esophageal)--(Solidliquids);     \path[draw](Mechanical)--(Mechanical1);     \path[draw](Mechanical1)--(Progressive);     \path[draw](Mechanical1)--(Intermittent);     \path[draw](Progressive)--(heartburn);     \path[draw](Progressive)--(age);     \path[draw](heartburn)--(peptic);     \path[draw](age)--(ca);     \path[draw](Intermittent)--(Web);     \path[draw](Solidliquids)--(Intermittent1);     \path[draw](Solidliquids)--(Progressive1);     \path[draw](Intermittent1)--(chestpain);     \path[draw](Intermittent1)--(DES);     \path[draw](Progressive1)--(resp);     \path[draw](resp)--(achalasia);     \path[draw](Progressive1)--(heartburn1);     \path[draw](heartburn1)--(scleroderma);        % \path [line] (Vaibhav) -- (Vibhor);          \end{tikzpicture}                         \end{center}               \end{frame}          \end{document}


title: The package zhnumber without xeCJK

text: I need to use the function `zhdigits` from the package `zhnumber` to typeset a counter the way I want, i.e. convert 235 to 二三五. This package requires the package `xeCJK` to work properly, but `xeCJK` messes up my quotation marks, so I would rather not use it. Is it possible to implement `zhdigits` without `xeCJK`? That is, implement a fuction that converts a string of charaters to another string of characters according to the below mapping:               1 ↦ 一     2 ↦ 二     3 ↦ 三     4 ↦ 四     5 ↦ 五     6 ↦ 六     7 ↦ 七     8 ↦ 八     9 ↦ 九     0 ↦ 〇


title: How to add the total marks using probsoln

text: I am trying to add the total marks at the end of an exam paper using probsoln. All the questions are in a seperate file and I just use `\loadallproblems` to add them to the exam paper. I add the number of marks for each question in the "Question File" with `\marginpar{[\marklabel{2}]}`. Is there any way (other than adding it manually!) to add all the marks together and add this number at the bottom of the exam paper? Here is the code I am using, I can't find any way to add this total:               \documentclass[a4paper]{report}     \usepackage{probsoln}     \newcounter{myprob}     \newenvironment{myproblems}       {\par\setcounter{myprob}{0}}       {\par}     \newcommand\MyProb{%       {\par\medskip\centering\refstepcounter{myprob}{\LARGE \bfseries Question : Vraag \arabic{myprob}}\par\bigskip}%       }          \renewcommand{\solutionname}{\bfseries MEMORANDUM}      \loadallproblems{Questions}           \showanswers          \begin{document}          \begin{myproblems}     \foreachproblem{\MyProb\thisproblem}     \end{myproblems}          \end{document}     \endinput      Would appreciate any help!!


title: Creating Kindle-friendly versions of existing LaTeX documents

text: So let's say I have a large amount of documents (from ArXiv.org, suppose) that I have the LaTeX source for, and for which I would like to compile particularly Kindle-friendly versions. In particular, I would like to accomplish some combination of the following things:   * Generate at specifically 1200x824 and/or 600x800 resolution   * Make margins as small as possible since screen real estate is precious on the Kindle   * Generate diagrams directly to 4-bit grayscale (the Kindle will do this conversion anyway, but I have a feeling it will be easier if the diagrams are just generated that way)   * Do not draw boxes around links/references in the paper. These are useful on a computer but they still show up on the Kindle where it's not possible to click or select them anyway. Does anybody know of the easiest way to apply settings such as these to a large number of document source files?


title: Line up captions on side by side figures

text: I want to place two (or more) figures with side by side. The figures are independent, so need separate captions, with no overall caption for the two. I know how to do this with minipages within a figure environment. But the captions don't line up without trail and error `\vspace`'s before the individual captions. Is there a way to line up the captions automatically?


title: Source specials for PDF?

text: Normally I write my LaTeX with Emacs/AUCTeX viewing in xdvi, which has the very nice "source specials" feature that I can hit a key command in Emacs to jump to the current location in the output dvi file in xdvi, and likewise I can click on a location in xdvi and have Emacs jump to that location in the source file. But sometimes, notably when using TikZ, I need to compile with pdflatex. Is there any source-specials-like feature for PDF files which works with AUCTeX? I'd be willing to switch to any PDF viewer that will run in Linux.


title: LaTeX challenge: how to reproduce this layout and typography

text: I would like to create a document in latex (whatever `\documentclass`) to reproduce the layout below and its typography style. I'd like to know if there is any open font at FontSquirrel or anywhere else, like the one in the picture. Let's break through my research in steps:   * The font seems Futura BT (see Edit 2)   * Which 'sectional header' style would you use?   * Which margins?   * Which `\documentclass` ? **memoir**? **EDIT:** I've found the origin of the book from where the image is taken. Is a book from the ISOTYPE collection. I added a useless (for the purpose of this question) photo below. **EDIT2:** Thanks to the comment from thrope, using identifont I discovered that the type-face is **Futura BT** (or BQ). I could buy a license for the font at linotype or I could find a free font like that somewhere. I'll post updates about this. * * * ![alt text](http://microspino- files.s3.amazonaws.com/TypographySamples/iso.png) * * * ![alt text](http://i.imgur.com/Ay7qN.jpg)


title: How can I make \cref{foo,bar} from cleveref work with htlatex?

text: I have the following `test2.tex` file:               \documentclass{article}     \usepackage{tex4ht}     \usepackage{etoolbox}     \usepackage{hyperref}     \AtEndPreamble{\usepackage{cleveref}}     \begin{document}     \section{foo}\label{foo}     \cref{bar,baz}     \section{bar}\label{bar}     \section{baz}\label{baz}     \end{document}      When I run `latex` twice, I get               D:\Documents\GitHub\book>rm test2.aux && latex test2.tex && latex test2.tex     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)     entering extended mode     (D:\Documents\GitHub\book\test2.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,     croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("D:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("D:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\usepackage.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\latex\etoolbox\etoolbox.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\misc\etex.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")     (D:\Documents\GitHub\book\ifxetex.sty)     ("D:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\auxhook.sty"          Package auxhook Warning: Cannot patch \document,     (auxhook)                using \AtBeginDocument instead.          ) ("D:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")     ("D:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")     ("D:\Program Files\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")     ("D:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\url.sty")          Package hyperref Message: Stopped early.          )          Package hyperref Message: Driver: htex4ht.          ("D:\Program Files\MiKTeX 2.9\tex\latex\hyperref\htex4ht.def")     (D:\Documents\GitHub\book\cleveref.sty)     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.4ht"     ::::::::::::::::::::::::::::::::::::::::::      TeX4ht info is available in the log file     ::::::::::::::::::::::::::::::::::::::::::     ) ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\color.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg")     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def")     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def"))     --- needs --- tex4ht test2 ---     (D:\Documents\GitHub\book\test2.tmp) (D:\Documents\GitHub\book\test2.xref)     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\latex.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\fontmath.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\article.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\hyperref.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\nameref.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\pd1enc.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\url.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\color.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\dvips.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\dvipsnam.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     No file test2.aux.          LaTeX Warning: Reference `baz' on page 1 undefined on input line 8.               LaTeX Warning: Reference `bar' on page 1 undefined on input line 8.          [1] (D:\Documents\GitHub\book\test2.aux)          LaTeX Warning: There were undefined references.               LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.           )     Output written on test2.dvi (1 page, 10112 bytes).     Transcript written on test2.log.     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)     entering extended mode     (D:\Documents\GitHub\book\test2.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,     croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("D:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("D:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\usepackage.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\latex\etoolbox\etoolbox.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\misc\etex.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")     (D:\Documents\GitHub\book\ifxetex.sty)     ("D:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\auxhook.sty"          Package auxhook Warning: Cannot patch \document,     (auxhook)                using \AtBeginDocument instead.          ) ("D:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")     ("D:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")     ("D:\Program Files\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")     ("D:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\url.sty")          Package hyperref Message: Stopped early.          )          Package hyperref Message: Driver: htex4ht.          ("D:\Program Files\MiKTeX 2.9\tex\latex\hyperref\htex4ht.def")     (D:\Documents\GitHub\book\cleveref.sty)     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.4ht"     ::::::::::::::::::::::::::::::::::::::::::      TeX4ht info is available in the log file     ::::::::::::::::::::::::::::::::::::::::::     ) ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\color.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg")     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def")     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def"))     --- needs --- tex4ht test2 ---     (D:\Documents\GitHub\book\test2.tmp) (D:\Documents\GitHub\book\test2.xref)     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\latex.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\fontmath.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\article.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\hyperref.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"     ("D:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\nameref.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\pd1enc.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\url.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\color.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\dvips.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\dvipsnam.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     (D:\Documents\GitHub\book\test2.aux)     ! Missing number, treated as zero.     <to be read again>                        <     l.8 \cref{bar,baz}          ?      What's going wrong, and how do I fix this?


title: Several strings in one biblatex-field -- multiple references

text: As I understand it, biblatex-fields as `eprint` and `related` accept one and only string/key, though I want them to refer to two or more items/addresses. To give an example which might make it clear what I mean (the example needs three runs: latex --> biber --> latex):               \begin{filecontents}{MyBib.bib}     @Article{Barney:Notes,       author =   {Rachel Barney},       title =    {Notes on Plato on the \mkbibemph{Kalon} and the Good},       journaltitle = {Classical Philology},       year =     2010,       commentator =  {Paula Gottlieb},       eprint =   {10.1086/657026, 10.1086/659326}, %the first number is                                          % the article, the second one the                                          % comment, which I want to appear in one entry       eprinttype =   {jstor},       volume =   105,       number =   4,       pages =    {363-77, 378-80} % the same as with eprint       }          @Article{Derrida:Pharmacie1-1,       author =   {Jacques Derrida},       title =    {La pharmacie de Platon},       journaltitle = {Tel Quel},       year =     1968,       volume =   32,       pages =    {3-48}     }          @Article{Derrida:Pharmacie1-2,       author =   {Jacques Derrida},       title =    {La pharmacie de Platon},       journaltitle = {Tel Quel},       year =     1968,       volume =   33,       pages =    {18-59}     }          @InBook{Derrida:Pharmacie2,       title =    {La pharmacie de Platon},       year =     1993,       bookauthor =   {Jacques Derrida},       author =   {Jacques Derrida},       gender =   {sm},       booktitle =    {La Diss{\'e}mination},       bookauthor =   {Jacques Derrida},       publisher =    {{\'E}dition Points},       location =     {Paris},       pages =    {77-213}, % perhaps: {77-148, 149-213}       related =  {Derrida:Pharmacie1-1}, % both articles are reprinted in one book,                        % the unity of the deconstructed separation, which might duly be called                                % the voice of the separated unification as voiced deconstruction                               % of no-pposites       related =      {Derrida:Pharmacie1-2},       relatedstring ={Nachdruck von}     }     \end{filecontents}     \documentclass{scrartcl}     \usepackage{filecontents}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \input{ix-utf8enc.dfu}     \usepackage[english]{babel}     \usepackage{xpatch}     \usepackage[pdftex]{hyperref}     \usepackage{csquotes}     \usepackage[style=philosophy-modern, sorting=nyvt,                 backend=biber, citetracker=constrict,                 opcittracker=constrict,                  idemtracker=constrict, relatedformat=parens,                  autolang=hyphen, clearlang=true]{biblatex}     \addbibresource{MyBib.bib}     \begin{document}          \nocite{*}     \printbibliography     \end{document}      If I separate the two keys with a comma in the Derrida-case, I get the reference two times, separated by a line-break.


title: Will reusing \sbox-ed cmds reduce DVI/PDF size?

text: I wonder wheither reusing `\sbox`'es decreases only `.tex` code or also its final output whether DVI/PDF/... i.e. does TeX expand them while writing DVI or PDF or does the viewer do that? For example `gnuplot` doesn't use `\sbox`'es for identical tickmarks on opposite sides of a plot.


title: Set an image as transparent background watermark

text: I'm realizing my first presentation in beamer. I'm thinking about setting an image (the logo of my institute) as a background for all the frames. The image should be quite transparent, because there will be a text above it, and be placed in the center of the frame, full screen. Is it possible? How?


title: Typesetting question in WinEdt 8.0

text: I recently started using WinEdt 8.0 to tex up my papers, and when I typeset my files it opens up Adobe to view the Pdf version of my file. However, I remember when I used to use WinEdt a while back (I forget the version), it would open the Pdf file within the WinEdt system itself, without opening Adobe. Moreover, when it opened it from within the system it would bring me right to where my last edit was made in the file, where as now when it opens it with Adobe I have to start from the beginning each time. So how can I change my preferences so that it doesn't open Adobe each time that I typeset my file? Thanks!