title: Dates as xticklabels ; number formated dates provided

text: I would like to plot temporal data and have dates as tick labels. I have seen chapter _4.20 Symbolic Coordinates and User Transformations_ from pgfplots manual but it does not correspond to my situation because my dates are already formated as numbers. There is a remark to that effect > Remark: This section applies to users who want to have non-standard input > coordinates. If you have normal numbers which don't need to be transformed > and you like to have special symbols as tick labels, you should consider > using the xticklabels (yticklabels) key described on page 224. So I have read page 224 and following but I could not figure it out. I reckon something could be done with the `pgfplotstable` and `pgfcalendar` packages but once again I fail to find the relevant information. I ended up using a manual solution which require adjustment whenever the data change and even needed a `scaled ticks=false` to prevent some overlapping in some specific cases. How could I have done this _cleanly_ ? Here is an exemple derived from my current code :               \documentclass{article}     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \begin{document}          \begin{tikzpicture}     \pgfplotstableread{     7.3124563e+005 4     7.3139367e+005 3     7.3165463e+005 2     7.3233467e+005 1     7.3262672e+005 6     7.3279571e+005 5     7.3320909e+005 4     7.3338963e+005 3     7.3385267e+005 2     7.3465509e+005 6     }\mytable            \begin{axis}[%         xtick={730852, 731582, 732313, 733043, 733774, 734504},%ugliness here         xticklabels={2001, 2003, 2005, 2007, 2009, 2011},%and there         xlabel={Date},         ylabel={Data},         scale only axis,         width=8cm,         height=5cm,         axis on top,         scaled ticks=false]%and here again!              \addplot table[x index=0,y index=1]{\mytable};            \end{axis}     \end{tikzpicture}          \end{document}      > The time format I use comes from MATLAB `datenum` and `datestr` function > which is similar to what is used by the `pgfcalendar` package except that a > shift in range is needed. Namely, one unit is one day, fractional part gives > the time. 1-Jan-0000 is coded by 0.0 and 7.3188e+005 correspond to > 24-Oct-2003 12:45:07.


title: Draw a path between many nodes using foreach

text: I'm running into a weird problem here... I have very many nodes defined, and I would like to draw a path from the first to the last using foreach. But, when I try, it just draws edges between `p1` and all of the remaining nodes. What gives?               \begin{tikzpicture}[scale=.5]         \foreach [count=\x] \pt in {(0,5), (0,2), (2,2), (2,0), (6,0), (6,2), (8, 2), (8,6), (6,6), (6,8), (3,8)}             \node[black, circle, draw] (p\x) at \pt {};              \draw (p1)             \foreach \x in {2,...,11} {                 --(p\x)             };     \end{tikzpicture}      Produces: ![](https://dl.dropbox.com/u/2077177/Jing/2012-10-03_0708.png) Instead of: ![](https://dl.dropbox.com/u/2077177/Jing/2012-10-03_0711.png)


title: Possible to have a shell script containing the whole LaTeX document?

text: I've seen some examples where shell scripts are incorporated into LaTeX documents. However, I haven't seen any example of an entire LaTeX document being incorporated into a shell script. Does anyone have an example of what this would look like? [Not just a reference to the LaTeX file, but actually include the entire document into the script -- from the opening class to the document end.] I was thinking about having the shell script contain the command line to build the LaTeX document, followed by the entire LaTeX document (incorporated directly into the script), and then a sleep command wile the document builds, and then a latexmk -c command at the end.


title: Prevent words such as 'the' from appearing at the end of the line

text: I write my document in Latex for Mac and I don't know how to prevent Latex from putting 'the' and similar short words at the end of the line. I already tried `impnattypo` and `encxvlna` packages, but none of them worked. Any ideas, please?


title: etoolbox.sty missing

text: im using Debian squeeze and installed LaTeX with `apt-get install texlive texlive-lang-czechslovak texlive-fonts-recommended`, but when i compile my school LaTeX template, this error occurs:               LaTeX Error: File `etoolbox.sty' not found      Where to find this file? It seems its availible only in newer versions, as suggested here.


title: Beamer Frankfurt header runs off page

text: I'm using the Beamer Frankfurt header. When my final section has a lot of slides, the circles run off the page, so the "active" circle is not visible in much of the final section. The titles appear to be spaced equidistantly, with the final title aligned on the far right of the page. See image: ![beamer_header](http://i.stack.imgur.com/apsQw.jpg) It seems like a better approach would be to space the titles according to the number of slides in each section. This would make it more likely that all the circles would fit on a page. Can this be done?


title: List of available TikZ libraries with a short introduction

text: ### Quick links: **Summary** ❧ **Intersections library** ❧ **Arrow tips library** ❧ **Calc library** ❧ **Mindmap Library** ❧ **Shapes library** ❧ **Paper Folding Library** ❧ **Chains Library** ❧ **Shapes library** * * * Very often I search a special library of TikZ. At the moment there is no package which loads every library. _Is there a list of all available libraries with a short introduction (2-3 sentences)?_ Maybe we can collect them here


title: Multiple arrows between nodes

text: How do I draw multiple arrows between two nodes? Currently I am able to draw only one between two nodes. And how do I draw curved arrows? How to align them properly? I want to draw something like this: ![enter image description here](http://i.stack.imgur.com/IDoPB.png)


title: titleformat not being applied to bibliography

text: Here is a MWE of the code I am using for applying a titleformat to my chapters. But it does not get applied to my bibliography chapter. Any ideas why?               \documentclass[a4paper,11pt]{report}          \usepackage{times}     \usepackage{makeidx}          \usepackage{tikz}     \usetikzlibrary{calc}     \pgfdeclarelayer{background}     \pgfdeclarelayer{foreground}     \pgfsetlayers{background,main,foreground}          \usepackage{titlesec}          \titleformat{\chapter}[display]     {\bfseries\Large}     {\hfill \tikz[remember picture] \node[] (nr) {\huge\color{blue!50!black}\textbf{\thechapter}~~};       \begin{tikzpicture}[remember picture,overlay]         \coordinate (leftborder) at ($(nr)-(100,0)$);         \coordinate (leftborderhigh) at ($(nr.north west)-(100,0)$);         \coordinate (leftborderlow) at ($(nr.south west)-(100,0)$);         \coordinate (left) at ($(nr.west)-(1.5,0)$);         \path[shade, top color=blue!1,bottom color=blue!20] (leftborderhigh) -- ($(nr.north west)+(0,0.5)$) -- (left) -- (leftborder) -- cycle;         \path[shade, top color=blue!20,bottom color=blue!1] (leftborderlow) -- ($(nr.south west)-(0,0.5)$) -- (left) -- (leftborder) -- cycle;         \draw[blue!50!black,line width=0.1em,line join=round] (left) -- ($(nr.south west)-(0,0.5)$) -- ($(nr.south east)-(0,0.5)$) -- ($(nr.north east)+(0,0.5)$) -- ($(nr.north west)+(0,0.5)$) -- (left) -- (leftborder);       \end{tikzpicture}}     {5ex}     {\filleft\LARGE\bf}     [\vspace{0ex}]          \makeindex          \begin{document}     \chapter{Introduction}     \chapter{Chapter about XXX}     \chapter{Chapter about YYY}     \chapter{Conclusion}     \bibliography{../references}     \end{document}


title: Is there a program similar to detex for windows

text: Detex strips a TeX file from its TeX commands to turn it into a plain *.txt file. Is there a detex program for Windows.   I am looking for ways to use spell/grammar editing tools in Word or other programs such as After Deadline. There is of course a spell checkers on every editor. But occasionally you want to have other checks as explained in comparison of spell checking in TeXworks and other editors.


title: Which PDF/DVI viewers have spelling error or homonym detectors?

text: Sometimes it is easy to miss a spelling error in TeX. Which PDF/DVI editors let you a second check? Many allow you to spell check the input field in a form. I want the main document to be checked. And does any reader detect homonyms? As in flagging there/their/they're. A MAC solution is provided below, a Windows port was not found. A paid version is this.


title: Trouble with own macro

text: I'm not sure where my error is. I uses this code:               \newcommand{\qr}[2]{%       \begin{pspicture}(1.378in, 1.5in)%         \psbarcode[]{#1}{height=1.378 width=1.378}{qrcode}%         {\psset{unit=1.378in}\rput(0.165,0.165){\color{white}#2}}%       \end{pspicture}%     }      The definition seems to be okay. In this full example               \documentclass[a4paper, 12pt, parskip]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage{pst-barcode}     \usepackage{auto-pst-pdf}          \newcommand{\qr}[2]{%       \begin{pspicture}(1.378in, 1.5in)%         \psbarcode[]{#1}{height=1.378 width=1.378}{qrcode}%         {\psset{unit=1.378in}\rput(0.165,0.165){\color{white}#2}}%       \end{pspicture}%     }          \begin{document}       \section{Demo}       \qr{1,1}     \end{document}      I get a strange error:               ! Extra \endgroup. \endpspicture ->\pst@killglue \endgroup                                              \egroup \ifdim \wd \pst@hbox =\z@ \e... l.57   \end{pspicture}      What does this mean and how to avoid that?


title: Inserting arrays into semantic's inference rules

text: I want to typeset inference rules containing tables (or `array`s) in the premises. I'm using the `semantic` package, which sets the premises (and conclusion) in math mode, so I thought this might work:               \inference{\expr{axis} \in \left\{         \begin{array}{l}         \expr{child}\\ \expr{descendant}         \end{array}     \right\} }{conclusion}      However, this gives me an error message I'm perplexed looking at:               ERROR: Missing \cr inserted.          --- TeX said ---     <inserted text>                      \cr      l.56 \right\} }                    {\expr{axis::node-test predicate*} : \<node-set>}     --- HELP ---     From the .log file...          I'm guessing that you meant to end an alignment here.      which is strange, because typesetting the premise alone in a math environment works fine:               $     \expr{axis} \in \left\{ \begin{array}{l}     \expr{child}\\\expr{descendant}     \end{array}     \right\}     $      Could you shed some light on why am I getting the error message above and how to get rid of it? PS: `\expr{}` is basically `\texttt{}`.


title: tufte-latex warning: Failed to convert input string to UTF16

text: I've been receiving this warnings every time I compile a document with tufte- latex class:               ** WARNING ** Failed to convert input string to UTF16...      Nothing happens, the document compiles fine, but what do those warnings mean? Here is a minimum working example - it works fine with pdfTeX, but produces the warning with XeTeX:               \documentclass{tufte-book}     \begin{document}     \part{A Tale of Two Cities}     \end{document}


title: Different \mathcal O

text: I would like to get a script O looking like this: ![](http://i.stack.imgur.com/q5ZiG.png) However, `\mathcal O` and `\mathscr O` give ![](http://i.stack.imgur.com/XKjlZ.png), which are slightly different. This is **not** the pre-1992 `\mathcal O`.


title: Equations lining up and labeling

text: I'm trying to line up multiple equations next to each other and have them all properly labeled. There is another question discussing this exact problem. Unfortunately, all the solutions proposed there produce output with the equations sitting on different baselines, which is extremely jarring. Here's the document I'm working with:               \documentclass{article}     \usepackage{amsmath, amsfonts}     \begin{document}     \begin{equation}       \mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^n a_ib_i       \qquad       \mathbf{a} \cdot \mathbf{b} =         \lVert \mathbf{a} \rVert         \lVert \mathbf{b} \rVert \cos \theta     \end{equation}     \end{document}      When written this way, it appears that both left-hand sides use the same baseline and the output looks quite pleasing. Unfortunately I couldn't achieve the same effect using the suggestions from the linked question (which are `tabularx`, `multicol` or `minipage`). Please help! **Update.** I realize that the question is a bit poorly worded. What I really want here, is an ability to arrange equations on a grid, in a way similar to how various `align` environments work, but at the same time also labeling equations that end up on the same row. I hope that makes sense.


title: About web2c, c code conversion

text: I'd like to convert some Tex-and-friends code to C, so that I can play with modifying it. As I understand it, the process is: (1) The tangle utility converts foo.web to a foo.p (Pascal) file, and then (2) I use web2c to convert foo.p to foo.c I have managed to make step #1 work, but I'm stuck on step #2. I found the "convert" function and it's components in .../texk/web2c/web2c (in the Live Tex distribution). I was hoping that I could just switch to that directory and type "make" to compile/build the web2c utility. But this directory does not contain a typical Makefile. It has Makefile.am and Makefile.in, but these don't seem to do any compilation, as far as I can see (though I know very little about make files). So, the questions are: (1) Is there somewhere I can get a pre-built web2c conversion tool (for Windows), or (2) Can someone give me good instructions for building it myself. **Edit:** Even better ... (3) Is there somewhere I can get C code for TeX and Metafont. This code is produced as part of the TeX build process, but apparently it must get thrown away after compilation, since I can't seem to find it anywhere. **Edit:** Regarding approach #3, I looked at Y&Y TeX, LuaTex, and CXTeX. They have C code, but, as far as I can see, none of them include Metafont, which is the subsystem that most interests me. Results from typing "Build":               configure: WARNING: Sorry, neither Carbon framework nor fontconfig library: disabling xetex     configure: error: terminating.     === configuring in web2c failed      And in config.log, I found:               configure:18449: checking for installed fontconfig headers and library     configure:18482: gcc -o conftest.exe -g -O2    conftest.c -lfontconfig  >&5     conftest.c:48:35: fatal error: fontconfig/fontconfig.h: No such file or directory     compilation terminated.     configure:18482: $? = 1     configure: failed program was:     | /* confdefs.h */      But, as Khaled pointed out, I could have avoided building these components, anyway, if I'd done a bit more research. **Avoiding the Above Error** In case it helps any of my fellow neophytes and idiots ... The error arises because fontconfig is missing. The "prerequisites" section of the build instructions tells you how to avoid this. You have to use                --disable-xetex      --disable-xdvipdfmx.


title: tikz foreach used for number in filename for addplot

text: I have quite a few tables generated which I want to plot in the same TikZ figure (using pgfplots). I am currently trying to use a foreach loop to plot them all, but it is only plotting the _last_ figure.               \begin{figure}     \begin{tikzpicture}     \begin{axis}[axis lines=middle,legend pos=north west,         xlabel=$x$,         ylabel=$y$,         legend style={draw=none}]         \def \N {14}         \foreach \i in {1,...,\N} {             \addplot[smooth,magenta] plot[]file{tablerev/airyratio\N.dat};         }     \end{axis}     \end{tikzpicture}     \end{figure}      I'm not sure what is causing this behavior. Apparently using the `\N` works as part of a filename, and if I plot them separately they will plot, so why is it not showing all 14 plots?


title: change to xeCJK under TeXLive 2012, since 2011?

text: Beginning in the late Spring of 2011, I have been using a few lines of code regularly in all my documents, making it possible to produce documents with regular Roman text, IPA, and all (or nearly all) of the Unicode CJK planes. The MWE below illustrates the xeCJK code block I have been using:               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass{article}          \usepackage[fallback]{xeCJK}[2011/05/01] % ver 2.3.19     \setromanfont{TeX Gyre Termes}     \setsansfont[Scale=MatchLowercase]{Doulos SIL}     \setCJKmainfont{HAN NOM A}     \setCJKfallbackfamilyfont{rm}{HAN NOM B}          \begin{document}     Plain Roman script is here.           And some IPA: [\textsf{ɕy̆an₃₄ ʈʂʅ₄₄ jɵu̯₅₂ ɕy̆an₃₄}]          最後一句：玄之又     \end{document}      The last character of the Chinese text () is in the HAN NOM B font and not in HAN NOM A, and the `\setCJKfallbackfamilyfont` command works splendidly to make it appear as needed. In TeXShop, on TeXLive 2011, this code block has worked perfectly, but since upgrading to TeXLive 2012 I get a persistent error `Missing number, treated as zero` if more than a single Chinese character appears in a line. Is there something I have to do to my xeCJK code block to fix this? A little experiment shows that the problem arises when two CJK characters appear consecutively. If separated on the same line by Roman characters, the error is not reported and the document appears to compile correctly. * * * I am currently on Mac OS 10.6.8 with TeXLive 2011 and Mac OS 10.8.2 with TeXLive 2012. But I have tried pairing the TeXLive and OS X versions the other way and the problem persists where TeXLive 2012 is in use. Current package versions:               TeXLive 2011:       xeCJK.sty    2011/05/01 2.3.19       fontspec.sty    2011/02/26 v2.1f       fontspec-patches.sty    2011/02/26 v2.1f       expl3.sty    2011/04/09 v2222          TeXLive 2012:       xeCJK    2012/10/27 v3.0.10       fontspec    2012/05/06 v2.2b       fontspec-patches    2012/05/06 v2.2b       expl3    2012/11/21 v4332


title: Including .tex file to LyX document

text: Is it possible to write pure latex to a separate file and then include that in the LyX document. What are the pros and cons of doing that? As far as I understand there are problems with preamble. Basically what I would like to do is this - write a table to separate latex file and then include that in the document (I would be great if document header and footer came from LyX document.


title: End of theorem marker placement

text: I have a question about marker placement after theorems. I am using a style file provided by Oxford University Press, which I am not used to. It is available here: http://www.oxfordjournals.org/our_journals/imrn/for_authors/tex_template.zip This style file wants to put an `\openbox` at the end of the statement of each theorem, and a `\filledbox` at the end of every proof. If one concludes a proof with an equation, I know to use `\qedhere` to position the end of proof marker correctly. But I don't know how to do something similar in the above situation (after the statement of a theorem). Many of the thoerems, propositions etc. end with equations, and if I use the above style sheet the box is placed too low. How do I fix this?


title: Justifing text in poster using column

text: In a Poster i want to justified mt text whish is in a column. I tried searching for a solution but did not find one. Here is a minimum working example:               \begin{column}{.479\textwidth}     \begin{Partie}{2.Word Symmetric Functions  \vspace{-.17em}}     \textbf{2.1 Basic definitions and properties}        \begin{itemize}        \item A set partition of size $n$ is a set of disjoint subsets whose union is $\{1, 2, \dots, n\}$ (we will denote $\pi  \vDash n$).         $$ \{\{1\},\{2\},\{3\}\}, \{ \{1\}, \{2,3\} \}, \{ \{2\}, \{1,3\} \}, \{ \{3\}, \{1, 2\} \}, \{ \{1, 2, 3\} \} $$         \item The algebra $\WSym$ \cite{RS} is generated by $\Phi:\{\Phi^{\pi}\}$          and $M_{\pi}$, the word power sum functions and word monomial functions,          whose elements are indexed by set partitions of $\{1, \dots, n\}$ defined by:          $ \Phi^{\pi} = \sum_{\substack{\pi \leqslant \pi'}} M_{\pi'} $ when $\pi           \leqslant \pi'$ ($\pi$ is finer than $\pi'$).            \item $\WSym$ is a Hopf algebra:               \begin{itemize}                \item The shifted concatenation product: $ \Phi^\pi\Phi^{\pi'}                       = \Phi^{\pi\pi'[n]} $                \item The coproduct : $\Delta M_\pi                       = \sum_{\substack{\pi'\cup\pi''=\pi\\\pi'\cap\pi''=\varnothing}}                      M_{\mathrm{std}(\pi')} \otimes M_{\mathrm{std}(\pi'')}$          \end{itemize}          \item The coproduct of $\WSym$ consists of identifying the algebra $\WSym                 \otimes \WSym$ with $\WSym(\mathbb{A} + \mathbb{B})$ when $\mathbb{A}$                  and $\mathbb{B}$ are two non commutative alphabets \cite{HNT}.          \end{itemize}      \end{Partie}     \end{column}


title: Replicating a simple diagram in Knuth's book using TikZ

text: !["Factoring by division" algorithm as described in the book *The Art of Computer Programming*, Vol. 2 by Donald Knuth](http://i.stack.imgur.com/34LVY.jpg) Despite the many attempts to draw this simple flowchart, I didn't really know how to do the following:   1. Drawing a start arrow (as the one before A1)   2. Drawing an end arrow (as the one after A2 and A7)   3. Having the structure of the flow between nodes of a diamond shape (as in the arrows connecting A2, A3, A4, and A5)   4. Drawing a "smart" returning arrow that doesn't penetrate other nodes (as in between A6 and A3)   5. Adjusting the length of the arrow (or the distance between nodes)   6. Adjusting the vertical distance between nodes   7. Putting the diagram in the center Here is my code:               \documentclass{article}     \usepackage{tikz} % For drawing circles around numbers     \usetikzlibrary{shapes,arrows}          \begin{document}     \tikzstyle{decision} = [draw, text width=6.0em, text badly centered, node     distance=3cm, inner sep=0pt, minimum height=2.0em]     \tikzstyle{block} = [rectangle, draw, text centered, rounded corners,     minimum height=2.0em]     \tikzstyle{line} = [draw, -latex']     \tikzstyle{cloud} = [draw, ellipse, node distance=3cm, minimum height=2em]          \begin{center}     \begin{figure}[H]     \begin{tikzpicture}[node distance = 2cm, auto]         % Place nodes         \node [decision] (init) {Initialize};         \node [block, below of=init] (trivial) {$N = 1$?};         \node [decision, right of=trivial] (divide) {Divide};         \node [decision, below of=divide] (factorFound) {Factor found};         \node [block, right of=divide, node distance=3cm] (zeroRem){Zero remainder?};         \node [block, right of=zeroRem, node distance=3cm] (lowQuot)               {Low quotient?};         \node [decision, below of=lowQuot] (prime) {$N$ is prime};         % Draw edges         \path [line] (init) -- (trivial);         \path [line] (trivial) -- node {No}(divide);         \path [line] (divide) -- (zeroRem);         \path [line] (zeroRem) -- node {No}(lowQuot);         \path [line] (zeroRem) -- node {Yes}(factorFound);         \path [line] (factorFound) -- (trivial);         \path [line] (lowQuot) -- (prime);         \path [line] (lowQuot) |- node {No}(divide);         \end{tikzpicture}         \label{Figure:TrialDivFlowChart}         \caption{Trial division as described in [Knuth 2004].}     \end{figure}     \end{center}     \end{document}


title: Changing size of greek in mathmode with Times fonts

text: I'm using mathptmx to write a paper for a conference that wants Times. Everything seems to be working ok, except for the size of the greek letters in mathmode. The greek letters have a larger x-height than the normal text font. Is there a way to adjust the font size of the greek letters to get a closer match? For example, the following document shows the issue:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{mathptmx}     \begin{document}       x$\epsilon$x$\sigma$x     \end{document}


title: LaTeX in Blogger

text: I have looked on the web and found some unsatisfactory solutions to getting LaTeX working on Blogger. Ideally I wouldn't have to switch to Wordpress, however, if the time comes, I can migrate. > I am wondering if there is a good way to get this working that does not > require program or extension installed on my computer. Furthermore I would > like the rendering to be viewable on Win, Mac, and Linux. I considered jsMath, but for some reason cannot find how to get this working on Blogger. Additional features that would be ideal is the ability to render the LaTeX using packages on my machine, and even better, allowing me to compose a document in the LaTeX front end of my choice and render/upload though command line. Thanks!


title: Jabref -- entries imported from jstor still marked as incomplete

text: When I import references from either the jstor website or through jabref front end, they all show up as red (i.e. incomplete). Specifically, "Journal title" is not present in the required field. The really weird thing is, when I cite these references, they all show up complete. So where is "journal title" stored in my bib entry?


title: Color-bar - surf plot

text: I have a surf plot as shown below. ![enter image description here](http://i.stack.imgur.com/hpcOE.png) However, the markings on the color- bar are in steps of 0.05. Instead, I want the markings to be in steps of 0.25. How should I go about doing this? Below is the code, which produces the surf plot shown above.               \begin{tikzpicture}[scale=0.15]     \pgfplotsset{compat=newest}     \tikzstyle{every node}=[font=\Huge]     every mark/.append style={rotate=90}.     \begin{axis}[     colorbar,     view={60}{30},     smooth,     mark size = 1.5,     xmin=16, xmax=24,     ymin=1650, ymax=1675,     zmin=0.25, zmax=2.25,     xtick = {16,18,20,22},     ytick = {1650,1655,1660,1665,1670,1675},     ztick = {0.25,0.5,0.75,1,1.25,1.5,1.75,2,2.25},     xlabel= $a$,     ylabel= $b$,     zlabel= Relative error,     xlabel style = {sloped like x axis},     ylabel style = {sloped like y axis},     ]     \addplot3[surf,mesh/rows=5,shader=interp] coordinates {     (16,1650,1.6148) (18,1650,1.6283) (20,1650,1.6421) (22,1650,1.6449) (24,1650,1.6579)     (16,1655,1.5114) (18,1655,1.5058) (20,1655,1.4948) (22,1655,1.4738) (24,1655,1.4474)     (16,1660,1.2262) (18,1660,1.2302) (20,1660,1.2280) (22,1660,1.2320) (24,1660,1.2283)     (16,1665,0.3534) (18,1665,0.3103) (20,1665,0.3159) (22,1665,0.3312) (24,1665,0.3621)     (16,1675,2.0557) (18,1675,1.0734) (20,1675,1.0279) (22,1675,0.9771) (24,1675,0.9127)     };     \end{axis}     \end{tikzpicture}


title: subfig caption spacing

text: How do I reduce the vertical space between a caption of a subfigure and the image of that subfigure? I tried:               \subfigure[\vspace{-0.2in} caption words]      doesn't seem to do anything.


title: Changing the chapter heading size in quotchap

text: I am using the `quotchap` package to format chapter headings in a document. Is it possible to change the default font size for the chapter headings? For example, in the `document.tex` file at the above URL, what would need to be changed to make the title smaller? I could of course just use               \chapter{\small Quote to be quoted}      but this messes up things like tables of contents and running headers, and the font size applies to those too. Thanks for any help!


title: Dependencies in Rubber?

text: I have several figures compiled independently into several pdf files. Rubber works great in their compilation. The main document is compiling great with rubber as well. How can I add dependency (if figure pdf is outdated then recompile) into Rubber?


title: Why should I be interested in ConTeXt?

text: In the spirit of a free-form Friday on StackOverflow, I'd like to know if I should consider learning ConTeXt. What got me into LaTeX way back in 1994 was having structural markup that made longer documents easier to write. What got me into XeTeX was being able to use my Mac's fonts just like I could in a word processor. What makes ConTeXt users passionate about it or at least willing to forsake LaTeX? **Edit:** Thanks for all the answers and great discussion in the comments. The whole page deserves a green check. Success! I am now interested in ConTeXt.


title: Placement of arrowtips with TikZ’s markings

text: With the decoration library it is possible to place arrow tips at arbitrary positions along a path. TikZ places the front end of the arrow at the specified position, which is often exactly what one wants. However, sometimes I’d find it would look better if the middle of the arrow tip is placed at the specified position, in particular when centering an arrow an a line:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{decorations.markings,arrows}          \begin{document}          \begin{tikzpicture}[         decoration={markings,mark=at position 0.5 with {\arrow{triangle 60}}},         ]         \draw[postaction={decorate}] (0,0.2) -- (1,0.2);         \draw[postaction={decorate}] (1,-0.2) -- (0,-0.2);     \end{tikzpicture}          \end{document}      gives ![what I want](http://i.stack.imgur.com/7gQAk.png) instead of ![what I want](http://i.stack.imgur.com/ZVsdc.png) I produced the second picture by guessing where the front end of the arrow should be to have the center of the arrow in the middle of the path. Is there a way to have TikZ position the arrows this way (without having to guess the positions)?


title: How can one plot in 3D a matrix with LaTeX?

text: I have a problem with drawing a 3d plot in TikZ. I have a matrix of size (n*m) n is the number of points in the x-direction and m is the number of points in the y-direction and the values in the matrix are the z coordinates. For example the array matrix in (1,2) in z value for point 1 in x direction and point 2 in y direction. How can I plot this matrix in LaTeX? **EDIT** Here is a sample of the matrix I would like to plot (z coordinate), with the row index as the x coordinate and the column index as the y coordinate:               (1.0514 ,1.1092 ,1.2479,1.383, 1.4261)      (1.1294 ,1.247, 1.36, 1.392, 1.304)      (1.1049,1.1466, 1.2459, 1.3397, 1.362)      (1.1257,1.161, 1.2445, 1.3218, 1.3356)


title: Include signature picture in cover letter in moderncv?

text: I created a cover letter with the moderncv package. My code is:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[green]{classic}                       \usepackage[utf8]{inputenc}                       \usepackage{floatflt}     \usepackage{fancyhdr}      \usepackage{geometry}     \geometry{a4paper,left=2cm,right=1cm, top=2cm, bottom=1.5cm,headheight=21pt}      \usepackage{tikz}      \usepackage{wrapfig}     \usepackage{lipsum}      \usepackage{footmisc}     \usepackage{xparse}     \usepackage[firstyear=1996,lastyear=2013]{moderntimeline}          % New page style     \fancypagestyle{myfancy}{     \fancyhead[L]{\parbox[t]{.3333\textwidth}{\sffamily\footnotesize      Teest\\Test}}     \fancyhead[C]{\parbox[t]{.3333\textwidth}{\fixedphonesymbol\sffamily\footnotesize  213123312}}     \fancyhead[R]{\parbox[t]{.3333\textwidth}{\emailsymbol\sffamily\footnotesize  test@test.com}}     }     \makeatletter     \let\ps@plain\ps@myfancy     \let\ps@empty\ps@myfancy     \makeatother     \pagestyle{myfancy}          % Redefinitions of \makecvtitle, opening and closing to     % have the desired formatting for first and family names     \makeatletter     \renewcommand*{\makecvtitle}{%       % recompute lengths (in case we are switching from letter to resume, or vice versa)       \recomputecvlengths%       % optional detailed information (pre-rendering)       \def\phonesdetails{}%       \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number         \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%       \def\socialsdetails{}%       \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link         \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%       \newbox{\makecvtitledetailsbox}%       \savebox{\makecvtitledetailsbox}{%         \addressfont\color{color2}%         \begin{tabular}[b]{@{}r@{}}%           \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%             \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty             \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%           \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict           \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%           \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%           \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict           \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%         \end{tabular}       }%       % optional photo (pre-rendering)       \newbox{\makecvtitlepicturebox}%       \savebox{\makecvtitlepicturebox}{%         \ifthenelse{\isundefined{\@photo}}%         {}%         {%           \hspace*{\separatorcolumnwidth}%           \color{color1}%           \setlength{\fboxrule}{\@photoframewidth}%           \ifdim\@photoframewidth=0pt%             \setlength{\fboxsep}{0pt}\fi%           \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%       % name and title       \newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%       \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%       \ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)         {\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%         {}%       \begin{minipage}[b]{\makecvtitlenamewidth}%         \namestyle{\@firstname}\par\smallskip\namestyle{\@lastname}%         \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%       \end{minipage}%       \hfill%       % optional detailed information (rendering)       \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced       % optional photo (rendering)       \usebox{\makecvtitlepicturebox}\\[2.5em]%       % optional quote       \ifthenelse{\isundefined{\@quote}}%         {}%         {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%       \par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle     \renewcommand*{\makeletterclosing}{       \@closing\\[3em]%       {\bfseries\@firstname\\\@lastname}%       \ifthenelse{\isundefined{\@enclosure}}{}{%         \\%         \vfill%         {\color{color2}\itshape\enclname: \@enclosure}}}     \renewcommand*{\makelettertitle}{%       % recompute lengths (in case we are switching from letter to resume, or vice versa)       \recomputeletterlengths%       % sender contact info       \hfill%       \begin{minipage}{.5\textwidth}%         \raggedleft%         \addressfont\textcolor{color2}{%           {\bfseries\upshape\@firstname\\\@lastname}\@firstdetailselementfalse%           \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%             \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty             \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%           \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number             \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%           \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%           \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%           \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%         \end{minipage}\\[1em]       % recipient block       \begin{minipage}[t]{.5\textwidth}         \raggedright%         \addressfont%         {\bfseries\upshape\@recipientname}\\%         \@recipientaddress%       \end{minipage}       % date       \hfill% US style     %  \\[1em]% UK style       \@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"       % opening       \raggedright%       \@opening\\[1.5em]%       % ensure no extra spacing after \makelettertitle due to a possible blank line     %  \ignorespacesafterend% not working       \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}          \makeatother          \makeatletter     \renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}     \makeatother               % for timeline          \makeatletter     \pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}     \NewDocumentCommand\tldatelabelcventryn{O{center}O{color1}mmmmmmm}{%     \pgfmathsetmacro\tl@endyear{\tl@lastyear}%     \pgfmathsetmacro\tl@startfraction{(#3-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%     \pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%      \cventry{\tikz[baseline]{%          \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex);          \fill [\tl@runningcolor] (0,0)             rectangle (\hintscolumnwidth,\tl@runningwidth);          \fill [#2] (0,0)             ++(\tl@startfraction*\hintscolumnwidth,0pt)             node [tl@startyear,yshift=5pt,anchor=#1] {#4}             node {$\bullet$};        }     }     {#5}{#6}{#7}{#8}{#9}     }     \newcommand\tllabelcventryn[9][color1]{%       \gdef\Argi{#1}%       \gdef\Argii{#2}%       \gdef\Argiii{#3}%       \gdef\Argiv{#4}%       \gdef\Argv{#5}%       \gdef\Argvi{#6}%       \gdef\Argvii{#7}%       \gdef\Argviii{#8}%       \gdef\Argix{#9}%       \auxtllabelcventryn     }     \def\auxtllabelcventryn#1{%       \gdef\Argx{#1}%     \pgfmathsetmacro\tl@endyear{ifthenelse(\Argiii==0,\tl@lastyear,\Argiii)}     \pgfmathsetmacro\tl@startfraction{(\Argii-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%     \pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%      \cventry{\tikz[baseline=0pt]{          \fill [\tl@runningcolor] (0,0)             rectangle (\hintscolumnwidth,\tl@runningwidth);          \useasboundingbox (0,-1.5ex)             rectangle (\hintscolumnwidth,1ex);          \fill [\Argi] (0,0)             ++(\tl@startfraction*\hintscolumnwidth,0pt)             node [tl@startyear,anchor=north east] {\Argiv} node [tl@startyear,above] {\Argv}             rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt);          \pgfmathsetlength{\pgf@xa}{\Argiii} \ifdim\pgf@xa=0pt             \shade [left color=\Argi] (\tl@startfraction*\hintscolumnwidth,0)                 rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width);          \else             \fill [\Argi] (\tl@startfraction*\hintscolumnwidth,0)                 rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width);          \fi          }     }     {\Argvi}{\Argvii}{\Argviii}{\Argix}{\Argx}%     }     \makeatother     %     \tltextstart[north]{\scriptsize}     \tltextend[south]{\scriptsize}          \firstname{Ctest}     \familyname{test}     \title{Curriculum vit\ae{}}                   \address{}{}       \photo[128pt]{picture}                                  \begin{document}          \recipient{Test}{Test\\Test}      \date{\today}      \opening{Dear Commitee Members:}      \closing{Sincerely yours,}      \enclosure[Attached]{curriculum vit\ae{}}           \makelettertitle      Text a lot of text.     \makeletterclosing          \end{document}      This gives ![te](http://i.stack.imgur.com/XShls.png) Now I want to include my handwritten signature under the sincerely yours and above my name. How can I do this?


title: Unexpected alignment in table

text: Consider the following example. **Code**               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage{booktabs,dcolumn}     \usepackage[locale=DE]{siunitx}          \newcolumntype{d}[1]{D{.}{,}{#1}}     \newcommand*\mc[1]{\multicolumn{1}{c}{#1}}          \begin{document}          \begin{table}      \centering       \caption{Medlemstallene i FC Københavns Fan Club.}       \label{tbl:1}       \begin{tabular}{l d{4.0} d{4.0} d{4.0} d{4.0}}        \toprule         Årstal            & \mc{1999} & \mc{2000} & \mc{2001} & \mc{2002} \\[0.5ex]         Landsdel          &           &           &           &           \\        \midrule         København         & 2511 & 2696 & 3154 & 3927 \\         Storkøbenhavn     & 1742 & 1881 & 2132 & 2780 \\         Øst for Storebælt & 1510 & 1668 & 1823 & 2262 \\         Fyn               &  105 &  118 &  123 &  161 \\         Jylland           &  369 &  427 &  479 &  594 \\         Danmark i alt     & 6237 & 6790 & 7711 & 9724 \\         Udland            &   39 &   37 &   72 &   95 \\        \midrule         I alt             & 6276 & 6827 & 7783 & 9819 \\        \midrule         \multicolumn{2}{l}{Medlemstallets udvikling}         & \mc{\SI{8.8}{\percent}}         & \mc{\SI{14.0}{\percent}}         & \mc{\SI{26.2}{\percent}} \\        \bottomrule       \end{tabular}     \end{table}          \end{document}      **Output** ![output](http://i.stack.imgur.com/2kNZk.jpg) **Question** As can be seen, the numbers in the first row are not properly aligned with the other numbers in the same column. How do I get this alignment and the alignment of the others numbers in the table (as they are now) as well? P.S. The relative numbers in the bottom row are not improtant here; they should just be centered as they are now. **Reflection** I _guess_ it has something to do with the fact that the alignment involves a blank space with the same width as a `,` even though there are no decimals in the numbers in the table.


title: How to get cleveref to treat separate theorem-types as one?

text: ## Introduction I'm using a somewhat complex theorem-environment setup which, perhaps, is finally getting me into trouble. I use `memoir`, `cleveref` and `ntheorem`. There is a global `thmcounter` that all theorem-like environments share. In addition, all theorem-types have a counterpart for entries related to the main _case study_ (which have a subtly different style). And therein lies my problem. ## Problem I want to convince `cleveref` that _normal_ Definitions (Theorems, Lemmas, ...) and _case study_ Definitions (Theorems, Lemmas, ...) are really the same thing. But I don't know how. One of the ways this manifests itself is `cleveref`'s cross-reference compression and sorting. It can say _"Definitions 1 and 2"_ rather than _"Definition 1 and Definition 2"_. But only when they have the same type. ## Minimal Working Example Here's a MWE. Some of the packages below may not be involved, but I thought I'd err on the side of completeness. In my real code I have macros to automate most of this, but that shouldn't affect anything.               \documentclass{memoir}          \usepackage                       {amsmath}  %| 1 (keep in this order)     \usepackage [ntheorem]            {empheq}   %| 2     \usepackage [amsmath,thmmarks]    {ntheorem} %| 3     \usepackage                       {hyperref} %| 4     \usepackage [capitalize,noabbrev] {cleveref} %| 5          \newtheorem{thmcounter}{}[chapter]          \newtheorem         {Definition}[thmcounter]{Definition}     \newtheorem{CaseStudyDefinition}[thmcounter]{Definition}     \crefname         {Definition}{Definition}{Definitions}     \Crefname         {Definition}{Definition}{Definitions}     \crefname{CaseStudyDefinition}{Definition}{Definitions}     \Crefname{CaseStudyDefinition}{Definition}{Definitions}     % same for Theorem, Lemma, Axiom, etc.          \begin{document}         \begin{Definition}[A] \label{def:A}  Foo  \end{Definition}              \begin{Definition}[B] \label{def:B}  Bar  \end{Definition}              \begin{CaseStudyDefinition}[C] \label{def:C}  FooBar  \end{CaseStudyDefinition}              Look at \cref{def:A,def:B}!              Now look at \cref{def:A,def:C}!     \end{document}      ![enter image description here](http://i.stack.imgur.com/MEybQ.png) As you can see, it doesn't do the right thing by default, which is understandable. ## Things I tried I tried using `\crefalias{CaseStudyDefinition}{Definition}`, but that seems to do nothing. I also tried using the `aliascnt` package, but that works on counters, of which I use only one. So no luck. `cleveref` modifies the `\label` command so an author can supply an optional argument specifying a different theorem-type. And strangely... that works. If I do this:               \begin{CaseStudyDefinition}[C] \label[Definition]{def:C}  FooBar  \end{CaseStudyDefinition}      then the second sentence is compressed just like the first. But that solution requires a manual fix for every use. I tried several ways of 'implicitly' supplying the optional argument. I tried redefining `\label`, for instance, but without success. I'm not sure where to insert my own hack. I'd appreciate some assistance.


title: breqn and lineno incompatibility

text: Journals often require line numbering for the review process. This is achieved using `lineno` package. Next, it seems like a good idea to use `breqn` package (`dmath` environment) to auto-break long formulas. But, not switching line numbering off before `dmath` environment (`\begin{nolinenumbers}`, `\end{nolinenumbers}`), causes `pdftex` to hang (it just consumes 100% CPU, and compilation never finishes).   1. Why is this happening?   2. How to redefine `dmath` (and `dmath*`) environment to have `nolinenumbers` environment automaticly added around it.               \documentclass[twocolumn,12pt]{article}     \usepackage{breqn}     \usepackage{lineno}          \begin{document}     \linenumbers          First paragraph.          \begin{nolinenumbers}     \begin{dmath}     f(x)=x^9+x^8-x^7+x^6-x^5-x^4-x^3+x^2-x+1.     \end{dmath}     \end{nolinenumbers}     \end{document}


How to add images at the top of the chapter title. A sample snapshot like this(here circles are images): ![enter image description here](http://i.stack.imgur.com/r3OqA.png) The SWE is:               \documentclass[12pt]{book}     \usepackage{lipsum}     \usepackage[explicit]{titlesec}     \titleformat{\chapter}[display]       {\bfseries\Large}     %  {\filright\MakeUppercase{\chaptertitlename}\Huge\thechapter}       {}       {1ex}       {\titlerule\vspace{1ex}\filcenter #1}       [\vspace{1ex}\titlerule]     \begin{document}     \chapter{A Chapter}     \lipsum[4]     \end{document}


title: Changing the section navigation from vertical to horizontal

text: I like to use the `Malmoe` theme in the `beamer` class. However, I would rather have the header navigation for the sections horizontal instead of vertical, so that it takes less space.


title: «Undefined reference» when using an URL in Bibtex

text: I'm trying to cite a Webpage in a latex report but it always fails during the compilation. Here is my _.tex_ :               \documentclass[a4paper,10pt]{report}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{url}     \usepackage[spanish]{babel}          % Commandes personnalisées          \title{My lovely test}     \author{Me}     \date{10/23/13}          \begin{document}     \maketitle     I love to use Google\cite{google}          \bibliographystyle{ieeetr-fr}     \bibliography{bibliography.bib}     \end{document}      And my _.bib_               @misc{     google,     Author={Google},     Howpublished={\url{http://www.google.com}},     Title={Google what else}     }      But when compiling, I've got this error: > l.1 \begin{thebibliography}{1} [1] ! Undefined control sequence. l.6 > ...eauteurs\bgroup Google\egroup\egroup{}, \og Google what else\fg{}. ! > Undefined control sequence. l.6 ...le\egroup\egroup{}, \og Google what > else\fg {}. (/usr/share/texmf-dist/tex/latex/base/t1cmtt.fd)) [2] > (./test.aux) What's wrong in my code?


title: French math style with default font

text: Edit: Okay, I found it, just needed more focus on the related entry. The package `mathastext` called with the `frenchmath` option does the job. The time for my first question to stackexchange could have been delayed... Original question: I've realized that French typography uses a different style for mathematics, namely upright uppercase roman letters and lowercase greek letters (roman lowercase remaining in italic), while default LaTeX is italic. What I want is to use this style with the default math font. I found far less resources on the Web than I expected, like this one, which introduces math font packages with options for French (or ISO) math style. Nevertheless I'm quite unhappy with the general look of these fonts, not mentioning the fact that unicode-math seems to clash with amssymb. This related question has been answered with: > Simply put these in your preamble: >   >   >     \everymath\expandafter{\the\everymath\mathgroup0} >     \everydisplay\expandafter{\the\everydisplay\mathgroup0} >   > > It doesn't look good though, so I guess you may also want to change font. which I guess is interesting for my issue, but not explained a single bit and I don't know how, or if, I can adapt it.


title: TikZ External: Figure gets cropped

text: Arrow heads from the following MWE are cropped when externalized. What am I doing wrong? **MWE:**               \documentclass{report}     \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize          \begin{document}       \begin{tikzpicture}          \draw[->,ultra thick] (0,0) -- (0,5);          \draw[->,ultra thick] (0,0) -- (5,0);       \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/WePJP.png)


title: Prevent a tex file from being compiled

text: I'm writing my thesis, and there's a overall file `overall.tex` together with several section files, which are `\input`ed in the `overall.tex`. Could I write something in the section files to prevent them from being compiled, which will certainly fail, producing some unneeded aux files. In an other word, to prevent compiling the section file by mistake. I'm using XeLaTeX and AuCTeX.


title: Does pdf syncing (forward-inverse search) work with XeLaTeX?

text: I commonly use textmate+skim or more recently texpad. I have zero problems with pdfsyncing (especially since skim fixed a bug not so long ago). Even more recently I have been playing around with XeLaTeX and I find the syncing behaving incredibly bad. Is it something I just have to live with, is there a solution to this or am I simply doing something wrong? (I'm using last year's mactex distribution if that makes a difference). MWE               \documentclass{article}     \begin{document}     This is the document. And it doesn't seem to work!     fudge me it doesn't work!     \subsection{yope}     This is the document. And it doesn't seem to work!     fudge me it doesn't work!     This is the document. And it doesn't seem to work!     fudge me it doesn't work!     \subsection{yope}     This is the document. And it doesn't seem to work!     fudge me it doesn't work!     This is the document. And it doesn't seem to work!     fudge me it doesn't work!          \end{document}


title: TextMate \cite syntax highlighting

text: When I open a LaTeX document in TextMate, the syntax highlighting makes the part in braces in any cite command colored red, as if there is an error: `\cite{why-is-this-red}` Is there an easy way to avoid this?


title: numbering a several line "equation"

text: I'm trying to number an equation, which spans over several lines. I need for it to look like this ![Wanted design of equation](http://i.stack.imgur.com/NlGRj.png) My current tex for this is:               \documentclass[a4paper,12pt]{article}          \begin{center}      {\it ``If A is true, then B is true\\       A is true \\        \line(1,0){140}       \\Therefore, B is true''}     \end{center}


title: Click on macro name to jump to its definition?

text: Encouraged by a super response to my previous question on a similar topic, I shall persevere with a similar line of inquiry. I think it would be super if, in my LaTeX editor, I could click on a macro name:               \blob{4}      and the cursor would jump to the corresponding definition:               \newcommand{\blob}[1]{...}      Do any LaTeX editors have this feature? I mainly use Aquamacs/AucTeX myself, but am interested in other editors too. I reckon it would be quite challenging to implement, because `\blob` might not just be defined in the current document - it might be:   * in a master file that includes the current document,   * in a slave file that the current document includes, or   * in a package that the document uses.


title: draw side by side graphs and make them more clear

text: I have two problems and sincerely I am trying to resolve them, but unfortunately I am not able...That is why I will appreciate very much your help. **1)** My article architecture consists of two columns each page. That is why, in the beginning of my code, I wrote `\begin{multicols}{2}`. Now, and in a specific part of my article, I am interested to draw multiple graphs. Let us consider 4 graphs. I need that the first two graphs be drawn next to each other in the same line, then the two last must be drawn below the previous graphs and next to each other in the same line. To make that, firstly, I wrote `\end{multicols}`, but although that, when I draw my 4 graphs, they are drawn each one below the other... **2)** My second problem is that in each graph, they are a huge number of points, that is why, when the graph is drawn, it is not being clear. In other words, all the points being very small and the user needs to zoom in the article in order to show clearly the points. So how can I make the graph more clear and visible. Let us consider my graphs that contains in this example a few points (they contains a huge number of points in my article. Here is just a simple example):                   \documentclass{article}         \usepackage{pgfplots}         \begin{document}                   \begin{tikzpicture}         \begin{axis}[             axis lines=middle,             xmax=20,             ymax=20,             xtick=\empty, ytick=\empty     ]         \addplot [only marks] table {         -10 -4         -8  2         -5  5        };         \end{axis}         \end{tikzpicture}                        \begin{tikzpicture}         \begin{axis}[             axis lines=middle,             xmax=20,             ymax=20,             xtick=\empty, ytick=\empty     ]         \addplot [only marks] table {         -12 -4         -5  2         -5  4        };         \end{axis}         \end{tikzpicture}                    \begin{tikzpicture}         \begin{axis}[             axis lines=middle,             xmax=20,             ymax=20,             xtick=\empty, ytick=\empty     ]         \addplot [only marks] table {         -13 -4         -1  2         -8  4        };         \end{axis}         \end{tikzpicture}                         \begin{tikzpicture}         \begin{axis}[             axis lines=middle,             xmax=20,             ymax=20,             xtick=\empty, ytick=\empty     ]         \addplot [only marks] table {         -12 -4         -1  11         -8  4        };         \end{axis}         \end{tikzpicture}                   \end{document}


title: Trying to add a subtitle to the main title of my document but it's not working

text: This is what I have been previously told to use by uni for essays written in LaTeX:               \documentclass[12pt,a4paper]{article}     \usepackage{a4-mancs}     \usepackage{pslatex}      Based on this question and others I've found I've changed `article` to `scrartcl`. Then:               \usepackage{url}     \usepackage{graphicx}     \usepackage{wrapfig}          \begin{document}       \title{Standardising Software}       \subtitle{An update on the article 'The welcome demise of style' from the Economist, September 1989\cite{the welcome demise of style}}       \author{me}     \maketitle          \newpage     ...      However this doesn't work - when I run `latex essay.tex` it says the subtitle bit is an `undefined control sequence`, and it comes out with the subtitle on its own on the first page of the document.


title: Customizing the first use of acronyms generated by glossaries

text: I manage my acronyms using the `glossaries` package. My minimal example is as follows:               \documentclass[ngerman]{scrartcl}     \usepackage[ngerman]{babel}     \usepackage[acronym,shortcuts]{glossaries}     \makeglossaries          \begin{document}          \newacronym{max}{max.}{maximal}     \printglossary[type=\acronymtype]          Der \ac{max} Genuss (\textit{should be} maximale (max.) \textit{on first use})   \newline     Ein \ac{max} Genuss (\textit{should be} maximaler (max.) \textit{on first use})  \newline     Den \ac{max} Genuss (\textit{should be} maximalen (max.) \textit{on first use})  \newline     Der \ac{max} Genuss (maximale)          \end{document}      The base form of the acronym is _maximal_. On first use `glossaries` gives the output _base form (abbr.) = maximal (max.)_. Sadly, in german you cannot be sure that you need the base form on first use. As the definition of `\newacronym` is equal to               \newglossaryentry{⟨label ⟩}{type=\acronymtype,      name={ ⟨abbrv ⟩},      description={⟨long ⟩},      text={⟨abbrv ⟩},      first={⟨long ⟩ (⟨abbrv ⟩)},      plural={⟨abbrv ⟩\glspluralsuffix},      firstplural={ long \glspluralsuffix\space (abbrv \glspluralsuffix)},      ⟨key-val list ⟩}       I could just redefine the `⟨long ⟩`-part of the `first` argument to the desired output. In this MWE, it would work just fine as I know which modification of _maximal_ is the first. But my real file is much more voluminous and I won't really know which one is the first used modification in advance. So, when finishing I would have to search the whole document whether the first uses of all acronyms are correct. So, I am searching for a way to implement that he modifications like _maximale, maximaler, maximales, maximalen,..._ on first use and only on first use, like`\acfirst{max}{way it is displayed if it's the first use}`. I already tried to work with the `user1, ... ,user6` entries, but this modifies every use, not just if it's the first. This question is related to this one, but unfortunately not quite so easy to solve.


title: Array problem, can only have one row.

text: I'm not sure what I'm doing wrong, I'm trying to create a line of bits with labels. I'm trying to do this with an array:               $\begin{array}{c|ccccccc}          \mbox{L1} & \mbox{L2} & \mbox{L3} & \mbox{L4} & \mbox{L5} & \mbox{L6} & \mbox{L7} & \mbox{L8}     0 & 0 & 1 & 0 & 1 & 0 & 1 & 1           \end{array}$      However this doesn't work, I get the error:               ! Extra alignment tab has been changed to \cr.     <recently read> \endtemplate           l.705 0 &               0 & 1 & 0 & 1 & 0 & 1 & 1 \end{array}$     ?       It does work if I only have one row. What is going wrong? I'm compiling with pdfLaTeX. Alternatively if there's a better way to do this (I'm trying to label a row of bits so that the distances between the 1s and 0s remains constant) let me know.


title: Is there a way to know which words LaTeX hyphenate when I build a .tex

text: > **Possible Duplicate:**   >  Check all hyphenations within a document I'm having problems with hyphenation patterns in babel's spanish. I'm using MikTeX on Windows and it seems very difficult to solve this problem, at least with my current MikTeX configuration. So, it would be extremely helpful if LaTeX tells me "hey, I've just finished and these are the words I hyphenated, look if they are wrong" when it finish building the document. Is there a way to accomplish this?


title: How can I set the background color of the rows and columns of a matrix node in Tikz?

text: I have a matrix where some cells have nodes while others don't, with rows and columns of varying size depending on the biggest nodes in them. In this matrix, I would like to have the background of rows and columns in the matrix with alternate colors. How can this be done? Here's an example of a matrix to be coloured:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{tikzpicture}     \matrix [matrix of nodes,              row sep=2mm,              column sep=1mm,              nodes={draw, thick, circle, inner sep=1pt}] (ma)      {        & 1 & &[2mm]|[gray]|1\\        & & 2 &|[gray]|2\\        |[gray]|2 & & &|[gray]|2\\[4mm]        3 & & & 3\\      };     \end{tikzpicture}


title: Formatting a conditional table of coefficients in LaTeX

text: I'm totally blanking on how to format this, or even what to use as a search term to see if anyone has asked about it before. I would like to make a conditional table of coefficients (ie. two tables with use dependant on another variable in the equation), here is an example that I pulled out of another paper: ![enter image description here](http://i.stack.imgur.com/4iyFK.jpg)


title: How can I fix the zoom for viewing landscape pages in pdf-readers?

text: Consider this MWE and pdflatex:               \documentclass{article}     \usepackage{pdflscape}% 2008/08/11 v0.10     \usepackage[pdfpagelayout=TwoColumnRight]{hyperref}% 2012/11/06 v6.83m     \begin{document}     x \newpage     x \newpage     x     \begin{landscape}     x \newpage     x     \end{landscape}     \newpage     x \newpage     x     \end{document}      When opening the resulting pdf file with Adobe Reader 11.0.2 the content is shown at 64.8% size. When I scroll down and reach the landscape pages, the view is automatically changed to 50.1% to fit both pages into view. This is OK so far. But scrolling upward again (or downward for a longer document) its view size does not return to 64.8%. Indeed, when now using "One column, fit to window width" 100% is used, but when I chose "One column, fit to window width" immediately after opening the file without scrolling to the landscape pages then 130% is used. Is there something I can do at the LaTeX side to get to the 64.8%/130% view size again? Entering those values manually in the pdf viewer is possible for me, but not very user friendly for possible readers of the pdf. When using the Sumatra pdf viewer, the smaller zoom values are used already when opening the document. While this is more consistent, I would like to use the larger zoom values, maybe fixed. There are just a few landscape pages and hundreds of portrait ones, after all.


title: Tikz: how to make a node within a text?

text: I would like to add a tikz node within a text in such a way that it doesn't add space between the lines. In particular, I'd like to animate (in beamer) a frame around the text without it taking space. Below is an example of what I'm trying to do. Many thanks in advance!               \documentclass{beamer}     \usepackage{tikz}          \tikzset{          alt/.code args={<#1>#2#3}{%            \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}          },         BeamerAlert/.style={alt=#1{draw=red,thick,rounded corners}{},anchor=base}     }          \newcommand<>{\tikzMe}[1]{        \tikz[baseline]\node[BeamerAlert=#2] {${#1}$};     }          \begin{document}     \begin{frame}       This is an \tikzMe<2>{\mathsf{example}} of       text with the space between lines changed because of the tikz       node. Here is another line whose spacing is natural.          \end{frame}     \end{document}


title: Modifying apsrev.bst file?

text: I would like that my references for which I use `apsrev` show the title of the article. I've found here apsrev-title.bst file that should allow me to do so. But this doesn't work :\ I've downloaded this .bst style, put it in revtex folder where .bst files are, but I get the error               I couldn't open style file apsrev-title.bst     ---line 38 of file diplomski.aux      : \bibstyle{apsrev-title      :                       }     I'm skipping whatever remains of this command     I found no style file---while reading file diplomski.aux      So what am I doing wrong? How to implement this? I also looked at .diff file but I don't know what to do with it. Any help will be appreciated :)


title: Reset an active character in \href

text: In my document, the symbol `/` is active. This leads to the problem with links. Instead of the slash they contain expansion of the slash. Wanted: `http://aaa/ggg/ddd/` Got: `http://www.\discretionary%20{.com/}{}{/ }\discretionary%20{/}{}{/}aaa\discretio nary%20{/}{}{/}ggg\discretionary%20{/}{ }{/}ddd\discretionary%20{/}{}{/}` How to get the desired result?               \documentclass{article}     \usepackage{lipsum}     \usepackage{hyperref}          \def\SlashDesc{\discretionary{/}{}{/}}     \AtBeginDocument{\catcode`\/=\active}     \catcode`\/=\active     \def/{\SlashDesc}          \pdfstringdefDisableCommands{\def/{X}} % Doesn't help          \begin{document}          \begin{minipage}{5cm}     \lipsum*[75]     \href{http://aaa/ggg/ddd/}{aaa/bbb/ccc/ddd/eee/fff/ggg/hhh/iii/jjj/kkk/lll}     \end{minipage}          \end{document}


title: Referencing user guide

text: Can someone help me to reference this user guide in LaTeX? I'm searching for a tutorial of how to reference a user guide, but can't find one. Does it fall in the category of article?               MIT Java Wordnet Interface (JWI)     User’s Guide     Version 2.2.x     Mark A. Finlayson     (markaf@alum.mit.edu)     November 16, 2011      * * * The bibliography is set by BibTeX with the style `plainnat` (requires `natbib`) I've used TexStudio to generate the citation. It was generated as _MIT Java Wordnet Interface (JWI) Users Guide._ using the code below:               @manual{jwimit,     ALTauthor = {Mark A. Finlayson},     title = {MIT Java Wordnet Interface (JWI) User’s Guide},     date = {November 16, 2011},     OPTlanguage = {English},     OPTversion = {Version 2.2.x},     OPTorganization = {MIT},     OPTpagetotal = {10},     OPTpubstate = {November 16, 2011},     }


title: Why should a table caption be placed above the table?

text: In the papers I read the caption in figure floats is placed below the figure and in table floats the caption is placed above the table. I recognize that this is a common style that a lot of people recommend. But what is the reason behind this difference?


title: Using parskip with ntheorem in a book

text: I am writing a mathematical `book` and would like to use `ntheorem` for theorems. Also, I would like to use `parskip`, because I like these styles of paragraphs more. My problem is that as soon as I include the package `parskip`, the spacing before and after theorems gets changed too. How can one avoid that? I tried to use the commands `\theorempreskip` and `\theorempostskip` to modify my ntheorem. But although these commands are listed in the official CTAN documentation, I always get errors like `undefined control sequence \theorempreskip`. Here is an MWE:               \documentclass{book}     \usepackage{amsmath}                %mathematical expressions     \usepackage{amscd}                  %commutative diagrams     \usepackage{amssymb}                %ams math symbols     \usepackage[T1]{fontenc}            %german umlauts      \usepackage[utf8]{inputenc}         %UTF-8 compatibility     \usepackage{parskip}                %no indentation at beginning of paragraph     \usepackage[thmmarks,amsmath]{ntheorem}               %Theoremstyles     \makeatletter     \newtheoremstyle{mythmstyle}%     {\item[\theorem@headerfont\hskip\labelsep ##1\ ##2\theorem@separator]}%     {\item[\theorem@headerfont\hskip\labelsep ##1\ ##2\ \normalfont{(##3)}\textbf{\theorem@separator}]}      \makeatother          %Theorems with mystle     \theoremstyle{mythmstyle}     \theoremheaderfont{\normalfont\bfseries}     \theorembodyfont{\normalfont}     \theoremseparator{.}     \theoremsymbol{$\blacklozenge$}     %\theorempreskip{\baselineskip}     %\theorempostskip{\baselineskip}          \newtheorem{Def}{Definition}               \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend blandit dolor, vel ultricies erat suscipit sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Duis accumsan magna et purus facilisis posuere.      \begin{Def}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend blandit dolor, vel ultricies erat suscipit sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Duis accumsan magna et purus facilisis posuere.     \end{Def}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend blandit dolor, vel ultricies erat suscipit sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Duis accumsan magna et purus facilisis posuere.           \end{document}     %Theoremstyles     \makeatletter     \newtheoremstyle{mythmstyle}%     {\item[\theorem@headerfont\hskip\labelsep ##1\ ##2\theorem@separator]}%     {\item[\theorem@headerfont\hskip\labelsep ##1\ ##2\ \normalfont{(##3)}\textbf{\theorem@separator}]}      \makeatother          %Theorems with mystle     \theoremstyle{mythmstyle}     \theoremheaderfont{\normalfont\bfseries}     \theorembodyfont{\normalfont}     \theoremseparator{.}     \theoremsymbol{$\blacklozenge$}     %\theorempreskip{\baselineskip}     %\theorempostskip{\baselineskip}          \newtheorem{Def}{Definition}               \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend blandit dolor, vel ultricies erat suscipit sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Duis accumsan magna et purus facilisis posuere.      \begin{Def}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend blandit dolor, vel ultricies erat suscipit sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Duis accumsan magna et purus facilisis posuere.     \end{Def}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend blandit dolor, vel ultricies erat suscipit sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Duis accumsan magna et purus facilisis posuere.           \end{document}


title: Specifying undefined ligatures with XeTeX

text: When I started to play with XeTeX, I noticed, that some of the True Type fonts does not produces the standard five ligatures properly (fi, fl, ff, ffi, ffl), even if they have some of the proper character for that. Is it possible to define such ligatures for certain fonts?


title: Slow compilation XeTeX - misused \newtoks?

text: I'm trying to make a package for easy font switching for XeTeX. The command that loads such fonts, would automatically try to substitute the missing font (like slanted fonts), and try to guess the font type, and set all the definitions that were defined by default for Computer Modern font. I have an attempt for that, but I clearly remember, that that does not takes too much time to compile. Now I'm trying to remake with a different approach, that compiling it by it self takes too much time. I'm not certain of the proper use of \newtoks, but I use that to store the name of the font, so whenever I slightly change for instance the font size, I can apply it by only reissue an apply command. Is that possible, that such tokens takes up to ~5-10 second? Or MikTeX have completely wrong setup for XeTeX? **Edit** After some debugging, I figured out, that the slower part is for loading Computer Modern font _again_. Someone asked me to share the code, however, now that I know where is the problem, I only share the necessary part of the code. (Not that if it would be a secret. I shared a link to the code) Slow part is marked with the text "Ridiculously slow, no matter what".               % Define tokens for fontfaces     \newtoks\rmface     \newtoks\itface     \newtoks\slface     \newtoks\bfface     \newtoks\biface  % Bold italic     \newtoks\bsface  % Bold slanted     % Technically impossible to create MORE slanted (slanted) italic font, or     % slanted bold slanted italic.     \newtoks\ttface          % I slightly modified the Typewriter Type, so it can be used, with \rm \it etc.     % Although its still be available with \tt.     \newtoks\ttrmface     \newtoks\ttitface     \newtoks\ttslface     \newtoks\ttbfface     \newtoks\ttbiface     \newtoks\ttbsface          \newtoks\titleface     \newtoks\titleitface     \newtoks\titleslface     \newtoks\titlebfface     \newtoks\titlebiface     \newtoks\titlebsface          \newtoks\mrmface % Math roman (for Ms font set)     \newtoks\mitface % Math italic     \newtoks\msyface % Math symbols     \newtoks\mexface % Math extended     \newtoks\calface % Caligraphic face (Restored to default if empty)     \newtoks\setface % Caligraphic face (Removed/Ignored if empty)     \let\omathbb=\relax % Temporary placement of \mathbb, if defined.          [...]          \rmface={cmr10}     \itface={cmr10}     \slface={cmsl10}     \bfface={cmbx10}     \biface={cmbxti10}     \bsface={cmbxsl10}          \titleface={cmss10}     \titleitface={cmssi10}     \titleslface={cmssi10}     \titlebfface={cmssdc10}     \titlebiface={cmssbx10}     \titlebsface={cmssqi8}          \ttface={cmtt10}     \ttrmface={cmtt10}     \ttitface={cmitt10}     \ttslface={cmsltt10}     \ttbfface={cmtt10}     \ttbiface={cmitt10}     \ttbsface={cmsltt10}          \mrmface={cmr10}     \mitface={cmmi10}     \msyface={cmsy10}     \mexface={cmex10}     \calface={}     \setface={}          \fontsize=10pt     \count\footins=830     \titlesize={3}     \hasize={1.5}     \hbsize={1.17}     \hcsize={1.17}     \hdsize={1}     \hesize={1}     \hfsize={.85}     \hgsize={.85}     \hhsize={.85}     \hisize={.85}          [...]          % Defining main font faces     \font\trm="\the\rmface" at \fontsize%     \ifnum\XeTeXfonttype\trm=0\def\oldstyle{\fam1\tit}\else%     \font\osy="\the\rmface:+onum" at \fontsize%     \def\oldstyle{\fam8\osy}\fi%     \if&\the\itface&%     \font\tit="\the\rmface:slant=.2" at \fontsize%     \font\sit="\the\rmface:slant=.2" at .7\fontsize%     \font\fit="\the\rmface:slant=.2" at .5\fontsize%     \else%     \font\tit="\the\itface" at \fontsize%     \font\sit="\the\itface" at .7\fontsize% Ridiculously slow, no matter what.     \font\fit="\the\itface" at .5\fontsize%     \fi%     \if&\the\slface&%     \font\tsl="\the\rmface:slant=.167" at \fontsize%     \font\ssl="\the\rmface:slant=.167" at .7\fontsize%     \font\fsl="\the\rmface:slant=.167" at .5\fontsize%     \else%     \font\tsl="\the\slface" at \fontsize%     \font\ssl="\the\slface" at .7\fontsize%     \font\fsl="\the\slface" at .5\fontsize%     \fi%     \if&\the\bfface&%     \font\tbf="\the\rmface:embolden=3" at \fontsize%     \font\sbf="\the\rmface:embolden=3" at .7\fontsize%     \font\fbf="\the\rmface:embolden=3" at .5\fontsize%     \else%     \font\tbf="\the\bfface" at \fontsize%     \font\sbf="\the\bfface" at .7\fontsize%     \font\fbf="\the\bfface" at .5\fontsize%     \fi%     \if&\the\biface&\if&\the\itface&\font\tbi="\the\rmface:embolden=3:slant=.2" at \fontsize%     \else\font\tbi="\the\itface:embolden=3" at \fontsize\fi%     \else\font\tbi="\the\biface" at \fontsize\fi%     \if&\the\bsface&\if&\the\bfface&\font\tbs="\the\rmface:embolden=3:slant=.167" at \fontsize%     \else\font\tbs="\the\bfface:slant=.167" at \fontsize\fi%     \else\font\tbs="\the\bsface" at \fontsize\fi%     \if&\the\ttface&%     \else%     \font\ttt="\the\ttface" at \fontsize%     \font\stt="\the\ttface" at .7\fontsize%     \font\ftt="\the\ttface" at .5\fontsize%     \fi%     % Math font face definitions     \if&\the\mrmface&%     \font\mtrm="\the\rmface" at \fontsize%     \font\msrm="\the\rmface" at .7\fontsize%     \font\mfrm="\the\rmface" at .5\fontsize%     \ifnum\XeTeXfonttype\mtrm=0\let\mosy=\relax\else\font\mosy="\the\rmface:+onum" at \fontsize\fi%     \else%     \font\mtrm="\the\mrmface" at \fontsize%     \font\msrm="\the\mrmface" at .7\fontsize%     \font\mfrm="\the\mrmface" at .5\fontsize%     \ifnum\XeTeXfonttype\mtrm=0\let\mosy=\relax\else\font\mosy="\the\mrmface:+onum" at \fontsize\fi%     \fi%     \if&\the\mitface&%     \font\mtit="\the\itface" at \fontsize%     \font\msit="\the\itface" at .7\fontsize%     \font\mfit="\the\itface" at .5\fontsize%     \else%     \font\mtit="\the\mitface" at \fontsize%     \font\msit="\the\mitface" at .7\fontsize%     \font\mfit="\the\mitface" at .5\fontsize%     \fi%     \font\mtsy="\the\msyface" at \fontsize%     \font\mssy="\the\msyface" at .7\fontsize%     \font\mfsy="\the\msyface" at .5\fontsize%     \font\mtex="\the\mexface" at \fontsize%     \font\msex="\the\mexface" at .7\fontsize%     \font\mfex="\the\mexface" at .5\fontsize%     \if&\the\calface&%     \def\cal{\fam2}%     \else%     \font\tcal="\the\calface" at \fontsize%     \font\scal="\the\calface" at .7\fontsize%     \font\fcal="\the\calface" at .5\fontsize%     \textfont9=\tcal\scriptfont9=\scal\scriptscriptfont9=\fcal%     \def\cal{\fam9\tcal}%     \fi%     \if&\the\setface&%     \ifx\omathbb\relax\let\mathbb=\relax\else\let\mathbb=\omathbb\let\omathbb=\relax\fi%     \else%     \font\tset="\the\setface" at \fontsize%     \font\sset="\the\setface" at .7\fontsize%     \font\fset="\the\setface" at .5\fontsize%     \textfont10=\tset\scriptfont10=\sset\scriptscriptfont10=\fset%     \ifx\omathbb\relax\ifx\mathbb\relax\else\let\omathbb=\mathbb\fi\fi%     \def\mathbb####1{{\fam10\tset####1}}%     \fi%     % Family setup     \textfont0=\mtrm\scriptfont0=\msrm\scriptscriptfont0=\mfrm%     \textfont1=\mtit\scriptfont1=\msit\scriptscriptfont1=\mfit%     \textfont2=\mtsy\scriptfont2=\mssy\scriptscriptfont2=\mfsy%     \textfont3=\mtex\scriptfont3=\msex\scriptscriptfont3=\mfex%     \textfont4=\tit\scriptfont4=\sit\scriptscriptfont4=\fit%     \textfont5=\tsl\scriptfont5=\ssl\scriptscriptfont5=\fsl%     \textfont6=\tbf\scriptfont6=\sbf\scriptscriptfont6=\fbf%     \textfont7=\ttt\scriptfont7=\stt\scriptscriptfont7=\ftt%     \ifx\mosy\relax\else\textfont8=\mosy\scriptfont8=\mosy\scriptscriptfont8=\mosy\fi%     %     \rm%     \initrmfam%     \inititfam%     \initsyfam%     \initexfam%      (The code above follow the procession order, and not how it appears in the file)   The interesting part, that no matter what I removed, the next line that stood in its place become slow, so it may be independent from what is on that line.


title: EViews Output and Tables

text: EViews has an add-in which apparently outputs latex, but I can't install it on my faculty computers. I can save the output as a csv. Is there any way of me creating nicer looking tables in my document without having to input the numbers in manually?


title: How can I typeset with LaTeXDB using XeLaTeX?

text: Related question Using the sample code on this site, http://hgesser.com/software/latexdb/workshop.html, I would like to   * query my MySQL database and typeset using XeLaTeX.  This is because all of my documents are set up using `UTF8` and `\usepackage{fontspec}`. I have checked out the documentation and I cannot seem to find anything on it. The typesetting python script `latexdb.py` may have the answer, but I am not a pro on the internal code in there. Does anyone have insight on this? **UPDATE 10APR2013:** I have contacted the maker of LaTeXDB and he responded: > I believe that the specific TeX dialect you use should be irrelevant, you'd > only have to modify the LaTeXDB script since it makes explicit calls to > pdfLaTeX or latex [...] This assumes that xelatex uses input files with an > encoding that my script can cope with; `UTF-8` and `ISO-Latin-*` should be > fine. Based on this information, I just modified the command at the bottom of LaTeXDB, changing the LaTeX command to XeLaTeX like               # call latex with all options from the dblatex command line      xelatex $@      mv -f $pretex.backup $pretex      In the following code you've got your database connection variables:   * Database: `mydatabase`   * Table: `mytable`   * column `hd`   * column `md` Now loop over the rows (records) in `mytable` for columns `hd`and `md` and print the output into a table. **The Code**               \documentclass[a4]{article}     \usepackage{fontspec}     \texdbconnection{MySQL,localhost,root,password,mydatabase}     \texdbdef{##query1}{select hd,md from mytable}{##hd,##md}          \begin{document}     This is a header for the page.          \begin{tabular}{|l|l|}     \hline     Hochdeutsch & Mantakisch \\     \texdbfor{##query1}{\hline \textit{##hd} & \textbf{##md}\\}     \hline     \end{tabular}\\          \end{document}      **Why do I keep getting this error when typesetting with LaTeXDB?** (It seems like it isn't really typesetting with XeLaTeX)               latexdb database.tex     Pre-Compiling database.tex (loop 1)     Traceback (most recent call last):       File "/opt/local/bin/latexdb.py", line 274, in <module>         _main_()       File "/opt/local/bin/latexdb.py", line 262, in _main_         texDBparseForLoop(l)       File "/opt/local/bin/latexdb.py", line 151, in texDBparseForLoop         for qR in texDBresult(queryString):       File "/opt/local/bin/latexdb.py", line 68, in texDBresult         cursor=db.cursor()     NameError: global name 'db' is not defined     This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/MacPorts 2012_7)      restricted \write18 enabled.     entering extended mode     (./database.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo     aded.     (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/opt/local/share/texmf-texlive-dist/tex/latex/base/size10.clo))     (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/expl3.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3names.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3bootstrap.sty))     (/opt/local/share/texmf-texlive-dist/tex/latex/etex-pkg/etex.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/color.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/color.cfg)     (/opt/local/share/texmf-texlive-dist/tex/xelatex/xetex-def/xetex.def))     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphics.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/trig.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/graphics.cfg))     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3basics.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3expan.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3tl.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3seq.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3int.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3quark.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3prg.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3clist.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3token.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3prop.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3msg.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3file.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3skip.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3keys.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3fp.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3box.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3coffins.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3color.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3luatex.sty))     (/opt/local/share/texmf-texlive-dist/tex/latex/l3packages/xparse/xparse.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec-patches.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/base/fixltx2e.sty)     *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \oldstylenums with arg. spec. 'm' on line 107.     *************************************************     ) (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec-xetex.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/base/fontenc.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1enc.def)     (/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1lmr.fd))     (/opt/local/share/texmf-texlive-dist/tex/xelatex/xunicode/xunicode.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/tipa/t3enc.def     (/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1lmss.fd))     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphicx.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/keyval.sty)))     (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec.cfg)))          LaTeX Warning: Unused global option(s):         [a4].          (./database.aux) (/opt/local/share/texmf-texlive-dist/tex/latex/tipa/t3cmr.fd))          *      Mr. Eßer also noted that there are two newer reimplementations of his code   1. http://www.ctan.org/pkg/ratexdb (Ruby based)   2. https://sourceforge.net/projects/nlatexdb/ (C based) ...It should be noted that I have been awarded the Tumbleweed badge, yoohoo! (with sarcasm) for this question.... * * * **QUICK FIX** If anybody reading this needs a solution **NOW** like me and you don't care how it gets done, you could setup **MySQL-python** (MySQLdb) and just generate the code necessary for a XeLaTeX `longtable`.   1. Save the following code as `database.py`.   2. Run > python database.py > ~/Desktop/database.txt >   3. Then copy and paste that data into your TeX document. Compile as you > normally would. (Don't forget to include `\usepackage{longtable}`.) Or even > better, use `\include{./database.txt}`. You move the `longtable` (or > `longtabu`) environment from the python code directly into the master > document for better control. > **Python Code:**               #!/usr/bin/python     # a simple script to pull some data from MySQL          import MySQLdb          db = MySQLdb.connect(host="localhost", user="root", passwd="yourpassword", db="databasename")          db.set_character_set('utf8')          #create a cursor for the select     cur = db.cursor()          cur.execute('SET NAMES utf8;')     cur.execute('SET CHARACTER SET utf8;')     cur.execute('SET character_set_connection=utf8;')          #execute an sql query     cur.execute("SELECT column1,column2 FROM table")               print "\\begin{longtable}{| p{.20\textwidth} | p{.80\textwidth} |}"          ##Iterate      for row in cur.fetchall() :           #data from rows             column1_name = str(row[0])             column2_name = str(row[1])                #print              print "" + column1_name + " & " + column2_name +  "\\\\" + "\n" + "\\hline"          # close the cursor     cur.close()          # close the connection     db.close ()          print "\\end{longtable}"


title: Where to put the acknowledgements in a thesis document?

text: Basically there are three possibilities:   1. add just a 'Acknowledgement' section as last section of you introduction chapter   2. put it at the end - between the last appendix and the bibliography   3. put it after the abstract page and before the table of contents I see 1 a lot in books and 2 a lot in thesis documents. 3 is suggested by the KOMA guide (not - see edit). To implement 3 I would just use a second abstract environment in KOMA script (with a redefined abstract name):               \documentclass[twoside,abstracton]{scrreprt}     \usepackage[english]{babel}     \title{title}     \author{author}     \begin{document}     \maketitle     \begin{abstract}     One     \end{abstract}     %\KOMAoptions{abstract=false}     \renewcaptionname{english}{\abstractname}{Acknowledgements}     \begin{abstract}     Two     \end{abstract}     \tableofcontents      \chapter{Chapter}     text     \end{document}      How would you implement the third choice? What is the best choice from an aesthetic/type-setting point of view? **Edit** : Uh, I mixed up the numbers regarding the KOMA guide. The guide actually recommends 2: > Acknowledgements in the introduction? No, the proper acknowledgements can be > found in the addendum. My comments here are not intended for the authors of > this guide — and those thanks should rightly come from you, the reader, > anyhow. I, the author of KOMA - Script, would like to extend my personal > thanks to Frank Neukam.[..] Hm, 'Special Thanks' vs. 'Acknowledgements' ...


title: Vertical line in binomial tree is ruining node coloring

text: How do I stop the dummy nodes from being colored? ![enter image description here](http://i.stack.imgur.com/LTdWa.png)               \documentclass{article}           \usepackage{tikz}      \usetikzlibrary{matrix,fit,backgrounds,calc}                      \begin{document}           \begin{tikzpicture}[>=stealth,sloped]          \matrix (tree) [%            matrix of nodes,            minimum size=1cm,            column sep=2.5cm,            row sep=0.4cm,           column 2/.style={nodes={draw,fill=green!30,rounded corners}},            column 3/.style={nodes={draw,fill=red!30,rounded corners}},          ]          {                    & |(top-left)|       & |(top-right)|       &  $_0 S_T$             \\                    &                    &  $_0S_{2\Delta t}$  &                  \\                    & $_0S_{\Delta t}$   &                     &  $_1 S_T$             \\            $_0S_0$ &                    &  $_1S_{2\Delta t}$  &                  \\                    & $_1S_{\Delta t}$   &                     &  $_2 S_T$         \\                    &                    &  $_2S_{2\Delta t}$  &                \\                    & |(bottom-left)|    & |(bottom-right)|    &  $_3 S_T$    \\          };               \draw[->] (tree-4-1) -- (tree-3-2) node [midway,above] {$p$};          \draw[->] (tree-4-1) -- (tree-5-2) node [midway,below] {$1-p$};          \draw[->] (tree-3-2) -- (tree-2-3) node [midway,above] {};          \draw[->] (tree-3-2) -- (tree-4-3) node [midway,below] {};          \draw[->] (tree-5-2) -- (tree-4-3) node [midway,above] {};          \draw[->] (tree-5-2) -- (tree-6-3) node [midway,below] {};               \draw[->] (tree-2-3) -- (tree-1-4) node [midway,above] {};          \draw[->] (tree-2-3) -- (tree-3-4) node [midway,below] {};          \draw[->] (tree-4-3) -- (tree-3-4) node [midway,above] {};          \draw[->] (tree-4-3) -- (tree-5-4) node [midway,below] {};          \draw[->] (tree-6-3) -- (tree-5-4) node [midway,above] {};          \draw[->] (tree-6-3) -- (tree-7-4) node [midway,below] {};               % t-line          \draw[dashed] ($(top-left.north)!.5!(top-right.north)$) -- ($(bottom-left.south)!.5!(bottom-right.south)$);          \node at ($(bottom-left.south)!.5!(bottom-right.south)-(0,1em)$) {$\tau$};             \end{tikzpicture}            \end{document}


title: Error while using leavevmode before newline

text: I am using `\newline` but I get some error message and I was suggested on this forum to use `\leavevmode` before `\newline`. It works fine for my code except at few place where I get this error message.                ! Undefined control sequence.      l.399 \leavevmode      How to avoid such warning/error?


title: Unmodified Source Code

text: I have a macro that helps me print out(or do anything really) source code in various ways using lua: see: `xparse verbatim` with `newline` The macro is               \def\SourceCode{%       \begingroup%       \endlinechar`\^^J%       \catcode`\\=12\catcode`\^^M=12\catcode`\#=12\catcode`\~=12\catcode`\%=12\catcode`\^=12\catcode`\_=12\catcode`\@=12\catcode`\ =12\catcode`\|=12%       \SourceCodeAux}%     \def\SourceCodeAux#1#2{\endgroup\directlua{print("\luaescapestring{#1}")}}%      In this case we just print the code to the console to view if it is correct. The issue is that `\detokenize` adds a space after macro's. Is there any way to stop this behavior or reverse it? (I'm thinking if we could use a different, non-visible or not used in the source code block, escape character then maybe it will be possible?) * * *               \documentclass{minimal}     \usepackage{luatex}\directlua{tex.enableprimitives('',tex.extraprimitives())}          \def\SourceCode{%       \begingroup%       \endlinechar`\^^J%       \catcode`\\=12\catcode`\^^M=12\catcode`\#=12\catcode`\~=12\catcode`\%=12\catcode`\^=12\catcode`\_=12\catcode`\@=12\catcode`\ =12\catcode`\|=12%       \SourceCodeAux}%     \def\SourceCodeAux#1#2{\endgroup\directlua{print("\luaescapestring{#1}")}}%               \begin{document}          \SourceCode{        \documentclass{minimal}        \def\SourceCode{%           \begingroup%           \obeyspaces%           \endlinechar`\^^J%           \catcode`\^^M=13%           \SourceCodeAux}%        \def\SourceCodeAux#1#2{\directlua{print("\luaescapestring\expandafter{\detokenize{#1}}")}\endgroup}%     }     \end{document}


title: How to set the space between rows in a table

text: This is the Latex code I have to create a table:               \documentclass{article}          \usepackage{amsmath}     \usepackage{tabularx}     \usepackage[top=0.5cm, bottom=0.5cm, left=0.5cm, right=0.5cm, columnsep=0.75cm]{geometry}          \begin{document}          \subsubsection*{Fourier Transform properties}     \begin{tabular}{l@\quad|@\quad l@\quad|@\quad l@\quad|@\quad l}         Property & Time domain & Frequency domain & Condition \\         \hline         Time-shift & $f(t - \tau)$ & $\hat{f}(\omega)e^{-i \omega \tau}$ \\         Frequency-shift & $f(t) e^{i \omega_0 t}$ & $\hat{f}(\omega - \omega_0)$ \\         Modulation Thm. & $f(t)\cos(\omega_0 t)$ & $\cfrac{\hat{f}(\omega-\omega_0)+\hat{f}(\omega+\omega_0)}{2}$ \\         Differentiation (time) & $f^{(n)}(t)$ & $(i\omega)^n \hat{f}(\omega)$ & $\lim_{t \to \pm \infty} f(t) = 0$     \end{tabular}          \end{document}      With this code there is no space between the rows in the table. How can I add some space (let's say 0.3 cm) between the rows? I've tried a few things, but they don't work as expected. When using `\setlength{\extrarowheight}{0.3cm}`, the table looks like this: ![extrarowheight](http://i.stack.imgur.com/IWe5j.png) As you can see, no space is added between the third and the fourth row. Also, the text in the header row is aligned at the bottom, which does not look nice. When using `\renewcommand{\arraystretch}{1.8}`, the table looks like this: ![arraystretch](http://i.stack.imgur.com/xKc5L.png) This looks better, but the space between the second and third row is twice as big as the space between the third and fourth row. Which command can I use that always puts the same amount of spacing between two rows?


title: How to bring equation into the middle of the line

text: I am trying to put this below equation in latex and also I need it in the middle of the line.               PPV =TP /(TP + FP)


title: How to represent this superscript?

text: I am trying to write this command below but it doesnt work.               $$\triangle$^m$