title: Latex Table write Text beside \hline

text: I want to add text beside the **\hline** line in order to structure my table more accurately. The following picture illustrates what I want, the code represents the table. Anyone has some ideas? I'd appreciate a lot. ![enter image description here](http://i.stack.imgur.com/PBRwu.png)               \begin{table}[htbp]\centering         \renewcommand{\arraystretch}{1.3}         \caption[..]{..} \label{tab:trigger}              \begin{tabular}{l | r}                \multicolumn{1}{c|}{\textbf{PARAMETER}}     &   \multicolumn{1}{c}{\textbf{VALUE}}      \\          \hline \hline              STA window                  &       $\SI{5}{s}$         \\         LTA window                  &       $\SI{100}{s}$       \\         Trigger level               &       4.4                 \\         De-trigger level            &       1.5                 \\         \hline              Filter                      &       $3-15$ Hz           \\         Pre-event time              &       $\SI{60}{s}$        \\         Extract duration            &       $\SI{120}{s}$       \\         Minimum trigger duration    &       $\SI{5.8}{s}$       \\         Freeze LTA window           &       no                  \\              \end{tabular}     \end{table}


title: Non-ascii character as argument

text: I want to do something special with some characters in the text. In this example that is just boldfacing them:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \newcommand\<[1]{\textbf{#1}}          \begin{document}     f\<oo b\<ar b\<öll     \end{document}      This works fine for the two first cases, but not for the non-ascci character "ö". There is an error message               ! Package inputenc Error: Unicode char \u8:\check@icr not set up for use with LaTeX.      which is reported between the two bytes making up "ö" in utf8.   1. I know this works with XeLaTeX or LuaLaTeX (just by removing the inputenc line). It does not work in pdfLaTeX and (DVI)LaTeX.   2. One workaround is to write `\<{ö}`.   3. But is there a way to get this to work with pdflatex without that workaround? (In the actual application an active character is used, since the point is to have something that disturbs the view of the source text as little as possible.)


title: A conditional independence symbol that looks good with \mid?

text: I would like to typeset some expressions involving conditional independence. Here is an example of what I'm aiming for (from Judea Pearl's classic text on causality): ![enter image description here](http://i.stack.imgur.com/VXq1C.png) In this question and its answer, three ways to generate this symbol are given. The first two are based on `\perp`:               \newcommand\ci{\perp\!\!\!\perp}          \newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}} % symbols-a4, p.106     \def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}       The third is the command `\upmodels` in the `MnSymbol` package. Here is what the three methods look like in practice: ![enter image description here](http://i.stack.imgur.com/nIBK8.png) To my eyes none of these look great. The problem is that `\perp` and `\upmodels` are designed for use in mathematical logic expressions, and haven't been designed to look harmonious with the `\mid` character. The top of the vertical lines is not level with the top of the `\mid` character, and I think this makes the symbol look too small. I tried making my own conditional independence sign using `|`s and an underline, like this: (I'm sure this is not the best way to get the height of the underline right, but it seems to work.)               \newcommand\bigCI{\mathop{\underline{\raisebox{0pt}[0pt][1pt]{$\;||\;$}}}}      ![enter image description here](http://i.stack.imgur.com/LtlYk.png) But it looks silly having it extend so far below the baseline. So my question is, how can I achieve something like this, but where the horizontal line is level with the letters' baseline (or possibly slightly below it), and the top of the vertical lines are level with the top of the `\mid`? It's desirable to avoid extra packages as much as possible, because I hope a good solution to this can become somewhat "standard". If it's not possible to do it with standard commands then I guess I could try to draw it in Tikz, but that seems like overkill.


title: How can I place tables after first \autoref when tables are all defined in one place or contained in a separate file  called by \input?

text: ## Background I have a set of tables that can be automatically generated (specifically, a set of database table descriptions generated by phpmyadmin). I would like to include each tables in the document after it is mentioned. I think that I understand how the table placement commands work [htbp], but these are not the issue. ## Question Is there a simple way to force float placement after a reference? ## Examples ### This is a MWE of what I have               \documentclass[10pt]{article}     \usepackage{hyperref}          \begin{document}     \input{dbtables.tex}     % in practice, all tables appear here          \section{tables}           \subsection{table1}       \autoref{tab:table1} is for this.       % I want Table 1 to appear here           \subsection{table2}       \autoref{tab:table2} is for that.       % I want Table 2 to appear here          \end{document}      Where the contents of `dbtables.tex` might be               \begin{table}[hb]     \caption{test table 1}     \label{tab:table1}     \begin{tabular}{ l c r }       1 & 2 & 3 \\     \end{tabular}     \end{table}          \begin{table}[hb]     \caption{test table 2}     \label{tab:table2}     \begin{tabular}{ l c r }       4 & 5 & 6 \\     \end{tabular}     \end{table}      ### In the end, the result that I want would be similar to:               \documentclass[10pt]{article}     \usepackage{hyperref}          \begin{document}     \input{dbtables.tex}          \section{tables}           \subsection{table1}       \autoref{tab:table1} is for this.          \begin{table}[hb]     \caption{test table 1}     \label{tab:table1}     \begin{tabular}{ l c r }       1 & 2 & 3 \\     \end{tabular}     \end{table}           \subsection{table2}       \autoref{tab:table2} is for that.          \begin{table}[hb]     \caption{test table 2}     \label{tab:table2}     \begin{tabular}{ l c r }       4 & 5 & 6 \\     \end{tabular}     \end{table}               \end{document}      Except that I want to keep the files separate.


title: Don't have read permission

text: I installed mtpro2 manually but texstudio gave the error               Trying to make PK font mt2mit at 720 DPI...          Running miktex-makemf.exe...          miktex-makemf: The mt2mit source file could not be found. Running ttf2pk.exe...          miktex-makepk: PK font mt2mit could not be created.          Process exited with error(s)      then i closed texstudio window. after opening the program again, program gave this warning: > You don't have read permission to the file > C:/Users/Mert/AppData/Roaming/texstudio. i changed the user but nothing was different. what should i do? (Also i tried to install another package automatically but it failed.)


title: Arguments of custom commands as comma separated list?

text: Consider the follwing command:                \newcommand{\vektor}[3]{\left(\negthinspace\begin{smallmatrix}#1\\#2\\#3    \end{rsmallmatrix}      \right)}      I can use it like               $\vektor{1}{2}{3}$      Now my question is whether it is possible to redefine the command such that the arguments are a comma separated list, such that I could write:               $\vektor{1,2,3}$


title: What is the better option to include some "snapshots" of HTML pages in Beamer?

text: I am giving a presentation (in beamer) about creating HTML pages. I want to include some sort of "snapshot" of the created HTML file within the presentation. I am looking for something like `pdfpages` except for a webpage. Here are some of the things I tried and was not really happy with:   * Take a screenshot: shows lots of extra stuff (browser menus, etc), and difficult to show the entire file which is longer than one page   * Convert the webpage to pdf: I do have Acrobat Professional, and can convert a webpage to a pdf file and then use `pdfpages`, but it adds extra headings (small problem), and cannot convert a file with frames   * Include just a link to the file, which will open in a browser: workable for the presentation, but makes distribution of the talk more difficult as extra files are needed Are there better options? Can my solutions be improved?


title: Can I bundle images in the source file?

text: I am including some jpeg images in a LaTeX file using \includegraphics. Is there a way I can bundle the image files with the source file, and so just send one file to other machines, or collaborators? The comment by Aditya to Can you embed an image so it doesn't need to be stored as a separate file? seems to be to my point. But it does not tell me what I need to know. I am already using \includegraphics. My question is how to copy the relevant files. I'm afraid David Carlisle is right that you really cannot bundle the files. But sending them separately by cloud or any other method raises the problem of getting MiKTeX to locate jpeg files. MDR's solution at \includegraphics -- file not found, even when in same directory, using FNDB, works intermittently for me. But even on a single machine it is not reliable. I do not want to depend on it between several different machines. David, can you give your comment as an answer?


title: Comma not working inside \bm when using babel

text: When I try to compile this simple document               \documentclass{article}     \usepackage[italian]{babel}     \usepackage{bm}          \begin{document}     $\bm{,}$     \end{document}      I receive the following complaint:               ! Undefined control sequence.     \it@comma@def  ->\futurelet \let@token                                            \@@math@comma     l.7 $\bm{,}                $      and a strange number (25915) is printed on the resulting pdf instead of the comma.   Something odd is going on with the babel package, because if I remove the line               \usepackage[italian]{babel}      everything works just fine.      Any thoughts?


title: Two identical diagrams inserted with subcaption box come out at different scales

text: I have two diagrams that are 100% identical except for a red line in the other one. However, when they are included in a figure as two subfigures with `subcapionbox`, the one with the red line is scaled down. My set up for the figure is:               \documentclass{article}     \usepackage{tikz}     \usepackage[margin = .5in]{geometry}     \usepackage{standalone}     \usepackage{subcaption}     \captionsetup[subfigure]{labelformat = parens, labelsep = space, font = small}     \newcounter{rowcount}     \newcounter{columncount}     \begin{document}     \begin{figure}     \centering     \subcaptionbox{Problem}{\includestandalone[width = 3in]{exam2prob5}}     \quad     \subcaptionbox{Solution}{\includestandalone[width = 3in]{exam2prob5sol}}     \end{figure}     \end{document}      My two standalone files are:               \documentclass{standalone}          \usepackage{tikz}          \newcounter{rowcount}     \newcounter{columncount}          \begin{document}     \begin{tikzpicture}[scale=2]     \begin{scope}[rotate=-45]       % rows       \foreach[count=\y from 0] \W in {% row-wise weights         {7,8,6},         {8,8,8},         {6,9,7},         {7,8,10}%       }{         \stepcounter{rowcount}         \foreach \w [count=\x, remember=\x as \lastx (initially 0)] in \W           \draw (\lastx,\y) -- (\x,\y)             node[above,pos=0.5] {\w};       }       % columns       \foreach[count=\x from 0] \W in {% column-wise weights         {5,6,10},         {7,10,5},         {10,5,6},         {7,9,11}%       }{         \stepcounter{columncount}         \foreach \w [count=\y, remember=\y as \lasty (initially 0)] in \W           \draw (\x,\lasty) -- (\x,\y)             node[above,pos=0.5] {\w};       }       \fill (0,0) circle (0.1em) node[below left] {A};       \fill ({\value{columncount}-1},{\value{rowcount}-1}) circle (0.1em) node[below right] {B};     \end{scope}     \end{tikzpicture}     \end{document}      and Solution               \documentclass{standalone}          \usepackage{tikz}          \newcounter{rowcount}     \newcounter{columncount}          \begin{document}     \begin{tikzpicture}[scale=2]     \begin{scope}[rotate=-45]       % rows       \foreach[count=\y from 0] \W in {% row-wise weights         {7,8,6},         {8,8,8},         {6,9,7},         {7,8,10}%       }{         \stepcounter{rowcount}         \foreach \w [count=\x, remember=\x as \lastx (initially 0)] in \W           \draw (\lastx,\y) -- (\x,\y)             node[above,pos=0.5] {\w};       }       % columns       \foreach[count=\x from 0] \W in {% column-wise weights         {5,6,10},         {7,10,5},         {10,5,6},         {7,9,11}%       }{         \stepcounter{columncount}         \foreach \w [count=\y, remember=\y as \lasty (initially 0)] in \W           \draw (\x,\lasty) -- (\x,\y)             node[above,pos=0.5] {\w};       }       \fill (0,0) circle (0.1em) node[below left] {A};       \fill ({\value{columncount}-1},{\value{rowcount}-1}) circle (0.1em) node[below right] {B};       \draw[red, thick] (0, 0) -- (0, 2) -- (1, 2) -- (1, 3) -- (3, 3);     \end{scope}     \end{tikzpicture}     \end{document}      The standalone image was an answer to a previos question in How can I automate the generation of this dynamic-programming graph? The red line I added was               \draw[red, thick] (0, 0) -- (0, 2) -- (1, 2) -- (1, 3) -- (3, 3);      The pdf produces: ![enter image description here](http://i.stack.imgur.com/jSJzq.png) If I comment out the first `subcaptionbox`, the second image is then regular size. ![enter image description here](http://i.stack.imgur.com/SyHye.png) Also, there is space available for both images: ![enter image description here](http://i.stack.imgur.com/EacVy.png)


title: The table doesn't fit in the center or left side on the page?

text: I try to fit the following table on a page, but there is a lot of space on the left, and it doesn't fit in the center. Any suggestion please?               \begin{table}[h]       \centering       \resizebox{0.72\textwidth}{!}{\begin{minipage}{\textwidth}         \centering             \caption{\textbf{The first five embryonic developmental stages of \emph{Drosophila}} \citep{campos}}       \label{table: fly stages}             \begin{tabular}{|c|c|c|}        \hline     Stages & Age in minute & Developmental progresses \\      \hline         1 & 0-15 & Pronuclear fusion \\      \hline      2 & 15-70 & Preblastoderm (mitotic cycles 1-9) - early cell division - start of cleavage \\      \hline      3 & 70-90 & Pole bud formation - nuclear division 9 \\      \hline      4 & 90-130 & Syncytial blastoderm (mitotic cycles 10-13) - end of cleavage divisions \\      \hline      5 & 130-180 & Cellularization of the blastoderm \\      \hline            \end{tabular}                \end{minipage}}     \end{table}


title: How can I visualize program traces with TikZ?

text: To analyze multi-threaded program behaviour, I generate traces of code execution. Now, the chrome browser allows me to visualize it in a nice way: ![](http://i.imgur.com/kPD2yiD.png) I'd like to include a visualization like these in my TeX documents. My question is thus: is there something similar available with TikZ or pgfplots that I missed so far?


title: How can I justify without making a new line in mdframed?

text: \begin{mdframed}[backgroundcolor=green]           \textbf{Theorem:}           \begin{center} A set $E$ is {\bf open} $\iff E^c$ is {\bf closed} \end{center}            \centerline{or equivalently,}       \centerline{A set $E$ is {\bf open} $\iff E^c$ is {\bf closed} }     \end{mdframed}      So basically I want to get `Theorem` to align on the same line as `\begin{center} A set $E$ is {\bf open} $\iff E^c$ is {\bf closed} \end{center}` without producing another new line. Adding `flushleft` inside the center environment has no effect.


title: Problem randomizing answers in eqexam

text: I'm trying to use the eqexam package to randomize answers to multiple choice questions in an exam. The package works without options, but when I include the `allowrandomize` option needed for this feature I get an error. Any suggestions? My code:               \documentclass{article}     \usepackage[allowrandomize]{eqexam}%          \listfiles     \begin{document}               \begin{exam}{Exam1}     \begin{problem}     In what year did Columbus sail the ocean blue?     \begin{answers}{2}         \bChoices[random]         \Ans0 1st random choice\eAns         \Ans1\label{eq} 2nd (the correct) random choice\eAns         \Ans0 3rd random choice\eAns         \Ans0 4th random choice\eAns         \Ans0 5th random chioce\eAns         \eFreeze         \Ans0 None of these\eAns         \eChoices     \end{answers}     \end{problem}     \end{exam}          \end{document}      The error is ''missing begin document''. Again, works fine without randomization. Edit: I have added `\listfiles` before `\begin{document}`. This produces the following .log file:               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2011.7.3)  24 DEC 2012 18:34     entering extended mode      \write18 enabled.      file:line:error style messages enabled.      %&-line parsing enabled.     **"Fall Final.tex"     (./Fall Final.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,      icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or     iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,      lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol     ish, portuguese, romanian, russian, sanskrit, serbian, serbianc, slovak, sloven     ian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded     .     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/Users/ChristopherChudzicki/Library/texmf/tex/latex/eqexam.sty     Package: eqexam 2011/09/17 v3.0m An Exam Construction Package (dps)          (/usr/local/texlive/2011/texmf-dist/tex/latex/xkeyval/xkeyval.sty     Package: xkeyval 2008/08/13 v2.6a package option processing (HA)          (/usr/local/texlive/2011/texmf-dist/tex/generic/xkeyval/xkeyval.tex     \XKV@toks=\toks14     \XKV@tempa@toks=\toks15     \XKV@depth=\count87     File: xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)          (/usr/local/texlive/2011/texmf-dist/tex/generic/xkeyval/keyval.tex)))     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsmath/amstext.sty     Package: amstext 2000/06/29 v2.01          (/usr/local/texlive/2011/texmf-dist/tex/latex/amsmath/amsgen.sty     File: amsgen.sty 1999/11/30 v2.0     \@emptytoks=\toks16     \ex@=\dimen103     ))     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amssymb.sty     Package: amssymb 2009/06/22 v3.00          (/usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amsfonts.sty     Package: amsfonts 2009/06/22 v3.00 Basic AMSFonts support     \symAMSa=\mathgroup4     \symAMSb=\mathgroup5     LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'     (Font)                  U/euf/m/n --> U/euf/b/n on input line 96.     ))     (/usr/local/texlive/2011/texmf-dist/tex/latex/comment/comment.sty     \CommentStream=\write3          Excluding comment 'comment')     (/usr/local/texlive/2011/texmf-dist/tex/latex/xcolor/xcolor.sty     Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)          (/usr/local/texlive/2011/texmf-dist/tex/latex/latexconfig/color.cfg     File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive     )     Package xcolor Info: Driver file: pdftex.def on input line 225.          (/usr/local/texlive/2011/texmf-dist/tex/latex/pdftex-def/pdftex.def     File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX          (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/infwarerr.sty     Package: infwarerr 2010/04/08 v1.3 Providing info/warning/message (HO)     )     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/ltxcmds.sty     Package: ltxcmds 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)     )     \Gread@gobject=\count88     )     Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.     Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.     Package xcolor Info: Model `RGB' extended on input line 1353.     Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.     Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.     Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.     Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.     Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.     Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.     )     (/usr/local/texlive/2011/texmf-dist/tex/latex/tools/calc.sty     Package: calc 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)     \calc@Acount=\count89     \calc@Bcount=\count90     \calc@Adimen=\dimen104     \calc@Bdimen=\dimen105     \calc@Askip=\skip43     \calc@Bskip=\skip44     LaTeX Info: Redefining \setlength on input line 76.     LaTeX Info: Redefining \addtolength on input line 77.     \calc@Ccount=\count91     \calc@Cskip=\skip45     )     (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/pifont.sty     Package: pifont 2005/04/12 PSNFSS-v9.2a Pi font support (SPQR)      LaTeX Font Info:    Try loading font information for U+pzd on input line 63.          (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/upzd.fd     File: upzd.fd 2001/06/04 font definitions for U/pzd.     )     LaTeX Font Info:    Try loading font information for U+psy on input line 64.          (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/upsy.fd     File: upsy.fd 2001/06/04 font definitions for U/psy.     ))     (/usr/local/texlive/2011/texmf-dist/tex/latex/tools/verbatim.sty     Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements     \every@verbatim=\toks17     \verbatim@line=\toks18     \verbatim@in@stream=\read1     )     (/usr/local/texlive/2011/texmf-dist/tex/latex/tools/multicol.sty     Package: multicol 2008/12/05 v1.6h multicolumn formatting (FMi)     \c@tracingmulticols=\count92     \mult@box=\box26     \multicol@leftmargin=\dimen106     \c@unbalance=\count93     \c@collectmore=\count94     \doublecol@number=\count95     \multicoltolerance=\count96     \multicolpretolerance=\count97     \full@width=\dimen107     \page@free=\dimen108     \premulticols=\dimen109     \postmulticols=\dimen110     \multicolsep=\skip46     \multicolbaselineskip=\skip47     \partial@page=\box27     \last@line=\box28     \mult@rightbox=\box29     \mult@grightbox=\box30     \mult@gfirstbox=\box31     \mult@firstbox=\box32     \@tempa=\box33     \@tempa=\box34     \@tempa=\box35     \@tempa=\box36     \@tempa=\box37     \@tempa=\box38     \@tempa=\box39     \@tempa=\box40     \@tempa=\box41     \@tempa=\box42     \@tempa=\box43     \@tempa=\box44     \@tempa=\box45     \@tempa=\box46     \@tempa=\box47     \@tempa=\box48     \@tempa=\box49     \c@columnbadness=\count98     \c@finalcolumnbadness=\count99     \last@try=\dimen111     \multicolovershoot=\dimen112     \multicolundershoot=\dimen113     \mult@nat@firstbox=\box50     \colbreak@box=\box51     )     \eqemargin=\skip48     \c@eqpointsofar=\count100     \c@eqpointsthispage=\count101     \c@eq@numparts=\count102     \c@eq@count=\count103     \partNames=\toks19     \eq@tmplengthA=\skip49     \eq@pointbox=\box52     \eq@pointboxtotalheight=\skip50     \eqetmplengtha=\skip51     \eqetmplengthb=\skip52     \eqtemptokena=\toks20     \eqtemptokenb=\toks21          (/Users/ChristopherChudzicki/Library/texmf/tex/latex/eqalone.def     \eq@tmpbox=\box53     \eq@tmpdima=\dimen114     \eqcenterWidget=\dimen115     )     (/Users/ChristopherChudzicki/Library/texmf/tex/latex/eqexam.def     File: eqexam.def 2011/08/30 v6.4m Exerquiz support file for eqexam (dps)     \ex@solns=\write4     \openout4 = `"Fall Final.sol"'.          \eq@xrefdefns=\write5     \openout5 = `"Fall Final_xdefs.cut"'.          \quiz@solns=\write6     \openout6 = `"Fall Final.qsl"'.          \c@eqexno=\count104     \c@@exno=\count105     \c@quizno=\count106     \c@eqpointvalue=\count107     \eq@tmplength=\skip53     \c@eqquestionnoi=\count108     \c@eqquestionnoii=\count109     \c@eqquestionnoiii=\count110     \@eqquestiondepth=\count111     \c@questionno=\count112     \c@partno=\count113     \aboveanswersSkip=\skip54     \eq@tabColCnt=\count114     )     LaTeX Font Info:    Try loading font information for U+msa on input line 1200.          (/usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/umsa.fd     File: umsa.fd 2009/06/22 v3.00 AMS symbols A     )     LaTeX Font Info:    Try loading font information for U+msb on input line 1200.          (/usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/umsb.fd     File: umsb.fd 2009/06/22 v3.00 AMS symbols B     )     \c@markerCnt=\count115     \workareasb=\box54     \eqpanelbox=\box55     \c@panel@cnt=\count116     \panel@write=\write7     \c@backofpage=\count117     )          ./Fall Final.tex:3: LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Ty       As far as I can tell, TeX never got around to listing the used files. Without `allowrandomize`, I easily found where the used files were listed in the .log


title: What is a good way to export part of an Adobe Illustrator illustration into latex?

text: I have an Adobe Illustrator file with 4 figures on it. I want to use these 4 figures separately in a LaTeX document. What would be the best way to do so? Keeping in mind that:   * I want to keep this one Illustrator file as the single source file, i.e., i don't want to split it up permanently into 4 files.   * Illustrator (CS3) doesn't provide an 'Export selection to PDF' function (only a 'Save as ... PDF' but that includes all 4 figures as far as I can tell)   * I want to minimize additional overhead in Latex (like specifying clipping) if possible?


title: Enclosing issue number in parentheses

text: In my bibliography, the volume number and issue number is currently printed as "volume.issue" I want to change that to "volume(issue)", e.g., "35(5)". Would this be something to do with `\renewbibmacro`?


title: Write LaTeX with LaTeX

text: > **Possible Duplicate:**   >  Typesetting LaTeX Source Code Hi all, i would like to know suggestions on how can I write an explicative text of LaTeX using LaTeX. Till now I use `\verb!SomeLatexinstruction!` when i need to write an instruction. There are other solutions, that looks more elegantly?


title: Add notes under the table

text: I'm using the latex package `apa6e` because the `apa` package isn't using APA style version 6 yet. Now I'm trying to add a table with notes right underneath it, like in this table for instance: ![Example Table](http://i.stack.imgur.com/llXPC.jpg) Since the `\caption{}` is used as a title above the table, I have to add an extra row for the notes that goes over the whole table width. The problem is that the notes won't fit into one line so I need multi-line cell. How can I accomplish that? Or am I doing it totally wrong and there is a much easier way? I guess footnotes don't work here.               \documentclass{apa6e}          \begin{document}     \shorttitle{}     \begin{table}     \caption{title}     \begin{tabular}{cc}     foo & bar\    \hline     \multicolumn{2}{l}{Notes. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras lacus orci, porttitor et posuere sit amet, tempor non justo. Ut quis aliquet turpis. Ut dictum nulla eget purus elementum a lacinia libero varius. Donec malesuada nulla ut odio rhoncus convallis. Aenean faucibus sollicitudin sapien, a vestibulum ante rhoncus sit amet. In vitae mi justo. In arcu metus, porta et lacinia ut, ultricies sed eros.}     \end{tabular}          \end{table}     \end{document}      Thank you for your help!


title: Transparent node with opaque text?

text: Is there a simple way to create a transparent node with opaque text? Preferably without having to use a postaction or redraw the node. In the example below I'd like to achieve the effect of the first three nodes, without redrawing the second node to create the opaque text:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}         % desired effect:         \node [fill=red,circle,minimum size=6mm,inner sep=0mm] {};         \node [right,fill=green,opacity=.2] {Node};         \node [right] {Node};              % undesired effect:         \node at(2,0) [fill=red,circle,minimum size=6mm,inner sep=0mm] {};         \node at(2,0) [right,fill=green,opacity=.2] {Node};     \end{tikzpicture}     \end{document}      ![example](http://i.stack.imgur.com/P6hQY.png)


title: Best practice: LaTeX constants for possibly changing repeatedly used symbol

text: Say I'm writing a long document and I want to use the letter `$n$` to stand for dimension e.g. in `$\mathbb R^n$` all over the paper. Late in the writing process I realize that I want `$n$` to stand for something else and decide I want to use `$m$` instead. I can't just search and replace the letter `n`; a `regex` search might be too broad, but e.g. replacing `$\mathbb R^n$` might be too narrow as it might be `$\mathbb R^{2n+1}$`. To avoid that scenario, is it good practice to use a command e.g. `\newcommand{\dimn}{n}` and use `$\mathbb R^{\dimn}$` everywhere in the document, a la constants in a programming language? Or is this misuse / abuse or otherwise not a good idea? I will be collaborating with others on this document.


title: Text in squared box

text: I'd like to bot a _square_ box around some text. I'd like to denote a labelled object of size 1, in combinatorics this is often symbolised by something like `\boxed{1}`. It would be nicer if the box was a square. Is there an adequate command for this?


title: Why does this protection not work?

text: The answers to this question explain in detail what protection is so I'm not wondering about that. My question is why a certain command definition with `expl3` does not give a protected command. Consider this LaTeX2e example:               \documentclass{article}          \DeclareRobustCommand\foo[1]{#1}     \DeclareRobustCommand\?{??}     \expandafter\DeclareRobustCommand\expandafter\-\expandafter{\-}          \begin{document}          \tableofcontents     % this is <jobname>.toc:     % \contentsline {section}{\numberline {1}\foo {bar}}{1}     % \contentsline {section}{\numberline {2}foo\?}{1}     % \contentsline {section}{\numberline {3}foo\-bar}{1}          \section{\foo{bar}}          \section{foo\?}          \section{foo\-bar}          \end{document}      Everything is working as expected. However, when I try to do the same with `expl3` the `\-` is not protected:               \documentclass{article}          \usepackage{expl3}     \ExplSyntaxOn     \cs_new_protected:Npn \foo #1 { #1 }          % works     \cs_new_protected:Npn \? { ?? }               % works     \exp_args:NNo \cs_set_protected:Npn \- { \- } % does not work     \ExplSyntaxOff          \begin{document}          \tableofcontents     % this is <jobname>.toc:     % \contentsline {section}{\numberline {1}\foo {bar}}{1}     % \contentsline {section}{\numberline {2}foo\?}{1}     % \contentsline {section}{\numberline {3}foo\discretionary {-}{}{}bar}{1}     % \contentsline {section}{\numberline {4}foo\-bar}{1}          \section{\foo{bar}}          \section{foo\?}          \section{foo\-bar}          \section{foo\protect\-bar}          \end{document}      Am I doing something wrong or why does `\exp_args:NNo \cs_set_protected:Npn \- { \- }` not leave the desired result? The only command where I could find this behaviour is `\-`. Did I not look hard enough or is there something special to `\-`?


title: Why is LyX trying to convert every image into eps?

text: I am trying to insert an image into my document. I tried following formats: PNG, JPG, PDF, SVG (using inkscape) and BMP. No matter what I do I get following error: > LaTeX Error: Unknown graphics extension: .eps. I do not want to include any eps file as I am using pdflatex! What am I doing wrong? Why is LyX even mentioning eps files? Edit: When I try to insert PDF (for the first time) as graphic I get following error: > No information for converting pdf format files to eps. Define converter in > the preferences Edit: Win 7 x64 The latest: LyX 2.0.2-1 ImageMagick MikTeX Aspell Ghostscript GSview I was able to compile my document using ps2pdf!


title: Detect markers in macro arguments

text: I'd like to find a way to define a command which would work like this               \mycommand{This +is+ a +simple example+.}      and give > This **is** a **simple example**. i.e a command which looks for words surrounded by a particular symbol (here a `+`) and changes the formatting (here in **bold** ) of these words. Also, is there any references about "advanced" macros in TeX?


title: Table specific questions

text: I use `report` class and I have just started working with tables. I have created one:               \begin{table} [ht]      \centering      \caption{Ut convallis pharetra augue at aliquet}      \label{table1_disc_log}      \small      \begin{tabular}{ |p{4cm} || p{5cm} | p{5cm} | }        \hline\hline        \textbf{Ut convallis} & \multicolumn{2}{|c|}{\textbf{Lorem ipsum dolor sit amet}}\\        \cline{2-3}        \ & Ut convallis pharetra & Consectetur adipisci veliturea \\        \hline        Lorem ipsum dolor sit amet & \centering $O(n)$ & Lorem ipsum dolor \\        \hline        Veliturea adipiscing, consectetur adipisci & \centering $O(\sqrt{n})$ & Lorem ipsum \\        \hline        $\rho$--Pollard method & \centering $O(\sqrt{n})$ &  Lorem ipsum dolor \\        \hline         Pharetra augue at aliquet, consectetur adipisci &          \centering $O\left(\left(\sum_{i=1}^rk_i\left(\sqrt{p_i} + \ln p \right) \right)\ln^2p \right)$ &         Ut convallis pharetra augue at aliquet, consectetur \\        \hline        Adipiscing elit, ut convallis & \centering $L_p\left[\frac{1}{3},const\right]$ &         Lorem ipsum dolor sit amet, consectetur adipisci (ut convallis pharetra augue at aliquet, consectetur) \\        \hline\hline      \end{tabular}     \end{table}      ![Resulting table](http://i.stack.imgur.com/gOH7u.gif) Unfortunately, I haven't found a clear explanation how to adjust some of its elements. So there are my questions:   1. How could I horizontally center the text in some cells? I have tried `\centering` in cells, but it doesn't work with all table cells. For example, I need to center the headers of two columns: _'Ut convallis pharetra'_ and _'Consectetur adipisci veliturea'_ , how can I manage that?   2. Why didn't the text in the first cell automatically become vertically centered? Additionally, how to make it horizontally centered at the same time?   3. How could I set text margins for cells (in general, custom for some columns and custom for some cells)? How to set custom height for some rows? (higher than the text inside of it.)    4. How could I set default text alignment for the whole table ( _'on top of the cell'_ , or _'on center of the cell'_.) How could I change this behaviour for some particular columns or cells?   5. How to make an empty cell? I had to use `\` (space), otherwise there was an error.


title: How do I draw a B+ tree in latex?

text: Is there some way to draw a B+ tree in latex? It would look something like the picture below (ignoring the animations) Animation linked here: http://i.stack.imgur.com/JRcmY.gif Screenshot of the start of the animation: ![Screenshot of a B+ tree](http://i.stack.imgur.com/xjDSl.png)


title: Vertical Equivalent of \hfill

text: Is there an equivalent of `\hfill` for vertical spacing?


title: Where can I define the language in CUEDthesisPSnPDF files?

text: I downloaded some files to build my thesis document from this site http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/. I have a problem, where can I define the spanish language to get titles in spanish. I tried to declare it in the `CUEDthesisPSnPDF.cls` file with `usepackage[spanish]{babel}`, but it doesn't work. I'd like to get your help.


title: Rounding numbers in a table / Truncating text in table

text: Is it possible to have automatic rounding of numbers in a table? Say that I have this, made in the usual way with a `tabular` environment:               pi  | 3.14592654     e   | 2.7182818284     phi | 1.6180339887      **Can I control how many significant digits are shown without truncating the numbers manually myself?** So for example, if I need four significant digits, the numbers should appear as               pi  | 3.1459     e   | 2.7183     phi | 1.6180      Bonus points for actually rounding the numbers according to the usual rules without simply truncating them. * * * I understand this is probably non-trivial, so here's a relaxed version that will also work in my circumstances (all numbers have one and the same precision and character count): **(How) Can I control how many characters are rendered in a column of a table?** So if I define the text in the columns as:               \begin{tabular} % some black magic column definition        text & alongword\\        text & anotherlongword\\        text & morelongwords\\     \end{tabular}      I'd like to get something like:               text along     text anoth     text morel      I know there are non-TeX ways to do this, and I will probably resolve to writing a script if all else fails, but I'm curious whether there's a way to do it solely with TeX & friends.


title: How to define a header/footer style using \fancypagestyle?

text: # Question How to define a header/footer style using `\fancypagestyle` ? # Minimal Code (does not work)               \documentclass{book}          \usepackage{fancyhdr}          \fancypagestyle{ttt}     {%          \fancyhf{}     \renewcommand{\chaptermark}[1]{\markboth{\small\tt\chaptername\ \thechapter.\ #1}{}}     \renewcommand{\sectionmark}[1]{\markright{\small\sf\thesection\ #1}}     \fancyhead[RO,LE]{\rightmark}     \fancyhead[LO,RE]{\leftmark}     }          \pagestyle{ttt}     \usepackage{blindtext}     \usepackage[english]{babel}     \begin{document}          \tableofcontents          \blinddocument          \end{document}


title: Big arrows between images

text: I am trying to put arrows between images. I did not want to put arrow images, I prefer LaTeX way solution. I used `pointer` from `wasysym` package. The result can be seen below. I know those arrows are considered as text, so they are tiny. ![alt text](http://i.stack.imgur.com/1HdST.jpg) How can I put centered, big arrows between images?


title: How to treat the arguments of a macro as literal or verbatim text?

text: I'm working on a package that allows Python code to be entered within certain commands and environments, saves the Python code to external files and executes it, and brings back the results via `\input`. Similar to SympyTeX and SageTeX, but with additional features. As a trivial example, `\pylab{print 1+1}` would save the text string `print 1+1` to a file, Python executes this file to obtain `2` and saves this in a second file, and this second file is brought back into the original document with `\input`. This is a minimal example. (It will give errors after the first run, before Python is run to create infile.tex.)               \newcommand{\pylab}[1]{         \newwrite\outputstream         \immediate\openout\outputstream=outfile.py         \immediate\write\outputstream{#1}         \immediate\closeout\outputstream         \input{infile.tex}     }      The problem is that in more complex cases, the argument for `\pylab` could contain special characters, for example `\pylab{print 3%2}` (modulus operator). What's the best way to deal with this? Ideally, my command would act like `\verb`, so that it would take anything but * as the switch, so as to be able to work around almost any special code characters. I've been reading about verbatim, catcodes, `\gdef`, etc., but I haven't been able to get anywhere with those yet. SympyTeX and SageTeX use               \catcode`\%=12     \newcommand{\percent}{%}     \catcode`\%=14      to define a replacement for %, but I want to avoid that route if possible since it means that I can't just directly paste in valid Python code.


title: showing first frame of a movie with movie15

text: I am using the movie15 package to add a swf movie to my presentation, but I do not like that when it finishes playing, it leaves a blank placeholder. Is it possible to configure it so that it shows the first frame of the movie before being played, and after it finishes playing the movie.               \begin{frame}[t]\frametitle{Third Slide}      \begin{figure}       [h!]        \includemovie[]{300pt}{200pt}{../movies/movie.swf}       \end{figure}     \end{frame}      Any help appreciated.


title: Typesetting non-scientific material for the first time

text: I have used TeX and friends for many years to produce academic documents: assignments, reports, journal articles, etc. As a hobby project, I am going to try something different by typesetting a book containing a short story. Since most of my typographic experience is with figures, tables and equations, I am feeling underprepared for the task of creating a document that has nothing to do with any these elements. I am looking for advice on how to prepare for this project given my narrow background in typesetting academic material. Some things I wonder about are:   * What key design decisions should I be aware of when creating a book containing non-scientific material?   * Are there any workflow recommendations that may help guide me from the raw text to a rough draft, to a finished product?


title: How to set Table of Contents page numbers ragged right?

text: First post and certainly a tyro at LaTeX. Thanks to all those who have made this site such a helpful resource. I'm using the `memoir` class to typeset a novel, and would like to have the Table of Contents _page numbers_ appear _ragged right_ , each page number set a fixed horizontal distance from the end of each chapter title, regardless of chapter title length. I would like to be able to try different spacings to find the most pleasing horizontal gap between the end of chapter title lines and the page numbers. Any solutions or pointers greatly appreciated.


title: Hackenbush Diagrams?

text: I'd like to put diagrams of Hackenbush positions such as the one pictured here in a paper I'm writing. Anyone know how? EDIT: I would also be happy with simpler orientations, such as where the edges are all vertical.


title: Creating a separate list of appendices with tocloft

text: I'm very sorry but I have to ask for urgent help as I could not make sense of the individual questions I asked previously. I'm required a separate list of appendices, i.e. the appendix is not to show up in the TOC except for the item _Appendix_ , which can be manually created with               \addcontentsline{toc}{section}{Appendix}      The appendix itself is supposed to be structured like               Appendix A     A.1 Title     A.2 Title     ..          Appendix B     B.1 Title     B.2 Title     ..      `Tocloft` provides a means to manually create a list, this example is taken from the documentation:               \newcommand{\listanswername}{List  of  Answers}     \newlistof[chapter]{answer}{ans}{\listanswername}          \newcommand{\answer}[1]{%      \refstepcounter{answer}      \par\noindent\textbf{Answer  \theanswer.  #1}      \addcontentsline{ans}{answer}{\protect\numberline{\theanswer}#1}\par}      creates the command `\listofanswer` which items are added to with               \answer{Hard}      This results in               List of Answers     1 Hard ....... pageno      Several problems arise for me:   * Decimal counter instead of alphabetic   * no sub environment for the A.n scheme   * no prefix like "Appendix A.1 Hard .... pageno" So I need a list such as               List of Appendices          Appendix A    Code listings   ................. 187     Appendix A.1  Stackexchange generator ........  187     Appendix A.2  Stackexchange hack function .... 2179          Appendix B    Misc            ................ 2180     Appendix B.1  Overview Q&A Sites      ........ 2181     Appendix B.2  User psychoanalysis         .... 2378      I assume this may be solved by adding a second command in the manner presented by the tocloft documentation but I'm currently not capable of spending time figuring it out due to my desastrous state of the paper (of course, due tomorrow). So if someone could provide the sub-command and a way to change enumeration to literals I'd greatly appreciate it. Sorry again, I'm in a state of mind where only a a bullet-proof for-dummies solution will get me somewhere.


title: TikZ: position of node with shorten-option

text: I have the following Code               \draw[style={shorten >=-1cm}, dashed] (C) -- (CENTER) node {NAME};      Is there a simple way to position {NAME} at the end of the "shortened" line? If I use the code above, it is placed at (CENTER). Sebastian Edit: I have no permission to answer my own question, so I write a short edit: I think I found a solution that is feasible for my problem:                   \tikzset{%             add/.style args={#1}{to path={%             ($(\tikztostart)$)--($(\tikztotarget)!-#1!(\tikztostart)$)%             \tikztonodes}}         }              \draw[dashed, add=1cm] (C) to (CENTER) node[right] {NAME};


title: How to do a 'printline' in LuaTeX

text: I have just started exploring the world of LuaTeX and wanted to write a piece of code, that prints a name to a new line in the document.               \directlua{     for i=1,3,1 do     tex.print("FOO")     end     }      which should produce the following output:               FOO     FOO     FOO      rather than:               FOO FOO FOO      How do I use Lua correctly? I have tried messing with `\\` and many other things over the course of an hour. Am I approaching this problem from the wrong angle? Any help is highly appreciated.


title: Why do I get white space at the bottom of my diagram?

text: I have this code :               \documentclass[tikz}]{standalone}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage[frenchb]{babel}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric,positioning,fit,calc,decorations,decorations.text,}     \begin{document}     \sffamily     \begin{tikzpicture}[             white,             ultra thick,             planet/.style = {draw,fill,circle,inner sep=#1},             circle label/.style = {                 postaction={                     decoration={                         text along path,                         text = {#1},                         text align=center,                         text color=white,                         reverse path,                     },                 decorate,             }             }         ]         \filldraw[black] (-15,-3) rectangle (15,15);         \node[rectangle, ] at (0, 13) {\color{white} \fontsize{25}{58}\selectfont LES {\'E}TOILES LES PLUS PROCHES DU SOLEIL};         \path[circle label={Nuage d'Oort}] (0,-1.2) arc (-90:360-90:1.3);         \draw[dotted] (0,0) circle (1.18596338615);                  \foreach \i in {3,6,9} {                 \path[circle label={\i\ ANN{\'E}S LUMI{\`E}RES}] (0,-\i-.2) arc (-90:360-90:\i+.2);         }         \draw (0,0) circle (3);         \draw ([shift=(-30:6cm)]0,0) arc (-30:210:6cm);         \draw ([shift=(-19.47:9cm)]0,0) arc (-19.47:199.47:9cm);              \node[yellow,planet=3pt,label={Soleil}] at (0,0) {};              \node(proxima)[red,planet=3pt] at (44:6.363) {};          \node[text width=2.8cm,align=center, right = 0.05 of proxima] {Proxima Centauri.\newline(distance 1917)};              \node[yellow,planet=4pt,label={[text width=2.5cm,align=center]Alpha Centauri.\ (distanse 1917)}] at (50:6.54735) {};              \node[red!50!black,planet=2pt] at (54:9.75) {};              \node[red!50!black,planet=2pt, label={[text width=2.7cm,align=center]WISE 1049-5319.\ (distanse 2013)}] at (57:9.75) {};              \node(bernard)[red,planet=3pt] at (130:8.94435) {};         \node[text width=2.8cm,align=center, left = 0.05 of bernard] {{É}toile de Barnard.\ (distanse 1916)};              \node(wise)[red,planet=3pt] at (110:10.7625) {};         \node[text width=2.8cm,align=center, right = 0.05 of wise] {WISE 0855–0714.\newline(distanse 2014)};          \end{tikzpicture}     \end{document}      And I get this : ![enter image description here](http://i.stack.imgur.com/BNT8l.png) The problem is the white space below my figure. I thought that `standalone` include only the figure. How to remove this white space?


title: Vector arrow running into brackets

text: This looks really horrible when I typeset it in Plain TeX:               $$[\vec r]$$     \bye      The vector arrow bleeds into the bracket on the right, it's not pretty at all. Is there a standard fix for this sort of thing? Things like `$(\vec r)$` are a bit better because of the curve on the parens, but not by much.


title: Problem in adding a title to tcolorbox

text: I have defined a python environment in my document using `tcolorbox`. I would like to add a title to the listing. However, the compiler complains about adding the following to `pythoncode` environment:               \begin{pythoncode}[colback=red!5!white,colframe=red!75!black,title=My nice heading]      When I remove the above options and only use `\begin{pythoncode}[]`, the code compiles successfully. In below is a MWE about this problem.               \documentclass{book}         \usepackage[left=1.00in, right=1.00in, top=1.00in, bottom=1.00in]{geometry}              \usepackage{amsmath}         \usepackage[pdftex]{graphicx, color}         \usepackage{hyperref}            \hypersetup{ %             pdfborder = {0 0 0},             colorlinks=true,         }              \usepackage[T1]{fontenc}           \usepackage{tcolorbox}         \tcbuselibrary{minted,skins,breakable}                   \newtcblisting{pythoncode}[1][]{           listing engine=minted,           breakable,          colback=bg,           colframe=black!70,           listing only,           minted style=colorful,           minted language=python,           minted options={linenos=true,numbersep=3mm,texcl=true,#1},           left=5mm,enhanced,           overlay={\begin{tcbclipinterior}\fill[black!25] (frame.south west)                     rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}}         }                   \definecolor{bg}{rgb}{0.85,0.85,0.85}              \begin{document}              \section{Python example}         \begin{pythoncode}[colback=red!5!white,colframe=red!75!black,title=My nice heading]         # indent your Python code to put into an email         import glob         # glob supports Unix style pathname extensions         python_files = glob.glob('*.py')         for file_name in sorted(python_files):             print '    ------' + file_name                  with open(file_name) as f:                 for line in f:                     print '    ' + line.rstrip()                  print         \end{pythoncode}              \end{document}          Could someone shed light on this problem?


title: get spyder-like color highlighting in pythontex

text: In my work with Python 3.4, I use spyder (anaconda3 2.0.1) and I like the highlighting of the Spyder editor (version 2.3). Is it possible to have the same highlighting scheme in latex documents using the `pythontex` package ? I didn't find such an information in the Pygments documentation...


title: Exporting preview-generated image width and height to a text file

text: I use the `preview` package to generate some pictures from the `equation` environment. I need the width and height of each picture. I guess the `preview` package does some black magic and, at some point, those values must be known (?). Is it possible to save them, sequentially, in a text file?               \documentclass{article}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{equation}     \begin{document}     \begin{equation}       x^2 = 2     \end{equation}     \begin{equation}       \int_0^x \sin t\, dt = 0     \end{equation}     \end{document}


title: Minimum length of last line of a paragraph

text: There is a more or less equivalent question to this: Ensure minimal length of last line, but I absolutely need a TeX solution. I more or less stumbled upon the problem mentioned in the discussion of egreg's answer, and I'd like to see a deeper analysis just to make sure there absolutely is no working TeX solution. Replicating Patrick's solution (insert unbrekable space between words at the end) in TeX will get really ugly. So there I was naively saying               \parfillskip 0pt plus 100pt      in the hope this would make sure the horizontal space at the end of the last line of every paragraph was at most 100pt wide. But witness the result of my MWE:               \documentclass[11pt]{article}          \usepackage{lipsum}          \begin{document}          \parfillskip 0pt plus 100pt          \let\opar\par     \def\par{\opar\hbox to \linewidth{\hfill\vrule width100pt height\fboxrule}}          \lipsum          \end{document}      You'll see that the 100pt are disregarded even by 'unproblematic' paragraphs. `\sloppy` doesn't really help either, so the problem doesn't really lie in the fact that there is not enough material to stretch out. Here's an extreme example: ![parfillskip example](http://i.stack.imgur.com/6eiYI.png) The rule indicates the point to which the last line should stretch. Looking at the resulting box yields               .\hbox(7.60416+0.0)x360.0, glue set 2.49602     ..\OT1/cmr/m/n/10.95 c     ..\OT1/cmr/m/n/10.95 u     ..\OT1/cmr/m/n/10.95 r     ..\discretionary     ...\OT1/cmr/m/n/10.95 -     ..\OT1/cmr/m/n/10.95 s     ..\OT1/cmr/m/n/10.95 u     ..\OT1/cmr/m/n/10.95 s     ..\glue 3.65 plus 1.825 minus 1.21666     ..\OT1/cmr/m/n/10.95 l     ..\OT1/cmr/m/n/10.95 u     ..\OT1/cmr/m/n/10.95 c     ..\discretionary     ...\OT1/cmr/m/n/10.95 -     ..\OT1/cmr/m/n/10.95 t     ..\OT1/cmr/m/n/10.95 u     ..\OT1/cmr/m/n/10.95 s     ..\glue 3.65 plus 1.825 minus 1.21666     ..\OT1/cmr/m/n/10.95 m     ..\OT1/cmr/m/n/10.95 a     ..\OT1/cmr/m/n/10.95 u     ..\discretionary     ...\OT1/cmr/m/n/10.95 -     ..\OT1/cmr/m/n/10.95 r     ..\OT1/cmr/m/n/10.95 i     ..\OT1/cmr/m/n/10.95 s     ..\OT1/cmr/m/n/10.95 .     ..\penalty 10000     ..\glue(\parfillskip) 0.0 plus 100.0     ..\glue(\rightskip) 0.0      So I assume the `glue set 2.49602` is applied to the `\parfillskip` glue, yielding 249.6pt, which looks more or less like what's on the screenshot. My question is now: Is there another solution to get the intended effect in TeX? **Edit:** I found that adding `\usepackage[latin]{babel}` will make the 'problem' go away in this case, but the real "text" I need to typeset is a list of symbols with spaces between them. They need to be spaced out in any manner such that the last line is not too short, so the real application is much nearer to the MWE I'm giving (without proper hyphenation). **Conclusion** Thanks to David, my original application now works like a charm: ![enter image description here](http://i.stack.imgur.com/Xw52v.png) I think the pictograms slightly stretched out look much better than the alternative with only one pictogram in the last line!


title: Inserting a specific number of blank lines

text: I'm new to LaTeX and trying to format my Honors Thesis, which has very specific formatting rules to prepare the manuscript for publication. For instance, on the Abstract page, I am required to place 3 blank lines above and below my name and degree information. At the moment, this is the code I have for the abstract page:               \newpage          \begin{center}     \vspace*{1in}     ABSTRACT \\          \vfill     \singlespacing     TITLE SINGLE-SPACED IN ALL CAPS, SAME SIZE AS THE REST OF THE TEXT          \vfill %Should be 3 blank lines here.          \doublespacing     My name \\     My department \\     My degree          \end{center}          \vfill %Should be 3 blank lines here.          Put text of the abstract here.          %The abstract must not exceed 250 words.      As you can see, right now I'm just using the `\vfill` command, which I think looks spectacular but doesn't fulfill the formatting requirements exactly (although it gets pretty close when the abstract is 250 words). I've considered using the `\vspace{}` command, but I don't know how long 3 lines of text in Times New Roman size 12 font would be. Right now I'm using TeXShop to edit this document, which is a .Rnw file (I'm going to use Sweave). Right now, the default spacing is double-spacing (Most of the thesis is required to be in double-spacing) using the setspace package.


title: Good quality images in pdflatex

text: Generally I include images in my latex document by the command               \includegraphics[scale=0.5]{image.png}      However, after doing `pdflatex` the image quality is always very poor in the resulting pdf file. I think it is probably due to the scaling I do. I have also tried pdf, ps and eps images but they also suffer the same problems. I generally use gnuplot or matplotlib to generate the graphs. What format should I store the images so that when I scale them to be put in the latex document, they maitain their quality? What are the macros that I should use? As of now I only use               \usepackage{graphics}


title: Dynamically created program listing

text: Is there a way to have a easy to change value in program listing? Something along these lines:               \newcommand{\variable}{2}      And then having somewhere               \begin{lstlisting}     ...     i *= \variable;     ...     \end{lstlisting}      I would like to keep the format, so I don't want to end and start another listing.


title: Spacing in \chaptertitlename

text: Consider the following MWE:               \documentclass{book}     \usepackage{titlesec}      \usepackage{lipsum} % just to generate text for the example     \usepackage[tracking=smallcaps]{microtype}          \titleformat{\chapter}[display]       {\bfseries\Large}       {\filright\MakeUppercase{\chaptertitlename} \Huge\thechapter}       {1ex}       {\titlerule\vspace{1ex}\filleft}       [\vspace{1ex}\titlerule]          \begin{document}          \chapter{Test Unnumbered Chapter}     \lipsum[1-2]     \chapter{Test Numbered Chapter}     \lipsum[1-2]     {\scshape Test}     \end{document}        How can we edit the `\chaptertitlename` command so that it spaces out correctly by using the `microtype` package?


title: How to avoid transliteration of Russian text in ConTeXt?

text: Using TexShop on Mac OS I try to compile a code:                \setupbodyfont[dejavu]      \enableregime[utf]      \mainlanguage[russian]           \starttext      Немного русского текста для пробы.      \stoptext      But it gives me a transliterated page ![transliterated text](http://i.stack.imgur.com/sIt5y.png) Is there is a way to fix it?


title: Make the titles centered using the titlesec package

text: I am using the `titlesec` package to better define my section headings. I have a question about it: How can I make the titles already centered in the middle of the page? I have them centered (at the top of the page) at the moment with the following code :               \titleformat{\section}     {\normalfont\Large\bfseries\centering}{\thesection}{1em}{}


title: callout boxes not aligning with aligned environment content

text: I've been able to create the `split rectangle` successfully. I've been able to work with `\tikzmark` and `callout` boxes. But now that I'm combining the two, something is going seriously wrong. Here's my MWE               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz}     \usetikzlibrary{shapes,decorations}     \usetikzlibrary{shapes.callouts}     \usetikzlibrary{calc}     \tikzset       {         set frame design/.style={rounded corners=15,                                   line width=1.4pt,                                   inner sep=2ex,                                  color=frame_color,                                  text=title_text_color,                                 },         rectangle split in two/.style={rectangle split,                                         rectangle split parts=2,                                        },       }          \colorlet{title_text_color}{blue}     \colorlet{title_bg_color}{yellow!10}     \colorlet{content_text_color}{blue}     \colorlet{content_bg_color}{red!20}     \colorlet{frame_color}{purple}          \newenvironment{myframed}[1]       {\def\myframedtitle{#1}%%        \begin{tikzpicture}          \draw let \p1=($(\linewidth,0)-(1cm,0)$),                     \p2=(0,0.5\baselineskip)                    in node [                               draw,                               anchor=north,                              set frame design,                              rectangle split in two,                              rectangle split part fill={title_bg_color,                                                         content_bg_color},                              rectangle split empty part height=\y2                            ] (this_split_frame) at (0,0)                     \bgroup                      \nodepart{second}                      \begin{minipage}{\x1}                       \begin{minipage}{0.60\textwidth}\vspace{0pt}                       \color{title_text_color}       }       {               \end{minipage}                     \end{minipage}                  \egroup;          \node [                 set frame design,                 anchor=north west,                 text=title_text_color                ] at (this_split_frame.north west) { \bf\large \myframedtitle};         \end{tikzpicture}       }          %% setting `inner sep` and `outer sep` helps a little but doesn't correct things     \newcommand\tikzmark[1]{%       \tikz[remember picture,overlay]\node (#1) {};}     %%  \tikz[remember picture,overlay,inner sep=0pt,outer sep=0pt]\node (#1) {};}          \newcommand\mynote[3][]{%       \begin{tikzpicture}[remember picture,overlay]       \node[rectangle callout,              draw=blue,             fill=blue!10,             text width=4cm,             align=center,             #1] at #2 {#3};       \end{tikzpicture}%'       }          \begin{document}          \begin{myframed}{Case: same denominator}       Here is some text \tikzmark{a}\par       Here's some more text \tikzmark{b}     %%  \begin{align*}     %%    \frac{3}{5} + \frac{4}{5}      %%    & = \tikzmark{a} \frac{3+4}{5}  \\[2ex] %%      %%    & = \tikzmark{b} \frac{7}{5}        %%  \end{align*}     \end{myframed}          \mynote[callout relative pointer={(-1,0)}]            {(a)}            {Keep the denominator}          \mynote[callout relative pointer={(-1,0)}]            {(b)}            {Combine numerators}          \end{document}      ![enter image description here](http://i.stack.imgur.com/SM8w3.png) **UPDATE** It seems to me that part of the problem is that `\tikzmark` is inheriting the settings from `\tikzset` It would be nice to know how to turn these off contextually. I can improve things a bit by redefining `\tikzmark` as follows:               \newcommand\tikzmark[1]{%       \tikz[remember picture,             overlay,anchor=center,             draw=none,             rectangle split parts=1,             inner sep=0pt,             outer sep=0pt,             rounded corners=0]\node (#1) {};}      But still the `callout` boxes are not positioned correctly and the node defined by `\tikzmark` is still visible. As can be seen by using               \mynote[callout relative pointer={(-1,0)}]            {([xshift=0in]a.east)}            {Keep the denominator}          \mynote[callout relative pointer={(-1,0)}]            {([yshift=-1in]b)}            {Combine numerators}      ![enter image description here](http://i.stack.imgur.com/9ITKR.png) **FURTHER UPDATE** Things can be somewhat better improved by chaning the definition of `\tikzmark` to               \newcommand\tikzmark[1]{%       \tikz[remember picture,             overlay,             ]\coordinate (#1) at (0,0) ;       }      By using the following command, you can see that the coordinates are placed where expected:               \tikz[remember picture,overlay] \draw (a) -- (b) ;      I've moved the `callout` boxes by using `yshift`s to help see where this line would be drawn: ![enter image description here](http://i.stack.imgur.com/yXSIY.png) So the question remains of why the `callout` box is not pointing to the correct coordinate. **SOLUTION** The problem is that I'm not referring to the reference point correctly. If instead I write               \mynote[callout absolute pointer={($(a)+(1.25cm,0)$)}]            {([xshift=2in]a)}            {Keep the denominator}          \mynote[callout absolute pointer={($(b)+(1.25cm,0)$)}]            {([xshift=2in]b)}            {Combine numerators}      then I get the desired result: ![enter image description here](http://i.stack.imgur.com/3yiez.png)


title: CircuitTikz: Labeling and defining

text: I am trying to use CircuiTikz to draw resistor network circuits. For example, I am using the following latex code.               \documentclass{article}     \usepackage[american voltages, american currents,siunitx]{circuitikz}     \begin{document}                    \begin{circuitikz}     % Node syntax: (X,Y)          %%% From top :     %% 1st row  ==>     % the voltage source and the resistor           \draw  (0,3)  to [R=\SI{}{R_H}, o-o, color=red] (3,3);          % resistors connected; lattce point: x=1, y=Ly              \draw [R, o-] (3,3) to (6,3);        \draw [R, o-] (3,3) to (3,0);        \draw [R, o-o] (3,0) to (3,-3);          % dashed implying many connections        \draw [dashed] (6,3) to (9,3);          % resistor continuing after dashed line        \draw [R, -o] (9,3) to (12,3);          % next resistor         \draw [R] (12,3) to (15,3);          \draw (15,3) to (15,2.5) node [ground]{};                    \end{circuitikz}               \end{document}      This gives the following output. ![enter image description here](http://i.stack.imgur.com/21XO6.png) Now 1) Can I add a text "V" to the top left corner (left of the resistor labelled by R_H) without inserting a new node? In fact, can I add a text at any coordinate without using a node or path? 2) Using coloring and labelling each resistor, can I redifine a circuit element (e.g. the newly defined resistor will always have label R_H and color red)? 3) Is there any alternative way to the labelling `R=\SI{}{R_H}`? I suspect `\SI` is redundant. 4) Can I directly construct resistors in a series instead of mentioning coordinates for them each time? I apologize for the numbers of questions. But I guess, they all are connected and relevant. Thanks in advance.


title: Ruby highlighter for LaTeX

text: I'm looking for a package that can highlight ruby source code in LaTeX. I've found this thread: http://stackoverflow.com/questions/1966425/source-code- highlighting-in-latex But it is from 2009, and I'm wondering if there is any better solution. I can't get `minted` to work on my Mac. Maybe someone knows a better, easier solution. I'm currently playing with               \begin{lstlisting}[         label=listing:RubyTest,         float=h,         caption=test.rb,         firstnumber=1,         language=Ruby     ]     a = 5     b = a * 5     puts b     puts b + 3          class Test < Test::SomeClass     @test = 3         def bar             if foo                 puts "foo"             else                 puts "bar             end         end     end     \end{lstlisting}      But it gets only formatted without any colors.


title: Legends for scaled pgfplots

text: I am using the `pgfplots` package to create some plots of data for my thesis. As an example, consider the following code:               \documentclass[a4paper]{article}          \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}          \begin{document}           \begin{tikzpicture}      \begin{semilogyaxis}[        xlabel=Cost,        ylabel=Gain]      \addplot[color=red,mark=x] coordinates {      (10,100)      (20,150)      (40,225)      (80,340)      (160,510)      (320,765)      (640,1150)      };           \addlegendentry{Plot points};           \end{semilogyaxis}      \end{tikzpicture}           \begin{tikzpicture}      \begin{semilogyaxis}[        xscale=1.5,        xlabel=Cost,        ylabel=Gain]      \addplot[color=red,mark=x] coordinates {      (10,100)      (20,150)      (40,225)      (80,340)      (160,510)      (320,765)      (640,1150)      };           \addlegendentry{Plot points};           \end{semilogyaxis}      \end{tikzpicture}          \end{document}      For each data set I want to add a corresponding legend entry which works fine if I use `\addlegendentry`. To better fit the plot on my page I am using occasionaly adding an xcale/yscale to my axis. I am only interested in the aspect ratio, since I am using the `tikzscale` package to scale my plots to the current `\textwidth`. Unfortunately `xscale`/`yscale` does not seem to work properly with the legend entries (just render the example): If I scale down the y-axis, the legend entries are displayed above the plot, If I scale up the x-axis, the legend entries are far outside of the plot on the right side: ![enter image description here](http://i.stack.imgur.com/Ilr7W.png) Is there anything I can do to obtain a desired aspect ratio with working legend entries?


title: biblatex continuous reverse numbering through categories

text: The answer to Citing a certain type of reference ... almost perfectly solves my problem, but I would like to have the my cv sorted with continuous counting:               **Articles**     [5] great Article 2     [4] great Article 1          **Presentations**     [3] great Presentation 2     [2] great Presentation 1          **Thesis**     [1] great Thesis


title: Wrong width of environment after includegraphics

text: I have created an own environment with the `mdframed` package. My problem is, if I insert a picture in the self defined envrionment, the width of the color box is wrong. Here is the code:               \documentclass{book}     \usepackage{geometry}          \geometry{left=4cm,right=3cm, top=2cm, bottom=2cm}      \usepackage[ngerman]{babel}     \usepackage{mathptmx}     \usepackage{helvet}     \usepackage{wallpaper}     \usepackage[final]{pdfpages}      \usepackage[colorlinks,linkcolor=black,bookmarksopen=false,     hypertexnames=TRUE,pdfpagelabels=true]{hyperref}[2011/02/05]          \usepackage{xcolor,bookmark}     \usepackage{scrextend}     \usepackage{titlepic}     \usepackage{shorttoc}     \usepackage{courier}     \usepackage{type1cm}              \usepackage{zref-abspage}     \usepackage{makeidx}            \usepackage{graphicx}             \usepackage{multicol}             \usepackage[bottom]{footmisc}     \usepackage{tocstyle}     \usetocstyle{allwithdot}      \usepackage{thmbox}     \usepackage{shadethm}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{marginnote}     \usetocstyle{KOMAlike}     \usepackage{wrapfig}     \usepackage{paralist}     \usepackage{mdframed}     \makeindex            \definecolor{shadethmcolor}{rgb}{.9,.9,.95}%     \definecolor{shadethmcolor2}{rgb}{1,.925,.545}%     \definecolor{aufgaben}{rgb}{0.9333,0.93333,0.933333}%     \definecolor{loesung}{rgb}{0.972,0.93725,0.85098}     \definecolor{textbeispiel}{rgb}{0.86666,0.78431,0.78431}                 \newtheoremstyle{mystyle}       {\topsep}{\topsep}{}{}%       {\bfseries}{:}{.5em}{}%          \newtheoremstyle{mystyle2}       {\topsep}{\topsep}{}{}%       {\bfseries}{}{.5em}{}%          \theoremstyle{mystyle}          \newmdtheoremenv[hidealllines=true,backgroundcolor=shadethmcolor,skipabove=\topsep,     skipbelow=\topsep]{beispiel}{Beispiel}          \newmdtheoremenv[hidealllines=true,     backgroundcolor=shadethmcolor2,skipabove=\topsep,     skipbelow=\topsep]{formel}{Formel}               \theoremstyle{mystyle2}          \newmdtheoremenv[hidealllines=true,     backgroundcolor=aufgaben,skipabove=\topsep,     skipbelow=\topsep]{aufgabe}{Aufgabe}               \newmdtheoremenv[hidealllines=true,     backgroundcolor=loesung,skipabove=\topsep,     skipbelow=\topsep]{loesung}{L\"osung}               \begin{document}     \begin{loesung}     \includegraphics[scale=0.5]{histloesungzeichnung.png}\\     c)\\     Here comes a lot of text which describes different things, but this complete area should have the same color background width as the solution below! : $\bar{x}=\frac{1}{99}(18*1.5+20*3.5+25*5+22*7+14*9)$     \end{loesung}     \begin{loesung}     here comes the next solution with the correct width of the color background box!     \end{looesung}     \end{document}      How can I make the color box has the same width? Also a general question: If I try to include a float figure, it does not work. It seems to me, that this is in general not possible, to include a float `figure` in the self defined environment `loesung`. Also a `table` is not possible (but `tabular`). Any ideas on this? The error message if I use figures in the `loesung` environment is `Float(s) lost`. I am writing on a larger document, so I have this problem several times and it really rips me of. I solved the other problems with just using `tabular`, but here in this case, I really need the picture there to be included. Thanks a lot! I attached a screenshot of my problem (I changed the text, so you can better understand the problem, the changing of the text does not matter), I have no account so I have to give you the screenshot: ![http://tinypic.com/r/33wbhb6/6](http://i.stack.imgur.com/zxmzc.png)


title: Change font in Beamer to a more modern, sleek font

text: I noticed that many of today's presentations (not done by Beamer) use modern- looking, sleek fonts. Is it possible to set Beamer's fonts to use such fonts? All the current fonts in Beamer look a bit dated... Thanks.


title: Chessboard Book of exercises: Layout template

text: I am trying to create a book of exercises and I want to make a template. I want to have 3 diagrams side by side. The layout of one exercise is like the description below. I have found out that I can just place 3 diagrams from the chessboard package:               \chessboard[smallboard,setfen=8/7k/r3nPpp/p1q1P1p1/2pp2P1/4R2Q/7P/5R1K w]     \chessboard[smallboard,setfen=8/7k/r3nPpp/p1q1P1p1/2pp2P1/4R2Q/7P/5R1K w]     \chessboard[smallboard,setfen=8/7k/r3nPpp/p1q1P1p1/2pp2P1/4R2Q/7P/5R1K w]      My problem is how to lay out the top boxes. I want to have the number (26) aligned horizontally so it is in line with the next 27 and 28 exercises. The same goes for the players and the location/year. The player and location/year may span on more than one line. Below is the last move before the diagram. Is it a smart way I can lay out these boxes so they align nicely?                  ------------------        |      26        |        ------------------        |  Keres-Gilfer  |        ------------------        | Munich, 1936   |        ------------------        |                |        |  Chessboard    |        |                |        ------------------        |   14... Kgh8   |        ------------------


title: Nonstandard quotation margins

text: I would like to create a document with nonstandard quotation environment. ![enter image description here](http://i.stack.imgur.com/8MNXE.png) The goal is that on odd pages quotations have to be indent on the left, and on even pages in opposite way (indent on the right). **EDIT:** The  Thomas F. Sturm's solution works well, but there is a problem with footnotes inside the myquotation box (see my question). Do you have another idea how to solve this task?


title: Setting text color in TikZ without changing line color; conflict with double

text: I have a certain TikZ style that I would like to use over and over again (so I'd like to use it as a scope). Namely, I want the color of the curves to be red, with white borders (to give a "crossing over" effect when the curves go over each other), and I want the color of the text to be red too. Currently I am using the "double" effect to accomplish this, like so:               \tikzset{curveinscope/.style={every path/.style={draw=white, double distance=1pt, line width=2pt, double=red, color=red}}}      However this clashes with the "double" effect: setting "color=red" to make the text color red sets the drawing color of the first line in the "double" to also be red, which messes up the effect (it needs to be white). How can I fix this?


title: Accessing cmex10-equivalent symbols in latinmodern math in rendering code

text: I wish to display and print mathematical formulae not using one of the existing TeX distributions and not via a web browser, but using my own code so that the display is integrated into my packages as part of its user interface. At present I use the BaKoMa versions if cmr, cmmi, cmsy and cmex, but I might like to move to using Latin Modern (Math) for the benefit of its broader Unicode coverage. I can find (almost) all the symbols from the original TeX fonts there and so just by adjusting lookup tables I can adapt my existing code to display most stuff. However (checking latinmodern math using fontforge) many of the symbols from cmex10 are present but with codes outside the Unicode range. As a concrete example there is a range of sizes of radical marks starting at U+110790, and a bit before that the various gradually larger and larger parentheses, brackets and braces. Etc Etc. My problem is that because I can only see these symbols with codes beyond U+10ffff I do not know how to get my C++ code to display them. wxWidgets rejects codepoints above the Unicode range, and native calls on Windows are based on UTF16 which also only covers the Unicode range. I am uncertain why these have been given "extended" codepoints not just ones of the broad private use areas! But I need a pointer - please - to how I can write C++ code that will get them rendered on my screen or page. It may be obvious if I just knew which web page to read, but so far my searches have proved unsuccessful. This related to TeX in that my first test program is my own dvi viewer (it behaves OK with old style fonts - but again I want to know if I am locked to them for ever or if I can update to use Unicode fonts and code-mapping). I intended to end up with my own TeX-like layout code but using TeX compatible fonts seems a very good idea both for quality and so I have an easy source of files of metric information. So please can somebody point me either to information that will let me render the cmex10-like characters from Latin Modern Math from my own C++ code, or redirect me to an alternative place where this question might better be asked.


title: pgfplots: markers with text above the marked points

text: first an image of what I would like to have ![that' they way I want it](http://i.stack.imgur.com/tkoWu.png) I want to have a free text of the nth marker of each plot. I am symply providing no example, because I am not really sure to solve it and I am maybe searching in the wrong direction. boundary condition: I am using matlab2tikz and therefore the plots contain MANY points. Specifying a specific point for each plot manually would take hours. I would prefere something like for markers text mark={text}, mark phase=5, mark repeat=300, but there the text would be placed on the point and a vertical shift would be missing. Can anyone please help me?


title: A very complicated multiple lines problem in the align environment

text: I have a very complicated multiple lines problem in the align environment to solve. See the code below and the pdf file https://docs.google.com/file/d/0B1kX_CbBVoMteHU2MmFlZWJNWDg/edit?pli=1 .               \documentclass{article}     \usepackage{amsmath}          \begin{document}          \begin{align}     &c_{1}J_{h}>0\text{, }c_{1}J_{h+1}>0\text{, }c_{1}\left( J_{h}+p_{1}\left(     h\right) \right) >0\text{,}\\     &c_{1}\left( \left( J_{h}+J_{h+1}\right) \prod_{v\in \left\{ -1,1\right\} \     }\left( J_{h+v}+p_{1}\left( h\right) \right) -J_{h}J_{h+1}\left(     J_{h+1}-J_{h-1}\right) \right) <0\text{.}     \end{align}          \begin{alignat}{2}     & c_{1}J_{h}>0\text{, }c_{1}J_{h+1}>0\text{, }c_{1}\left( J_{h}+p_{1}\left(     h\right) \right) >0\text{,} & & \\     & c_{1}\Bigg(\left( J_{h}+J_{h+1}\right) \prod_{v\in \left\{ -1,1\right\} \     }\left( J_{h+v}+p_{1}\left( h\right) \right)  & & -  \notag \\     & & & J_{h}J_{h+1}\left( J_{h+1}-J_{h-1}\right) \Bigg)<0\text{.}     \end{alignat}          \end{document}      As you see in the pdf file, formulas (1) and (2) are usual situation in the align environment. But if (2) is too long, then we have to divide it into two lines ( something like (4) ). I think my code is not a good solution for this situation. Because my expected solution should be as follows: **(i)** Use amsmath package only. **(ii)** We can not use additional environments except for align, gather, flalign, multline, alignat and split. **(iii)** Make the spacing of the two lines of (4) be smaller than the spacing of (3) and the first line of (4). **(iv)** Can not use phantom command. **(v)** Keep the corresponding brackets in (2) and (4) the same size. Obviously, my code can not satisfy **(iii)** and **(v)** , so I hope someone can help me. Thanks! Wait for your solutions...


title: Notes and page bibliography on verso pages

text: I thought this would sound crazy, but there have been similar questions already:   * Placing text and footnotes on separate pages   * A pagestyle with note taking area on the verso page   * Figures on left pages, text on right ones with class book, numbering only on right pages I’m producing a single-sided document, i.e. pages appear only on the recto side of sheets. When arranged in a double-side spread, nevertheless, this would be the right side. For single sheets it’s the front side. Only these are numbered, of course. _Temporary content_ may appear on verso (= back or left) pages, though. By that, I mean stuff that is only relevant during the _drafting process_ , i.e. document option `draft` is set or `final` is not. In this stage of document preparation, I would like to put _to-do notes_ (which may contain graphics and tables) and _full bibliographic entries_ for all citations that appear in the current (recto) page onto an adjacent verso page. All of this is mainly relevant for proof-reading a print-out. It should be possible to switch which verso page is used for the draft-only content, though. I want it to be on the _following_ verso page (accessible by turning the sheet), if I’m checking few single pages. I want it to be on the _preceding_ verso page (accessed by looking left), when checking the whole document, which is probably stapled.               \documentclass[draft]{scrreprt}     \usepackage{ifdraft}     \usepackage{fixme}       \let\todo\fxnote % we don’t need the prefix flexibility from FiXme       %\fxuselayouts{…}       \fxsetup{marginclue}     \begin{filecontents}{\jobname.bib}       @book{foo2014,author = {Foo Bar},year = {2014},title = {Baz}}     \end{filecontents}     \usepackage{biblatex}       \addbibresource{\jobname.bib}     \begin{document}     This is text on a recto page.     \autocite[This citation appears in the document bibliography,                but also on a verso page.]{foo2014}     \todo{This to-do note appears on a verso page,           a marker is put into the margin.}          This is more text on a recto page.     \newpage     This is text on another recto page.     \end{document}      The to-do packages `easy-todo` and `todonotes` both provide a command `\listoftodos` to output all notes in a central place, but both only support a single list for all to-dos, not limited to a chapter, section or (as I need) page. The package `FiXme` seems more promising, although its `\listoffixmes` is also global.


title: Beamer-Button which opens a browser with an URL

text: is it possible to use a beamerbutton for presentations which would open a browser and a given URL?


title: pgfplotstable an caption below data

text: I'd like to have a pgfplotstable with the caption below the data, just like with a regular table:               \begin{table}[h]     \centering     \begin{tabular}{lccc}        A & 3 &  4 & 6 \\        B & 4 &  5 & 7 \\     \end{tabular}     \caption{Blah}     \end{table}      But how to? I'm trying it like this:               \pgfplotstabletypeset[     col sep=comma,     string type,     every head row/.style={before row=\hline,after row=\hline},     every last row/.style={after row=\hline },     every last row/.append style={after row={\caption{The caption},     ]{data.csv}      But i fail with a runaway argument.


title: \fillwithlines{\stretch{1}} only .6\textwidth

text: I'm using the exam package and want to use `\fillwithlines{\stretch{1}}` but only so it goes `.6\textwidth` across the page. I've tried using minipage, parbox, and makebox, but none of them work with the `\stretch{1}` command. The code below does not print any lines at all.               \documentclass{exam}          \begin{document}         \begin{questions}             \question Question\newline                 \begin{minipage}[b]{.6\linewidth}                     \fillwithlines{\stretch{1}}                 \end{minipage}         \end{questions}     \end{document}


title: Pgfplots and round-off error

text: Hi have a graph that must demonstrate the oscillation of energy of a numerical scheme. The problem is that the energy is something like this:               -9.99999994950000e-01      and I have oscillation after 8 digits. The graph is a straight line, so I can't see the oscillations. How many digit pgfplots can use? Is there any way to see oscillations?


title: Argument names for autocompletion in Kile

text: Let say I created the following command in my latex document               \newcommand{\red}[1]{       \textcolor{red}{#1}     }      When working with the LaTeX editor Kile, the autocompletion gives me something like               \red{x} %[Proposed by Kile (autocompletion)]       But instead of 'x', I would like Kile propose to me something like               \red{text} %[Proposed by Kile (autocompletion)]      That could be useful when I have to deal with commands requiring a bunch of arguments. For instance, if I created a command using `\newcommand` requiring 8 arguments, the autocompletion of kile will propose to me something like :               \mycommand{x}{x}{x}{x}{x}{x}{x}{x} %[Proposed by Kile (autocompletion)]      ...but after some times, you do not know who is who! So it would be nice to define 'argument names' so that the autocompletion propose to me something like :               \mycommand{date}{name}{stuff1}{stuff2}{age}{address}{city}{whateveritis} %[Proposed by Kile (autocompletion)]      To summarize, I would like to change this : ![http://i.stack.imgur.com/oIJss.png](http://i.stack.imgur.com/py41Y.png) to this : ![http://i.stack.imgur.com/9eXMg.png](http://i.stack.imgur.com/9eXMg.png)


title: Enumerate Package

text: I'm trying to write an exam paper using LaTeX. I use the enumerate package, e.g.               \begin{enumerate}       \item This question is about balloons.         \begin{enumerate}           \item What shape are balloons?           \item What colour are balloons?         \end{enumerate}     \end{enumerate}      The problem comes from when I want to put commentary into the question. At the moment, the first level of enumerate gives me a number, and the second a letter. But in between the letters, I might like to say something about the next part of the question, and I would like that outdented, i.e. not on the same level as the lettered parts of the question. I have a work around:               \begin{enumerate}       \item This question is about balloons.         \begin{enumerate}[(a)]           \item What shape are balloons?         \end{enumerate}       Assume that all balloons are the same shape.         \begin{enumerate}[(b)]           \item What colour are balloons?         \end{enumerate}     \end{enumerate}      This is a real pain in the you-know-what. Doing it this way, everything in the last enumerate environment gets labelled as `(b)`. So I have to `\begin{enumerate}` and `\end{enumerate}` and label every subsequent part:               \begin{enumerate}       \item This question is about balloons.         \begin{enumerate}[(a)]           \item What shape are balloons?         \end{enumerate}       Assume that all balloons are the same shape.         \begin{enumerate}[(b)]           \item What colour are balloons?         \end{enumerate}         \begin{enumerate}[(c)]           \item Why do I have to keep doing this?         \end{enumerate}         \begin{enumerate}[(d)]           \item Why do I have to keep doing this?         \end{enumerate}     \end{enumerate}


title: How to auto indent latex code with Kile?

text: Is there a way for Kile to automatically correct the indentation of the latex code of an entire document? If yes, what is combination of keys (shortcut) or the menus that I should use? I made a search in Google but I did not find the answer. Thanks in advance!


title: Suppressing section name in table of contents

text: I'm trying to have a TOC like so:               Name of part     Name of Chapter       Section 1 ..... page       Section 2 ..... page      I don't want the section's name to appear anywhere in the TOC. I want it hidden. I've tried redefining `\l@section` like so               \let\latexl@section\l@section     \def\l@section#1#2{\begingroup\numberline{#1}\latexl@section{}{#2}\endgroup}      but the issue seems to be that \section calls addtocontents with the line number and the line name information packed into the same call to numberline... Anyone have any ideas?


title: comp.text.tex quasi-defunct?

text: I tried posting a question to comp.text.tex from my google account, which has worked in the past. it is pretty non-descript as far as errors go. either I managed to be classified as a meat-popsicle (spam), or... most posting these days are announcements, so I suspect this is more general.


title: How to specify start and end date of \chronoperiode in a dd/mm/yyyy format

text: The package chronosys allows to draw a timeline with a reasonable degree of customization, without the need to draw it by yourself using tikz or similar tools. In my opinion, is the most promising tool to draw timelines in a LaTeX document. ![enter image description here](http://i.stack.imgur.com/RwFUo.png) But it has a limitation. While the command `\chronoevent` accepts a date in `dd/mm/yyyy` format, the command `\chronoperiode` does not (only integers are accepted). In this way, time periods cannot start on specific dates, and time periods shorter than one year cannot be drawn in the timeline. Is there a way to overcome this limitation?


title: hbox out of margin, beamer

text: I wanna put a round image in a presentation il LaTeX out from the margin. I would like to show it just as a 1/4 of the image in the left bottom corner. I tried:               \begin{frame}       \tableofcontents       \hbox to -35pt{         \vbox to 35pt{             \includegraphics[width=4cm,keepaspectratio]{img/prova}\hfil         }        }     \end{frame}      but the image goes under the bottom margin (so changing the value of `\vbox` the image go down or up). I also tried to change the value of the `\hbox` also with positive values but nothing happen.


title: Indent figure multi-line caption

text: \begin{figure}[htbp]     \centering         \includegraphics[width=0.55\textwidth]{Chapters/AIntroBackground/figures/Rayleigh.pdf}     \caption{Graph of intensity of the diffraction pattern for a circular aperture. Note that, similar to a single slit, the central maximum is wider and brighter than those to the sides.}     \label{fig:Rayleigh}     \end{figure}      ![1](http://i.stack.imgur.com/fFmwA.png) How can I indent the multi-line captoins. For example, I want to bring in the "similar" (2nd line) right under "Graph" (1st line).


title: Translate a path in Metapost

text: Is there a way to **draw** a **path** that was defined by relationships between **pairs centered around a specific point**? I basically want to create a path that I can translate anywhere I want in my image. Thank you!