title: How to add marks to all graphs at certain y level

text: I'd like to add markers to my plots only at certain y levels. How to do this for certain x levels is obvious, I didn't manage to do it inversley though. What I have (equi-x): ![enter image description here](http://i.imgur.com/7ebCiyX.png) What I want is something like this (equi-y): ![enter image description here](http://i.stack.imgur.com/Esjx6.png) My code:                   \documentclass[10pt,a4paper,oneside]{scrreprt}                \usepackage{tikz}                                                                                \usepackage{pgfplots}                                                                            \pgfplotsset{compat=1.8}              \begin{document}                 \begin{tikzpicture}                  \begin{semilogyaxis}[                         cycle list name=exotic,                         xlabel=$E_S/N_0\;(dB)$,                         ylabel=$BER\;(\%)$,                         ytick={0.0001,0.01,1,100},                         xmin=0,                         xmax=40,                         ymin=1e-4,                         ymax=100,                         legend pos=outer north east,                         legend cell align=left,                         grid=major,                                                                      height=6cm,                         width=0.8\textwidth                         ]                                              %% READ DATA                         \pgfplotstableread[                             header=false,                             comment chars=!                             ]                         {ber.dat}\berdata                                   %% PLOT DATA                         % Workaround for line colors, doesn't work with \foreach                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=1]  {\berdata};                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=2]  {\berdata};                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=4]  {\berdata};                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=5]  {\berdata};                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=7]  {\berdata};                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=6]  {\berdata};                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=8]  {\berdata};                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=9]  {\berdata};                             \addplot +[smooth, mark repeat={10}, line width = 1.0pt] table[x index=0,   y index=10] {\berdata};                              %% LEGEND                             \legend{    BPSK,                                                 QPSK,                                                 16-QAM,                                                 16-QAM,                                                 32-QAM,                                                 64-QAM,                                              256-QAM,                                             1024-QAM,                                             4096-QAM}                           \end{semilogyaxis}             \end{tikzpicture}         \end{document}      ber.dat can be downloaded here, if you like: https://www.dropbox.com/s/8lqx7bjfokpx274/ber.dat Edit1: Managed to find a workaround: ![enter image description here](http://i.stack.imgur.com/SNBQY.png) By calculating the inverse function values with MATLAB and plotting them on top.                           %% READ DATA                 \pgfplotstableread[                     header=false,                     comment chars=!                     ]                 {plotdata/ber_markers.dat}\bermarkers                                 \pgfplotsset{cycle list shift=-9}                          \addplot +[smooth, only marks, line width = 1.0pt] table[x index=1, y index=0]  {\bermarkers};                                    %\addplot +[smooth, only marks, line width = 1.0pt] table[x index=0,   y index=3]  {\bermarkers};                     \addplot +[smooth, only marks, line width = 1.0pt] table[x index=2, y index=0]  {\bermarkers};                     \addplot +[smooth, only marks, line width = 1.0pt] table[x index=4, y index=0]  {\bermarkers};                     \addplot +[smooth, only marks, line width = 1.0pt] table[x index=5, y index=0]  {\bermarkers};                     \addplot +[smooth, only marks, line width = 1.0pt] table[x index=7, y index=0]  {\bermarkers};                     \addplot +[smooth, only marks, line width = 1.0pt] table[x index=6, y index=0]  {\bermarkers};                     \addplot +[smooth, only marks, line width = 1.0pt] table[x index=8, y index=0]  {\bermarkers};                     \addplot +[smooth, only marks, line width = 1.0pt] table[x index=9, y index=0]  {\bermarkers};                     \addplot +[smooth, only marks, line width = 1.0pt] table[x index=10,y index=0]  {\bermarkers};        Christian: Thanks for your work by the way, it is extremely useful.


title: include accents in bibtex file

text: How would I include the following name into a Bibtex document: J\ddot{a}rvinen This returns an error saying that you cannot use mathmode in this file. How would I alter this?


title: Multiple lists of to-do-notes

text: I use the `todonotes` package to keep track of stuff that has to be done by various persons. At the moment, I use prefixes and colors to track who is responsible for what. However, I'd rather like to have separate lists for all of the people involved. I haven't found an option of the `todonotes` package that I could use to achieve this - is it possible at all, with this or another package? EDIT: I just need to single out one "owner" of to-do items. It would be acceptable to have the items written to a separate file that could then be processed to produce a separate output document. Is there a solution for something like this? MWE:               \documentclass{article}     \usepackage[colorinlistoftodos]{todonotes}     \usepackage{lipsum}          \newcommand{\alicetodo}[1]{\todo[color=green!40]{Alice: #1}}     \newcommand{\bobtodo}[1]{\todo[color=blue!40]{Bob: #1}}          \begin{document}     \lipsum[1]     \alicetodo{Foo}     \lipsum[2]     \bobtodo{Bar}     \lipsum[3]     \alicetodo{Baz}     \lipsum[4]     \bobtodo{Boo}     \listoftodos     \end{document}


title: Cannot use a custom document class with LyX

text: I am trying to use the ACM SIG Proceedings document class for a LyX document. Basically following these instructions: Using custom LaTeX document classes in LyX Step by step, here is what I do:   1. put `acm_proc_article-sp.cls` in `/usr/local/texlive/2012/texmf/tex/latex`   2. run `sudo texhash`   3. (`cat /usr/local/texlive/2012/texmf/ls-R | grep acm_proc` shows `acm_proc_article-sp.cls`)   4. create `acmsig.layout` (contents below) and put it in `~/.lyx/layouts`   5. reconfigure LyX   6. restart LyX   7. try to select `article (ACM SIG Proceedings)` from the list of available document classes - it does not show up What am I doing wrong? The contents of `acmsig.layout`:               #% Do not delete the line below; configure depends on this     #  \DeclareLaTeXClass[acm_proc_article-sp]{article (ACM SIG Proceedings)}          # Input general definitions     Input stdclass.inc          MaxCounter      Counter_Section          Style Section         Align Center         Font             Shape SmallCaps         EndFont     End


title: How can I reduce padding after figure?

text: \documentclass{mwrep}          \usepackage[draft]{graphicx}     \usepackage{hyperref}     \usepackage[all]{hypcap}          \makeatletter     \g@addto@macro\@floatboxreset\centering     \makeatother     I use figures with captions.          \begin{document}          \listoffigures          \chapter{foo}          First paragraph (previous).          \begin{figure}[h]       \includegraphics{a.jpg}       \caption{Opis}     \end{figure}          Second paragraph (following).          \end{document}      How can I change vertical space (padding?) between caption and following paragraph? Also, I want to change (increase a little) space between previous paragraph and top of image.


title: Producing odt from tikzpicture?

text: How can I produce an odt file from a tex source which includes tikzpicture ? I tried `mk4ht oolatex test.tex` but I only be able to produce an empty odt file from the following code :               \documentclass{article}     \def\pgfsysdriver{pgfsys-tex4ht.def}     \usepackage{tikz}     \begin{document}       \begin{tikzpicture}         \path (0,0) node[draw] (A) {A};         \path (2,0) node[draw] (B) {B};         \draw (A) -- (B) node[midway,above = 0 em] {via};     \end{tikzpicture}     \end{document}      I am open to other way to get my odt file.


title: Bold citation number

text: Is there a straightforward way to produce bold citation numbers with the `\cite` command (I'm using amsplain bibliography style)? Essentially I want something like this: [ **1** ] rather than [1].


I usually do the following to remove 1 inch padding.               \documentclass{minimal}     \usepackage{pstricks}     \paperwidth=72.27pt     \paperheight=72.27pt     \voffset=-72.27pt     \hoffset=-72.27pt     \parindent=0sp     \special{papersize=\the\paperwidth,\the\paperheight}     \begin{document}     \begin{pspicture}(\paperwidth,\paperheight)     \psframe[linecolor=red](\paperwidth,\paperheight)     \end{pspicture}     \end{document}      How to remove 1 inch paddings without using \hoffset and \voffset?


title: lstlistings messes up spacing before subsequent section headings

text: I'm typesetting a grammar specification for a programming language, which leads to many short snippets of grammar and example code interleaved in the document text. The issue I observe is that an `lstlisting` has no proper spacing to the following paragraph, and messes up the spacing before all following section headings. See the following screenshot (notice how _0.1.1 Examples_ "sticks" to the paragraph): ![Original Layout](http://i.stack.imgur.com/UGO9m.png) Inserting a `description` list after the first listing (uncomment _(A)_ in the code) actually resolves the spacing issue of the section heading: ![Fixed Layout with Description List](http://i.stack.imgur.com/9h39A.png) Changing the first listing (change _(B)_ in the code) to `verbatim` resolves the issue entirely and inserts a much desired vertical space before the following paragraph: ![Fixed Layout with Verbatim](http://i.stack.imgur.com/HYAWK.png) To sum up,   * `verbatim` gives me the desired overall layout of the text, whereas   * `lstlistings` looks subpar layout-wise but breaks lines and highlights code nicely. Am I missing out on something about _lstlistings_? Are there any alternatives that are closer to what _verbatim_ does? * * * The following source code produces the above results:               \documentclass{report}     \usepackage{color,dejavu,listings,paralist}     \lstset{backgroundcolor=\color[gray]{0.90}, aboveskip=0pt, belowskip=0pt}          \begin{document}     \section{Definition}          % (A)     \begin{lstlisting}     definition : name ":" expr     \end{lstlisting}          % (B)     % \begin{description}     % \item[expr] can be any valid expression and is evaluated at compile time until a     %             function, a type, or a constant value is obtained. If this is not     %             possible, the compiler will stop with an error.     % \end{description}          A \emph{definition} is an expression with a label assigned to it. The label     allows other parts of the code to refer to the definition. Only definitions are     exported out of packages and can be referenced from other code.          \subsection{Examples}     \begin{lstlisting}     (a) A: func x -> x*x     (b) B: func x,y -> x*y     (c) C: type Int range 0 to 7     (d) D: 123     (e) E: A(2)     \end{lstlisting}          Where \begin{inparaenum}         \item is a function with one argument,         \item is a function with two arguments,         \item is a type representing integers from 0 to 7,         \item is the integer constant 123, and         \item is the integer constant 4     \end{inparaenum}.          \end{document}


title: Using split to break a long equation

text: I am trying to break a long equation over multiple lines. It is here as follows:               \begin{equation}     \begin{split}     L(\textbf{q})=&\prod_{t=0}^{36}{q_{1}^{iB(t)sB(t+1)+iC(t)sC(t+1)}\\     &\quad\cdot q_{2}^{i(t)sA(t+1)+(iA(t)+iC(t))sB(t+1)+(iA(t)+iB(t))sC(t+1)}\\     &\quad\cdot(1-q_{2}^{i(t)})^{sA(t)-sA(t+1)}\\     &\quad\cdot(1-q_{1}^{iB(t)}q_{2}^{iA(t)+iC(t)})^{sB(t)-sB(t+1)}\\     &\quad\cdot(1-q_{1}^{iC(t)}q_{2}^{iA(t)+iB(t)})^{sC(t)-sC(t+1)}}     \end{split}     \end{equation}      But when I try and pdflatex the file, I get `!Missing }` inserted. And it doesn't run. I don't know why it's trying to put in extra brackets when they are not needed. And the file runs without the split environment (but I need to put it in since otherwise the equation flows off the page) Any help??


title: Why can't I prevent page break?

text: I am newbie to Latex and I am just making some lists of some common commands and learning the syntax. This is what I have at the end of my first page.               using left and right bracketing commands\\     $$3\left(\frac{2}{5}\right)$$     $$3\left[\frac{2}{5}\right]$$     $$3\left\{\frac{2}{5}\right\}$$      This produces three lines. On the first line is my comment. On the second and third line are the examples with parentheses and square brackets. But then the third example is output to the second page. I have found the `\nopagebreak` and tried applying that. But I can't make it work.               using left and right bracketing commands\\     $$3\left(\frac{2}{5}\right)$$     $$3\left[\frac{2}{5}\right]$$     \nopagebreak $$3\left\{\frac{2}{5}\right\}$$      The last part still jumps to the second page. I'm not sure... should the `\nopagebreak` command sit on the same line in the code like that? I tried placing it at the end, in front, and at the beginning of this paragraph (in the code). I also tried setting the argument to 4 to insist on preventing page break. Like `\nopagebreak[4]`. But that didn't help. So how do I prevent page break at this point? There is page number indicator (index) that sits in the foot of the page. This sits very high up on the page. So there is actually some real estate here, where the last example could sit, if Latex could only make the foot note margin smaller on all or for the current page, just somehow move the number in the foot note down a little. So I'm curious why this is not working out for me. I can post a screenshot if that helps. **Edit 1:** Here's a screenshot. ![page break](http://i.stack.imgur.com/WSYMc.png) You can see how high up that number one is. There is more than enough space there to place both the fraction example and the page index. **Edit 2:** Here is the whole working example.               \documentclass[11pt]{article}          \begin{document}     bracketing symbols;          parenthesis;     $$(x+1)$$          square brackets;     $$3[2+(x+1)]$$          curly brackets;\\     these are reserved symbols for coding in Latex\\     they are therefore normally not displayed     $${a,b,c}$$     so to display curly brackets in math mode\\     there needs to be a back slash in front\\     of each bracket     $$\{a,b,c\}$$          dollar sign;\\     the same is true for dollar sign\\     dollar signs are reserved to indicate\\     math mode in Latex\\     so to display a dollar sign in math mode\\     there needs to be a back slash in front of it          $$\$12.55$$          adjusting bracketing symbols to the height\\     of tall objects like fractions;          typing in only the bracket signs\\     $$3(\frac{2}{5})$$     $$3[\frac{2}{5}]$$     $$3\{\frac{2}{5}\}$$%curly brackets require an additional back slash          using left and right bracketing commands\\     $$3\left(\frac{2}{5}\right)$$     $$3\left[\frac{2}{5}\right]$$     \nopagebreak $$3\left\{\frac{2}{5}\right\}$$          \end{document}      As you can see here I do have a document class and a begin and end command. In case you thought I forgot those.


title: Tikz: shading region bounded by several curves

text: I know that my effort below can be improved upon considerably. In particular, there must be a way of shading the region in a single scope, as opposed to subdividing as I have done (thus necessitating a hidden gray boundary). Neither am I fond of sample points, but this is where my research has led me. Your constructive criticism is appreciated.               \documentclass{article}     \usepackage{tikz}     \begin{document}          \begin{tikzpicture}     %graph     \draw[draw=gray!50!white,fill=gray!50!white]          plot[smooth,samples=100,domain=0:1] (\x,{0}) --          plot[smooth,samples=100,domain=1:0] (\x,{1});     \draw[fill=gray!50!white] plot[smooth,samples=100,domain=1:2.71828] (\x,{ln(\x)}) --          plot[smooth,samples=100,domain=2.71828:1] (\x,{1});     \draw[domain=0:4] plot (\x,{1});     \draw[samples=100,domain=.25:4] plot (\x,{ln(\x)}) node[above left]{$y=\ln x$};     %coordinate grid     \draw (-.5,0)--(4.5,0) node[right]{$x$};     \draw (0,-1.5)--(0,2.5) node[above]{$y$};     \foreach \x in {1,2,3,4}         \draw (\x,2pt)--(\x,-2pt) node[below] {$\x$};     \foreach \y/\ytext in {1,2}         \draw (2pt,\y)--(-2pt,\y) node[left] {$\y$};         %labels      \node at (.75,.5) {$\mathcal{D}$};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Z7ZDI.png)


How do you create spaces between Images? I have tried using the commands `//` after paragraphs that precede images but this only produces a space between the paragraph and the image. I have also used `//` between images but this caused the error: `! LaTeX Error: There's no line here to end.` Just give me some commands to copy and paste to separate images. I have minimal knowledge of programming I just want to be able to separate the images.


title: pgfplots: Points with no marks but errorbars?

text: How can I plot data points with pgfplots that have no marks, but error bars? If I try `marks=none` and enable errobars, I get big filled circles with errobars. If I change my mark to `mark=+`, for example, I have to adjust the mark size by hand, so that the errorbars are bigger than the mark. The reason is, if I have error bars, I automatically have the actual data point: the point where the error bars cross. So I don't need an explicit mark , but as described, just setting `mark=none` doesn't seem to be enough to achieve this. This plots filled circles with error bars as marks even `mark=none` is set:               \begin{tikzpicture}       \begin{axis}         \addplot[ only marks, mark=none,                   error bars/.cd, y dir=both, x dir=both, x explicit, y explicit]            table [x index=0, y index=2, x error index=1, y error index=3]            {mydata.txt};       \end{axis}     \end{tikzpicture}      Part of the content of `mydata.txt` to work with:               3.414   8E-3    3.62    5E-2     1.570   2E-2    1.65    1E-1     3.809   9E-3    3.96    3E-2     4.340   2E-2    4.34    3E-2      **How do I get error bars without an actual mark symbol, so that the point is "auto-marked" by the crossing of the error bars?**


title: Why does \centering have no effect in my code?

text: It seems that when I use the `\centering` command to center a TikZ picture within a Beamer frame, it only works if there is a blank line between the `\end{tikzpicture}` and `\end{frame}`. Can someone explain why this is the case? Here's an MWE:               \documentclass{beamer}      \usetheme{Madrid}     \usepackage{tikz}          \begin{document}          \begin{frame}{Title}          \centering          \begin{tikzpicture}       \node[draw]{A Ti\emph{k}Z node, centered};     \end{tikzpicture}          \bigskip          \begin{tikzpicture}       \node[draw]{Another Ti\emph{k}Z node, not centered};     \end{tikzpicture}     % Second TikZ node would be centered if there is an      % empty line between\end{tikzpicture} and \end{frame}     \end{frame}          \end{document}      I've tried surrounding the two TikZ pictures with `{}`, but it didn't seem to work. ![enter image description here](http://i.stack.imgur.com/CeCem.png)


title: radical of polynomial A rad A

text: Do we have something like `\rad` for the radical of a polynomial in LaTeX? I am writing in the equation mode within the `theorem` environment and everything is in italics. If I use `\text{rad}`, then I get rad in italics. If I use `\textrm{rad}` I get rad in Times New Roman font. I just want to display it in nonitalic format and in the same font as other parts of the theorem. How can I achieve this?


title: Configure kile and biblatex

text: How do people configure kile to work with biblatex? I have two bibliographies               \begin{refsection}     ...     \end{refsection}          \begin{refsection}     ...     \end{refsection}      and to get this to compile I need to run at least               pdflatex file          bibtex file1-blx          bibtex file2-blx          pdflatex file      Can this be made automatic in kile? (I am on ubuntu.) EDIT: Herbert gives a method using biber which works. However it is a pain to get the latest biber and biblatex in ubuntu as I mention in the comments. However, his method also suggests that a similar custom build option for kile could be made to work for biblatex+bibtex too which would enable you to keep the ubuntu version of texlive.


title: Italic small caps in urw-garamond?

text: I'm using the urw-garamond mathdesign package, which doesn't support italic small-caps. Is there a decent substitute I can use? I've tried the slantsc package with no luck.


title: DVI with explicit positioning of each character

text: I have a problem with a proprietary software (Matlab) that internally uses a LaTeX interpreter and then renders the resulting dvi-file. The problem is that the rendering part does not use the proper font metrics. The rendering contains the correct symbols, but they are not in the correct places because they have been positioned according to the wrong metrics. I can influence the part that produces the dvi, but not the rendering part. My idea is to circumvent this problem by having a dvi that explicitly positions every single character. I can achieve this approximately by using weird LaTeX code. E.g.               $E = m c^2$      leads to the wrong display, basically piling all the characters in the same position (font width metrics used by the renderer are far too small). Using instead               $\mbox{E} \mbox{=} \mbox{m} \mbox{c}^2$      leads to roughly the right display, presumably because the resulting dvi explicitly codes the width of each mbox, and thereby the width of each symbol. Another example:               $\hat D_s$      renders the D with hat correctly, but the subscript s is shown on top of the D instead of after it. I can fix this again using the same trick:               $\hat{\mbox{D}}_s$      Btw., the problem does not just apply to math mode, its just what I have been concretely working on. **My question:** Is there a way to make (La)TeX produce a dvi-file that explicitly positions each symbol in a way that I have approximated by inserting `\mbox`es? Or is there a way to post-process the dvi-file into another dvi-file that contains such explicit positioning information?


title: fancyhead not in small caps

text: The text in my fancyhead is written in small caps. I would like to have it not in small caps. How can I do? This is my fancyhead:               \usepackage{fancyhdr}     \lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}     \rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}     \chead{}\lfoot{}\rfoot{}\cfoot{}     \pagestyle{fancy}      something like that: ![enter image description here](http://i.stack.imgur.com/yuIvL.png)


title: Loading unicode hyphenation pattern

text: The documentation of `hyph-utf8` package states: > Since Babel’s hyphen.cfg is built in the XeLaTeX format, hyphenation > patterns can be used without even loading Babel or Polyglossia. However running `xelatex` on this minimal example:               \documentclass{article}     \usepackage{lipsum}     \makeatletter     \language=\l@latin     \makeatother     \hyphenrules{latin}     \begin{document}     \lipsum     \end{document}      produces the following error:               ./test.tex:6: Undefined control sequence.     <argument> ...{\languagename }\languageshorthands                                                        {none}\expandafter \ifx \c...     l.6 \hyphenrules{latin}          ?       What is the problem?


title: Journal of Fluid Mechanics Class Constraints

text: I am trying to format a paper to be consistent with the JFM style guidelines. I am using the JFM Latex class provided on the website. However, this class appears to be forcing a format that is not consistent with the JFM standards. For example,   1. Figure captions that are more than one line should be left-justified. I cannot figure out how to override the setting in the class that is currently center-justifying all figure captions, regardless of length.   2. Figures should appear at the top or bottom of a page, as soon as possible after they are referenced. The class setting is forcing all figures to be at the top of a page, and these figures currently appear BEFORE they are referenced in the text. However, I haven't been able to override this setting. I have tried the standard `\begin{figure}[b]` command. Any thoughts?


title: How to draw visual representation of relations with TikZ

text: My included graphics are too blurry so I decided to find out, how to draw the following four graphics in TikZ. I never really worked with TikZ, so can someone explain how to draw such graphics? ![Visualization of relations](http://i.stack.imgur.com/fY3GI.png)


title: How to remove page flipping effect in beamer?

text: I have a feeling that my `beamer` slides are set so that whenever I flip a page in osx's PREVIEW, there is a page flip effect. Right now I suspect it is either PREVIEW itself (the viewing software) or the actual slides. Is there a way to verify it, and if it is indeed something the `.tex` file, is there a way to remove that effect? The reason I suspect it might be the slides themselves (and not PREVIEW) is because this page flipping effect does not happen with other PDF files. EDIT: The following is a MWE that does the page flipping (for Mac OSx with TexLive 2012 using PREVIEW).               \documentclass[sansserif,mathserif]{beamer}     \usepackage{amsmath, amsfonts, epsfig, xspace}     \usepackage{pgf,tikz}     \usepackage{algorithm,algorithmic}     \usepackage[normal,tight,center]{subfigure}     \setlength{\subfigcapskip}{-.5em}     \usepackage{color}     \usepackage{multirow}     \usepackage{tabularx,colortbl}     \usepackage{qtree}     \usepackage{times}     \usepackage[export]{adjustbox}     \usepackage[absolute,overlay]{textpos}     \setbeamersize{text margin left=1ex}     \begin{document}     \maketitle     \begin{frame}{list}     \end{frame}     \end{document}


title: page numbers in bibliography not correctly printed if list contains {pp. 12-34} in bib file

text: I am having trouble with the print of my bibliography. I have a bib file which looks like this                   @Article{Sample:01,       Title                    = {Some Title},       Author                   = {Doe, John},       Year                     = {111},       Pages                    = {pp. 1-2},       Journal                  = {Really Cool Journal},       }              @Article{Sample:02,       Title                    = {Different Title},       Author                   = {Doe, Jane},       Year                     = {222},       Pages                    = {3-4},       Journal                  = {Other Cool Journal},       }      I use this with `biblatex` and `biber`. However my bibliography is printed correctly for the 2nd type but not for the first (i.e. _pages 3-4_ ), whereas in the second case it only says _pages_. I get this non-unified style of the page list, since I collect the citations from different internet sources, that sometimes have the first sometimes the second type. Is there anyway I could tell biber to ignore any _pp._ in the list **Pages** and always print out _pages a-b_? My workaround so far is to change the lists by hand and remove the _pp._ However, I feel there must be some way to do that automatically. So far I was unable to find one. Has anybody an idea about this? For the record: I am using MikTex 2,9 and compile using `pdflatex` invoked via the `latexmk` package. Here is a minimal working example that creates the error with the above bib file stored as mybib in the same folder.               \documentclass{scrartcl}          \usepackage[         backend=biber, natbib     ]{biblatex}          \bibliography{mybib}          \begin{document}         \citet{Sample:01}, \citet{Sample:02}              \printbibliography     \end{document}


title: Which primitives does ConTeXt rename/move?

text: TeX's primitives can be renamed by macro formats/packages: this allows new/altered features or behaviours. Usually this is done such that the originals are still available ('renamed'): certainly LaTeX2e does this (for example `\@@end`). Which primitives does ConTeXT rename/move, and where do they 'end up'? As there are two ConTeXt versions (MkII and MkIV), are there any differences between the two in this regard?


title: Shrinking the text in verbatim mode

text: I need to deal with loads of code lines in verbatim mode and append them to the appendix. That is, I may not need to show them in a fancy way but I want them to occupy least amount of space. As you could see in the following figure, the text occupy a lot of space. I also need them to have a fix indent from right and left, so by keeping as many in a line, they indentation varies. ![enter image description here](http://i.stack.imgur.com/U74Bj.png)


title: What is the advantage of using \includegraphics instead of \pgfimage for ordinary image inclusion?

text: The TikZ & PGF manual says that ‘LaTeX’s `\includegraphics` is designed better than pgf’s image mechanism’ and that ‘LaTeX users are encouraged to use `\includegraphics` to include images.’ But is there any advantage of using `\includegraphics` instead of `\pgfimage` when **not** using any of the features exclusive to `\includegraphics` (such as clipping)? The only differences I’ve found is that `latexmk` automatically recognises modified images when `\includegraphics` is used, but not when `\pgfimage` is used. On the other hand, `\pgfimage` supports the `interpolate` option, which is nice (though not widely supported in PDF readers). `\pgfimage` also supports masking, which `\includegraphics` does not. One last difference I’ve found is that `\pgfimage` only issues a warning, not an error, when a referenced image is not found. This may of course be both positive and negative; personally, I like it. Are there any other important differences and advantages of using `\includegraphics` over `\pgfimage`?


title: Adding "text-block" to \sbBloc

text: I'm all new to TiKz and the schemabloc package. What I'd like to know is two things; (1) how to add a "text-block" to a \sbBloc like in the image below (this is the image I'm trying to copy) and (2) how do I draw the T_d(s) signal in schemabloc? Thanks in advance! ![enter image description here](http://i.stack.imgur.com/gSsGM.png) My code is here:               \documentclass[11pt, twoside]{report}          % ------- Enable UTF8 characters ------- %     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}          % ------- Page layout ------- %     \usepackage{fullpage}     \headsep = 24pt % spacing between header and text     \usepackage{fancyhdr}     \fancyhf{}     \fancyhead[LE]{\slshape \rightmark} % section     \fancyhead[RE]{\thepage}     \fancyhead[RO]{\slshape \leftmark} % chapter     \fancyhead[LO]{\thepage}     \pagestyle{fancy}     \setlength{\headheight}{15pt}          \usepackage[toc,page]{appendix}          \usepackage{blindtext} % lorem ipsum replica     \usepackage{paralist}     \usepackage{framed}                         % ------- Math ------- %     \newcommand{\bm}[1]{\mbox{\boldmath $#1$}}  % bold math characters     \usepackage{icomma}                         % use , as decimal pointer     \usepackage{amstext}     \usepackage{fixltx2e,amsmath}     \MakeRobust{\eqref}               %-------  Coding ------- %     \usepackage{listings}     \lstset{         frame               = false,         language            = C++,         aboveskip           = 3mm,         belowskip           = 3mm,         showstringspaces    = false,         columns             = flexible,         basicstyle          = {\small\ttfamily},         numbers             = left,         numberstyle         = \tiny\color{gray},         keywordstyle        = \color{blue},         commentstyle        = \color{dkgreen},         stringstyle         = \color{mauve},         breaklines          = true,         breakatwhitespace   = true,         tabsize             = 3,         moredelim           = **[is][\color{mauve}]{@}{@},     }     \lstdefinelanguage{VHDL}{       morekeywords={         abs,access,after,alias,all,and,architecture,array,assert,attribute,         begin,block,body,buffer,bus,         case,component,configuration,constant,         disconnect,downto,         else,elsif,end,entity,exit,         file,for,function,generate,generic,generic,         if,impure,in,inertial,inout,is,         label,library,linkage,literal,loop,         map,mod,         nand,new,next,nor,not,null,         of,on,open,or,others,out,         package,port,postponed,procedure,process,pure,         range,record,register,reject,rem,report,return,rol,ror,         select,severity,shared,shared,sla,sll,sra,srl,subtype,         then,to,transport,type,         unaffected,units,until,use,         variable,         wait,when,while,with,         xnor,xor       },       morekeywords={rising_edge,falling_edge},       sensitive=false,       morecomment=[l]--     }     \lstdefinestyle{vhdl}{       language     = VHDL,       basicstyle   = \ttfamily,       keywordstyle = \color{blue}\bfseries,       commentstyle = \color{dkgreen}     }     \lstset{         emph={falling_edge,rising_edge,std_logic_vector,std_logic}, emphstyle=\color{mauve}     }               %\lstinline|•|     %\begin{lstlisting}     %\lstinputlisting{filename.c}                    % ------- Images ------- %     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \DeclareCaptionFont{gray}{\color{gray}\hypersetup{linkcolor=gray}}     \captionsetup{         textfont={footnotesize,sc,gray},         font={footnotesize,sc,gray},         %linkcolor={footnotesize,sc,gray},     }     \usepackage{booktabs}               % ------- Tikz ------- %     \usepackage{schemabloc}          \usetikzlibrary{circuits}     \usepackage{verbatim}               % ------- Colors ------- %     \usepackage{color}     \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}               % ------- Links -------- %     \usepackage{hyperref} % clickable references     \hypersetup{         colorlinks,         citecolor=black,         filecolor=black,         linkcolor=black,         urlcolor=black     }               % ------- Debug ------- %     \usepackage{todonotes}          \begin{document}     \begin{tikzpicture}      \sbEntree{E}         \sbComp*{a}{E}         \sbBloc{pacemaker}{$\frac{K}{\frac{1}{12}s+1}$}{a}             \sbRelier[]{E}{a}             \sbRelier[]{a}{pacemaker}         \sbSumh*{c}{pacemaker}             \sbRelier[]{pacemaker}{c}         \sbBloc{heart}{$\frac{1}{s}$}{c}             \sbRelier[]{c}{heart}         \sbSortie{S}{heart}             \sbRelier[]{heart}{S}         \sbDecaleNoeudy[4]{S}{U}             \sbBlocr{sensor}{$K_m=1$}{U}     \sbRelieryx{heart-S}{sensor}     \sbRelierxy[]{sensor}{a}     \end{tikzpicture}     \end{document}      Which produces the following output: ![enter image description here](http://i.stack.imgur.com/O068b.png)


title: Bounding box is larger than expected when drawing in 3D

text: This is a semi-duplicate of this question I think, but the answers provided there don't seem to work for me with 3D pictures. I'm inputting a tikz picture into a beamer poster, but I think that part of the process is irrelevant, although I can include it if it's not. My tikz picture looks like this: (spiral.tex)               \documentclass{standalone}     \usepackage{tikz}     \usepackage{tikz-3dplot}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{arrows}     \usetikzlibrary{3d}     \tikzset{>=latex}          \begin{document}          \tdplotsetmaincoords{60}{60}     \tdplotsetrotatedcoords{0}{20}{70}          \begin{tikzpicture}[tdplot_rotated_coords,scale=0.5, decoration={coil}]          \draw [decorate, decoration={aspect=0.3, segment length=3.1mm,      amplitude=3mm}, color = red] (0,0) --(2.6,0);     \draw [->, red] (2.6,0)--(2.6,-0.5);          \draw [decorate, decoration={aspect=-0.3, segment length=3.1mm, amplitude=-3mm}, color = blue] (-0.4,-3) -- (2.2,-3);     \draw [->, blue] (2.2, -3)--(2.3, -2.5);          \draw [->] (-0.25, -1.5)--(2.75, -1.5) node[right] {$\bf k$};          \draw[->, ultra thick, red] (4.5, 0.75)--(4.32, -0.5);     \draw[->, ultra thick, blue] (3.75, -3.75)--(3.91, -2.5);          \end{tikzpicture}     \end{document}      If you were to compile that you'd find a large area of whitespace extending off to the edge of the picture. This causes problems when I use               \begin{figure}     \centering     \begin{subfigure}[c]{0.3\textwidth}     \input{Figures/Tikz/spiral.tex}     \end{subfigure}     ~     \begin{subfigure}[c]{0.3\textwidth}     \input{Figures/Tikz/another3dtikzpicture.tex} %just an example of what I want to do with the tikz picture     \end{subfigure}     \end{figure}      in my beamer poster. I tried some of the suggestions in that other question that I linked to but they don't seem to work. I can insert `\useasboundingbox (-1, -4) rectangle (5, 1);` at the beginning of the picture but it doesn't do anything. I've checked that the box is in the right place by drawing it first. Also using the command `\draw [blue] (current bounding box.south west) rectangle (current bounding box.north east);` to find my current bounding box gives me an error: `! Dimension too large.` Are these problems particular to drawing in 3D or particular to my code? Is there anything I can do about it? Previously I've just compiled my tikz picture as an article and used `\includegraphics[clip, trim = l b r t]{spiral.pdf}` but that's not very satisfactory. Thanks.


title: Insert Graphic in Title Section of Beamer Poster

text: How can I insert a graphic on the right edge of the title section, without de- centering the title text? My code is below (apologies for posting the entire code; I couldn't figure out a MWE):               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Jacobs Landscape Poster     % LaTeX Template     % Version 1.0 (29/03/13)     %     % Created by:     % Computational Physics and Biophysics Group, Jacobs University     % https://teamwork.jacobs-university.de:8443/confluence/display/CoPandBiG/LaTeX+Poster     %      % Further modified by:     % Nathaniel Johnston (nathaniel@njohnston.ca)     %     % This template has been downloaded from:     % http://www.LaTeXTemplates.com     %     % License:     % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %----------------------------------------------------------------------------------------     %   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS     %----------------------------------------------------------------------------------------          \documentclass[final]{beamer}          \usepackage[scale=1.24]{beamerposter} % Use the beamerposter package for laying out the poster          \usetheme{confposter} % Use the confposter theme supplied with this template          \setbeamercolor{block title}{fg=ngreen,bg=white} % Colors of the block titles     \setbeamercolor{block body}{fg=black,bg=white} % Colors of the body of blocks     \setbeamercolor{block alerted title}{fg=white,bg=dblue!70} % Colors of the highlighted block titles     \setbeamercolor{block alerted body}{fg=black,bg=dblue!10} % Colors of the body of highlighted blocks     % Many more colors are available for use in beamerthemeconfposter.sty          \usepackage{caption}     \captionsetup{labelformat=empty,labelsep=none}          %-----------------------------------------------------------     % Define the column widths and overall poster size     % To set effective sepwid, onecolwid and twocolwid values, first choose how many columns you want and how much separation you want between columns     % In this template, the separation width chosen is 0.024 of the paper width and a 4-column layout     % onecolwid should therefore be (1-(# of columns+1)*sepwid)/# of columns e.g. (1-(4+1)*0.024)/4 = 0.22     % Set twocolwid to be (2*onecolwid)+sepwid = 0.464     % Set threecolwid to be (3*onecolwid)+2*sepwid = 0.708          \newlength{\sepwid}     \newlength{\onecolwid}     \newlength{\twocolwid}     \newlength{\threecolwid}     \setlength{\paperwidth}{48in} % A0 width: 46.8in     \setlength{\paperheight}{36in} % A0 height: 33.1in     \setlength{\sepwid}{0.024\paperwidth} % Separation width (white space) between columns     \setlength{\onecolwid}{0.22\paperwidth} % Width of one column     \setlength{\twocolwid}{0.464\paperwidth} % Width of two columns     \setlength{\threecolwid}{0.708\paperwidth} % Width of three columns     \setlength{\topmargin}{-0.5in} % Reduce the top margin size     %-----------------------------------------------------------          \usepackage{graphicx}  % Required for including images          \usepackage{booktabs} % Top and bottom rules for tables          \usepackage{array,tabularx}          \usepackage{multirow} %results table          %----------------------------------------------------------------------------------------     %   TITLE SECTION      %----------------------------------------------------------------------------------------          \title{Detecting Multi-word Expressions Through Typing Patterns} % Poster title          \author{Adam G} % Author(s)          \institute{Department of Linguistics} % Institution(s)          %----------------------------------------------------------------------------------------          \begin{document}          \addtobeamertemplate{block end}{}{\vspace*{2ex}} % White space under blocks     \addtobeamertemplate{block alerted end}{}{\vspace*{2ex}} % White space under highlighted (alert) blocks     \setbeamertemplate{caption}{\insertcaption} \setbeamertemplate{caption label separator}{} %no captions figure #          \setlength{\belowcaptionskip}{2ex} % White space under figures     \setlength\belowdisplayshortskip{2ex} % White space under equations          \begin{frame}[t] % The whole poster is enclosed in one beamer frame          \begin{columns}[t] % The whole poster consists of three major columns, the second of which is split into two columns twice - the [t] option aligns each column's content to the top          \begin{column}{\sepwid}\end{column} % Empty spacer column          \begin{column}{\onecolwid} % The first column               %----------------------------------------------------------------------------------------     %   THE PROBLEM     %----------------------------------------------------------------------------------------          \setbeamercolor{block alerted body}{fg=black,bg=white} % Change the alert block body colors     \begin{block}{The Problem}     \begin{figure}     \includegraphics[width=0.8\linewidth]{GooglePic.jpg}     \caption{Do they need a chiropractor or a stress ball?}     \end{figure}     \end{block}          %----------------------------------------------------------------------------------------     %   MULTI-WORD EXPRESSIONS     %----------------------------------------------------------------------------------------          \setbeamercolor{block alerted body}{fg=black,bg=white} % Change the alert block body colors     \begin{block}{Multi-Word Expressions}          The phrase \textit{pain in the neck} can have two different meanings, either the literal meaning, or     the figurative meaning.     \end{block}          %----------------------------------------------------------------------------------------          %----------------------------------------------------------------------------------------     %   MWE DEFINITION     %----------------------------------------------------------------------------------------           \setbeamercolor{block alerted body}{fg=black,bg=dblue!10} % Change the alert block body colors     \begin{alertblock}{What is a multi-word expression?}          A \textit{multi-word expression} (MWE) is a word collocation that exhibits markedly peculiar     linguistic behavior in terms of lexicalization, syntax or semantics. (Kunchukuttan 2007) \\     ~\\     In other words: \\     $\mathrm{def}(word_{1}) \;+ \;\mathrm{def}(word_{2}) \neq \mathrm{def}(word_{1}+word_{2})$               \end{alertblock}          %----------------------------------------------------------------------------------------          %----------------------------------------------------------------------------------------     %   MWEs IN SPEECH     %----------------------------------------------------------------------------------------          \begin{block}{MWEs in Speech}     MWEs are theorized to be stored and retrieved as a single lexical unit (Wray 2005). Often,     the pause length is longer surrounding an MWE, and shorter within an MWE. (Dahlmann \& Adolphs 2007)     \begin{figure}     She\underline{\hspace{2cm}}looked\underline{\hspace{.40cm}}up\underline{\hspace{2cm}}         the\underline{\hspace{2cm}}world\underline{\hspace{.40cm}}record\underline{\hspace{2cm}}     \end{figure}          \end{block}     %----------------------------------------------------------------------------------------          %----------------------------------------------------------------------------------------     %   QUESTION     %----------------------------------------------------------------------------------------          \setbeamercolor{block alerted title}{fg=white,bg=ngreen} % Change the alert block title colors      \setbeamercolor{block alerted body}{fg=black,bg=dgreen!10} % Change the alert block body colors     \begin{alertblock}{?? Question ??}          \centering{Can we apply speech prosody to keyboard typed text, to distinguish MWEs from other text?}          \end{alertblock}          %----------------------------------------------------------------------------------------               \end{column} % End of the first column          \begin{column}{\sepwid}\end{column} % Empty spacer column          \begin{column}{\twocolwid} % Begin a column which is two columns wide (column 2)               %----------------------------------------------------------------------------------------     %   KD TO THE RESCUE     %----------------------------------------------------------------------------------------          \setbeamercolor{block alerted title}{fg=yellow,bg=nblue!90} % Change the alert block title colors      \setbeamercolor{block alerted body}{fg=black,bg=red!50} % Change the alert block body colors     \begin{alertblock}{\textbf{Keystroke Dynamics to the Rescue!}}          \centering{\textbf{Keystroke dynamics (KD) measures the timing of every computer keystroke, from the time a key     is pressed to the time it is released.}}          \end{alertblock}           %----------------------------------------------------------------------------------------          %----------------------------------------------------------------------------------------     %   MWEs IN TYPED TEXT     %----------------------------------------------------------------------------------------          \begin{block}{Detecting MWEs in Typing}     \begin{center}     \begin{tabular}{r l}       \bf{Assumption 1}: & MWEs have unique prosodic characteristics \\       \bf{Assumption 2}: & Keystroke Dynamics is the reflection of prosody in typing \\       \bf{Conclusion}:   & MWEs should be uniquely characterized in typing \\     \end{tabular}     \end{center}     \end{block}          \begin{columns}[t,totalwidth=\twocolwid] % Split up the two columns wide column          \begin{column}{\onecolwid}\vspace{-.6in} % The first column within column 2 (column 2.1)          %----------------------------------------------------------------------------------------     %   MATERIALS     %----------------------------------------------------------------------------------------          \begin{block}{Materials}          \begin{itemize}     \item 1,013 college students     \item Recorded subjects clickstream (keystrokes)     \item Recorded clickstream timing (key up/down)     \item Subjects respond to a randomized question set     \item Subjects can skip to next question after typing 300 characters          \end{itemize}          \end{block}          %----------------------------------------------------------------------------------------          \end{column} % End of column 2.1          \begin{column}{\onecolwid}\vspace{-.6in} % The second column within column 2 (column 2.2)          %----------------------------------------------------------------------------------------     %   METHODOLGY     %----------------------------------------------------------------------------------------          \begin{block}{Methodoology}          From the keystroke timing data, we determined the length of pause before each word. Each word was then categorized into one of four positions, relative to an MWE: outside, starting, middle of, and ending an MWE.               \end{block}          %----------------------------------------------------------------------------------------          \end{column} % End of column 2.2          \end{columns} % End of the split of column 2 - any content after this will now take up 2 columns width          %----------------------------------------------------------------------------------------     %   DEMOGRAPHICS     %----------------------------------------------------------------------------------------     \centering{\bf{Subject Demographics}}     \begin{figure}     \includegraphics[width=0.8\linewidth]{demog.jpg}     \end{figure}     \centering{Typing Rate}     \begin{figure}     \includegraphics[]{typingrate.png}     \end{figure}                    %----------------------------------------------------------------------------------------          \end{column} % End of the second column          \begin{column}{\sepwid}\end{column} % Empty spacer column          \begin{column}{\onecolwid} % The third column          %----------------------------------------------------------------------------------------     %   RESULTS!     %----------------------------------------------------------------------------------------     \setbeamercolor{block alerted title}{fg=white,bg=nred} % Change the alert block title colors     \setbeamercolor{block alerted body}{fg=black,bg=white} % Change the alert block body colors     \begin{alertblock}{!! Results !!}     \centering{\textbf{\textsc{Mean Pauses Before Word Location}}}     %\fontsize{30}{32}\selectfont{     \begin{table}[h]     \begin{tabular}{@{}llllll@{}}     \toprule                                           &               & \textbf{Start} & \textbf{Middle} & \textbf{End}   & \textbf{Outside} \\ \midrule     \multirow{2}{*}{\textbf{\hspace{0.5cm}L1}}     & \textbf{Fast} & 429            & 220             & 31152          & 8839             \\ \cmidrule(l){2-6}                                            & \textbf{Slow} & 3787           & 491             & 137456         & 33773            \\ \midrule     \multicolumn{2}{l}{\textbf{L1 Mean}}             & \textbf{1594}  & \textbf{370}    & \textbf{62810} & \textbf{19375}   \\ \midrule     \multirow{2}{*}{\textbf{\hspace{0.3cm}L2}} & \textbf{Fast} & 799            & 250             & 74984          & 11866            \\ \cmidrule(l){2-6}                                            & \textbf{Slow} & 2709           & 187             & 123149         & 43385            \\ \midrule     \multicolumn{2}{l}{\textbf{L2 Mean}}         & \textbf{1718}  & \textbf{519}    & \textbf{87086} & \textbf{27547}   \\ \midrule     \multicolumn{2}{l}{\textbf{Overall}}             & \textbf{1616}  & \textbf{397}    & \textbf{67252} & \textbf{20888}   \\ \bottomrule     \end{tabular}     \end{table}     %}     All figures are normalized for predictability \\ (Ask me what that is!)          \begin{itemize}         \item Typists pause for significantly shorter lengths of time in the middle of MWEs         \item While slow typists were 4x slower than fast typists outside of an MWE, the two groups were much closer within MWEs         \item Slow L1 English speakers are slower than slow L2 English speakers     \end{itemize}               \end{alertblock}          %----------------------------------------------------------------------------------------     %   FUTURE STEPS     %----------------------------------------------------------------------------------------          \begin{block}{Future Steps}          \begin{itemize}     \item Build an MWE Detector, bottom-up     \item Does this improve information Retrieval?     \item Can we extend this to other languages?     \end{itemize}          \end{block}          %----------------------------------------------------------------------------------------     %   CONTACT INFORMATION     %----------------------------------------------------------------------------------------          \setbeamercolor{block alerted title}{fg=black,bg=norange} % Change the alert block title colors     \setbeamercolor{block alerted body}{fg=black,bg=white} % Change the alert block body colors          \begin{alertblock}{Contact Information}          \begin{itemize}     \item Web: \href{http://www.adamg.com}{htttp://www.adamg.com}     \item Email: \href{mailto:a.g@gmail.com}{a.g@gmail.com}     \end{itemize}          \end{alertblock}          %----------------------------------------------------------------------------------------          %----------------------------------------------------------------------------------------     %   ACKNOWLEDGEMENTS     %----------------------------------------------------------------------------------------          \setbeamercolor{block title}{fg=red,bg=white} % Change the block title color          \begin{block}{Acknowledgements}          \small{\rmfamily{Thank you to my advisor,           \end{block}                    \end{column} % End of the third column          \end{columns} % End of all the columns in the poster          \end{frame} % End of the enclosing frame          \end{document}


title: Grid system for slides

text: I was wondering if anyone ever tried to typeset slides with a grid layout, ie. something like (see below the tikz grid showing it). Expected functionalities:   * ability to write text or place image across several columns on the fly (ie. provide kind of start coordinate/ size of frame containing text or image + text aligned on a grid)   * compatibility with [c] option for frame (or similar)   * I don't care about the crappy blocks from beamer (less is better)   * would appreciate to get something in the vein of http://www.treesmapsandtheorems.com/barriers/ Starting point code (but no need to stick to it), where the grey block could be text and the yellow block an image:               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{calc}          \setbeamertemplate{headline}{}          \setbeamertemplate{navigation symbols}{}          \usebackgroundtemplate%     {%         \begin{tikzpicture}[overlay,remember picture]             \draw[step=.4cm,gray,thin] (current page.south east) grid (current page.north west);             \draw[thick] ($(current page.north west)+(.4cm,-.4cm)$) rectangle ($(current page.north west)+(6cm,-1.6cm)$); % frametitle            \draw[thick] ($(current page.south west)+(0cm,.4cm)$) rectangle (current page.south east); % footer             \draw[thick] ($(current page.south west)+(1cm,.8cm)$) rectangle ($(current page.north west)+(3.4cm,-2.4cm)$);             \draw[thick] ($(current page.south west)+(3.8cm,.8cm)$) rectangle ($(current page.north west)+(6.2cm,-2.4cm)$);             \draw[thick] ($(current page.south west)+(6.6cm,.8cm)$) rectangle ($(current page.north west)+(9cm,-2.4cm)$);             \draw[thick] ($(current page.south east)+(-3.4cm,.8cm)$) rectangle ($(current page.north east)+(-1cm,-2.4cm)$);         \end{tikzpicture}     }          \setbeamercolor{footline}{fg=white,bg=black}          \begin{document}          \begin{frame}     \begin{tikzpicture}[overlay,remember picture]         \fill[yellow] ($(current page.center)+(.2,1.6cm)$) rectangle ($(current page.east)+(-1cm,-1.6cm)$);         \fill[gray] ($(current page.center)+(-.2,2.4cm)$) rectangle ($(current page.west)+(1cm,-2.4cm)$);     \end{tikzpicture}     \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/SnNPL.png) **Note:** if a ConTeXt solution is much convenient to use (less code to type), please feel free to share.


title: Beamer overlay and counter

text: I have a counter that I want to use for the beamer `\onslide` command. Using               \newcounter{coun}     %....     %     \onslide<\coun ->{ ....}      doesn't work. What is the correct way to do this?


title: Def in renewenvironment

text: I redefine a custom environment of mine that uses "local variables":               \newenvironment{asdf}[3]{       \def\argi{#1}       \def\argii{#2}       \def\argiii{#3}       %....     }     { }      But when I do:               \renewenvironment{asdf}[3]{       \def\argi{#1}       \def\argii{#2}       \def\argiii{#3}       %....     }     { }      later on in the document, LaTeX claims               ! Illegal parameter number in definition of \test      And also, I have no idea where `\test` comes from.


title: Packages for writing Letter

text: I am looking for packages to write letters. The packages should be able to understand the German ~~`DIN1338{a,b}`~~ letter format. What are common packages which are still maintained? I meant `DIN 5008` Din 5008, Changes to DIN 676 [edit] See also my other post and my issues with Dinbrief However `dinbrief` is quite old, and I am unable to do line numbering or AFAIR tables. That is the reason why I ask for alternatives.


title: Repeating a block of text until it fills a page

text: Might I please have some help with writing a loop that repeats a block of text as many times as there is remaining space for it on the page? I would like to produce an notebook in TeX which is divided into a number of sections. Each section would start with some printed records (taken from an existing database) followed by some space to hand-write in new entries. The space for handwritten records is generated by something along the following lines:               \noindent Type of Widget: \dotfill \break     Observations: \dotfill \break     \null\dotfill      The problem I have is that of vertical alignment: I want each section to start at the top of a new page, followed by the printed records and then enough blocks for handwritten notes to fill up the remaining vertical space on that page. Something like this: * * * **Section: Special Widgets** _Type of Widget:_ ABC123 _Observations:_ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id orci nunc, sed sollicitudin lectus. _Type of Widget:_ CDE123 _Observations:_ Etiam lacus sem, pharetra vel eleifend ac, elementum at leo. Ut pulvinar, lorem sit amet feugiat hendrerit, sapien justo accumsan eros, eleifend consectetur nisl urna at nibh. _Type of Widget:_ ........... _Observations_ : ................................................................................................... ............................................................................................................................ _Type of Widget:_ ........... _Observations_ : ................................................................................................... ............................................................................................................................ * * * Since the length of the records can vary, I therefore need to run a loop which does something like the following (in eplain pseudo code):               \for         \noindent Type of Widget: \dotfill \break         Observations: \dotfill \break         \null\dotfill     \if **test to see if there is enough vspace to repeat block**     \repeat      Could anyone point me in the right direction as to how to write a test for "is there enough space left on the page to print this block of text?". I presume I would start by making a \vbox the size of the block and then see if it will fit onto the current page but I can't work out how to make that work. I hope this is clear enough. If not, please let me know. Thanks. -Jacob


title: Problems with part-labels using titlesec

text: I'm using `titlesec` to define the layout of my headings. It's working but I've run into a problem when I use the package to define the layout of `\part`'s.   When I try to reference to a `\part`, which is defined with `titlesec`, using `\nameref` I get the wrong title. Does anybody know a workaround for this or what I'm doing wrong? I've made this example to show what I'm talking about:               \documentclass{report}     \usepackage{titlesec}     \usepackage{hyperref}          % If you uncomment the following 5 lines the nameref in line 16 will refer to "Chapter title 2" instead of "Part title 2"     %\titleformat{\part}[display]     %   {\Huge\filcenter}     %   {\partname{} \thepart}     %   {0em}     %   {\hrule}          \begin{document}          \part{Part title 1}     \chapter{Chapter title 1}     Hello have a look at \autoref{part:part_2} \nameref{part:part_2}     \chapter{Chapter title 2}          \part{Part title 2}\newpage     \label{part:part_2}     \chapter{Chapter title 3}          \end{document}      Looking forward to hear your input.


title: Changing the location of auto-installed packages in MiKTeX

text: This is a software question, specific to MiKTeX: I have automatic downloading of packages enabled, so that if I try to use a style that's not in the existing directory trees, it is downloaded from CTAN and installed. The problem is that MiKTeX installs it under `%APPDATA%` (at `C:\Documents and Settings\<user>\Application Data\MiKTeX\2.9`), which bloats my roaming profile. Is there a way to change this destination? I already have another root for styles I install myself, but I can't get MiKTeX to use it for auto-installed packages. In the Roots list in MiKTeX Settings (`mo.exe`), the `%APPDATA%` folder has the tag "UserInstall". It won't let me edit or delete its path, or tag another root "UserInstall". Is there a way to do this, or am I stuck with rearranging the downloaded packages by hand afterwards?


title: Undefined control sequence<to be read again> with biblatex and Zotero

text: I am using Texmaker 4.0.4 and exported my `biblatex.bib` from Zotero. My file `test.tex`:               \documentclass{article}     \usepackage[backend=biber]{biblatex}     \bibliography{Biblatex.bib}     \begin{document}     \cite{campbell2007}     \cite{moffitt86}          \printbibliography      \end{document}      My `biblatex.bib`:               @article{moffitt86,         title = {The econometrics of piecewise-linear budget constraints: a survey and exposition of the maximum likelihood method},         shorttitle = {The econometrics of piecewise-linear budget constraints},         pages = {317–328},         journaltitle = {Journal of Business \& Economic Statistics},         author = {Moffitt, R.},         date = {1986},         file = {Google Scholar Linked Page:files/837/Moffitt - 1986 - The econometrics of piecewise-linear budget constr:}     }               @article{campbell2007,         title = {"Says who" How the source of price information and affect influence perceived price (un) fairness},         volume = {44},         issue = {2},         pages = {261-271},         journaltitle = {Journal of Marketing Research},         author = {Campbell, {M.C.}},         date = {2007},         file = {Google Scholar Linked Page:files/912/jmkr.44.2.html:text/html}     }      I am getting an error message with:               ! Undefined control sequence.     <to be read again> \edef \blx@tempa {317\x     {FFFD}\x {FFFD}\x {FFFD}328}     l.11 \end     {document}      Any idea about how can I solve this problem?


title: Vietnamese character and accent

text: I found this: Typesetting any language, Vietnamese for example But when I try to do the same, there are no accent. So I tried to investigate a bit and I found out this: When I copy-paste the Vietnamese text in the topic, the result is correct but when I retype the same text with my own keyboard (in Vietnamese mode), I do not have accents. So I suppose that the problem comes from the encoding but I can't find where the problem is. I also noticed that i have the good result only if i put this line before: \usepackage[T5]{fontenc} I use TexnicCenter on Windows. On my laptop, I use TexWorks. ex:               \documentclass[a4paper]{report}          \usepackage[utf8]{inputenc}     \usepackage[vietnam]{babel}     \usepackage[T5]{fontenc}          \begin{document}          \chapter{Lesson 1}          %The first text is typed with my keyboard in vietnamese mode     Hà Nội là thủ đô, đồng thời la thành phố đưng đâu Việt Nam về diện     tích tự nhiên va đứng thứ hai về diện tích đô thị sau thành phố Hồ Chí     Minh, nó cũng đứng thứ hai về dân số với 6.913.161 người          %The second text is just a copy-paste of the web and give a good result.     \noindent     Hà Nội là thủ đô, đồng thời là thành phố đứng đầu Việt Nam về diện     tích tự nhiên và đứng thứ hai về diện tích đô thị sau thành phố Hồ Chí     Minh, nó cũng đứng thứ hai về dân số với 6.913.161 người          \end{document}      Sorry for my english. I hope my question was understandable. Thanks, Mickael


title: Cite citation with BibTeX

text: I want to cite a refrence in a primary source that is already a citation from a secondary source. As far as I know, I have to refer to both the citing author and the original author of the quote. The quote is as follows: > "[...] a change made to the internal structure of software to make it easier > to understand and cheaper to modify without changing its observable > behavior." I read it in Kerievsky, _Refactoring to Patterns_ , 2005. It was originally written by Fowler in _Refactoring: Improving the Design of Existing Code_ , 1999. Citing in text, I would write something like this: > Refactoring is "..." [Fowler 1999 cited by Kerievsky 2005]. Here is a minimal working example, which just places both references in brackets:               \documentclass{memoir}         \usepackage{natbib}         \begin{document}          According to Martin Fowler, refactoring is ``a change made to the internal     structure of software to make it easier to understand and cheaper to modify     without changing its observable behavior''~\cite{Fow:1999,Ker:2005}.          \bibliographystyle{unsrt}     \bibliography{references}          \end{document}      Using BibTeX, this is not so straight forward anymore. I use numbers for citations and print the bibliography in the appendix. What would be a best practice solution for citing citations with BibTeX?


title: Draw extruded objects with pst-3dplot

text: I would like to draw a plane with a hole in its middle. So far, I've only gone around this problem by plotting a white ellipse in the middle of my plane. However, I would like the hole to be actually a transparent field, not white. Here's my mwe               \documentclass[11pt]{article}     \usepackage{pstricks-add}     \usepackage{auto-pst-pdf}     \usepackage{pst-3dplot}          \begin{document}     \begin{pspicture}(-5,-5)(5,5)          \pstThreeDSquare[fillcolor=red,fillstyle=solid](0,0,0)(0,2,0)(2,0,0)     \pstThreeDSquare[fillcolor=blue,fillstyle=solid](0,0,0.8)(0,2,0)(2,0,0)     \pstThreeDEllipse[fillcolor=white,fillstyle=solid](1,1,0.8)(0,0.5,0)(0.5,0,0)          \end{pspicture}          \end{document}      ![what I've got so far](http://i.stack.imgur.com/uRMlx.jpg) I would like the white ellipse to be actually transparent. Is this possible ?


title: How to plot quantum logical gates with tikz？

text: I have seen many examples of classical circuit with tikz but none of quantum logical gates. Here are some of the quantum logical gates ![ SWAP gate](http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Swap_gate.svg/320px- Swap_gate.svg.png) ![Hadamard gate](http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Hadamard_gate.svg/320px- Hadamard_gate.svg.png) ![controlled NOT gate](http://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/CNOT_gate.svg/320px- CNOT_gate.svg.png) ![controlled-U gate](http://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Controlled_gate.svg/320px- Controlled_gate.svg.png) ![Toffoli gate](http://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Toffoli_gate.svg/279px- Toffoli_gate.svg.png) ![Fredkin gate](http://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Fredkin_gate.svg/240px- Fredkin_gate.svg.png) A whole circuit maybe look like ![quantum logical circuit](http://i.stack.imgur.com/PeIhj.png)


title: fancyhdr package not working proprely

text: I'm trying to numerate pages depending on even and odd and add chapter name the left part of the header and section name to the right. here's the code,               \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[RE]{\leftmark}     \fancyhead[LO]{\rightmark}     \fancyfoot[RO,LE]{\thepage}      the output gives me only the chapter name in the left no matter if it is an odd or even page umber, and the numbering in the footer is always in the right.


How can we only plot grid in X direction? Could we change "grid=both" to "grid=..."?               \begin{tikzpicture}[scale=0.8]     \begin{axis}[       grid=both,       domain=0:2*pi,       samples=200,       no marks,       xticklabels={-2$\pi$,-1.5$\pi$,...$\pi$,2$\pi$},       xtick={-6.2832,-4.7124,...,6.2832},       x post scale=1.5,       ytick={-3,-2,-1,...,2,3},       ymax=3]      \addplot {(2*cos(\x r)- cos(2*\x r))} node[below, green] {$K_3$};      \addplot {(3*cos(\x r)- cos(3*\x r))} node[below, green] {$K_4$};     \end{axis}     \end{tikzpicture}


title: How to do a karnaugh map?

text: > **Possible Duplicate:**   >  How can I draw a Karnaugh map For an assignment, I have to include a Karnaugh map. The map looks like this: ![enter image description here](http://i.stack.imgur.com/nezgE.jpg) I'm pretty new to LaTeX, and really have no idea how to do this. I know how to make tables and all, but after hours of looking around, I can't come up with a relatively easy way to do the circles. The closest I've found is this: http://www.ctan.org/tex-archive/macros/latex/contrib/karnaugh, which at least have the same name, but the map looks very different from what mine is supposed to look like. I realize I should include an attempt of solving it, but I really have no idea.


title: How to install Utopia expert font on texlive?

text: I'am trying to get the utopia expert font working. I am using TeXLive 2012, installed by Mactex on OSX Lion 10.7.5. I've renamed the adobes files `UEB.PFB` and `UERG.PFB` in `putb8x.pfb` and `putr8x.pfb` Then, i've copied this files in `/usr/local/textlive/2012/textmf- dist/fonts/type1/adobe/utopia` , where i founded the 4 standard fonts. I've run then `updmap-sys` in my terminal, but with no result. Could you please tell me where to copy the files and what command i schould use ? As you see, i'm not very experimented whit the terminal and the file structure of TexLive. I hope you can anderstand my question,


title: How to create a figure with latex labels and handling transparency in gnuplot?

text: I am very fond of latex labels in my gnuplot figures, and the way I generate most of them is via the pslatex terminal. Here, I would like _to take advantage of transparency_ in a figure (superimposed histograms), _while keeping latex labels_. My problem is that this is not achievable using pslatex, as postscript does not handle transparency. Of course, I could use the svg terminal, generate the core of the figure with transparency, then generate only the axes using pslatex, then put everything together by hand in inkscape, and save in .pdf (but this is heavy, to say the least). Do you know if there is any straightforward way to do this inside gnuplot? Once again, _thank you_ for you time! PS: for the record, the pslatex procedure I follow has been exposed here: How to set what appears as a title in a document viewer menu bar?.


title: TikZ Adding Text

text: I'm a recent convert to TikZ from `xy-pic`, and am still trying to get a hang for it. I see that one can add labels to the end of arrows and the like using `\node`. Is there a way to add an arbitrary piece of text at a given position in the text, regardless of whether there is a shape there, a line there, or nothing at all? Thanks very much for your insight.


title: How to implement a constant declarating macro to behave differently in preamble and pspicture?

text: The example below is extremely trivial just to illustrate the problem in the simplest way. ![enter image description here](http://i.stack.imgur.com/VBlYI.gif)               \documentclass{beamer}          \usepackage[nomessages]{fp}     % constants declarator     \def\LoadConstants{}% to load PostScript constants defined in the preamble     \newcommand\const[3][6]{%         \edef\temporary{trunc(#3}%         \expandafter\FPeval\csname#2\expandafter\endcsname             \expandafter{\temporary:#1)}%             \edef\LoadConstants{\LoadConstants                 \noexpand\pstVerb{/#2 \csname#2\endcsname\space def}}%                             \ignorespaces}          \usepackage{pstricks,multido}     \SpecialCoor     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{pspicture}     \PreviewBorder=25pt\relax               \const{Side}{root(2,17)}% the square root of 17               \begin{document}     \begin{frame}        \begin{pspicture}(\Side,\Side)         \LoadConstants         \psframe(!Side dup)\pause         \multido{\i=0+30}{12}{%             \const{temp}{cos(\i*pi/180)}             \LoadConstants             \rput{\i}(!Side 2 div dup 2 copy temp mul add 3 1 roll \i\space sin mul add){\temp}\pause         }     \end{pspicture}     \end{frame}     \end{document}      ## Background:   1. I have to use `beamer` document class to take advantage of overlays to create a step-by-step animation.   2. I also have to use `preview` to get a tight output.   3. Using `beamer` and `standalone` document classes is not possible to substitute for the 2 requirements above.   4. I have to define constants in TeX world and PostScript world at the same time. The constants are most likely defined by algebraic expressions involving trigonometry and logarithm.   5. If possible constants should be defined in the preamble.   6. But `preview` discards PostScript constants defined in the preamble. That is why `\LoadConstants` must be invoked inside `pspicture` environment to deal with this issue.    7. `\LoadConstants` by design should be invoked just once.   8. However, sometimes I need additional constants to be defined inside `pspicture`. Invoking `\LoadConstants` for the additional constants will make redundancies because `\LoadConstants` made of concatenated strings of `\pstVerb`.    9. Mostly I use `standalone` document class so `\LoadConstants` can also be invoked in the preamble.  ## Objectives:   1. I want to have a single `\const` to be smart enough to detect whether it is invoked in the preamble or inside `pspicture`.   2. When `\const` is invoked in the preamble, it must prepare `\LoadConstants` by concatenating the corresponding `\pstVerb`.    3. But when `\const` is invoked inside `pspicture`, it just invoke `\pstVerb` at that location. **NOTE:** Be careful because `\pstVerb` has a trailing white space.   4. As a bonus, if you can, please inject `\LoadConstants` to `pspicture` environment such that I don't need to invoke `\LoadConstants` at first.   5. Any idea to improve the code is welcome!


title: Force cventry title in one line in a moderncv with moderntimeline

text: Would like to force the title of a cventry in one line               \tldatelabelcv{2013}{July 2013}{Some title that is too long}{University of aVeryLongName}{}{}{blabla}      i would like to force {Some title that is too long}{University of aVeryLongName} to be on the same line how can I do this? **my example**                 \tldatelabelcventryn[east][magenta]{2013}{July 2013}{CREST Wind Power Technology Summer School}{University of Loughborough}{}{}{blabla}      the command                \tldatelabelcventryn       from the moderntimeline package is very similar to               \tldatelabelcventry       modified following moderntimeline: alignment of text on start and end of bars


title: Drawing Feasible region of a LP with big numbers on constraints

text: I am trying to draw feasible area of the following LP:               \documentclass [11 pt, xcolor=pdftex,x11names,table]{beamer}      \usepackage{tikz}     \begin{document}     \begin{frame}         \setbeamercovered{invisible}         \frametitle{Linear Program}         \begin{columns}[c]         \column{0.33\textwidth}         \begin{tikzpicture}[xscale=0.01,yscale=0.01][domain=-0.5:5000]             \draw[->] [very thick] (-0.5,0) -- (5000,0) node[right] {$x_1$};             \draw[->] [very thick](0,-.5) -- (0,5000) node[above] {$x_2$};     % HERE COMES THE REST OF THE GRAPH     \end{tikzpicture}          \column{0.6\textwidth}         different piece of code         \end{columns}     \end{frame}     \end{document}      The problem I have is that when I try `\begin{tikzpicture}[domain=-0.5:3500]` It doesn't fit in a slide. Any suggestion to solve this problem? EDIT: I edited MWE and used `xscale` and `yscale` and I can draw axis but still I get the error `Dimention too large \end{frame}`. Should I simply ignore this? Any thought?


title: Substitute \mathbb fonts in Minion Pro with Blackboard Bold from Lucida Bright fonts

text: I would like to substitute Blackboard Bold fonts from Lucia Bright (that I have installed on my systems) in documents using Minion Pro. If I simply use Minion Pro style, I get the \mathbb fonts from CM set, I think Lucida Bright \mathbb fonts better match MinionPro. My current set up looks like this:               \usepackage[mathlf,textlf,minionint]{MinionPro}     \renewcommand{\sfdefault}{Myriad-LF}      I think (but not sure) that I need to add a line like               \DeclareMathAlphabet{\mathbb}{xxx}{lbmad}{m}{n}      But I am not sure what xxx should be. Any ideas what the correct way to do this is? I am using pdflatex to compile my latex files on Windows 7.


title: how to reduce the distance between the picture caption and the picture?

text: I found that the distance between the picture caption and the picture is a little large, as we can see in the picture![enter image description here](http://i.stack.imgur.com/2El7q.jpg) I use the code as follows, thus, how to reduce the distance between the caption and the picture?               \usepackage[latin1]{inputenc}     \usetikzlibrary{trees}     \usepackage{verbatim}     \usetikzlibrary{trees,decorations.pathmorphing}      \begin{figure}[ht!]     {\centering     \tikzset{level 1/.style={level distance=1.0cm, sibling distance=0.5cm}}     \tikzset{bag/.style={text width=20em, text centered,yshift=-0.2cm}}     \begin{tikzpicture}[grow=down, -stealth,  edge from parent/.style={draw,decorate,decoration={snake, post=lineto, post length=2mm}}]         {\node[bag]{$S_0{:}(\{a{\mapsto}1\},A{<}a{=}1{>}B,t_{i_1}{\geq}0,0)$}              child{edge from parent node{$$}; \node[bag]{$S_{n-1}{:}(...,stop_{good},t_{i_3}{\geq}3,0)$}         };         }     \end{tikzpicture}     }     \caption{LTS of A Pick Activity}     \end{figure}


title: How to make table creation in TeX easier?

text: In my work I need to describe several database tables (~20) - each table has six columns - field name, field type, key, null / not null setting, default value and description. Is there some way how to create in TeX some kind of template / macro so I don't need to create each table manually?


title: Multiple windows pop up when compiling PDFs (LyX)

text: To view my document in LyX (Windows), I click the view button and it compiles a PDF. But it does this by opening multiple (around but not always 5) instances/windows of the same PDF file in Acrobat reader and its really annoying. Does anyone who how to stop this? (Im using MikTex 2.9 if that useful)


title: ConTeXt: How to maximize width of column depending on fixed sizes of other columns?

text: In LaTex, I could do something like:               \newcolumntype{C}[1]     {>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}          \newcolumntype{L}[1]     {>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          \newcolumntype{R}[1]     {>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}          \begin{longtabu} to \linewidth       {R{3cm} | X[l] | L{2cm}}       ...     \end{longtabu}      and, as a result, the central column would take what's left of the page after right and left columns are forced to occupy fixed width. How to do the same in ConTeXt?


title: Special action for every new page

text: I need to define a macro or do some special action every time a new page is encountered. In some sense I want to "number" tikzpictures but have all the tikzpictures on the same page contain the same number. ( _It's more complex than this but it is just a simple example_ ) Basically all I want to do is define a macro at the start of every new page. I'll use that macro to in my tikzpictures to do some special things and they _may_ delete the macro depending on something(which is why I need to set it on each new page so it get's reset each page). The macro needs to be defined at the start of every new page before any tex in my document is executed. Basically I want to avoid having to add the macro in the document myself for each new page(which is hard to control and clutters up the thing). My case: I have several tikspictures scattered throughout my document but some are on the same page. I want the first one on the page to have special treatment(like put a caption on it). BUT I may add or remove text which _may_ change the ordering and I don't want to have to update the code. For example,               -New Page     Text     Img1 *     Img2      -New Page     Img3 *     Text     Img4     Img5     -New Page     Img6 *      Because Img 1 3 and 6 are the first on the page I want to do something to them. BUT I do not want to hard code this because it may easily change(when I add text it may push put some images on a new page, i.e.,               -New Page     Text     Img1 *     -New Page     Img2      Img3 *     Text     Img4     -New Page     Img5     Img6 *      and notice how * does not correspond to the first image on the page(like I want it). i.e., this is what will happen if you hard code the things I want to do. Also, Because tex first has to calculate image bbox to determine if it is on the current page or not I need code that will work _since my images will depend on if they are the first image on the page or not_. My "Special" action is only horizontally centering the image and so shouldn't effect layout. The issue stems from tikzpicture alignment and centering and I'm trying to streamline and automate the process. I need to apply the master and slave pattern in the way I have describe. The first image on the page should get the master style and the remaining should get the slave **BUT** not hard coded since it causes the problem I gave above. (Note how Jake's answer has hard coded master and slave. This causes major problems if you add text which pushes some images on a new page. (since the first image on the page should be master but by hard coded it you could get a slave as the first image)


title: How to remove extra white space from figures

text: How can I please remove extra white space from a figure because it's taking me so much space. Thank you,


title: pgf: 'externalize' with 'list and make' on windows

text: In the pgfmanual I found today under Section **50.4.4 Customizing the Externalization** that you can have multicore support during externalization using the **mode** `list and make`.               % step 1: generate main.makefile:     pdflatex main     % step 2: generate ALL graphics on 2 processors:     make -j 2 main.makefile     % step 3: include the graphics:     pdflatex main      I am using Windows 7 and MiKTeX. Since I never used `make` I downloaded it here: http://www.gnu.org/software/make/. Then I used this MWE (main.tex):               \documentclass{article}          \usepackage{tikz,pgfplots}     \usetikzlibrary{external}     % Important     \tikzexternalize[mode=list and make]          \begin{document}          \begin{tikzpicture}       \begin{axis}         \addplot coordinates {(0,0) (1,1) (4,4)};       \end{axis}     \end{tikzpicture}          \end{document}      So I used a batch file like the pgfmanual said:               % step 1: generate main.makefile:     pdflatex main     % step 2: generate ALL graphics on 2 processors:     make -j 2 main.makefile     % step 3: include the graphics:     pdflatex main      But it doesnt' work. I get a message during the `make -j 2 main.makefile` part:               make: Nothing to be done for 'main.makefile'      Then I used `make -f main.makefile` like it was suggested during the first `pdflatex main` and I get:               process_begin: CreateProcess(NULL, cat main.figlist, ...) failed.     process_begin: CreateProcess(NULL, cat main.figlist, ...) failed.      Here a screenshot for the make part: ![enter image description here](http://i.stack.imgur.com/DXaYL.png) This is how the make file looks like:               ALL_FIGURE_NAMES=$(shell cat main.figlist)     ALL_FIGURES=$(ALL_FIGURE_NAMES:%=%.pdf)          allimages: $(ALL_FIGURES)         @echo All images exist now. Use make -B to re-generate them.          FORCEREMAKE:          include $(ALL_FIGURE_NAMES:%=%.dep)          %.dep:         mkdir -p $(dir $@)         touch $@ # will be filled later.          main-figure0.pdf:          pdflatex -halt-on-error -interaction=batchmode -jobname "main-figure0" "\def\tikzexternalrealjob{main}\input{main}"          main-figure0.pdf: main-figure0.md5      `main-figure0.pdf` is not generated -- but `main-figure0.md5` is generated. **Update (Christian's Answer)** I tried your advice (`ALL_FIGURE_NAMES=main-figure0`) and replaced the code in the makefile but it still doesn't work. ![enter image description here](http://i.stack.imgur.com/C3bxk.png) > I voted to close the question. It seems that only I have the problem. Thanks > for the help!


title: How to define in one Chapter two parts

text: I was wondering where this is possible in LaTeX? > Chapter 2 > > Part 1 > > Section 2.1.1 > > Section 2.1.2 > > Subsection 2.1.2.1 > > Subsection 2.1.2.2 > > Part 2 > > Section 2.2.1 > > Section 2.2.2 > > Subsection 2.2.2.1 > > Subsection 2.2.2.2


title: Right to Left in LaTeX

text: Is there a way to typeset with both RTL and LTR languages in the same LaTeX document, without use XeTeX? All the solutions I have seen (`bidi`, `polyglossia`, etc) require XeTeX. Basically, I make using `\fbox` to layout some text. I want the first box to be on the right, then the second box to be to the left of it, etc. I want the boxes to be right aligned (though the text inside the boxes can be left or right aligned), and for the boxes to line wrap correctly (i.e., when it gets to the left of the page, start on the right side of the next line).


title: Underscore in filenames in \textit{} imported from a python script

text: I'm trying to import the name of a result file from a python script and displaying it in the report. In the LaTeX template I have a bunch of variables defined as `${variablename}`. The python script changes this into the actual variable values. I only have problem with one variable, the filename. The code works as long as the filename doesn't contain any underscores. I've tried loosing the `\texit{}` command, using `\StrSubstitute` (with `\\_`, `\bs` and `\textunderscore`) and math mode. The only thing that kinda worked was math mode, but I want it displayes as text. With math mode the file name was so long that it continued far off the page. With `\textit{}` and no underscores it splits the filename, just like I want it. I'm at loss.               \documentclass[a4paper,11pt,titlepage]{article}     \usepackage[utf8]{inputenc}          \usepackage{booktabs} % professional tables     \usepackage{gensymb} % \degree and \celsius, try '$ texdoc gensymb'     \usepackage{amsmath, amsfonts, amssymb} % mathematical symbols     \usepackage{float, longtable, graphicx}          % end of preamble, start of document          \begin{document}           -Code irrelevant to problem-          \section{Results}\label{sec:results}     The test results are taken from the file named \textit{${RESFILEname}}          -More irrelevant code-          \end{document}


title: Personal remark environment after an equation

text: I have the following remark environment:               \newenvironment{rem}[1][]{%     \vspace{8pt}\small%     \begin{list}{}{%           \setlength{\leftmargin}{\parindent}%           \setlength{\rightmargin}{\parindent}}%           \item[]%     }{%     \end{list}\vspace{8pt}}%      When used just after an equation, the separating vertical space shall be a bit to large. Is there a way to test if the previous line is an equation?


title: Vertical spacing in floats

text: I am using a float inside the text. As I found out, using `\intextsep` I could set space above and below the float and the texts. But when I am using `\setlength{\intextsep}{5mm}`, the space below the float is more than the one above it. Why they are not equal?               % Preview source code          %% LyX 2.0.0beta1 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{report}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \usepackage{graphicx}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% A simple dot to overcome graphicx limitations     \newcommand{\lyxdot}{.}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{setspace}     \setlength{\intextsep}{5mm}     \setlength{\belowcaptionskip}{0mm}          \setstretch{2}          \makeatother          \usepackage{babel}          \begin{document}     Text Text Text Text Text Text Text Text Text Text Text Text          \begin{figure}[h]     \begin{centering}     \includegraphics[scale=0.5]{\lyxdot \lyxdot /Pictures/fedora}     \par\end{centering}          \caption{}          \end{figure}     Text Text Text Text Text Text Text Text Text Text Text Text     \end{document}


title: Detecting if inside a tikzpicture node

text: I would like to detect if a macro is executed inside a tikzpicture or more specific inside a node of a picture. In my MWE I used `\ifpgfpicture` which does not do the job because it considers the node content as 'outside' the picture. I would like to see 'INSIDE' as node text. I am not looking for any additions to the `tikzpicture` environment like some `every picture` tricks to remember that we are inside the environment. Is there any already existing state macro/variable of `pgf`/`tikz` which can be questioned for this purpose?               \documentclass{article}     \usepackage{tikz}          \newcommand{\testinpic}{%       \ifpgfpicture INSIDE \else OUTSIDE\fi%     }          \begin{document}          \testinpic          \begin{tikzpicture}       \fill[blue!10!white] (-4,-1) rectangle (4,1);       \node {\testinpic};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/8M9kz.png)


title: Drawing chain with TikZ

text: I was answering a set of problems and found this picture. Since I am just starting to learn about TikZ, I have not been able to draw it. ![enter image description here](http://i.stack.imgur.com/3oCxR.png)


title: How can I position long tables at multicolumn

text: I am trying to print two long table which are can't be fit into one page side to side at multicolumns. The problem is whenever realize the table which is continuing along pages with _longtable_ and _multicol_ , they start not to be positioned side to side. Thanks.


title: How to manage a central bibtex file which plays nice with (TexMaker's) auto-complete?

text: I want to keep a single central bibtex file that is shared across all my machines. My approach has been to set up a local tex-tree in a dropbox folder, and just store the file there. So far this has worked great. From all my machines (after "installing" the tex-tree) I can now access this file, and within all my documents i can simply reference the bibtex-file as `\bibliography{references}`. However, I'm using TexMaker and one of its great features is auto- suggestion/auto-completion of entries in the bibtex file. In order for this to work TexMaker parses all bibtex files in the project folder. But since I don't keep any bibtex files in the project folders TexMaker is not able to reach it. To circumvent this problem, I've created a hard-link (I'm mostly on Windows btw) in the project folder of all my different machines, and link it to the central bibtex file in dropbox. This seemed to work on a single machine, but unfortunately, changes in the reference file are not synced between machines. E.g. if I add a reference to the bibtex file (either through the hard-link or to the dropbox file directly), it is not reflected in the hard link on the other machines. I know this is probably a problem with how Windows handles hard-links, but the hard-link approach is just a poor-mans synchronization-hack anyway. What I would like to know is:   1. What's the best practice for keeping a single central bibtex file?   2. How can this be achieved, while still allowing TexMaker to parse the file so that it can provide the auto-suggestion feature? I know that this problem can be solved using version control, but I would prefer to do without it for the bibtex-file.


title: xelatex error: LaTeX Font Warning: Font shape.

text: Thank you all in advance. I know not much about fonts. but once I compile my document I get:                   LaTeX Font Warning: Font shape `EU1/lmr/bx/sc' undefined     (Font)              using `EU1/lmr/bx/n' instead on input line 174.      I'm not sure how solve this issue, even though there are other similar posts here but the answers are all too advanced.


title: Picture indicating the fifth roots of unity

text: I would like to have the unit circle, centered at the origin, on the Cartesian plane drawn. The origin is to be marked with a dot and labeled "O" and five dots are to be drawn on the circle, one on the x-axis, and the others at `k(2\pi/5)` radians from the positive x-axis for each integer `1 \leq k < 5`, and they are to be labeled "`w_{k}`". Arrows are to be drawn from the origin to each `w_{k}`, too. One angle is to be drawn and labeled - the one from the positive x-axis to the ray through `w_{1}`. I have included some of the code. It starts with the following commands.               \tikzset{mydot/.style={fill,circle,inner sep=1.5pt}}      Is there a manual that explains each of these commands? I guess that this is instructing LaTeX how to make the dots indicating the coordinates each time "`\mydot`" is in the code.               \documentclass{amsart}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{newlfont}     \usepackage{mathtools}     \usepackage{tikz}          \tikzset{     mydot/.style={       fill,       circle,       inner sep=1.5pt       }     }          \begin{document}          \begin{tikzpicture}[>=latex]               % the coordinates of the vertices     \coordinate (O) at (0,0);     \coordinate (w_{1}) at (\cos(2\pi/5), \sin(2\pi/5));          % the axes     \draw[help lines,->] (-1.5,0) -- (1.5,0);     \draw[help lines,->] (0,-1.5) -- (0,1.5);          % labelling the vertices     \node[mydot,label={below:$O$}] at (O) {};     \node[mydot,label={right:$w_{1} = \bigl(\cos(2\pi/5), \sin(2\pi/5)\bigr)$}] at (w_{1}) {};               % the arcs for the angle     \begin{scope}[gray]     \draw[->]       (1,0) +(0:0.5cm) arc [radius=1cm,start angle=0,end angle=2\pi/5] node[midway,right] {$2\pi/5$};     \end{scope}          \end{tikzpicture}     \end{document}


title: LaTeX structure

text: I have question about LaTeX structure and how LaTeX works? Is it just a set of macros for TeX? What happens, when I call `latex somefile.tex`? Does `latex` just includes `somefile` into a file, which contain basic LaTeX macros and calls `tex`? I've looked at `latex.ltx`. There are some commands, which are neither defined nor basic TeX commands. Does LaTeX introduce new fundamental commands, which TeX haven't?


title: How to get the AMS mathbb font while using Palatino elsewhere

text: I'm a Latex user. I've been using Palatino for typesetting a piece mathematical text:               \usepackage{mathpazo}     \usepackage[scaled=.95]{helvet}     \usepackage{courier}      The results are good, however I don't like the blackboard-bold given by mathpazo. Is there some option to pass to mathpazo, or some nice hack that will give me back my beloved AMSmath `\mathbb` symbols?