title: How is expl3 typed?

text: In developing an `expl3` add-on package, I want to continue the trends set in the language I'm working in and _not_ introduce new patterns. Can anybody speak for the typing model (if any) that is followed in `expl3`? Specific things that I'm looking for are:   * Strong vs. Weak   * Static vs. Dynamic (although such strict categorization may be dubious)    * Any type safety? * * * From the comments: > it is the underlying language concepts by which that 'data type' has a > 'type.' What makes a `seq` a `seq`? What's to say it isn't a `clist`, or a > `coffin`? What happens in the even of 'mismatched' types, as in the > following? >   >   >     \seq_new:N       \some_seq >     \seq_push:Nn     \some_seq {some item} >     \clist_set_eq:NN \l_tmpa_clist \some_seq >     \clist_item:Nn   \some_seq 5 >   > > That kind of thing.


title: Highlighting for viml in latex?

text: I want syntax highlighting for vim scripts in my latex document. So if I write               \begin{lstlisting}     autocmd FileType c setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4     \end{lstlisting}      it should highlight this viml source. I googled around but did not get any good result, as google does not understand what I want. So maybe it is my fault because I don't know how to use google, or it is googles fault because it is not able to understand me. Are there any packages/settings/foobar which help me to do this?


title: Automatic Capitalization of sectioning headings?

text: Is there anyway to make LaTeX automatically capitalize sectioning headings? That is, I would like this to generate a capitalized headline:               \documentclass{article}     \begin{document}     \section{This should be in title case.}     But it isn't.     \end{document}


title: Middle English Yogh character

text: I was wondering if anyone knows of a package which supports the Middle English character yogh - that's Ȝ (U+021C) ȝ (U+021D). In TIPA, there is the character ezh - that's Ʒ (U+01B7) ʒ (U+0292). Ezh is very similar to yogh and is listed as yogh in TIPA, but I specifically need the Middle English letter used in transliterating runes. I could use XeTeX to simply insert the character using a different font, but since thorn (Þ (U+00DE) þ (U+00FE)) eth (Ð (U+00D0) ð (U+00F0)) ash (Æ (U+00C6) æ (U+00E6)) and wynn (Ƿ (U+01F7) ƿ (U+01BF)) are all available, I was hoping to maintain consistency. I'd also really like to be able to typeset it in the typewriter text style as - so far, in the rest of my document - all transliterations have been typeset in that style.


title: Automatically generate new commands with symbol names

text: As an extension of my earlier question Automatically generate new commands, I want to generate commands for Greek random variables as well, that is:               \usepackage{bm}     \newcommand{\myrv}[1]{\bm{#1}}     \newcommand{\rvepsilon}{\myrv{\epsilon}}     \newcommand{\rvnu}{\myrv{\nu}}      Unfortunately, the tricks in the answers to the earlier question don't work in this case. For example, when I tried               \documentclass{article}          \usepackage{bm}          % Notation for Greek random variables     \newcommand{\myrv}[1]{\bm{#1}}          \makeatletter     \newcommand*\defrvar[1]{       \expandafter\newcommand\csname rv#1\endcsname[1][]{\myrv{#1}}}          \newcommand*\defrvars[1]{       \@for\@i:=#1\do{\expandafter\defrvar\expandafter{\@i}}}     \makeatother          \defrvars{epsilon,nu}          \begin{document}     $\rvepsilon = 1$     \end{document}      The output is " **epsilon** = 1" instead of the desired output " **ε** = 1". Is there a way to define the commands automatically by looping over a list, say `{alpha,beta,gamma,...}`?


title: aboxed across multiple alignment

text: I would like to have the entire last line in a box, but when I compile, it only boxes the first equation and doesn't even print the second equation. Does anyone know how to fix this? Here's my MWE.               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{mathtools}          \begin{document}          \begin{alignat*}{3}         \left| x \right. & \left. - 2 \right| & &=1 &\\         x - 2 &= 1& &\text{ or } & x - 2 &= -1\\         \Aboxed{x &= 3& &\text{ or }& x &= 1}     \end{alignat*}          \end{document}      I was going to include an image of what it produces, but it won't let me since I'm a new user. :)


title: Which bibliographystyle for lastchecked and URL attribute?

text: I noticed that `lastchecked` and `URL` are non-standard attributes for a bibTeX files, which is kind of strange nowadays, but that's a different matter. I tried to use `@misc{...}` with `itmalpha` style, but my document doesn't show the two attributes. Which style can I use for it to display, which doesn't mess up my other references, which are articles and incollections (for now).


title: looking for selective latex command replacement methods

text: I have a perl script for generating wordpress (or physicsforums or wikipedia) style latex markup from standalone latex files, but it has grown into a bit of a monstrosity and has also recently met it's match, so I'm looking for options. My script has support for many of the simple commands I use, such as:               \newcommand{\lr}[1]{\left(#1\right)}     \newcommand{\Ba}[0]{\mathbf{a}}     \newcommand{\Bb}[0]{\mathbf{b}}     \newcommand{\acap}[0]{\hat{\Ba}}     \newcommand{\bcap}[0]{\hat{\Bb}}     \newcommand{\ccap}[0]{\hat{\Bc}}     \newcommand{\inv}[1]{\frac{1}{#1}}     \newcommand{\cross}[0]{\times}     \newcommand{\abs}[1]{\lvert{#1}\rvert}     \newcommand{\norm}[1]{\lVert{#1}\rVert}     ...      but all these are hardcoded in the perl, and not based on the .sty file that I've stuffed these into (i.e. brutally ugly and non-extendable way of doing things). I was hoping that there is something that could do just simple \newcommand replacement, ideally, given a file that is also \include'd or \usepackage'd and eliminate it from the latex text, replacing all the commands it contained. I know of and have tried a few other methods for this sort of task, such as:   * Luca's wordpress to latex.    * I found GPP referenced in this post, but attempting to use 'gpp -T' seemed to have no effect other than incorrectly stripping out a few @ symbols. I'm guessing that 'latex style' for this program still requires manual alteration of the latex commands to use some sort of special syntax.   * In http://tex.stackexchange.com/a/3181/15 was a note to try \tracingmacros1. Trying that I found the output was huge, and even after filtering it was huge: $ grep --binary-files=text -e '->' latexStdout.txt > q $ wc -l q 6148361 q This also didn't give any indication where each of the macros came from and would be hard to use for a more selective replacement. The trace package was referenced in a comment as having better output than plain \tracemacros1, but I found what it produced pretty incomprehensible.   * The answer points out a de-macro package, but if I try that I get a python error that I don't know how to deal with: File "./de-macro", line 643, in scan_numargs raise "%s must be argument number after %s" % (numargs, name) TypeError: exceptions must be old-style classes or derived from BaseException, not str I see hints that there isn't a latex grammar available that could be used to write a more robust standalone latex to latex preprocessor. In other questions where people asked for latex preprocessors, there were suggestions to use \listfiles, which is nice but not helpful for selective replacement. Conceptually, I would think this would be an ideal job for latex itself, since it already knows how to do the parsing. I'd imagine that for somebody who knew the latex backend, it might not be too hard to create a new output mode that was latex-text, but one with selective command preprocessing performed. I'm assuming that no such method exists, but I thought that it was worth asking about. If such a mode does not exist, has anybody scoped out the work that would be required to use latex itself for this task?


title: Help with the rest of a preamble for CV

text: Thanks to users in this forum I have got an really good start to LaTeX and have got a lot of help with my preamble. Now I need some help at the end. :-) Preamble so far:               \documentclass[a4paper, 10pt]{memoir}          \usepackage{framed, xcolor}%to make boxes and colours          \usepackage[T1]{fontenc}     \usepackage{graphicx,fix-cm,kpfonts}          \usepackage{anyfontsize}%manipulate with font size          \pagestyle{empty}          \usepackage[left=0cm,right=0cm,top=0cm,bottom=0cm]{geometry}               \begin{document}     \sffamily     \noindent     \raisebox{-\fboxsep}{\includegraphics[width=\dimexpr3in+2\fboxsep\relax,height=\dimexpr3in+2\fboxsep\relax]{example-image-a}}%     \colorbox{gray!50}{\parbox[b][3in][b]{3in}{\fontsize{30}{36}\bfseries\scshape\textcolor{green}{M}arie \textcolor{green}{M}uster}}%     \par     \vspace{-0.3ex}     \noindent     \colorbox{black!70}{\parbox[b][3in][b]{3in}{%     \raggedleft     \textcolor{white}{\textbf{\textsc{\LARGE Bewerbung}} als \textbf{\textsc{\LARGE Assistentin}}}\\     \textcolor{green}{\rule{2in}{0.5pt}}\\     \textcolor{white}{im \textbf{Bereich Biochemie}}     }}%     \colorbox{olive}{\parbox[b][3in][t]{3in}{%     \color{white}     Am Musterweg 22\\     12345 Musterstadt\\     Telefon 0 25 06 / 12 34 56\\     E-mail: Marie.Muser@Provider.de     }}          \end{document}      And it would be nice if it could look like that at the end: Endproduct.   * It would be nice if someone would help me: to place the boxes in correct in the PDF. I thought it could use \centering but then I saw that on exemplary (pls see the link) it wasn*t in the middle. So how to place the boxes like in the exampel? How to change the colors with by using HTML? Here the colors (HTML):   * color of the box right under: 5b8601 color of the box left unde: 5a5a5a color of the left over box: bfbfbf color of the line on the under right box and the M's in the upper right: box 669b03 Thank you very much so far and in advance. PS! I used GIMP to find out which color it was. PPS! Please just use LaTeX and not XeLaTeX or other stuff (I am a newbeginner and want to learn LaTeX at the verty begninning :-) )


title: Shorttitle in collections in biblatex

text: I'm using the style verbose-trad2 in `biblatex`. I have some bibliographical `incollection` items which refer to a `collection` item via the field `crossref`. The `collection` item has a `shorttitle` item which unfortunately is not being used, as you can see in this MWE:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[style=verbose-trad2]{biblatex}     \addbibresource{stack2.bib}     \begin{document}       The first one\footcite{vasquez1998bajo}. \par            And then\footcite{negredodelcerro1998}.     \end{document}      And the items:               @collection{MartinezRuiz1998,      editor =       {Martínez Ruiz, Enrique},      title =        {España y Suecia en la época del Barroco (1600-1660)},      shorttitle =   {España y Suecia},      year =         1998,      location =     {Madrid},      }          @InCollection{negredodelcerro1998,      author =       {{Negredo del Cerro}, Fernando},      title =        {Contradicciones en la Monarquía Católica},      pages =        {667-685},      crossref =     {MartinezRuiz1998}      }          @InCollection{vasquez1998bajo,      author =       {Vasquez Lopera, Julián},      title =        {Bajo el signo de la diplomacia etc.},      crossref =     {MartinezRuiz1998},      pages =        {761-791}      }      Is there a way to force biblatex to check whether a `collection` item has been already cited through an `incollection` item?


title: moving an entire psmatrix environment

text: For some reason, my psmatrix is too low on the page. I want to raise it to the top of the page. I tried using an "offset" parameter:               \begin{psmatrix}[colsep=0,rowsep=1.3,offset=5]      but this apparently had no effect. EDIT: Here is an MWE. Note that I use the first line, with the "makebox" commands, in order to set the column widths for the rest of the table (which is not shown here).               \documentclass[english]{article}     \makeatletter     \usepackage[pdf]{pstricks}     \usepackage{pst-node}      \makeatother     \begin{document}     \begin{psmatrix}[colsep=0,rowsep=1.3,offset=5]       \makebox[0cm]{} & \makebox[7cm]{} & \makebox[7cm]{} & \makebox[7cm]{} \\       a      &       b      &        c      &       d     \end{psmatrix}     \end{document}


title: How to prevent globally and strictly Overfull by relaxing Underfull or justification?

text: To suppress overflows, on one extreme, we have ragged layouts which suppress justification :               \usepackage{ragged2e} % http://tex.stackexchange.com/questions/168480/why-does-tex-prefer-an-overfull-box-to-hyphenating-here     \RaggedRight      On the other extreme, we have standard justified text and one can use `\sloppy` which does not solve every problem anyway. Both leads to ugly things _for me_. At this point, I have come to:               \usepackage{hyphenat}     \hyphenpenalty=750     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[babel=true,kerning=french,protrusion=true,expansion=auto,spacing,tracking]{microtype}     \pretolerance=1500     \tolerance=2000     \setlength{\emergencystretch}{2em}      Which is the best solution I could come to, for my usage (French has compound words and apostrophes which deal badly with hyphenation - for compound words, I use `\BreakableHyphen{}`). Good discussion here and here. But ideally, I would like standard tolerance and in some exceptional cases, relax the justification and replace it with a left alignment. But I want that parameterized in the preamble because I want the users to parameterize the format of the eBooks they will get, and want them to fit right without control. So local solutions are prohibited here. What I imagine would be something like:               % previous lines identical     \pretolerance=300     \tolerance=500     \setlength{\emergencystretch}{2em}     pseudo-code: if (overflow) then underflow the current line by moving the last word to the next line      Any idea please?


title: Rounded corner box with shading (one side round corner box)

text: Is possible to get the one side round corner with shaded box through PSTricks? I am using the command `\psframe[linewidth=0.5pt,framearc=6,fillstyle=solid, fillcolor=gray!30,linecolor=gray!30]` and I am getting the output - four side round corner box, but I need bottom of the right side corner only rounded, remaining side as square. Find the example below:               \documentclass{article}%     \usepackage{showframe}%     \usepackage{pstricks}%     \psset{yunit=1pt}%     \psset{xunit=1pt}%     \psset{linearc=10pt,cornersize=absolute}%          \makeatletter%     \newbox\mybox%     \newcommand{\lastcornorovalbox}[1]{%                \setbox\mybox=\vbox{\vskip6pt\hsize\textwidth\leftskip6pt\rightskip6pt#1\vskip6pt}                 \setlength{\@tempdima}{\the\ht\mybox}                \noindent\psframe[linewidth=0.5pt,framearc=20,fillstyle=solid, fillcolor=gray!30,linecolor=gray!30](\textwidth,\@tempdima){\vbox{\vskip6pt\hsize\textwidth\leftskip6pt\rightskip6pt#1\vskip6pt}}}     \makeatother          \begin{document}          \lastcornorovalbox{Sample text Sample text   Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text   Sample text Sample text Sample text Sample text   Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text   Sample text Sample text Sample text Sample text   Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text Sample text   Sample text Sample text}               \end{document}


title: displaystyle, dfrac, dcases

text: 1. Am I correct in saying that the `dcases` environment replaces `\frac` with `\dfrac`? The replacement only occurs at the outer-most level of `\frac`, so if I have               \documentclass{article}     \usepackage{mathtools}     \begin{document}     $$     \begin{dcases}     \frac{arg1}{arg2 \frac{arg3}{arg4}}     \end{dcases}     $$     \end{document}      Only the `\frac` corresponding to `\frac{arg1}{arg2}` gets replaced with `\dfrac`.   2. Is `\dfrac{arg1}{arg2}` equivalent to `\frac{\displaystyle arg1}{\displaystyle arg2}`?              \documentclass{article}     \usepackage{mathtools}     \begin{document}     $\dfrac{arg1}{arg2}$     $\frac{\displaystyle arg1}{\displaystyle arg2}$     $\frac{arg1}{arg2}$     \end{document}        3. Where does `\displaystyle` (and `\textstyle`) take effect? `{\displaystyle var_1 var_2 \cmd1 \cmd2}`              \documentclass{article}     \usepackage{mathtools} % The page-size might be larger with mathtools     \begin{document}     $\displaystyle \sum_a^b \sum_a^b \frac{a}{\sum_c^d}$          $\sum_a^b \displaystyle \sum_a^b$          $\sum_a^b \sum_c^d \displaystyle\frac{\sum_e^f}{\sum_g^h}$          $\sum_a^b \sum_c^d \frac{\displaystyle \sum_e^f}{\sum_g^h}$     \end{document}        4. Lastly, for certain commands like `\sum` the `\displaystyle` has non-size related effects. However, for other objects like `\frac`, `\displaystyle` seems to change the size of the variable and some vertical spacing. Is there a set of style-rules to know when to use `\displaystyle` vs. not, `\dfrac` vs. `\frac`, `\dcases` vs. `\cases`?


title: Ovalbox with fixed corner diameter

text: I wish to use `\Ovalbox` with a fix corner diameter. How can it be done? The problem is when I got a lot of text in the box, the corners run over the text.


title: 2-dimensional gradient using PGF

text: I'd like to draw a square with the fill color darkening as one goes up or as one goes to the right. So, the square should be darkest in the upper-right corner and lightest in the lower-left corner. Is there a way to do this using PGF commands?


title: How Do I Horizontally Center An Operator Relative To Aligned Equations Above and Below

text: I want to achieve the following effect in a new enviornment I'm defining where the stuff inside what's supposed to be delimeters is a \begin{aligned} \end{aligned} block.               \begin{equation}                            /    math math math math math \     (outside aligned)|               \lor            |                      \     math math                 /     \end{equation}      This is all straightforward except I want to center the \lor inside the aligned equations, i.e., center it between the two delimiters. How do I do this in a macro (no hand setting alignment characters)? Do I need to make the \lor a middle delimiter or something? Note sometimes the outside delimiters may need to be invisible if not absent entirely but \lor should still be centered inside the aligned environment.


title: Making uppercase in natbib "dcu"

text: How can i replace first letter of each word of bibliography with uppercase in with format dcu?![enter image description here](http://i.stack.imgur.com/TUSd1.jpg) For example I want to transform 'PhD thesis' with 'PhD Thesis' automaticly or 'conference on Winter simulation' with 'Conference on Winter Simulation'. Thanks!


title: pgfplots 1.9 on Mac

text: I have an iMac with TeX Live 2011. It came with `pgfplots` version 1.4, which I am able to use without a problem. I just downloaded `pgfplots` version 1.9 which has new environments like polar axis, smith chart, etc., which I like to use. How can I install downloaded package of `pgfplots` 1.9 on my iMac? Can I place it in `texlive/2011/texmf-var`? Should I do anything after that? Also I have TeXShop for editing my TeX files. My OS is 10.6.8. Kindly help.


title: Problems with xelatex and arc in tikz

text: When I use `\setdefaultlanguage{thai}` and `arc` command, output not smooth. How to set my XeLaTeX code? I think this ploblem about thai scale, or not.               \documentclass{article}     \usepackage{polyglossia}     \setdefaultlanguage{thai}     \newfontfamily{\thaifont}{Microsoft Sans Serif}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw (0,0) arc (-120:175:1cm);     \end{tikzpicture}     \end{document}


title: Change the output format of \cref from table to Table and from eq. to Equation

text: if you use \cref then you get references as eq. (1) / table (1) / fig. (1) but I want it to produce Equation 1 / Table 1 / Figure 1 how to I set this? I also want to know if it is possible to use cleveref without hyperref ... or change the link boxes to elegant underlines ... MWE:               \documentclass[12pt,a4paper,fleqn]{book}     %     \usepackage{amsmath,amssymb}     \usepackage{hyperref}     \usepackage{cleveref}          \title{hfvj}     \author{fgikf}     \date{}          \begin{document}          \begin{equation}     E=mc^2 \label{eq1}     \end{equation}          \begin{table}[htbp]     \scriptsize\addtolength{\tabcolsep}{-2pt}     \centering     \begin{tabular}{lll}     Cube  & CUBEMEMBER & Returns a member or tuple in a cube hierarchy \\     Cube  & CUBEVALUE & Returns an aggregated value from a cube \\     Cube  & CUBESET & Defines a calculated set of members or tuples by sending a set     expression to the cube on the server \\     Cube  & CUBERANKEDMEMBER & Returns the nth, or ranked, member in a set \\     Cube  & CUBEKPIMEMBER & Returns a key performance indicator name, property, and measure, and displays the name and property in the cell. \\     Cube  & CUBEMEMBERPROPERTY & Returns the value of a member property in the cube \\     Cube  & CUBESETCOUNT & Returns the number of items in a set \\     Database & DAVERAGE & Averages the values in a column of a list or database that match conditions you specify \\     \end{tabular}%          \caption{rsghs}\label{esrg}     \end{table}           \cref{esrg}          \cref{eq1}               \end{document}      ![\\cref format](http://i.stack.imgur.com/EgL6I.png)


title: How to respect 80-character limit per line of text in source code

text: Suppose I have a long line of _italicized_ text in a report or other document. If it is more than 80 characters long, I may want to move everything after the 79th column position to the next line in source code. But I don't want this to have any effect on the way the text is rendered (i.e. still just as one single italicized line). Is there a TeX command available as a line terminator that says to just pick up at the next source code line as though it was the same line? In my case, I am describing an experience in an `itemize` block:               \begin{itemize}     \item \textit{Describe some stuff that happened here and it is a long description that should be stopped at character 80 and continued on the next line, but can easily fit on a single line in the rendered document.}     \end{itemize}      If I manually restructure the source myself, it rendered with linebreaks at the places where I move the text to the next line:               \begin{itemize}     \item \textit{Describe some stuff that happened here and it is a long            description that should be stopped at character 80 and continued on            the next line, but can easily fit on a single line in the rendered            document.}     \end{itemize}


title: Is there a bibtex style that sorts references according to publication type?

text: > **Possible Duplicate:**   >  Sorting the bibliography by entry type I am updating my CV and I was wondering if there exists a way to sort publications according to their type (articles, inproceedings, and so on..).


title: Matlab2Tikz FaceColor Surfplot

text: I would like to export a surf plot, whose face color is for example green, out of MATLAB R2014a to latex with the aid of matlab2tikz. Unfortunately when i run pdflatex the face color now ranges from red to blue and is not green any more. Is there maybe a possible workaround? my MATLAB Code:               [X,Y] = meshgrid(-10:0.5:10);     Z = sin(sqrt(X.^2 + Y.^2) + eps)./(sqrt(X.^2 + Y.^2) + eps);     surf(X,Y,Z,'FaceColor','green','EdgeColor','black')     matlab2tikz('face.tikz', 'height', '\figureheight', 'width', '\figurewidth');      my Latex Code:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}     \begin{figure}     \centering     \newlength\figureheight     \newlength\figurewidth     \setlength\figureheight{8cm}     \setlength\figurewidth{12cm}     \input{face.tikz}     \end{figure}     \end{document}      Many thanks in advance Stefan **EDIT:** MATLAB produces: ![MATLAB](http://i.stack.imgur.com/aZVkX.png) Matlab2TikZ produces: ![Matlab2TikZ](http://i.stack.imgur.com/npfS3.png) Sorry, I first thought I could solve my problem, if someone can solve the "simple" problem...


title: @namedef and math mode

text: I am trying to do something simple: I want to be able to store and retrieve texts and equations via labels. In particular, I want something like               \labelput{<label>}{<text>}  % sets the label. Associates text to label.      \labelget{<label>}    % replaces by the text associated to label.       In the following MWE, the definitions work just fine in text mode. But it doesn't work in mathmode.               \documentclass{article}          \makeatletter     \newcommand\labelput[2]{%       \label{#1}%       \@namedef{label@store@content@#1}{#2}%       #2}     \newcommand\labelenvput[3]{%       \@namedef{label@store@content@#2}{#3}%       \begin{#1}%       \label{#2}%       #3%       \end{#1}}     \newcommand\labelget[1]{\@nameuse{label@store@content@#1}}     \makeatother          \begin{document}          Test this first in \labelput{test1}{text mode}.          Does \labelget{test1} work?  % yes, it does          Test this again in math mode.          \begin{equation}\labelput{eq1}{e = mc^2}     \end{equation}          Now let us try to retrieve equation \ref{eq1} with     $\labelget{eq1}$   % the \ref works, but the \labelget fails silently               But the following works      \labelenvput{equation}{eq2}{e = mc^3}          Retrieve     \[ \labelget{eq2} \]     \end{document}      So my questions   1. How to correctly use `\@namedef` in mathmode? Is there another command I should use instead?    2. Am I trying to reinvent the wheel?


title: certificate ending layout

text: ![certificate layout](http://i.stack.imgur.com/b5IPQ.png) How can I achive the above layout in latex? `Place` and `Name` should be on the same horizontal line, and so as `Date` and `En.No.`. `Signature`, `Name` and `En.No` should come on a same vertical line.


title: Biblatex: Changing the font of citation-marks and the references?

text: In my main text I use a roman font with oldstyle figures In all tables I use the same roman font, but with modern figures. Since some of the columns may consist of mainly figures and it looks abit clumsy when those figures are set in oldstyle. Since all my tables are within a `floatrow` object, I define the font as follows:               \usepackage{floatrow}     \usepackage{fontspec}     \newfontfamily\tablefont[Path=x]{fontname.otf}      \DeclareFloatFont{tables}{\tablefont}     \floatsetup[table]{font={tables}}      I use biblatex for my reference, as citation marks I use numbers. Now I found out that the citation marks are formatted according to the font of their direct environment. So In my maintext these citation numbers are modern, while in the tables they are oldstyle. But how can I change the formatting for the citation numbers, so they are consistent in the whole document. I would like to use custom font families for this. Aswell I would like to change the formatting of the Bibliography (`\printbibliography`) in the same way. Or is this directly related to the the floatfont declaration, and would these always override my citation format declaration? Been reading the biblatex manual, and I read something about \bibfont but don't know how I should be using this.


title: Some strange errors when moving from MikTex on windows to Ubuntu TeX.

text: I have some tex code that I used to compile successfully (actually, with some 3 non-important warnings) on Windows using MikTex. When I try to compile it on Ubuntu using:               tex composition-body.tex      I get the following errors:               rafid@MyLaptop:~/Desktop/Composition$ tex composition-body.tex      This is TeX, Version 3.1415926 (TeX Live 2009/Debian)     (./composition-body.tex     ! Undefined control sequence.     l.6 \title               {SOME TITLE}     ?      ! Undefined control sequence.     l.10 \author                 {SOME AUTHOR}          ?      ! Undefined control sequence.     l.40 \begin                {document}     ?      ! Undefined control sequence.     l.42 \maketitle          ?       Any idea why is that happening? By the way, I had to press "Enter" after every error for the compile to proceed! Just in case you need this, I am using the EuroGraphics template: http://www.eg.org/EG/Publications/guidelines UPDATE: I tried what was proposed by Lian, and now I am getting these errors:               rafid@MyLaptop:~/Desktop/Composition$ pdflatex composition-body.tex      This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)      restricted \write18 enabled.     entering extended mode     (./composition-body.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, loaded.     (./composition-body.aux)          ! LaTeX Error: The font size command \normalsize is not defined:                there is probably something wrong with the class file.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.40 \begin{document}          ?      ! Undefined control sequence.     l.42 \maketitle          ?           ! LaTeX Error: Environment abstract undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.44 \begin{abstract}          ?           ! LaTeX Error: Environment classification undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.59 \begin{classification}                             % according to http://www.acm.org/class/1998/     ?


title: Having several keys refer to the same bibliography entry

text: Is it possible to have several keys referring to the same bibliography entry (using `biblatex`+Biber)? For example, I'd like `\cite{Tolkien:1954:LordOfTheRings}` and `\cite{lotr}` to have exactly the same effect when used in a document (and produce only a single bibliography entry, when both are used in the same document).


title: Dynamic macros with csname and utf-8

text: I wrote the following commands for dynamic variable names and assignment               % in class file     \RequirePackage[ngerman]{babel}     \RequirePackage[T1]{fontenc}     \RequirePackage[utf8]{inputenc}          % in latex file     \newcommand{\rev}[2]{%       \expandafter\def\csname rev_\revprefix#1\endcsname{#2}     }          \newcommand{\grev}[1]{%       \ifcsname rev_\revprefix#1\endcsname%       \csname rev_\revprefix#1\endcsname     \fi}      This works for well for ASCII characters, e.g.               \rev{value1}{Test}     \grev{value1} % gives Test      but not for Umlauts (only in \rev)               \rev{value2}{Groß}     \grev{value2} % gives GroT1ss      I know, it has something to do with the internal character representation and expansion but I could not find out how to fix this. Any ideas? **Update [2014-01-15]** It is               \newcommand{\revprefix}{}      The problem only occurs in a TextField of hyperref:               \TextField[name=test, value=\grev{value2}]{test}


title: How to use tangle to merge to get a single merged file from original source and change files

text: I'm trying to read and understand the TeX source, but it is difficult to keep track of when I should be reading code from the original file and when I should be reading code from the change file. I would like to merge these files. So if I have `tex.web` along with `somechanges.ch` how can I merge these files together to get just one readable web file?


title: Why does the Tab key in Emacs jump to the middle of the line when editing a BibTeX file?

text: When I edit a BibTeX file with Emacs, pressing the Tab key takes me to the middle of the line, even when I am at the beginning of an entry. This is incredibly annoying. Any clue of why it is happening?


title: Add a border to textblock

text: I'm pretty new to latex, and what I am trying to create a simple treemap, by simple I mean _really_ simple. I have managed to produce a simple box at a given position and width, but I'm not too sure how to create a border around the textblock.               \begin{textblock}{200}(400,200)       \centering       \textblockcolour{red}       \vspace{20mm}         { \bfseries \Large Hello World }       \vspace{20mm}     \end{textblock}      My Example usage is below:               \documentclass{article}          \usepackage[a4paper]{geometry}     \usepackage[absolute,overlay]{textpos}       \setlength{\TPHorizModule}{1mm}       \setlength{\TPVertModule}{1mm}       \setlength{\parindent}{0mm}     \usepackage{color}               \begin{document}            \begin{textblock}{200}(400,200)         \centering         \textblockcolour{red}         \vspace{20mm}           { \bfseries \Large Hello World }         \vspace{20mm}       \end{textblock}          \end{document}      Any help would be appreciated.


title: Data manipulation in contour maps (x/y-axis and contour label)

text: I am using contour maps in pgfplots as part of CAD as well as documentation. Serving both purposes I would like to improve the readability of my contour maps, by multiplying x- or y-axis times a value. Similar for the contour labels. In this example, I would like an y-axis expressed in MHz instead of Hz (i.e. dividing by 1e6), and also a contour label expressed in muA (i.e. multiplying by 1e6). What is the best way of doing this?               \documentclass[10 pt]{article}     \usepackage{pgfplots,pgfplotstable}          \begin{document}          \pgfplotsset{/pgfplots/ylabel near ticks}     \pgfplotsset{/pgfplots/xlabel near ticks}          \begin{figure}[!htb]     \centering     \begin{tikzpicture}     \pgfplotsset{/pgfplots/height={0.5\linewidth},/pgfplots/width={0.50\linewidth}}     \pgfplotsset{/pgfplots/grid=both}          \pgfplotsset{/pgfplots/xmin=0,/pgfplots/xmax=64}\pgfplotsset{/pgfplots/ymin=10e6,/pgfplots/ymax=80e6}          \begin{axis}     \pgfplotsset{/pgfplots/xlabel={Setting~[-]},/pgfplots/ylabel={$f_\mathrm{clk}$~[Hz]}}     \pgfplotsset{y tick label style={/pgf/number format/fixed, /pgf/number format/fixed zerofill, /pgf/number format/precision=1}}%     \addplot[contour prepared, contour prepared format=matlab] table {in.data} ;     \node[draw,fill=white,below left] at (axis cs:60.8,76.5e6) {$\overline{i_n}$~[A]}; %x/y=x/ymin+0.95*(x/ymax-x/ymin)     \end{axis}          \end{tikzpicture}     \end{figure}          \end{document}      and in.data:               N FCLK IONOISE(299.0U)     6.71264e-008 7.00000e+000     4.25049e+000 8.00000e+007     4.00000e+000 7.25826e+007     3.75936e+000 7.00000e+007     2.97523e+000 6.00000e+007     2.56914e+000 5.00000e+007     2.23128e+000 4.00000e+007     2.00000e+000 3.55152e+007     8.96947e-008 8.00000e+000     4.89549e+000 8.00000e+007     4.51751e+000 7.00000e+007     4.00000e+000 6.05547e+007     3.95047e+000 6.00000e+007     3.15157e+000 5.00000e+007     2.65600e+000 4.00000e+007     2.17856e+000 3.00000e+007     2.00000e+000 2.82185e+007     1.12263e-007 8.00000e+000     5.54049e+000 8.00000e+007     5.11593e+000 7.00000e+007     4.64471e+000 6.00000e+007     4.00000e+000 5.32484e+007     3.73400e+000 5.00000e+007     3.08073e+000 4.00000e+007     2.71905e+000 3.00000e+007     2.00000e+000 2.28260e+007     1.12263e-007 9.00000e+000     2.00000e+000 1.47692e+007     4.00000e+000 1.23035e+007     8.00000e+000 1.19845e+007     1.20000e+001 1.17485e+007     1.60000e+001 1.15310e+007     2.40000e+001 1.12309e+007     3.20000e+001 1.10640e+007     4.80000e+001 1.12001e+007     6.30000e+001 1.18784e+007     1.34831e-007 1.60000e+001     6.18550e+000 8.00000e+007     5.71435e+000 7.00000e+007     5.32393e+000 6.00000e+007     4.53189e+000 5.00000e+007     4.00000e+000 4.68185e+007     3.50545e+000 4.00000e+007     3.25953e+000 3.00000e+007     3.09663e+000 2.00000e+007     4.00000e+000 1.78323e+007     8.00000e+000 1.72087e+007     1.20000e+001 1.68847e+007     1.60000e+001 1.66026e+007     2.40000e+001 1.61975e+007     3.20000e+001 1.59415e+007     4.80000e+001 1.59494e+007     6.30000e+001 1.65870e+007     1.57400e-007 1.50000e+001     6.83050e+000 8.00000e+007     6.31278e+000 7.00000e+007     6.00314e+000 6.00000e+007     5.51089e+000 5.00000e+007     4.00000e+000 4.09627e+007     3.93018e+000 4.00000e+007     3.80002e+000 3.00000e+007     4.00000e+000 2.62165e+007     8.00000e+000 2.35639e+007     1.20000e+001 2.29105e+007     1.60000e+001 2.24024e+007     2.40000e+001 2.16713e+007     3.20000e+001 2.11784e+007     4.80000e+001 2.10039e+007     6.30000e+001 2.18421e+007     1.79968e-007 1.30000e+001     7.47550e+000 8.00000e+007     6.91120e+000 7.00000e+007     6.68235e+000 6.00000e+007     6.48989e+000 5.00000e+007     6.01208e+000 4.00000e+007     8.00000e+000 3.16148e+007     1.20000e+001 3.03886e+007     1.39444e+001 3.00000e+007     1.60000e+001 2.96802e+007     2.40000e+001 2.88020e+007     3.20000e+001 2.81960e+007     4.80000e+001 2.78283e+007     6.30000e+001 2.85370e+007     2.02537e-007 1.30000e+001     8.26569e+000 8.00000e+007     8.00000e+000 7.81433e+007     7.50963e+000 7.00000e+007     7.36156e+000 6.00000e+007     7.46889e+000 5.00000e+007     8.00000e+000 4.24330e+007     1.14456e+001 4.00000e+007     1.20000e+001 3.97376e+007     1.60000e+001 3.87037e+007     2.40000e+001 3.73836e+007     3.20000e+001 3.64711e+007     4.80000e+001 3.57736e+007     6.30000e+001 3.64698e+007     2.25105e-007 1.00000e+001     9.68777e+000 8.00000e+007     8.51630e+000 7.00000e+007     8.34172e+000 6.00000e+007     1.20000e+001 5.11930e+007     1.41954e+001 5.00000e+007     1.60000e+001 4.92298e+007     2.40000e+001 4.73071e+007     3.20000e+001 4.60255e+007     4.80000e+001 4.49323e+007     6.30000e+001 4.55061e+007     2.47673e-007 9.00000e+000     1.11098e+001 8.00000e+007     1.13758e+001 7.00000e+007     1.20000e+001 6.62073e+007     1.60000e+001 6.18428e+007     2.03345e+001 6.00000e+007     2.40000e+001 5.87223e+007     3.20000e+001 5.69717e+007     4.80000e+001 5.53824e+007     6.30000e+001 5.57459e+007     2.70242e-007 7.00000e+000     1.48022e+001 8.00000e+007     1.60000e+001 7.73011e+007     2.40000e+001 7.19221e+007     2.97562e+001 7.00000e+007     3.20000e+001 6.93481e+007     4.80000e+001 6.71546e+007     6.30000e+001 6.72275e+007      Examples figures (please excuse me for my poor paint skills): ![Before](http://i.stack.imgur.com/p9TUZ.png) ![After](http://i.stack.imgur.com/yKxfW.png)


title: How to typeset the table of contents raggedright in memoir?

text: I basically have the same question as this one Table of contents: section titles ragged right but none of the two solutions there work with `memoir`. I want to typeset section etc. titles raggedright instead of justified. `tocstyle` just breaks when loaded with `memoir` and patching `\@dottedtocline` doesn't do anything. I also tried to change `\cftKaftersnumb` and `\cftKfont`, either of which should work according to my understanding of section 9.2 of the `memoir` documentation but neither definition works. Here my attempt so far, MWE adapted from lockstep's answer to the linked question.               \documentclass{memoir}     \renewcommand{\cftsectionaftersnumb}{\raggedright}     \renewcommand{\cftsectionfont}{\raggedright}     \renewcommand{\cftchapteraftersnumb}{\raggedright}     \renewcommand{\cftchapterfont}{\raggedright}          \newcommand*{\sometext}{%       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,       vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida       mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.       Donec vehicula augue eu neque.%     }          \begin{document}          \tableofcontents          \chapter{\sometext}          \section{\sometext}          \end{document}


title: Broken layout of colored tables with new version of colortbl package

text: we're having trouble with the new version of the colortbl package which breaks our layout of colored tables. With the new version of the colortbl package (2012/02/13 v1.0a) the layout is utterly broken: ![enter image description here](http://i.stack.imgur.com/SM75i.png) The old version (2001/02/13 v0.1j) gave a nice colored table as shown in the following picture: ![enter image description here](http://i.stack.imgur.com/qS1nN.png) Here's the MWE to reproduce the above tables:               \documentclass{article}          \usepackage[table]{xcolor}     \usepackage{colortbl}     \rowcolors{1}{orange}{white}      \arrayrulecolor{red}          \begin{document}          \begin{tabular}{|lcr|}     \firsthline     \multicolumn{3}{|>{\columncolor{red}}c|}{Table Header} \\     Debian & Ubuntu & Arch Linux \\     Jessie & Trusty Tahr & Rolling Release \\     \lasthline     \end{tabular}%          \begin{enumerate}     \item Even if the \texttt{columncolor} of the first row is red the color is     ignored completely.     \item The value „Jessie“ is not visible (it's in the pdf but with same color     as the background).     \item There is an orange box in the first column at the end of the table.     \item If \texttt{hline} is used issue 2 and 3 don't occur.     \end{enumerate}          \end{document}      Right now we have no idea why the behavior of the colortbl package (or maybe xcolor package?) changed so drastically. Any help/suggestions with this issue is appreciated.


title: Error when using pschart with LaTeX

text: Consider the following example:               \documentclass{article}          \usepackage{auto-pst-pdf,pstricks-add}     \usepackage{siunitx}          \begin{document}          \begin{figure}      \centering      \psset{        unit=4cm,        nodesepA=5pt,        nodesepB=-5pt      }       \begin{pspicture}(9,9)        \psChart[          userColor={blue!60,yellow!60,green!60,red!60},          chartNodeO=1.25,          shadow=true,          shadowsize=5pt        ]{1082, 1572, 2336, 643}{}{}        \rput(psChartI1){\SI{1082}{\square\km}}        \ncline{psChartO1}{psChart1}        \nput{0}{psChartO1}{Rism. med}        \rput(psChartI2){\SI{1572}{\square\km}}        \ncline{psChartO2}{psChart2}        \nput{90}{psChartO2}{Rism. uden}        \rput(psChartI3){\SI{2336}{\square\km}}        \ncline{psChartO3}{psChart3}        \nput{270}{psChartO3}{Skov m.m.}        \rput(psChartI4){\SI{643}{\square\km}}        \ncline{psChartO4}{psChart4}        \nput{0}{psChartO4}{Andet}       \end{pspicture}     \end{figure}          \end{document}      How do I make it compilable using `latex`? (If I use `pdflatex` with `-shell- escape`, everything is fine.) **Update** The following works when using `latex` \--> `dvips` \--> `ps2pdf`.               \documentclass{article}          \usepackage{pstricks-add}     \usepackage{siunitx}          \begin{document}          \begin{figure}      \centering      \psset{        unit=4cm,        nodesepA=5pt,        nodesepB=-5pt      }     \fbox{%       \begin{pspicture}(-0.98,-1.21)(1.44,1.17)        \psChart[          userColor={blue!60,yellow!60,green!60,red!60},          chartNodeO=1.25,          shadow=true,          shadowsize=5pt        ]{1082, 1572, 2336, 643}{}{}        \rput(psChartI1){\SI{1082}{\square\km}}        \ncline{psChartO1}{psChart1}        \nput{0}{psChartO1}{Rism. med}        \rput(psChartI2){\SI{1572}{\square\km}}        \ncline{psChartO2}{psChart2}        \nput{90}{psChartO2}{Rism. uden}        \rput(psChartI3){\SI{2336}{\square\km}}        \ncline{psChartO3}{psChart3}        \nput{270}{psChartO3}{Skov m.m.}        \rput(psChartI4){\SI{643}{\square\km}}        \ncline{psChartO4}{psChart4}        \nput{0}{psChartO4}{Andet}       \end{pspicture}     }     \end{figure}          \end{document}      The `\fbox` is used to find the correct coordinates for the bounding box.


title: MacTeX 2013 takes ages to compile

text: I am sorry that this is not a very specific question. Since I updated to 2013 I haven't been able to compile a single document. To be honest, neither did I let one of the many compilation processes I started run through in its entirety -- after 3 hours I usually gave up enervated. Before the update, compiling took between 3 and 10 minutes (my laptop is old, too). I use `LuaLaTeX`. Some of the steps in the process that seem to take ages:   * `(/usr/local/texlive/2013/texmf-dist/tex/latex/euenc/eu2enc.def`   * `(/usr/local/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty`   * defining? redefining? saving? doing something with the font shapes (something containing: `texlive/2013/texmf-var/luatex-cache/generic/fonts/otf/brill-roman-2.luc` \-- but I also tried to use standard fonts with no success) **Update:** I was just able to compile a document that was lacking `\usepackage{fontspec}`.


title: Fit the height of the chapter number to n-times the height of the chapter name

text: I would to get the chapter number tall n-times the chapter name in order to have a better proportion between the two elements. Why I get errors and how can I fix that behaviour? I thought something like this to include it:               \setbox4\hbox{\resizebox*{!}{\myheight}{\hspace{10pt}}}     \edef\hchapterspace{\the\wd4}      And use `\hchapterspace` but I get: `Package graphics Error: Division by 0 }` So the simplest way is:               ...\hspace{10pt}\vline\hspace{10pt}}\ }{0pt}      but is the same thing to use `{10pt}` as `\titleformat` argument? * * *               \documentclass[headinclude,footinclude]{scrbook}     \usepackage[eulerchapternumbers,pdfspacing]{classicthesis}     \usepackage{arsclassica}     \usepackage{lipsum}          \setbox10\hbox{\normalfont\Large\sffamily\spacedallcaps{\chaptername}}          \setbox20\hbox{\resizebox*{!}{\dimexpr\ht10*3\relax}{\chapterNumber\thechapter}}          \titleformat{\chapter}[block]%             {\normalfont\Large\sffamily}%             {{\color{halfgray}\box20%             \hspace{10pt}\vline}  }{10pt}%             {\spacedallcaps}          \begin{document}          \chapter{graphic test}     \lipsum[1-3]          \end{document}


title: Headers with vertical rule with Koma-Script

text: I am trying to obtain the following headers with `scrbook`: numbers half-way into the margin, a a rule that extends up to (touches) the upper edge of the page, running heads should be within text margins. (I also wanted to make chapter titles with chapter numbers extending beyond the margin and a vertical rule also extending up to the upper edge of the page, but I guess I'll leave it for another question.) So far I have come up with the following solution:               \documentclass[a4paper,DIV=classic]{scrbook}     \usepackage{scrpage2}     \usepackage{lipsum}     \addtokomafont{pagenumber}{\sffamily \bfseries}     \addtokomafont{pagehead}{\sffamily}     \addtokomafont{chapter}{\sffamily \bfseries}          \pagestyle{scrheadings}     \clearscrheadfoot          \setheadwidth[-0.5\marginparwidth]{textwithmarginpar}          \lehead{     \hspace{1em}\pagemark~~~\rule[-0.4ex]{0.4pt}{5mm}\hspace{2em}\headmark     }          \rohead{     \headmark\hspace{2em}\rule[-0.4ex]{0.4pt}{5mm}~~~\pagemark\hspace{1em}     }          \begin{document}     \chapter{Um Capítulo}     \lipsum[1-10]     \section{Uma Seção}     \lipsum[15-20]          \chapter{Outro Capítulo}     \lipsum[1-10]     \section{Outra seção}     \lipsum[15-20]          \end{document}      However, I couldn't find a way to increase the height of the rule (if it goes beyond a certain limit it is superposed to the text), and the running heads are not perfectly aligned with the text block margin.


title: How to write abstract and acknowledgement in book format?

text: I need to use this: `\documentclass[a4paper,11pt]{book}` I have a main.txt file that organizes all the chapter. There is `\frontmatter`. In the frontmatter, there is               \include{acknowledgement }     \include{abstract}     \include{dedication}      So, I created 3 files with this name. It kind of works. **BUT** it does not look like real abstract, ack... or dedication page. I tried similar to               \begin{abstract}     My text     \end{abstract}      Did not work. Can you please point me, how to add, abstract, dedication, acknowledgement?


title: Automatic IEEE referencing generator in LaTeX style?

text: Is there an automatic reference generator that produces citations in LaTeX style that I can use ? I want to use IEEE Citation Style. I have over 50 references that need to be cited, but typing them down manually will be hassle (looking back and forth on the referencing style tutorial)... There are many online, but none produce the results in a LaTeX format. I don't mind generating it and then copy-pasting the reference into my code, no need for it to be integrated with TexShop. In TexShop, I'm currently doing this manually such as :               \begin{thebibliography}{10}          \addcontentsline{toc}{chapter}{REFERENCES}          \bibitem{lowry1951protein}Lowry, O. H., Rosebrough, N. J., Farr, A. L., and Randall, R. J. (1951). Protein measurement with the Folin phenol reagent. \emph{J. Biol. Chem.}, 193(1), 265--275.          \end{thebibliography}


title: How to change the appearance of the AMS Article title

text: I am writing a document with `\documentclass{amsart}`. How do you change the appearance of the title in a document like this? It is set to all caps, bold, and a certain size. I can change it to italics with `\textit{}`, but I can't do anything else. I want to change the title to Large roman text. It seems like `\renewcommand{\title}` would work, but I don't know how to use this command. Thanks for your help!


title: Error "Script file install-getnonfreefonts not found" in Windows 7

text: I am a newbie in LaTex. I am following this tutorial for getting started LaTex in my Windows 7 32bit box. I noticed that while installing additional fonts, I am getting following error-               Script file install-getnonfreefonts not found


title: Quick Build commands in WinEdt

text: I recently switched from TeXMaker to WinEdt. In TeXMaker I was used to customize my 'Quick Build' command in the 'Configure TeXMaker' dialog. In that dialog I was able to choose, for example: > LaTeX + dvips + ps2pdf + View PDF or to customize it to my needs inserting, through the wizard: > PdfLaTeX + Bibtex + Makeindex + PdfLaTeX + PdfLaTeX + Pdf Viewer Does anyone knows a way to do the same in WinEdt?


title: More than 26 appendices

text: For my thesis I have a document that contains more than 26 appendices. The appendices 1 up to 26 are are alphabetical numbered as A up to Z. However at the 27th appendix I get an error (although I though that LaTeX would automatically number the 27th appendix as AA): `! Undefined control sequence. \GenericError ...   #4 \errhelp \@err@ ... l.1133 ...{Elaborated interview team leader} \label{appendixaa} ?` At line 1133 starts the 27th appendix. I was looking for the content of a generic error but are not getting anything wiser. I use sections in my appendix, because my documentclass is `article` which is more controlable in layout in my opinion:               \section{Elaborated interview team leader}\label{appendixaa}      Any idea how to solve this issue? **UPDATE 24/09/2013** I have done what Erreg suggested, but now the message is that `appendix.tex could not be found`: My mainfile (thesis.tex):                \documentclass[11pt,a4paper]{article}              \usepackage{appendix}         \usepackage{alphalph}          \renewcommand\thesection{\AlphAlph{\value{section}}}              \include{Sections/appendix}              \end{document}      In the map Sections, `appendix.tex` is the file with all appendices:               \appendix     \input{appendix}          \section{ appendix a}\label{appendixa}     \pb          \section{appendix b}\label{appendixb}     \pb          \setcounter{section}{25}          \section{appendix z}\label{appendixz}     \pb          \section{appendix aa}\label{apendixaa}     \pb          \section{appendix ab}\label{apendixab}     \pb          \section{appendix ac}\label{apendixac}     \pb      _**UPDATE:03/10/2013_** This is what i have now: thesis.text (main file):               \documentclass[11pt,a4paper]{article}          %Enabled packages     \usepackage{appendix}          \begin{document}          \tableofcontents               \include{Sections/appendix}          \end{document}      appendix.text (in the subfolder Sections):               \appendix          \setcounter{section}{24} % just to see the effect          \section{Twenty five}          \section{Twenty six}          \section{Twenty seven}      The error I get now is:               ! LaTeX Error: Counter too large.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.33 \section{Twenty seven}      Above example is the same as Ergg provided. Any idea? I do not see the light anymore.


title: New command to bold within small caps

text: I'd like to have a command to write a word in all small caps of equal size (no initial large capital letter), with a specified central portion in bold.               \mkboldcaps{Aver}{ag}{e}      would produce the output AVER **AG** E (no spaces) So far, I have the following command, which makes a word into all small caps of the small size:               \newcommand{\smallcaps}[1]{\textsc{\MakeLowercase{#1}}}      The trouble comes when I try to combine these. In the following command,               \newcommand{\makeboldcaps}[3]{\smallcaps{#1}{\textbf{#2}}\smallcaps{#3}}      the middle portion is successfully made bold, but it is not in small caps. Adding a \textsc to the central portion messes up the rest of the command. Any suggestions?


title: "Cannot open log file" - Kile is not able to identify log file location

text: I am using kile for my latex documentation. I wanted to keep the top level directory of tex files clean, so I have created a folder named "tmp" in the current directory and added the option to compilation as: > `pdflatex -output-directory tmp` using kile's build-configuration settings. After setting this, compilation is working very fine and the directory is clean as I desired, but the "log and messages" pane in Kile, at the bottom is not able to show the compilation status message and says: > `Cannot open log file; did you run LaTeX?` Any suggestions about how do I tell KILE about new log file location??


title: Matplotlib PGF images in subdirectory

text: I have a two-dimensional image plotted by Matplotlib using the PGF backend. It is stored in the `figures` subdirectory (since I have a lot of images and don't want to clutter up the main folder). As an example of the generation process:               from matplotlib import pyplot as plt     import numpy as np          plt.imshow(np.random.randn(200, 200))     plt.title('Some random data')     plt.savefig('figures/test.pgf')      The figures subdirectory now contains `test.pgf` and the raster image `test- img0.png`. The PGF file includes the command `\pgfimage[interpolate=true,width=4.810000in,height=4.810000in]{test- img0.png}}` to include the PNG. Since it (by design) does not contain the `figures/` prefix, I need to find a workaround. According to a comment at a top of the PGF file (and backed up by this comment on the Matplotlib issue tracker) I can use the import package to make things work:               \documentclass{article}          \usepackage[margin=2cm]{geometry}     \usepackage{import}     \usepackage{pgf}          \begin{document}          \begin{figure}     \begin{center}     \import{figures/}{test.pgf}     \end{center}     \end{figure}          \end{document}      When I compile this (`xelatex test`), I get the message               Package pgf Warning: File "test-img0.png" not found when defining image "pgflastimage".     (pgf) Tried all extensions in ".pdf:.jpg:.jpeg:.png:" on input line 62.      The PGF file is found, so the resulting PDF has the axes, title etc, but just a placeholder instead of the PNG. I also tried defining `\graphicspath{{figures/}}` but PGF doesn't seem to use that either. Adding the `figures` directory to the `TEXINPUTS` environment variable prior to compiling works, but it isn't the cleanest workaround. I could also edit the PGF file to include the path, but I'd have to do that every time I regenerate the image. Can anybody suggest why import isn't working, or an alternative method?


title: Is \def sensitive to spacing?

text: In the code below, it took me a long time to figure out that the space in the second line below beginning with `\def` generates an error. I'm new here. Where is the documentation of `\def` that would help me understand this issue?               \documentclass[aspectratio=1610]{beamer}           \begin{document}      \def\funa(#1,#2){ (#2)*(#1)^2} %  OK     %\def\funa(#1,#2) { (#2)*(#1)^2 }  % NOT OK ...WHY?          \begin{frame}            \pgfmathparse {\funa(3,4)}  \pgfmathresult \\        \end{frame}     \end{document}


title: Drawing control diagram in Latex

text: I am new to LaTeX and I am trying to draw a diagram similar to the one in the figure: ![enter image description here](http://i.stack.imgur.com/VfjGi.png) This question was answered and the following is a code for similar diagram.               \documentclass{standalone}     \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}     \usetikzlibrary{shapes,arrows}               \begin{document}     \pagestyle{empty}     % Define block styles     \tikzstyle{decision} = [diamond, draw, fill=blue!20,text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]     \tikzstyle{block} = [rectangle, draw, fill=blue!20,text width=5em, text centered, minimum height=4em]     \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,minimum height=2em]     \tikzstyle{line} = [draw, -stealth, thick]     \tikzstyle{input} = [coordinate]     \tikzstyle{output} = [coordinfor future referenceate]     \tikzstyle{pinstyle} = [pin edge={to-,thin,black}]               \begin{tikzpicture}[auto,node distance =3cm,>=latex',     path/.style={->, >=stealth, postaction = decorate},     decoration={markings, mark = at position 1cm with {\arrow[black]{stealth}}     }]              % Place nodes         \node [input, name = input]{Input command};         \node [block, right of = input] (control) {Controller $C(\theta_c)$};         \node [block, right of = control](plant){Plant $G(\theta^*$)};         \node [right of = plant] (output){y};         \node [block, below of = plant][yshift=1.25cm] (O_p_e) {Online Parameter Estimator};         \node [block, below of = O_p_e] [yshift=1cm](C_c_p) {Calculation of control parameters};         \draw[draw,->] ([yshift=-1em]input) -- node [above of = input, node distance = 1em]{Input} ([yshift=-1em]control.west);       \draw [->] (control) -- node {$u$} (plant);       \draw [->] (O_p_e) -- node {$\theta(t)$}(C_c_p);       \draw [->] (control) -- (4.5,0) |- node {} (O_p_e);         \draw [->] (C_c_p) -| node {$\theta_c(t)$} (control);         \path[line] (plant) -- (output);         \draw [->] (plant) -- (7.5,0) |- node {} (O_p_e);         \draw [->] (plant) -- (7.5,0) -- (7.5,1) -| (0.5,1) |- node {} ([yshift = -0.2cm]control.north west);     \end{tikzpicture}     \end{document}


title: LaTeX doesn't put 3 tables at the top of a page as I'd expect

text: Why in the example below LaTeX puts Table 3 in p. 3 and not in p. 2 (just after Table 1 and 2)? I use the parameters `[htb]` for the position and I set topnumber equal to 3 so that I would expect Table 1, 2 and 3 close, at the top of p. 2.               \documentclass[a4paper]{article}               \twocolumn \flushbottom \sloppy          \setcounter{topnumber}{3}          \begin{document}                    The apple TAB \ref{tab:1} is the pomaceous fruit of the apple tree, species Malus domestica in the rose family (Rosaceae).               \begin{table*}[htb]         \centering         \begin{tabular}{|c|}             \hline             data\\ \hline             data\\             \hline         \end{tabular}         \caption{caption}         \label{tab:1}     \end{table*}           It is one of the most widely cultivated tree fruits, and the most widely k TAB \ref{tab:2} nown of the many members of genus Malus that are used by humans.          %     \begin{table*}[htb]         \centering         \begin{tabular}{|c|}             \hline             data\\ \hline             data\\             \hline         \end{tabular}         \caption{caption}         \label{tab:2}     \end{table*}     %           Apples grow on small, deciduous trees. The tree originated in Central Asia, where its wild ancestor, Malus sie TAB \ref{tab:3} versii, is still found today.          %     \begin{table*}[htb]         \centering         \begin{tabular}{|c|}             \hline             data\\ \hline             data\\             \hline         \end{tabular}         \caption{caption}         \label{tab:3}     \end{table*}     %          Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples have been present in the mythology and religions of many cultures, including Norse, Greek and Christian traditions. In 2010, the fruit's genome was decoded, leading to new understandings of disease control and selective breeding in apple production.     There are more than 7,500 known cultivars of apples, resulting in a range of desired characteristics. Different cultivars are bred for various tastes and uses, including cooking, fresh eating and cider production. Domestic apples are generally propagated by grafting, although wild apples grow readily from seed. Trees are prone to a number of fungal, bacterial and pest problems, which can be controlled by a number of organic and non-organic means.     About 69 million tonnes of apples were grown worldwide in 2010, and China produced almost half of this total. The United States is the second-leading producer, with more than 6 of world production. Turkey is third, followed by Italy, India and Poland. Apples are often eaten raw, but can also be found in many prepared foods (especially desserts) and drinks. Many beneficial health effects are thought to result from eating apples; however, two forms of allergies are seen to various proteins found in the fruit.     Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples have been present in the mythology and religions of many cultures, including Norse, Greek and Christian traditions. In 2010, the fruit's genome was decoded, leading to new understandings of disease control and selective breeding in apple production.     There are more than 7,500 known cultivars of apples, resulting in a range of desired characteristics. Different cultivars are bred for various tastes and uses, including cooking, fresh eating and cider production. Domestic apples are generally propagated by grafting, although wild apples grow readily from seed. Trees are prone to a number of fungal, bacterial and pest problems, which can be controlled by a number of organic and non-organic means.     About 69 million tonnes of apples were grown worldwide in 2010, and China produced almost half of this total. The United States is the second-leading producer, with more than 6 of world production. Turkey is third, followed by Italy, India and Poland. Apples are often eaten raw, but can also be found in many prepared foods (especially desserts) and drinks. Many beneficial health effects are thought to result from eating apples; however, two forms of allergies are seen to various proteins found in the fruit.     Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples have been present in the mythology and religions of many cultures, including Norse, Greek and Christian traditions. In 2010, the fruit's genome was decoded, leading to new understandings of disease control and selective breeding in apple production.     There are more than 7,500 known cultivars of apples, resulting in a range of desired characteristics. Different cultivars are bred for various tastes and uses, including cooking, fresh eating and cider production. Domestic apples are generally propagated by grafting, although wild apples grow readily from seed.     Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples have been present in the mythology and religions of many cultures, including Norse, Greek and Christian traditions. In 2010, the fruit's genome was decoded, leading to new understandings of disease control and selective breeding in apple production.     There are more than 7,500 known cultivars of apples, resulting in a range of desired characteristics. Different cultivars are bred for various tastes and uses, including cooking, fresh eating and cider production. Domestic apples are generally propagated by grafting, although wild apples grow readily from seed. Trees are prone to a number of fungal, bacterial and pest problems, which can be controlled by a number of organic and non-organic means.     About 69 million tonnes of apples were grown worldwide in 2010, and China produced almost half of this total. The United States is the second-leading producer, with more than 6 of world production. Turkey is third, followed by Italy, India and Poland. Apples are often eaten raw, but can also be found in many prepared foods (especially desserts) and drinks. Many beneficial health effects are thought to result from eating apples; however, two forms of allergies are seenApples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples have been present in the mythology and religions of many cultures, including Norse, Greek and Christian traditions. In 2010, the fruit's genome was decoded, leading to new understandings of disease control and selective breeding in apple production.     There are more than 7,500 known cultivars of apples, resulting in a range of desired characteristics. Different cultivars are bred for various tastes and uses, including cooking, fresh eating and cider production. Domestic apples are generally propagated by grafting, although wild apples grow readily from seed. Trees are prone to a number of fungal, bacterial and pest problems, which can be controlled by a number of organic and non-organic means.     About 69 million tonnes of apples were grown worldwide in 2010, and China produced almost half of this total. The United States is the second-leading producer, with more than 6 of world production. Turkey is third, followed by Italy, India and Poland. Apples are often eaten raw, but can also be found in many prepared foods (especially desserts) and drinks. Many beneficial health effects are thought to result from eating apples; however, two forms of allergies are seen     Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples have been present in the mythology and religions of many cultures, including Norse, Greek and Christian traditions. In 2010, the fruit's genome was decoded, leading to new understandings of disease control and selective breeding in apple production.     There are more than 7,500 known cultivars of apples, resulting in a range of desired characteristics. Different cultivars are bred for various tastes and uses, including cooking, fresh eating and cider production. Domestic apples are generally propagated by grafting, although wild apples grow readily from seed. Trees are prone to a number of fungal, bacterial and pest problems, which can be controlled by a number of organic and non-organic means.     About 69 million tonnes of apples were grown worldwide in 2010, and China produced almost half of this total. The United States is the second-leading producer, with more than 6 of world production. Turkey is third, followed by Italy, India and Poland. Apples are often eaten raw, but can also be found in many prepared foods (especially desserts) and drinks. Many beneficial health effects are thought to result from eating apples; however, two forms of allergies are seen                \end{document}


title: Tikz: drawing an arc without using an angle

text: Can an arc be drawn without using an angle but two locations?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}       \pgfmathsetmacro{\a}{2.5}       \pgfmathsetmacro{\b}{2}       \pgfmathsetmacro{\c}{sqrt(\a^2 - \b^2)}       \draw (0, 0) ellipse (\a cm and \b cm);       \filldraw[black] (\c, 0) circle (.05cm) node[right = 2pt, scale = .75]       {\(F\)};       \begin{scope}[decoration = {markings,           mark = at position 0.5 with {\node[circle, inner sep = .01cm,             fill = white, scale = .75] {\(\mathbf{r}_1\)};},         }]         \draw[postaction = decorate]         (\c , 0) -- ({\a * cos(90)}, {\b * sin(90)});       \end{scope}       \begin{scope}[decoration = {markings,           mark = at position 0.5 with {\node[circle, inner sep = .01cm,             fill = white, scale = .75] {\(\mathbf{r}_2\)};},         }]         \draw[postaction = decorate]         (\c , 0) -- ({\a * cos(60)}, {-\b * sin(60)});       \end{scope}       \begin{scope}[decoration = {markings,           mark = at position 0.5 with {\node[circle, inner sep = .01cm,             fill = white, scale = .75] {\(2a - r_1\)};},         }]         \draw[postaction = decorate]         (-\c , 0) -- ({\a * cos(90)}, {\b * sin(90)});       \end{scope}       \begin{scope}[decoration = {markings,           mark = at position 0.5 with {\node[circle, inner sep = .01cm,             fill = white, scale = .75] {\(2a - r_2\)};},         }]         \draw[postaction = decorate]         (-\c , 0) -- ({\a * cos(60)}, {-\b * sin(60)});       \end{scope}       \filldraw[draw = black, fill = white] (-\c, 0) circle (.05cm)       node[left = 2pt, scale = .75]       {\(F^*\)};       \filldraw[black] ({\a * cos(60)}, {-\b * sin(60)})       node[below = 2pt, scale = .75] {\(P_2\)};       \filldraw[black] ({\a * cos(90)}, {\b * sin(90)})       node[above = 2pt, scale = .75] {\(P_1\)};     \end{tikzpicture}}     \end{document}      I want to draw an arc from `({\a * cos(60) / 4}, {-\b * sin(60) / 4})` to `({\a * cos(90) / 4}, {\b * sin(90) / 4})` without figuring out the angle (which is trivial to do but would like to let latex do the job). How can this be done? If it can't, I can do the math then and get the job done myself. ![enter image description here](http://i.stack.imgur.com/Ozx3I.png)


title: Recreating a square with fixed baseline and height (3d)

text: I am trying to recreate the following image, as close as possible. ![examsuqare](http://i.stack.imgur.com/IenC7.png) The point is that the circumference of the bottom, plus the height of the cube needs to be 30. Which gives 30 = 4x + h so I want to be able to draw the cube where I vary the value of x. Below is what I have done so far               \documentclass{minimal}     \usepackage{pgfplots,tikz}     \usetikzlibrary{shapes,arrows,calc}     \begin{document}          \newcommand\pgfmathsinandcos[3]{%        \pgfmathsetmacro#1{sin(#3)}%        \pgfmathsetmacro#2{cos(#3)}%      }          \begin{tikzpicture}          \pgfmathsetmacro\AngleFuite{30}     \pgfmathsetmacro\coeffReduc{.3}     \pgfmathsetmacro\clen{2}     \pgfmathsinandcos\sint\cost{\AngleFuite}          \begin{scope} [x     = {(\coeffReduc*\cost,-\coeffReduc*\sint)},                    y     = {(1cm,0cm)},                     z     = {(0cm,1cm)}]          \pgfmathsetmacro{\x}{5} \pgfmathsetmacro{\h}{30-4*\x}          \path coordinate (A) at (-\h/2,\x/2,\x/2)            coordinate (B) at (-\h/2,-\x/2,\x/2)           coordinate (C) at (-\h/2,-\x/2,-\x/2)           coordinate (D) at (-\h/2,\x/2,-\x/2)           coordinate (A1) at (\h/2,\x/2,\x/2)           coordinate (B1) at (\h/2,-\x/2,\x/2)           coordinate (C1) at (\h/2,-\x/2,-\x/2)           coordinate (D1) at (\h/2,\x/2,-\x/2)           coordinate[label=$h$,left=0.65em] (M1) at ($ (B)!.5!(C) $)           coordinate[label=$x$,below=2em] (M2) at ($ (C1)!.5!(C) $)           coordinate[label=$x$,below=1.75em] (M3) at ($ (C1)!.5!(D1) $);          \fill [blue, fill opacity = 0.2]   (A)--(B)--(C)--(D) -- cycle;     \fill [blue, fill opacity = 0.3]   (C)--(D)--(D1)--(C1) -- cycle;     \fill [blue, fill opacity = 0.2]   (A1)--(B1)--(C1)--(D1) -- cycle;     \fill [blue, fill opacity = 0.2]   (B1)--(C1)--(C)--(B) -- cycle;     \fill [blue, fill opacity = 0.1]   (A1)--(D1)--(D)--(A) -- cycle;          \draw (A) -- (B) -- (C) -- (D) -- (A) -- (A1) -- (B1) -- (C1) -- (D1) -- (A1) ;     \draw (B) -- (B1) ; \draw (C) -- (C1) ; \draw (D) -- (D1) ;          \end{scope}          \end{tikzpicture}             \end{document}      My main problem, is that the code is very messy. And still does not quite do what I want it do do. I still having problems rotating the cube properly, The backlines are not shaded, and the whole coordinate thingy seems very messy and unproffesional. A tad smaller figure would also be much appreciated, I tried scaling the whole image, but alas this also shrank the labels. Any tips suggestions to a better code, or ways to improve mine? ![my attempt](http://i.stack.imgur.com/ILVo2.png)


title: TikZ: Drawing a rectangle and then splitting it

text: I want to make a rectangle and then want to split it. My MWE is below:               \documentclass[tikz]{standalone}     \usetikzlibrary{shapes.multipart}     \begin{document}     \begin{tikzpicture}[         my shape/.style={               rectangle split             , rectangle split parts=#1             , draw             , anchor=center             }         ]     \node [my shape=1, rectangle split horizontal] at (0, 0) (R1A1) {};     \node[above of=R1A1]{Test};     \node [my shape=5, rectangle split horizontal] at (0, 0)         {a \nodepart{two}b \nodepart{three}c \nodepart{four}d \nodepart{five}e};     \end{tikzpicture}         \end{document}      This code is not working as desired. Any help will be highly appreciated. Thanks


title: Accelerating LaTeX packages using a make like functionality

text: I use `gnuplottex` package quite a lot to draw graphs, and my own `bashful` package to write include computer output in a document I write. Yet another package of this sort allows one to include metapost output within your document. The problem is that running all these commands from within LaTeX makes the document processing very slow. I seek an enhanced version of (say) gnuplottex, which given               \begin{gnuplot}[terminal=pdf,]      gnuplot commands     \end{gnuplot}      would compute a check sum of `gnuplot commands`, compare it to a value from a previous run, and they differ, would run gnuplot again; otherwise, it will just use the previously generated pdf file. I imagine you would need to use an auxiliary file for that, but I am not sure I understand the tradeoffs if any: should once save in the auxiliary file a checsum, or the entire data? How does one compare it? Presumably, the invocation syntax would be:               \IfChanged{commands}{\regenerate}{\reuse}      where `\regenerate` is a user macro taking a single argument, which would be passed `commands` as argument. Command \reuse would somehow reuse the previous run's output. I am not even sure this is the right syntax. Yet another challenge is to design the command in such a way that the user would not have to add a label to make it distinct from other calls to it. * * * Clarification: One way of doing that is the following: let h be hash function which generates (say) a 32 bits number. Then you could have a command of the following sort: \IfChanged{commands}{\regenerate}{\use} Where:   1. `\regenerate` is a two arguments macro.   2. `\use` is a single argument macro.   3. '`IfChanged` will compute the h(commands), and if the value has changed, it will invoke: `\regenerate{commands}{h(commands)}` and then `\use{h(x}}`   4. If h(commands) did not change, then it would just invoke `\use{h(x}}`   5. `\regenerate{commands}{h(commands)}` would do some computation, placing the output in a file named `h(commands)`   6. The command `\use{h(x}}` would include the file `h(commands)` I hope this clarifies the idea a bit. I would have to think some more about the exact design. * * * More on context: I have at least three applications in mind - the first is using the `bashful` package to show computer output on the screen, second is the use of gnuplottex to plot functions (not data), and (c) use of metapost to draw uml diagrams and other stuff. The command would **not** be useful as is for running an external "make" to generate experimental data. For this one would need a command that would do the LaTeX equivalent of the following pseudo code:                 If (updated(rawDataFile(s) ))         exec(Make).       Include(outputFile)      but this is less of a problem I think, since you could always run from your command line:                 % make all; pdflatex main.tex


title: Undefined reference using a0poster (\include Vs. \input)

text: I have an `a0poster` document (see below an example) which is not loading the cross-references, although `bibtex` is working fine and compiling the references. I write the main text into a different `tex` file and include it into the main tex file (both can be found below). If the file `text.tex` is included with `\include`, the cross-referencing fails. If it is included using `\input`, everything works fine. Why? PS: The file `main.tex` below has lots of `\usepackages` and some definitions required by the `a0poster` class. **main.tex**               \documentclass[portrait]{a0poster}          \RequirePackage{amssymb,amsthm,array}     \RequirePackage[reqno]{amsmath}          % revtex     \usepackage[sort&compress,numbers]{natbib}     \usepackage{doi}%<----------     \usepackage{hyperref}          % Insert font types as \LARGE or \color     \usepackage{multicol}     \usepackage{amsfonts}     \usepackage[final]{graphicx}     \usepackage{pstricks}     \usepackage{alltt}     \usepackage{a4}     \usepackage{float}     \usepackage{verbatim}     \usepackage{calc}     \usepackage{wrapfig}%I took out the package cite     \usepackage[absolute]{textpos}     \usepackage{boxedminipage}     \renewcommand\familydefault{cmss}          % Switch off page numbers on a poster, obviously, and section numbers too.     \pagestyle{empty}     \setcounter{secnumdepth}{0}          \usepackage{dcolumn}% Align table columns on decimal point     \usepackage{bm}% bold math          \usepackage[normalem]{ulem} % underline \uline     \usepackage{pifont} % inclui suporte a simbolos \ding no texto     \usepackage{stmaryrd} % inclui outros simbolos          % These colours are tried and tested for titles and headers. Don't     % over use color!     \usepackage{color}     \definecolor{DarkBlue}{rgb}{0.1,0.1,0.5}     \definecolor{Red}{rgb}{0.9,0.0,0.1}          % put text on the top of the image     \def\imagetop#1{\vtop{\null\hbox{#1}}}     \setlength{\abovecaptionskip}{0pt}     \setlength{\belowcaptionskip}{0pt}          % see documentation for a0poster class for the size options here     \newcommand{\Textsize}{\large}     \newcommand{\IntroTextsize}{\large}     \newcommand{\Abstractsize}{\normalsize}     \newcommand{\TReferences}{\scriptsize}     \def\Head#1{\noindent\hbox to \hsize{\hfil{\Huge\color{DarkBlue} #1}}\bigskip}     \def\TAuthors#1{\noindent{\huge\color{DarkBlue} #1}\smallskip}     \def\TAddress#1{\noindent{\Large\color{DarkBlue} #1}\smallskip}     \def\LHead#1{\noindent{\Huge\color{DarkBlue} #1}\smallskip}     \def\Subhead#1{\noindent{\Large\color{DarkBlue} #1}}     \def\Title#1{\noindent{\VERYHuge\color{Red} #1}}          \TPGrid[20mm,20mm]{15}{25}  % 3 - 1 - 7 - 1 - 3 Columns          % Mess with these as you like     \parindent=0pt     \parskip=0.5\baselineskip          \begin{document}          %%%%%%%%%%%%%%%%%%%%%%          \include{text} %%%%% gives the undefined reference error          \input{text} %%%%% loads the text with correct cross-referencing          %%%%%%%%%%%%%%%%%%%%%%                        \begin{textblock}{7}(7.8,21.6)     \begin{multicols}{2}     \TReferences     \bibliographystyle{apsrev4-1-custom}     \bibliography{referencias}     \end{multicols}     \end{textblock}     \end{document}      **text.tex**               \begin{textblock}{7}(0.25,5.8)          \begin{equation}     \label{eq:myEqn1}     f(x) = a + bx     \end{equation}          eq \eqref{eq:myEqn1} is a straight line! %%%% display '??' undefined reference          \end{textblock}


title: Getting "perhaps a missing \item" and double page numbering using longtable

text: I'm trying to get a `longtable` environment to split across pages. Unfortunately, I'm getting a `...perhaps a missing \item` error. Also the document gets a double page numbering where the table splits. Here's a stripped version of the document.               \documentclass[12pt,letterpaper,twoside,openright]{book}          \usepackage[spanish]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{kpfonts}     \usepackage[Sonny]{fncychap}     \usepackage{fancyhdr}     \usepackage{longtable}     \usepackage{hhline}          \newcommand{\ve}{\vspace{.5cm}}     \newcommand{\Hrule}{\rule{\linewidth}{1mm}}          \pagestyle{fancyplain}     \renewcommand{\chaptermark}[1]{\markboth{\sf #1}{}}     \renewcommand{\sectionmark}[1]{\markright{\sf \thesection\, #1}}     \fancyhf{}     \fancyhead[LE,RO]{\sf \thepage}     \fancyhead[LO]{\sf \rightmark}     \fancyhead[RE]{\sf \leftmark}     \fancyfoot[CE,CO]{\sf Olimpiada Mexicana de Matemáticas, 2013}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0.5pt}     \fancypagestyle{plain}{        \fancyhead{}        \fancyfoot{\center{\sf \thepage}}        \renewcommand{\headrulewidth}{0pt}        \renewcommand{\footrulewidth}{0pt}     }     \renewcommand{\tablename}{Tabla}     \renewcommand{\listtablename}{Índice de tablas}     \decimalpoint     \setlength{\headheight}{1cm}     \setlength{\headsep}{5pt}     \ChTitleVar{\raggedleft\Large}     \ChNameVar{\Huge}          \begin{document}          \frontmatter          \thispagestyle{empty}     \vfill     \noindent\Hrule     \begin{flushright}        {\bf \Huge Olimpiada Mexicana\\ \ve de Matemáticas}     \end{flushright}     \Hrule     \vfill     \begin{center}        {\bf \Large http://ommenlinea.org/ \\ \ve 2013-2014}     \end{center}          \newpage          \bigskip          \noindent{\bf Nombre 1}\\     Institución 1          \bigskip          \noindent{\bf Nombre 2}\\     Nombre de Facultad,\\     Nombre de Universidad Nacional          \bigskip          \noindent{\bf Nombre 3}\\     Institución 3          \bigskip          \noindent{\bf Nombre 4}\\     Nombre de Facultad,\\     Nombre de Universidad          \newpage          \tableofcontents     \mainmatter          \addcontentsline{toc}{chapter}{Presentación}     \chapter*{Presentación}          \section{Historia de México en las Olimpiadas Internacionales}          \subsection{México en la IMO}     \noindent Los ganadores del primer Concurso Nacional organizado por la Olimpiada Mexicana de Matemáticas asistieron a la XXIX Olimpiada Internacional de Matemáticas, celebrada en Canberra, Australia, en julio de 1988; a partir de ese año México ha asistido a la emisión anual de la Olimpiada Internacional de Matemáticas. Los resultados de las delegaciones mexicanas en las Olimpiadas Internacionales han sido:          \begin{center}         \begin{longtable}{|c|l|c|c|}             \hhline{-|-|-|-|}             {\it Año} & \multicolumn{1}{c|}{\it País sede} & {\it No. de países} & {\it Lugar de México}\\             \hhline{|=|=|=|=|}             \endfirsthead             \hhline{-|-|-|-|}             \multicolumn{4}{|r|}{\it ...contin\'ua de la página previa} \\             \hhline{-|-|-|-|}             {\it Año} & \multicolumn{1}{c|}{\it País sede} & {\it No. de países} & {\it Lugar de México}\\             \hhline{|=|=|=|=|}             \endhead             \hhline{-|-|-|-|}             \multicolumn{4}{|r|}{\it Contin\'ua en la siguiente página...} \\             \hhline{-|-|-|-|}             \endfoot             \endlastfoot             1988 & Australia & 49 & 37\\             1989 & Rep. Fed. de Alemania & 50 & 31\\             1990 & Rep. Popular de China & 54 & 36\\             1991 & Suecia & 55 & 35\\             1992 & Rusia & 56 & 49\\             1993 & Turquía & 73 & 63\\             1994 & Hong Kong & 69 & 65\\             1995 & Canadá & 74 & 59\\             1996 & India & 75 & 53\\             1997 & Argentina & 82 & 32\\             1998 & Taiwan & 75 & 44\\             1999 & Rumania & 81 & 52\\             2000 & Corea & 82 & 30\\             2001 & Estados Unidos & 83 & 46\\             2002 & Escocia & 84 & 46\\             2003 & Japón & 82 & 41\\             2004 & Grecia & 84 & 37\\             2005 & México & 91 & 31\\             2006 & Eslovenia & 90 & 24\\             2007 & Vietnam & 92 & 37\\             2008 & España &  97 & 37\\             2009 & Alemania &  104 & 50\\             2010 & Kazajistán & 97 & 33\\             2011 & Holanda & 101 &  22\\             2012 & Argentina & 100 & 31\\             2013 & Colombia & 97 & 17\\             \hhline{-|-|-|-|}         \end{longtable}     \end{center}          \end{document}      How could this be solved?


title: Frame for a title page 2

text: In fact i'm working on that cover for my thesis and i try to inspire from the beautiful cover page of Mr Gonzalo Medina Presentation Beamer [title page] and from Mr karlkoeller Frame for a title page but i can't manage ![enter image description here](http://i.stack.imgur.com/hpNP9.png)               \PassOptionsToPackage{demo}{graphicx}     \documentclass[a4paper,12pt]{report}     \usepackage{tikz}     \usetikzlibrary{calc}     \newcommand\HRule{\rule{\textwidth}{1pt}}     \begin{document}          \begin{titlepage}          \center % Center everything on the page     \includegraphics[height=1cm,width=2cm]{logo1}\hfill     \includegraphics[height=1cm,width=2cm]{logo2}\par\vfill               % Upper part of the page     \textsc{\LARGE University}\\[2.5cm]          \textsc{\Large Project}\\[3cm]          % Title     \HRule \\[0.4cm]     { \huge \bfseries Title}\\[0.1cm]     { \large \bfseries subTitle}\\[0.4cm]     \HRule \\[2cm]          \textsc{\normalsize Defended on : December day,year.}\\[1cm]          \end{center}          \end{titlepage}


title: How to make mdframed ignore descenders in last line

text: How can we make `mdframed` to ignore the descenders of the last line in the calculation of the `innerbottomsep`. In my eyes there are two reasons to desire this: **Inner margin**   The optical bottom sep is too large in a line that contains descenders compared with on the has none. ![margins](http://i.stack.imgur.com/7z0oW.png) **Line grid**   It is impossible to keep in the line grid, which otherwise could be achieved by adjusting the skip above and below. ![grid](http://i.stack.imgur.com/1MMJ5.png) As the image shows the frame without descenders keeps the following lines in the grid with the well adjusted skips but if we got descenders the adjustment is broken. **Code**   This is the code I used to produce the images (comment out on line to get the first image).               \documentclass{scrartcl}          \usepackage{tikz}     \usepackage{mdframed}          \newmdenv[%        skipabove=12.6pt,        skipbelow=12.6pt,     ]{myframe}          \usepackage{lipsum}     \begin{document}     % draw a line grid     \noindent     \begin{tikzpicture}[overlay]        \foreach \y in {0,...,-42}           \draw [magenta] (0,\y*\baselineskip) -- ++(\textwidth,0);     \end{tikzpicture}%     \lipsum[1]     \begin{myframe}        Without descender it works.     \end{myframe}     \lipsum[2]     \begin{myframe}        But with descenders the skip is a little too much.     \end{myframe}     \lipsum     \end{document}


title: condense beamer notes into one page

text: I am trying to create some notes for a presentation I created with `beamer`. I am using `\note{...}` to do this, and when configure it to print only the notes, I can get it to produce one page per slide that is containing notes. However I do not have much notes, so mostly the notes page is half empty, which would be a lot of wasted space. I have been looking around and found lots of ways to influence the notes page itself (making it contain notes only, or some hacks/tricks to make long notes span multiple notes pages), but I could not find any way to "condense" multiple note pages into one. I have played with `beamerarticle` too, but there you always get the complete content of the slides, which is not what I want. The ideal solution would be to create a document that looks like the `beamerarticle` one, just that it has only the section headings, empty sections headings removed, and the content shall not be the slides content, but only my notes. This would be approximately 3 pages instead of 20... Is there anything like this, or something near?


title: Deactivate twoside for bibliography and glossary

text: since the bibliography and glossary barely fit into their columns and start using several pages, I would like to deactivate twoside for them. How can this be acomplished or is that a bad practice?


title: Uneven vertical spacing displaymath

text: I would like to ask you why we have uneven vertical skips between the first two and last two vectors, coming from the source:               \documentclass{article}     \begin{document}     \[(a,b,c,d,e,f,g,h)\]     \[(a,b,c,d,e,f,g,h)\]     \[(a,b,c,d,e,f,g,h)\]     \end{document}      If I use more than 3 consecutive displaymath lines the same phenomenon happens: the vertical skip between the first two is considerably larger than the space between any further two lines. Any workarounds? I am using MikTex 2.9 with TeXnicCenter.


title: flacards.cls and loop don't work together

text: I try to automatise the construction of my flashcards. I try with `\foreach` (tikz) and `\forloop` (forloop package), it's not working. The error is in the two case:               ! LaTeX Error: There's no line here to end.     See the LaTeX manual or LaTeX Companion for explanation.      The code :               \documentclass{flacards}          \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}          \usepackage[frenchb]{babel}          \usepackage{forloop}           \begin{document}     \newcounter{ct}     \forloop{ct}{1}{\value{ct} < 11}{        \card{\arabic{ct}}{}     }     \end{document}


title: Require a certain (or later) version of a package?

text: Is there a way to enforce that a certain version, or a later version, of a package is loaded when building the document? I've found that compiling a document on another platform, where the package versions differ, can cause problems that may or may not be hard to pinpoint. Thus, I would like to be able to say, in the document, that "you need at least this version of this package", and produce an explicit error about it when it doesn't hold true. Is there any way of doing this?


title: Problems with environments in TeXStudio

text: This document               \documentclass{article}     \usepackage{amsthm}     \newtheorem{lemma}{Lemma}     \newcommand{\mycommand}{Here is the command}     \begin{document}     \begin{lemma}     Here is the lemma     \end{lemma}     \mycommand     \end{document}      is perfectly compiled but the problem is that TeXStudio says that `\begin{lemma} \end{lemma}` are unrecognized commands when I put the pointer on them and they have an horrible orange background (I know how to disable this but I don't want to because that feature is useful). The same happens when I define another environments. I often define a couple of theorem environments. But the strange thing is that when I define a new command, TeXStudio does recognize it and the autocompletion feature works with both the new command and the new theorem environments (when I write `\begin{lem}` a box is shown with my new environment which is cool). I'd like that TeXStudio recognize my environments.


title: A looping edge with "shorten >=..." that is symmetrical and points toward the node

text: The "shorten >=" option in TikZ causes a change in the shape of the Bezier curve. With a looping edge for example, it makes the loop asymmetrical (node A in the picture). I could make it symmetrical using curveto,post=moveto and mark decorations but:   1. The arrow head doesn't show up at the right place.   2. It doesn't point towards the node. See node B in the picture. These can be fixed using custom arrow code and hand-tuning in the decoration (node C): ![A: asymmetrical loop. B: wrong arrow head position and orientation. C: Correct.](http://i.stack.imgur.com/EgpJu.png) Here is the code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,arrows,decorations.pathmorphing,decorations.markings}     \begin{document}     \begin{tikzpicture}            \node [circle,draw] (A) at (0, 0) {A};       \path (A) edge [out=240,in=300,min distance=8mm,-angle 90 reversed,shorten >=6pt] (A);            \node [circle,draw] (B) at (2, 0) {B};       \path (B) edge [out=240,in=300,min distance=8mm,                       decoration={curveto,post=moveto,post length=8pt},                       postaction={decoration={post length=0,markings,mark=at position 1                                               with {\arrow{angle 90 reversed}}},decorate},                       decorate] (B);            \node [circle,draw] (C) at (4, 0) {C};       \path (C) edge [out=240,in=300,min distance=8mm,                       decoration={curveto,post=moveto,post length=8pt},                       postaction={decoration={post length=0,markings,mark=at position 1                       with {\draw [-angle 90 reversed] (0, 0) --                              ($(0, 0)!2.5pt!(\tikztotarget.center)$);}},decorate},                       decorate] (C);          \end{tikzpicture}     \end{document}      However it is a bit complex and requires hand-tuning. Does anyone see a better approach?


title: What is the fastest--to-install TeX to HTML converter for windows?

text: I just came by this http://tug.org/applications/tex4ht/mn-mswin.html And I find it a bit extreme to need 20 steps just to set up a software. Is there any simpler, more reasonable, alternative?


title: Best practice for typesetting quantifiers?

text: When I work with quantifiers I noted that are very close to the other symbols and the result does not look good, for example               $\exists a\in\mathbb{R}\exists b\in\mathbb{R}\forall c\in\mathbb{R}\forall d\in\mathbb{R}$      Which is the proper form to write quantifiers?


title: Lyx: can I export LaTeX without the preamble?

text: I would like to export Latex from Lyx without the preamble. For example I would like to automatically remove all code before `\section{}` as well as `\end{document}`. This is so that I can automatically include the `.tex` output file into a larger Latex document for which I already have the preamble the way I want it. The reason I am doing things this way is that I have large tables of equations which get very confusing to edit directly in plain Latex.


title: Caption package not working with beamer

text: I am using `beamer` to make a presentation. But the default caption font size seems big to me. So I tried to make the font size smaller using `caption` package. I tried this:               \usepackage[center,scriptsize]{caption}      Also:               \usepackage{caption}     \captionsetup[figure]{font={footnotesize},labelfont={footnotesize}}      But they don't seem to make the caption font size smaller. **Where am I going wrong?** My preamble is:               \documentclass{beamer}     \usepackage{mathtools}     \usepackage{graphicx}     \usepackage{lmodern}% http://ctan.org/pkg/lm     \graphicspath{{images/}}     \usetheme{default}      And my caption code is:               \begin{figure}[h]       \centering       \includegraphics[scale=0.8]{axb-grid}       \caption{$A \times B$ grid}       \label{fig:axbgrid}     \end{figure}


title: Makeindex stops at scanning input file stdin

text: I'am trying to make a nomenclature in documentclass `mscThesis`, but when I try to use makeindex I can't go any further. Makeindex says: > >     This is C:\Users\Rob van Vliet\Dropbox\Thesis\Thesis\makeindex.exe, > version 2.15 >     [MiKTeX 2.9] (kpathsea + Thai support).   >     Scanning input file stdin... >   I've searched the internet and I've found many answers but it still doesn't go any further than this. I've also tried `\makeglossary` but that doesn't work either. I'm using `\usepackage{nomencl}`, I've put `\makenomenclature` in the preamble and I've put `\printnomenclature` in the place I want the nomenclature to be.