title: Configure LaTeX to use lmodern for T1 by default?

text: Like those contributing to the discussion of Why are Bitmap-Fonts used automatically?, I have also found the automatic use of bitmap fonts very annoying as the output is really horrible. My question is: How to configure LaTeX (TeX Live) so that if T1 is used it uses `lmodern` by default and if `lmodern` isn't available don't try to generate bitmap fonts?


title: Embed distributed LaTeX file/code to the PDF?

text: I have read of the possibility to embed the LaTeX source in a generated PDF, see the question here. Do you know of a way to do this with **distributed** TeX file, i.e. for a TeX file which is stored in many separate parts and put together using `include` an `input`? I'd rather not have to manually include all the `.tex` files, as this will surely at some point lead to me forgetting one of the many files (think title.tex, acknowledgment.tex, abstract.tex, chapter1.tex, ..., appendix1.tex, ...,backmatter.tex, etc...).


title: Error 'Dimension too large', with TikZ and PGF

text: I have adapted an example from TEXample.net (Original author: Andreas Menge, http://www.texample.net/tikz/examples/3d-graph-model/) for creating parallelepipeds with a helper grid to give perspective. This was working fine up until a certain point when the drawing of some of the edges resulted in a `Dimension too large` error.               \documentclass[10pt]{article}     \usepackage{tikz}          \newcommand{\myGlobalTransformation}[3]     {         \pgftransformcm{1}{0}{0.4}{0.5}{\pgfpoint{#1cm}{#2cm}}     }          \newcommand{\gridThreeD}[3]     {     \begin{scope}         \myGlobalTransformation{#1}{#2};         \draw [#3,step=1cm] grid (3,6);     \end{scope}     }          \newcommand{\drawLinewithBG}[2]     {     \draw[black,very thick] (#1) -- (#2);     }          \begin{document}     \begin{tikzpicture}          \gridThreeD{0}{0}{black!50};     \gridThreeD{0}{4}{black!50};          \begin{scope}         \myGlobalTransformation{0}{0};              \foreach \x in {1,2} {             \foreach \y in {1,2} {                 \node (thisNode) at (\x,\y) [scale=0.01] {};                 {                    \pgftransformreset                     \draw[black,very thick] (thisNode) -- ++(0,4,-1.97); %----- anything less than z= -1.96 gives the error                }             }         }          \end{scope}          \end{tikzpicture}         \end{document}      (I have stripped down the code here to highlight the issue). The desired result would be the lines drawn up to a square with corners (1,4)(1,5)(2,4)(2,5) on the top helper grid. It seems there is no error if lines are drawn such that they are coming out of the page (i.e. when the z coordinate is +1.97 in the code, effectively a rotation of the shape by 180 degrees), so that may provide a possible solution. There have been a lot of previous questions about this error, often answered with the suggestion of using `fpu`. I have tried this, but to no avail. Also at a glance the numbers involved here don't seem to be beyond the ~16384 limit. Any suggestions would be much appreciated, thanks.


title: How to change the font size of a particular letter

text: I referred the link : How do I change the font of a letter?. But the link didn't help me out. I would like to achieve this: ![enter image description here](http://i.stack.imgur.com/TIeST.png)   Here is the MWE though I know it isn't :(:               \documentclass{article}     \begin{document}     Hello World     \end{document}


title: How to compose a fixed-size image from multiple eps files

text: I am looking for a way to build an image by overlaying a large `.eps` file (`A.eps`) with a smaller inset (`B.eps`). I want the final image area to have a fixed dimensions (width=`\textwidth`, height=10cm). First, `A.eps` needs to be scaled to the image area width (i.e. `\textwidth`) and positioned vertically at the bottom of the image area. The original aspect ratio of `A.eps` must be preserved. If the height of the scaled `A.eps` is less than the image area height, I want the whitespace above it preserved. If it is greater, then I want the `A.eps` clipped back to the top of the image area. Second, I want to inset a much smaller graphic `B.eps` (without scaling) positioned so that the northeast corner of `B.eps` is 0.5cm south and 0.5cm to the west of the northeast corner of the image area. Lastly, I want to do this for many files where the aspect ratio of both `A.eps` and `B.eps` change. Ideally, I want to define a command and feed the names of the images as arguments. Ideas? ![Schematic of image area](http://i.stack.imgur.com/Rzhv4.png)


title: How do I typeset a file containing ASCII art using a fixed-width character font?

text: I have a string with the text precisely spaced the way I want it displayed. It's sort of an ASCII art project. I want to convert this text to a PDF so I can print a poster with the text at my local printshop. The font needs to be fixed width and there are no tabs or anything like that. The lines end in the `\n` character. There are several space characters. The image is several hundred characters wide and several hundred high. So, it doesn't fit in the space of a typical page. Is there an easy way to do this in LaTeX?


title: TikZ - Tables Highlight and fit text

text: What would be a way to create a table with the diagonal elements highlighted as such.   ![Sample table1](http://i.stack.imgur.com/2Qn17.png) I used the example found here to get the above figure with this (not great) code               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}          \tikzset{      table/.style={         matrix of nodes,         row sep=-\pgflinewidth,         column sep=-\pgflinewidth,         nodes={             rectangle,             draw=black,             align=center         },         minimum height=1.5em,         text depth=0.5ex,         text height=2ex,         nodes in empty cells,        row 1 column 1/.style={             nodes={fill=gray!30}             },        row 2 column 2/.style={             nodes={fill=gray!30}             },        row 2 column 3/.style={             nodes={fill=gray!15}             },        row 3 column 2/.style={             nodes={fill=gray!15}             },        row 4 column 5/.style={             nodes={fill=gray!15}             },        row 5 column 4/.style={             nodes={fill=gray!15}             },        row 6 column 7/.style={             nodes={fill=gray!15}             },                row 7 column 6/.style={             nodes={fill=gray!15}             },                                                         row 3 column 3/.style={             nodes={fill=gray!30}             },      row 4 column 4/.style={             nodes={fill=gray!30}             },      row 5 column 5/.style={             nodes={fill=gray!30}             },     row 6 column 6/.style={             nodes={fill=gray!30}             },     row 7 column 7/.style={             nodes={fill=gray!30}             }                                }     }     \begin{tikzpicture}          \matrix (first) [table,text width=6em]     {     SO  & $f(x,y,z)$        & & & &  &\\         & AS    & B          & C         & D & & \\     2       & F         & 3D & H & J&&  \\     3       & A         & B & DS & D&& \\     4       & F         & G & H & 4D &&\\     5       & F         & G & H & I & PS& \\     6       & F         & G & H & I & & 4D\\     };          \end{tikzpicture}     \end{document}      But when I try and input more data into the cells, for example, like ![Sample table2](http://i.stack.imgur.com/6EoDs.png) I would like it resize(height) to fit the text, and adjust all the cells to have the same height and width. How should I go about that? Also, Is there a way to have a small arrow going from AS -> B and from B -| 3D?


title: Modify footer of slides

text: I am editing a presentation with `beamer`, the theme is `Boadilla`:               \date{date}     \title[The title is quite quite quite quite quite quite long]{The title is quite quite quite quite quite quite long}     \author{My name}     \institute{My school}     \usetheme{Boadilla}       ![enter image description here](http://i.stack.imgur.com/8MWGH.png) There are several things I would like to change: 1) When I open the pdf file in "Slideshow" mode, the list of buttons on the right bottom is still visible, I don't think it is necessary, could anyone tell me how to remove it? 2) On the bottom, there are currently 3 parts. For the 1st part, `My school` is appended automatically after `My name`, is it possible to remove `My school`? 3) I don't think `date` is necessary, which is the 3rd part. Is it possible to just remove this part, so that I have more space for the title + page number? If it is not possible, I would prefer to put the name of `Section` at the 2nd part instead of the title, does anyone know how to do it?


title: How to provide more horizontal space between cases in a system?

text: I have the following ugly system: ![Ugly system](http://i.stack.imgur.com/lXdvz.png) This is my LaTeX code:               \newcommand{\Aaa}{\begin{bmatrix} 1 & 0 \\ 0 & -1\end{bmatrix}}     \newcommand{\Ba}{\begin{bmatrix} 0 & 1 \\ -1 & 0\end{bmatrix}}     \newcommand{\R}{\mathbb R}          \begin{displaymath}     f: G\longrightarrow GL_2(\R):     \begin{cases}     a\longmapsto \Aaa\\     b\longmapsto \Ba     \end{cases}     \end{displaymath}      As you can see, the matrices 'collide'. Is it possible to add some more blanc space between them?


title: MiKTeX where do I specify command line options?

text: I'm using MiKTeX 2.9 and I want to specify the command line option --shell- escape. The reason for this is that I'm trying to use an eps file and I get the error > xxx-eps-converted-to.pdf' not found. I read that this command line option can fix the problem, but where exactly do I specify it? I'm typesetting with LuaLaTeX using TeXworks as the editor. EDIT: added editor.


title: Can't install LaTeX package 'changes' on Ubuntu 12.04

text: I am a latex user on ubuntu, but not an expert of unix systems. I manage myself for easy things through the terminal. I very frequently refer to forums like stackoverflow to fix the problems that I face. But this time I am really lost... I bought a new pc a week ago and installed Ubuntu 12.04 on it. I have been using texmaker for 3 years now and what I did everytime I had to reinstall it was typing, in a terminal               sudo apt-get install texmaker      It works just fine but I need to add a package called changes. My first try was to install manually the package. I downloaded the package on the ctan webpage and then ran in a terminal               cd /usr/local/share/texmf/tex/latex;     sudo unzip $HOME/changes.zip;     sudo texhash;      When I compiled my file.tex I had some errors and the file.dvi was not build. My second try was a completely different options. I tried to install texlive and add the package through tlmgr. So, I downloaded install-tl-unx.tar.gz from here and ran               cd /Downloads/ (directory where I downloaded the tar.gz file)     tar -zxvf install-tl-unx.tar.gz;         sudo ./install-tl -gui perltk;      I checked that texlive 2013 was correctly installed using the instruction of The TEX Live Guide—2013 and everything seems right. When I try to launch tlmgr I get               tlmgr: command not found      by searching the internet I found that a possible reason to my problem could be that the PATH was not defined so I opened ./profile as root and add the lines               PATH=/usr/local/texlive/2013/bin/x86_64-linux:$PATH; export PATH;     MANPATH=/usr/local/texlive/2013/texmf-dist/doc/man:$MANPATH; export MANPATH;     INFOPATH=/usr/local/texlive/2013/texmf-dist/doc/info:$INFOPATH; export INFOPATH;      Since it didn't seem to make any difference I ran those lines in a terminal I also ran               updmap-sys      Whatever I try, I keep getting the same error:               tlmgr: command not found      Can anyone help me on that? I really have no idea about what I might have done wrong.


title: How to project text onto a plane?

text: I'm trying to create the impression that the text "slice" in the example below is written on the cube slice. What is the best solution? To slant the text? ![output](http://i.stack.imgur.com/3EwDb.png)               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}          \begin{tikzpicture}              \def\sliceZ{0.8}         \def\side{2}              % draw slice         \filldraw[color=gray!40] (0,\sliceZ,0) -- (0,\sliceZ,\side) -- (\side,\sliceZ,\side) -- (\side,\sliceZ,0) -- cycle;         \draw[dashed] (0,\sliceZ,0) -- (0,\sliceZ,\side) -- (\side,\sliceZ,\side) -- (\side,\sliceZ,0) -- cycle;              % draw cube         \draw (\side,0,0) -- (\side,\side,0) node[midway,right] {axial} -- (0,\side,0);         \draw (0,0,\side) -- (\side,0,\side) node[midway,below] {lateral} -- (\side,\side,\side) -- (0,\side,\side) -- (0,0,\side);         \draw (\side,0,0) -- (\side,0,\side) node[midway,below right] {temporal};         \draw (\side,\side,0) -- (\side,\side,\side);         \draw (0,\side,0) -- (0,\side,\side);              \node at (1,\sliceZ,1) {slice};     \end{tikzpicture}          \end{document}


title: Missing final brackets (in one equation { and in other - ]) in the equations

text: This is my first question on tex.stackexchange, so the formatting will be terrible. I've got a problem with three lengthy equations - the closing brackets, in all three formulas, are not displayed. Technical info - MikTex x64 (2.9), latest TeXnicCenter (Beta 1 I think it is), Windows 8 x64. In TeXnicCenter I have selected XeLaTeX -> PDF, as it is the optimal way for display of my language. My document settings are following:               \documentclass[12pt,a4paper]{article}     \usepackage{graphicx}     \usepackage{polyglossia}     \usepackage{xltxtra}     \usepackage{xunicode}     \usepackage{units}     \usepackage{amsmath}     \usepackage{pstricks}     \usepackage[top=2.5cm, left=3cm, bottom=2.5cm, right=2.5cm]{geometry}     \usepackage{setspace}     \onehalfspacing     \setmainfont{Times New Roman}     \setdefaultlanguage{latvian}     \setotherlanguages{english, russian}     \begin{document}      And the equations are:               \[      \begin{split}     F'=\delta m\left\{f\frac{M_1l}{r^3}\left[3\cos^2\phi\cos^2(\lambda-D)-1\right]+f\frac{M_2l}{R^3_1}\left(3\cos^2\phi\cos^2\lambda-1\right)-\\-\frac{1}{2}f\frac{M_2r_1}{R^3_1}\cos\phi\cos\left(\lambda-D\right)\left(1+3\cos2D\right)-\frac{3}{2}f\frac{M_2r_1}{R^3_1}\cos\phi\sin\left(\lambda-D\right)\sin2D\right\}     \end{split}      \]     \[     \begin{split}     F^n=\delta m\left\{-\frac{3}{2}f\frac{M_1l}{r^3}\sin 2\phi\cos^2\left(\lambda-D\right)-\frac{3}{2}f\frac{M_2l}{R^3_1}\sin 2\phi\cos^2\lambda-\\-\frac{1}{2}f\frac{M_2r_1}{R^3_1}\sin\phi\left[3\sin\left(\lambda-D\right)\sind 2D-\cos\left(\lambda-D\right)\left(1_3\cos 2D\right)\right]\right\}     \end{split}     \]     \[     \begin{split}     F^m=\sigma m\left[-\frac{3}{2}f\frac{M_1l}{r^3}\cos\phi\sin 2\left(\lambda-D\right)-\frac{3}{2}f\frac{M_2l}{R^3_1}\cos\phi\sin 2\lambda+\\+\frac{1}{2}f\frac{M_2}{R^3_1}r_1\sin\left(\lambda-D\right)\left(1+3\cos 2D\right)+\frac{3}{2}f\frac{M_2}{R^3_1}r_1\cos\left(\lambda-D\right)\sin 2D\right]     \end{split}     \]      I've made a screenshot from TeXworks (PDF mode) with the problem - ![enter image description here](http://i.stack.imgur.com/KRt8H.png) And I've also posted my compile log to the pastebin - http://pastebin.com/CEZ2EUjU And what I have noticed - each equation has added me, approximately, 12 new errors.


title: Forbidding keywords in listings

text: I would like to force the `listings` package to be more selective when highlighting keywords. I'm currently including C source files in my document, and while I'm happy that occurrences of the **float** keyword are properly highlighted, I'd like the following line to appear as `#include <float.h>` instead of the current `#include <` **float**`.h>` In a similar spirit, **else** is fine, but `#else` should be typeset instead of # **else**. I tried solutions like using `deletekeywords={float.}`, but to no avail (unsurprisingly, according to the documentation: "(...) by default some characters are not allowed inside keywords, for example ‘-’, ‘:’, ‘.’, and so on. (...)"). Playing with `deletedirectives` led nowhere either.


title: Annotated equations

text: I need many of my equations to have annotations stating their domain of validity, or certain conditions for which the equation is true. Preferably, these would be flush right against the equation number, and would otherwise not affect the alignment of the equation content. I would like to be able to write something like               \begin{equation}       \sigma_{(j)}\, i = i\, \sigma_{(j)}       \Domain{C_{1,3}}     \end{equation}      and have it set `$C_{1,3}$` just before the equation number (maybe separated by a `quad`, say). I'm thinking maybe `\Domain` could temporarily redefine the `\tag` command (or whatever actually places the number on the line) in this equation, but I can't figure out how to do it. In particular, some equations won't have a `\Domain` command, and shouldn't set anything next to the equation number. I found a very similar question in this forum, which suggested something that looks right in the equation itself:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{equation}       \label{commutation}       \sigma_{(j)}\, i = i\, \sigma_{(j)}       \stepcounter{equation}       \tag*{$C_{1,3}\quad$(\theequation)}     \end{equation}     References come out wrong, as when Eq.~\ref{commutation} is     referenced.     \end{document}      As the example points out, however, the reference to the equation number in the text comes out as `$C_{1,3}\quad$(\theequation)`, rather than just `(\theequation)`. The `amsmath` documentation itself suggests using an `align` environment for this sort of thing, but that's unacceptable. (Also, if it makes any difference, I'm actually using `revtex4-1`, rather than `article`.)


title: Can I use an image located on the web in a LaTeX document?

text: I have tried               \includegraphics{http://www.site.com/path/to/figure.png}      But this returns the error > >     ERROR: Package pdftex.def Error: File >     `http://www.website.com/path/to/figure.png' >     not found. >   Are there other options?


title: Inserting an image using an http URL

text: > **Possible Duplicate:**   >  Can I use an image located on the web in a LaTeX document? I am trying to re-use the same `pandoc/markdown` source file to generate both HTML and LaTeX source and PDF. Is it possible to insert an image in a .tex file using an `http` URL? For example, using `http://example.com/myimage.png` as the image location for `\includegraphics` via some package? Thank you.


title: Include graphics from the web

text: Is it possible to include a graphic file hosted on the web instead of hosted on my local folder? For example, something like this:               \includegraphics{www.example.com/logo.pdf}      **ps:** of course, that url is fake.


title: Indexing Macros without a leading backslash in a dtx file

text: I'm documenting a file containing several `biblatex` bibmacros and booleans and would like to create an index via `\EnableCrossrefs`, but               % \begin{macro}{mybibmacro}     %    \begin{macrocode}     \newbibmacro{mybibmacro}{}     %    \end{macro}      produces the entry               \mybibmacro      in the index and of course all further occurrences of `mybibmacro` in the code are ignored. Is there a way to avoid the leading backslash? Of course it would be perfect if future occurrences such as               \usebibmacro{mybibmacro}      would also be indexed under `mybibmacro`.               \newbool{mybool}      has exactly the same problem. Combining this to a real example yields:               % \iffalse     \documentclass{ltxdoc}     \EnableCrossrefs              \CodelineIndex     \begin{document}       \DocInput{test.dtx}     \end{document}     % \fi     %     % \DescribeEnv{mybibmacro}     % This is my bibmacro.     %     % \DescribeMacro{mybool}     % The boolean \verb|mybool| will determine, if \verb|mybibmacro| is executed.     %      % \StopEventually{\PrintIndex}     %     % \begin{macro}{mybool}     % Here we define the boolean.     %    \begin{macrocode}     \newbool{mybool}     %    \end{macrocode}     % \end{macro}     %     % \begin{environment}{mybibmacro}     % Here we define the bibmacro.     %    \begin{macrocode}     \newbibmacro{mybibmacro}{}     %    \end{macrocode}     % \end{environment}     %     % Now the macro is executed depending on the status of \verb|mybool|. Ideally, both should be indexed as being used here.     %    \begin{macrocode}     \ifbool{mybool}{\usebibmacro{mybibmacro}}{}     %    \end{macrocode}     %      % \Finale      Running this through latex and makeindex yields ![Compiled dtx file with index](http://i.stack.imgur.com/DYmB5.png) In the index `mybool` received a leading backslash and neither the usage of `mybool` nor of `mybibmacro` is indexed in line 3. Also, the listing of `mybibmacro` under `environments` is slightly confusing, it might be good to get rid of that and of course optimal if one could add other categories in addition to environment (such as boolean, bibmacro etc.).


title: Reduce line-spacing in acronyms with hyperref

text: I'm using:               \documentclass[12pt,titlepage]{article}          \usepackage[colorlinks]{hyperref}     \usepackage{datatool}     \usepackage[style=altlist,nonumberlist,numberedsection,acronym,toc,xindy]{glossaries}     \makeglossaries     \makeindex          \newacronym[description={\glslink{acronyms}{this is an acronym}}]{acronyms}{ACRONYMS}{"acronyms"}          \begin{document}          \printglossaries          blablabla \gls{acronyms} blablabla          \end {document}      Now, the problem is that in the `.pdf` it appears as: ![enter image description here](http://i.stack.imgur.com/NEbbL.jpg) Too much space and too much lines, therefore too much pages wasted! How to get rid of this?


title: Customizing the height of a figure

text: How do I to increase the height of a figure? and keeping its width like it's mention in the below code.               \begin{figure}[H]     \hfill{}\includegraphics[width=\linewidth]{images/cu_global_initial}\hfill{}     \caption{Diagramme de cas d'utilisation global initial}     \label{fg:diag_cu_glbl}     \end{figure}      Thanks in advance !!


title: pst-plots not displaying negative exponents

text: I am trying to graph a piecewise function, with one component using negative exponents. However, pst-plots doesn't seem to understand the negative exponent. I've tried expressing it a few different ways, but it will either show nothing or plot something linear.               \documentclass{article}     \usepackage{pst-plot}          \psset     {     xunit=.8cm,     yunit=1cm,     }          \def\L{-.2}     \def\R{5}     \def\B{-0.2}     \def\T{3.2}          \def\dL{2pt}     \def\dR{12pt}     \def\dB{2pt}     \def\dT{18pt}          \begin{document}          \begin{figure}[ht]     \centering     \begin{pspicture}[showgrid=false]     (\dimexpr\L\psxunit-\dL\relax,\dimexpr\B\psyunit-\dB\relax)     (\dimexpr\R\psxunit+\dR\relax,\dimexpr\T\psyunit+\dT\relax)     \psaxes[linecolor=lightgray]{->}(0,0)(\L,\B)(\R,\T)[$x$,0][$f(x)$,90]     \psset{algebraic,linewidth=1.5pt,linecolor=red,plotpoints=2}     \psplot[arrows=-*]{\L}{1}{0}     \psplot[arrows=o-]{1}{\R}{3x^(-4)}     \end{pspicture}     \end{figure}          \end{document}      I am open to other methods of graphing it, but I like how pst-plots looks more so than other packages. Edit: I am trying to graph f(x) = 3*x^{-4} over (1,\infty)


title: How can I match a control sequence using \regex_match?

text: How can I match a control sequence using `\regex_match`? This code               \newcommand{\iw}[1]{\immediate\write16{#1}}          \iw{1 should be true}     \regex_match:nnTF {May} {May} {\iw{TRUE}} {\iw{FALSE}}          \newcommand{\z}{May}     \iw{2 should be true}     \regex_match:nnTF {May} {\z} {\iw{TRUE}} {\iw{FALSE}}      prints               1shouldbetrue     TRUE     2shouldbetrue     FALSE      and I want it to print               1shouldbetrue     TRUE     2shouldbetrue     TRUE


title: Making the abstract's font looks better

text: How do I to make this `Abstract`'s font written in Frensh looks better? Any brilliant idea, please ? ![enter image description here](http://i.stack.imgur.com/gMsUp.png) For example, this font-style that I can't find how to make it: ![enter image description here](http://i.stack.imgur.com/m6EzE.png) Its related code:               \documentclass[12pt,french]{report}     \usepackage{babel}          \begin{document}     \chapter*{Résumé}     Ce stage résume notre expérience de deux mois dans l'été de 2012..     Au cours de cette période, nous avons intégré \`{a} distance une équipe     sur le projet « Barboteau ». Notre rôle a été de concevoir et développer     un site web d'un groupe de musique. Nous avons utilisé le langage     \end{document}      Thanks a lot !!!


title: Is there a way to slightly shrink a table, including font size, to fit within the column boundaries?

text: I have a table that is just a little too wide for a 3.33" column. Is there a way to simply shrink the table a little to make it fit? I'm OK if the 10pt font becomes 9pt-something. Here is an example.               \begin{table}     \centering     \begin{tabular}{r|lll}     \multicolumn{1}{r}{}     & \multicolumn{1}{l}{Heading 1}     & \multicolumn{1}{l}{Heading 2}     & \multicolumn{1}{l}{Heading 3} \\ \cline{2-4}     Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 \\     Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3     \end{tabular}     \end{table}


title: Using Grouping to Limit the Scope of a \newtheorem in the Combine Document Class

text: I am combining a set of articles using the `combine` document class. However, use of the `\newtheorem` command in the individual articles causes an error, when these environments have already been defined by an earlier paper. I would like to maintain the ability to compile each file individually, which precludes simply deleting or commenting out these `\newtheorem` commands. The `combine` class seems preferable to the `standalone` class, which apparently simply ignores the entire preamble; this would eliminate the title and author information from each paper, as well as any `\newcommands` each author may have defined. For example, a main file:               \documentclass{combine}     \usepackage{amsthm}          \begin{document}     \begin{papers}          \coltoctitle{An article} \coltocauthor{A.~N.~Author} \label{art1} \import{ThmTest}          \coltoctitle{Another article} \coltocauthor{A.~N.~Author} \label{art2} \import{ThmTest2}          \end{papers}     \end{document}      together with the files `ThmTest.tex` and `ThmTest2.tex` (same contents):               \documentclass{article}     \usepackage{amsthm}          \newtheorem{Theorem}{Theorem}[section]          \begin{document}          \section{Section}          \begin{Theorem}     A theorem.     \end{Theorem}          \end{document}      The `combine` documentation (http://ctan.mackichan.com/macros/latex/contrib/combine/combine.pdf) suggests on p. 14 that the problem can be avoided by "cunning use of grouping." Simply adding braces around each imported article doesn't seem to fix the problem, so what kind of grouping might work?


title: Using the perpendicular coordinate system with tikzmark

text: How do I refer to the coordinate that is the meeting point of the perpendiculars drawn from a tikz mark and a coordinate? I'd like to use this to align images to bullet points in my beamer presentation, for example,               \documentclass[xcolor={svgnames}]{beamer}     \usepackage{graphicx}     \usepackage{tikz}     \usetikzlibrary{calc,positioning,tikzmark}          \begin{document}          \begin{frame}       \frametitle{Latent Variable Models}            \begin{itemize}          \item Item 1 \tikzmark{a}           \begin{itemize}             \item sub item 1             \item sub item 2             \item sub item 3             \item sub item 4           \end{itemize}         \item Item 2 \tikzmark{b}           \begin{itemize}             \item sub item 1             \item sub item 2             \item sub item 3             \item sub item 4           \end{itemize}       \end{itemize}       \begin{tikzpicture}[remember picture, overlay]         \draw[use as bounding box] (current page.north west) rectangle (current page.south east);         \node (mark) at (5cm,0) {m};         \node (a) at (pic cs:a) {a};         \node (b) at (pic cs:b) {b};         \node (p) at (a -| mark) {p};         \node (q) at (b -| mark) {q};         \node (x) at (pic cs:a -| mark) {x};         \node (y) at (pic cs:b -| mark) {y};       \end{tikzpicture}     \end{frame}          \end{document}      ![Output](http://i.stack.imgur.com/mFMja.png) Here `p` and `q` appear correctly, but `x` and `y` do not. It seems like the reason this doesn't work is that the perpendicular operator `|-` doesn't understand the picture coordinate reference. If I did `\node (y) at (mark |- pic cs:b) {y};` instead, I get the error "unknown coordinate system 'mark |- pic'".


title: Is Knuth's *The TeXBook* complete?

text: Suppose I want to learn TeX. Then, is _The TeXBook_ a complete source? Does it cover all relevant aspect of TeX? Or is there something worth learning about TeX which is not present there? Does also "TeX programming" appear there?


title: Is it possible to use the code \section{\[ \]} without the computer breaking?

text: After doing a mass substitution of a certain heading I had had in my document for `\section{}`, my document stopped compiling. It took me longer than I'd care to admit to figure out what caused it. What it seems to be is that a display `\[ \]` in a section heading makes it too irate to compile. Is there a good way around this? My way is just to end the `\section{}`, insert the `\[ \]`, and resume with a `\section*{}` afterward, but this seems like it can't be the best way.


title: Changing the section number to a fraction

text: In between two sections that really ought to be numbered 23 and 24, I want to add another section, which I would like to call 23.5. The code `\setcounter{section}{23.5} \section{...}`, however, results in a section labeled 24 with a .5 floating over the top of it. Is there a way around this?


title: How to typeset time duration of a song?

text: I need to reference several times (eg. `2:30` \- two minutes and thirty seconds) from a song for an assignment I am working on. I have thought of using `$2$:$30$` because I thought using `2:30` would be incorrect. Is my method of typesetting song duration correct or is there some other method that is?


title: When using a book class (memoir), text shifts from left to right on each page

text: I'm very new to latex, and I've noticed that using a book class causes the text on one page to be on the right and then left on the next and so on. I'd like for it to all to be on the left or centered. How can I change this?


title: Headline with different fonts, and numeration

text: I need to add to my work headline of the next form: Author Name normal font, size 10 pkt In the next line name of work, size 10 pkt, italic. At right side page number, bold, italic, 14 pkt. After that horizontal line. Also I cannot find relationship between pkt from Word, and pt in Tex.


title: What makes the looping index in \foreach produce compile-time error?

text: Consider the following code and error message.               \documentclass[pstricks,12pt]{standalone}     \usepackage{pst-node}     \psset{saveNodeCoors}     \degrees[13]     \begin{document}     \makeatletter     \begin{pspicture}(-4,-4)(4,4)     \foreach \x [count=\xi from 0] in {A,2,3,4,5,6,7,8,9,T,J,Q,K}     {         \pnodes(!3 \xi\space neg \pst@angleunit 90 add PtoC){X\x}         \qdisk(X\x){1pt}         \uput[!N-X\x.y N-X\x.x atan 1 \pst@angleunit div](X\x){\x}         %\uput[!\the\psLoopIndex\space neg 90 1 \pst@angleunit div add ](X\x){\x}     }     \psarcn{->}(0,0){2.8}{(XA)}{(XQ)}     \end{pspicture}     \makeatother     \end{document}      ![enter image description here](http://i.stack.imgur.com/RdIfR.png) What makes the looping index in `\foreach` produce compile-time error? How to solve it?


title: equation spanning two columns in ieeetran

text: I am writing a paper using ieee style in two columns format. Do you know how can I write an equation that spans over the two columns?


title: Converting from biblatex to BibTeX format using biber

text: I wish to use `biblatex`+`biber`, in large part because of its data format (xdata!), but often need to use `.bst`-based bibliography styles. I am aware that `biber --tool` allows conversion of `.bib`-files. Before rolling my own, is there a biber configuration file available that does the conversion from the `biblatex` format to the BibTeX format (e.g., resolving cross/x references/data, location -> address, journaltitle -> journal, date -> year+#mon#)?


title: Edge label distance from edge in TikZ-qtree

text: I'm making a tree using `TikZ-qtree`, and I need to put labels on my edges. Right now it looks something like this:               \begin{tikzpicture}     \Tree         [.$\alpha$             \edge node[left, pos=.2]{\scriptsize $p$};             [.\phantom{$\beta$} ]             \edge node[left, pos=.6]{\scriptsize $a$};             [.$\alpha$ ]             \edge node[right, pos=.2]{\scriptsize $b$};             [.$\beta$ ]     ]     \end{tikzpicture}      Right now, the "a" is quite far from the center edge and the "b" is quite close to the rightmost edge: ![enter image description here](http://i.stack.imgur.com/tCEaM.png) Ideally, the "a" would be closer to the middle edge and the "b" would be slightly farther from the right edge. Does anyone know how to make this happen?


title: Draw an aircraft with Tikz

text: I want to draw a plane using the Tikz tool. You will find, attached, a screenshot. ![enter image description here](http://i.stack.imgur.com/lSAhr.png)


title: Centering a wide table that is defined inside a NewEnviron

text: I am trying to centre a table with a lot of content whose width is larger than the text width. The problem is that I am defining the table environment in the preamble so I can reuse it, and this seems to create a lot of issues.                 \NewEnviron{reqtable}{       \table       \tabularx{1.3\textwidth}{cX}       \toprule       \BODY       \bottomrule     }[       \endtabularx       \endtable     ]      I initialise my table with               \begin{reqtable}     item & item \\     \end{reqtable}      The reason I am using NewEnviron from the environ package is so that I can use rules from the booktabs package (see bottomrule not working in a self-made environment) I have tried the following alterations to center the table.   * use `\centering` just after `\table` \-- no errors, doesn't center.   * use `\adjustwidth[]{}{-8em}` just after the `\table` (see http://stackoverflow.com/questions/722613/latex-centering-a-table-wider-than-the-text-column) -- produces error `! File ended while scanning use of TX@get@body.`   * use `\begin{fullwidth}` to wrap the `\table` \-- produces error `! LaTeX Error: Not in outer par mode.` What else can I try to centre my table? Note: I am using a twoside layout, so margins are different on odd and even pages. This is why the `\adjustwidth` command appeals to me most, as it can handle varying margins. * * * Here is an MWE with tables on different pages wider than the textwidth that I am trying to center.               \documentclass[11pt,a4paper,twoside]{report}          \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{environ}     \usepackage{lipsum}          \NewEnviron{reqtable}{       \renewcommand{\arraystretch}{1.3}       \table       \tabularx{1.3\textwidth}{lX}       \toprule       \BODY       \bottomrule     }[       \endtabularx       \endtable       \renewcommand{\arraystretch}{1}       \vspace{10pt}     ]          \begin{document}          \lipsum[1]          \begin{reqtable}     Some text & \lipsum[1] \\     \end{reqtable}          \lipsum[3]          % This table is on the second page which has different margins     \begin{reqtable}     Other text & \lipsum[1] \\     \end{reqtable}          \end{document}


title: Hyphenation in classicthesis graffito

text: I am using the `classicthesis` package and the `graffito` side notes it provides. However, I'd like those side notes to be properly hyphenated, even though I think they were not intended to be by the author. I tried to adjust the definition of `graffito` to hyphenate, but to no avail. How should this be done?               \documentclass[11pt,a4paper,twoside]{report}     \usepackage{classicthesis}          % graffito definition, modified to change hyphenation penalties     \makeatletter     \def\graffito@setup{%        \slshape\footnotesize%         \parindent=0pt \lineskip=0pt \lineskiplimit=0pt %        \tolerance=2000        \hyphenpenalty=0 % was 300        \exhyphenpenalty=0 % was 300        \doublehyphendemerits=100000%         \finalhyphendemerits=\doublehyphendemerits        }     \makeatother               \begin{document}     \graffito{Text with extremely excessively unnecessarily long words which unfortunately,     undesiredly and awkwardly are not being hyphenated.}     \end{document}


title: TikZ: Automatic Numbering of Nodes, \value{counterName}

text: \documentclass{standalone}     \usepackage{tikz}          \newcounter{xi}     \setcounter{xi}{0}          \newcommand{\foo}[0]{         \addtocounter{xi}{1};         \coordinate (x{\value{xi}}) at (1,2);     }          \begin{document}     \begin{tikzpicture}         \foo{};     \end{tikzpicture}     \end{document}      Every time I call `\foo` I want a new node to be initialized, a new node with name "xK", where K is the value of the counter being increased automatically at each call.


title: Flow of current in a circuit

text: I am trying to create a circuit with resistors and voltage sources. I need to have each resistor labeled with their resistance (above) and the unknown current (below) flowing through the resistor. I manually added the unknown currents using nodes. Finally, I need to have arrows showing the flow of current through the circuit placed at each of the nodes. In my MWE (taken from an earlier question, circuitikz label malfunction), given below, there are four nodes (junctions). How do I get those arrows using what is provided by `circuitikz`? I need three arrows at each of the nodes indicating the flow of current (either into or out of).               \documentclass{article}     \usepackage[american,siunitx]{circuitikz}     \begin{document}     \begin{circuitikz}[x=1.5cm,y=1.2cm]         \draw (0,0) to[battery, l=12<\volt>] (0,2) -- (0,3.5)                     to[R,l=4<\ohm>] (4,3.5) -- (4,2)               (0,0) -- (4,0) to[battery, l=24<\volt>,i>] (4,2)               (0,2) to[R, l=2<\ohm>, *-*] (2,2)                     to[R, l=3<\ohm>, -*] (4,2)               (2,0) to[R, l=2.5<\ohm>, *-] (2,2);         \draw (1,1.6) node { $I_2$};               \draw (3,1.6) node { $I_3$};         \draw (2.3,1.0) node { $I_4$};         \draw (2,3.1) node { $I_1$};     \end{circuitikz}     \end{document}      ![output](http://i.stack.imgur.com/9nWN9.jpg) I would like to avoid having the add the arrows manually. There are several questions regarding circuits, however, I've been unsuccessful in finding an answer to my question. If this is a duplicate I apologize.


title: Button on all slides after Table of Contents in beamer

text: I'd like to add a "return" button on all the slides after the table of contents, returning to the ToC itself, but not exactly on the footer (as shown in How to edit Beamer theme CambridgeUS). I've used on the first slide manually (see the MWE below), but I'd like to put it in the whole document (except for the title and ToC frames, of course). Is there a way to do it not by hand?               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[brazil]{babel}     \usetheme{Boadilla}          \begin{document}          \title{Apresentação RLZ}     \author{RLZ}     \date{\today}               \begin{frame}         \titlepage     \end{frame}          \section*{Sumário}     \label{toc}     \frame{\tableofcontents}          \begin{frame}         \frametitle{Conceitual}         \framesubtitle{Instituição dos procedimentos eletrônicos, iniciado no encontro de Salvador (julho de 2004) e concretizado em São Paulo (abril de 2005)}              \begin{itemize}[<alert@+>]             \item \textbf{NF-e} -- Nota Fiscal Eletrônica (Emenda Constitucional nº 42)                  \item \textbf{NFS-e} -- Nota Fiscal de Serviços Eletrônica                  \item \textbf{SPED} -- Sistema Público de Escrituração Digital (Decreto nº 6022/2007)         \end{itemize}          \end{frame}     \vfill     \hyperlink{toc}{\beamergotobutton{Voltar ao início}}     \end{document}


title: Nested macro envocation - syntax error?

text: I get a `Argument of \\drs has an extra }.` when I try to process the following:               \documentclass{article}          \usepackage{tikz}          \newcommand{\drs}[2][lambda/.initial={}]{%       \{%       {\pgfkeys{/drs/.cd, #1, print}}%       \}%     }          \pgfkeys{/drs/.cd,       print/.code = {\pgfkeysvalueof{/drs/lambda}},       lambda/.code = {%         \pgfkeys{/drs/.cd,                  list/.list = {#1},         }%       },       list/.code = {\pgfkeys{/drs/lambda/.append = (#1)}}     }          \begin{document}            \drs[lambda={a,b,{\drs[lambda={x}]{Bar}}}]{Foo}          \end{document}      But the number of braces is correct. I suspect this has to do with the order of macro expansion. Any help would be greatly appreciated. **EDIT** : Found a related error (I think):               \documentclass{article}          \usepackage{tikz}          \makeatletter     \pgfkeys{/drs/.cd,       %       % lambda       %       lambda/.code={%         \pgfkeys{/drs/.cd,           lambda list/.list={#1},           lambda string         }%       },       lambda list/.code={\pgfkeys{/drs/lambda/.append={$\lambda$#1.}}},       lambda string/.code=\def\draw@drs@lambda{\pgfkeysvalueof{/drs/lambda}},       %       % presupposition       %       presupposition/.code={%         \pgfkeys{/drs/.cd,           presupposition list/.list={#1},           presupposition string         }%       },       presupposition list/.code={\pgfkeys{/drs/presupposition/.append={#1}}},       presupposition string/.code={\def\draw@drs@presupposition{\pgfkeysvalueof{/drs/presupposition}}},     }          \newcommand{\drs}[2][]{%       \begingroup%         \def\mymacroempty{}%              % DRS building blocks         \def\draw@drs@presupposition{}%         \def\draw@drs@lambda{}%              \pgfkeys{/drs/.cd,           presupposition/.initial={},           lambda/.initial={},           #1         }%              [ presupposition: \draw@drs@presupposition ]%       \endgroup%     }     \makeatother          \begin{document}            \drs[presupposition={\drs[presupposition={m}]{}}]{%         Foo%       }          \end{document}      This works as expected and prints out               [ presupposition: [ presupposition: m]]      Adding a lambda option to the nested `\drs` call                 \drs[presupposition={\drs[lambda=x,presupposition={m}]{}}]{%         Foo%       }      produces                 [ presupposition: [ presupposition: ]]      The nested presupposition gets gobbled. This has to do with, again, the time of expansion I guess, but have no idea how to fix it. :-)


title: Derivative in two point

text: I need to write a derivative formula with two variables after the "pipe" symbol. I have used the following               \begin{equation} \left. \frac{df}{dx} \right|\ ^{x=0}{_{u=0}}\end{equation}      but it doesnt align the x and u after the pipe. Someone knows how to solve that? Thanks


title: Changing the size of the braces from the cases environment

text: I have created the following picture using the `cases` environment. For this picture I have _two_ questions. ![enter image description here](http://i.stack.imgur.com/INUMC.png) 1) I would like to limit the size of the braces created by the cases environment to approximately the red lines. To be precise, I want the two formulas to fall within the braces, but not the under/over braces and their texts. 2) the over- and underbraces with the text `user definition` seem to add spacing between the symbol `\diamond` and the formula. How can I remove/prevent this whitespace, such that the spacing is equal between all parts of the formula? The code to generate the picture is:               \documentclass{article}     \usepackage{amsmath}          \begin{document}     \begin{figure}     \centering     \[     \text{description}     \begin{cases}     \overbrace{@_{\mu_{1}}(\phi_{1}) \diamond {\overbrace{@_{\mu_{1}}(\phi_{1})}^\text{user definition}} \diamond @_{\mu_{1}}(\phi_{1}) \diamond @_{\mu_{1}}(\phi_{1})}^\text{positive} \\     \underbrace{@_{\mu_{1}}(\phi_{1}) \diamond @_{\mu_{1}}(\phi_{1}) \diamond {\underbrace{@_{\mu_{1}}(\phi_{1})}_\text{user definition}} \diamond @_{\mu_{1}}(\phi_{1})}_\text{negative}     \end{cases}     \]     \end{figure}     \end{document}


title: DTX file generates empty file

text: I recently gave the documentation of my `chscite` package a facelift for inclusion in CTAN, and was assuming that doing so wouldn't break anything. Unfortunately, I just discovered that the package doesn't work because the `.bst` file isn't being generated properly, and I can't for the life of me figure out why. I know that this changeset breaks it, but I can't figure out why. The full DTX file is available on CTAN. What could be wrong?


title: Zero length bond in chemfig?

text: ![enter image description here](http://i.stack.imgur.com/3Hftm.png) As you can clearly see in the high quality diagram above, I'm looking for a way to get the nitrogen and hydrogen bonded like that in chemfig.


title: LaTeX template crashes when including package

text: I have downloaded a LaTeX template I need to use for a conference submission, which is found **here**. I presume that the template is well written and compatible with _any_ extra package I want to use. However, I figured out that it crashes somehow with the `colortbl` package, just adding `\usepackage{colortbl}` in the `EGauthorGuidelines- body_with_teaser.inc` file (included in the template I linked above). I am getting the following error: > ! Missing # inserted in alignment preamble. > > to be read again> > > \cr > > l.44 > > There should be exactly one # between &'s, when an \halign or \valign is > being set up. In this case you had none, so I've put one in; maybe that will > work. Despite this, the final PDF is well generated. However, it is annoying not to know what is exactly going on (plus constantly seeing the red warning sentence everything I compile). Does anybody know how can I fix this? Is the error due to an error in the template files? Or in the actual package? * * * **EDIT:** As the comment below days, looks like the trouble is with the redefinition of `tabular` inside the class I use. Thus, I update the question. Is there any alternative to `colortbl` to colorize a table cell?


title: Find node above and under

text: Using a `post_linebreak_filter` callback, is it possible to access the nodes positioned above and under a given node?


title: How to align footnotes

text: I'm using XeLaTeX with the `dblfnote` package for two columns of footnotes and a modified footnote command to use letters instead of numbers. Currently my footnotes seem to be in a paragraph format, but I want them all aligned where the first line of text starts (aligned with text, not with the footnote marker). This is what it does currently: ![Current footnote alignment](http://i.stack.imgur.com/BlrYh.png) I'd like it to behave like this, with the same indent it currently has inititally:               a Sed at urna vitae libero pulvinar aliquam. In hac        habitasse platea dictumst.     b Curabitur luctus leo in nunc tempus, eu fringilla quam        porttitor.     c Vivamus semper rhoncus nisl, vitae tempus tellus tris-       tique vel.      Here is a MWE:               % !TEX TS-program = xelatex     \documentclass[11pt]{article}          \usepackage{fontspec}     \usepackage{libertine}     \usepackage[margin=1.25in]{geometry}     \usepackage{dblfnote}          \newcommand{\cv}[2]{\textsuperscript{#1:#2}}          \makeatletter     \def\@makefnmark{\hbox{\@textsuperscript{\itshape\@thefnmark}}}     \renewcommand{\thefootnote}{\alph{footnote}}     \makeatother          \begin{document}          \begin{center}     {\huge Title}     \end{center}          Lorem ipsum dolor sit amet, consectetur adipiscing elit.\footnote{Sed at urna vitae libero pulvinar aliquam. In hac habitasse platea dictumst.} Integer a eros quis nibh pharetra pellentesque. Mauris molestie purus ut arcu ullamcorper, ut mollis ligula molestie. Ut auctor et augue ac ultrices.\footnote{Curabitur luctus leo in nunc tempus, eu fringilla quam porttitor.} Nulla aliquam quis nunc et aliquet. Nullam eu ligula at leo scelerisque euismod.\footnote{Vivamus semper rhoncus nisl, vitae tempus tellus tristique vel.} Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin at eros at leo sagittis viverra.          \end{document}


title: A follow-up question to: A five level deep list

text: The solution to A five level deep list implemented an enumerated list that extended to 9 levels of nesting. However, references to nested labels do not list the extended nesting position. I have included an example below. Is this implementable? ![The difference between references to myEnumerate and enumerate labels.](http://i.stack.imgur.com/5hOGa.png)               \documentclass{article}     \usepackage{enumitem}     \setlistdepth{9}          \newlist{myEnumerate}{enumerate}{9}     \setlist[myEnumerate,1]{label=(\arabic*)}     \setlist[myEnumerate,2]{label=(\Roman*)}     \setlist[myEnumerate,3]{label=(\Alph*)}     \setlist[myEnumerate,4]{label=(\roman*)}     \setlist[myEnumerate,5]{label=(\alph*)}     \setlist[myEnumerate,6]{label=(\arabic*)}     \setlist[myEnumerate,7]{label=(\Roman*)}     \setlist[myEnumerate,8]{label=(\Alph*)}     \setlist[myEnumerate,9]{label=(\roman*)}          \begin{document}     \begin{myEnumerate}     \item 1st level         \begin{myEnumerate}         \item 2nd level             \begin{myEnumerate}             \item 3rd level                 \begin{myEnumerate}                 \item 4th level                     \begin{myEnumerate}                     \item 5th level                         \begin{myEnumerate}                         \item 6th level                             \begin{myEnumerate}                             \item 7th level                                 \begin{myEnumerate}                                 \item 8th level                                     \begin{myEnumerate}                                         \item \label{9th level}9th level                                     \end{myEnumerate}                                 \end{myEnumerate}                             \end{myEnumerate}                         \end{myEnumerate}                     \end{myEnumerate}                 \end{myEnumerate}             \end{myEnumerate}         \end{myEnumerate}     \end{myEnumerate}     9th level is nested at position \ref{9th level}.          \begin{enumerate}     \item Level 1         \begin{enumerate}         \item Level 2             \begin{enumerate}             \item Level 3                 \begin{enumerate}                 \item\label{level 4} Level 4                 \end{enumerate}             \end{enumerate}         \end{enumerate}     \end{enumerate}     Level 4 is nested at \ref{level 4}.          \end{document}


title: Equivalent of Latable for matrix/vectors generation

text: Does anyone know an equivalent for Latable (which is used to generate latex code for tables) but to do the same thing with matrices and arrays ?


title: Drawing an arrow around an automata

text: Using Tikzpicture, I have the following automata:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \usetikzlibrary{positioning,arrows,automata}     \begin{center}     \begin{tikzpicture}[>=stealth',shorten >=1pt,node distance=2cm,on grid,initial/.style={}]     \node[state,initial]  (a0)                   {};     \node[state]          (a1)  [right =of a0]   {};     \node[state]          (a2)  [right =of a1]   {};     \node[state]          (a3)  [above =of a2]   {};     \node[state]          (a4)  [below =of a0]   {};     \node[state]          (a6)  [right =of a4]   {};     \node[state]          (a7)  [right =of a2]   {};        \node[state]          (a8)  [right =of a7]   {};     \node[state]          (a9)  [right =of a8]   {};      \node[state]          (a5)  [above =of a9]   {};     \node[state]          (b0)  [right =of a6]   {};      \node[state]          (b1)  [right =of b0]   {};     \node[state]          (b2)  [right =of b1]   {};      \node[state]          (b3)  [right =of b2]   {};     \node[state]          (b4)  [right =of a9]   {};                                     \tikzset{every node/.style={fill=white}}     \tikzset{mystyle/.style={->,double=red}}       \path (a4)     edge [mystyle]       node   {$0$} (a6)           (a2)     edge [mystyle]       node   {$0$} (a7)           (b0)     edge [mystyle]       node   {$0$} (b1);     \tikzset{mystyle/.style={->,double=blue}}       \path (a3)     edge [mystyle]       node   {$1$} (a5)           (a8)     edge [mystyle]       node   {$1$} (a9)           (b2)     edge [mystyle]       node   {$1$} (b3);                   \tikzset{mystyle/.style={->,double=yellow}}       \path (a0)     edge [mystyle]       node   {$\varepsilon$} (a1)           (a1)     edge [mystyle]       node   {$\varepsilon$} (a2)           (a1)     edge [mystyle]       node   {$\varepsilon$} (a3)           (a1)     edge [mystyle]       node   {$\varepsilon$} (a4)           (a6)     edge [mystyle]       node   {$\varepsilon$} (b0)           (a7)     edge [mystyle]       node   {$\varepsilon$} (a8)           (b1)     edge [mystyle]       node   {$\varepsilon$} (b2)           (a9)     edge [mystyle]       node   {$\varepsilon$} (b4)           (a5)     edge [mystyle]       node   {$\varepsilon$} (b4)           (b3)     edge [mystyle]       node   {$\varepsilon$} (b4);     \end{tikzpicture}     \end{center}     \end{document}      ![Result](http://i.stack.imgur.com/L5Apl.png) Now, I want to add a yellow epsilon arrow from the node on the far left (a0) to the node on the far right (b4). However, I have absolutely no idea how to do this without the arrow cutting through the rest of the automata. Can I get some help here?


title: How can I automatically center all floats including subfloats?

text: This is a follow up to here. I am using this in my preamble:               \makeatletter   % inserts a "\centering" to every floatbox.     \g@addto@macro\@floatboxreset\centering     \makeatother      I am having two question for the use of this:   * How can I implement the same thing for subfigures, too? It works fine for all floats, but not for minipages or subfigures (from `subcaption`, which are minipages as well).   * How can I switch of this behavior locally?  Here is some code for playing around:               % arara: pdflatex     % arara: pdflatex          \documentclass{article}     \usepackage[demo]{graphicx}          \makeatletter     \g@addto@macro\@floatboxreset\centering     \makeatother          \begin{document}     \begin{figure}%         \begin{minipage}[b]{.48\linewidth}             \centering             \includegraphics[width=.5\linewidth]{qwertz}         \end{minipage}         \hfill         \begin{minipage}[b]{.48\linewidth}             %\centering             \includegraphics[width=.5\linewidth]{qwerty}         \end{minipage}         \caption{Caption}%         \label{fig:label}      \end{figure}%     \end{document}


I want to draw a rectangle with a solid dot in each corner. How can I do this?


title: Difference between pdf code produced by \href and \url

text: I am trying to use `\href` to link local video files to my LaTeX document. The problem is that while the `\url` command works fine, the `\href` command (used with "run:") does not. **Case 1:** The files do not have any extension In this case, `\url` works just file without any problem. But `\href` complains about no application found for opening file of mimetype application/octet-stream. **Case 2:** The file have the proper extension. Again, `\url` works just file without any problem. This time the `\href` opens the proper application, but the applications almost always hangs. So, the problem is either with the PDF Viewer (Okular) or LaTeX. Can anyone shed light on what is exactly going on here? **EDIT** : The problems seems to be with Okular as such. The Evince document reader does not present any such problems even without file extensions. (However, without file extension, it uses the mimeinfo.cache and hence uses mplayer instead of VLC player as is there in my KDE enviornment.) So, I guess this is a bug in Okular. I would like to report it there. I would like to get an idea on what should I tell them. So, my question is what is the difference between the code produced in PDF for `\href` and `\url`? **EDIT** : Minimum Working Example               \documentclass[a4paper,10pt]{article}     \usepackage[utf8x]{inputenc}     \usepackage{hyperref}     \title{Whatever}     \author{Jayesh Badwaik}          \begin{document}          \maketitle          \href{run:raw/e68.ogv}     {A Crash Course on Contour Integration Part One}          \href{run:raw/5b}     {A Crash Course on Contour Integration Part Two}          \url{raw/e68.ogv}     \url{raw/5b}          \end{document}


title: Retrieve the color definition in HTML

text: I need to build a table of this type: > STUFF | COLOR | PICTURE | COLOR DEFINITION To retrieve the color definition, I tried to use `\extractcolorspecs` expecting that the third argument `{ color-cmd }` would allowed me to print what I needed. The problem is that I defined colors in HTML, while the command gives me RGB format in output. Here is a MWE:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage{tikz}     \usepackage{booktabs}     \usepackage{xcolor}          \definecolor{mapblue}{HTML}{0000FF}%     \definecolor{maproyalblue}{HTML}{0088FF}%     \definecolor{mapskyblue}{HTML}{00CCFF}%     \definecolor{mapgreen}{HTML}{00CC00}%     \definecolor{mapdandelion}{HTML}{FFCC00}%     \definecolor{maporange}{HTML}{FF8800}%     \definecolor{mapred}{HTML}{FF0000}%          \newcommand{\colpic}[1]{\tikz \draw[#1,fill=#1,draw](0,0)circle(0.1cm);}     \newcommand{\colrow}[1]{#1 & \colpic{#1} & \extractcolorspecs{#1}{\model}{\mycolor}\mycolor}          \begin{document}          \begin{tabular}{cccc}     \toprule     \multicolumn{1}{c|}{\textsc{Relevance Interval}} &     \multicolumn{1}{c|}{\textsc{Color}} &      \multicolumn{1}{c|}{\textsc{Picture}} &      \multicolumn{1}{c}{\textsc{ Color Definition}}\\     \midrule      0 - 5 & \colrow{mapblue}\\     5 - 10 & \colrow{maproyalblue}\\     10 - 25 & \colrow{mapskyblue}\\     25 - 50 & \colrow{mapgreen}\\     50 - 100 & \colrow{mapdandelion}\\     100 - 200 & \colrow{maporange}\\     >200 & \colrow{mapred}\\     \bottomrule     \end{tabular}          \end{document}      and this is the output: ![enter image description here](http://i.stack.imgur.com/kcRoE.jpg) How is it possible to obtain the color definition in HTML?


title: What are penalties and which ones are defined?

text: Very often you can find solutions by changing the penalty. One is `widowpenalty`. However what are penalties and is there a small list of every defined penalty. There is a German site which does exactly this.


title: German-style quotation marks too close to italics letters and mathpazo font package

text: When I type an text in italic with the Palladio font the German quotation marks are (far) too close to the letters. The problem does not occur with English quotation marks. Is there any solution or work-around for that? I like the font but this would keep me from using it.               \documentclass[11pt]{article}          \usepackage[sc]{mathpazo}     \usepackage[ngerman]{babel}          \begin{document}          \textit{"`clever"' (or \glqq clever\grqq) compared to ``clever''}          \end{document}


title: suppress page numbers in document's front matter

text: I have a problem and I want that someone tell me how I can resolve that. I want that the number of page in my report start in the page of introduction but in reality it starts in the didecas and liste of contents. I want that these pages have not number. This is my code               \documentclass[12pt,a4paper]{report}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[french]{babel}     \usepackage{color}     \usepackage{xcolor} %les couleurs     \definecolor{myblue}{rgb}{0.2,0.4,1}     \usepackage{layout}     \usepackage[top=2 cm, bottom=2 cm, left=2 cm, right=2 cm]{geometry}     \usepackage{setspace}     \usepackage[pdftex]{graphicx}     \usepackage{array}     %\documentclass[landscape]{scrartcl}     \usepackage{geometry}     \usepackage{multirow}          \usepackage[justification=centering]{caption}          \usepackage{pgfplots}               \usepackage{fancyhdr}     \fancyhf{} % clear all header and footers               \begin{document}     \pagestyle{empty}     \include{title-content}     \color{black}     \doublespacing     \include{dedicaces-content}     %\include{remerciement}               \tableofcontents          \listoffigures     \listoftables                         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \pagestyle{plain}      \pagenumbering{arabic}     \chapter{Introduction générale}


title: Editor name instead of author name in BibLaTeX key - Zotero export problem

text: I am using Zotero v4.0.15 for exporting references into the BibLaTeX format. I defined citeKeyFormat in `BibLaTeX.js` as following: `var citeKeyFormat = "%a%y";` However, inbook entries get usually the book's first editor name as part of the key assigned. > >     @inbook{zedeck2011, >     title = {Proactive work behavior: Forward-thinking and change-oriented > action in organizations.}, >      pages = {567-598}, >      booktitle = {{APA} handbook of industrial and organizational > psychology, Vol 2: Selecting and developing members for the organization}, >      publisher = {American Psychological Association}, >      author = {Bindl, Uta K. and Parker, Sharon K.}, >      editor = {Zedeck, Sheldon}, >      date = {2011}   >     } >   Instead of _zedeck2011_ the correct key should be _bindl2011_. Am I doing something wrong? Is this a bug in Zotero? Is there a work around?


title: Scale/Resize a single letter in mathmode with its subscript/superscript unchanged

text: Is there a way to do this? Currently I am using something like the following to do the job on scaling of a single letter in an equation:               \[     \int_{\Omega} (u - \text{\Large $\Pi_{\Omega}$} u) v \, dx = 0     \]      or               \[     \int_{\Omega} (u - \text{\scalebox{1.5}{$\Pi_{\Omega}$}} u) v \, dx = 0     \]      and as you can see, the `\Omega` in the subscript of `\Pi` is obviously bigger than the `\Omega` as the domain of the integral sign: ![the comparison of Omega](http://i.stack.imgur.com/BRp0B.png) I am curious if there is a way to manually adjust the size of the sub/sup- script of this resized letter? I tried using `\scriptsize` and `\scriptstyle`, both seem not working in `mathmode`? or is there another solution for the rescaling/resizing other than exploiting `\text{}` or `\scalebox{}[]{}`. Thanks in advance!


title: Emacs + Skim + Live Preview?

text: I have been using Latexian for a while, but some of its limitations and my natural tendency to use emacs, is prompting me to take a look at my work environment again (OSX 10.9.2). I have seen some guides for setting up Skim with Aquamacs and highlight current line in the editor. Which is great. However, is it possible to set this up so that Skim shows a live preview of the PDF? The way one can with Flashmode + TeXShop, or with Latexian?


title: Smalltalk syntax highlighting for Latex

text: What is the easiest way to format Smalltalk syntax using the listings package?


title: dcolumn won't align negative numbers and positive numbers

text: I am using R to analyze data and have used the xtable package within R to produce a TeX output for a correlation matrix. I have also implemented the dcolumn package within TeX so that I would be able to align my data by decimal points. My data have both positive and negative numbers. It seems the output produced is aligned somewhat correctly. The positive numbers are aligned by the decimal point to other positive numbers and negative numbers are also aligned to other negative numbers. I believe the issue is related to the inclusion of an additional non-numerical character (the negative sign) for the negative numbers such that the string is bigger than that of positive numbers. Can anyone help me correct this issue? My code follows:               % latex table generated in R 2.14.1 by xtable 1.7-0 package     % Tue Mar 20 13:44:16 2012     \documentclass{article}     \usepackage{dcolumn}     \newcolumntype{d}{D{.}{.}{2.2}}     \newcolumntype{s}{D{.}{.}{1.2}}     \usepackage{color}     \usepackage{underscore}     \usepackage{rotating}     \usepackage{caption}     \usepackage{dcolumn}     \usepackage{siunitx}     \begin{document}     \begin{sidewaystable}[ht]     \caption*{Correlation Matrix}     \begin{center}     \scalebox{0.4}{     \begin{tabular}{|rr*{39}{d}|}        \hline        &     &   1   &   2   &   3   &   4   &   5   &   6   &   7   &   8   &   9   &   10       &   11   &   12   &   13   &   14   &   15   &   16   &  17   &   18   &   19   &   20   &       21   &   22   &   23   &   24   &   25   &   26   &   27   &   28   &   29   &   30   &       31   &   32   &   33   &   34   &   35   &   36   &   37   &   38   &   39   \\ \hline               \multicolumn{1}{|r|}{1}   &  \multicolumn{1}{r|}{ APCcom }  &   \   &  \multicolumn{1}    {c}{ \textcolor{red}{ 0.01 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.09 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.10 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c|}{ \textcolor{black}{ 1.00 } }  \\            \multicolumn{1}{|r|}{2}   &  \multicolumn{1}{r|}{ APCemp }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.33 } }  &   \   &  \multicolumn{1}{c}{ \textcolor{red}{ 0.01 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.18 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.73 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.01 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.14 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c|}{ \textcolor{black}{ 1.00 } }  \\            \multicolumn{1}{|r|}{3}   &  \multicolumn{1}{r|}{ APCrule }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.20 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.33 } }  &   \   &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.81 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.23 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c|}{ \textcolor{black}{ 1.00 } }  \\            \multicolumn{1}{|r|}{4}   &  \multicolumn{1}{r|}{ ATFtot }  &  \multicolumn{1}{c}{ \textcolor{black}{ -0.03 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.27 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.17 } }  &   \   &  \multicolumn{1}{c}{ \textcolor{red}{ 0.01 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.01 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.40 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.40 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.01 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.09 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c|}{ \textcolor{black}{ 1.00 } }  \\            \multicolumn{1}{|r|}{5}   &  \multicolumn{1}{r|}{ flstot }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.37 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.24 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.02 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ -0.32 } }  &   \   &  \multicolumn{1}{c}{ \textcolor{black}{ 0.10 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.10 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.08 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.05 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 0.21 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.02 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{red}{ 0.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c}{ \textcolor{black}{ 1.00 } }  &  \multicolumn{1}{c|}{ \textcolor{black}{ 1.00 } }  \\            % ... table shortened for space considerations     \hline     \end{tabular}     }     \caption*{r-values below the diagonal, p-values above, \\     significant r-values and p-values appear in \textcolor{red}{red}}     \label{Matrix}     \end{center}     \end{sidewaystable}     \end{document}


title: You can't use `\eqno' in math mode

text: Pls help me! I got some error message in TeXniCenter about this equation. I tried to look for errors in parentheses, but could not find.               \begin{equation}     P=\frac{\hat{U}\hat{I}}{2T}\int\limits^{T}_{0} \cos \left(\varphi \right)-\cos \left(2\omega {t}-\varphi \rigth)\,{dt}=\frac{\hat{U}\hat{I}}{2T} \left[{T\cos\left(\varphi\right)-\frac{\sin \left(2\omega {t}-\varphi \rigth)}{2\omega}}\right]^{T}_{0}     \end{equation}      This is the result after the errors: ![result](http://i.imgur.com/ExRVg.png) 5 errors:               ! Undefined control sequence.     l.223 ...ht)-\cos \left(2\omega {t}-\varphi \rigth                                                       )\,{dt}=\frac{\hat{U}\hat{...     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     <argument> \sin \left (2\omega {t}-\varphi \rigth                                                        )     l.223 ...eft(2\omega {t}-\varphi \rigth)}{2\omega}                                                       }\right]^{T}_{0}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Missing \right. inserted.     <inserted text>                      \right .     l.223 ...eft(2\omega {t}-\varphi \rigth)}{2\omega}                                                       }\right]^{T}_{0}     I've inserted something that you may have forgotten.     (See the <inserted text> above.)     With luck, this will get me unwedged. But if you     really didn't forget anything, try typing `2' now; then     my insertion and my current dilemma will both disappear.          ! You can't use `\eqno' in math mode.     \endmathdisplay@a ...\df@tag \@empty \else \veqno                                                        \alt@tag \df@tag \fi \ifx ...     l.224 \end{equation}          Sorry, but I'm not programmed to handle this case;     I'll just pretend that you didn't ask for it.     If you're in the wrong mode, you might be able to     return to the right one by typing `I}' or `I$' or `I\par'.          ! Missing \right. inserted.     <inserted text>                      \right .     l.224 \end{equation}          I've inserted something that you may have forgotten.     (See the <inserted text> above.)     With luck, this will get me unwedged. But if you     really didn't forget anything, try typing `2' now; then     my insertion and my current dilemma will both disappear.


title: Cell shading without removing lines

text: I was wondering if there is any way to shade some cells in table without removing lines. I starged with this command               \cellcolor[gray]{0.9}      however upper line of the cell disapeard. Is there any better way to color some cells ?? PS I use longtable Here is the code                   \documentclass[a4paper,12pt]{mwrep}     \usepackage[MeX]{polski}     \usepackage[cp1250]{inputenc}     \usepackage[left=3.0cm,right=3cm,top=3.0cm,bottom=3.0cm]{geometry}     \usepackage{amsmath,amssymb}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage{algorithmic}     \usepackage{colortbl}     \usepackage{dcolumn}     \usepackage{float}     \usepackage{tabularx}     \usepackage{longtable}     \usepackage[centerlast]{caption}     \usepackage{multirow}     \usepackage[section] {placeins}     \usepackage{booktabs}     \usepackage{xcolor}     \linespread{1.3}     \begin{document}     \begin{longtable}{!{\vrule width 2pt}c!{\vrule width 2pt}c!{\vrule width 2pt}c|c|c!{\vrule width 2pt}c|c|c!{\vrule width 2pt}c!{\vrule width 2pt}c!{\vrule width 2pt}}     \caption{Zależność wydajności algorytmu od jego parametrów.}     \label{tab:parameters}     \\ \hline     \multirow{2}{*}{Parametr} & \multirow{2}{*}{Wartość} & \multicolumn{3}{|c!{\vrule width 2pt}}{\textbf{Czas[s]}}  & \multicolumn{3}{|c!{\vrule width 2pt}}{$\rho_{a}$} \\ \cline{3-10}     & & Zestaw 1 & Zestaw 2  & Zestaw 3  & Zestaw 1  & Zestaw 2  & Zestaw 3 \\ \hline     \multirow{4}{*}{$\rho_{select}$} &  0.5 &   58.0    &   266.4   &   131.4   &   0.98    &   0.8 &   0.95        \\ \cline{2-10}         & 0.6   &   55.0    &   270.1   &   145.6   &   0.95    &   0.85    &   0.85        \\ \cline{2-10}         & \cellcolor[gray]{0.9} 0.7 &   55.3    &   256.6   &   143.1   &   0.99    &   0.75    &   0.90        \\ \cline{2-10}         & 0.8   &   72.0    &   347.2   &   156.9   &   1.00    &   0.87    &   0.97        \\ \hline     \end{longtable}     \end{document}


title: What kind of "magic" does preview package do to produce a tight paper size?

text: Actually the following method, that looks like reinventing the wheel, has been discarded once I have known the existence of `preview` package.               % WithoutPreview.tex     \documentclass{article}     \usepackage{pstricks}          \newcommand\All{0.1}     \newcommand\Left{-\All}     \newcommand\Right{\All}     \newcommand\Bottom{-\All}     \newcommand\Top{\All}               %%%%%%%%%%%% BEGIN SETTINGS %%%%%%%%%%%%     \headheight=0pt     \headsep=0pt     \parindent=0pt     \topskip=0pt          \topmargin=-72.27pt     \oddsidemargin=-72.27pt     \paperwidth=\dimexpr\Right\psxunit-\Left\psxunit\relax     \paperheight=\dimexpr\Top\psyunit-\Bottom\psyunit\relax          \special{papersize=\the\paperwidth,\the\paperheight}     \pagestyle{empty}     %%%%%%%%%%%%% END SETTINGS %%%%%%%%%$%%%                    \begin{document}     \begin{pspicture}(\Left,\Bottom)(\Right,\Top)     \psframe[linewidth=0.01](\Left,\Bottom)(\Right,\Top)     \end{pspicture}     \end{document}      The idea in `WithoutPreview.tex` is to produce a single output with a tight paper size. Using the following batch file,               rem batch.bat takes an input file name WITHOUT extension.     latex %1     dvips -D10000 -t unknown %1     gswin32c -r10000 -dAutoRotatePages=/None -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%1.pdf %1.ps      I get the following output that is not tight enough. ![enter image description here](http://i.stack.imgur.com/d9hmG.png) > Note: There are random white spaces at the edges. Their exact position > cannot be predicted. They are sometimes on the left and top edges, sometimes > on the left and bottom edges, etc. They depend on the specified settings. Once I have known the existence of `preview` package and played with it, I discarded the method I used in `WithoutPreview.tex`. The following code use `preview` package,               % WithPreview.tex     \documentclass{article}     \usepackage{pstricks}          \newcommand\All{0.1}     \newcommand\Left{-\All}     \newcommand\Right{\All}     \newcommand\Bottom{-\All}     \newcommand\Top{\All}          %%%%%%%%%%%% BEGIN SETTINGS %%%%%%%%%%%%     \usepackage[active,tightpage]{preview}     \PreviewBorder=0pt     \PreviewEnvironment{pspicture}     %%%%%%%%%%%%% END SETTINGS %%%%%%%%%$%%%          \begin{document}     \begin{pspicture}(\Left,\Bottom)(\Right,\Top)     \psframe[linewidth=0.01](\Left,\Bottom)(\Right,\Top)     \end{pspicture}     \end{document}      and when compiled with the same batch file, `batch.bat`, it produces a tight output as follows. ![enter image description here](http://i.stack.imgur.com/oVinA.png) > Note: The random white spaces have gone! The bad news came yesterday as I cannot use `preview` package together with PSTricks related packages and `animate` package. ## Questions Does `preview` invoke `pdfcrop` behind the scene? If `preview` does not invoke `pdfcrop`, what kind of magic does it do to produce a tight paper size? I am interested in extracting the fragment codes, that is used in `preview` to produce a tight paper size, and insert them into my `WithoutPreview.tex`. Note: `xelatex` can give better output than `latex-dvips-ps2pdf` does, but `xelatex` runs too slowly. Another note: `preview` package ignores `\pagecolor{<non-white color>}` declared in the preamble. However, it is not a big issue as the non-white background can be obtained by a PSTricks' `psframe*[linecolor=<non- white>](...,...)(...,...)`.


title: Letter class alternatives with support for figures, tables, and labels

text: I'm increasingly fed up with the arbitrary restrictions that the standard LaTeX letter class has. Today I discovered that the table environment is not defined in the standard letter class, which means one can't use labels or captions. CTAN has a list of letter related packages. Can anyone suggest a good LaTeX letter class to work with for general use? I'd like something as flexible and with as few restrictions as possible, well maintained, not excessively complicated to use, and not buggy. I was earlier recommended `newlfm` (on comp.text.tex). That post was about the fact that the letter class does not allow the addition of a subject. A similar question has been asked already, "A clean letter class for office use, including serial letters", where `scrlttr2` is recommended.


title: Hyperref within hyperref

text: I'm using the `hyperref` package in LaTeX. In the compiled PDF, in the table of contents (TOC), I correctly get all the links to the corresponding chapters and sections. There is only one chapter which I typed as               \chapter{Proof of Theorem \ref{thm:myTHM}}      that does not produce a working link. The problem is that also the reference to the Theorem (thm:myTHM) produces a link. In the TOC only the link to the theorem is working when I click on the number produce by `\ref{thm:myTHM}`. Is there a way to produce a working link to the chapter even if I have a `\ref{}` in the chapter title? It would be nice to have both links working, i.e. If I click e.g. on "Proof of Theorem " I should jump to the chapter and if I click on the number produced by `\ref{thm:myTHM}` I should jump to the theorem from the TOC.


title: Cross reference in section title broken in header

text: I've tried searching and can't find this anywhere, but sorry if it's been asked before. I'm using the `memoir` class to write a thesis using LaTeX (which I'm fairly new to) and I've got a section in my appendix with some solutions to an equation, so I've titled the section using               \section{Solutions to equation in section~\ref{sec:xxxxx}}      This displays as it should at the start of the section, so the cross-reference isn't broken, but in the header at the top of odd pages the reference doesn't work; it prints as > A.2. SOLUTIONS TO EQUATION IN SECTION ?? I can't find any way to fix this, short of manually changing it using `%\sectionmark{}` or removing the cross-reference. Can anyone give me some suggestions? Edit: It turns out the `hyperref` package is causing the problems (if I disable that package it works). I need hyperlinks to external websites in the document so I can't disable the `hyperref` package. I'm looking for solutions online but I'd appreciate any help in the meantime. EDIT BY LOCKSTEP: Here's a MWE showing the problem. Note that the problem is not related to the `memoir` class -- it also shows up with `article` (if one uses `\pagestyle{headings}`).               \documentclass{memoir}          \usepackage{hyperref}          \begin{document}          \section{foo}\label{sec:foo}          \cleardoublepage          \section{Solutions to equation in section~\ref{sec:foo}}          \end{document}


title: Long codes using listing or mcode which do not break into 2 pages

text: I'm using the mcode package for including my codes into my documents, but the problem is that when my codes are too long, and they need more than one page the program tries to keep them in one page, ergo the last lines of the codes are missing and it does not break into 2 pages. I read the documentation but I couldn't find the answer and I have the same problem with listings package too. I reviewed some question about minted but they weren't helpful in this case for me.                 \documentclass{book}          \usepackage{graphicx}      \usepackage{amsmath,amssymb}      \usepackage{caption}     \usepackage{color,xecolor}     \usepackage[numbered,autolinebreaks,useliterate]{mcode}          \begin{document}          \begin{figure}     \caption{A very very long code is here}     \lstinputlisting{longcode.m}     \end{figure}          \end{document}      and here is the code which can be saved in a longcode.m file since I cannot attach anything here :(                   %% LTE_sim _main _launcher         % eNodeB Power transmission uniformly distributed     LTE_config.switch_off_eNodeBs = 5;     LTE_config.eNodeB_arrangment = 0;   % Hexagonal Ring     LTE_config.UE_walkingModel = 0;     % Mobility model                  %% LTE_load _params     LTE_config.TTI_length = 1e-3;       % SubFrame length         % Simulation duration     LTE_config.simulation_time_tti = 100000;        LTE_config.frequency = 2e9;         % Carrier Frequency     LTE_config.bandwidth = 10e6;        % Bandwidth     LTE_config.UE_speed = 30/3.6;       % UE speed (Km/H => m/s)       LTE_config.nr_UEs = 100;            % Number of UEs            % inter eNodeB distance (Cell radius=.5)     LTE_config.inter_eNodeB_distance = 2*sqrt (500^2+(500/4)^2);           % eNodeB Power transmission (43dbm)     LTE_config.eNodeB_tx_power = 19.9526;                 % Propagation Model     LTE_config.macroscopic_pathloss_model = 'cost231';                              LTE_config.macroscopic_pathloss_model _settings.environment = ...        'urban_macro';          %% LTE_init _load _BLER _curves     BLER_threshold = 0.1;              % Target BLER                                                       target_BLER = 0.1;                 % Target BLER                                                         %% Parameters that are ok     % simulator assume subcarrier spacing of 15 kHz     % Modulation Schemes is QPSK, 16QAM, and 64QAM          %% I am not sure :-s          % Symbols for TTI     LTE_config.cyclic_prefix   = 'normal';     switch LTE_config.cyclic_prefix         case 'normal'             LTE_config.N_sym = 14;         case 'extended'             LTE_config.N_sym = 6;         otherwise             error ('CP can only be "normal" or "extended"');     end     % CQI Measurement period     LTE_config.unquantized_CQI_feedback = fulse;         % UE class         unquantized_CQI _feedback = fulse;          %% I don't khnow          % Control Overhead     % Traffic Models     % CQI Method     % Frequency Reuse Scheme     % LTE_config.switch_off_eNodeBs = 5;     LTE_config.eNodeB_arrangment = 0;   % Hexagonal Ring     LTE_config.UE_walkingModel = 0;     % Mobility model                  %% LTE_load _params     LTE_config.TTI_length = 1e-3;       % SubFrame length         % Simulation duration     LTE_config.simulation_time_tti = 100000;        LTE_config.frequency = 2e9;         % Carrier Frequency     LTE_config.bandwidth = 10e6;        % Bandwidth     LTE_config.UE_speed = 30/3.6;       % UE speed (Km/H => m/s)       LTE_config.nr_UEs = 100;            % Number of UEs            % inter eNodeB distance (Cell radius=.5)     LTE_config.inter_eNodeB_distance = 2*sqrt (500^2+(500/4)^2);           % eNodeB Power transmission (43dbm)     LTE_config.eNodeB_tx_power = 19.9526;                 % Propagation Model     LTE_config.macroscopic_pathloss_model = 'cost231';                              LTE_config.macroscopic_pathloss_model _settings.environment = ...        'urban_macro';          %% LTE_init _load _BLER _curves     BLER_threshold = 0.1;              % Target BLER                                                       target_BLER = 0.1;                 % Target BLER                                                         %% Parameters that are ok     % simulator assume subcarrier spacing of 15 kHz     % Modulation Schemes is QPSK, 16QAM, and 64QAM          %% I am not sure :-s          % Symbols for TTI     LTE_config.cyclic_prefix   = 'normal';     switch LTE_config.cyclic_prefix         case 'normal'             LTE_config.N_sym = 14;         case 'extended'             LTE_config.N_sym = 6;         otherwise             error ('CP can only be "normal" or "extended"');     end     % CQI Measurement period     LTE_config.unquantized_CQI_feedback = fulse;         % UE class         unquantized_CQI _feedback = fulse;          %% I don't khnow          % Control Overhead     % Traffic Models     % CQI Method     % Frequency Reuse Scheme     %       And this is what happens to the page : ![enter image description here](http://i.stack.imgur.com/TLK68.jpg) So how can I break these codes into 2 pages?


title: Reproducing a spacious layout of verse annotation

text: LaTeX footnote and pagination routines by default allow long or multiple footnotes for a given page to spill-over to following page(s) of the text. But the interaction of the pagination and notes routines ensures that within a page or so the first note related to the text on the current page again appears at the head of the body of footnotes. How can I alter this behaviour to reproduce a format for lengthy (footnoted) annotations of verse that permits the spill-over of notes to the following page(s) but halts the flow of the main text until the current footnotes are exhausted? This eccentric layout can be seen here in a book now decades out of print. The layout relies on a fixed proportion between the text area and footnote area with a rule marking this division on every page. I have tried using the Geometry package to fix text height and I've read the 2011 TeXLive documentation for e.g. Poemscol and Ledmac packages, each of which caters for a variety of footnotes in a verse environment without finding a solution.


title: Adobe Acrobat's markup and annotate trough LaTeX?

text: Adobe Acrobat has the feature that enables the user to markup words or lines and to add an annotation to these markups. These features do not only exits in Acrobat. The markup looks like this: ![Adobe Acrobat markup](http://i.stack.imgur.com/Q3Zey.png) Is it possible to create with LaTeX/LuaLaTeX/XeLaTeX a pdf that already has these markups (or even the annotations)? To be honest I am not using annotation that much, but I use the marking of lines quite often and it is quite pedestrian to produce a pdf with LaTeX, to open it with Acrobat, to mark the relevant lines and then sadly to recognise an error, create the pdf again and have to markup again...


title: Wide float positioning in two-column document

text: I am writing a lab report formatted in two columns. It is set to two columns at the beginning by`\documentclass[a4paper,11pt,twocolumn]{article}`, rather than using the `multicols` package, because I use a lot of single column floats that `multicols` does not seem to support. Unfortunately, it seems that `twocolumns` does not support wide floats as well as `multicols` does. According to the wiki wide floats in this format are only allowed at the top of a page, or on a new page. There is a partial fix listed there to allow placement at the bottom of pages, although this didn't work for me. Neither does the built-in positioning work properly - asking for the float to be put at the top of the page seems to put it at the top of the NEXT page. Even if there are multiple wide floats, they all get put on the next page. So, my question is this: is there any way to make wide floats obey the `tbH` position commands like the single-width ones, without using `multicol`? Thanks


title: How to autorotate pdflscape landscape pages when n-upping

text: I'm using `pdflscape` for my landscape pages in an A5 portrait document. Then I use the following command line to prepare the PDF to be printed on A4 paper:               pdftk blank.pdf document.pdf output padded_document.pdf verbose && pdfnup --paper a4paper padded_document.pdf      The resulting `padded_document-nup.pdf`, however, has all the landscape pages still in landscape in what amounts to an A6 format, instead of having them rotated and in A5. Is there a way to automatically rotate them so they will appear in the intended size? I know I could replace `pdflscape` by `lscape` but I keep forgetting that and it'd be nice to have a solution that doesn't involve changing my document each time I want to print it. So either a clever trick in the PDF or something I can put in my command line.               \documentclass[a5paper]{article}     \usepackage{mwe}     \usepackage{pdflscape}     \begin{document}     \blindtext\blindtext     \begin{landscape}     \thispagestyle{empty}     \begin{figure}     \includegraphics[width=\linewidth]{example-image-a}     \caption{Landscape figure}     \end{figure}     \end{landscape}     \blindtext\blindtext          \blindtext\blindtext     \end{document}      Which as 4-up with page borders (not the desired 2-up without borders but you get the idea) looks like this: ![3 portrait, 1 landscape](http://i.stack.imgur.com/mWkO6.jpg) What it _should_ look like is this: ![4 portrait](http://i.stack.imgur.com/3x47h.jpg) I faked this last one by just using `lscape` instead of `pdflscape`.