title: Can you embed an image so it doesn't need to be stored as a separate file?

text: I'd like to know whether it is possible to embed an image file into LaTeX code, such that the picture will appear in a resulting PDF file without it having to be stored in a separate .eps file during processing. The reason is that I am generating LaTeX code on the fly (using PHP) and running pdflatex in a chroot environment, so I have to copy any required files before calling pdflatex. Since I am generating lots of different PDFs, they all use different image files. My options are thus:   * Hard-code which .eps files to copy, and change the PHP code to match the LaTeX code each time an image changes (bad, hard to maintain)   * Copy every single .eps file, whether it's used or not (bad, slow)   * Embed the image in the source LaTeX code (ideal) Everything I can find about `\includegraphics` seems to suggest images can only be read in from external files. Is there any way an .eps file can somehow be embedded within LaTeX code?


title: Is it possible to provide alternative text to use when copying text from the PDF?

text: I’m using XeLaTeX within MiKTeX and have the following problem. Let there be some acronym, e.g. `USA`. I would like to write it in real small caps using `\textsc{usa}` but these are, of course, lower-case when copied from the PDF and pasting it, e.g. into a plain text file. Is it possible to provide an alternative text that is the ‘actual’ text that is represented by these small caps and that is used when copying and pasting? I mean something like when I have:               In the \textsc{usa} of 1980s there was ...      I would like it to be copied when hitting `Ctrl`+`C` as `In the USA of 1980s there was ...`, not as `In the usa of 1980s there was ...` * * * _After an answer has been given:_ Now there is only a problem that I can’t use this in the definition of acronym with the glossaries package. Minimum working example:               \documentclass[11pt]{article}          \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{accsupp}     \usepackage{glossaries}     \makeglossaries          \def \acUSA {\BeginAccSupp{method=plain,ActualText=USA}\textsc{usa}\EndAccSupp{}}     \newacronym{USA}{\acUSA}{United States of America}          \begin{document}     In the \gls{USA} of 1980s\ldots     \end{document}      It says this and doesn’t get through:               ! Incomplete \iffalse; all text was ignored after line 10.     <inserted text>                      \fi       Thanks for further help.


title: Merging Bibliographies

text: I have several `.bib` files, which I'd like to merge together into one. Due to the considerable effort involved in doing it manually I am looking for tool support. The only tool I found so far is PyBib, which supposedly is capable of merging bib files. However, it appears to be not very polished and breaks easily. After fixing the missing `BIBPATH` environment variable, it still could not read my bib files properly and complained about syntax errors. In particular, entries that use `VARIABLE # { and some text }` break the parser. Are there any other tools available, or which way would you go to merge a bunch of `.bib` files. I am sure some manual checking is required, but I'd like not to do the whole process by hand.


title: About catcodes and Family in LaTeX3/expl3

text: This is not so much the display of an issue or problem I'm facing out of my wish to use as much LaTeX3/`expl3` as possible in my TeX-based work, as a request for advice on the _proper_ ways in that scenario. What's the right way (or the right ways) to change catcodes in LaTeX3/`expl3`? In particular, when using `l3keys` to set some token list and retrieve later on its content making the "space char" regain catcode 10 (the regular way it is outside the `expl3` block codes), what's the suggested way to proceed? Could somebody provide a more extended description of the way that `\tl_set_rescan:Nnn` is to be used? I'm thinking in particular of the `setup` argument. What follows is a possible context where this shows up: I'd like to be able to retain the spaces in the argument to the `\my_name:n` function without using `~`.               \RequirePackage{expl3}     \documentclass{memoir}          \ExplSyntaxOn          \tl_new:c { g_my_name_tl }          \cs_new:cpn { my_name :n } #1      {       \tl_gset:cn { g_my_name_tl } {#1} %{ \tl_to_str:n {#1} }      }          \my_name:n {the name}          \ExplSyntaxOff          \begin{document}     \g_my_name_tl     \end{document}


title: Add labels to y ticks in bar chart

text: I'm just starting to mess with pgfplots and just had a quick question in formatting bar charts. Specifically, I was trying to add labels to each of my y ticks and i couldn't figure it out.               \begin{tikzpicture}     \begin{axis}[        title={How Well Do You Relate to Your Online Persona?        every axis plot post/.style={/pgf/number format/fixed},        ybar=5pt,        bar width=80pt,        x=3cm,        ymin=0,        axis on top,        ymax=6,        xtick=data,        enlarge x limits=0.2,        symbolic x coords={Person1,Person2},     ]     \addplot coordinates {(Person1,5) (Person2,2)};     \end{axis}     \end{tikzpicture}


title: Is gather* equivalent to displaymath?

text: Is `gather*` with one line of math equivalent to `displaymath`?


title: Microtype and quote environment leads to different indent of first line

text: When the `microtype` package is loaded a `quote` environment which starts with punctuation marks is inconsistent "indented". The first line in the following minimal example is unaffected, i.e. at the same place as without the package, but the next two lines are pushed to the left. I realize that it is a _feature_ of the `microtype` package to push punctuation marks into the margin, but here it looks quite ugly because it isn't consistent. The first line is most likely different because of the included `\item` in `\begin{quote}`. Is there a way to get the indention consistent? Can I temporarly disable this feature of `microtype` just for this environment? I'm having such code in some package manuals where some verbatim code lines which start with "punctuation" like `{` inside a `quote` environment.               \documentclass{article}     \usepackage{microtype}     \begin{document}     text text text text text text text text text text text text text text text text     \begin{quote}         ()\\         ()\\         ()     \end{quote}     text text text text text text text text text text text text text text text text     \end{document}      ![Result](http://i.stack.imgur.com/4BHOt.png)


title: Prerequisites for using LaTeX efficiently

text: I am a student (still in high school) who wants to start using LaTeX more regularly, however, I have on major problem: I know nothing about computer science or computer programming. And I mean nothing. I don't know what a source code is, I don't know what an algorithm is, and just when lurking on this site I see hundreds of words I don't understand, for example 'typeset'. I hope this gives you an idea of my ignorance of this subject. My question is: What are the prerequisites for using LaTeX efficiently? What programming language is best to learn? What subjects should one read about? I know there are a lot of books and sites such as _Wikibooks - Latex_ , but I doubt one can gain a decent command 'naturally' of LaTeX. With naturally I mean that you actually know what you're doing, instead of just copy-pasting it from site.


title: Why does the subtitled Ck, keep overwriting on the line number of the algorithm?

text: ![enter image description here](http://i.stack.imgur.com/xgRaZ.png)               \documentclass[dvipsnames,svgnames]{beamer}     \usepackage{algpseudocode}     \usepackage{eulervm}     \usepackage[most]{tcolorbox}          \setbeamercovered{transparent=40}          \usefonttheme[onlymath]{serif}     \usefonttheme{professionalfonts}          \newcommand\myRed[1]{%       \makebox[0pt][l]{\hspace*{-\algorithmicindent}\textcolor{red}{#1}}}          \tcbset{     common/.style={       arc=0pt,       outer arc=0pt,       boxsep=0pt,       left=1pt,       right=1pt,       top=1pt,       bottom=1pt       },     blue/.style={       common,       colback=LightBlue!90,       colframe=LightBlue!90,       highlight math style={colback=LightBlue!50,colframe=Navy,boxsep=0pt}       },     green/.style={       common,       colback=Green!50,       colframe=Green!50,       highlight math style={colback=Green!50,colframe=Green}       }     }          \begin{document}          \begin{frame}<1>     \begin{algorithmic}[1]     \uncover<2>{\If{$quality\ge 9$}}     \uncover<2>{\State $a\gets perfect$}     \uncover<2>{\ElsIf{$quality\ge 7$}}     \uncover<2>{\State $a\gets good$}     \ElsIf{\tcbhighmath{k\ge 5}}{\State  $a\gets medium$ \myRed{$c_k$}}     \ElsIf{$quality\ge 3$}{\State\myRed{$c_k$} \tcbhighmath{$a\gets bad$} }     \Else     \State $a\gets unusable$     \EndIf     \end{algorithmic}          \end{frame}          \end{document}


title: Why is LaTeX separated into many thousands of packages?

text: This question might belong elsewhere but I figured if I posted it here I might come across someone that deals behind the scenes of LaTeX. I'm an assistant Linux Admin at my school and we install LaTeX for our professors that obviously need it. Why is it, though, that doing a "yum install" of LaTeX results in installation of nearly 2500 different packages? I realize we _may_ be installing more than the "average joe" might, but doesn't this seem like over-modularization of an application?


title: How to print low resolution (96dpi) raster images correctly?

text: Possible duplicate of this. But this is a detailed and specific sub problem of that topic. I know I should use vector images whenever possible, or 300dpi images. Since I am dealing with computer vision images the images I need to display are mostly 96dpi. In the last (and first!) document I prepared, the images were looking good on pdf. And I made the mistake to take the prints at the last moment before handing, they looked awful printed. I did not have time to correct that and had to give the document like that. I do not want same thing to happen. What can I do to display/print low resolution (96dpi) images correctly? The size of the printed image does not matter for me, the only important thing is they are printed correctly. ## UPDATE I used Adobe Reader to print at a photocopy shop, and Foxit Reader at home. I did not use page scaling while printing. I am providing the scans for the photocopy shop. The prints I took at home is even worse. I took photograph of it (no scanner at home) I will send when I get back. Note that I converted 96dpi images to 300dpi, without rescaling so no information is lost on the original 256x256 image, their size is around 2.17cmx2.17cm. Here is the pdf (last page contains the images). Here is the scanned image. Here are (almost) all the files. Here is the part that is typesetting images:               \begin{center}     \newcolumntype{V}{>{\centering\arraybackslash} m{.2\linewidth} }     \begin{tabular}{c|V|V|V|}     \backslashbox{k}{s}          &    4          &        8     &   16 \\     \hline     32   & \includegraphics{lena_s_4_k_32.5.png}     & \includegraphics{lena_s_8_k_32.4.png}  & \includegraphics{lena_s_16_k_32.4.png} \\     64   &  \includegraphics{lena_s_4_k_64.1.png}     & \includegraphics{lena_s_8_k_64.4.png} & \includegraphics{lena_s_16_k_64.4.png} \\     128 &  \includegraphics{lena_s_4_k_128.5.png}  & \includegraphics{lena_s_8_k_128.3.png}  & \includegraphics{lena_s_16_k_128.3.png} \\     \hline     \end{tabular}     \end{center}


title: Nice custom beamer theme: how to do something like it?

text: So I found this totally awesome looking presentation that's made in LaTeX: pyprop.googlecode.com/files/disputas.pdf I love how there is custom header with university logo. I'd like to do something like that (different university obviously XD), and I would like to find out how to do sth like that. From what I've read on beamer manual, I only find a way how to put custom background image, but this seems to be modified theme. And I don't want to send e-mail to the person who did this presentation (it would be totally embarrassing), but I would like to find out how to do sth like that. Any suggestions, sites with code that does sth like this? Any help is appreciated ^^


title: Is it possible to call an external application prior to latex.exe to prepare a new file to be imported from within the (La)TeX input file?

text: I need to execute an external application prior to executing latex.exe to prepare a new file to be imported from within the (La)TeX input file. From another topic, I got an rough info that we can use \write18 command. But I don't have an idea to execute it. Here is my file structure:               MyProjectDir     ---Main.tex     ---SourcesDir     -----ExternalApp.exe      EDIT 1: In TeXnicCenter (latex editor for windows), there is no PreProcessor. Only PostProcessor is available. Therefore, I cannot execute it in one go. Executing it manually will be a tedious job.


title: Where is \textunderscore defined ?

text: I just started TeX recently and I'm reworking a legacy TeX-piece (book , second edition). I create lots of TeX-tables (with SAS) and do \input them. The tables contain many \textunderscore s. All show up in my pdf as upshifted points and not as underscores. Adding a package{hyperref} induces many errors that are absent without that package. Who knows what could be the reason and what to do ? Werner.


title: Nodes being covered when using "right of" for placing nodes in TikZ

text: I am using Beamer and TikZ for creating some slides, and I am having some problems with positioning nodes. I incrementally display some nodes, and position them using `[right of=previousnode]`. On the 3rd slide everything still looks fine: ![enter image description here](http://i.stack.imgur.com/gViLt.png) But when I add the next node to the right of the last one, the node is not positioned in the right place: ![enter image description here](http://i.stack.imgur.com/optce.png) As you can see it ends up covering some of the previous nodes. Here you have a minimal reproducible example: **EDIT: I have just realized that the part related to displaying/hiding the nodes depending on the slide number, is not related with the covering issue. I added at the end of the question a simplified example where the problem still persists. I am keeping the original example, but you may prefer to directly look at that simplified one.**               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{shapes, arrows}          \begin{document}          % Keys to support piece-wise uncovering of elements in TikZ pictures:     % \node[visible on=<2->](foo){Foo}     %     % Internally works by setting opacity=0 when invisible, which has the      % adavantage (compared to \node<2->(foo){Foo} that the node is always there, hence     % always consumes space that (foo) is always available.     %     % The actual command that implements the invisibility can be overriden     % by altering the style invisible. For instance \tikzsset{invisible/.style={opacity=0.2}}     % would dim the ``invisible'' parts. Alternatively, the color might be set to white, if the     % output driver does not support transparencies (e.g., PS)      %     % Reference: http://tex.stackexchange.com/a/55849/16933     %     \tikzset{         invisible/.style={opacity=0},         visible on/.style={alt=#1{}{invisible}},         alt/.code args={<#1>#2#3}{%             \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path         },     }          \tikzstyle{ps.block} = [draw, rectangle, minimum size=1cm, fill=olive!60]     \tikzstyle{ps.pin} = [pin distance=2mm, pin edge={->}]     \tikzstyle{best.ps.block} = [draw, rectangle, minimum width=5cm, minimum height=1cm, fill=olive!60]          \begin{frame}[fragile]{Test Frame}         \begin{block}{Test block}             \begin{itemize}                 \item xxx                 \item yyy             \end{itemize}         \end{block}         \begin{tikzpicture}             \node [ps.block, pin={[style=ps.pin]above:$IPC_{1}$}] (ps1) {$ps_{1}$};             \node [ps.block, pin={[style=ps.pin]above:$IPC_{2}$}, right of=ps1, visible on=<2->] (ps2) {$ps_{2}$};             \node [ps.block, right of=ps2, visible on=<3->] (psdots) {$\ldots$};             \node [ps.block, pin={[style=ps.pin]above:$IPC_{n}$}, right of=psdots, visible on=<3->] (psn) {$ps_{n}$};             \node [best.ps.block, right of=psn, visible on=<4->] (psbest) {$ps_{best}$};         \end{tikzpicture}     \end{frame}          \end{document}      Does anyone know how to properly fix this problem? **Simplified version:**               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{shapes, arrows}          \begin{document}          \tikzstyle{ps.block} = [draw, rectangle, minimum size=1cm, fill=olive!60]     \tikzstyle{ps.pin} = [pin distance=2mm, pin edge={->}]     \tikzstyle{best.ps.block} = [draw, rectangle, minimum width=3cm, minimum height=1cm, fill=olive!60]          \begin{frame}[fragile]{Test Frame}         \begin{block}{Test block}             \begin{itemize}                 \item xxx                 \item yyy             \end{itemize}         \end{block}         \begin{tikzpicture}             \node [ps.block, pin={[style=ps.pin]above:$IPC_{1}$}] (ps1) {$ps_{1}$};             \node [ps.block, pin={[style=ps.pin]above:$IPC_{2}$}, right of=ps1] (ps2) {$ps_{2}$};             \node [ps.block, right of=ps2] (psdots) {$\ldots$};             \node [ps.block, pin={[style=ps.pin]above:$IPC_{n}$}, right of=psdots] (psn) {$ps_{n}$};             \node [best.ps.block, right of=psn] (psbest) {$ps_{best}$};         \end{tikzpicture}     \end{frame}          \end{document}


title: Why does setting the paper size with KOMA-Script require TikZ?

text: Maybe I am just too tired, but I simply can't explain what is going on. The file               \documentclass[a5paper]{scrbook}          \usepackage{lipsum}          \begin{document}     \lipsum     \end{document}      produces A4 sized pdf pages (when run with pdflatex) with text only in the upper left corner, while               \documentclass[a5paper]{scrbook}          \usepackage{tikz}     \usepackage{lipsum}          \begin{document}     \lipsum     \end{document}      produces the proper A5 pages. Why is that?


title: Argument of \begin has an extra }

text: I've been emailed a 'sample' document that I'm supposed to cut/copy/paste to my needs. However, it seems like it's full of problems. The first thing that keeps coming up is:               ./testit.tex:9: Argument of \begin has an extra }.      The document:               \documentclass{aastex}     \usepackage{lscape}     \usepackage{longtable}          \begin{document}          \clearpage     \longtable     \begin{landscape}     \begin{deluxetable}{ccccccccccccccc}     \tabletypesize{\scriptsize}     \tablecolumns{10}     \tablewidth{0pt}     \tablecaption{\bf NGC 2264 members monitored with {\em CoRoT} and {\em       Spitzer}}     \tablehead{     \colhead{Object} & \colhead{2MASS id} & \colhead{CoRoT id} & \colhead{J} & \colhead{H} &     \colhead{K} & \colhead{[3.6]} & \colhead{[4.5]} & \colhead{[5.8]} & \colhead{[8.0]} &     \colhead{[24]} & \colhead{Class} & \colhead{SpT} &     \colhead{H$\alpha$} & \colhead{Comp?}}     \startdata     CSI Mon-000007 & J06415304+0958028 & 223994721 & 12.22$\pm$0.02 & 11.53$\pm$0.03 & 11.18$\pm$0.02 & 10.12$\pm$0.00 & 9.74$\pm$0.00 & 9.32$\pm$0.00 & 8.75$\pm$0.00 & 6.20$\pm$0.03 & II & K7 & - & Y \\     CSI Mon-000011 & J06411725+0954323 & 223985009 & 12.83$\pm$0.02 & 12.05$\pm$0.03 & 11.55$\pm$0.02 & 10.49$\pm$0.00 & 10.07$\pm$0.00 & 9.69$\pm$0.00 & 8.82$\pm$0.00 & 5.60$\pm$0.01 & II & K7 & 58.30 & N \\     CSI Mon-006491 & J06392550+0931394 & 616920065 & 13.77$\pm$0.03 & 12.86$\pm$0.03 & 12.38$\pm$0.02 & 11.73$\pm$0.00 & 11.44$\pm$0.00 & 11.15$\pm$0.01 & 10.52$\pm$0.01 & 7.86$\pm$0.03 & II & - & - & N      \enddata     \tablecomments{We have assembled a list of NGC~2264 region members,       candidates, and field stars, called the CSI~Mon catalog. Here we       show only the Mon identification numbers of objects discussed in       this paper. The {\em CoRoT} ids are from the SRa05 run. H$\alpha$ refers to the equivalent      width of the H$\alpha$ emission line, and we adopt the values of \citet{2002AJ....123.1528R} and \citet{2005AJ....129..829D}.        Spectral types are from \citet{1956ApJS....2..365W}, \citet{2004AJ....127.2228M},        and \citet{2005AJ....129..829D}, Objects with the disk class II/III       are have a class III SED based on the slope, but have significant       evidence of a weak disk based on their [3.6]-[8.0] colors. The ``comp''       column denotes whether the object appears to have a companion within       1\arcsec (``Y'' if yes). Detection is based on visual binarity or elongation of the       PSF reported by \citet{2009AJ....138.1116S}, or spectroscopic indications of       binarity via variable radial velocity measured by \citet{2006ApJ...648.1090F}.       Objects with no known companion (``N'') may still be       undetected binaries. *Objects with IRAC staring data are marked with       asterisks.}     \end{deluxetable}      Why is it saying this? I don't see anything obvious (to me, at least).


title: What is the right way to set a dimension parameter?

text: In the TeXbook Knuth set parameters for dimensions mostly as follows:                \parskip=3pt      Other package authors define such parameters without using the equal sign                \parskip30pt      Many later authors use the LaTeX `\setlength`                \setlength{\parskip}{30pt}      You can even define a `constant` somewhere and write:                 \parskip\parsep      Even `\parskip30PT` or even `\parskip10Pt` works! I favour `\parskip30pt` for macros in a package and `\newlength` for preamble commands in a document. Is there a right way to set a dimension parameter? Note: here is a short minimal example of all the above commands for anyone wishing to try them out.               \documentclass[11pt]{article}      \usepackage{lipsum}     \begin{document}       \parskip30pt       \lipsum[1-2]       \parskip=3pt       \lipsum[1]       \setlength{\parskip}{30pt}       \lipsum[1]      \parskip\parsep       \lipsum[1]      \parskip25Pt      \lipsum[3]      \parskip30PT      \lipsum[4]     \texttt{\meaning\parsep}          \texttt{\the\parsep}     \end{document}


title: How to skip both the first n rows &  the last m rows simultaneously?

text: I am using `showexpl.sty` to display side by side the code snippet and its corresponding output. Because of the paper size limit, I intentionally want to remove the "redundant" rows, i.e., the first n rows and the last m rows from the code snippet. Is it possible to do that in `showexpl.sty` ?               \documentclass{article}          \usepackage{showexpl}     \lstset{%     % any setting goes here.     }     \begin{document}          \begin{LTXexample}[%     %any option goes here.     ]     %redundant n rows begin     % one     % two     % ...     % n th rows     Important parts go here.     Again... it is important!     ...     %redundant m rows begin     % one      % ...     % m th rows     \end{LTXexample}          % others important parts go here.     \end{document}      * * * I reopen this question because using `linerange` is not possible when I don't know the number of lines until at "runtime". * * * I will use @Herbert's solution for inline code inclusion and @TH's solution for external code inclusion. Unfortunately I cannot make 2 green-checked.


I was given the following error in sublime text during the build process:               LaTeXTools: you need to migrate your preferences. See the README file for instructions.      What do I need to do to fix it?


title: Watermark random location

text: I would like to add an artistic watermark image on every page, at a random location on each page. I am considering the `eso-pic` package, but am open to just about any suggestion. Does anyone have any idea how to achieve the above, given the following...   1. The Random Placement, Doesn't have to be 'Strictly' random as per strict mathematical standards, and could be based on system clock millisecond value or the like, just sufficiently random so as to appear random to the reader.   2. The size of the image may vary, and, also, the size of the paper may vary.   3. I have the image generation handled, for the purposes of this post, just assume it is a `.jpg` or `.bmp` etc... I am sure some of you may have seen financial reports, or Information memorandums and the like, quite often a watermark varies slightly per page.... UPDATE: I probably should have said, the pictures are created on the fly at compile time. They should be different for every page. In terms of providing MWA, this is an example of what I have done so far. Note, this working example uses R, and knitr (http://yihui.name/knitr/) to access ggpplot2 objects directly as they are created in the R environment. By using tikz device, the benefits of LaTeX can be applied, although not exploited in this example, in the sense that math formatting can be applied to axis labels, and other labels of such nature. In terms of this query, the impetus comes from a desire to plot mathematical functions for watermarks, one can imagine a wave function propagating one page at a time. _[Note: Incidentally, you may identify that when typeset, the knitr code chunks contained aren't being re-evaluated each time they are called (they are referring to a cached copy of the first evaluation), and I have posted a query on the knitr homepage to have this resolved if possible]_ In order to compile this, the file needs to be saved with .Rnw extension (as opposed to .tex), and executed with the following command.               "C:/Program Files/R/R-2.15.2/bin/Rscript.exe" -e "knitr::knit2pdf('%.Rnw')"      _[Note: the above command can be added as a user command in TexMaker or whatever your particular flavor of editor is, obviously, change the directory to suit your own R installation.]_ Standard Preamble as Follows. Nothing Special.               \documentclass[a4paper]{article}     \usepackage{lipsum}     \usepackage{tikz}     \usepackage{eso-pic}          %opening     \title{The Quick Brown Fox}     \author{Joe Bloggs}      The following section is also in the preamble, and defines chunks as per knitr functionality. The code inside the <<>>= and @ flags, refers to code executed in R. There are many many options which can be parsed into each chunk. Too many to explain here, however, I encourage people to refer to the knitr website as listed above.               %Load the Packages.      <<setting_load_knitr,cache=TRUE,eval = TRUE,echo = TRUE,include=FALSE>>=         ## Install latest version of tikzDevice (Installation Currently Disabled)         ## install.packages("tikzDevice", repos="http://R-Forge.R-project.org")              ## Default Message Suppression - Spam Sucks.         suppressMessages( library(knitr))         suppressMessages(library(tikzDevice))              ##Stating Minimum Requirements.         require(knitr,quietly=TRUE)         require(tikzDevice,quietly=TRUE)     @      Define the chunk to plot the object.               %Define the Plot Block.     <<background_plot,dev='tikz',echo=FALSE,eval=TRUE,cache=TRUE,fig.keep='none'>>=         suppressMessages( library(ggplot2))         require(ggplot2,quietly=TRUE)            theme_new <- theme_set(theme_bw(0))          x <- runif(1:250)  #250 random points.         y <- runif(1:length(x)) #create corresponding y values         z <- c(1:length(x)) #increasing point sizes         zf <- as.factor(1:length(x))         dat <- data.frame(x,y,z,zf)         rm(x,y,z,zf)              ##Plot the items.         ggplot(dat,aes(x,y)) +              geom_point(aes(size = z,color=zf),alpha=0.33) +             scale_x_continuous(element_blank()) +             scale_y_continuous(element_blank()) +             theme(legend.position="none",axis.ticks=element_blank(),                 panel.border=element_blank(),                 panel.grid.major=element_blank(),                 panel.grid.minor=element_blank())     @      The next part of the preamble defines function to draw the plot within the LaTeX environment, calling the above chunk, adding to every shipout as per the eso-pic package.               %Define the command to call on each page.     \newcommand\drawPlot{         <<ref.label='background_plot', dev='png', out.width='1.5\\paperheight',out.height='1.5\\paperheight',echo=FALSE,dpi=500>>=         @     }     \EveryShipout{         \AddToShipoutPicture*{             \put(-100,-100){\drawPlot}         }     }      Now to create the MWE dummy document.               \begin{document}         \maketitle         \begin{abstract}             \lipsum[1-3]         \end{abstract}         %Dummy Section 1         \newpage         \section{Lorem Ipsum}             \lipsum[1-10]              %Dummy Section 2         \newpage         \section{Lorem Ipsum}             \lipsum[1-10]              %Dummy Section 3         \newpage         \section{Lorem Ipsum}             \lipsum[1-10]     \end{document}      So in terms of this question. The example above creates a series of randomly placed pretty circles. The size of the image generated is much larger than the actual page, by randomly shifting it left and right, up and down, no one page will be the same, hence the objective of this query. Example output: ![Example Output](http://i.stack.imgur.com/dHS1w.png) As another example output, (this time used in a letter template), the use of equations for watermark as per the following code:               <<wavepacket,dev='tikz',echo=FALSE,eval=TRUE,cache=TRUE,fig.keep='none'>>=         suppressMessages( library(ggplot2))         require(ggplot2,quietly=TRUE)            theme_new <- theme_set(theme_bw(0))          suppressMessages(library(reshape))         require(reshape,quietly=TRUE)         x <- seq(-1.25,0.5,0.005) #define x data         f1 <- function(x)sin(x) #define functions         f2 <- function(x)((2*pi)^(-0.5))*exp(-(x*x)/2) #Gaussian function         f3 <- function(x){f1(8*x)*f2(x)} ##Gaussian Wavepacket net function.              ##Create the dataframe.         df <- data.frame(x=x,GaussUpp=f2(pi*x),WavePacket=f3(pi*x))         df.melt <- melt(df,id.vars = c('x'))         colnames(df.melt) <- c('X','Function','Value')              ##Now Plot, different colors for the different plots.         ggplot(df.melt,aes(x=X,y=Value)) +             geom_path(size=20,aes(color=Function),alpha=0.025)+              geom_path(size=10,aes(color=Function),alpha=0.025)+              geom_path(size= 8,aes(color=Function),alpha=0.025)+             geom_path(size= 4,aes(color=Function),alpha=0.025)+              geom_path(size= 2,aes(color=Function),alpha=0.025)+              geom_path(size= 1,aes(color=Function),alpha=0.025)+              scale_x_continuous(element_blank()) +             scale_y_continuous(element_blank()) +             theme(legend.position="none",axis.ticks=element_blank(),                 panel.border=element_blank(),                 panel.grid.major=element_blank(),                 panel.grid.minor=element_blank())     @      Yielded the following result... ![Second Example](http://i.stack.imgur.com/lYd8I.png) Tweaking some of the settings in the Plotting function can yield a completely different look and feel ![Third Example](http://i.stack.imgur.com/SLasA.png)


title: Why is there only one question on the second page? Using Exam Class

text: I am trying to format this exam; however, the number of question per page is horrible. There is no logical reason why there is only one question on the second page and several on the next page and only two on the last and third page. Can anyone please explain how to properly space the question so there is enough white space to work the problems?               \documentclass[12pt]{exam}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \usepackage{amsmath}     \usepackage{paralist}     \usepackage{enumerate}     \usepackage{wrapfig}     \usepackage{xcolor}     \usepackage{graphicx}          \newcommand{\Lim}[1]{\raisebox{0.5ex}{\scalebox{0.8}{$\displaystyle \lim_{#1}\;$}}}     % \pagebreak[10]     \printanswers               \pagestyle{headandfoot}     \runningheadrule     \firstpageheader{AP Calculus Practice Exam A1}{  }{Senior 2}     \firstpageheadrule     \runningheader{AP Calculus Practice Exam A1} { Page \thepage\ of \numpages} {Senior 2 }     \firstpagefooter{}{}{Page \thepage\ of \numpages}     \runningfooter{}{\iflastpage{End of exam}{Please go on to the next page\ldots}}{Page \thepage\ of \numpages}     % For a visual definition of these parameters, see     % \textwidth = 6.5 in     % \textheight = 9 in     % \oddsidemargin = 0.0 in     % \evensidemargin = 0.0 in     % \topmargin = 0.0 in                % \headheight = 0.0 in               % \headsep = 0.0 in               % These problems were taken from Calculus Problem Book AP exams.     \begin{document}     \begin{titlepage}                 \begin{center}         \textsc{\LARGE A.P. Practice Test:A1}\\[0.5cm]                   \textsc{\LARGE Multiple-Choice}\\[0.5cm]                   \textsc{\LARGE No Calculators}\\[0.5cm]                   Time - 40 minutes\\            \end{center}            \vfill                                          \emph{Directions}: Solve each of the following problems, using the available space for scratch work. After examining the form of the choices, decide which is best of the choices given and clearly circle the choice.  Do not spend too much time on any one problem.                      \vfill       \begin{center} Good Luck\! \end{center}                                   \end{titlepage}                              % These problems were taken from Calculus Problem Book AP exams.          \begin{questions}       % A.P. Calculus Test One Section One Problem 1       \begin{samepage}         \question Which of the following is continuous at $x = 0$ ?         \begin{center}           \begin{parts}             \renewcommand{\thepartno}{\Roman{partno}}             \part $f\left(x\right) = \vert x \vert$             \part $f\left(x\right) = e^{x}$             \part $f\left(x\right) = \ln\left(e^{x} - 1 \right)$           \end{parts}         \end{center}         \begin{oneparchoices}           \choice I only           \choice II only           \CorrectChoice I and II only           \choice II and III only           \choice none         \end{oneparchoices}       \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 2         \question The graph of a function $f$ is reflected across the $x$-axis and then shifted up 2 units. Which of the following describes this transformation of $f$? \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice $-f\left(x\right)$           \choice $f\left(x\right) + 2$           \choice $-f\left(x + 2 \right)$           \choice $-f\left(x - 2 \right)$           \CorrectChoice $-f\left(x\right) + 2$         \end{choices}       \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 3         \question Which of the following functions is \textit{not} continuous for all real numbers $x$?         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice $f\left(x\right) = x^{1/3}$           \CorrectChoice $f\left(x\right) = \dfrac{2}{\left(x + 1\right)^4}$           \choice $f\left(x\right) = \vert x + 1 \vert$           \choice $f\left(x\right) = \sqrt{1 + e^x}$           \choice $f\left(x\right) = \dfrac{x - 3}{x^2 + 9}$         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 4         \question $\Lim{x \to 1} \dfrac{\ln x}{x}$ is         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice 1           \CorrectChoice 0           \choice $e$           \choice $-e$           \choice nonexistent         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 5         \question $\Lim{x \to 0} \left( \dfrac{1}{x} + \dfrac{1}{x^2} \right) = $         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice 0           \choice $\dfrac{1}{2}$           \choice 1           \choice 2           \CorrectChoice $\infty$         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 6         \question $\Lim{x \to \infty} \dfrac{x^3 - 4x + 1}{2x^3 - 5} =  $         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice $-\dfrac{1}{5}$           \CorrectChoice $\dfrac{1}{2}$           \choice $\dfrac{2}{3}$           \choice 1           \choice Does not exist         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                      \newpage       \begin{samepage}              % A.P. Calculus Test One Section One Problem 7         \question For what value of $k$ does $\Lim{x \to 4} \dfrac{x^2 - x + k}{x - 4}$ exist?         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \CorrectChoice -12           \choice -4           \choice 3           \choice 7           \choice No such value exists         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 8         \question $\Lim{x \to 0} \dfrac{\tan x}{x} = $         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice -1           \choice $-\dfrac{1}{2}$           \choice 0           \choice $-\dfrac{1}{2}$           \CorrectChoice 1         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 9         \question Suppose $f$ is defined as         \[f\left(x\right) = \begin{cases} \dfrac{\vert x \vert - 2}{x - 2} & x \neq 2 \\ k & x = 2 \end{cases}\]         Then the value of $k$ for which $f\left(x\right)$ is continuous for all real values of $x$ is $k = $         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice -2           \choice -1           \choice 0           \CorrectChoice 1           \choice 2         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                      \newpage       \begin{samepage}         % \hrule         % A.P. Calculus Test One Section One Problem 10         \question The average rate of change of $f\left(x\right) = x^3$ over the interval $[a,b]$ is         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice $3b + 3a$           \CorrectChoice $b^2 + ab + a^2$           \choice $\dfrac{b^2 + a^2}{2}$           \choice $\dfrac{b^3 + a^3}{2}$           \choice $\dfrac{b^4 - a^4}{4\left(b - a\right)}$         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 11         \question The function         \[ G\left(x\right) = \begin{cases} x - 5 & x > 2 \\           -5   & x = 2 \\           5x - 13 & x < 2 \end{cases} \]         is not continuous at $x = 2$ because         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice $G\left(2\right)$ is not defined           \choice $\Lim{x \to 2} G\left(x\right)$ does not exist           \CorrectChoice $\Lim{x \to 2} G\left(x\right) \neq G\left(2\right)$           \choice $G\left(2\right) \neq -5$           \choice None of the above         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 12         \question $\Lim{x \to -2} \dfrac{\sqrt{2x + 5} -1}{x + 2} = $         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \CorrectChoice 1           \choice 0           \choice $\infty$           \choice $-\infty$           \choice Does not exist         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                      \newpage       \begin{samepage}         % \hrule         % A.P. Calculus Test One Section One Problem 13         \question The Intermediate Value Theorem states that given a continuous function $f$ defined on a closed interval $[a,b]$ for which 0 is between $f\left(a\right)$ and $f\left(b\right)$, there exists a point $c$ between $a$ and $b$ such that         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice $c = a - b$           \choice $f\left(a\right) = f\left(b\right)$           \CorrectChoice $f\left(c\right) = 0$           \choice $f\left(0\right) = c$           \choice $c = 0$         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                 \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 14         \question The function $t\left(x\right) = 2^x - \dfrac{\vert x - 3\vert}{x - 3}$ has         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice a removable discontinuity at $x = 3$           \choice an infinite discontinuity at $x = 3$           \CorrectChoice a jump discontinuity at $x = 3$           \choice no discontinuities           \choice a removable discontinuity at $x = 0$ and an infinite discontinuity at $x = 3$         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % A.P. Calculus Test One Section One Problem 15         \question Find the values of $c$ so that the function         \[  h\left(x\right) = \begin{cases} c^2 - x^2 & x < 2 \\           x + c     &  x \geq 2 \end{cases}\]         is continuous everywhere         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice -3,-2           \choice 2,3           \CorrectChoice -2, 3           \choice -3, 2           \choice There are no such values         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                      \newpage       \begin{samepage}         % \hrule         % A.P. Calculus Test Two Section One Problem 4         \question If $F\left(x\right) = x \sin x$, then find $F^{\prime}\left(\dfrac{3\pi}{2}\right)$         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice 0           \choice 1           \CorrectChoice -1           \choice $\dfrac{3\pi}{2}$           \choice $-\dfrac{3\pi}{2}$         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % Calculus Problem Book A.P. Calculus Test Three Question 8         \question The position of a particle moving on the $x$-axis, starting at time $t=0$, is given by $x\left(t\right) = \left(t-a\right)^3\left(t-b\right)$, where $0 < a < b$. Which of the following statements are true?         \begin{center} \begin{parts}             \renewcommand{\thepartno}{\Roman{partno}}             \part The particle is at a positive position on the $x$-axis at time $t = \dfrac{a + b}{2}$             \part The particle is at rest at $t = a$             \part The particle is moving to the right at time $t=b$           \end{parts}\end{center}         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice I only           \choice II only           \CorrectChoice III only           \choice I and II only           \choice II and III only         \end{choices}            \end{samepage}       \vspace{\stretch{8}}                           \begin{samepage}         \hrule         % Calculus Problem Book A.P. Calculus Test Three Page 96  Question 14         \question Let $f$ be a twice-differentiable function of $x$ such that, when $x = c$, $f$ is decreasing, concave up, and has an $x$-intercept. Which of the following is true?         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice $f\left(c\right) < f^{\prime}\left(c\right) < f^{\prime \prime}\left(c\right)$           \choice $f\left(c\right) < f^{\prime \prime}\left(c\right)< f^{\prime}\left(c\right) $           \CorrectChoice $ f^{\prime}\left(c\right) < f\left(c\right)< f^{\prime \prime}\left(c\right)$           \choice $ f^{\prime}\left(c\right) < f^{\prime \prime}\left(c\right) < f\left(c\right) $           \choice $f^{\prime \prime}\left(c\right) < f\left(c\right) <  f^{\prime}\left(c\right) $         \end{choices}            \end{samepage}       \vspace{\stretch{8}}            % \newpage       \begin{samepage}         % \hrule         % Calculus Problem Book A.P. Calculus Test Four Section One Question 3         \question Let $f\left(x\right)$ be defined as below. Evaluate $\int_0^6 f\left(x\right)\,\mathrm{d}x$               \[f\left(x\right) = \begin{cases} x & 0<x\leq 2 \\ 1 & 2 < x \leq 4 \\ \frac{x}{2} &  4 < x \leq 6               \end{cases}\]              \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \choice 5           \choice 6           \choice 7            \choice 8            \CorrectChoice 9         \end{choices}       \end{samepage}       \vspace{\stretch{8}}                 \begin{samepage}         \hrule         % Calculus Problem Book A.P. Calculus Test Five Section One Question 4         \question Solve the differential equation $\frac{\mathrm{d}y}{\mathrm{d}x} = y$ with the initial condition that $y\left(0\right) =1.$ From your solution, find the value of $y\left(e\right)$         \begin{choices}           \renewcommand{\thepartno}{\Alph{partno}}           \CorrectChoice $e^e$           \choice $e$           \choice $e-1$           \choice $e^e - 1$           \choice $e^2$         \end{choices}       \end{samepage}       \vspace{\stretch{8}}               \end{questions}     \end{document}


title: Math mode for csvsimple Import

text: I am currently struggling when I try to import a CSV file which contains math code using the following code:               \documentclass{article}     \usepackage{csvsimple}     \usepackage{amssymb}  % Math symbols     \usepackage{amsmath}  % Math formulas          % Make csv in question     \begin{filecontents*}{example.csv}     ex1,\rho = 4e9     0,19.85     \end{filecontents*}          \begin{document}     \csvautotabular{example.csv}     \end{document}       The problem is that `\rho` is not interpreted. Moreover, it does not even compile. I also tried `$\rho$` or within quotes. Unfortunately, `csvsimple` does not seem to work along with math mode contents of the CSV. Does anybody has a solution for this? Thank you in advance! RMK


title: Where would one find LaTeX flashcards?

text: I've always been of the mind that, if I'm to take a language seriously, I need to memorize a certain amount of terms. With that in mind, I'm planning on creating a flashcard deck with Anki and/or Quizlet...if I can't find an already-done list. So, where can one find flashcards related to LaTeX?


title: tufte-handout and footnotes

text: In the example below, paragraphs 1 and 2 are not indented and are separated by some vertical space, as requested by `\parindent=0pt\parskip=10pt`. However, paragraph 3 reverts to the default (some parindent, no parskip). If I enclose `\footnote(...}` in a group as in `{\footnote(...}}`, then all is well. Is this a bug in `tufte-handout.cls`? It works as expected in `article.cls`.               \documentclass{tufte-handout}     \def\SOMETEXT{ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}     \begin{document}     \parindent=0pt\parskip=10pt          1.\SOMETEXT          2.\SOMETEXT\footnote{footnote text.}\SOMETEXT          3.\SOMETEXT          \end{document}      ![enter image description here](http://i.stack.imgur.com/sJADp.png)


title: Is it possible to integrate sage in kile?

text: I'm using `sagetex` to output the result of computations directly on LaTeX. I'm using Kile as my editor. The usual procedure for compilation is:   1. compile LaTeX on Kile.   2. goto terminal and load the Sage script on Sage   3. compile LaTeX again. I was wondering if it is possible to make a build tool for Kile that does, for example:   1. `pdflatex filename.tex`   2. `sage filename.sagetex.sage`   3. `pdflatex filename.tex`


title: Problem with spacing after \[...\] environment when using the \textcolor{} command

text: I'm getting odd spacing/indentation behavior when the \textcolor command is combined with the \[ ... \] environment. I did find a fix by putting `%` in a couple places, as outlined below, but I'd like to know if anyone has a better solution. The picture below, followed by a MWE, explains the problem in more detail. **Output:** ![enter image description here](http://i.stack.imgur.com/0CSVW.png) **Code:**               \documentclass[a4paper,11pt]{article}     \usepackage{amsmath, amsfonts, amssymb, parskip, dsfont, amsthm, wasysym, mathrsfs}     \usepackage{graphicx}     \usepackage[usenames, dvipsnames]{xcolor}     \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}     \usepackage{mathrsfs}     \usepackage[normalem]{ulem}     \usepackage[breaklinks=true]{hyperref}     \usepackage{soul, color} % for highlighting     \usepackage{pifont} % for cool symbols in text mode          \begin{document}          \textbf{No problems with spacing or indents when I don't use the      \textbackslash[ ... \textbackslash] environment.}          \textcolor{NavyBlue}{Insert problem description here.}          Insert problem solution here.          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \textbf{When I use the \textbackslash[ ... \textbackslash] environment, it     puts a large space after     the \textbackslash textcolor section.}          Insert problem solution here. %% this line should have been removed          \textcolor{NavyBlue}{Insert problem description here. Along with some math:     \[ 1 \neq 0 \]}          Insert problem solution here.          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \textbf{I can sort of fix the problem by eliminating the space      between the problem statement and the solution statement, but      then there is an ugly little indent.}          \textcolor{NavyBlue}{Insert problem description here. Along with some math:     \[ 1 \neq 0 \]}     Insert problem solution here.          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \textbf{Finally, I realized that I could ``fix'' the problem by putting a      comment character at the end of the line and between the lines.}          \textcolor{NavyBlue}{Insert problem description here. Along with some math:     \[ 1 \neq 0 \]}%     %     Insert problem solution here.          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \textbf{But this seems incredibly hacky, and I'm hoping someone can point      me to a more elegant fix.}          \end{document}      EDIT: So after using your suggestions (Johannes), it no longer has the indent, but it that space is still there. Here's what I'm talking about: **Code** : ![enter image description here](http://i.stack.imgur.com/Pj3nf.png) **Output** : ![enter image description here](http://i.stack.imgur.com/o3tOn.png) **EDIT #2** : It's a very minor difference, but I'm seeing a larger gap between the math and the text than between the text and the text: ![enter image description here](http://i.stack.imgur.com/a5P3y.png) Here's the relevant code:               \textbf{4.} \hspace{5 pt}      \begin{specialmathtwo}     Blah blah blah blah blah blah blah blah blah blah Turing machine blah blah such that     \[L \subseteq \{ M \mid \text{$M$ is a Turing machine that blah blah blah} \}.\]     \end{specialmathtwo}     Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah BLAH blah blah blah blah blah blah blah blah blah.          Blah blah blah blah blah blah blah.      and               \newenvironment{specialmathtwo}{         \color{NavyBlue}     }{%     \par %Maybe you want to finish all of them off with a paragraph     }


title: Convert from physical dimensions to axis cs coordinate values

text: In answering PGFPlots: Howto draw a label at a zero of a function?, I got stuck on converting a length in `pt` to the actual coordinate value in the `axis cs` system. Here I only need the `x` value, but my question is how does one obtain the actual `x`/`y` values of a coordinate once you have their physical location. ### Sub-Question:   * Why does the circle not get drawn for the intersection on the left once I use `\pgfextra`? ![enter image description here](http://i.stack.imgur.com/zntJc.png) ## Notes:   * Physical coordinate locations can be extracted as per Extract x, y coordinate of an arbitrary point in TikZ. ## Code:               \documentclass[border=2pt]{standalone}     \usepackage{pgfplots}     \usetikzlibrary{intersections}          % http://tex.stackexchange.com/questions/33703/extract-x-y-coordinate-of-an-arbitrary-point-in-tikz     \newdimen\XCoord     \newdimen\YCoord     \newcommand*{\ExtractCoordinate}[1]{\path (#1); \pgfgetlastxy{\XCoord}{\YCoord};}%          \begin{document}          \begin{tikzpicture}         \begin{axis}[                 axis x line=middle,                 axis y line=middle,                 domain=-4:7,                 xmax=7,             ]             \addplot[no marks,blue,thick, name path global=My Graph] {x*x-4*x-7};             \addplot[no marks,draw=none,  name path global=x Axis  ] {0};             \fill[red,name intersections={of=My Graph and x Axis,total=\t}]                 \foreach \s in {1,...,\t}{                     \pgfextra{\ExtractCoordinate{intersection-\s}}                     (intersection-\s) circle (2pt)                      node [above] {$\XCoord$}                 };         \end{axis}     \end{tikzpicture}     \end{document}


title: algorithmic package, get rid of algorithms numbers

text: My question is about algorithmic package. I have an algorithm which I called A1.               \begin{algorithm}     \caption{\bf A1:}     \label{algorithm-A1}     ...      I have something like this:               Algorithm 1 A1      How can I make that I will get               Algorithm A1      And another question how I can labelling so that when I use `\ref{algorithm-A1}`, then link will appear as A1 in a text.


title: XeTeX and xdvipdfmx problem in Texstudio (2)

text: I'm issuing the same problem like in this question, but unfortunately it was closed for whatever reason: XeTeX and xdvipdfmx problem in Texstudio When I try to compile the .tex file from the commandline it works with no errors, it seems that Texstudio doesn't use the same PATH variable as my shell does. I can reproduce this error by removing the TeX folder from my PATH variable and execute:               simon$ /usr/texbin/xelatex table.tex      This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     (./table.tex     LaTeX2e <2011/06/27>          ======= some latex processing stuff =======           Overfull \hbox (15.0pt too wide) in paragraph at lines 39--40     [][]      [1] (./table.aux) )     sh: xdvipdfmx: command not found     (see the transcript file for additional information)     Error 32512 (driver return code) generating output;     file table.pdf may not be valid.     Transcript written on table.log.     seims-lappi:LatexTable simon$      I think that Xelatex causes this error by calling `xdvipdfmx` instead of `./xdvipdfmx` internally, because other TeX Tools work fine, even without PATH variable set. Version of Xelatex is:               simon$ /usr/texbin/xelatex -v     XeTeX 3.1415926-2.5-0.9999.3-2013061817 (TeX Live 2013)     kpathsea version 6.1.1     Copyright 2013 SIL International and Jonathan Kew.     There is NO warranty.  Redistribution of this software is     covered by the terms of both the XeTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the XeTeX source.     Primary author of XeTeX: Jonathan Kew.     Compiled with ICU version 51.1; using 51.1     Compiled with zlib version 1.2.7; using 1.2.7     Compiled with FreeType2 version 2.4.11; using 2.4.11     Compiled with Graphite2 version 1.2.1; using 1.2.1     Compiled with HarfBuzz version 0.9.15; using 0.9.15     Using Mac OS X Core Text, Cocoa & ImageIO frameworks


title: Horizontal line in a pbox

text: While creating a quiz, I needed to format logical arguments, which our textbook presents as a list of premises, one per line, then a horizontal rule as wide as the widest premise, and the conclusion underneath. There should not be too much space around the rule (it does not take up a line of its own.) I dealt with this by using the `pbox` package (I have version 1.2.) I put the premises and conclusion in a pbox, with an `\hrule` before the conclusion. Since the `\pbox` was the width of the widest line, the `\hrule` was also the right width. Here is a minimal example.               \documentclass{minimal}     \usepackage{pbox}     \begin{document}     \pbox{8cm}{     Either you love logic or you hate it. \\     You don't hate logic.     \smallskip\hrule\smallskip     You love logic.}     \end{document}      This works fine, actually, except that it produces an error: `You can't use `\hrule' here except with leaders.` After pressing enter to ignore the error, it is output exactly as I would hope, except that having to press enter 9 times each time I compile my document is not very nice. The quiz looks like this: ![Logical Arguments](http://i.stack.imgur.com/uRsBn.png) This raises a 4-fold question:   1. What is the reason for the error, which only seems to arise in a `\pbox`? I would love an explanation of the TeXnical underpinnings.   2. How should one draw a horizontal line across a `\pbox` without error? I found that `\hrulefill` works, but needs its own line. Is there a more elegant way than `\\\\[-.7em] \null\hrulefill\\\\[-.2em]`, which has the disadvantage of fiddly spacing (liable to break down, and only approximating the spacing of `\smallskip\hrule\smallskip`, which I liked)?   3. Is there a way to use `\leaders`, as suggested by the error, to maintain the same output produced by `\hrule` but without the error?   4. What's the proper way to achieve my desired result? I suppose the obvious method is with a `tabular` environment, but this does not seem semantically correct to me. A succession of statements, with a line underneath, is not a table! Also, the line does not fit the width quite as nicely as it does in a `\pbox`, though I'm sure that can be fixed with fiddling.


title: Merging duplicate footcites

text: I'm having a problem with my `footcites`. I attached a mini example from my thesis. My problem is that in some cases I need to cite the exact same author (in my example: `\footcite[5 f.]{Dijcks.2013})`. When I generate this document, there will be a separate footnote for each `footcite`; however, I would like to have a sort of cross reference and only generate one footnote for the same `footcites` on one page. Instead of 4 separate footnotes I want to have one and the other `footcites` should reference to this footnote. Is there a possibility to have this behaviour automatically? I hope you know what I'm heading to. ![enter image description here](http://i.stack.imgur.com/Qo4mi.png) ![enter image description here](http://i.stack.imgur.com/9f9Nq.png) Code:                \documentclass[12pt]{scrreprt}      \usepackage[utf8]{inputenc}      \usepackage[ngerman]{babel}      \usepackage[babel,german=quotes]{csquotes}      \usepackage[     backend=biber,     indexing=cite,       citestyle=authoryear,        bibstyle=authoryear,     isbn=false      ]{biblatex}      \bibliography{Thesis}           \usepackage{caption}      \usepackage{subcaption}           \usepackage{chngcntr}      \counterwithout{footnote}{chapter}                \begin{document}           Lorem ipsum dolor sit amet, consectetur adipiscing elit.\footcite[5 f.]{Dijcks.2013} Praesent ullamcorper,      mauris in condimentum cursus, odio nulla hendrerit turpis, vitae tristique ortor            justo id neque.\footcite[5 f.]{Dijcks.2013} Maecenas imperdiet ac arcu ac mattis. Suspendisse eros magna,            malesuada et aliquet posuere, ullamcorper vitae lectus.\footcite[5 f.]{Dijcks.2013} Sed pulvinar eleifend tellus       nec scelerisque. Praesent tellus urna, imperdiet sit amet risus ut, rutrum hendrerit       nisi. \footcite[5 f.]{Dijcks.2013}           \printbibliography           \end{document}


title: What is the most elegant way to get a diagram showing elimination method to solve simultaneous equations?

text: First of all, I show you my effort as follows. It seems to be too complicated in coding with unsatisfied output.               \documentclass[border=12pt,12pt,varwidth]{standalone}     \usepackage{mathtools}          \begin{document}     $         \begin{aligned}             \!             \begin{aligned}                 3x +2y &=7 \\                 9x +8y &=22              \end{aligned}             \left|             \!             \begin{aligned}                 \times 3\\                 \times 1             \end{aligned}             \right|             &\!             \begin{aligned}                 9x +6y &=21 \\                 9x +8y &=22              \end{aligned}\\             &\!             \begin{aligned}                 -2y &=-1 \\                     y &=1/2              \end{aligned}         \end{aligned}     $     \end{document}      ![enter image description here](http://i.stack.imgur.com/7LZKX.png) What I want to achieve are   * The coding must use as minimal number of keystrokes as possible.   * The output should look as follows, ![enter image description here](http://i.stack.imgur.com/K2sz7.png) where all spaces are well balanced, all equal signs are well aligned, the horizontal line exists to show the process of subtraction or addition, the sign of the process can be changed to either plus or minus, and the vertical lines are tall enough just to separate the left and right equations (no excessive vertical line). How is the most elegant way to get such a diagram?


title: How to print part of .tex code to pdf

text: My friends send me this `.tex` code, but it is only part of the code. I need your help to edit this code into a full document, because when I insert this code to TeXworks it does not compile into a pdf file. This is the part of code which I need to be edited into a full document:               digraph {     A [peripheries = 2];     B [peripheries = 2];          A->B [label = "a"];     S->A [label = "a"];          A->A [label = "b"];     S->S [label = "b"];          A->S [label = "c"];     S->B [label = "c"];          }      Console output: > This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010) restricted \write18 > enabled. entering extended mode (./untitled-1.tex LaTeX2e <2009/09/24> > Loading CZ hyphenation patterns: Pavel Sevecek, v3, 1995 Loading SK > hyphenation patterns: Jana Chlebikova, 1992 > > ! LaTeX Error: Missing \begin{document}. > > See the LaTeX manual or LaTeX Companion for explanation. Type H for > immediate help. ... >   >   >                                                    l.1 d >      igraph { ? >


title: btex and etex in luamplib labels

text: I've been experimenting with `METAPOST` and in particular with `luamplib`. I found that I couldn't have `tex` typeset labels with the `btex`/`etex` construct as apparently is possible with straight up `METAPOST`. After a little googling, I found that `btex`/`etex` can be made to work by using the files `luatexkomplib.tex` and the corresponding `luatexkomplib.lua` found here. My usage is as follows:               \documentclass{article}          \usepackage{pdftexcmds}          \makeatletter     \let\pdfescapename=\pdf@escapename     \let\pdfstrcmp=\pdf@strcmp     \input{luatexkomplib}     \makeatother          \begin{document}          \begin{mplibcode}          beginfig(1)     u=50;     draw fullcircle scaled u;     pickup pencircle scaled 2;     draw (u/2,0); draw(0,u/2); draw(-u/2,0); draw(0,-u/2);     label.rt(btex $\theta = 0$ etex scaled .5, (u/2,0));     label.top(btex $\theta = \displaystyle{\frac{\pi}{2}}$ etex scaled .5, (0,u/2));     label.lft(btex $\theta = \pi$ etex scaled .5, (-u/2,0));     label.bot(btex $\theta =\displaystyle{\frac{3\pi}{2}}$ etex scaled .5, (0,-u/2));     endfig;     end;          \end{mplibcode}     \end{document}      Which produces the expected circle with `tex` labelled points. My question is: do I break anything by using these two files rather than using the `luamplib` package? If not, then have I missed an updated `luamplib` package somewhere?


title: Adjust margins for BibTeX using LyX

text: I'm working on my thesis. Most of the new chapters etc start with a 2" margin on the first page. However, the Bibliography is supposed to start with an 1" margin. I left the document's default margins as 1" since each new chapter sets the first page as 2" anyway, but the 1" default is ignored by BibTeX. I am using the report class. Any ideas on how I can adjust it?               % Preview source code from paragraph 0 to 13          \begin{singlespace}          \chapter*{\textmd{\large Drudge: A High-Level to High-Level Translator for     the EasyC Platform}}     \end{singlespace}          \thispagestyle{empty}          \begin{center}     Brandon Paul Jones     \par\end{center}          \begin{center}     \vspace{4sp}          \par\end{center}          \begin{center}     A Thesis presented to the faculty of Arkansas State University in     partial fulfillment of the requirements for the Degree of     \par\end{center}          \begin{center}     \vspace{2sp}     MASTER OF SCIENCE IN COMPUTER SCIENCE\\     \vspace{0.25in}          \par\end{center}          \begin{center}     ARKANSAS STATE UNIVERSITY\\     December 2012     \par\end{center}          \begin{center}     \vspace{2in}          \par\end{center}          \begin{singlespace}     \begin{center}     Approved by\\     Dr. Jeff Jenness, Thesis Advisor\\     Dr. Hai Jiang, Committee Member\\     Dr. Hung-Chi Su, Committee Member\\     Mr. Jake Qualls, Committee Member\pagebreak{}     \par\end{center}     \end{singlespace}               \chapter*{\textmd{\large ABSTRACT}}          \begin{doublespace}     \begin{center}     {\large Brandon Paul Jones}\linebreak{}          \par\end{center}{\large \par}          \begin{center}     {\large Drudge: A High-Level to High-Level Translator for the EasyC     Platform}{\Large }\linebreak{}          \par\end{center}{\Large \par}     \end{doublespace}          The use of abstraction along with the use of critical thinking are     key concepts in computer science. The development of these skills     are crucial for survival and success in the field. I believe the key     to success is to allow students to experiment with computer science     concepts at an early age. The BEST robotics competition is a fertile     ground for potential future computer scientists and engineers, however     the current robotic programming platforms prove to be overly challenging     for the young audience. In this thesis, I propose both a new approach     to teaching younger individuals programming, as well as, a new platform     in which to do so.\pagebreak{}          \bibliographystyle{plain}     \bibliography{proposal}


title: Can I write a macro for placing a vertical, breakable rule along arbitrary paragraphs without an output routine?

text: I answered a question last week about creating a continuous but breakable rule next to an arbitrary number of paragraphs in Plain TeX. My solution gathered the paragraphs to rule in a `vbox`; my output routine put that content into an `hbox` and added a `vrule`. If the content overflowed, I used `vsplit` to place as much as a I could, then deferred the rest to the next page. Could I have done this (in Plain TeX) without a custom output routine?


title: Easiest way to make a document using TTF portable

text: Although I've found a way to install fonts, I would like to distribute a `.tex` document along with any font it's using and be able to compile it without having to install these fonts. For instance, I would distribute the `.tex` file along with the `.afm`, `.dvi` or whatever format, in such a way that another author could edit the document and compile it with texlive or miktex (or any other under any platform) without having to install the fonts, just use the local redistributed ones. Is this possible? How? Thanks in advance.


title: block inside block?

text: I want to draw block inside another block as the following picture ![enter image description here](http://i.stack.imgur.com/gqcEJ.jpg) I do apologize if the picture is not clear. My problem is how can I draw block inside another block? I don't have a problem with the rest of the picture.


title: Enumerate environments in abstract

text: Consider usage of the standard `enumerate` environment inside the standard (`article`) `abstract` environment:               \begin{abstract}       We discuss several exciting topics:       \begin{enumerate}       \item Topic 1, explained at such length that the text produces a line break,       \item Topic 2.       \end{enumerate}     \end{abstract}      My complaint is that the `enumerate` environment doesn't respect the margin reductions of the abstract environment. (In particular, the index numbers appear to the left of the left margin, and the text is wrapped to right of the right margin.) Presumably, I could wrap the `enumerate` environment in a `minipage` to control the margins by brute force. What is the right way to do it? To elaborate on the question, you can see an example below: ![enter image description here](http://i.stack.imgur.com/MpqGA.png) You may notice that this was not produced from the article class. The class does, however, borrow the abstract code (with some--I thought--insignificant changes) from the conventional article class.


title: Problem with listings when using line numbers, `name`, and `beamer` overlays

text: It's is well known that to ensure that a certain `<counter>` is automatically reset on subsequent slides of a same frame one has to use either `\resetcounteronoverlays{<counter>}` (for LaTeX counters) or `\resetcountonoverlays{<counter>}` (for TeX counters). However, this seems not to work for the `lstnumber` counter used for numbering lines in a `lstlisting` environment when the `name` key is used, as the following simple MWE shows:               \documentclass{beamer}     \usepackage{listings}          \lstset{numbers=left}     \resetcounteronoverlays{lstnumber}          \begin{document}          \begin{frame}[fragile]     \begin{onlyenv}<1>     \begin{lstlisting}[name=first]     test line in first listing     \end{lstlisting}     \end{onlyenv}     \begin{onlyenv}<2>     \begin{lstlisting}[name=second]     test line in second listing     \end{lstlisting}     \end{onlyenv}     \end{frame}          \end{document}      The output: ![enter image description here](http://i.stack.imgur.com/WPOXS.png) If the `name` option is not used, the effect of `\resetcounteronoverlays{lstnumber}` is the expected and one gets the correct result. How can the `lstnumber` be prevented from stepping when using the `name` key and `beamer` overlays?


title: How to make a table column disappear?

text: > **Possible Duplicate:**   >  Easiest way to delete a column? I have many table in my document, and I have decided I don't want one of their columns to appear in the output. I don't want to just remove the columns -- the tables are long and fiddly to edit, I might change my mind and want the column back, etc. So I am trying to come up with a new column specifier (using the `array` package) that discards a column entirely, making the table appear as if said column was not in the source code ("commented out," as it were). Here's an example document, with a couple ideas I've tried with no success:               \documentclass{article}     \usepackage{array}          \def\FooGobble#1\EndGobble{}          % leaves extra blank space between the columns     %\newcolumntype{X}{>{\FooGobble}l<{\EndGobble}}          % continues to typeset SURPRISE     %\newcolumntype{X}{p{0in}}          % still leaves extra space     \newcolumntype{X}{>{\FooGobble}p{0in}<{\EndGobble}}          \begin{document}          \begin{tabular}{lXl}         first col & SURPRISE & second col \\     \end{tabular}          should appear the same as:          \begin{tabular}{ll}         first col & second col \\     \end{tabular}          \end{document}      Thanks!


title: What does this font correspond to?

text: I have this piece of thesis and I would know what font is. Should be Times New Roman? I think not. I compared but they are not totally equal ![enter image description here](http://i.stack.imgur.com/lxwmM.png) what do you say? Here it is a link where you can show better the font: thesis ![enter image description here](http://i.stack.imgur.com/0PuEa.png) This is my result after using `lmodern` with `pdftex`. As you can see is too light respet to that in the thesis


I have an option clash between package `xcolor` and another package, but I don't know which. Here is my MWE               \documentclass[10pt]{beamer}     \setbeamertemplate{navigation symbols}{}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{url}     \usepackage{color}     \usepackage[usenames]{xcolor}          \author{The author}     \title{Package conflicts}     \date{October 3rd, 2012}          \begin{document}          This is supposed to be \textcolor{olivegreen}{olivegreen}     \end{document}      And the error message is :               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)     entering extended mode     (./error_xcolor.tex     LaTeX2e <2009/09/24>     <blablabla>     ! LaTeX Error: Option clash for package xcolor.      I hope this is enough `log` for you guys. At this time of the day, I'm hoping for America to save my french ass ... again : )


title: theorem-like environments: italic correction and endmark placement

text: How would you define theorem-like environments so that: (1) theorems are set in italics with italic correction and (2) proof endmarks occur directly after text?


title: alignment of text between 2 lines in align*

text: I have this:               \begin{align*}       &f(1) = -11 & &\mbox{while q satisfies} &q(1) = 11,\\       &f(-2) = 20 & &\mbox{} &q(-1) = 20       \end{align*}      which puts the text "while" on the same line as the first line (obviously). Is there a way to have it in the (vertical) middle of the two lines? I.e. in between the two lines.


title: Putting two texts side-by-side

text: I am currently translating a book and typesetting the translation. For reviewing purposes, I would find it very useful to display the original and translated texts side-by-side, without having to duplicate the text I have for the typesetted translation. My translation is stored in a `chapters/` directory, one file per chapter, beginning with a `\chapter` command, and containing several `\section*` commands each. My idea would be to have a `chapters_orig/` directory with the chapters in the original language, and then automatically generate a document that contains the two languages side-by-side, paragraph by paragraph. I have read about the `parallel` package but I don't see how I could use it to automatically generate this document without altering my current document. **Note:** Although I've answered my question with a bash script, I'm still interested in a TeX-based solution, and I would be happy to make it a package.


title: Diagram displayed as an equation

text: ![enter image description here](http://i.stack.imgur.com/VdkZd.png) Sorry to ask a direct question like that but: how can you do that ? Is it a complicated use of `align` ? Is it really and equation (mathmode) ?


title: How to line up blocks in columns with full width blocks in beamer/beamerposter?

text: This input to pdflatex (whatever version of texlive is on Debian/squeeze)               \documentclass{beamer}          \usepackage[orientation=portrait,size=a3,scale=0.9]{beamerposter}     \usepackage{lipsum}          \beamertemplategridbackground[0.5cm]     \setbeamertemplate{background canvas}[vertical shading][bottom=gray,top=white]          \setbeamercolor*{block body}{bg=white,fg=black}     \setbeamercolor*{block title}{fg=white,bg=blue}     \setbeamerfont{block title}{size=\Large}          \begin{document}          \begin{frame}            \begin{block}{Introduction}         \lipsum[1]       \end{block}            \begin{columns}[t]              \begin{column}{.5\textwidth}           \begin{block}{Problems are inevitable}             \lipsum[2]           \end{block}         \end{column}              \begin{column}{.5\textwidth}           \begin{block}{Problems are soluble}             \lipsum[3]           \end{block}         \end{column}            \end{columns}            \begin{block}{Conclusion}         \lipsum[4]       \end{block}            \vfill          \end{frame}          \end{document}      produces this output: ![Output from the code given](http://i.stack.imgur.com/8yARA.png) Now obviously putting `0.5\textwidth` (or `0.5\linewidth`) for each column is going to be too wide because it doesn't take account of any column spacing or margins, so it's not surprising it doesn't line up nicely with the non-column full width blocks above and below. However, it's not clear to me what I could/should specify there to achieve that result. My current workround is to just fiddle around with the widths until it looks good enough (the grid helps), but there must be a better way. My question is, what should I put for the column widths which will magically make the outer edges of the column blocks be in harmonious agreement with full-width non column blocks ? Is there something which can be calculated from other beamer parameters which will just work ? **Update 2012-10-06** : Looked a bit more into this. Comments on this question and the answer here make me think a satisfactory solution will need a new columns environment defining, or the beamer one modifying somehow.


title: Changing href's to footnotes

text: Here is exactly what I am trying to do. I have a file with many commands of the form `\href{a}{b}` for strings `a` and `b`. I would like to redefine `\href` so that it executes the following: `\footnote{\href{a}{b}}`. Thus want to change the URL's into footnotes to URL's. – Is this possible?


title: babel: english, american, USenglish

text: Does it make any difference (and if so, which) whether I use `english`, `american`, or `USenglish` as the option for the `babel` package? I've already looked into the package description, and it seems to be the same to me, but since I consider myself a LaTeX novice, I'm highly interested in an expert opinion. Thanks in advance!


title: How to prevent pdflatex to stop working due to an invalid input file?

text: I want to create a LaTeX editor. Behind the scene, the editor will call `pdflatex.exe`. I need a method to prevent `pdflatex.exe` to stop working because of an invalid input file. Is there anybody here knows the protocols, rules, conventions used by `pdflatex.exe` ? Note: I created the question in StackOverflow as well. ## Edit Using suggestions from @Martin and @arx (a SO member), my actual problem is solved. THANK you!


title: Mix align and enumerate

text: Is it possible to mix align* and enumerate, for example I want to TeX something like this (item a) and d), b) and e) and c) and f) should be aligned) a) x^2 + y^2 = 1 b) a + b = c c) r-x = y+z d) f - y = z e) ... f) ... For example:               \begin{enumerate}     \begin{align*}     &\item x^2 + y^2 = 1 & &\item a + b = c & &\item r-x = y+z \\     &\item f - y = z & & \item ... & &\item ...     \end{align*}     \end{enumerate}      doesn't work.


title: What does \global\boolfalse{cbx@loccit} mean?

text: Pardon the newbie question. I see this in the first part of a `\DeclareCiteCommand` and I'm not sure what it means. Google has not returned any joy. Here's an example               \newbibmacro*{cite}{%         \global\boolfalse{cbx@loccit}%         \ifciteseen         {....      Many thanks again for the help.


title: Is it ever bad to use \left and \right?

text: For mathematics, is it ever disadvantageous to use `\left(` and `\right)` in equations? I can't see any way that doing this would hinder the typesetting, so why isn't `()` just converted into `\left(` `\right)` automatically? This would save a lot of typing. Cheers!


title: When to use `\left(` and when plain `(`?

text: This is basically a follow-up to the comments on this answer which I couldn't find to be settled anywhere. I learned that you can write ordinary bracket simply using               f(x)      but that you can also use               f \left( x \right)      where the latter automatically adopts the brackets' size, _but_ creates a space between the function and the bracket. My question is: when is one supposed to use which version. Is the second version only used when the "content" of the bracket is _not_ an argument of some function? What if it is a long and complex argument, where I want the brackets to be increasing in size? Would I then use               f \! \left( long expression \right)      or is there some other solution for this? * * * Edit: While I found some solutions regarding the space adjustment, I was still wondering when to use which approach, i.e. whether there are some "best practice rules" for this.


title: Dot Derivative Discrepancy

text: I am trying to typeset some higher-order time derivatives using the dot notation, and I've noticed something strange. The expressions               $\dot y + y = \cos(\dot y)$     $\ddot y + y = \cos(\dot y)$      give the expected results. However,               $\dddot y + y = \cos(\dot y)$     $\ddddot y + y = \cos(\dot y)$      causes the higher derivative term to be slightly raised, see below. Any thoughts? ![enter image description here](http://i.stack.imgur.com/mYz97.jpg) Here is my preamble:               \documentclass{article}     \usepackage{amsmath, amssymb, amsfonts, amsthm, fouriernc}


title: Inline arrows with tikz

text: I'm trying to achieve an arrow that I can use inline, ie. somewhere in the running text, similar to `\xrightarrow`, but with an open triangle as its arrow head. This is what I came up with using tikz:               \documentclass[varwidth]{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows}          \newcommand*{\ident}[1]{\texttt{\small #1}}          \tikzstyle{refines} = [->, >=open triangle 45]          \newcommand{\refi}[3]{$\begin{tikzpicture}[baseline=-0.63ex]%     \node (A) {#1};%     \node (B) [right of=A, node distance=4em] {#3};%     \draw[refines] (A) -- node[midway,above=-2pt] {#2} (B);%     \end{tikzpicture}$}          \begin{document}          this is a test \refi{\ident{1}}{\scriptsize text}{\ident{2}}\ident{2} that continues here          this is a test \refi{1}{\scriptsize text}{1}\ident{2} that continues here          \end{document}      ![example](http://i.stack.imgur.com/eFiCi.png) However, as illustrated in the second example, the baseline is dependent on the font size I use in the picture, which is less than ideal. Moreover, I also got the width of the arrow only by trial and error. How can I repair those two problems, or get what I want in some other way?


title: How can I make plots with TikZ which look like the new Mathematica 9 plots

text: The new Mathematica 9 is out! I would love to know how to make similar plots to the one's advertized, particularly the following: ![plot with lines from x-axis each point](http://i.stack.imgur.com/tV9sH.png) **and** ![a plot with changing colors after specific point](http://i.stack.imgur.com/iH6JR.png) Here is a simple plot to get started.               %& -shell-escape     \documentclass{article}     \usepackage{tikz}          \begin{filecontents}{data.dat}     3.045784        3.415896     3.405784        4.025693     3.785784        4.522530     4.125784        5.538449     4.485784        6.704992     4.805784        6.978939     5.145784        7.113496     5.425784        8.916397     6.065784        9.487712     6.365784        10.876397     6.685784        10.693497     7.025784        11.364131     7.345784        11.442530     7.665784        12.582530     8.005784        13.125693     8.225784        13.738450     8.585784        14.247891     8.865784        14.982530     \end{filecontents}          \begin{document}     \pagestyle{empty}          \begin{tikzpicture}[x=1cm,y=0.4cm]            \def\xmin{3}       \def\xmax{9.2}       \def\ymin{2}       \def\ymax{15.5}            % grid       \draw[style=help lines, ystep=2, xstep=1] (\xmin,\ymin) grid       (\xmax,\ymax);            % axes       \draw[->] (\xmin,\ymin) -- (\xmax,\ymin) node[right] {$x$};       \draw[->] (\xmin,\ymin) -- (\xmin,\ymax) node[above] {$y$};            % xticks and yticks       \foreach \x in {3,4,...,9}         \node at (\x, \ymin) [below] {\x};       \foreach \y in {2,4,...,14}         \node at (\xmin,\y) [left] {\y};            % plot the data from the file data.dat       % smooth the curve and mark the data point with a dot       \draw[color=blue] plot[smooth,mark=*,mark size=1pt] file {data.dat}        node [right] {data};               \end{tikzpicture}          \end{document}      ![simple plot example](http://i.stack.imgur.com/Nfwtu.png)


title: TeXworks - Two font isssues

text: I know this is not a latex related question - but its with texworks so thought to ask here. I have some data in excel which I want to bring it to Tex file so that I can create nice pdf file. When I copy data from excel and paste in texworks only one type of font gets copied based on texworks font preference and the second one is totally messed up as shown in the image. Is there any work around for this? The font I am working are "Arsha Sanskrit" and "Airel" This is how I got the file and I really don't want to retype the whole document. They both work fine separately but gets one correct rendering based on the texworks preference. I would appreciate your help. ![enter image description here](http://i.stack.imgur.com/JWQzx.jpg)


title: Problem with multicolumn color tables

text: _edition might be grateful since i don´t know how to name this problem._ English is not my native idioms. Also I don't know how to interpret this problem as well on so apologies in advance. I am working on a table and i want it to look like this one: ![How i want my table to look like:](http://i.stack.imgur.com/Xry8I.jpg) After some time I made it to look like it with this code:               \documentclass{report}     \usepackage{float}     \usepackage{color}     \usepackage[spanish]{babel}     \usepackage{multirow}     \usepackage{booktabs}     \usepackage{colortbl}     \usepackage{chngpage}     \usepackage{colortbl}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{xcolor,colortbl}     \newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}     \begin{document}          \begin{table}[H]     \begin{adjustwidth}{-1in}{-1in}     \begin{footnotesize}     %\caption{Tabla comparativa de proyectos utilizados en la enseñanza de sistemas     operativos.}     \label{Evaluacion economicae}     \vspace{10pt}     \begin{center}         \begin{tabular}{|C{3.4cm}|*{9}{C{0.8cm}|}}     \hline     \cellcolor{black} & \multicolumn{3}{|>{\columncolor{black}}m{4cm}}    {\centering{\textbf{\color{white}El Mejor Escenario (Vehículo 1)}}} &      \multicolumn{3}{|>{\columncolor{black}}m{4cm}}{\centering\textbf{\color{white}El Mejor     Escenario (Vehículo 2 a 5)}} &      \multicolumn{3}{|>{\columncolor{black}}m{4cm}|}{\centering\textbf{\color{white}El Peor         Escenario (Todos los Vehículos)}} \\           \hline      \rowcolor[gray]{0.8}\multirow{-3}{*}    {\cellcolor{black}\centering{\textbf{\color{white}Empresa}}}& Año 1 & Año 2 & Año 3 &  Año 1      &  Año 2  & Año 3 & Año 1 & Año 2 & Año 3\\ \hline      GRUPO DECA & 1.68 &1.35 & 0.68 & 0.94 & 0.76 & 0.38 & 5.44 & 4.38 & 2.19\\  \hline      \rowcolor[gray]{0.8}GPS TECNOLOGIAS  & 1.62 &1.3 &0.65 &0.91 &0.73 & 0.36 & 5.25 & 4.21     & 2.11 \\ \hline      GPS RASTREO SATELITAL & 1.69 & 1.38 & 0.69 & 0.95 & 0.77 & 0.39 & 5.48 & 4.48 & 2.24 \\      \hline      \rowcolor[gray]{0.8}Localización Satelital Integral & 1.82 & 1.39 &     0.69 & 1.02     & 0.78 & 0.39 & 5.90 & 4.49 & 2.24 \\ \hline      GPS ADVANTAGE & 1.33 & 1.26 & 0.63 & 0.75 & 0.70 & 0.35 & 4.32 & 4.07 & 2.04 \\ \hline          \rowcolor[gray]{0.8}TISSA   &1.38& 1.33 & 0.67 & 0.77 & 0.75 & 0.37 & 4.48      & 4.32 & 2.16 \\ \hline      GRUPO UDA & \multicolumn {9}{c|} {\centering No presento cotizaciones.}\\ \hline         \end{tabular}     \end{center}     \caption{Evaluaciónes Económicas}     \end{footnotesize}     \end{adjustwidth}     \end{table}          \end{document}      The result of the code looks like the image below and this where my problem comes out: ![notice the white space near the cells](http://i.stack.imgur.com/QzaF8.jpg) How do i remove the blank space right to each cell? I been searching over it on the code but i can't find where it is wrong.


title: colortbl row column color overwrite hline on screen

text: I have the following code to generate table with color highlights on certain rows and columns, also vertical bars and hline are used to partition the table, the table prints ok on paper, however on screen the lines are overwritten by the colors, as seen in the picture below: ![enter image description here](http://i.stack.imgur.com/2d00h.jpg) See also here： https://www.writelatex.com/1123639gvpdyx The code used:               \documentclass{article}     \usepackage{colortbl}     \definecolor{Gray}{gray}{0.8}     \newcolumntype{g}{>{\columncolor{Gray}}c}     \begin{document}     \begin{table}[h]       \centering       % Table generated by Excel2LaTeX from sheet 'Sheet1'       \begin{tabular}{cgc|c}         128   & 64    & 32    & 16 \\ \rowcolor{Gray}         64    & 32    & 16    & 8 \\         32    & 16    & 8     & 4 \\ \hline         16    & 8     & 4     & 2 \\       \end{tabular}%     \end{table}     \end{document}      Is there a work around to show correctly on screen?


title: List References with No Numbering

text: For a paper I am working on, I am managing my citations with biblatex. I don't use in text citations, so I am currently using the command `\nocite{*}` to print all references. However, the output is numbered. Since I am not actually referring to any of them in the text, I would prefer if it were simply an alphabetical list, with no numbers next to each reference. Is there a simple way to do so? I couldn't find anything in the documentation that seemed like it would help. Update: Just found this. However, biblatex doesn't seem to use `@biblabel`. Looking into it.


title: Is that possible to put one figure in the top and one two-column figure in the bottom of a same page?

text: I am adding figures into a two-column LaTeX file. In one page, I need to put a one-column figure and a two-column figure in a same page. The one-column figure should be in the top of the page and the two-column figure should be in the bottom. (I think I've seen this sort of layout in some papers.) However, I found it really hard. I have tried `float` package. It didn't work. I even have tried to reset the float placement parameters, e.g., `\dblfloatpagefraction` to 1. It didn't work either. The two-column figure always falls into the next page. I have almost accepted the truth that this is formidable. But I am still holding the last hope that someone knows how to do this.


title: Working with Bib files in Word/LibreOffice

text: I've a huge database of books in `.bib` files. Are there any ways to import this database into Microsoft Word, Open Office, Libre Office etc.?