title: How to convert a LaTeX file with pstricks code to pdf?

text: I am new to LaTeX and was writing an article with MikTeX. But when I insert a `pspicture` and compile the file into `pdf` format, the `pspicture` just does not show up. But if I compile the file into `ps`, then the figure, which is an external `.png` file, goes wrong. Seemingly they just cannot be together :( I googled many solutions and tried to import many different packages but still doesn't work out. The code is given as below:               \documentclass{article}     \usepackage[pdf]{pstricks}     \usepackage{pst-sigsys}     \usepackage{auto-pst-pdf}          \pagestyle{empty}          \begin{document}          \begin{figure}[ht]         \centering         \begin{pspicture}(-7.5,-2.5)(7.5,.5)           \psset{style=RoundCorners,style=Arrow,gratioWh=1.35}           \pssignal(-7.5,-1){f}{$f(n)$}           \pssignal(7.5,-1){ff}{$\hat{f}(n)$}           \dotnode(-6,-1){dot1}           \pscircleop(6, -1)    {oplus}           \newcount\cnt              %--- First and second channels ---         \cnt=-1         \psforeach{\ry}{0,-2}{\advance\cnt by 1\relax         \psfblock(-4.5,\ry){h\the\cnt}{$h_{\the\cnt}(n)$}         \psdsampler(-2,\ry){ds\the\cnt}{2}         \ldotsnode(0,\ry){dots\the\cnt}         \psusampler(2,\ry){us\the\cnt}{2}         \psfblock(4.5,\ry){g\the\cnt}{$g_{\the\cnt}(n)$}}              %--- Connecting blocks ---           \nclist{ncline}{f, dot1}           \nclist{ncline}{oplus, ff}           \nclist{ncline}{h0, ds0, dots0, us0, g0}           \nclist{ncline}{h1, ds1, dots1, us1, g1}           \ncangle[angleA=90, angleB=180]{dot1}{h0}           \ncangle[angleA=-90, angleB=180]{dot1}{h1}           \ncangle[angleB=90]{g0}{oplus}           \ncangle[angleB=-90]{g1}{oplus}         \end{pspicture}     \end{figure}          \begin{figure}[ht]         \centering         \includegraphics[scale=.5]{./gsample2.png}     \end{figure}          \end{document}      Hope somebody can help me solve the problem. Thanks a lot. Here I am also giving the log-file. I didn't change the code at all, only passing `-escape-shell` to compiler.                   This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2011.8.7)  20 JAN 2012 14:22         entering extended mode         **D:/Documents/LaTeX*file/BlockDiagram.tex         ("D:/Documents/LaTeX file/BlockDiagram.tex"         LaTeX2e <2011/06/27>         Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, german, ngerman, german-x-2009-06-19, ngerm         an-x-2009-06-19, french, loaded.         ("C:\Program Files\MiKTeX 2.8\tex\latex\base\article.cls"         Document Class: article 2007/10/19 v1.4h Standard LaTeX document class         ("C:\Program Files\MiKTeX 2.8\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         ) ("C:\Program Files\MiKTeX 2.8\tex\latex\pstricks\pstricks.sty"         Package: pstricks 2011/10/31 v0.52 LaTeX wrapper for `PSTricks' (RN,HV)              >>> Loading package auto-pst-pdf <<<         ("C:\Program Files\MiKTeX 2.8\tex\generic\pstricks\base\pstricks.tex"         ("C:\Program Files\MiKTeX 2.8\tex\generic\xkeyval\pst-xkey.tex"         File: pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)              ("C:\Program Files\MiKTeX 2.8\tex\latex\xkeyval\xkeyval.sty"         Package: xkeyval 2008/08/13 v2.6a package option processing (HA)              ("C:\Program Files\MiKTeX 2.8\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)          ("D:\Documents\LaTeX file\keyval.tex"))))         ("C:\Program Files\MiKTeX 2.8\tex\generic\pstricks\base\pst-fp.tex" `pst-fp' v0.05, 2010/01/17 (hv)         \pstFP@xs=\count88         \pstFP@xia=\count89         \pstFP@xib=\count90         \pstFP@xfa=\count91         \pstFP@xfb=\count92         \pstFP@rega=\count93         \pstFP@regb=\count94         \pstFP@regs=\count95         \pstFP@times=\count96         )         \psLoopIndex=\count97              `PSTricks' v2.23  <2011/09/04> (tvz)         \pst@dima=\dimen103         \pst@dimb=\dimen104         \pst@dimc=\dimen105         \pst@dimd=\dimen106         \pst@dimg=\dimen107         \pst@dimh=\dimen108         \pst@dimm=\dimen109         \pst@dimn=\dimen110         \pst@dimo=\dimen111         \pst@dimp=\dimen112         \pst@hbox=\box26         \pst@ibox=\box27         \pst@boxg=\box28         \pst@cnta=\count98         \pst@cntb=\count99         \pst@cntc=\count100         \pst@cntd=\count101         \pst@cntg=\count102         \pst@cnth=\count103         \pst@cntm=\count104         \pst@cntn=\count105         \pst@cnto=\count106         \pst@cntp=\count107         \@zero=\count108         \pst@toks=\toks16         ("C:\Program Files\MiKTeX 2.8\tex\generic\pstricks\base\pstricks.con")         \psunit=\dimen113         \psxunit=\dimen114         \psyunit=\dimen115         \pst@C@@rType=\count109         \pslinewidth=\dimen116         \psk@startLW=\dimen117         \psk@endLW=\dimen118         \pst@customdefs=\toks17         \pslinearc=\dimen119         \pst@symbolStep=\dimen120         \pst@symbolWidth=\dimen121         \everypsbox=\toks18         \psframesep=\dimen122         \pslabelsep=\dimen123         \pst@shift=\dimen124         \theoverlaybox=\box29         )         File: pstricks.tex 2011/09/04 v2.23 `PSTricks' (tvz,hv)              ("C:\Program Files\MiKTeX 2.8\tex\generic\pstricks\base\pst-fp.tex")         File: pst-fp.tex 2011/09/04 v2.23 `PST-fp' (hv)              ("C:\Program Files\MiKTeX 2.8\tex\latex\xcolor\xcolor.sty"         Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)          ("C:\Program Files\MiKTeX 2.8\tex\latex\00miktex\color.cfg"         File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive         )         Package xcolor Info: Package option `pdf' ignored on input line 216.         Package xcolor Info: Driver file: pdftex.def on input line 225.              ("C:\Program Files\MiKTeX 2.8\tex\latex\pdftex-def\pdftex.def"         File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX              ("C:\Program Files\MiKTeX 2.8\tex\generic\oberdiek\infwarerr.sty"         Package: infwarerr 2010/04/08 v1.3 Providing info/warning/message (HO)         )         ("C:\Program Files\MiKTeX 2.8\tex\generic\oberdiek\ltxcmds.sty"         Package: ltxcmds 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)         )         \Gread@gobject=\count110         )         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.         ))         ("C:\Program Files\MiKTeX 2.8\tex\latex\pst-sigsys\pst-sigsys.sty"         Package: pst-sigsys 2011/03/07 package wrapper for pst-sigsys.tex (fd)              ("C:\Program Files\MiKTeX 2.8\tex\generic\pst-sigsys\pst-sigsys.tex"         ("C:\Program Files\MiKTeX 2.8\tex\generic\pst-node\pst-node.tex"  v1.21, 2011/11/21         \psrow=\count111         \pscol=\count112         \psmatrixcnt=\count113         \psrowsep=\skip43         \pscolsep=\skip44         \pst@args=\count114         \num@pts=\count115         \pst@argcnt=\count116         ) `PST-SigSys' v1.4, 2011/03/07 (fd)         \ss@ticklength=\dimen125         \ss@signalsep=\dimen126         \ss@zerowidth=\dimen127         \ss@zeroradius=\dimen128         \ss@zeroradiusinc=\dimen129         \ss@polewidth=\dimen130         \ss@polelength=\dimen131         \ss@oplength=\dimen132         \ss@opwidth=\dimen133         \ss@opsep=\dimen134         \ss@ldotssep=\dimen135         \ss@ldotssize=\dimen136         \ss@aoffset=\dimen137         \ss@knoblength=\dimen138         \ss@knobwidth=\dimen139         \ss@temp@dimA=\dimen140         \ss@temp@dimB=\dimen141         \ss@temp@dimC=\dimen142         \ss@temp@cnt=\count117         \ss@calc@dim=\dimen143         \ss@if@dimA=\dimen144         \ss@if@dimB=\dimen145         )         File: pst-sigsys.tex 2011/03/07 v1.4 `PST-sigsys' (fd)         ) ("C:\Program Files\MiKTeX 2.8\tex\latex\auto-pst-pdf\auto-pst-pdf.sty"         Package: auto-pst-pdf 2009/04/26 v0.6 Wrapper for pst-pdf          ("D:\Documents\LaTeX file\ifpdf.sty"         Package: ifpdf 2001/06/14 v1.0 Providing \ifpdf (HO)         Package ifpdf Info: pdfTeX in pdf mode detected on input line 140.         )         ("C:\Program Files\MiKTeX 2.8\tex\latex\ifplatform\ifplatform.sty"         Package: ifplatform 2010/10/22 v0.4 Testing for the operating system              ("C:\Program Files\MiKTeX 2.8\tex\generic\oberdiek\pdftexcmds.sty"         Package: pdftexcmds 2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)              ("C:\Program Files\MiKTeX 2.8\tex\generic\oberdiek\ifluatex.sty"         Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)         Package ifluatex Info: LuaTeX not detected.         )              LaTeX Warning: You have requested, on input line 187, version                        `2010/09/13' of package ifpdf,                        but only version                        `2001/06/14 v1.0 Providing \ifpdf (HO)'                        is available.              Package pdftexcmds Info: LuaTeX not detected.         Package pdftexcmds Info: \pdf@primitive is available.         Package pdftexcmds Info: \pdf@ifprimitive is available.         Package pdftexcmds Info: \pdfdraftmode found.         ) ("C:\Program Files\MiKTeX 2.8\tex\generic\oberdiek\catchfile.sty"         Package: catchfile 2011/03/01 v1.6 Catches the contents of a file (HO)              ("C:\Program Files\MiKTeX 2.8\tex\generic\oberdiek\etexcmds.sty"         Package: etexcmds 2011/02/16 v1.5 Prefix for e-TeX command names (HO)         Package etexcmds Info: Could not find \expanded.         (etexcmds)             That can mean that you are not using pdfTeX 1.50 or         (etexcmds)             that some package has redefined \expanded.         (etexcmds)             In the latter case, load this package earlier.         )))         \c@app@runs=\count118         runsystem(echo " ")...executed.              runsystem(echo "-------------------------------------------------")...executed.              runsystem(echo "auto-pst-pdf: Auxiliary LaTeX compilation")...executed.              runsystem(echo "-------------------------------------------------")...executed.              runsystem(del "BlockDiagram-autopp.log")...executed.              runsystem(del "BlockDiagram-autopp.aux")...executed.              runsystem(del "BlockDiagram-autopp.dvi")...executed.              runsystem(del "BlockDiagram-autopp.ps")...executed.              runsystem(del "BlockDiagram-autopp.pdf")...executed.              runsystem(latex -disable-write18 -jobname="BlockDiagram-autopp" -interaction=batchmode  "\let \APPmakepictures \empty \i         nput  BlockDiagram.tex")...executed.              runsystem(dvips -Ppdf -o "BlockDiagram-autopp.ps" "BlockDiagram-autopp.dvi")...executed.              runsystem(ps2pdf  "BlockDiagram-autopp.ps" "BlockDiagram-autopp.pdf")...executed.              runsystem(pdfcrop  "BlockDiagram-autopp.pdf" "BlockDiagram-pics.pdf")...executed.                        Package auto-pst-pdf Warning:              Creation of BlockDiagram-pics.pdf failed.         This warning occured on input line 124.                   Package auto-pst-pdf Warning:              Could not create BlockDiagram-pics.pdf. Auxiliary files not deleted.         This warning occured on input line 124.              runsystem(echo "-------------------------------------------------")...executed.              runsystem(echo "auto-pst-pdf: End auxiliary LaTeX compilation")...executed.              runsystem(echo "-------------------------------------------------")...executed.              ("C:\Program Files\MiKTeX 2.8\tex\latex\pst-pdf\pst-pdf.sty"         Package: pst-pdf 2008/10/09 v1.1v PS graphics for pdfLaTeX (RN,HjG)         \c@pspicture=\count119              ("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\graphicx.sty"         Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)              ("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\graphics.sty"         Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)          ("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\trig.sty"         Package: trig 1999/03/16 v1.09 sin cos tan (DPC)         ) ("C:\Program Files\MiKTeX 2.8\tex\latex\00miktex\graphics.cfg"         File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive         )         Package graphics Info: Driver file: pdftex.def on input line 91.         )         \Gin@req@height=\dimen146         \Gin@req@width=\dimen147         )         Package pst-pdf Info: MODE: 1 (pdfTeX mode) on input line 214.         \ppf@output=\toks19              ("C:\Program Files\MiKTeX 2.8\tex\latex\preview\preview.sty"         Package: preview 2010/02/14 11.86 (AUCTeX/preview-latex)         \pr@snippet=\count120         \pr@box=\box30         \pr@output=\toks20         ) ("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\dvips.def"         File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)         ) ("C:\Program Files\MiKTeX 2.8\tex\latex\environ\environ.sty"         Package: environ 2008/06/18 v0.2 A new way to define environments         \@emptytoks=\toks21         \@envbody=\toks22         ))) ("D:\Documents\LaTeX file\BlockDiagram.aux")         LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.         LaTeX Font Info:    ... okay on input line 8.         LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.         LaTeX Font Info:    ... okay on input line 8.         LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.         LaTeX Font Info:    ... okay on input line 8.         LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.         LaTeX Font Info:    ... okay on input line 8.         LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.         LaTeX Font Info:    ... okay on input line 8.         LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.         LaTeX Font Info:    ... okay on input line 8.              ("C:\Program Files\MiKTeX 2.8\tex\context\base\supp-pdf.mkii"         [Loading MPS to PDF converter (version 2006.09.02).]         \scratchcounter=\count121         \scratchdimen=\dimen148         \scratchbox=\box31         \nofMPsegments=\count122         \nofMParguments=\count123         \everyMPshowfont=\toks23         \MPscratchCnt=\count124         \MPscratchDim=\dimen149         \MPnumerator=\count125         \makeMPintoPDFobject=\count126         \everyMPtoPDFconversion=\toks24         )         Preview: Fontsize 10pt         Preview: PDFoutput 1              Package pst-pdf Warning: pspicture No. 1 undefined.              <./gsample2.png, id=1, 422.32782pt x 316.18124pt>         File: ./gsample2.png Graphic file (type png)          <use ./gsample2.png>         Package pdftex.def Info: ./gsample2.png used on input line 41.         (pdftex.def)             Requested size: 211.16339pt x 158.09023pt.                   Package pst-pdf Warning: File `BlockDiagram-pics.pdf' not found.         (pst-pdf)                Use the following commands to create it:         (pst-pdf)                ----------------------------------------------------          (pst-pdf)                latex BlockDiagram.tex         (pst-pdf)                dvips -o BlockDiagram-pics.ps BlockDiagram.dvi         (pst-pdf)                ps2pdf BlockDiagram-pics.ps         (pst-pdf)                ---------------------------------------------------- .              [1                   Non-PDF special ignored!         Non-PDF special ignored!         Non-PDF special ignored! <D:/Documents/LaTeX file/gsample2.png (PNG copy)>] ("D:\Documents\LaTeX file\BlockDiagram.aux")          )          Here is how much of TeX's memory you used:          4278 strings out of 495285          57808 string characters out of 3180547          141368 words of memory out of 3000000          7442 multiletter control sequences out of 15000+200000          3640 words of font info for 14 fonts, out of 3000000 for 9000          14 hyphenation exceptions out of 8191          39i,7n,38p,600b,332s stack positions out of 5000i,500n,10000p,200000b,50000s              Output written on BlockDiagram.pdf (1 page, 10107 bytes).         PDF statistics:          7 PDF objects out of 1000 (max. 8388607)          0 named destinations out of 1000 (max. 500000)          6 words of extra memory for PDF output out of 10000 (max. 10000000)


title: Create a style for a title

text: I need to create some kind of title style that must not appear into the TOC and must looks like this, maybe more close to the paragraph. ![enter image description here](http://i.stack.imgur.com/8lVsq.png) I try this,               \newcommand{\littt}[1]{         \begin{flushleft}         \textbf{#1}         \end{flushleft}         \vspace{-1cm}     }      but sometimes looks perfect and sometimes appears over the text.


title: Placing text below other text

text: How can I place some text centered below other text on the line? I want to create similar to results to what is found in the `ruby` package, but instead of placing text above, the extra text is put below the baseline text. In the source code (see ruby.sty), I think I have found the code which places `#2` above `#1` in `\ruby{}{}`:               {\@tempdimc \f@size\p@     \@tempdimc \rubysize\@tempdimc     \sbox\z@{\vrule\@height.7\baselineskip\@depth\z@\@width\z@ #1}     \sbox\@tempboxa{\fontsize{\@tempdimc}{1.2\@tempdimc}\selectfont         \vrule\@height\z@\@depth.3\baselineskip\@width\z@ #2}        * It is possible that `ruby.sty` already provides this feature, but I could not find any mention of this in the documentation (see ruby.txt). I have also tried these, but the results are a bit different:   * `$\stackrel[below]{above}{middle}$`, but I do not need any text above.   * `$\underbrace{above}_{\hbox{below}}$`, but I do not need the underbrace. I would prefer if the format and distance copied that of `\ruby{}{}`.


title: TikZ: What do I look up to find information on the let command in draw?

text: In one of my post, Jake used the `\draw let` to determine the arc between 2 lines. Where can I find information to better understand this command? Or what do I look up? Similar, I would like to learn more about `atan2`. I assume it means arctan but what is the 2 for?               \draw let           \p0 = (F),           \p1 = (P1),           \p2 = (P2),           \n1 = {atan2(\x1 - \x0, \y1 - \y0)},           \n2 = {atan2(\x2 - \x0, \y2 - \y0)},           \n3 = {.3cm}         in (F) +(\n1:\n3) arc [radius = \n3, start angle = \n1, end angle = \n2]         node[scale = .75, pos = .5, above = .25cm] {\(\Delta\nu\)};      I would like to understand this code a lot better than my present understanding which is center point, right point, left point, and add the rest to draw and arc where `\n3` is the length of the arc.


title: pdflatex without ghostscript to preserve transparency of included pdfs

text: I'm trying to include a pdf with a transparent gradient using pdflatex from texlive installed with macports. Using the article class (not `standalone`), the transparency of the included pdf is lost when opened with Preview.app (amongst other viewers). Yes, it is there when viewed with Acrobat or Chrome, but I can't force my readers to use these viewers. I have also noticed this problem when filtering my pdf through ghostscript.               gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output_gs.pdf white2green1.7.pdf      So while the original file white2green1.7.pdf shows the transparency correctly in Preview.app etc., the new file output_gs.pdf does not. Is `pdflatex` running my pdfs through ghostscript? Is there anyway to avoid this? I have tried reducing the PDF version of the included graphics down to 1.4. I am also unhappy with resorting to rasterizing or flattening the transparency. For reference, the tex I'm compiling is:               \documentclass{article}     % these two lines don't change the result     \pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>}     \pdfoptionpdfminorversion 7     \usepackage{graphicx}     \begin{document}       \begin{figure}         \includegraphics[width=\linewidth]{{{white2green1.7}}}       \end{figure}     \end{document}


title: Tabularx "auto" width?

text: I would like to create a table whose width should be the minimum possible (lines don't wrap). I see that `tabularx` wants a width parameter, is it possible to specify something like "auto", instead, for example, of `\linewidth`?


title: achemso single-column-abstract and Helvetica captions

text: I am currently writing a paper with the achemso style package, as required by the American Chemical Society. I can produce the very nice two-column format by just doing               \documentclass[journal=jacsat,manuscript=article,layout=twocolumn]{achemso}      However this fails to produce two nice features I would desire: a single column abstract and small Helvetica fonts in the captions. Does anyone know which are the additional options that I need to introduce? Thanks


title: \dot{x} and beamer

text: Using `\dot{X}` with `beamer` ends up with an `x` with an omega on it!! My code:               \documentclass[15pt, slidestop]{beamer}          \usepackage[T1]{fontenc}      \usepackage[brazil]{babel}         \usepackage[utf8]{inputenc}     \usepackage{ae}          \usepackage{pgf,xcolor,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}     \usepackage{graphicx}     \usepackage{amsmath,amssymb}     \usepackage{fancyvrb}     \usepackage[normalem]{ulem}     \usepackage{float}     \usepackage{colortbl}     \usepackage{bbm}        \usepackage{color}     \usepackage{algorithmic}     \usepackage{rotating}     \usepackage{algorithm}     \usepackage{multicol}     \usepackage{fourier}          \begin{document}          \frame{       \frametitle{}          \begin{displaymath}     \dot{x}  =  A x(t) + B u(t)     \end{displaymath}          }     \end{document}      Any help?


title: Can LyX automatically save the PDF output in the same folder?

text: I use LyX 2.0.4 (on Mac OS 10.7) and would like it to do the following: whenever I hit "View" it should automatically save the pdf output of the lyx file in the same folder the lyx file resides. Whenever I hit "View" again it should overwrite the older version of the pdf. Is that possible? This is similar to the behavior I know from TeXShop.


title: Replacing substrings by linebreaks

text: I have a LaTeX document with several authors that I enter like `\author{First Author \& Second Author \& ...`. In some places in the document I want to print these authors with a linebreak behind every name, i.e. I want to replace all occurences of `\&` by `\\` (or an equivalent command). I found this question about an almost identical issue, except that no linebreak is to be inserted. Trying `\StrSubstitute{text \& text}{ \& }{\\}` I get a whole bunch of errors and no output. The linebreak seems to break the `\StrSubstitute` macro. Is there a way to prevent this from failing? If not, what other approach will work?


title: technical report citation in bibtex

text: How can I remove the word (Technical report) from the output of bibtex when using Harvard style?               @techreport{doornik1994practical,       title={A practical test for univariate and multivariate normality},       author={Doornik, J.A. and Hansen, H.},       year={1994},       institution={Nuffield College, Oxford, UK, Discussion paper}       type={~},     }


title: My pdf closes every time in WinEdt

text: I use Kile on Linux and WinEdt on Windows both with same version of MiKTeX. While using KILE, when I compile "PDFLaTeX" , it updates my opend output `pdf` file and does not close the file. Where as in WinEdt it closes the already opened output `pdf` file and open it again after compiling. What irriatates me is while it opens the new output and it goes to first page rather than the page (of output pdf file) I edited. :( Any remedy would be appreciated.


title: Superscript and Subscript together

text: I would like to show both super and subscript together some text. I tried this `sometext\textsuperscript{1}\textsubscript{2}` But 2 does not show up right below 1. Thanks for your help. Also how can I show 1 & 2 in front of sometext as well. regards Aku I tried some both the answers posted below and here is the attachment. I was trying to put 2 digit number 16 and 32 in superscript and subscript. ![alt text](http://i.stack.imgur.com/fYP81.jpg) ![alt text](http://i.stack.imgur.com/fYP81.jpg)


title: inner-column labeled matrix

text: I am slowly becoming more efficient with math environments and macros in TeX, but occasionally come across something where I'm not really sure what the best solution would be. ![enter image description here](http://i.stack.imgur.com/dYi6i.png) I wanted to hear from some experts what you think would be the most sensible approach (looks good and efficient to code) to making the above figure in LaTeX. I was initially thinking   1. `tabular` using `\multicolumn`,    2. TikZ; then    3. `array`. Not necessarily looking for someone to just write me a solution, but more of insight into your macro/environment approach and why.


title: Longtable doesn't work well with geometry

text: I would like to produce document with multiple longtables inside. I need to customize my headers with fancyhdr placing graphics inside it and modyfying page geometry. But then longtables have problems with flipping over the page. Here is an example of my code:               \documentclass[a4paper,12pt]{article}     \usepackage{polski}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{graphicx}     \usepackage{geometry}     \geometry{margin=0.5cm}     \usepackage{fancyhdr}     \usepackage{longtable}     \pagestyle{fancy}     %\fancyhf{}     \renewcommand{\headrulewidth}{0.0pt}     \begin{document}     \setlength{\headheight}{3cm}     \setlength{\LTpre}{0pt}     \addtolength{\headwidth}{1cm}     \fancyhead{}     \fancyfoot{}     \fancyhead[C]{ \hspace*{-1.1cm} \fbox{\begin{picture}(500,300) \end{picture}}}          \noindent     Information:\\     \textbf{\textsc{John}}\\      \textbf{\textsc{Johnson}}\\      \textbf{\textsc{Firm A}}\\      \textbf{\textsc{54-427 Wrocław}}\\      \textbf{\textsc{phone}}\\                     \begin{flushright}         \textbf{Firm B}\\     \textbf{Adress}\\     \textbf{234-567-981}\\     \textbf{Andrew Smith}\\          \end{flushright}          \begin{longtable}{lrrr}         \textbf{Funkcjonalność}\\ \hline         \endhead         \textbf{Funkcjonalność}\\ \hline         \endfirsthead         \hline \\         \endfoot         \hline \\         \endlastfoot         Wyszukiwanie i filtrowanie &   &  &0 zł\\      Połączenia danych &   &  &0 zł\\      Kod kreskowy &   &  &0 zł\\      Wersjonowanie plików &   &  &0 zł\\      Import/eksport do Excela &   &  &0 zł\\      Statystyki pracy użytkowników &   &  &0 zł\\      Kopia zapasowa codziennie na zewnętrzny ftp &   &  &0 zł\\      Konto master & 2$\times$  & 0 &0 zł\\      Użytkownik & 3$\times$  & 0 &0 zł\\      Klient & 4$\times$  & 0 &0 zł\\      Suma użytkowników &   &  &0 zł\\           \end{longtable}          \begin{longtable}{lrrr}         \textbf{Moduły}\\ \hline         \endhead         \textbf{Moduły}\\ \hline         \endfirsthead         \hline \\         \endfoot         \hline \\         \endlastfoot         Wyszukiwanie i filtrowanie &   &  &0 zł\\      Połączenia danych &   &  &0 zł\\      Kod kreskowy &   &  &0 zł\\      Wersjonowanie plików &   &  &0 zł\\      Import/eksport do Excela &   &  &0 zł\\      Statystyki pracy użytkowników &   &  &0 zł\\      Kopia zapasowa codziennie na zewnętrzny ftp &   &  &0 zł\\      Konto master & 2$\times$  & 0 &0 zł\\      Użytkownik & 3$\times$  & 0 &0 zł\\      Klient & 4$\times$  & 0 &0 zł\\      Suma użytkowników &   &  &0 zł\\      Wielkość przestrzeni dyskowej & 2$\times$  & 0 &0 zł\\      OCR wizytówek &   & 0 &0 zł\\      Wysyłanie seryjnych e-maili &   & 0 &0 zł\\      Indywidualny import/eksport danych &   & 0 &0 zł\\      Udostępnianie wybranych danych online &   & 0 &0 zł\\           \end{longtable}          \begin{longtable}{lrrr}         \textbf{Wdrożenie}\\ \hline         \endhead         \textbf{Wdrożenie}\\ \hline         \endfirsthead         \hline \\         \endfoot         \hline \\         \endlastfoot         Wyszukiwanie i filtrowanie &   &  &0 zł\\      Połączenia danych &   &  &0 zł\\      Kod kreskowy &   &  &0 zł\\      Wersjonowanie plików &   &  &0 zł\\      Import/eksport do Excela &   &  &0 zł\\      Statystyki pracy użytkowników &   &  &0 zł\\      Kopia zapasowa codziennie na zewnętrzny ftp &   &  &0 zł\\      Konto master & 2$\times$  & 0 &0 zł\\      Użytkownik & 3$\times$  & 0 &0 zł\\      Klient & 4$\times$  & 0 &0 zł\\      Suma użytkowników &   &  &0 zł\\      Wielkość przestrzeni dyskowej & 2$\times$  & 0 &0 zł\\      OCR wizytówek &   & 0 &0 zł\\      Wysyłanie seryjnych e-maili &   & 0 &0 zł\\      Indywidualny import/eksport danych &   & 0 &0 zł\\      Udostępnianie wybranych danych online &   & 0 &0 zł\\      Wdrożenie pierwszego stanowiska & 1$\times$  & 0 &0 zł\\      Wdrożenie dodatkowych stanowisk & 1$\times$  & 0 &0 zł\\      Dojazd & 1$\times$  & 0 &0 zł\\      Godziny szkoleniowe & 1$\times$  & 0 &0 zł\\      Dodatkowe koszty &   &  &0 zł\\           \end{longtable}          \begin{longtable}{lrrr}         \textbf{Płatności}\\ \hline         \endhead         \textbf{Płatności}\\ \hline         \endfirsthead         \hline \\         \endfoot         \hline \\         \endlastfoot         Wyszukiwanie i filtrowanie &   &  &0 zł\\      Połączenia danych &   &  &0 zł\\      Kod kreskowy &   &  &0 zł\\      Wersjonowanie plików &   &  &0 zł\\      Import/eksport do Excela &   &  &0 zł\\      Statystyki pracy użytkowników &   &  &0 zł\\      Kopia zapasowa codziennie na zewnętrzny ftp &   &  &0 zł\\      Konto master & 2$\times$  & 0 &0 zł\\      Użytkownik & 3$\times$  & 0 &0 zł\\      Klient & 4$\times$  & 0 &0 zł\\      Suma użytkowników &   &  &0 zł\\      Wielkość przestrzeni dyskowej & 2$\times$  & 0 &0 zł\\      OCR wizytówek &   & 0 &0 zł\\      Wysyłanie seryjnych e-maili &   & 0 &0 zł\\      Indywidualny import/eksport danych &   & 0 &0 zł\\      Udostępnianie wybranych danych online &   & 0 &0 zł\\      Wdrożenie pierwszego stanowiska & 1$\times$  & 0 &0 zł\\      Wdrożenie dodatkowych stanowisk & 1$\times$  & 0 &0 zł\\      Dojazd & 1$\times$  & 0 &0 zł\\      Godziny szkoleniowe & 1$\times$  & 0 &0 zł\\      Dodatkowe koszty &   &  &0 zł\\      Cena modułów &   &  &0 zł\\      Cena wdrożenia &   &  &0 zł\\      Rateczki &   &  &0 zł\\           \end{longtable}               \end{document}      Sorry for some non-english words, but I hope it doesn't matter what's inside. EDIT: I attach the image that should be in header to approach to original problem. Header of page


title: Formatting apalike-url.bst link to reference

text: I am using apalile-url.bst to get APA references formatting, but I want to format the reference link when I am using a URL, for example when I reference a URL I get. > this is a url reference [StackExchange, ], this is a book reference [Jones, > 2001] As you can see if the URL does not have a year it still uses the [name,year] format, but I want the link to the reference to look like > this is a url reference [StackExchange], this is a book reference [Jones, > 2001] Any ideas on how can I modify the .bst file? EDIT: added working example               \documentclass[letterpaper,12pt,oneside,onecolumn,final,openany]{report}     \usepackage{url}          \begin{document}          \chapter{Test}          This shows the url \cite{google}               \clearpage     \addcontentsline{toc}{chapter}{References}     \bibliographystyle{./reference/apalike-url}     \bibliography{./reference/refdatabasewok}          \end{document}      refdatabasewok is               @ELECTRONIC{google,       author = {Google},       title = {Google},       url = {https://www.google.com}     }


title: How may I create notation for minimisation or maximisation over parameters?

text: I would like to create notation for minimisation or maximisation over parameters such as the notation shown here: ![](http://i.imgur.com/WChBd.png) I have a solution which is very inelegant. What do you think would be the neatest approach to creating this notation in LaTeX?


title: Addplot3 with graphics / Image Offset to Axis

text: I'm currently working with tikz and pgfplots to set a few plots. It works marvelously for a lot of applications, add I have set a number of plots (especially surfaces from matlab) with help of the scripts from 3-dimensional histogram in pgfplots. However, the current plot is over my head. The final result is offset to the axis somehow, but the mapping seems to do fine. I have scoured over several posts like Why do I fail to import external 3D plots with pgfplots?, Problem with external graphics and 3D pgfplots and a few others with no avail. I added 4 corner points at the limits of the axis to be able to produce the necessary 4 points. those are the black crosses visible in the image. Below is a MWE:               \documentclass[a4paper,10pt]{scrartcl}          \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     % defining custom colors     \begin{tikzpicture}          \begin{axis}[%     view={-173}{18},     scale only axis,     clip = false,     xmin=-26.9710631775209,     xmax=-13.4358218716748,     ymin=0.106301614157972,     ymax=14.7011505583562,     z dir=reverse,     zmin=450.566465947184,     zmax=457.647656398296,     axis x line*=bottom,     axis y line*=left,     axis z line*=left     ]     \addplot3 graphics[debug = visual,     points={% important     (-26.9711,0.1063,450.5665) => (337.0523,431.7509)     (-13.4358,14.7012,457.6477) => (138.9328,163.2305)     (-26.9711,14.7012,457.6477) => (391.2548,186.9052)     (-13.4358,0.1063,457.6477) => (86.5994,289.703)     }] {img};     \end{axis}     \end{tikzpicture}%     \end{document}      ![MWEimg](http://i.stack.imgur.com/D2K8V.png)


title: How to collect data and put the content on the last page?

text: I would like to collect some numbers into a list, and put the numbers on the last page, for example separated by comas.


title: Figure numbers repeat when using \numberwithin

text: I'm using lyx, and I found out that if I add the command `\numberwithin` for figures, the figure numbers get repeated! For example, figure 5.1 comes twice... and a huge confusion between figures come up. I tried to change the position of the label to be before and after the caption... but no use. What could cause this? Anyone having experience with this? Thank you for any efforts.


title: Difference in Sound Intensity Level Plot

text: I've been trying to produce the following plot: ![Sound Intensity Level](http://i.stack.imgur.com/tIIqi.png) And here's mine (No labels, still just trying to get the plot right). ![My plot](http://i.stack.imgur.com/izFjF.png) I can't seem to get a square grid, nor can I get the plot to start at -10dB. Any help would be appreciated.


title: How best to change the font size (etc) of threeparttable's table notes?

text: How best to change the font size (etc) of the **`threeparttable`** table notes ? Google returned these (duplicate) unanswered stubs (in English and German, but with pictures ;)   * http://compgroups.net/comp.text.tex/changing-font-size-of-table-notes-in-threepartt/1916286   * http://www.mrunix.de/forums/showthread.php?t=72470   * http://www.golatex.de/threeparttable-legende-t8060.html I tried `\renewcommand{\TPTnoteSettings}{\small\linespread{1}}`, and surely enough: the result looks like in the screenshots of the above links. Elsewhere I spotted `\renewcommand{\TPTnoteSettings}{\small\linespread{1}\selectfont}`, though I'm not sure what the `\selectfont` part does: what does it do? **Edit** To add another link (which I had already opened but overlooked): > Re: threeparttable: multicolumn table notes > > Postby Bil Kleb » Sat, 10 Apr 2004 16:37:35 GMT > > Arseneau assisted me offline. The conclusion: the whole idea of the > \tablenotes list environment is set to be 'tablewidth' wide. Therefore, > merely make your own list that inherits the existing \linewidth set by the > multicols environment. A lame example: > > ... >   >   >        \setlength{\columnsep}{0pt} >        \setlength{\columnseprule}{1pt} >        \setlength{\multicolsep}{0pt} >        \newcommand{\mcmakelabel}[1]{\textsuperscript#1} >        \newenvironment{mctablenotes}% >         {\begin{footnotesize}\begin{list}{}{\topsep 0pt \partopsep  0pt >          \setlength\itemsep{4pt plus 1pt minus 1pt} \leftmargin 0pt >          \parsep 0pt \itemindent 0pt \labelsep 0pt \raggedright}% >          \settowidth{\labelwidth}{\textsuperscript 1}% >          \renewcommand{\makelabel}{\mcmakelabel}}% >         {\end{list}\end{footnotesize}}% >   >        \begin{multicols}{2} >         \begin{mctablenotes} >          \item[1] Also known as code-n-fix. >          \item[2] For teams of ``code monkeys'' >         \end{mctablenotes} >        \end{multicols} >   > > \-- enter code hereBil Kleb, Hampton, { _filter_ }ia As a beginner, I still don't understand it all: does this already contain "the" answer? Help appreciated!


title: Tricks to make macros expandable

text: _Expandable_ macros are useful (I find working in the lion's mouth super cool). But they are difficult to write. **Can more experienced users give hints that help achieve expandability?** For example, we cannot use counters since the value cannot be changed when expanding. However, a trick might be to keep the value of the counter as the number of `A` (say) that we move around while expanding: `5` would be 'stored' as `AAAAA`, and we can add counters by moving the two lists of `A` together, etc. Of course, it is not efficient, but it is expandable, after all. For definiteness, say that I want to define a macro whose argument is _delimited_ like `\verb`: the first character token determines what the end- character is, so that any of `\foo|...|`, `\foo'...'`, `\foo+...+`, etc. are treated identically. Can I do this in an expandable way? Any other trick is welcome.


title: Error compiling files in android using texlive

text: ![enter image description here](http://i.stack.imgur.com/MyqGD.jpg) When I try to compile a latex in android appears `mktexfmt: no such file or directory`. As shown below. I installed TeXLive to `/sdcard/texlive` but texlive is a portable installation using windows. What would cause this error?


title: Why is this n with tilde disappearing in a BibTeX reference?

text: Working with the following abridged line in a BibTeX entry:               author = {J. Pe\~{n}a}      For some reason results in a BibTeX compilation to:               J.~P. {n}a      With a period and a space appearing and the tilde diacritic and the letter _e_ vanishing. I can fix this by wrapping the surname in braces, but am mystified as to why this happens in the first place. Is this expected behaviour? Thanks for any explanation anyone can offer.


title: vim latex editing

text: What do I do if my tex file now looks like:               ^@\^@d^@o^@c^@u^@m^@e^@n^@t^@c^@l^@a^@s^@s^@[^@1^@1^@p^@t^@]^@{^@a^@r^@t^@i^@c^@l^     @e^@}^@        2 ^@         3 ^@\^@u^@s^@e^@p^@a^@c^@k^@a^@g^@e^@{^@a^@m^@s^@m^@a^@t^@h^@,^@ ^@a^@m^@s^@s^@y^@m^     @b^@,^@ ^@e^@u^@c^@a^@l^@,^@ ^@y^@f^@o^@n^@t^@s^@,^@ ^@s^@e^@t^@s^@p^@a^@c^@e^@,^@      ^@s^@e^@c^@t^@s^@t^@y^@,^@ ^@e^@n^@u^@m^@i^@t^@e^@m^@,^@ ^@a^@m^@s^@c^@d^@,^@ ^@        4 ^@ ^@ ^@w^@a^@s^@y^@s^@y^@m^@,^@ ^@c^@a^@p^@t^@i^@o^@n^@,^@ ^@t^@i^@k^@z^@,^@ ^@t^     @i^@k^@z^@-^@q^@t^@r^@e^@e^@,^@ ^@m^@a^@t^@h^@t^@o^@o^@l^@s^@,^@ ^@i^@n^@c^@o^@n^@     s^@o^@l^@a^@t^@a^@,^@ ^@p^@g^@f^@p^@l^@o^@t^@s^@,^@ ^@        5 ^@ ^@ ^@t^@i^@k^@z^@-^@3^@d^@p^@l^@o^@t^@,^@ ^@f^@l^@o^@a^@t^@,^@ ^@w^@r^@a^@p^@f^     @i^@g^@,^@ ^@m^@u^@l^@t^@i^@r^@o^@w^@,^@ ^


title: Hiding chapter headings and including chapter name in section headings

text: I would like chapter names to not be printed but to appear in each section heading. For example:               \chapter{Mychapter}     \section{}     \blinddocument     \section{}      Would print something like               Mychapter 1     Mychapter 2      How can I achieve that? I've tried titlesec with `\chaptertitle` in `\titleformat`, like:               \titleformat{\section}[display]       {\normalfont\Large}       {\chaptertitle\ \thesection}{10pt}       {\normalfont}      but `\chaptertitle` seems to be only defined inside `\sethead` and `\setfoot`. To hide chapters and number sections properly, I've used:               \renewcommand{\thechapter}{}     \renewcommand{\thesection}{\arabic{section}}      but I'm sure there must be something better...


title: How to disable hyphenation in lualatex?

text: I am using the mechanism outlined in this answer to generate a text-only version of a fairly complex document for spell-checking. This is my first attempt to use lualatex, so this might be littered with issues, but for the most part it does what I want it to do:               \documentclass{article}     \usepackage{luatexbase}     \usepackage{lipsum}     \usepackage{filecontents}     \usepackage{ifluatex}          \begin{filecontents*}{luaFunctions.lua}     -- clear the file     file = io.open("output.txt", "w")     file:write()          exportParagraph = false          function exportText (head)              if exportParagraph == false then             --if you return nil no pdf will be created             -- return nil              return head                 end              -- open the file in append-modus         local out = io.open("output.txt", "a")         local wordCounter = 0              -- loop over all hboxes in the current paragraph         for line in node.traverse_id (node.id("hlist"), head) do                  -- loop over each element in the line             for item in node.traverse (line.list) do                 -- check if the element is a char                 if item.id == node.id("glyph") then                     out:write(string.char(item.char))                 -- check if the element is a 'space'                 elseif item.id == node.id("glue") then                     wordCounter = wordCounter + 1                     out:write(" ")                 end             end             -- a newline in the file after each (tex)line             out:write("\n")                 end              wordCounter = wordCounter - 1         out:write("Words: "..wordCounter.."\n")              -- a newline in the file after each paragraph          out:write("\n")                assert(out:close())           exportParagraph = false                --if you return nil no pdf will be created         -- return nil         return head         end               function disableLigatures(head)         -- disable ligatures     end          function SetExportParagraph(export)         exportParagraph = export     end          luatexbase.add_to_callback("ligaturing", disableLigatures, "disableLigatures")     luatexbase.add_to_callback("post_linebreak_filter", exportText, "exportText")     \end{filecontents*}          \ifluatex         \directlua{dofile("luaFunctions.lua")}     \fi          \def\exportParagraph{%         \ifluatex             \directlua{SetExportParagraph(true)}         \fi     }          \begin{document}     \exportParagraph      ff fi Lorem ipsum dolor sit amet, \textbf{consectetuer adipiscing elit. Ut purus elit,     vestibulum ut, placerat ac, adipiscing vitae, felis.} Curabitur dictum gravida     mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.     Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus     et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra     metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus     eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium     quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean     faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Cur-     abitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue     eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim     rutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrum.          Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi     auctor lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et,     tellus. Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna,     vitae ornare odio metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse     ut massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque penatibus et     magnis dis parturient montes, nascetur ridiculus mus. Aliquam tincidunt urna.     Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus mauris.          \exportParagraph     Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat at,     tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec nonummy     pellentesque ante. Phasellus adipiscing semper elit. Proin fermentum massa     ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Mae-     cenas lacinia.           Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum.     Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. Sed lacinia     nulla vitae enim. Pellentesque tincidunt purus vel magna. Integer non enim.     Praesent euismod nunc eu purus. Donec bibendum quam in tellus. Nullam cur-     sus pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum     pellentesque felis eu massa.     \end{document}      In the generated output, the nonsense word `rutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrum` at the end of the first paragraph will be hyphenated:               [...]     ac, nulla. Cur- abitur auctor semper nulla. Donec varius orci eget risus. Duis      nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit      amet orci dignissim rutrumrutrumrutrumrutrumrutrumrutrumrutrumrutrum-      rutrumrutrumrutrumrutrumrutrumrutrum.       Words: 134      This happens throughout my entire text and makes spell-checking the text rather hard. Is there a way to disable hyphenation for this hack (I'm hesitant to call it a solution) entirely?


title: different plus/minus within braket environment?

text: I m using the braket notation to write a physics report (with the braket package). Writing a plus and a minus within a ket or a bra looks really ugly (bra is < | and ket is | > ) Are there any ideas on how to make it look better? having a line like this:               |1,-1>=<--|1, -1>|-->+<-+|1, -1>|-+>+<+-|1, -1>|+ -> etc      is pretty unreadable in the pdf, as the pluses/minuses inside and outside the braket notation are indistinguishable. The idea is that a smaller or smaller _and_ thicker plus/minus only within the braket notation would make it more readable, only I don't know if such a symbol exists. Would I have to create it manually? I d like to avoid that, as it would decrease my typing speed seriously, even with a shortcut..


title: Textmate - View in Skim stopped working after Skim update

text: I think this error starts after updating skim to the latest version.               Document 'PDFfile.pdf' not open in application LSOpenURLsWithRole() failed for the      application /private/var/folders/O9/O9WzNPBfEsCRnERR4J07f++++TI/-Tmp-/Skim 62      Update/B121659D-D5E2-4EF3-A582-A94789DEE5D6/Skim.app with error -10810 for the file      PDFfile.pdf. sh: /private/var/folders/O9/O9WzNPBfEsCRnERR4J07f++++TI/-Tmp-/Skim 62      Update/B121659D-D5E2-4EF3-A582-A94789DEE5D6/Skim.app/Contents/SharedSupport/displayline:      No such file or directory          error number 256 opening viewer      It seems the link to the Skim.app is wrong. The Application is installed at /Applications/Skim.app and the displayline file exists at the path under the app. I have not created anything in my setup, which has worked great for some years. How can I change the path to Skim?


title: Generating tables with \@for command

text: I'm making a report template that requires the list of authors to be presented in several different ways, one of which is a table that lists each author and provides a space for them to sign the printed version of the document. I have an author list defined as               \newcommand{\reportAuthors}{Bob Jones,Sally Smith,Humpty Dumpty}      and am attempting to generate a table as follows:               \begin{tabular}{|b{4cm}|b{6cm}|b{4cm}|}         \hline         \multicolumn{3}{l}{\begin{Large}\textbf{Signatures}\end{Large}} \\ \hline         Approved by: & & Bob Jones \\ \hline         Approved by: & & Sally Smith \\ \hline         Approved by: & & Humpty Dumpty \\ \hline     \end{tabular}      I've attempted this with the `\@for` command as follows:               \begin{tabular}{|b{4cm}|b{6cm}|b{4cm}|}         \hline         \multicolumn{3}{l}{\begin{Large}\textbf{Signatures}\end{Large}} \\         \hline         \makeatletter         \@for\authname:=\reportAuthors\do{%             Approved by: & & \authname \\         }         \makeatother     \end{tabular}      but this produces an error that `\authname` is an undefined control sequence. If I remove the `& &` so that there's no columns, the error goes away and it properly iterates and inserts each name... but of course that leaves me without the names in the right column as is required. If I put the `\authname` in the first column (not that this is what the template should have, but just to test things), then instead of the undefined control sequence I get 'Incomplete `\ifx`'. So firstly, what is causing `\authname` to be undefined if I insert the `&` characters? and secondly, how can I get around this? * * * **Update:** I've tried combining some info found elsewhere to try doing as Martin suggested in terms of trying to collect the rows outside the `tabular` environment:               \newcommand{\tablecontent}{}     \makeatletter     \@for\signame:=\reportAuthors\do{%         \g@addto@macro\tablecontent{Approved by: & & \signame \\ \hline }%     }     \makeatother          \begin{tabular}{|b{4cm}|b{6cm}|b{4cm}|}         \hline         \multicolumn{3}{l}{\begin{Large}\textbf{Signatures}\end{Large}} \\         \hline         \tablecontent     \end{tabular}      Which fixes the error, but results in empty cells in the third column (where `\signame` should be). I suspect this is due to my lack of understanding about expansion, and by the time it's getting expanded, the `\signame` definition is out of scope. Fiddling with `\edef` hasn't really helped so far, but perhaps someone can point out some flaws...?


title: Disable \setlength{\parskip}{\baselineskip} on \tableofcontents

text: I use `\setlength{\parskip}{\baselineskip}` and it is great. But I want to disable it just for the `\tableofcontents`. Is it possible?


title: Advection-diffusion equation in latex

text: I'm having problems (errors) in writing the advection-diffusion equation in tex.               \[\frac{\partial C}{\partial t} -\frac{\partial }{\partial x} \left[D_{x} \frac{\partial c}{\partial x} -u_{x} c\right]-\frac{\partial }{\partial y} \left[D_{y} \frac{\partial c}{\partial y} -u_{y} c\right]-\frac{\partial }{\partial z} \left[D_{z} \frac{\partial c}{\partial z} -u_{z} c\right]=F\left[c,t\right]\]       It should work out as ![advection equation in MS Equation](http://i.stack.imgur.com/SinuV.png) Document splitted in various sections: Main document               \documentclass[oneside,12pt]{Classes/CUEDthesisPSnPDF}     \usepackage{amsmath}     \begin{document}     \tableofcontents     \listoffigures     \listoftables     \printnomenclature  %% Print the nomenclature        \addcontentsline{toc}{chapter}{Nomenclature}     \include{Introduction/introduction}     \include{Chapter2/chapter2}     \include{Chapter3/chapter3}        \include{Chapter4/chapter4}     \include{Chapter5/chapter5}        \include{Conclusions/conclusions}     \bibliographystyle{plainnat}     \renewcommand{\bibname}{References} % changes default name Bibliography to References     \bibliography{References/references} % References file     \backmatter % book mode only     \appendix     \include{Appendix1/appendix1}     \end{document}      The appendix document has nothing different from other sections really...but there are no problems in the other when I write equations... Help?


title: Left align in math environment with every element over each other

text: I would like the elements in my math environment to be left aligned, so that each element stands over each other, like in the given example below. I have managed it using `\hspace` and `\qquad`, but thought there is a more elegant way to do this. Can anyone suggest a better solution? ![enter image description here](http://i.stack.imgur.com/J44DD.png)               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{equation}     \begin{aligned}     &\gamma(0)=\quad\alpha_1\gamma(1)\hspace{27pt}+\quad\alpha_2\gamma(2)\hspace{27pt}+\quad\dots\quad+\quad\alpha_p\gamma(p)\quad+\quad\sigma^2 \\     &\gamma(1)=\quad\alpha_1\gamma(0)\hspace{27pt}+\quad\alpha_2\gamma(1)\hspace{27pt}+\quad\dots\quad+\quad\alpha_p\gamma(p-1) \\     &\vdots \\     &\gamma(p)=\quad\alpha_1\gamma(p-1)\quad+\quad\alpha_2\gamma(p-2)\quad+\quad\dots\quad+\quad\alpha_p\gamma(0)          \end{aligned}     \end{equation}     \end{document}


title: How to enforce pslatex to use Computer Modern font for math?

text: How can I enforce pslatex to use Computer Modern font for math? (I know, it would be much easier to use pdflatex, but my publisher uses pslatex.) **EDIT:** Example:               \documentclass[twoside,11pt]{article}       \usepackage{amssymb}       \begin{document}       ${\cal P} = {\cal Q}$       \end{document}      If you compile it with latex and pslatex the fonts are different. Unfortunately, the recommendations of Herbert do not help for the following reasons:   1\. As I said, the publisher uses pslatex and not latex.   2\. The other two recommendations change both text and math fonts. I need to change math fonts only.


title: How to pre-evaluate commands that are problematic for a specific environment?

text: More specifically, my problem occurs in the caption environment, but I imagine this applies elsewhere. I would like to insert the text generated by \suppOrApp and store it in the variable \sOrA:               \documentclass{article}               \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{caption}     \usepackage{float}     \usepackage{ifthen}          \title{A caption test}     \author{Some one}     \date{\today}               \begin{document}          \newcommand{\suppOrApp}{%       \ifthenelse{\boolean{thesisStyle}}         {Appendix}         {Supplementary}     }     \newboolean{thesisStyle}     \setboolean{thesisStyle}{false} % Might want to reconsider this here.          \def \sOrA {\suppOrApp}          \begin{table}     \begin{tabular}{cc}     1 & 2 \\     3 & 4 \\     \end{tabular}     \caption{\blindtext     \sOrA     \blindtext}     \end{table}               \end{document}      What is the simplest or best way to do this?


title: Writing Text In the TikZ Rectangle and attaching it to the background for every page

text: \documentclass[12pt]{article}     \usepackage{tikz}     \usepackage{lipsum}     \begin{document}     \begin{tikzpicture}     \draw [fill=orange,orange, rounded corners] (0.1,0.1) rectangle (2,7);     \end{tikzpicture}     \lipsum[4]     \end{document}      How I make the rectangle more curved something like this: ![enter image description here](http://i.stack.imgur.com/RKlXk.png) The code above generates me the following output: ![enter image description here](http://i.stack.imgur.com/CUw4E.png) Now How do I write text inside the rectangle (vertically letter by letter) and I want to move it to right middle margin for right end pages of the book and left middle margin for the left pages. The text in `lipsum` must be at the beginning as every other page and I want the rectangle on every page of the article. For writing text in the rectangle I would like to use this font: ![enter image description here](http://i.stack.imgur.com/TZyqb.png)


title: tocloft, listoffigures, listof=totoc, KOMA: not in tableofcontents

text: This MWE illustrate the problem:               \documentclass[listof=totoc]{scrreprt}     %\usepackage{tocloft}     \begin{document}     \tableofcontents     \listoffigures     \chapter{test}     \begin{figure}     \caption{test}     \end{figure}     \end{document}      without the package `tocloft` the `listoffigures` will be included in the `tableofcontents` but with `tocloft`, the "List of Figures" is not in "Contents". What can I do to have the `listoffigures` in `tableofcontents`?


title: Text wrap in multicols

text: The following LaTex code (credit) features a table within `muticols`:               \usepackage{multicol}     ...     \begin{multicols}{3}       \subsubsection{Another Subsubsection}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.         \begin{tabular}{@{}ll@{}}           \verb!Lorem!   & Lorem ipsum dolor sit amet\\           \verb!ipsum!   & consectetur adipisicing elit\\           \verb!dolor!   & sed do eiusmod tempor incididunt ut labore et dolore magna aliqua\\           \verb!sit!     & Lorem ipsum dolor sit amet\\           \verb!amet!    & Lorem ipsum dolor sit amet\\         \end{tabular}     \end{multicols}      The `Lorem ipsum` before the table is properly wrapped, but the long line (`sed ipsum...`) inside the table isn't. Is there a way to force wrapping on all column contents? If not, which table property should be changed to assure wrapping?


title: easylist in tabular

text: I'd like to build this table:![enter image description here](http://i.stack.imgur.com/CyoQR.jpg) As I have a very long list to itemize, I'd like to use easylist. Obviously the easylist-group causes problems in the tabularx-environment. That's what I coded so far:               \documentclass{book}          \usepackage{tabularx}     \usepackage[framemethod=tikz]{mdframed}     \usepackage[ampersand]{easylist}          \mdfdefinestyle{round}{ % rund     innertopmargin=0pt,innerbottommargin=10pt,innerleftmargin=1pt,innerrightmargin=1pt,     middlelinewidth=3pt,innerlinewidth=0.4pt,outerlinewidth=0.4pt,     linecolor=black,middlelinecolor=white,roundcorner=20pt}          \begin{document}          \begin{mdframed}[style=round]         \begin{tabularx}{\linewidth}{XX}                  \multicolumn{1}{c}{                 \begin{tabularx}{0.45\linewidth}{|X|}                     AAAA                     \begin{easylist}[itemize]                                    & A1                         & A2                         & A3                     \end{easylist}             \end{tabularx}}                   &                   \multicolumn{1}{c}{                 \begin{tabularx}{0.45\linewidth}{|X|}                     BBBB                     \begin{easylist}[itemize]                                    & B1                         & B2                         & B3                     \end{easylist}                 \end{tabularx}}                   \end{tabularx}     \end{mdframed}          \end{document}      Does anyone know a workaround?


title: Using \pgfkeys in \section

text: I am using `\pgfkeys` to help organize custom symbols. However, I ran into a problem when trying to execute a key inside `\section` command.               \documentclass{article}     \usepackage{tikz}     \pgfkeys{a-key/.code={a-value}}     \begin{document}         Test \pgfkeys{a-key}         \section{\pgfkeys{a-key} section} % <- doesn't work     \end{document}      In this example, my `pdflatex` just freeze while compiling without giving error message. Have I done something wrong? Is executing a `\pgfkeys` possible in `\section`?


title: Belowskip on minted?

text: Is it possible to remove the spacing below the code of a `minted` environment? When I have a block of code underneath another it doesn't produce any spacing (which is what I want), but it does for text (which I don't want). Is there somthing similar like `belowskip` of the `listings` package that I can use as a global option?               \documentclass{article}          \usepackage{minted}          \begin{document}          \newminted{python3}{linenos=true} % belowskip=0pt?          \begin{python3code}     print("Hello world")     \end{python3code}          Some text          \end{document}


title: Finding TeX Sources in C

text: Why is it so hard to find TeX sources in C? I know the full source code is included in the `tex.web` and `pdftex.web` files, but isn't there any way to convert them to plain C code?


title: Why does not compile?

text: In the example on page 71 of the book: Chessboard: A package to print chessboards, by Ulrike Fischer, May 1, 2014, there is an example![enter image description here](http://i.stack.imgur.com/jKNjZ.jpg) When I compile it only appears the following picture. Why?\               \documentclass[parskip]{scrartcl}     \usepackage{chessboard}     \usepackage[T1]{fontenc}     \usepackage[ps]{skak}     \newchessgame     \includegraphics     [scale=0.477,viewport=20     17 20     17]     {inputs/brett}%     \chessboard[showmover=false,     border=false,     label=false,     boardfontencoding=LSBC5,     boardfontsize=20pt,     whitepiececolor=brown!70,     blackpiececolor=black,     setfontcolors]     \end{document}      ![enter image description here](http://i.stack.imgur.com/tIA3C.jpg)


title: Make a "standalone" version of multiple files: all document in one .tex file

text: **Disclaimer** : this question is **not** related to the standalone package. When writing an article, I split the content between several files, to ease the versionning notably. At the time of writing, most of my articles looks like the following: **my-split-file.tex:**               \documentclass{article}     \input{packages}     \input{macros}     \addbibresource{short,biblio}          \begin{document}         \input{content}     \end{document}      The file content.tex includes itself several files, included with the \input command. When the writing is over, I prefer to keep a single file, that I can easily edit, share and backup. Thanks to bibtool, I can easily extract from my (huge) .bib files the relevant content :               bibtool -x my-split-file.aux -o standalone.bib      After that, I can include the relevant part of the .bib file in my .tex thanks to the filecontents package. Is there any way to do the same for the .tex files ? I'd like to produce a document that:   * Replace the input command by the actual content of the document included ;   * Extract the macros used and leave aside the others ;   * (Bonus) remove the comment in a ``wise" manner: not the one that helps to go to a new line without adding a space (as for               I start a sentence%     \footnote{I can start my footnote on a new line, for readability of the source code}     and then go back to my sentence.      ) but the one that says ``this proof is probably wrong'' ;-) **edit : it should probably also remove empty lines created by the removal of the comments…** I am not afraid by some linux scripts! **edit** : since scripting seems the best way to handle that, I'd like the script to automatically run bibtool, extract the relevant part of the bibliography and puts it in a filecontents environment. **edit** : correct me if I'm wrong, but I know 5 methods to define (what I call) a macro :   * `\newcommand`   * `\newcommand*`   * `\renewcommand`   * `\renewcommand*`   * `\def` However, my macros.tex files are always cluttered with `\hyphenation`, `\DefineBibliographyStrings` and other biblatex options, `\DeclareDocumentCommand`, `\NewDocumentCommand` (from the xparse package), `\DeclareMathOperator`, `\DeclareMathSymbol`, etc. Probably the method proposed by Pouya should be "reversed" and remove the unused macros (defined with one of those methods), but leave the rest as it is (whereas Pouya just keep the used macro if I understood correctly).


title: Floats - how to restrict floating to subsection only in one section of the document?

text: I have concluded that the package `float` allows figures to float within the section they belong to. However for one particular section I need to restrict the floating to the subsection (without forcing the exact location). http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Custom_Floats I think this is the description of what I need, but I can't work further with it. > outer counter - the presence of this parameter indicates that the counter > associated with this new float should depend on outer counter, for example > 'chapter'. I need to set that outer counter to be subsection rather than section which is the default. however I only need that for one specific section. Everywhere else floats can float... Seeing this:               \newfloat{type}{placement}{ext}[outer counter]      I have tried and replaced `figure` for `figuresubsec` on the cases I needed and used this:               \newfloat{figuresubsec}{htbp}{floats-ext}[subsection]      however the pictures do appear but don't move to their subsection and they don't appear in the list of figures.


title: Referencing TikZ matrix nodes and drawing

text: I'm struggling with a matrix where I want to put drawings into the cells, but would still like to reference the cells as it is possible with (text) nodes, e.g. for annotation. I know that I can achieve this by putting text nodes and inside the text put another `\tikz` and draw (2nd row in the example). However, putting a text node into the tikz picture with the sole purpose of having another TikZ picture inside feels a terrible waste. Is there a more elegant way? I tried to use `nodes in empty cells = true`, but the cells with drawings inside are not empty, they just don't have a node. So that doesn't help. ![enter image description here](http://i.stack.imgur.com/PAV0W.png)               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usetikzlibrary{decorations.pathreplacing}     \begin{document}     \begin{tikzpicture}     \newcommand{\punkt}{\fill (0, 0) circle (1mm);}     \newcommand{\tpunkt}{{\tikz\fill (0, 0) circle (1mm);}}     \matrix (m) [matrix of nodes,         nodes={rectangle,draw, fill=yellow}     ]{         \punkt  & \punkt \\         \tpunkt & \tpunkt\\     };          \draw[decorate, decoration = brace] (m-2-2.south east) -- node [below] {foo} (m-2-1.south west);     % doesn't work, because nodes m-1-1 and m-1-2 do not exist:     % \draw[decorate, decoration = brace] (m-1-1.north west) -- node [above] {bar} (m-1-2.north east);     \end{tikzpicture}     \end{document}      * * * To clarify a bit what I'm after:   * the circles are not just circles in the real diagram, and there are different combinations of objects in the real diagram. That makes @cacamailg's answer even less elegant (and too complicated to keep the overview) than putting `\tikz{}` drawings into text nodes.    * is there a way to hand the name tikz would give to the node to the drawing macro (`\punkt{*tikz-node-name*}`?   * the `|style|` notation doesn't help, neither, because no node is generated if I have drawing commands in the cell.   * I start thinking whether defining custom shapes that include the drawing commands is the solution.  * * * Edit 2: the real example. ![real example](http://i.stack.imgur.com/0E4Ft.png) Link to the .tex file


title: Asymptote and \asyinclude command doesn't work fine

text: I've the `main.tex`               \documentclass{article}          \usepackage[inline]{asymptote}     \def\asydir{figure}          \graphicspath{{figure/}}          \begin{asydef}     // Global Asymptote definitions can be put here.     defaultpen(fontsize(10pt));     \end{asydef}          \begin{document}          \begin{figure}       \centering       \asyinclude{test}       \caption{A test with \textsf{asymptote}}     \end{figure}          \end{document}      and a simple figure `test.asy` (it is a simple example)               draw((0,0)--(5,5));      I compile with the command `pdflatex -shell-escape main.tex`, but in the `figure` directory the `main-1.asy` file is               if(!settings.multipleView) settings.batchView=false;     settings.tex="pdflatex";     settings.inlinetex=true;     deletepreamble();     defaultfilename="main-1";     if(settings.render < 0) settings.render=4;     settings.outformat="";     settings.inlineimage=true;     settings.embed=true;     settings.toolbar=false;     viewportmargin=(2,2);          // Global Asymptote definitions can be put here.     defaultpen(fontsize(10pt));      So, I can't compile `asy figure/main-1.asy` because there isn't the necessary code. Where is the problem?


title: Combine expandafter, setlength, csname and define@key

text: I try do define a command `\tes@define@key@length`. Everything work but when I use the following line:               \expandafter\setlength\csname test@#1@length\endcsname{\csname testl@#1\endcsname}%      I get an error. Here an example where I comment the special line:               \setcounter{errorcontextlines}{999}     \RequirePackage{filecontents}     \begin{filecontents*}{testpaket.sty}     \RequirePackage{kvoptions}     \RequirePackage{etoolbox}     \SetupKeyvalOptions{family=test,prefix=test@}          \newlength{\tes@templength}     \def\test@defaultunit{pt}     \def\tes@iflength#1{%       \afterassignment\tes@iflength@check%       \tes@templength=#1\test@defaultunit\relax\relax       \expandafter\endgroup\next     }     \def\tes@iflength@check#1{%       \begingroup       \ifx\relax#1\@empty         \def\next{\@secondoftwo}       \else         \def\next{\@firstoftwo}         \expandafter\tes@iflength@cleanup       \fi     }     \def\tes@iflength@cleanup#1\relax{}               %#1 Bezeichnung Länge     %#2 Defaultwert Länge     \newrobustcmd*{\tes@optionlength}[2]{%      \csxdef{test@#1}{#1 wurde definiert}      \gdef\test@default{#2 ist der Defaultwert}      \expandafter\newlength\csname test@#1@length\endcsname      \expandafter\setlength\csname test@#1@length\endcsname{#2}%     }     %#1 option     \newrobustcmd*{\tes@define@key@length}[1]{%       \define@key{test}{#1}{%          \def\@tempa{##1}          \tes@iflength{\@tempa}%          {\csxdef{testl@#1}{\the\tes@templength}}%          {\csxdef{testl@#1}{\the\tes@templength}}%     %    \expandafter\setlength\csname test@#1@length\endcsname{\csname testl@#1\endcsname}%         }     }     \def\tes@define@key@@length{\define@key{mdf}}          \tes@define@key@length{skipabove}          \ProcessKeyvalOptions*          \end{filecontents*}     \documentclass{article}     \usepackage[skipabove=40pt]{testpaket}     \begin{document}     \makeatletter     \tes@iflength{12pt}{ja}{nein}     \tes@iflength{12}{ja}{nein}          \tes@optionlength{skipabove}{4pt}     \test@skipabove\     \test@default\          \the\test@skipabove@length          \advance\test@skipabove@length by 2pt          \the\test@skipabove@length          \testl@skipabove     \makeatother     \end{document}


title: \ganttalignnewline does't work

text: is there a way to break the label of a `\gantgroup`? It works for `\gantbar`, but it seems not in `\ganttgroup`. Any suggestion? IT WORKS:               \begin{ganttchart}[     hgrid,     vgrid,     newline shortcut=true,     bar label node/.append style=%     {align=left}     ]{1}{6}     \gantttitle{Title}{6} \\     \ganttgroup{Group 1 test}{1}{4}\\     \ganttbar{%     This is a\ganttalignnewline     multi-line text.%     }{1}{3}     \end{ganttchart}      IT DOESN'T:               \begin{ganttchart}[     hgrid,     vgrid,     newline shortcut=true,     bar label node/.append style=%     {align=left}     ]{1}{6}     \gantttitle{Title}{6} \\     \ganttgroup{Group 1\ganttalignnewline test}{1}{4}\\     \ganttbar{%     This is a\ganttalignnewline     multi-line text.%     }{1}{3}     \end{ganttchart}


title: tlmgr install siunitx problem

text: Method 1 (failed):               tlmgr install siunitx     sudo texhash      Method 2 (failed):   1. Download zip folder containing .dtx .ins files    2. Unzip into MacSSD/Users/Username/Library/texmf directory    3. Run sudo texhash What am I doing wrong?   * Mac OS X 10.8.5.    * tlmgr revision 31673    * tlmgr using installation: /usr/local/texlive/2013    * TeX Live (http://tug.org/texlive) version 2013


title: How to properly display an image

text: How to set an image into beamer in the center of page under which its caption's displayed, please? Any brilliant suggestion, please? Thanks a lot!


title: Loading packages from separate document

text: I am using MikTeX and Texmaker to write in. My issue is that we are a group of people writing the same report, and I want to load the packages we are using from a separate file, or a similar method. My main document that I am running looks like this:               \PassOptionsToPackage{svgnames}{xcolor}     \documentclass[11pt]{article}          \usepackage{graphicx}  %Grafiske ting          \usepackage{epstopdf}     \usepackage{psfrag}          \usepackage{color, colortbl} %SKAL STÅ FØR LISTINGS     \usepackage[table]{xcolor}          \usepackage{fullpage}     \usepackage{lastpage}     \usepackage{a4wide}   %Smalle marginer     \usepackage{pdfpages}     \usepackage{hyperref}          \usepackage[latin1]{inputenc} %Latin tegn     %\usepackage[Danish]{babel}  % æ ø å %Sætter overskrifter engelsk          \usepackage{booktabs, multicol, multirow}  %Multirows osv i tabeller     \usepackage{fixltx2e}  %excel til latex               \usepackage{subfig}  %Flere figurer     \usepackage{float}   %Gør det muligt at placere figurene det rigtige sted.     \usepackage{subfloat}          \usepackage{amsmath}  %Math - Align osv.     \usepackage{amsfonts}     \usepackage{amssymb}          \numberwithin{equation}{section}     \numberwithin{table}{section}     \numberwithin{figure}{section}          \usepackage{caption}     \usepackage{fancyhdr}     \usepackage{listings}     \lstset{language=Matlab}          \usepackage[numbers]{natbib}     \usepackage{url}     \newcommand{\vis}[1]{\textit{\citeauthor{#1}, \citeyear{#1}} \cite{#1}}     \usepackage{cleveref}                    \begin{document}          \makeatletter     \renewcommand\section{\@startsection {section}{1}{0mm}            {-\baselineskip}{0.1\baselineskip}{\bfseries\large}}     \renewcommand\subsection{\@startsection{subsection}{2}{0mm}%            {-\baselineskip}{0.1\baselineskip}{\bfseries\normalsize}}     \renewcommand\subsubsection{\@startsection{subsubsection}{3}{0mm}%          {-\baselineskip}{0.1\baselineskip}{\bfseries\small}}     \makeatother          \setlength{\belowcaptionskip}{-5pt}     \parindent=0pt     \parskip=1.0ex          \newcommand{\topspace}{\vrule height 15pt width 0pt}          \newcommand{\notetitle}[4]{         \begin{center}           {\Large \bf #1}  \\[9pt]           {\Large \bf #2}  \\[12pt]           {\large #3}  \\[6pt]           {\normalsize #4}  \\[36pt]         \end{center}}                    \input{T/Frontpage.tex}       %\input{T/Abstract.tex}           %\input{T/Commandoes_Figures.tex}     %\input{T/Commandoes_Math.tex}     %\input{T/Commandoes_Other.tex}     %\input{T/Commandoes_Tables.tex}     \input{T/Preface.tex}     \input{T/Introduction.tex}     %\input{T/Part1.tex}     %\input{T/Part2.tex}     %\input{T/Part3.tex}     \input{T/Part4.tex}     %\input{T/Part5.tex}     %\input{T/Part6.tex}     %\input{T/Part7.tex}     %\input{T/Part8.tex}     %\input{T/Part9.tex}     %\input{T/Part10.tex}     \input{T/Conclusion.tex}          \nocite{*}     \bibliographystyle{unsrtnat}     \bibliography{bibtex}          %\input{T/Appendix.tex}          \end{document}      Now everyone has their own main file and can thereby run only the parts of the report, that they are working with. What I want to do is to have one main file where all the packages and such loaded before the begin document part, are put in, so that if one person wants to add another package, everyone won't have to change this. If this is a completely ridiculous way of doing it, alternative solutions would be most welcome as well. The main purpose of doing it this way is that everyone can write independently of each other, but are still able to see what everyone else is writing. Hope the question is clarified properly.


title: How should imaginary numbers be typeset?

text: I've never had to typeset complex numbers before and I'm finding that I'm uncertain about what best-practices are. My question is really about typesetting just _i_. (Hence my title referring to _imaginary_ as opposed to _complex_ numbers.) I would like to be consistent with the textbook which uses a slantstyle. But aside from the choices of the textbook, I'm curious about what others think: Should it be upright? Should it be italic like a variable name? When I use the default math style, I don't like the appearance, particularly in conjunction with exponents. It looks too crowded and busy to me. Is this just because I'm not used to typesetting for complex numbers? Or, is there some kind of italic correction I could do that would fix things: `\/` seems to be ignored in math mode. Here's my minimal working example:               \documentclass{article}     \usepackage{amsmath}     \pagestyle{empty}     \usepackage[margin=2.25in]{geometry}     \setlength{\parindent}{0pt}     %%     \newcommand{\mi}{\mathrm{i}} %% roman "i"     \newcommand{\di}{i}          %% default math "i"     \begin{document}              \verb=\mathrm= style: (not consistent with font choice of textbook)             \begin{align*}             \mi^0 &= 1     \\             \mi^1 &= \mi   \\             \mi^2 &= -1    \\                     \mi^3 &= -\mi              \end{align*}              Default math style: (better matches the style of the textbook, but already looking crowded.)             \renewcommand{\di}{i}             \begin{align*}             \di^0 &= 1     \\             \di^1 &= \di   \\             \di^2 &= -1    \\                     \di^3 &= -\di              \end{align*}         Whichever choice, the following looks too busy.          \begin{align*}             \mi^n &= \mi^{4\times k + r} = \mi^{4\times k} \times \mi^4 = (\mi^4)^k \times \mi^r = 1^k \mi^r = \mi^r \\             \di^n &= \di^{4\times k + r} = \di^{4\times k} \times \di^4 = (\di^4)^k \times \di^r = 1^k \di^r = \di^r         \end{align*}         And if I change the \verb=\times= to \verb=\cdot= it looks even worse:         \[             \di^n = \di^{4\cdot k + r} = \di^{4\cdot k} \cdot \di^4 = (\di^4)^k \cdot \di^r = 1^k \di^r = \di^r         \]          \end{document}      I know I could completely drop using `\times` or `\cdot` but for my particular audience I want to emphasize the multiplication. I think it's the dot on the `$i$` my eye is visually objecting to (in which case there's not much to do about it, I guess). ![enter image description here](http://i.stack.imgur.com/CVwmC.png)


title: Font size of Figure Caption Header

text: My question is about changing the font size. I have to insert two figures side by side. Coming to inserting the captions for the figures individually:               Figure 3: blah blah.....................Figure 4: blah blah...      I am able to change the font size of "blah blah". What I want to know is how to change the font size of "Figure 3" or "Figure 4", say the figure headers or something. I do not know what they are called to search on-line.


title: How to order linked data simultaneously?

text: Apologies for an unclear title; I'm not sure how to describe what it is I want to do (please feel free to edit my tags). But here is my best shot: I have a collection of data; each datum is an ordered pair of text. Let's suppose that for each datum, I can make a corresponding macro that "knows" both its pieces of text. I don't know how such a macro would work, but let's say that the macro `\mynumber` represents (`six`,`two`) and `\mycolor` represents (`blue`,`red`). What I'd like is a macro `\arrange` such that compiling               Lorem ipsum \mynumber, dolor sit amet \mycolor, etc...          \arrange      produces               Lorem ipsum six, dolor sit amet blue, etc...          two, red      The key property I am looking for is that `\arrange` presents the second entries **in the order that the data were mentioned in the text above.** That is, if I edit the first part of my document so that `\mycolor` occurs before `\mynumber`, I want `two` and `red` to switch positions below. What I hope to _avoid_ is having to separately specify the order I will mention the data in the first part of my text, and then passing it to `\arrange`; the whole point is that I want to be able to edit the first part of my document carefree, and have the second entries of my data appear below in the right order, without having to painstakingly reorder _anything_ elsewhere in the document by hand. The greater the versatility of the output formatting of `\arrange`, the better - e.g., if I change my mind and want `\arrange` to put its results on separate lines instead of being separated by commas, I'd like that to be possible.


title: Default margins for geometry package

text: I want to explicitly specify sizes of my document. For this purposes I use **geometry** package. I do the following (I found the solution here):               \documentclass{article}     \usepackage[paperwidth=2394pt, paperheight=6840pt]{geometry}     \begin{document}         ...     % document's content     \end{document}      But after this I have offsets for my document's content! I think that happens because some margins are set with this directive:               \usepackage[paperwidth=2394pt, paperheight=6840pt]{geometry}      I wonder what are the default page margins for **geometry** package?


title: On the fly pdf conversion for inclusion

text: A while ago I asked how to Include Adobe Illustrator files (ai) with XeTeX. However, the PDF version of the Illustrator files is 1.5 and I compile my XeLateX documents to version 1.4 so the newer illustrator files can't be included without conversion. I've now found that ps2pdf14 can take the illustrator ai file as an input and easily output a pdf 1.4 compatible version. I've tried working the with `DeclareGraphicsRule` based on Convert gif image to png on the fly however, I can't seem to figure out a rule that works to run ps2pdf14? I've tried these:               \DeclareGraphicsRule{.ai}{pdf}{.pdf}{`ps2pdf #1}     \DeclareGraphicsRule{.ai}{pdf}{.ai.pdf}{`ps2pdf #1}     \DeclareGraphicsRule{.ai}{pdf}{.pdf}{`ps2pdf14 #1 `dirname #1`/`basename #1 .ai`-ai-converted-to.pdf}     \DeclareGraphicsRule{.ai}{pdf}{.pdf}{ps2pdf14 \SourceFile.\SourceExt \OutputFile}      Here is an .ai file from the latest illustrator version (CS5) if anyone wants to play around: _link removed_ It would be ideal if the conversion was only done if the illustrator document has been modified after the converted pdf file or if the converted pdf file doesn't exist. Maybe a make file or script of some kind would be a better solution.


title: Add dots in table of contents for parts for LaTeX document

text: My document has three "parts" (using the `\part` command), and chapters, and sections. When I generate my table of contents (`\tableofcontents`), all the chapters and lower have dots between the name of the chapter/section/etc. and the page number. However, the parts do not have dots. How do I fix this? Here is the code in my cls that pertains to the table of contents, please advise how to make it so that parts also have dots.               \renewcommand\contentsname{Table of Contents}          \renewcommand*\l@chapter[2]{%       \ifnum \c@tocdepth >\m@ne         \addpenalty{-\@highpenalty}%         \vskip 1.0em \@plus 0.2em \@minus 0.2em         \setlength\@tempdima{1.5em}         \begingroup           \leftskip \z@ \rightskip \@tocrmarg \parfillskip -\rightskip           \parindent \z@           \leavevmode \bfseries           \advance\leftskip\@tempdima           \hskip -\leftskip           #1\nobreak           \leaders\hbox{$\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}           \hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par           \penalty\@highpenalty         \endgroup       \fi}     \let\thesis@tableofcontents=\tableofcontents     \def\tableofcontents{{\singlespacing\thesis@tableofcontents}}      The document class `uiucthesis2009` is used and this class based on `book`:               \LoadClass{book}


title: Font table with number/name in TeX and spacing, kerning

text: Looking for a way to find out how to call up (May numbers) each character in the font. I want to print a list of all the glyphs in a font, along with spacing, kerning. All ligatures, chars etc. That is: the letter 'a' = a number/name that I can use in TeX, left spacing, right spacing, kerning And next make a TeX document with information.                   \setfont              \name-TeX-or-number | name/number | pacing, kerning &


title: PDFLaTeX: Straight quotes in URLs (no smartquotes in urls)

text: Is it somehow possible to have straight quotes in URL's? Especially the single quote sign would be important to me, as this is the most confusing character within URL's, as the reader might not know which character on his keyboard that is. It would be great if someone could point me out how to use straight quotes in URL's only (in my text I want to have the curly quotation marks). My only idea would be the following: Use upquote package and set the url in a verbatim environment, but then `biber` throws out lots of error messages. **It is important that the solution works for`\url` commands in the `.bib` file!** Note: I don't want to set that stuff manually as part of the `\url` command, as the `\url` command automatically translates URL's to URI's for me, and therefore I don't have control over single characters being set! EDIT: Okay I am going to add an example:               @online{wiki3,     author = {Wikipedia},     title = {Prélude à l’après-midi d’un faune},     url = {http://en.wikipedia.org/wiki/Prélude_à_l'après-midi_d'un_faune},     note = "[Last accessed: May,12 2013]"     }      This is an example in my `.bib` file. It is printed like this: ![enter image description here](http://i.stack.imgur.com/rqrJG.png) **Note the`’` character instead of the correct one (`'`) in the URL.** Now I want the single quotes to be straight, in the output pdf file they aren't.


title: Redefine \tableofcontents to start a new page after the ToC

text: How can I properly redefine `\tableofcontents`to include a `\newpage` or `\clearpage`after the table of contents?


title: How to make a simple framebox with round corners?

text: I have seen related questions about this one but ever since I tried, none of them worked out. All I want is to make a framebox with a slightly rounded corners with a table inside. I've tried this simple example using mdframed (in this case inside the fancy footer):               \documentclass{article}     \usepackage[paperheight=11in,paperwidth=8.5in,top=0.6in,bottom=1.5in,left=0.1in,right=0.1in,headheight=3.0in,footskip=0.1in,includehead]{geometry}     \usepackage{longtable}     \usepackage{graphicx}     \usepackage{lastpage}     \usepackage{fancyhdr}     \usepackage{booktabs}     \usepackage{framed}     \usepackage[xcolor]{mdframed}     \usepackage{ulem}     \pagestyle{fancy}     \usepackage[absolute]{textpos}     \renewcommand\headrulewidth{0pt}     \renewcommand{\rmdefault}{phv}     \renewcommand{\sfdefault}{phv}     \newmdenv[roundcorner=5pt]{myframe}          \fancyhf{}     \fancyhead[l]{          }     \fancyfoot[l]{             \renewcommand\arraystretch{1.0}             \small{             \begin{textblock}{5}(0.5,15.8)                     \begin{tabular}{l}                             \textbf{ All stocks received are subject to our final inspection. } \\                             \textbf{ We reserve the right not to accept delivery should the } \\                             \textbf{ above items do not meet our standards. }                     \end{tabular}             \end{textblock}             }             \normalsize{             \renewcommand\arraystretch{1.2}             \begin{textblock}{4.0}(7.1,15.8)                     \begin{myframe}                             \begin{tabular}{ p{1.85in} }                                     Prepared By: \\                                     \centering{ \textbf{ {.\prepared_by\} } }                             \end{tabular}                     \end{myframe}             \end{textblock}             \begin{textblock}{4.1}(11.3,15.8)                     \begin{myframe}                             \begin{tabular}{ p{1.85in} }                                     Approved By: \\                                     \centering{ \textbf{ {.\approver\} } }                             \end{tabular}                     \end{myframe}             \end{textblock}             }     }          \begin{document}     \setlength\heavyrulewidth{1.5pt}     \renewcommand\arraystretch{1.5}     \normalsize{     \begin{longtable}[c]{ p{0.6in} p{0.75in} p{3.65in} p{0.8in} p{1.1in} }             \toprule             \centering{ \textbf{Qty} } & \textbf{Unit} & \centering{ \textbf{Description} } & \hfill\textbf{Unit Price} & \hfill\textbf{Total} \\             \hline             \endfirsthead             \toprule             \centering{ \textbf{Qty} } & \textbf{Unit} & \centering{ \textbf{Description} } & \hfill\textbf{Unit Price} & \hfill\textbf{Total} \\             \hline             \endhead             \endfoot             \endlastfoot             {.while SELECT b.`description`, a.po_no, a.`item_id`, IF(a.`uom`=0, UPPER(if(a.qty>1,ifnull(c.plural_name,c.short),c.`short`)), UPPER(d.`name`)) AS du_name, a.`uom`, replace(a.qty,'.00','') as qty, a.`price` AS price, a.`total_amt` AS total, IFNULL(purchases.poRRQty(a.client, a.module_id, a.po_no, a.po_dtl_id,0), '0.00')  AS rr_qty, CONCAT(DATE_FORMAT(f.`need_date`, '%m/%d/%Y'), " ",f.`need_time`) AS delivery_date, purchases.`getLocation`(a.`loc_type`, a.`loc`) AS location, a.adj_amt, ifnull(a.remarks,'') as dtl_remarks                     FROM purchases.`purchase_details` a                             LEFT JOIN items.`profile` b ON a.`item_id`=b.`item_id`                             LEFT JOIN items.`uoms` c ON b.`uom`=c.`id`                             LEFT JOIN items.`du` d ON a.`uom`=d.`id` AND a.`item_id`=d.`item_id`                             LEFT JOIN purchases.`request_details` f ON a.`pr_no`=f.`pr_no` AND a.`pr_dtl_id`=f.`pr_dtl_id` AND f.module_id = a.module_id and f.client = a.client                     WHERE a.`po_no`=0@po_no  and  a.module_id = 0@MODULE_ID  and a.client = 0@T_CLIENT  order by delivery_date,b.description limit -1}                     \centering{ {.\qty\} } & {.\du_name\} & {.\description\} & \hfill{.x`p2:price} & \hfill{.x`p2:total}  \\                     {.if select '@dtl_remarks'!=''}                             & & \centering{ \small{ {.\dtl_remarks\} } } & & \\                     {.endif}             {.wend}                  %&&& \hfill PO Total: & \hfill\textbf{ {.x`p2:total_GT} } \\          \end{longtable}     \begin{textblock}{15}(0.5,13.8)             \begin{tabular}{ p{5.5in} }                     \footnotesize{ \textbf{ {.\notes\} } } \\             \end{tabular}     \end{textblock}     \begin{textblock}{13.5}(0.3,14.7)             \begin{tabular}{ p{0.6in} p{0.75in} p{3.65in} p{0.8in} p{1.1in} }                     &&&&\\                     \hline             \end{tabular}     \end{textblock}     \begin{textblock}{3}(11.1,15.1)             \begin{tabular}{ p{0.7in} p{1.0in} }                     \underline{ PO Total } : &\textbf P \hfill\textbf{ {.x`p2:total_GT} }\\             \end{tabular}     \end{textblock}     }     \end{document}      But it's not working. Any suggestions?


title: Change Appendix pagestyle

text: After the title page "Appendices" since I have a doublepage, openright document, there is a blank page and then the Appendix A.                  \documentclass[a4paper,11pt,titlepage,twoside,openright]{book}        \usepackage[utf8]{inputenc}        \usepackage[italian,english]{babel}        \usepackage[T1]{fontenc}        \usepackage[titletoc,page]{appendix}        \usepackage{lipsum}             \begin{document}             \chapter{Intro}        \lipsum        \lipsum             \begin{appendices}             \chapter{First}        \lipsum             \chapter{Second}        \lipsum                  \end{appendices}                  \end{document}      I would like to change that stile form blank to plain (just with the page number). I tried to put                   \begin{appendices}         \thispagestyle{plain}      But it is not working. I saw on the package info were I should change the style, but I don't know how to do it.                    \newcommand{\@chap@pppage}{%          \clear@ppage          \thispagestyle{plain}%          \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi          \null\vfil          \markboth{}{}%          {\centering          \interlinepenalty \@M          \normalfont          \Huge \bfseries \appendixpagename\par}%          \if@dotoc@pp          \addappheadtotoc          \fi          \vfil\newpage          \if@twoside          \if@openright          \null          \thispagestyle{empty}% I should change this empty to plain          \newpage          \fi          \fi          \if@tempswa          \twocolumn          \fi          }      Can anybody tell me how to change that? Thank you in advance!


title: Can I create a 'plugin' for TeX Live?

text: I'm creating a couple of packages that I'd like to make as easy as possible to install and manage with standard TeX package managers. (I'm trying to create an 'as plug and play as possible' package for non-technical students.) I see that—at least with TeX Live Utility on OSX—there is a repository URL I can choose. Can I customize this to a remote repository? Will TeX Live keep it updated from that repository, in addition to the standard packages of its normal CTAN mirror?


title: thmmarks in ntheorem causing trouble with numbers in equations

text: [Edited according to the comments (thanks!), i.e. inserted a minimal non- working example] I spent the entire day yesterday trying to figure out what is wrong with the following.               \documentclass[draft,twoside,openright,10pt]{book}      \usepackage{amsmath,amssymb, amsfonts}     \usepackage[amsthm,thmmarks]{ntheorem}     \usepackage{mathtools}     \usepackage[capitalise]{cleveref}          \begin{document}          \begin{equation}     \label{eq:requirementByWeidemaier}     \end{equation}          \begin{gather}     \label{eq:weidemaierVectorValuedFspace}     \begin{split}     \end{split}     \end{gather}          \end{document}      And when I try to run pdflatex on it, I get the following error:               ! Package amsmath Error: Multiple \label's: label '{eq:requirementByWeidemaier}     ' will be lost.          See the amsmath package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.18 \end{gather}      If I remove the option 'thmmarks' from the 'ntheorem' package, then it works. However, I need this option to end my proofs with qed. I really hope somebody has an idea what is wrong (I perhaps should say that I use TexLive 2012).


title: How to break text in subsection heading in Beamer using Copenhagen theme

text: I am using Copenhagen theme for presentation. I have problem. Actually the text of my subsection heading is long that it do not appear completely in the upper bar of slide. Please suggest me what should I do?


title: How do I specify 8^(a - b) in math mode

text: `$8^(a - b)$` produces only a superscripted `(`; the rest of the power is not superscripted. How can I superscript the whole `(a-b)` portion?


title: latex command for the symbol like UI

text: Hi I'm trying to code this symbol but I'm not getting the exact output, can anyone help me to code this symbol ![enter image description here](http://i.stack.imgur.com/hpUUp.png) i tried code `\cup|`