title: Different font (family and size) for one (cover) page

text: I would like to make a package for a title/cover page which should use a predefined font, whereas the document in which the package is loaded and used (used by using a command that generates a new page) should use whatever font it wants. How may I do that?


title: Croatian/Serbian letters in CV problem

text: I'm using a currvita CV for something, but am unable to get Croatian/Serbian (I don't know how this will come out, but they are šŠđĐčČćĆžŽ). Haven't used LaTeX in a while but remember that in the past I used to get these letters, _substitutions_ like this Đ = \DJ{}. For some reason it doesn't work. Would really appreciate your advice on this one...


title: \centerline{} command alternative?

text: I am adding figures to a work and most of the figures are too wide and are thus not centered but are shifted to the right. I searched here and found a solution, that would consist in adding the \centerline{} command into the figure environment. This work fine for figures added with the command \includegraphics{}, like in this example :               \begin{figure}[h!]     \begin{center}     \centerline{\includegraphics{SOIR_optics}}     \end{center} % is this really useful?     \end{figure}      But when I try to add a tikzpicture instead, this solution does not work (see example)               \begin{figure}[h!]     \begin{center}     \centerline{\begin{tikzpicture}      some code      \end{tikzpicture}}     \end{center}     \end{figure}      My question is : are there alternatives to this \centerline{} command ? Thanks !


title: Why does amsmath define \mspace? \mskip seems fine and simple enough

text: `amsmath.sty` defines `\mspace` as follows:               \newcommand{\mspace}[1]{\mskip#1\relax}      **What is the purpose of this definition?** `amsmath.pdf` says that `\mspace` is the "equivalent of `\hspace` for math mode use". I know that LaTeX has a philosophy of using braces around every argument. Is that the point? Or is it the idea that `\mskip` is a TeX-command and thus shouldn't be used in LaTeX? I assume that the purpose of the `\relax` is to safeguard against a following `plus` or `minus` (for stretchable/shrinkable lengths). Is this explicit safety the purpose of the command? Related:   * Difference between \mskip and \mkern


title: Dimension too large from matlab2tikz, and aligning graph axis

text: I have a MATLAB generated plot that looks as follows: ![MATLAB generated plot](http://i.stack.imgur.com/TpO51.png) Generated with this code:               plot(fitGoodnessNRMSE,'b','LineWidth',1);     axis([1 511 0.5 1]);     ylabel('Normalized RMS error'); xlabel('q (um^-1)');      I then export it as a tikz using matlab2tikz(). And include it in my latex document:               \documentclass{standalone}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{amsmath}     \begin{document}     \input{test.tikz}     \end{document}      The latex file will not compile due to `Error: Dimension too large. <recently read> \pgf@yy l.537 \end{axis}.` Inside the .tikz document is as follows:               \begin{tikzpicture}     \begin{axis}[%     width=4.52083333333333in,     height=3.565625in,     scale only axis,     xmin=1, xmax=511, xlabel={$\text{q (um}^\text{-}\text{1)}$},     ymin=0.5, ymax=1, ylabel={Normalized RMS error}]     \addplot [color=blue,solid,line width=1.0pt,forget plot]     table[row sep=crcr]{     1    -57.943745    \\     2    -14.11968    \\     3    -5.535387    \\     4    -2.4488078    \\     5    -1.0804409    \\     6    -0.30200709    \\     7    0.053585582    \\     8    0.32392563    \\     9    0.44304278    \\     .     .     511    0.90342708    \\     };     \end{axis}     \end{tikzpicture}%      Note the data hangs around 0.8 or 0.9 most of the points. I found if I change `ymin` from 0.5 to 0, it compiles fine. Help as to why it does not work in its current state is greatly appreciated. I need the y axis to only display 0.5 to 1 like it does in MATLAB. Secondly, I have been playing around with aligning plots in a table, my current attempt is shown below. ![tikz plot example](http://i.stack.imgur.com/4rIgV.png) I am using largely this example: Insert image and list inside a table, but cant figure out two things:   * How do I center the text under heading 'A'?   * The vertical edges of the middle graph don't quite line up with the top, as shown by the red arrows in the image. Is this because the middle graph has brackets in one of the label titles that need to push it a bit to the right. How do I go about making them line up? If possible I would like to do this by not having to alter my .tikz file once it has been created by `matlab2tikz`, but I understand if this is simply not possible. Thanks


title: how to insert multi line equation in the tabular environment?

text: How can insert multi line equation in the tabular environment? For example see the following code that can show my request.               \begin{tabular}{rrr}         &a &b\\         &u=\begin{cases}  0;& i=0\\ 1;& i \neq 0  \end{cases} $e\\         &c &d     \end{tabular}      Should I use another environment instead of the `tabular`? @Grundlingh: In fact, I'm trying to use the following code:               \begin{tabular}{lll}     &(A) $\ds u=\sqrt{x^2+y^2}$~~~~~~~~~~~~~~~~&(B) $\ds u=\sqrt{x^4+y^4}$\\     &(C) $\ds u=\sqrt[3]{xy}$ &(D) $\ds u=\sqrt[3]{x^2+y^2}$\\     &(E) $\ds u=\sqrt[3]{x^4+y^4}$ &(F) u=\begin{cases}e^{\frac{-1}{x^2+y^2}}; &x^2+y^2\neq 0\\ 0; &x^2+y^2=0\end{cases}\\     &(G) $\ds u=\sqrt[3]{x}\sin y$ &(H) $\ds u=\sqrt[3]{y}\tan x$\\     \end{tabular}


title: Align all parts of the equation array and comment it

text: I would like to align all parts of the equation (Not just the '=' sign) to make it looks better and comment it afterwords. Can someone please help me. Thanks S.L. ![enter image description here](http://i.stack.imgur.com/hgXHF.jpg)               \documentclass[12pt]{article}      \usepackage{amsmath}               \begin{document}      \begin{eqnarray*}     \Delta h_{100,A} + 100.00 &=& H_A\\     \Delta h_{A,200} - 107.500 &=& -H_A\\     \Delta h_{200,C} +107.500 &=& H_C\\     \Delta h_{C,100} - 100.00 &=& -H_C\\     \Delta h_{A,B} &=& H_B -H_A\\     \Delta h_{200,B} + 107.500 &=& H_B\\     \Delta h_{B,C} &=& H_C - H_B     \end{eqnarray*}     \end{document}


title: utf8x vs. utf8 (inputenc)

text: I normally use `\usepackage[utf8]{inputenc}` for my latex document but on this site i saw a lot of code with `\usepackage[utf8x]{inputenc}`. What are the differences between the 2 options ? Is there one of the option obsolete and which one should I use ?


title: Features in Chess Diagrams

text: I've been using skak to display diagrams of chessboards in pictures, but I'd like a little more functionality. In particular, I'd like to be able to: a) display only a portion of the board b) indicate the importance of certain squares with stars Can I do this with skak? Or is there another package to use?


title: Editing .bst file to modify printing of publisher and address information

text: I'm lost in some bst hell. Basically I'm trying to get Springer's `spbasic.bst` file to work. I'm almost there, but there are few annoying issues. First, instead of getting `Address: Publisher`, I get `Publisher, Address`. which is incorrect. I saw the functions `format.publisher.address`, and the `book` section:               FUNCTION {book}     { output.bibitem       author empty$         { format.editors "author and editor" output.check           editor format.key output           add.blank         }         { format.authors output.nonnull           crossref missing$             { "author and editor" editor either.or.check }             'skip$           if$         }       if$       format.date "year" output.check         new.sentence       format.btitle "title" output.check       crossref missing$         { format.bvolume output           format.edition output       new.sentence           format.number.series output           format.publisher.address output         }         {       new.sentence           format.book.crossref output.nonnull         }       if$       format.doi output       format.url output       format.note output       format.eprint output       fin.entry     }      How do I fix it? The `bst` syntax must be one of the least comprehensible languages I've ever seen.


title: Spacing problem at chapter end

text: ![picture of the problem](http://i.stack.imgur.com/HBEVl.jpg) For most of the chapters in my document, LaTeX lays out the text wonderfully. The text goes right down to the page number. However, for a few of the chapters, I have the problem pictured above. The chapter is cut off early in the page, and one or two words are placed on the next page, whereas,what I would like is for the chapter to end on the last page and for a new chapter to start anew on the next page. This is my document class declaration: `\documentclass[12pt, oneside, openany, draft, article ]{memoir}` How can I fix this problem?


title: How to align a right angle

text: As you you can see in the following image, a right angle has some space to side BC. How can I fix it and is there any better way to add an right angle? ![enter image description here](http://i.stack.imgur.com/ujtOM.png)               \documentclass{article}     \usepackage{tikz}          \begin{document}        \begin{tikzpicture}           \draw[fill=gray!10]  (0, 4) coordinate (A)             -- node[above=4pt] {$4cm$} (3,4) coordinate (C)             -- node[right] {$8cm$} (3,0) coordinate (B)             -- node[left] {$xcm$}  (0, 4);          \draw (2.6,4) -- ++(0,-10pt) -- ++(10pt,0);                  \node at (A)[anchor=east] {$A$};             \node at (B)[anchor=north] {$B$};             \node at (C)[anchor=south] {$C$};           \end{tikzpicture}     \end{document}


title: Creating commands with a TeX `for` loop

text: I am trying to create many different commands based on a single command (essentially a custom header) in a predictable way. Is there a way to do this in TeX/LaTeX? # My specific example: I'm writing a module specification, where each of the sub headings is denoted by `\modulespec{description}{the description}` or `\modulespec{learning outcomes}{the learning outcomes}` etc. I am hoping that TeX can generate commands like `\mdescription{the description}` and `\mlearningoutcomes{the learning outcomes}` I know that in bash-like expansion combined with TeX I would write               for i in 'description' 'learning outcomes'     do         \def\csname m\getRidOfSpaces{$i} \endcsname{\modulespec{$i}{#1}}     done      (if you'll excuse the combination of languages) where `\getRidOfSpaces` changes `learning outcomes` to `learningoutcomes`. Is this possible/feasible with TeX/LaTeX? M(not)WE:               \documentclass{article}     \usepackage{blindtext}          % In the real thing, this definition is much more complicated     \newcommand{\modulespec}[2]{\section{#1} #2}          % The code I want in pure TeX/LaTeX     for i in 'description' 'learning outcomes'     do         \def\csname m\getRidOfSpaces{$i} \endcsname{\modulespec{$i}{#1}}     done     % end of non TeX code               \begin{document}          % Both work     \modulespec{description}{\blindtext}     \modulespec{learning outcomes}{\blindtext}          % These two commands should produce the same output as the previous two     \mdescription{\blindtext}     \mlearningoutcomes{\blindtext}          \end{document}


title: Coloring combining characters without changing color of a base character

text: ## Problem I am trying to find out is there a good way to paint combining characters without changing the color of the base character they are combined with. My actual problem case is to make some Hebrew inflection charts with colored prefixes and suffixes. Problem area there is to being able to color vowel points, cantillation and other diacritical marks without changing the color of the base consonant. As a clarification, in following image from Wikipedia, consonants are in black, vowels in red and cantillation in blue. ![And God said, "Let the waters be collected."](http://i.stack.imgur.com/XAbeq.png) As an illustration what I would like to be able to produce, I quickly photoshopped following example. ![example](http://i.stack.imgur.com/6uDXA.png) ## Search for solution In my search so far, I have found that there has been discussion about this question in XeTeX mailing list in 2007. Back then there was not perfect solution. However a workaround with two overlapping words with different colors was proposed. Also there was noted that coloring solution for ArabTeX could be ported for Hebrew. Unfortunately the workaround is quite laborious solution as you have to write every word twice, and also it doubles the chances to write something wrong. As what comes to the idea of porting ArabTeX, I am far too inexperienced with TeX that I could give that a try. So I am hoping that there has been some development with this problem since 2007 with XeTeX or this can be achieved gracefully with some other tools. Also please note me if you happen to know that this can be achieved word processors such as Word, OpenOffice.org Writer etc, as I am not aware if they can handle this either. (I know that Word can paint all diacritics, but I am not aware if it can paint just some diacritics.)


title: How to set a default parameter for all edges

text: ## Question How do you set all edges in an automaton to have the additional parameter double? This should be easy, but I can't find the solution here or in the tikz/pgf manual or anywhere else. `double` should not be overwritten by independent parameters: `edge[bend left]` with default `double` should thus be equivalent to `edge[bend left, double]`. ## Details Currently, I'm using the parameter everywhere:                    \path[->]           (s0)+(-.5cm,.5cm) edge[bend right,double] (s0)          (s0) edge[bend left,double] node[pos=0.3] {$a$} (s1)          (s1) edge[bend left,double] node {$\epsilon,a$} (s0)          (s0) edge[loop above,double] node {$\epsilon,a$} (s0)          (s1) edge[loop below,double] node {$\epsilon,a$} (s1);      I tried `\path[->,double]` and various combinations of `\pgfset` and `\tikzstyle`, but I just don't know how to get to set `double` the edge's default parameter.


title: Unsung Heros - PSTricks, TikZ, pgfplots,

text: While watching presentations (mostly made with `beamer`) at my university I noticed, most people here use LaTeX to create there presentations which is really nice. (not just for the health of my eyes) Getting more familiar with `PSTricks`,`TikZ`, `pgfplots` and other packages creating graphics I often notice, people try to create beautiful presentations but struggle inserting pictures, plots or schemes. I tend to tell them that there is an easy way to create graphics and display them within their documents. Mostly they are totally stunned after seeing some examples. After showing some code, most of them refuse to go this way and continue to do workarounds and other hacky stuff to include there pictures. This leads me to two questions in once.   1. Why are tools like `TikZ` and `pgfplots` still this unknown even though most of the questions here turn out to be related to them?   2. Any ideas on how to convince them to really try them out.


title: Substitute the \infty provided by the eulervm package

text: How can I substitute the `\infty` of the `eulervm` package with the `\infty` at the left (that in text mode) in this PDF? (to find it easily, please use the `ctrl+f` combination and then type `\infty`)               \documentclass{book}          \RequirePackage[%                    nomath,%                    nott,%     %              nosf,%                    noamsmath,%                    notextcomp,%                    oldstylenums%                    ]{kpfonts}          \usepackage[euler-digits]{eulervm}          \usepackage{amsmath}     \usepackage{amsthm}               \begin{document}          \[     \mathcal{L}[f(t)](s)=\int_{0}^{\infty}f(t)e^{-st}dt     \]          \end{document}


title: Selective alignment tabs in tabular/array?

text: For a while now I've been thinking about an `array`/`tabular` feature that would be quite nice to have. It doesn't seem to exist yet, as far as I can discover. And unfortunately, I can't spare the time right now to develop it myself. If it _does_ exist, please let me know. Otherwise, perhaps someone may be inspired to work on it. If you are so inspired, I'll give you a **300-500 point bounty** when you've coded a working solution. Look below. ## Feature Description It involves a new way to indicate content alignment. Rather than using `&` to jump to the next column, all column separators are assigned a number (or name), and you have to refer to one specifically to align to it, for example with `&1`, `&2`, ... And `\\\` always aligns to the right border of the table. The upshot of all this is that it gives us a very simple syntax for `\multicolumn` like behavior.               \begin{tabular}{|l|l|l|}                     \hline         Cell One  &1  Cell Two  &2  Cell Three \\\hline         Cell One and Two        &2  Cell Three \\\hline         Cell One  &1  Cell Two and Three       \\\hline     \end{tabular}      would be short for               \begin{tabular}{|l|l|l|}                                    \hline         Cell One  &  Cell Two                   &  Cell Three \\\hline         \multicolumn{2}{|l|}{Cell One and Two}  &  Cell Three \\\hline         Cell One  &  \multicolumn{2}{l|}{Cell Two and Three}  \\\hline     \end{tabular}      It brings a bit of what `tabbing` does back to our nice modern `tabular` and `array` environments. `tabbing` itself is too simple to be useful in most situations. Myself, I would use it more for `array`s. Being a bit of a perfectionist I've taken to aligning even the smallest bits of my formulas, then using `\multicolumn` in all formulas that should just pass through that alignment. This contributes positively to the readability of the final document... but not that of the source-code. This feature would help immensely. Some remarks:   * A different syntax would be fine. But it should be _unobtrusive_ (i.e. short). David Carlisle has a point: A simple ampersand followed by a bare digit might have a lot of compatibility issues. Something like `&'1` or `&[1]` might be better. (Unless you can enforce that no space occurs between the ampersand and the index. But that would probably involve some big catcode-headaches.)   * The column specifier that would appear in `\multicolumn` should, by default, inherit from the main column specification in some sensible way. But we can come up with some nice syntax to override it.   * I imagine that using alignment tabs out of order should be an error.   * It should at least be compatible with all the standard functionality of the `tabular` and `array` environments. And preferably also with popular packages like `array`. ## Possible Extra Features   * The ability to create new ad-hoc tab positions. Unlike with `tabbing`, these should be _named_ and their placement should be decided by their right-most binding -- not fixed at their declaration.   * Simple syntax to jump to a (non ad-hoc) tab position relative to the current one. Such as good-old `&` to jump to the next. Something like `&>2` to jump ahead by 2. ## 300-500 Point Bounty As an extra incentive I offer a bounty between 300 and 500 reputation points to the person who writes the package described above. The exact value of the bounty depends on the quality of the package. I'm not 'officially' placing the bounty on the site yet, because I don't want to impose a one-week deadline. I will place and award the bounty when I've seen and tried the solution. May the mods strike me down if I don't. * * * ## Feedback on David Carlisle's answer Nice job there! And quick. But there's still some bugs. ### Version 0.1 Two separate things go wrong with the following example:               \begin{tabular}{|ll|l|l|}\hline         Cell One  \>2  Cell Two  \>3  Cell Three  \>4  Cell Four  \<\hline         Cell One and Two         \>3  Cell Three and Four         \<\hline         Cell One  \>2  Cell Two, Three and Four                   \<\hline     \end{tabular}        1. I removed the visible `\>2` separator, but this change is also applied for `\>3` in the second row.   2. Oddly, the fourth column doesn't want to be spanned at all. And (3) the following real-life example doesn't compile at all:               \[         \begin{array}{l@{{} = {}}l}             a + (b + c)  \>2  (a + b) + c  \<             a + b        \>2  b + a        \<             0 + a = a = a + 0         \end{array}     \]      ### Version 0.2 I see you fixed point 2 and 3 from above. Looking good! I can't find a way to break it anymore (right now). But I'd appreciate it if you could still fix nr. 1. This is the last reason left why I can't use it yet for my real-life documents. (After that there remain only 'would-be-nice' additions.) It needs to handle column separators better. Right now, it uses the column separator from the _first column_ of the preceding cell, whereas it should be using the one from the _last column_ of the preceding cell. Example:               \begin{tabular}{|l||l|l|l|}\hline         One \>2 Two \>3 Three \>4 Four \<\hline         One and Two \>3 Three and Four \<\hline         One and Two and Three \>4 Four \<\hline         One and Two and Three and Four \<\hline     \end{tabular}      (This bug is not visible in your `array` example because of a misconception of mine. I imagined that a `\<` would be _implied_ at the end of the last row. But I don't think this is something that should be fixed. The current behavior is fine.) Anyway, I'll give you the bounty right now (though I imagine you're not doing this for the 'points'). Still, a fix for that last problem would be great. Edit: Hehe. Seems you'll have to wait for tomorrow. Silly website. Offering "reward an existing answer" as a valid reason for a bounty, then enforcing a 24 hour waiting period.


title: inkscape pdf+latex, unclean exit

text: I have expected this question to be asked before, but searched and no luck. It took some effort to produce this MWE. I have followed this link. When I `pdflatex` compile this, it produces an `exit with code 1` on `Kile`, if it contains latex code. Even though the output file is good. Why is this unclean `exit`?               \documentclass[a4paper,10pt,twoside]{book}          \usepackage[pdftex]{graphicx}     \usepackage{epstopdf}          \newcommand{\executeiffilenewer}[3]{%     \ifnum\pdfstrcmp{\pdffilemoddate{#1}}%     {\pdffilemoddate{#2}}>0%     {\immediate\write18{#3}}\fi%     }          \newcommand{\includesvg}[1]{%     \executeiffilenewer{#1.svg}{#1.pdf}%     {inkscape -z -D --file=#1.svg %     --export-pdf=#1.pdf --export-latex}%     \input{#1.pdf_tex}%     }          \begin{document}          \begin{figure}[!ht]      \centering      \includesvg{bar}     \end{figure}          \end{document}      main.tex: my source code


title: compile only a certain specified part of the whole document?

text: I know there is a package called `comment`, which can let `latex` ignore some text. How can I do the inverse? I want to compile just a small segment of the whole `tex` file and let `latex` ignore other part. **EDIT** This is desirable when I'm looking for a specific coordinate in drawing on an image. But I do not want an solution just for handling figures. I've been using ktikz for drawing tikz figures, and the following to generate the pdf image and the complete latex source. ```               #!/bin/bash          filename="${1%.*}"".TeXTiKz"          echo "\     \documentclass{article} \          \usepackage{pgfplots} \          \usepackage{tikz} \          \usepackage[active,tightpage]{preview} \          \PreviewEnvironment{tikzpicture} \          \setlength\PreviewBorder{2mm} \               \begin{document} \              \input{$1} \          \end{document}" \     > $filename          echo $filename          pdflatex $filename


title: How to customize the display of references in beamer?

text: Is it possible to customize the display of a reference into a frame this way `[XXX, 14]` which takes the `[label, two_last_numbers_of_YEAR]` in beamer? If yes, how please? Any brilliant idea, please? Thanks a lot!


title: Align text with heading

text: Is there an easy way to align the text block with a section title? It should look like this:               1      Introduction            This is an example text.          1.1    Section            This text should also be intended.          1.1.1  Subsection            \ldots :)      PS: I am using the `scrreprt` documentclass.


title: How to display different text for a section's entry in the table of contents in ConTeXt?

text: In LaTeX, one can display different text in the table of contents, than what appears in the document, for `part`, `chapter`, and `section` titles using this:               \part[This text will appear in the table of contents]{This text will appear in the document}        * How can this be achieved in ConTeXt?


title: Fix vertical alignment in beamer

text: I am using a beamer frame in which the top has alternating list items, and the bottom has a picture. The problem is that because of the different number of rows for each item, the picture changes vertical position as I move between list items, as I show in the following code. Does anyone know how to "stick" it in place, at the bottom?               \documentclass{beamer}     \begin{document}       \begin{frame}[t]{System overview}       \begin{minipage}{\textwidth}         \begin{itemize}           \item<1|only@1> item1 (a single row)           \item<2|only@2> item2 \\ has 2 rows           \item<3|only@3> item3         \end{itemize}       \end{minipage}       \vfill       \begin{minipage}{\textwidth}         \centering         \includegraphics[scale=0.65]{picture.jpg}       \end{minipage}     \end{frame}     \end{document}


title: Proper fill when chaining curves

text: I'm trying to chain multiple bezier curves but when I try to fill them I cannot fill the complete closed curve but it seems to close each intermediate curve before filling. I've tried various things but nothing seems to work. Probably something simple... should be obivous that I do not want the following ![enter image description here](http://i.stack.imgur.com/apoBX.png) I'm simply "chaining" the paths... the same result happens if I do not chain them.               (P1) .. controls (C1) and (C2) .. (P2) (P2) .. controls (C2) and (C3) .. (P3) ...


title: How to construct  a confusion matrix in LaTeX?

text: A confusion matrix looks like: ![enter image description here](http://i.stack.imgur.com/ysM0Z.png) Is there an easy way to do the same using LaTeX? Otherwise I could just create a diagram with any software.


title: longtable does not work on ieeeconf, but works on Document class article

text: I am trying to add a long table of figures into latex. I am able to successfully add in `\documentclass[12pt]{article}`. But when I try adding it in the following document class, I get error:               \documentclass[letterpaper, 10 pt, conference]{ieeeconf}                 Error:          **Package longtable error: longtable not in 1-column mode \begin{longtable}**      The code for table I created is:               \begin{center}      \begin{adjustwidth}{-10cm}{}     \begin{longtable}{ccp{5cm}|}     \caption{results}\label{tab:support}\\     %Row1 __________________________________________________________________________     Image & result &My comments \\          \raisebox{-.5\height}{\includegraphics[width=140px,height=120px]     {Images/support/rgb_000938.eps}}     &\raisebox{-.5\height}{\includegraphics[width=200px,height=150px]     {Images/support/region_000938_1.eps}} & xxxx \\     \newline          \end{longtable}     \end{adjustwidth}     \end{center}


title: pgfmath expansion - call a command from within a pgfmath environment

text: I am trying to define a newcommand using pgfmath. This commands calls a previously defined command but it fails. It propably has to do something with expansion. I've read this question about expanding pgf macros within commands but I can't get it to work.               \documentclass{article}     \usepackage{tikz}          \newcommand{\mathresult}[1]{\pgfmathparse{#1} \pgfmathresult}     \newcommand{\doublemathresult}[1]{\pgfmathparse{2 * \mathresult{#1}} \pgfmathresult}          \begin{document}     \mathresult{1}     \doublemathresult{1}     \end{document}      The error message is > Incomplete \iffalse; all text was ignored after line


title: Layout for certificate

text: This is my environment for the certificate:               \newenvironment{alwayssingle}{%            \@restonecolfalse            \if@twocolumn\@restonecoltrue\onecolumn            \else\if@openright\cleardoublepage\else\clearpage\fi            \fi}%            {\if@restonecol\twocolumn            \else\newpage\thispagestyle{empty}\fi}      This is my certificate layout:               \renewenvironment{cert}{\begin{alwayssingle} \thispagestyle{empty}       \begin{center}       \vspace*{1cm}       {\Large \bfseries  Certificate}       \end{center}       \vspace{0.5cm}       \begin{quote}}     {\end{quote}     \end{alwayssingle}}      And these rules for certificate ending:                \newcommand\guideending[5]{%             \par             \noindent             \hskip.5\linewidth             \hbox{#1}\\             \hbox to.5\linewidth{Place: #2\hfil}%             \hbox{#3}\\             \hbox to.5\linewidth{Date: #4\hfil}%             \hbox{#5}%             \par     }      And this is the cerificate:               \begin{cert}     Certified that the dissertation entitled \dots     \vspace{0.1 in}          \guideending{Mr. John Doe}{Some Place}{Lecturer in Something}{15 April 2011}     {Some College}     \vspace{1cm}     \centerline{\textbf{Approved and forwarded to Some University}}     \guideending{Some Dean}{Some Place}{Dean}{20 April 2011}     {Some College}     %\vspace{0.05 in}     \textbf{Examiner's Signature \\}     1. \\     2. \\     \end{cert}      My issue is: there is huge space at top of the certificate. But the ending goes to the next page. So how can I reduce blank space at the top and make the ending remain on the same page?


title: Space between table and caption in Beamer

text: I am making a slide using Stockton beamer theme. I have added a table to a frame, however as you can see in the screenshot, that space between caption and table is too much. I made some search and found these codes,               \usepackage{subfig}     \captionsetup[table]{belowskip=1pt,aboveskip=1pt}          \usepackage[font=small,skip=0pt]{caption}      ![enter image description here](http://i.stack.imgur.com/czMKj.jpg) However, they both are not working. How can I solve this problem? Table looks so bad in this slide.               \documentclass[xcolor=svgnames]{beamer}      \usetheme{Stockton}          \usepackage{epsfig} %for figures     \usepackage{xcolor} %for color          \definecolor{hughesblue}{rgb}{.9,.9,1} %A blue I like to use for highlighting, matches Hughes Hallet's book          \logo{\includegraphics[height=2cm]{Seal_Cream.pdf}} % comment out this line if you do not have the pacific-seal file}          \title[Short Title \hspace{4em}\insertframenumber/     \inserttotalframenumber]{~ \\ Long Title:  A Sample Using \\ Stockton Beamer Theme \\~}           \author[short author name or speaker]{ \\ Sarah Merz, The University of the Pacific }           \date{January, 2010}          \begin{document}          \begin{frame}     \maketitle     \end{frame}               \begin{frame}     \frametitle{INPUT SELECTION}     \begin{itemize}     \item The load is influenced by many factors.:     \end{itemize}     \begin{table}[!htbp]     \caption {Factors that may influence electricity demand}     \label{table:1}     \resizebox{\linewidth}{!}{%     \begin{tabular}{|l|p{15cm}|}\hline       Calendar data & hour of the day, day of the week, holidays, 'bridge days', daylight saving time, school holidays\\\hline       Meteorological data & temperature, humidity, cloud cover, luminosity, earth's position in the eclipse, sun's altitude, wind speed, solar radiation, climate change\\\hline       Economic data & GDP, per capita GDP, consumer price index, average salary earnings, production plans of companies, electricity price, industrial expansion\\\hline       Demographic data & number of households, population growth, local area development\\\hline     \end{tabular}}     \end{table}     \begin{itemize}     \item The importance of horizon:     \begin{itemize}     \item For very short-term forecast (up to 6 hours) $\longrightarrow$ inputs based on past load values     \end{itemize}     \item Engineering judgment or human experience as well as some statistical/graphical analysis     \end{itemize}     \end{frame}          \end{document}


title: Using a .bat file with TeXlipse

text: I use TeXlipse as editor of my choice. Since I use the `nomencl` package, I added a `.bat` file in TeXlipse preferences:               @echo off          pdflatex -synctex=1 -interaction=nonstopmode main.tex     makeindex main.idx     makeindex main.nlo -s nomencl.ist -o main.nls     bibtex main      Now my problem is that every project would use this `.bat` file in this folder. If I have to swap between two projects I always need to adapt the file. Is there a way I can specify a `.bat` file directly in the `.tex` file, so that I can use a `.bat` file for a specific project?


title: Using MinionPro for the main font and Fontspec for the monospaced font

text: I am using `Minion Pro` for my document's main font and would like to use Consolas for my code listings. I know that I can set the monospace font using `fontspec` and `setmonofont`, but it seems I cannot use `fontspec` in conjunction with the `MinionPro` and `MnSymbol` packages that I use to set my document's main font. I do not want to use `fontspec` to set my main font, since headings in all- caps and small-caps do not render as nicely as with the `MinionPro` package. **My question** : Is there a way I can use the `MinionPro` package to set my main font and tell `fontspec` to 'ignore' the main font and just set the monofont. Else, is there another way to do what I'm trying to achieve?


title: How to include picture in banking style with exactly position

text: I would like to include a picture in banking style moderncv pacakge. I just want to locate it in right hand side from title. But.. I can do this with a simple               \includegraphics[scale=1]{picture}       because the picture is above or below title. I´ve thought in TikZ to create a node where I can put the picture but I´m not sure about this solution. Anyone know how could get it? ![enter image description here](http://i.stack.imgur.com/0tN13.png)


title: Omitting chapter numbers in section headers using memoir

text: I'm trying to find a way to remove the chapter number from the section headers when using `memoir`. Right now I'm using parts, but no chapters and zeroes appear in front of all section numbers. I tried reseting the chapter command like that:               \renewcommand\thesection{\arabic{section}}      or like that               \renewcommand\thesubsection{\arabic{section}.\arabic{subsection}}      and it didn't work as I expected. They both removed the chapter number, but also removed the subsection numbers. I'm sure there is a more clever way to do it.


title: Percent sign in a box

text: Is it possible to make a symbol which is a % inside a square box? I would like to use it to represent the function f(n,m) = n-(n % m). As in n `symbol` m. Or... is there a better idea for this notation?


title: Concatenate macro with string

text: I try to expand a macro containing a string with another string. It is in the document and thus I want to avoid using `@`. I tried the following using `etoolbox`               \expandafter\def\fileAcronym\democodefile     \appto\fileAcronym{-acronym}      It does not work. The `\demcocodefile` is not expanded (thus the `\expandafter`).


title: Why does datatool/pgfplots only plot for last row in table?

text: I'm trying to use `datatool` to put a bunch of circles on a `pgfplots` plot. I tried the following:               \documentclass{article}     \usepackage{datatool,tikz,pgfplots}     \pgfplotsset{compat=1.9}          \begin{filecontents}{coord.dat}     x,y     0,0     5,5     -3,4     \end{filecontents}          \DTLloaddb[noheader=false]{coordinates}{coord.dat}          \begin{document}     \begin{tikzpicture}       \begin{axis}[xmin=-10,xmax=10,ymin=-10,ymax=10,axis equal]             \DTLforeach*{coordinates}{\x=x, \y=y}{\draw (axis cs:\x,\y) circle[radius=2] ;}       \end{axis}     \end{tikzpicture}     \end{document}      But only one circle is plotted, at the coordinates from the last row in the table (i.e., centered at (-3,4)). I get 3 circles if I put the `\DTLforeach*` into a bare `tikzpicture` environment, so it looks like some problem between `pgfplots` and `datatool`. Or am I doing something wrong?


title: Customizing table of contents numbering completely

text: I have to build a document structure with the different sectioning-levels (and therefor also the table of contents) having a certain, custom "numbering" instead of the default mathematical. E.g. a section should alsways be starting like with roman numbering (what you do with "\Alph*.") in the list- environment, a subsection always "(\arabic*)", a paragraph with "\alph*\alph*)" and so on. I've searched plenty of times for that, but either nobody was ever in need of this before me, or I'm missing the correct tags to search for. Any way I can do that? This is, what the toc should look like:               A. Section      I. Subsection      II. Subsection       1) Subsubsection        a) Paragraph       2) Subsubsection        a) Paragraph         aa) Subparagraph     B. Section      I. Subsection       1) Subsubsection


title: I have two file -> a.tex and b.tex,how to insert b.pdf after a.pdf?

text: %********a.tex     \documentclass{book}     \usepackage[final]{pdfpages}     \begin{document}     Hello     \includepdf[pages=-]{b.pdf}          \end{document}      Now `b.tex`               %%%%%%%%%%     %********b.tex     \documentclass{book}     \begin{document}     World!     \end{document}     %%%%%%%%%%%


title: Default value of the space between rows in a tabular environment

text: Consider the following MWE.               \documentclass[12pt]{report}     \usepackage[francais]{babel}     \usepackage[utf8]{inputenc}          \begin{document}     \vspace*{\fill}     \begin{tabular}{l}         \textbf{« Ah ! comme la neige a neigé !} \\         \textbf{Ma vitre est un jardin de givre.} \\         \textbf{Ah ! comme la neige a neigé !} \\         \textbf{Qu'est-ce que le spasme de vivre} \\         \textbf{À la douleur que j'ai, que j'ai ! [...] »} \\         Émile Nelligan     \end{tabular}     \vspace*{\fill}          \end{document}      I want to double the space between the last rows, so that the name of the poet be disjoint from the poem. I know I can add an argument in brackets to the `\\\` to put more vertical space, but I don't know what is the exact value of the space between rows in a `\tabular` environment. All I've found is that it has default value 1 when trying to renew the command `\arraystretch` in the preamble. Since 1 is dimensionless, this tells me absolutely nothing about the real value.


title: Im trying to set up a graph but keep gettin error "isolated expression"

text: beginfig(1);     numeric u;     path xaxis,yaxis;     Scale: 1=u     u=0.5in;     yaxis= (0,-4.1u)--(0,4.2u);     xaxis= (-4.1u,0)--(4.2u,0);     pickup pencircle scaled 1pt;     drawarrow xaxis;     drawarrow yaxis;     pickup pencircle scaled 0.1pt;     for i=0 upto 100: draw (-4+i*0.1,-4)*u--(-4+i*0.1,4)*u; endfor;     for i=0 upto 100: draw (-4,-4+i*0.1)*u--(4,-4+i*0.1)*u; endfor;     pickup pencircle scaled 0.25pt;     for i=0 upto 10: draw (-4+i,-4)*u--(-4+i,4)*u; endfor;     for i=0 upto 10: draw (-4,-4+i)*u--(4,-4+i)*u; endfor;     label.rt(btex $x$ etex, (4.2u,0));     label.top(btex $y$ etex, (0,4.2u));     endfig(1);     end.


title: LaTeX adds a line break when the last line in a paragraph extends to the right margin

text: Could someone tell me why LaTeX adds a linebreak after stanza 11? [Edit: sorry, I think I should have used \par instead of double backslash               \getroot{§10§} \par     \getroot{§11§} \par     \getroot{§12§} \par        So no need to read on ... Edit2: But if I put `\setlength{\parindent}{0pt}` than the problem persists. So comments still appreciated! I am reading the stanzas as plain text from an external file line by line (one stanza = one line) via a self defined command. The "entries" look like this:               §11§~{Der einzige Führer der im Dasein Umherwandern hat mit seinem grenzenlosen Verstand aufgrund genauer und vollständiger Untersuchung den großen Wert [dieser Geisteshaltung erkannt]. Die sich von der Existenz der Welt befreien möchten, sollten deshalb den kostbaren Erleuchtungsgeist fest im Herzen bewahren.}     §     §12§~{Andere Arten des Heilsamen gleichen der Bananenstaude: Sie vergehen, nachdem sie ihre Früchte hervorgebracht haben. Doch der wunscherfüllende Baum in Gestalt des Erleuchtungsgeistes mag immerzu seine Früchte hervorbringen, und doch vermehren sie sich noch, ohne jemals zu versiegen.}     §     §13§~{.... etc.}      And the tex-file Looks simply like this:                ...     \getstanza{§11§} \\     \getstanza{§12§} \\     \getstanza{§13§} \\      ...      Is this a "normal" LaTeX behaviour when a line is filled or is due to some error in the text inserting function? The text is just plainly added (wrapped in the curly brackets). Edit: ok, here is the source file. Sorry, it's long ... So, what makes the difference is related with the macro \getroot{}. It fetches the root stanzas from an external text file roots-db.txt. The point is that the text is formatted differently if it is taken from the external file, or - with exactly the same code (string functions) - from within this source file. You see the part "filecontents" representing my data file as "fake". If I comment that part out and use the real external file roots-db.txt instead, the resultant formatting is different! Any idea why? What you see in the print of stanza 11, same text:   1. printed with \getroot{§11§} with string data from the external file   2. printed with the same string function, but with string from within the Latex file   3. printed with manual formatting % <- _- coding: utf-8 -_ - \documentclass[a4paper,12pt,twoside,parindent,smallheadings,pointednumbers,1.25headlines, nochapterprefix,headinclude,footexclude,mpinclude]{scrbook}              \usepackage{scrpage2}     \setkomafont{sectioning}{\bfseries\rmfamily}          \usepackage{calc}     \usepackage{xcolor}     \usepackage{typearea}     \areaset[0mm]{13.5cm}{24cm} % selbst setzen          \usepackage{fontspec}     \setmainfont[Mapping=tex-text]{Junicode}      \defaultfontfeatures{Mapping=tex-text}     \usepackage{polyglossia}      \setdefaultlanguage[spelling=new, babelshorthands=true]{german}          \renewcommand{\baselinestretch}{1.1}      \clubpenalty=10000 \widowpenalty=10000          \parskip2ex     \parindent0mm     \raggedbottom     \setlength{\marginparwidth}{0.7\marginparwidth}     \setlength{\headheight}{1.1\baselineskip} % von Komaskript empfohlen          %% Kopfzeilen:     \pagestyle{scrheadings}     \lehead{Eintritt in das Leben zur Erleuchtung}     \rohead{\leftmark}     \setheadwidth[0pt]{textwithmarginpar}       \setheadsepline{0.4pt}[]     %% Fußzeilen:     \lefoot{\pagemark}     \rofoot{\pagemark}     \setfootwidth[0pt]{head}          \usepackage{filecontents}          \begin{filecontents*}{roots-db.txt}     §     §10§~{Gleich einem golderzeugenden Elixier von besonderer Art wandelt [jenes Elixier], das man "`Erleuchtungsgeist"' nennt, diesen unreinen Körper, den wir angenommen haben, in einen kostbaren Buddha-Körper von unschätzbarem Wert. Halte also mit aller Kraft daran fest!}     §     §11§~{Der einzige Führer der im Dasein Umherwandern hat mit seinem grenzenlosen Verstand aufgrund genauer und vollständiger Untersuchung den großen Wert [dieser Geisteshaltung erkannt]. Die sich von der Existenz der Welt befreien möchten, sollten deshalb den kostbaren Erleuchtungsgeist fest im Herzen bewahren.}     §     §12§~{Andere Arten des Heilsamen gleichen der Bananenstaude: Sie vergehen, nachdem sie ihre Früchte hervorgebracht haben. Doch der wunscherfüllende Baum in Gestalt des Erleuchtungsgeistes mag immerzu seine Früchte hervorbringen, und doch vermehren sie sich noch, ohne jemals zu versiegen.}     §     \end{filecontents*}          \usepackage{xstring}     \usepackage{xifthen}          \newcommand*{\isinxp}[2]{\expandafter\isinxpp\expandafter{#2}{#1}}     \newcommand*{\isinxpp}[2]{\isin {#2}{#1}}          \newread\dbroot     \newcommand{\getroot}[1]{%     \openin\dbroot=roots-db.txt     \loop         \read\dbroot to \dbline         \unless\ifeof\dbroot         \ifthenelse{\isinxp{#1}{\dbline}}         {\StrCut{\dbline}{~}{\colA}{\colB}         \StrBetween[1,2]{\colA}{§}{§}.~\colB}         {}     \repeat     \closein\dbroot%     }          \begin{document}          \chapter*{Eintritt in das Leben zur Erleuchtung}     \section*{1. Die Vorzüge des Erleuchtungsgeistes}          First Page     \newpage          \getroot{§11§}           11.~{Der einzige Führer der im Dasein Umherwandern hat mit seinem grenzenlosen Verstand aufgrund genauer und vollständiger Untersuchung den großen Wert [dieser Geisteshaltung erkannt]. Die sich von der Existenz der Welt befreien möchten, sollten deshalb den kostbaren Erleuchtungsgeist fest im Herzen bewahren.}          \def\dbline{§11§~{Der einzige Führer der im Dasein Umherwandern hat mit seinem grenzenlosen Verstand aufgrund genauer und vollständiger Untersuchung den großen Wert [dieser Geisteshaltung erkannt]. Die sich von der Existenz der Welt befreien möchten, sollten deshalb den kostbaren Erleuchtungsgeist fest im Herzen bewahren.}}          \StrCut{\dbline}{~}{\colA}{\colB}     \StrBetween[1,2]{\colA}{§}{§}.~\colB \par           \getroot{§12§} \par          \end{document}      ![Output, same data, different formatting](http://i.stack.imgur.com/q6cSg.jpg)


title: Custom \maketitle in my custom class not working when I use report class

text: I am trying to write a new class using the report class. In my custom class I have used a custom `\maketitle`. But it is not working. But it works, if I use `article` class as my base. My class file is               \ProvidesClass{mins}[2/8/2013]     \NeedsTeXFormat{LaTeX2e}          \DeclareOption*{\InputIfFileExists{\CurrentOption.min}{}{     \PassOptionsToClass{\CurrentOption}{article}}}          \ProcessOptions \relax          \LoadClass[a4paper,12pt]{article}     %[left=.5in,right=.5in,top=1in,bottom=1in]     \RequirePackage[top=.5in,bottom=.5in]{geometry}     \RequirePackage{graphicx}     \RequirePackage{url}     \RequirePackage{titlesec}               \def\@maketitle{%     \newpage     \thispagestyle{empty}     Hello World       }               \newcommand{\makeack}{     \newpage     \thispagestyle{empty}     Hello World Again     }      and my TeX file is               \documentclass{myclass}     \title{My report Title}     \author{My Name}     \begin{document}     \maketitle     \makeack          \end{document}      My output is ![enter image description here](http://i.stack.imgur.com/xR6Tx.png) When I replace `article` with `report` in the class file, the output changes to ![enter image description here](http://i.stack.imgur.com/wJfVG.png)


title: How to use different lstset settings for listings?

text: I would like to specify two different `lstset` settings in one latex file: one for java code, one for html. Is this somehow possible? The solution of http://stackoverflow.com/questions/2654810/how-to-reset- lstset-settings-for-listings does not seem to be appropriate for my document because I have more than just one html listing.


title: Allow line break in BibLaTeX output

text: I have an BibLaTeX entry which causes in `\printbibliography` command a overful hbox. How can I tell BibLaTex that a line break is allowed without a minus symbol? In my case I have a text like `ABC.learning`. I want to allow BibLaTex to break the line after the dot.


title: Check if TeX installed is MikTeX

text: Is there a way to check from command line whether `tex` and other commands belong to MiKTeX or some other distribution (I want to only `(require 'tex- mik)` in Emacs initialization if it's needed)?


title: Convert a picture or figure to EPS or PDF file

text: In my document I'm embedding figures using the following code:               \begin{figure}[!t]       \centering       \def\svgwidth{1.2\columnwidth}       \resizebox{\columnwidth}{!}{         \endlinechar=255\relax         \begin{picture}(1,0.63636365)           \put(0,0){\includegraphics[width=\unitlength]{figure.eps}}           \put(0.50454546,0.58636365){\color[rgb]{0,0,0}\makebox(0,0)[b]{\smash{some text $ax^2+bx+c=0$.}}}         \end{picture}       }       \caption{Caption.}       \label{fig:figure}     \end{figure}      Where the image (`figure.eps`) contains no text and all annotations are added on top of the image using `\put` commands. This method works very well (annotations can include any LaTeX macros, which is extremely useful) as long as I'm sticking to TeX. Now, however, I'd like to take the _resulting_ figures (preferably in a vector format) and put them in some other tool. Questions:   1. Is there any way of outputting these `float`s into PDF files with no margins, captions and with page dimensions equal to the specified `float` size? I imagine I'd have to somehow wrap each `float` in a `.tex` file with a custom preamble.   2. Is it possible to automate this process so that if I want to dump all my _N_ figures to PDFs I don't have to repeat the step (1) _N_ times.


title: Where is TeXworks after installing TeX Live 2011 on Fedora 15?

text: I've installed TeX Live 2011 on Fedora 15 following the guide at the texlive site, http://www.tug.org/texlive/quickinstall.html. I've got `texdoc`, `tlmgr` and so on working from the terminal but I can't find TeXworks. I'm new to Fedora so this could be a very simple mistake.


title: What tips and tricks are there for debugging TikZ/PGF code?

text: When answering questions here and when drawing my own complicated TikZ/PGF drawings, I've developed a fair number of "tips and tricks" for debugging the code. I'm sure that others have as well. I think it would be useful to accumulate a list of such, whence this question: What are your tips and tricks for debugging TikZ/PGF code? * * * **Note:** in one sense this seems an obvious candidate for making Community Wiki as there is no single answer. However, I think that these tricks take some ingenuity and so deserve to gain their authors a modicum of reputation, whence I'm reluctant to make it a CW question (of course, I'll donate all my reputation gained from this question to a worthy cause). Once there are a fair few answers, I can see that organising them into a single CW answer would be a good thing, but that doesn't mean that the question should be CW. On the other hand, whilst in favour of it not being CW, I wouldn't be in anyway upset if the feeling was that it should be CW.


title: Trouble with the hyperref package in TexWorks

text: I'm writing my thesis with TeXworks and I'd like to use the `hyperref` package. I've downloaded the package from the internet but it doesn't seem to be working. This is my preamble:               \documentclass[a4paper,11pt]{report}       \usepackage[utf8]{inputenc}      \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[frenchb,english,]{babel}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{lmodern}     \usepackage{multirow}     \usepackage{subfig}     \usepackage{amssymb}     \usepackage[verbose]{placeins}     \usepackage{blindtext}     \usepackage{url}      \usepackage{fancyhdr}     \usepackage{epstopdf}     \usepackage{color}                    \epstopdfsetup{outdir=./}     \usepackage{multirow}     \usepackage{rotating}     \usepackage[toc,page]{appendix}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \renewcommand{\chaptername}{Section}               \usepackage{etoolbox}     \makeatletter     \patchcmd{\l@chapter}{1.0em}{0.9em}{}{}     \makeatother     \usepackage{hyperref}          \begin{document}      I get the following error:               Package hyperref Message: Driver (autodetected): hpdftex.          (/usr/local/texlive/2011/texmf-dist/tex/latex/hyperref/hpdftex.def     (/usr/local/texlive/2011/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))     (./test.aux          LaTeX Warning: Label `' multiply defined.               LaTeX Warning: Label `' multiply defined.               LaTeX Warning: Label `' multiply defined.               LaTeX Warning: Label `' multiply defined.               LaTeX Warning: Label `' multiply defined.               LaTeX Warning: Label `' multiply defined.          ) (/usr/local/texlive/2011/texmf-dist/tex/latex/lm/t1lmr.fd)     (/usr/local/texlive/2011/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     )     Runaway argument?     \sf@counterlist \relax \def \sf@temp {\@nil }\ifx \sf@temp \@nnil \else \ETC.     ! Paragraph ended before \sf@setref was complete.     <to be read again>                         \par      l.42           ?       Any help would really be appreciated! And I can give more info if needed. Thanks! Patricia


title: How could a resonance energy levels diagram be made using TikZ?

text: How could an energy levels diagram like the following be made using TikZ? ![](http://i.stack.imgur.com/8HsnB.png) I have seen some energy level diagram examples (such as this) but I am not sure how to make one that features an axis.


title: Pushouts and pullbacks

text: How do I typeset that little symbol which indicates that a commutative square is a pushout or pullback square? I usually draw my diagrams in XY-pic, so I'd be most interested in how to do it there. **Added** : The desired effect is a diagram like ![pullback](http://i.stack.imgur.com/OF6KI.png) Edit: The problem is in typesetting the actual symbol, the XY-pic user's guide says how to place it.


title: How to start chemical compound numbering in main text, not table of contents

text: > **Possible Duplicate:**   >  Chemcompound package : how to avoid the listoffigures scan ? I am writing my chemistry dissertation with LaTeX, and I am using the `chemstyle` package to automatically number compounds. I want the numbering to start in the main body of the dissertation and the numbering to follow the order that they appear in the main body. However, before that I have the table of contents and lists of schemes, figures, and tables. Since these contain some compound names with numbers and the numbering is starting from the beginning of the entire document, the numbering ends up being out of order with respect to the main body of the document. How do I make the numbering start in the main body of the document? * * * In case my original question was unclear, here is a simple document showing what I was talking about:               \documentclass{article}          \usepackage{chemstyle}          \begin{document}          \tableofcontents          \section{Section}     Compounds \compound{A} and \compound{B}.          \section{Compound \compound{B}}          text          \end{document}      This gives the result that the compound I want numbered first, compound{A}, ends up as compound 2. Thanks @cgnieder for your help! Both of the options you gave work great. I went with the second option since it helps me keep track of all my compounds, and I don't have to remember to include the plus sign for captions and section titles. I noticed that I need to have have               \usepackage[noimplicit]{chemcompounds}      before               \usepackage{chemstyle}      or I get the error message "Option clash for package chemcompounds." I have a question regarding your suggestion to look at the `chemnum` package. I am also using the `chemstyle` package to create the type of float "scheme," create a list of schemes, and to automatically update numbering within my structure images (well, I'm still figuring out the image updating part, having trouble allowing reading of eps images). Would `chemnum` allow me to do these things? I looked it up, and it looks like it doesn't, but maybe I'm missing something.


title: Preparing macro content in a loop (calling \foreach from \edef)

text: I need to do something like `\def\MyArray{{1, 2, 3, 4}}` but with a dynamical number of elements. The following command makes the string: `\newcommand{\MakeArray}[1]{\\{ 1 \foreach \x in {2, ..., #1}{ , \x} \\}}` How can I put the expanded result in a macro? I tried doing `\edef\MyArray{\MakeArray{4}}` but it doesn't compile...


title: How to configure the verbatim text?

text: In LaTex, I use \verbatim to add a block of text. But the problem is that the verbatim text doesn't follow the page style, and it exceeds the page boundary if the text is long. The result is shown as below: ![enter image description here](http://i.stack.imgur.com/IyEQb.png) As you can see, the example call exceeds the boundary. That's where I use verbatim. The following is my code to set up verbatim text, could anyone tell me how to fix this problem? I will appreciate. I am kind of in a rush to get it done.               % Used by @verbatim ... @endverbatim     \newenvironment{DoxyVerb}{%       \fontencoding{OT1}\fontfamily{cmr}\fontseries{b}\fontshape{n}\fontsize{10pt}{10}\selectfont%       \verbatim%     }{%       \endverbatim%       \normalsize%     }


title: Putting limits *underneath* new operators

text: I'd like to declare a new math operator called the "strong limit" as follows:               \DeclareMathOperator{\slim}{s-lim}      So it's just "lim" (i.e., `\lim`), but with an "s-" in front. I want to be able to write things like `\slim_{t\to \pm \infty}`. And I can, and it compiles. However, it always puts the limit out to the right-hand side, never directly underneath the "s-lim" -- even when I try to use the `\limits_{...}` option. Is there any way to correct this?


title: Listings rule breaking into pieces when using xleftmargin=3pt,xrightmargin=3pt

text: I'm using the below coding in a Tex file and when I view the DVI output the frame rule for listings gets breakdown (please look into the screenshot below) Could some one help me in solving this issue?               \documentclass{book}          \usepackage{color}     \usepackage{float}     \usepackage{listings}          \overfullrule=12pt          \definecolor{dkgreen}{cmyk}{0.81,0.48,0.95,0.59}%     \definecolor{gray}{cmyk}{0.69,0.63,0.62,0.59}%     \definecolor{mauve}{cmyk}{0.84,1,0.27,0.39}%               \makeatletter     \def\@viiihpt{8.5}          \newcommand\codesize{\@setfontsize\codesize\@viiihpt{10}}          \lstset{        basicstyle=\ttfamily\codesize,        backgroundcolor=\color{white},        showspaces=false,        showstringspaces=false,        frame=single,xleftmargin=3pt,xrightmargin=3pt,        rulecolor=\color{black},        keywordstyle=\color{blue},        commentstyle=\color{dkgreen},        stringstyle=\color{mauve}     }     \makeatother          \begin{document}          \chapter{Book title}          \lstinputlisting[float=b,language=Python,        caption=Creating a Tk Root Widget (Python Coding),        label=P04-Tk.py] {P04-Tk.py}          \end{document}      Below is the coding used in `P04-Tk.py`               from tkinter import *                                 # import Tkinter module          root = Tk()                                           # create Tk root widget          root.mainloop()                                    # enter Tkinter event loop      **edit:** [barbara beeton] this also happens when the files are processed with pdflatex, and only when the comments are moved to a new line. here are the results with the original code, and with the `.py` file modified to shorten the lines so all of them remain on a single line in the output: ![enter image description here](http://i.stack.imgur.com/bJvdj.png) ![enter image description here](http://i.stack.imgur.com/MtsEK.png) is this a bug, or is there a known solution other than avoiding (or breaking) long lines?


title: How to set the precision in numbers

text: I include the number as `\num{0.12368455}`. I need to print '0.1237'. **How to do this...**


title: How can I color only Cover page for PhD thesis

text: Can you help me in formatting my title page (cover page). It is for my PhD thesis. I have to follow this example https://www.dropbox.com/s/clexb8dauxom2k4/tamplate.jpg ... For this purpose I am using these codes for title page               \begin{titlepage}          \pagecolor{gray}\afterpage{\nopagecolor}          %Cover image        \begin{center}         \includegraphics[width=0.8\textwidth]{images.eps}        \end{center}         %Autor name         \begin{center}      \vspace*{2cm}       {\LARGE\bf Gilson Manuel Gomes Pina}              %Thesis title           \vspace*{1.2cm}       {\Huge \bf Monetary and Fiscal Policy and Business Cycles in Emerging Markets}                \vspace*{1.2cm}            {\small PhD thesis in economics, specializing in Monetary Economics, supervised by Professor Pedro Bação and Professor Ricardo Sousa and presented to the Faculty of Economics, University of Coimbra.}              \vspace*{1.0cm}              {\small September 2014}              \end{center}            \vspace*{1.6cm}              \begin{center}         \includegraphics[width=0.3\textwidth]{insigniafeuc.eps}             \end{center}         \begin{center}         \textsc{\small Faculty of Economics, University of Coimbra}         \end{center}          \end{titlepage}      and for the full thesis compilation I am using:               \documentclass{dmathesis}     %% uncommand the following line to print equation labels next to     %% equation numbers.      \usepackage{lipsum}% for auto generating text     \usepackage{xcolor}               \usepackage{showlabel}     %% The following is to control the format of the thesis     \input{format}          %% File to be included while running latex.     \includeonly{chapter1,chapter2,chapter3%                      ,chapter4,chapter5,chapter6,ref,append}          \begin{document}          %% Front page of thesis     \input{coverpage}     \input{frontpage}          %% Main text     % set page number starts from 1     \pagenumbering{arabic}     \setcounter{page}{1}          %% To ensure the equation counter works correctly     \eqlabon     \eqlaboff          \include{chapter1}     \include{chapter2}     \include{chapter3}     \include{chapter4}     \include{chapter5}     \include{chapter6}     \include{ref}     \include{append}     \end{document}      So, the problem are: first one, I need to include the "color page" just for cover page, but it will appear in the full thesis. I'm trying many examples from the web, but anything is working. How can I do that? And the second one, How can I put the image to occupy full top of the cover page, as in the example? Thank you for your help.


title: How to make pgfgantt scale to specific widths in the page? (ex. textwidth)

text: I'm trying to use pgfgantt to create a gantt chart for a project spanning many weeks, thus the following code would overflow through the right margin. I can't find a way to alter the size of the grid elements or time slots:               \begin{tikzpicture}[x=.5cm, y=1cm]     \begin{ganttchart}%     [vgrid, hgrid]{50} % 50 weeks     \gantttitle{Title}{12} \\     \ganttbar{Task 1}{1}{4} \\     \ganttbar{Task 2}{5}{6} \\     \ganttmilestone{M 1}{6} \\     \ganttbar{Task 3}{7}{11}     \ganttlink{4}{2}{5}{3}     \ganttlink[b-m]{6}{3}{6}{4}     \ganttlink[m-b]{6}{4}{7}{5}     \end{ganttchart}     \end{tikzpicture}      **My former question above, however here's a new angle...** How can I make pgfgantt scale everything by limiting its size to specific parameters? ex. I want it to span the full textwidth of the page or the full width save for the margins.


title: Hyphenation points within rigidly typeset formulas

text: Because I am not fond of the look of tracking ("stretching") for math formulas, I generally use `${...}$` instead of `$...$` for math formulas. (Please respect this aesthetic preference of mine.) However quite often, this leads to overshoot lines. Here is some working example code leading to this problem:               \documentclass{article}          \begin{document}          Consider the following claim: ${a \in S \cap T}$ or     maybe ${a^2 + b^2 = c^2}$ and ${e^{\pi i} + 1 = 0}$, but     not ${xy = abc = uvw}$ or ${a/b = c/d = \frac{e}{f}}$     are interesting formulas. The preceding text was meant     to cause overshoot mathematical formulas.          \end{document}      Specifically, here the word "preceding" is broken between lines 2 and 3 as pre-ceding, but line 1 has the formula `${e^{\pi i} + 1 = 0}$` overshoot into the margin. The end of the equals sign aligns (roughly) with the end of the hyphen in "pre-ceding", with "0," being placed into the margin. I would like to indicate an optional math formula line break before the equals sign. Is there a way to specify optional linebreak points for math formulas (just like `\\-` can be used to indicate a hyphenation point for a word), _while maintaining the constraint that math formulas are never tracked_?


title: Single Column layout

text: I'm writing a technical port as part of my studies, but, I'm learning how to use LaTeX. I have a skeleton structure based approach that requires makefiles. I cannot seem to figure out how I would have a single column, instead of a two-column page I normally work in (when writing papers) - This is just a technical report so needs one column (Just like I would find in office packages). I have tried using the following:               \LoadClass[a4paper,landscape, onecolumn, 10pt]{article}      What am I doing wrong? P.S. I'm very new to LaTeX.


title: Different xlabels for same x values on different plots

text: I have two tables that hold different values for the same x values. To compare them, I want to plot both of them in the same plot but with different xlabels. The tables should remain the same, i.e. I do not want to change the x values in the tables because they are also used for other plots.               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}         \begin{axis}[                 ybar,                  xtick=data]             \addplot table {                 1 1             };             \addplot table {                 1 2             };         \end{axis}     \end{tikzpicture}     \end{document}      This code produces the following image: ![current- state](http://i.stack.imgur.com/z2ZWL.png) What I want however, is something like this: ![enter image description here](http://i.stack.imgur.com/oRjeJ.png) I thought, there might be an easy option like `addplot[x label=A]` but so far I haven't found anything. Approaches I've tried:   * `xticklabels={A, B}` - since the x values are the same, only the first label is printed. We obviously need something where we can tell pgfplots that the x values are not the same.   * `xticklabel={\pgfmathparse{\labelnames[Mod(\tick,2)]}\pgfmathresult}` where `\def\labelnames{{"A", "B"}}` - same problem, the tick does not change.   * `symbolic x coords={A, B}` - does not work since the x values are not named A and B.


title: Good Reference Book

text: I am having a problem getting two sets of data plotted on the same graph and have trawled the www for info on how to solve it. The closest I have found is this TeX.SX post.   However, that is a specific solution to a specific question. My question is, therefore, "can anyone recommend a good reference on how to get PS tricks to do what you want?". I have bought a copy of "PS Tricks" by Herbert Voß; this gives a lot (!) of examples of what can be achieved and the code to achieve it - and it gives some (but not much) explanation on how the parameters are chosen. I have also found (various copies of) "`ps-plot.pdf`" which gives lists of what the parameters are and what they are intended to do - but its examples are not particularly clear/useful. I need/want something which works the other way to Voß's book; i.e. it gives good, clear explanations of the parameters and options, and then gives examples on how changing the parameters affects the output (rather than just moving on to the next example).


title: Reference a website in bib

text: I want to reference a website in my bib file. I use:               \usepackage{natbib}      I found:               @misc{Xmisc,      %author    = "",      %title     = "",      %howpublished = "",      %year     = "XXXX",      %month    = "",      %note     = "",     }      but this does not include **Last Visited** field. Any suggestions?


title: How can I get a subentry in moderncv?

text: In my cv, I want my internship to be a sub-entry of my masters education. MWE:               \documentclass[12pt,a4paper,sans]{moderncv}          \moderncvtheme[green]{classic}     \usepackage[utf8]{inputenc}     \usepackage[scale=0.8]{geometry}          \firstname{Ice}     \familyname{Rabbit}     \title{curriculum vitae}          \begin{document}     \begin{center}     \makecvtitle     \end{center}          \section{Education}     \cventry{2011 -- 2014}{Master Penguin science}{University of Queen Maud Land}{Antarctica}{}{More learning about penguin behaviour in Antarctica.}          \cventry{2012}{Internship}{University of Ellesmere Island}{Nunavut, Canada}{}{Internship assignment. The goal was to find penguins in the Canadian Arctic.}          \cventry{2006 -- 2011}{Bachelor Penguin science}{University of Queen Maud Land}{Antarctica}{}{Learning about penguin behaviour.}          \end{document}      Result ![MWE result](http://i.imgur.com/vu2ADAY.png) I've gotten the advice to indent the internship entry, to make it more clear that it was a part of my masters education, rather than a separate education. How can I indent this entry? Alternatively, is there another method to clearly list my internship as part of my masters education? I do want the internship to be clearly present, since on my real cv it shows some good achievements (international experience, high grade, scientific publication)


title: TikZ:How to connect nodes in another way

text: I have this...               \documentclass{standalone}      \usepackage{tikz}     \usetikzlibrary{positioning,shapes.geometric,decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,patterns,calc,fit,arrows}          \begin{document}          \begin{tikzpicture}[>=latex',auto,inner sep=2mm,node distance=2cm and 3cm,scale=1]          %set styles for the axis between turbine and pump and for the boxes          \tikzset{box1/.style={draw,minimum width=2.5cm,rectangle,thick}}     \tikzset{deco/.style={decoration={markings,                            mark=at position #1 with {\arrow{>}}},                            postaction={decorate}}}     \tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium angle=80,on grid}}             % draw nodes     \node[turb] (turbine) {Turbine};     \node[box1,on grid,below left=of turbine] (condenser){Condenser};     %connections     \begin{scope}[>=triangle 45]      \draw [deco=0.6]  (turbine.bottom left corner) |- (condenser);      \end{scope}     %     \end{tikzpicture}     \end{document}       ![enter image description here](http://i.stack.imgur.com/qhYc8.png) But i need this way...new pink connection ![enter image description here](http://i.stack.imgur.com/iwuJL.png) > Is it possible to connect near the end (Red line). say 1 or 2 mm away from > turbine.bottom left corner... ![enter image description here](http://i.stack.imgur.com/XKMWu.png)


title: Biblatex, authoryear-comp, and hyperlinks

text: In answer to this question, Audrey offered an answer that works great with the `authoryear` option. (Context: I'm trying to get the hyperlink in citations to include the name of the author, and not just the year. Audrey provided a solution that works with `authoryear`, and I'm trying to adapt it to work with `authoryear-comp`.) I'm trying to adapt the answer to make it work with `authoryear-comp`. Here is what I tried (it doesn't work---I get an error message: `Latex Error: ./biblatex.tex:96 Argument of \@secondoftwo has an extra }. Runaway argument?`):               \renewbibmacro*{cite}{%     \printtext[bibhyperref]{% Enclose cite macro output in hyperlink         \global\togglefalse{cbx:hyperref}% Prevent nested hyperlinks       \iffieldundef{shorthand}         {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}            {\usebibmacro{cite:label}%         \setunit{\addspace}%         \usebibmacro{cite:labelyear+extrayear}%             \usebibmacro{cite:reinit}}            {\iffieldequals{namehash}{\cbx@lasthash}               {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND                            \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}                  {\setunit{\addcomma}%                   \usebibmacro{cite:extrayear}}                  {\setunit{\compcitedelim}%                   \usebibmacro{cite:labelyear+extrayear}%                   \savefield{labelyear}{\cbx@lastyear}}}               {\printnames{labelname}%            \setunit{\nameyeardelim}%                \usebibmacro{cite:labelyear+extrayear}%                \savefield{namehash}{\cbx@lasthash}%                \savefield{labelyear}{\cbx@lastyear}}}}         {\usebibmacro{cite:shorthand}%          \usebibmacro{cite:reinit}}%     \global\toggletrue{cbx:hyperref}}       \setunit{\multicitedelim}}      I don't fully understand how `\cite` works under `authoryear-comp`, so maybe someone who does can see a way to do this? (I'm assuming it's possible, since this is how hyperlinks are implemented in BibTeX.) EDIT (in re: to Marco's comment): Here's a minimal example:               \documentclass{article}      \usepackage[utf8]{inputenc}      \usepackage[style=authoryear-comp]{biblatex}      \usepackage[colorlinks]{hyperref}      \bibliography{biblatex-examples}                \newtoggle{cbx:hyperref}     \toggletrue{cbx:hyperref}          \DeclareFieldFormat{bibhyperref}{% Adapted from bibhyperref format in biblatex.def     \iftoggle{cbx:hyperref}     {\bibhyperref{#1}}     {#1}}               \renewbibmacro*{cite}{%     \printtext[bibhyperref]{% Enclose cite macro output in hyperlink         \global\togglefalse{cbx:hyperref}% Prevent nested hyperlinks       \iffieldundef{shorthand}         {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}            {\usebibmacro{cite:label}%         \setunit{\addspace}%         \usebibmacro{cite:labelyear+extrayear}%             \usebibmacro{cite:reinit}}            {\iffieldequals{namehash}{\cbx@lasthash}               {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND                            \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}                  {\setunit{\addcomma}%                   \usebibmacro{cite:extrayear}}                  {\setunit{\compcitedelim}%                   \usebibmacro{cite:labelyear+extrayear}%                   \savefield{labelyear}{\cbx@lastyear}}}               {\printnames{labelname}%            \setunit{\nameyeardelim}%                \usebibmacro{cite:labelyear+extrayear}%                \savefield{namehash}{\cbx@lasthash}%                \savefield{labelyear}{\cbx@lastyear}}}}         {\usebibmacro{cite:shorthand}%          \usebibmacro{cite:reinit}}%     \global\toggletrue{cbx:hyperref}}       \setunit{\multicitedelim}}          \DeclareCiteCommand{\textcite}% Adapted from \textcite command in authoryear.cbx       {\boolfalse{cbx:parens}}       {\usebibmacro{citeindex}%       \printtext[bibhyperref]{% Enclose textcite macro output in hyperlink         \global\togglefalse{cbx:hyperref}% Prevent nested hyperlinks         \usebibmacro{textcite}%         \iffieldundef{postnote}% Include closing parenthesis if no postnote           {\ifbool{cbx:parens}              {\bibcloseparen\global\boolfalse{cbx:parens}}           {}}        {}}%      \global\toggletrue{cbx:hyperref}}      {\ifbool{cbx:parens}      {\bibcloseparen\global\boolfalse{cbx:parens}}      {}%       \multicitedelim}      {\iffieldundef{postnote}       {}      {\usebibmacro{textcite:postnote}}}          \begin{document}      A reference to \parencite{kastenholz,sigfridsson} and~\cite{sigfridsson}.      \printbibliography      \end{document}      I'm using references from the `biblatex-example` database. The error I get is this: `Paragraph ended before \@secondoftwo was complete.`


title: How to set up spell-checking with vim?

text: I'm using `vim` to write my thesis. It's a multi-document project, with most tex files in subdirectories from the master-document. I've set up a couple of `\newcommands` to replace the use of `\section*{}` in the Introduction, but when writing the sections, misspelt words aren't highlighted. I thought it was a problem with `vim-latexsuite`, so I've just uninstalled it, but still, spell-checking functionality doesn't work in these sections. For example, a MWE with the following files:-               thesis.tex     thesis.tex.latexmain     Classes/Thesis.cls     Intro/intro.tex      thesis.tex :               \documentclass[twoside,openany,titlepage,12pt]{Classes/Thesis}          \pagenumbering{roman}     \begin{document}          \include{Intro/intro}          % ...          \end{document}      Classes/Thesis.cls :               \ProvidesClass{Classes/Thesis}[2014/07/14 v1.2 Thesis template]          \LoadClass[pdftex, a4paper]{report}          \usepackage[pdftex,                 plainpages = false,                 pdfpagelabels,                 bookmarks,                 bookmarksopen = true,                 bookmarksnumbered = true,                 breaklinks = true,                 linktocpage,                 pagebackref,                 colorlinks = true,                 % Colour settings from::                 % http://tex.stackexchange.com/questions/30243                 linkcolor=NavyBlue,                 citecolor=BrickRed,                 filecolor=black,                 urlcolor=BrickRed,                 hyperindex = true,                 hyperfigures                 ]{hyperref}          \usepackage{tocbibind}     \usepackage{bookmark}     \usepackage[english]{babel}     \usepackage{times}     \usepackage[a4paper]{geometry}     \usepackage{pdfpages}               \newcommand\chapwtoc[1]{%       \phantomsection       \chapter*{#1}       \addcontentsline{toc}{chapter}{#1}       \markboth{#1}{}     }          \newcommand\secwtoc[1]{%       \phantomsection       \section*{#1}%       \markright{#1} % Get the Section name in headnotes       \addcontentsline{toc}{section}{#1}     }      Intro/intro.tex :               \chapwtoc{First chapter}          this is a msisisspelt word. Some mnore mis-spellings.               \secwtoc{First section}          some more misskjkpellings.          % vim: spell spelllang=en_gb      `thesis.tex.latexmain` is an empty file, as suggested in the latexsuite documentation for Multiple file LaTeX projects How do I get spell-checking to work in the `intro.tex` sections? Using vim 7.4 on Linux


title: feynmp - ! Missing $ inserted

text: I'm trying to execute the code:               \documentclass{article}     \usepackage{feynmp}          \begin{document}     \unitlength = 1mm     % determine the unit for the size of diagram.          \begin{fmffile}{fmfile}{simple_tree}     \begin{fmfgraph}{50,35}     \fmfleft{i1,i2}     \fmfright{o1,o2,o3,o4,o5,o6,o7,o8,o9,o10,o11}     \fmf{fermion}{i1,v1,o1}     \fmf{gluon}{v1,v2}     \fmf{fermion}{o2,v2,v3}     \fmf{fermion}{v3,v4,v5,o3}     \fmf{fermion}{v5,v6}     \fmf{fermion}{o4,o5}     \end{fmffile}      \end{document}      However, I get an error that begins with               ! Missing $ inserted       May I ask where I am going wrong here? **Edit** : I've changed the code as follows, with the `feynmp-auto` and graph corrections:               \documentclass{article}     \usepackage{feynmp-auto}          \begin{document}     \unitlength = 40mm     % determine the unit for the size of diagram.          \begin{fmffile}{simple_tree}     \begin{fmfgraph}(50,35)     \fmfleft{i1,i2}     \fmfright{o1,o2,o3,o4,o5}     \fmf{fermion}{i1,v1,o1}     \fmf{gluon}{v1,v2}     \fmf{fermion}{o2,v2,v3}     \fmf{fermion}{v3,v4,v5,o3}     \fmf{gluon}{v5,v6}     \fmf{fermion}{o4,v6,o5}     \end{fmfgraph}     \end{fmffile}     \end{document}      Now however I get the error:               ! LaTeX Error: File `feynmp-auto.sty' not found.      from Texmaker. I used command line and get the same thing.


title: How to check tikz version using \listfiles Command

text: I tried to the following code to get the version information about TikZ using `\listfiles` command. However, there is an error says `File amsmath.sty not Found`, may someone help me?               \documentclass{article}     \usepackage{mathtools}     \usepackage{dateiliste}     \listfiles     \begin{document}     \printFileList     \end{document}


title: How to get a properly indented custom enumerate list (with checklist-style blanks)?

text: I'm trying to make an enumerated checklist that looks like this:                   Paragraph text here that says really cool stuff. Notice how the list after is          properly indented              ___ 1. Thing 1         ___ 2. Thing 2         ___ 3. Thing 3              And the paragraph afterward, with good margins      This (though cumbersome) gets pretty close, but for some reason the margin gets messed up:               Paragraph text that says really cool stuff.          \begin{enumerate}     \item[\underline{\hspace{0.5in}} 1.]     \item[\underline{\hspace{0.5in}} 2.]     \item[\underline{\hspace{0.5in}} 3.]     \end{enumerate}          And the paragraph after.      The output looks like this:                   Paragraph text here that says really cool stuff. Notice how the list after is         NOT PROPERLY INDENTED          ___ 1. Thing 1     ___ 2. Thing 2     ___ 3. Thing 3              And the paragraph after.      I've dinked around a little with `enumitem`, but I have the same margin trouble. Can you tell me what I'm doing wrong?


title: Redefine \middle| to insert space before and after itself

text: I want to use \middle| inside of brackets like this.               \documentclass{article}     \begin{document}          \begin{equation}       \left\{\frac{1}{n} \middle| n>0\right\}     \end{equation}          \end{document}          \end{document}      But this examples lacks space before and after the mid |. I don't want to write every time:               left\{\frac{1}{n} \;\middle|\; n>0\right\}      How can I redefine the \middle| command to mean \;\middle|\;? I tried               \edef{\middle|}{\,\middle|\,}      and               \let\originalmiddle\middle     \renewcommand{\middle}{\;\originalmiddle\;}      but neither works. What is the difference between both commands and why do they not work with \middle?


title: Externalize creates Tex Memory error

text: I have a tikz picture that I generated from matlab2tikz. Building the file standalone is no problem, including it into the main document using \include is also no problem. However I want to externalize, and as soon as I use this, I get Tex Main Memory errors. I already increased my main memory, and as said can compile the document in different ways. As i want to use format dependent sizing however, I rely on the externalize for that. Any clues as to why?


title: references to floats without ever using figure numbers (possbily using lua or python)

text: Stephen Wolfram's 'A New Kind of Science' states in its colophon that it has 973 illustrations spread out over 1280 pages. Remarkably, he accomplishes this without ever using figure numbers. No figure has any number and each figure is referenced in the text using statements like '... the picture on the facing page ...' or '... the picture below ... ' or '... as illustrated to the left ...', etc. Leaving aside the dubious science in this book, I find the positioning in the book to be a tour de force of book layout. My question is whether this can be accomplished using TeX? I have never seen, or heard mention of, any LaTeX package that does anything like this, so I presume accomplishing something like this would require fine grained control of LaTeX's float positioning algorithm and implementing a custom solution, probably using LuaTeX or pythonTeX. Wolfram states that he used Mathematica to position the figures and to solve "innumerable small geometrical puzzles to do so".


title: How to obtain a fixed gap between columns in a table?

text: How can I center a column of a table which is raggedleft/raggedright at a specified position? Basically the length between _W_ and _X_ , _X_ and _Y_ and _Y_ and _Z_ should be the same, _W_ should be raggedright, _Z_ should be raggedleft. The positions of _W_ and _Z_ are already very near to what I want but the columns under them aren't centered... The first image is what I got already and the second one is my aim. ![enter image description here](http://i.stack.imgur.com/eUMBa.png) ![enter image description here](http://i.stack.imgur.com/6dwe1.png) And a MWE:               \documentclass[11pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \IfFileExists{MyriadPro.sty}{\usepackage[lf]{MyriadPro}\renewcommand{\familydefault}{\sfdefault}}{\relax}     \usepackage{array}          \begin{document}          \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          \begin{tabular}{m{1cm}C{1.3cm}C{1.3cm}R{1cm}}     \textbf{W}& \textbf{X} & \textbf{Y} & \textbf{Z} \\      \hline      \textbf{A n.c.} & 23,2 & 23,2 & 33,4 \\     \textbf{B} & 4 & 5 & 6 \\      \textbf{C} & 7 & 8 & 9 \\      \textbf{D} & 10 & 11 & 12 \\      \textbf{E} & 13 & 14 & 15 \\      \end{tabular}          \end{document}      Most of the code I got from here.


title: missing value in multirow envoirnment of a table in beamer slide

text: i want to add this table in beamer, but when i use multirow envoirnment , values aginst multirows is not showing in the table. my MWE is as               \documentclass[xcolor=table]{beamer}          \usepackage{adjustbox}          \usepackage{array}          \usepackage{multirow}               \begin{document}               \begin{frame}{Financial Ind}               \centering          \adjustbox{max height=\dimexpr\textheight-5.5cm\relax,                max width=\textwidth}{          \rowcolors{1}{tableShade}{white}          \rowcolors[]{2}{blue!20}{pink!30}          \begin{tabular}{|l|c|c|}          \hline           \textbf{Institutions (As on March 31, 2013) } & \textbf{Numbers } & \textbf{Balance Sheet Size }\tabularnewline          \hline           Banks & 38 & 10.14 (Billion US\$)\tabularnewline          \hline           Development Finance Institutions (DFIs) & 8 & 0.57 (Billion US\$)\tabularnewline          \hline           Microfinance Institutions (MFIs) & 10 & 0.09 (Billion US\$)\tabularnewline          \hline           Mutual Funds & 144 & .01 (Billion US\$)\tabularnewline          \hline           Modaraba Companies & 21 & \multirow{8}{*}{0.09 (Billion US\$)}\tabularnewline          \cline{1-2}           Asset Management Companies & 18 & \tabularnewline          \cline{1-2}           Leasing Companies & 10 & \tabularnewline          \cline{1-2}           Pension Funds & 23 & \tabularnewline          \cline{1-2}           Investment Banks & 8 & \tabularnewline          \cline{1-2}           Cooperative Banks + Venture Capital & 2 + 1 & \tabularnewline          \cline{1-2}           Insurance Companies & 51 & \tabularnewline          \cline{1-2}           Exchange Companies & 56 & \tabularnewline          \hline           \end{tabular}          }     \end{frame}     \end{document}


title: An acknowledgements page looks awesome

text: How do I to make this acknowledgements page font looks better? Any brilliant idea, please ?                \documentclass[11pt,a4paper,english]{article}             \usepackage[T1]{fontenc}             \usepackage[utf8]{inputenc}             \usepackage{babel}                  \begin{document}                   \clearpage     \thispagestyle{plain}     \chapter*{Acknowledgements}     \par\vspace*{.35\textheight}{\centering Dedicated to my professor\par}     \\               \centering        \texttt{ It is with our deepest gratitude and warmest affection \\             That we dedicate this thesis \\             To our Professor Dr. X \\         Who has been a constant source of Knowledge and inspiration.}                  \end{document}      ![enter image description here](http://i.stack.imgur.com/yGAXv.jpg) ![enter image description here](http://i.stack.imgur.com/RTv6d.jpg) could you please suggest me way to make this acknowledgements page nice looking??


title: How can I create a new environment with mdframed and empty for exercise answers?

text: I borrowed the following MWE from here but I would like to be able to create an empty environment to use for exercise answer with variable vspace. The exam class has the \makeemptybox{} option, but I wish to use the tufte-handout class and the mdframed package because it allows page breaks.               \documentclass{tufte-handout}     \usepackage{tikz}     \usepackage[framemethod=default]{mdframed}          \global\mdfdefinestyle{exampledefault}{%     linecolor=lightgray,linewidth=1pt,%     leftmargin=1cm,rightmargin=1cm,     }          \newenvironment{mymdframed}[1]{%     \mdfsetup{%     frametitle={\tikz\node[fill=white,rectangle,inner sep=0pt,outer sep=0pt]    {#1};},     frametitleaboveskip=-0.5\ht\strutbox,     frametitlealignment=\raggedright     }%     \begin{mdframed}[style=exampledefault]     }{\end{mdframed}}          \usepackage{blindtext}          \begin{document}          \section{Some text}          \blindtext\footnote{text ends here.}          \bigskip          \begin{fullwidth}         \begin{mymdframed}{This empty frame} % requires a vertical space of 25cm         \end{mymdframed}     \end{fullwidth}          \section{Another text\protect\footnote{to be continued after the empty frame with about 25cm}}          \blindtext          \blindtext          \end{document}


title: Weird problem with \TextField in a form

text: I have the following code defined in a class file I am writing:               \newlength{\textfieldlength}\newlength{\labellength}\newlength{\testlength}          \newcommand{\textfieldintable}[3]{     \setlength{\textfieldlength}{\linewidth}     \settowidth{\labellength}{#1}     \addtolength{\textfieldlength}{-\labellength-10pt}     \setlength{\testlength}{350pt}          \typeout{\the\labellength}     \typeout{\the\textfieldlength}     \textbf{#1} &      \TextField[name=#1,charsize=8pt,bordercolor={1 1 1}, height=12pt, width=360pt,value=#2]{#3}      }      When I use this new command in an external file:               \begin{Form}          \begin{tabular}{ll}     \textfieldintable{Employee Full Name}{Your Name}{}     \end{tabular}          \end{Form}      I get a form field that one can type in, in the second column (in addition to the label in the first column). However, if I change the code above to:               \TextField[name=#1,charsize=8pt,bordercolor={1 1 1}, height=12pt, width=\the\textfieldlength,value=#2]{#3}      the form field vanishes. The first column of the table still gets the #1 argument as it should. The same thing happens if I use `\textfieldlength`, `\the\labellength`, `\labellength`, or `\testlength` instead of `\the\textfieldlength`. What is going on? Why can't I use a variable as the value for width= key in \TextField?


title: TikZ 3.0.0 (release) produces strange shadings if used with XeLaTeX and standalone

text: I would like to use shadings in my TikZ graphics together with the `standalone` package and XeLaTeX, but for some reason it is broken if I try with the new 3.0.0 release (download here). Any other combination I tried works for me (use for example `article` class/`pdflatex`/`lualatex`/`TikZ` 2.10). (I'm using a fully updated TeX Live 2013.) ## MWE               \documentclass{standalone}     %\documentclass{article} % would work          \usepackage{tikz}     \usetikzlibrary{shadings}          \begin{document}     \tikz \draw[top color=red] (0,0) rectangle (2,1);     \end{document}      ## Output ![Output](http://i.stack.imgur.com/P99Gs.png) ## Expected Output ![expected output](http://i.stack.imgur.com/NpYzE.png) ## Question How can I avoid the problem and which package/class is causing it?


title: fancyheaders definition ornament

text: I would like to add some part of code related with ornaments in chapter name to my fancy header definision file.               % Datei fancyheaders.tex     \usepackage{fancyhdr}   % Paket laden     \pagestyle{fancy}   % bereitgestelltes Layout 'fancy' laden           \renewcommand{\chaptermark}[1]{\markboth{#1}{}}            \makeatletter       \def\@makechapterhead#1{%        \vspace*{50\p@}%        {\parindent \z@ \raggedright \normalfont        %\ifnum \c@secnumdepth >\m@ne         %    \huge\bfseries \@chapapp\space \thechapter         %    \par\nobreak         %    \vskip 20\p@         %\fi          \interlinepenalty\@M           \Huge \bfseries #1\par\nobreak          \vskip 40\p@             }}        \makeatother                              \usepackage[T1]{fontenc}     \usepackage{titlesec}     \usepackage{xcolor}     \usepackage{blindtext}          \newcommand{\chapnumfont}{%     % define font for chapter number     \usefont{T1}{pnc}{b}{n}%      % choose New Chancery, bold, normal shape     \fontsize{100}{100}%          % font size 100pt, baselineskip 100pt     \selectfont%                  % activate font     }     \colorlet{chapnumcol}{gray!100}  % color for chapter number          \titleformat{\chapter}[display]     {\filleft\bfseries}     {\filleft\chapnumfont\textcolor{chapnumcol}{\thechapter}}     {-24pt}     {\Huge}               \fancyhead{}     %\fancyhead[L]{\leftmark}     \fancyhead[L]{}     \fancyhead[R]{}%{\rightmark}     \fancyfoot{}     \fancyfoot[L]{}     \fancyfoot[C]{}%{\leftmark}     \fancyfoot[R]{\thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}                    % Style "plain" berschreiben, das bei      %\chapter{...} mit aktiviert wird     \fancypagestyle{plain}{     \lhead{}     \chead{}     \rhead{}     \lfoot{}     \cfoot{}     \rfoot{\thepage}     \renewcommand{\headrulewidth}{0.0pt}     \renewcommand{\footrulewidth}{0.4pt}}      And add this (when put in to chapter file it destroying fancy hdr setting). Woudl like to add this code to upper definition.               \titleformat{\chapter}[display]     {\normalfont\huge\bfseries\raggedleft}     {\begin{tikzpicture}     \node[text width=3cm,align=center] (chapnum)      {\fontsize{100}{130}\color{gray}\selectfont\thechapter};%     \node[shift={(-1cm,10pt)},anchor=north west](CNW)       at (chapnum.north west) {\pgfornament[width=1cm]{7}};     \node[shift={(1cm,10pt)},anchor=north east](CNE)       at (chapnum.north east) {\pgfornament[width=1cm,symmetry=v]{7}};     \end{tikzpicture}     }     {0pt}     {\Huge}      Thanks for your help.


title: Editing Format of List of Theorems in thmtools

text: I'm trying to change the formatting of the `\listoftheorems` command from the `thmtools` package. It currently prints "Theorem (Name of Theorem).... Page Number", and I would like it to print "Name of Theorem....Page Number". I have attempted to use the fixes here Only show \NAME in \listoftheorems and here Generating lists of custom environment. to no avail.               \documentclass{article}     \usepackage{amsthm}     \usepackage{thmtools}     \renewcommand{\listtheoremname}{List of Important Theorems}          \declaretheoremstyle[     spaceabove=6pt, spacebelow=6pt,     headfont=\normalfont\bfseries,     notefont=\bfseries, notebraces={(}{)},     bodyfont=\normalfont,     postheadspace=0.5 em,     qed={}     ]{theorem}          \declaretheorem[style=theorem]{theorem}     \begin{document}     \listoftheorems     \begin{theorem}[Test]     This is a test theorem.     \end{theorem}     \end{document}


title: How can I 'uniquify' RefTeX label defaults?

text: When you create a new section within AUCTeX (using `C-c C-s`) and give the section a name, RefTeX will prompt you for a title, insert the section, and then prompt you for a label. This label is auto-populated with a reasonable default:               \section{Mathematical Definitions}     \label{sec:math-defin}      This happens for all header commands:               \subsection{Graphs}     \label{sec:graphs}      When you only go one level deep in the hierarchy or have a shorter or more diverse paper, these defaults are perfectly fine. However, in writing the first draft for my undergrad thesis, I'm finding myself using the same subheadings again under different headings:               \section{Implementation}     \label{sec:implementation}          \subsection{Graphs}     \label{sec:graphs-1}      * * * How can I have the secondary headings' labels, `sec:graphs` and `sec:graphs-1`, as below?               \section{Mathematical Definitions}     \label{sec:math-defin}          \subsection{Graphs}     \label{sec:math-defin:graphs}          \section{Implementation}     \label{sec:implementation}          \subsection{Graphs}     \label{sec:implementation:graphs}      Ideally, I'd like this behavior to be consistent:               \section{Graphs}     \label{sec:graphs}     \label{fig:graphs:diagram}          \section{Math}     \label{sec:math}     \subsection{Contrived}     \label{sec:math:contrived}     \begin{example} % an environment AUCTeX doesn't know about       \label{ex:math:contrived:example}       ...     \end{example}