title: exam class - align problems horizontally using probsoln

text: I would like to create worksheets with problems filled by rows instead of columns. I am using `probsoln` to store and call the problems, but they always end up filling the worksheet vertically. I tried putting them in a table, but I can't get that to work.               \documentclass[letter]{article}          \usepackage{probsoln}     \usepackage{amsmath}     \usepackage{multicol}          \PSNrandseed{2004}          \hideanswers          \begin{document}     \ifthenelse{\boolean{showanswers}}{\textbf{Solution Sheet}}{}     \loadrandomproblems{10}{AddingFractionsDatabase}          \begin{tabular}{lllll}     \foreachproblem{\thisproblem\\}%     \end{tabular}               \end{document}      I would like to be able to pull one or two rows of problems from each file as needed. ~~I would like to use exam class if possible.~~ **Test Database**               \newproblem{addfractions:1212}      {$\frac{1}{2} + \frac{1}{2} = $}      {$\frac{1}{2} + \frac{1}{2} = \frac{2}{2} = 1$}           \newproblem{addfractions:1213}      {$\frac{1}{2} + \frac{1}{3} = $}      {$\frac{1}{2} + \frac{1}{3} = \frac{3}{6} + \frac{2}{6} = \frac{5}{6}$}           \newproblem{addfractions:1223}      {$\frac{1}{2} + \frac{2}{3} = $}      {$\frac{1}{2} + \frac{2}{3} = \frac{3}{6} + \frac{4}{6} = \frac{7}{6} = 1 \frac{1}{6}$}           \newproblem{addfractions:1214}      {$\frac{1}{2} + \frac{1}{4} = $}      {$\frac{1}{2} + \frac{1}{4} = \frac{2}{4} + \frac{1}{4} = \frac{3}{4}$}          \newproblem{addfractions:1216}     {$\frac{1}{2} + \frac{1}{6} = $}     {$\frac{1}{2} + \frac{1}{6} = \frac{3}{6} + \frac{1}{6} = \frac{4}{6} = \frac{2}{3}$}          \newproblem{addfractions:1256}     {$\frac{1}{2} + \frac{5}{6} = $}     {$\frac{1}{2} + \frac{5}{6} = \frac{3}{6} + \frac{5}{6} = \frac{8}{6} = 1 \frac{2}{6} = 1 \frac{1}{3}$}          \newproblem{addfractions:1217}     {$\frac{1}{2} + \frac{1}{7} = $}     {$\frac{1}{2} + \frac{1}{7} = \frac{7}{14} + \frac{2}{14} = \frac{9}{14}$}          \newproblem{addfractions:1227}     {$\frac{1}{2} + \frac{2}{7} = $}     {$\frac{1}{2} + \frac{2}{7} = \frac{7}{14} + \frac{4}{14} = \frac{11}{14}$}          \newproblem{addfractions:1237}     {$\frac{1}{2} + \frac{3}{7} = $}     {$\frac{1}{2} + \frac{3}{7} = \frac{7}{14} + \frac{6}{14} = \frac{13}{14}$}          \newproblem{addfractions:1247}     {$\frac{1}{2} + \frac{4}{7} = $}     {$\frac{1}{2} + \frac{4}{7} = \frac{7}{14} + \frac{8}{14} = \frac{15}{14} = 1 \frac{1}{14}$}          \newproblem{addfractions:1257}     {$\frac{1}{2} + \frac{5}{7} = $}     {$\frac{1}{2} + \frac{5}{7} = \frac{7}{14} + \frac{10}{14} = \frac{17}{14} = 1 \frac{3}{14}$}          \newproblem{addfractions:1267}     {$\frac{1}{2} + \frac{6}{7} = $}     {$\frac{1}{2} + \frac{6}{7} = \frac{7}{14} + \frac{12}{14} = \frac{19}{14} = 1 \frac{5}{14}$}          \newproblem{addfractions:1218}     {$\frac{1}{2} + \frac{1}{8} = $}     {$\frac{1}{2} + \frac{1}{8} = \frac{4}{8} + \frac{1}{8} = \frac{5}{8}$}          \newproblem{addfractions:1238}     {$\frac{1}{2} + \frac{3}{8}= $}     {$\frac{1}{2} + \frac{3}{8} = \frac{4}{8} + \frac{3}{8} = \frac{7}{8}$}          \newproblem{addfractions:1258}     {$\frac{1}{2} + \frac{5}{8}= $}     {$\frac{1}{2} + \frac{5}{8} = \frac{4}{8} + \frac{5}{8} = \frac{9}{8} = 1 \frac{1}{8}$}          \newproblem{addfractions:1278}     {$\frac{1}{2} + \frac{7}{8}= $}     {$\frac{1}{2} + \frac{7}{8} = \frac{4}{8} + \frac{7}{8} = \frac{11}{8} = 1 \frac{3}{8}$}          \newproblem{addfractions:1219}     {$\frac{1}{2} + \frac{1}{9}= $}     {$\frac{1}{2} + \frac{1}{9} = \frac{9}{18} + \frac{2}{18} = \frac{11}{18}$}


title: Listing not handled as a float in SIG ACM document type

text: My document starts with               \documentclass{sig-alternate}     \usepackage{listings}      and it includes listings like this:               \begin{lstlisting}[label=samplecode,float=tb,caption=My super code]     // code     \end{lstlisting}      I also tried `frame=tb`. However, the listing is placed as flow-text right in the surrounding text. It's not floating. I also tried including the `float` package, didn't help either. PS There are figures and tables in the document that are placed as floats. EDIT (`.log`):               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2012.12.23)  22 APR 2013 16:41     entering extended mode      %&-line parsing enabled.     **paper.tex     (./paper.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov     ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1     9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san     skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn     orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian     , estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po     rtuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded.     (./sig-alternate.cls (/usr/share/texmf-texlive/tex/latex/graphics/epsfig.sty     Package: epsfig 1999/02/16 v1.7a (e)psfig emulation (SPQR)          (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty     Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)          (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14     )     (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty     Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)          (/usr/share/texmf-texlive/tex/latex/graphics/trig.sty     Package: trig 1999/03/16 v1.09 sin cos tan (DPC)     )     (/etc/texmf/tex/latex/config/graphics.cfg     File: graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live     )     Package graphics Info: Driver file: pdftex.def on input line 91.          (/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def     File: pdftex.def 2010/03/12 v0.04p Graphics/color for pdfTeX     \Gread@gobject=\count79     ))     \Gin@req@height=\dimen102     \Gin@req@width=\dimen103     )     \epsfxsize=\dimen104     \epsfysize=\dimen105     )     (/usr/share/texmf-texlive/tex/latex/amsfonts/amssymb.sty     Package: amssymb 2009/06/22 v3.00          (/usr/share/texmf-texlive/tex/latex/amsfonts/amsfonts.sty     Package: amsfonts 2009/06/22 v3.00 Basic AMSFonts support     \@emptytoks=\toks15     \symAMSa=\mathgroup4     \symAMSb=\mathgroup5     LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'     (Font)                  U/euf/m/n --> U/euf/b/n on input line 96.     ))     (/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty     Package: amsmath 2000/07/18 v2.13 AMS math features     \@mathmargin=\skip41          For additional information on amsmath, use the `?' option.     (/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty     Package: amstext 2000/06/29 v2.01          (/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty     File: amsgen.sty 1999/11/30 v2.0     \@emptytoks=\toks16     \ex@=\dimen106     ))     (/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty     Package: amsbsy 1999/11/29 v1.2d     \pmbraise@=\dimen107     )     (/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty     Package: amsopn 1999/12/14 v2.01 operator names     )     \inf@bad=\count80     LaTeX Info: Redefining \frac on input line 211.     \uproot@=\count81     \leftroot@=\count82     LaTeX Info: Redefining \overline on input line 307.     \classnum@=\count83     \DOTSCASE@=\count84     LaTeX Info: Redefining \ldots on input line 379.     LaTeX Info: Redefining \dots on input line 382.     LaTeX Info: Redefining \cdots on input line 467.     \Mathstrutbox@=\box26     \strutbox@=\box27     \big@size=\dimen108     LaTeX Font Info:    Redeclaring font encoding OML on input line 567.     LaTeX Font Info:    Redeclaring font encoding OMS on input line 568.     \macc@depth=\count85     \c@MaxMatrixCols=\count86     \dotsspace@=\muskip10     \c@parentequation=\count87     \dspbrk@lvl=\count88     \tag@help=\toks17     \row@=\count89     \column@=\count90     \maxfields@=\count91     \andhelp@=\toks18     \eqnshift@=\dimen109     \alignsep@=\dimen110     \tagshift@=\dimen111     \tagwidth@=\dimen112     \totwidth@=\dimen113     \lineht@=\dimen114     \@envbody=\toks19     \multlinegap=\skip42     \multlinetaggap=\skip43     \mathdisplay@stack=\toks20     LaTeX Info: Redefining \[ on input line 2666.     LaTeX Info: Redefining \] on input line 2667.     )     Document Class 'sig-alternate' <23rd. May '12>. Modified by G.K.M. Tobin/Gerry      Murray     Based in part upon document Style `acmconf' <22 May 89>. Hacked 4/91 by     shivers@cs.cmu.edu, 4/93 by theobald@cs.mcgill.ca     Excerpts were taken from (Journal Style) 'esub2acm.cls'.     ****** Bugs/comments/suggestions/technicalities to Gerry Murray -- murray@hq.ac     m.org ******     Questions on the style, SIGS policies, etc. to Adrienne Griscti griscti@acm.org          \footheight=\dimen115     \@maxsep=\dimen116     \@dblmaxsep=\dimen117     \aucount=\count92     \originalaucount=\count93     \auwidth=\dimen118     \auskip=\dimen119     \auskipcount=\count94     \auskip=\dimen120     \allauboxes=\dimen121     \addauthors=\toks21     \addauflag=\count95     \subtitletext=\toks22     \savesection=\count96     \sectioncntr=\count97     \c@figure=\count98     \c@table=\count99     \titleboxnotes=\toks23     \titleboxnoteflag=\count100     Document Class: sig-alternate 2012/05/23 - V2.5 - based on acmproc.cls V1.3 <No     v. 30 '99>     (/usr/share/texmf-texlive/tex/latex/base/latexsym.sty     Package: latexsym 1998/08/17 v2.2e Standard LaTeX package (lasy symbols)     \symlasy=\mathgroup6     LaTeX Font Info:    Overwriting symbol font `lasy' in version `bold'     (Font)                  U/lasy/m/n --> U/lasy/b/n on input line 47.     )     \@acmtitlebox=\box28     \titlenotecount=\count101     \tntoks=\toks24     \tntokstwo=\toks25     \tntoksthree=\toks26     \tntoksfour=\toks27     \tntoksfive=\toks28     \catcount=\count102     \copyrightnotice=\toks29     \conf=\toks30     \confinfo=\toks31     \c@part=\count103     \c@section=\count104     \c@subsection=\count105     \c@subsubsection=\count106     \c@paragraph=\count107          Using 'Abbrev' bibliography style     LaTeX Info: Redefining \cite on input line 1211.     \bibindent=\dimen122     \colcntr=\count108     \saveb@x=\box29     \copyrtyr=\toks32     \acmcopyr=\toks33     \boilerplate=\toks34     \copyrightetc=\toks35     (/usr/share/texmf-texlive/tex/latex/base/fontenc.sty     Package: fontenc 2005/09/27 v1.99g Standard LaTeX package          (/usr/share/texmf-texlive/tex/latex/base/t1enc.def     File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file     LaTeX Font Info:    Redeclaring font encoding T1 on input line 43.     )     LaTeX Font Info:    Try loading font information for T1+aer on input line 100.          (/usr/share/texmf-texlive/tex/latex/ae/t1aer.fd     File: t1aer.fd 1997/11/16 Font definitions for T1/aer.     )))     (/usr/share/texmf-texlive/tex/latex/multirow/multirow.sty     \bigstrutjot=\dimen123     )     (/usr/share/texmf-texlive/tex/latex/listings/listings.sty     \lst@mode=\count109     \lst@gtempboxa=\box30     \lst@token=\toks36     \lst@length=\count110     \lst@currlwidth=\dimen124     \lst@column=\count111     \lst@pos=\count112     \lst@lostspace=\dimen125     \lst@width=\dimen126     \lst@newlines=\count113     \lst@lineno=\count114     \abovecaptionskip=\skip44     \belowcaptionskip=\skip45     \lst@maxwidth=\dimen127          (/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty     File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz)     \c@lstnumber=\count115     \lst@skipnumbers=\count116     \lst@framebox=\box31     )     (/usr/share/texmf-texlive/tex/latex/listings/listings.cfg     File: listings.cfg 2007/02/22 1.4 listings configuration     ))     Package: listings 2007/02/22 1.4 (Carsten Heinz)          (/usr/share/texmf-texlive/tex/latex/psnfss/courier.sty     Package: courier 2005/04/12 PSNFSS-v9.2a (WaS)      )     (/usr/share/texmf-texlive/tex/latex/caption/caption.sty     Package: caption 2009/10/09 v3.1k Customizing captions (AR)          (/usr/share/texmf-texlive/tex/latex/caption/caption3.sty     Package: caption3 2009/10/09 v3.1k caption3 kernel (AR)     \captionmargin=\dimen128     \captionmargin@=\dimen129     \captionwidth=\dimen130     \caption@indent=\dimen131     \caption@parindent=\dimen132     \caption@hangindent=\dimen133     Package caption Info: Unknown document class (or package),     (caption)             standard defaults will be used on input line 1068.     )          Package caption Warning: Unsupported document class (or package) detected,     (caption)                usage of the caption package is not recommended.     See the caption package documentation for explanation.          Package caption Info: \@makecaption = \long macro:#1#2-> \vskip 10pt \setbox \@     tempboxa \hbox {\textbf {#1: #2}} \ifdim \wd \@tempboxa >\hsize \textbf {#1: #2     }\par \else \hbox to\hsize {\hfil \box \@tempboxa \hfil } \fi .     \c@ContinuedFloat=\count117     Package caption Info: listings package is loaded.     ) (/usr/share/texmf-texlive/tex/latex/graphics/color.sty     Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)          (/etc/texmf/tex/latex/config/color.cfg     File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive     )     Package color Info: Driver file: pdftex.def on input line 130.     )     \c@copyrightbox=\count118     \c@float@type=\count119     \float@exts=\toks37      (./paper.aux)     \openout1 = `paper.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 113.     LaTeX Font Info:    ... okay on input line 113.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 113.     LaTeX Font Info:    ... okay on input line 113.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 113.     LaTeX Font Info:    ... okay on input line 113.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 113.     LaTeX Font Info:    ... okay on input line 113.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 113.     LaTeX Font Info:    ... okay on input line 113.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 113.     LaTeX Font Info:    ... okay on input line 113.          (/usr/share/texmf-texlive/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count120     \scratchdimen=\dimen134     \scratchbox=\box32     \nofMPsegments=\count121     \nofMParguments=\count122     \everyMPshowfont=\toks38     \MPscratchCnt=\count123     \MPscratchDim=\dimen135     \MPnumerator=\count124     \everyMPtoPDFconversion=\toks39     )     \c@lstlisting=\count125     Package caption Info: Begin \AtBeginDocument code.     Package caption Info: End \AtBeginDocument code.     LaTeX Font Info:    Try loading font information for U+msa on input line 199.      (/usr/share/texmf-texlive/tex/latex/amsfonts/umsa.fd     File: umsa.fd 2009/06/22 v3.00 AMS symbols A     )     LaTeX Font Info:    Try loading font information for U+msb on input line 199.          (/usr/share/texmf-texlive/tex/latex/amsfonts/umsb.fd     File: umsb.fd 2009/06/22 v3.00 AMS symbols B     )     LaTeX Font Info:    Try loading font information for U+lasy on input line 199.          (/usr/share/texmf-texlive/tex/latex/base/ulasy.fd     File: ulasy.fd 1998/08/17 v2.2e LaTeX symbol font definitions     )     Overfull \hbox (1.71642pt too wide) in paragraph at lines 304--305     \T1/aer/m/n/9 Application frame-work, JIT, PTX, GPU, DSL, Lat-tice QCD,      []               Overfull \hbox (21.76744pt too wide) in paragraph at lines 304--305     \T1/aer/m/n/9 MPI, OpenMP, com-piler tech-niques, computation-communication      []               Overfull \hbox (2.42755pt too wide) in paragraph at lines 362--373     \T1/aer/m/n/9 gen-er-a-tion in-tro-duces an ad-di-tional (just-in-time) code tr     ans-      []          [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}               ]     Overfull \hbox (19.98651pt too wide) in paragraph at lines 539--543     \T1/aer/m/n/9 guage style syn-tax with in-struc-tion op-er-a-tion codes and ope     rands.      []          LaTeX Font Info:    Try loading font information for T1+pcr on input line 559.     (/usr/share/texmf-texlive/tex/latex/psnfss/t1pcr.fd     File: t1pcr.fd 2001/06/04 font definitions for T1/pcr.     )          LaTeX Warning: Reference `samplekernel' on page \thepage  undefined on input li     ne 574.          (/usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty     File: lstlang1.sty 2004/09/05 1.3 listings language file     )     (/usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty     File: lstlang1.sty 2004/09/05 1.3 listings language file     )     (/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty     File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz)     ) [2]     Overfull \hbox (3.49689pt too wide) in paragraph at lines 658--662     \T1/aer/m/n/9 points of a multi-dimensional, hy-per-cu-bic lat-tice. The lattic     e-      []          <figs/tree-crop.pdf, id=18, 261.97874pt x 143.53625pt>     File: figs/tree-crop.pdf Graphic file (type pdf)          <use figs/tree-crop.pdf>     Overfull \hbox (1.6004pt too wide) in paragraph at lines 859--863     \T1/aer/m/n/9 with ETs which im-ple-ments ef-fi-cient domain-specific ab-strac-           []          [3 <./figs/tree-crop.pdf>]     Overfull \hbox (0.60068pt too wide) in paragraph at lines 950--950     []\T1/pcr/m/n/9 DL<T,N*N>|       []               Overfull \hbox (1.79947pt too wide) in paragraph at lines 954--955     []\T1/pcr/m/n/9 TriangularJV<T>|       []               Overfull \hbox (4.59964pt too wide) in paragraph at lines 992--992     []\T1/aer/m/n/9 flops/byte      []               LaTeX Warning: Reference `jvcodegen' on page \thepage  undefined on input line      1033.          (./reguse-tab-tex.inc     Underfull \hbox (badness 10000) in paragraph at lines 2--2     []\T1/aer/m/n/9 bytes      []               Underfull \hbox (badness 10000) in paragraph at lines 2--2     \T1/aer/m/n/9 stack      []               Underfull \hbox (badness 10000) in paragraph at lines 2--2     []\T1/aer/m/n/9 bytes      []               Underfull \hbox (badness 10000) in paragraph at lines 2--2     \T1/aer/m/n/9 spill      []               Underfull \hbox (badness 10000) in paragraph at lines 2--2     []\T1/aer/m/n/9 bytes      []               Underfull \hbox (badness 10000) in paragraph at lines 2--2     \T1/aer/m/n/9 spill      []               Underfull \hbox (badness 10000) in paragraph at lines 2--2     []\T1/aer/m/n/9 reg.      []               Underfull \hbox (badness 10000) in paragraph at lines 2--3     []\T1/aer/m/n/9 const      []               Overfull \hbox (1.19879pt too wide) in paragraph at lines 9--9     []\T1/pcr/m/n/9 matvec|       []               Overfull \hbox (1.19879pt too wide) in paragraph at lines 10--10     []\T1/pcr/m/n/9 clover|       []               Overfull \hbox (1.19879pt too wide) in paragraph at lines 18--18     []\T1/pcr/m/n/9 matvec|       []               Overfull \hbox (1.19879pt too wide) in paragraph at lines 19--19     []\T1/pcr/m/n/9 clover|       []          ) <figs/CCM-crop.pdf, id=36, 435.6275pt x 222.8325pt>     File: figs/CCM-crop.pdf Graphic file (type pdf)      <use figs/CCM-crop.pdf>     [4 <./figs/CCM-crop.pdf>]     Overfull \hbox (4.12114pt too wide) in paragraph at lines 1116--1120     []\T1/aer/m/n/9 The chal-lenge of im-ple-ment-ing an au-to-mated mem-ory man-      []               Overfull \hbox (6.10947pt too wide) in paragraph at lines 1158--1165     []\T1/aer/m/n/9 Device al-lo-ca-tions are im-ple-mented on a pre-allocated mem-           []          <tuning/tuning-crop.pdf, id=53, 556.0775pt x 426.59375pt>     File: tuning/tuning-crop.pdf Graphic file (type pdf)          <use tuning/tuning-crop.pdf> [5]     Overfull \hbox (6.46469pt too wide) in paragraph at lines 1369--1369     []\secfnt OVERLAPPING MPI COM-MU-NI-CA-TION      []          <figs/comms-crop.pdf, id=58, 438.63875pt x 635.37375pt>     File: figs/comms-crop.pdf Graphic file (type pdf)          <use figs/comms-crop.pdf> [6 <./tuning/tuning-crop.pdf> <./figs/comms-crop.pdf>     ]     Overfull \hbox (2.24893pt too wide) in paragraph at lines 1465--1470     []\T1/aer/m/n/9 Benchmarking re-sults for the cus-tom user func-tion \T1/pcr/m/     n/9 clover      []               <../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_sp-crop.pdf, id=13     0, 488.82625pt x 390.45876pt>     File: ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_sp-crop.pdf G     raphic file (type pdf)          <use ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_sp-crop.pdf>     <../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_dp-crop.pdf, id=13     2, 488.82625pt x 390.45876pt>     File: ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_dp-crop.pdf G     raphic file (type pdf)          <use ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_dp-crop.pdf>     <../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_sp-crop.pdf, id=13     4, 489.83pt x 390.45876pt>     File: ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_sp-crop.pdf G     raphic file (type pdf)          <use ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_sp-crop.pdf>     <../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_dp-crop.pdf, id=13     6, 496.85625pt x 390.45876pt>     File: ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_dp-crop.pdf G     raphic file (type pdf)          <use ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_dp-crop.pdf>     <../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gfl-crop.pdf, id=138     , 494.84875pt x 390.45876pt>     File: ../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gfl-crop.pdf Gr     aphic file (type pdf)          <use ../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gfl-crop.pdf>     <../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gbs-crop.pdf, id=140     , 495.8525pt x 390.45876pt>     File: ../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gbs-crop.pdf Gr     aphic file (type pdf)          <use ../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gbs-crop.pdf>     (./paper.bbl [7 <../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_sp     -crop.pdf> <../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_dp-crop     .pdf> <../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_sp-crop.pdf>     ] [8 <../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_dp-crop.pdf>      <../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gfl-crop.pdf> <../..     /../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gbs-crop.pdf>]) [9          ]     (./paper.aux)           *File List*     sig-alternate.cls    2012/05/23 - V2.5 - based on acmproc.cls V1.3 <Nov. 30 '99     >       epsfig.sty    1999/02/16 v1.7a (e)psfig emulation (SPQR)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2009/08/28 v1.8 graphics configuration of TeX Live       pdftex.def    2010/03/12 v0.04p Graphics/color for pdfTeX      amssymb.sty    2009/06/22 v3.00     amsfonts.sty    2009/06/22 v3.00 Basic AMSFonts support      amsmath.sty    2000/07/18 v2.13 AMS math features      amstext.sty    2000/06/29 v2.01       amsgen.sty    1999/11/30 v2.0       amsbsy.sty    1999/11/29 v1.2d       amsopn.sty    1999/12/14 v2.01 operator names     latexsym.sty    1998/08/17 v2.2e Standard LaTeX package (lasy symbols)      fontenc.sty        t1enc.def    2005/09/27 v1.99g Standard LaTeX file        t1aer.fd    1997/11/16 Font definitions for T1/aer.     multirow.sty         listings.sty    2007/02/22 1.4 (Carsten Heinz)      lstmisc.sty    2007/02/22 1.4 (Carsten Heinz)     listings.cfg    2007/02/22 1.4 listings configuration      courier.sty    2005/04/12 PSNFSS-v9.2a (WaS)       caption.sty    2009/10/09 v3.1k Customizing captions (AR)     caption3.sty    2009/10/09 v3.1k caption3 kernel (AR)        color.sty    2005/11/14 v1.0j Standard LaTeX Color (DPC)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive     supp-pdf.mkii         umsa.fd    2009/06/22 v3.00 AMS symbols A         umsb.fd    2009/06/22 v3.00 AMS symbols B        ulasy.fd    1998/08/17 v2.2e LaTeX symbol font definitions        t1pcr.fd    2001/06/04 font definitions for T1/pcr.     lstlang1.sty    2004/09/05 1.3 listings language file     lstlang1.sty    2004/09/05 1.3 listings language file      lstmisc.sty    2007/02/22 1.4 (Carsten Heinz)     figs/tree-crop.pdf     reguse-tab-tex.inc     figs/CCM-crop.pdf     tuning/tuning-crop.pdf     figs/comms-crop.pdf     ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_sp-crop.pdf     ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gfl_dp-crop.pdf     ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_sp-crop.pdf     ../../../src/qdp/bench-ptx-remote-no_member2/perf_GK110_gbs_dp-crop.pdf     ../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gfl-crop.pdf     ../../../src/qdp/bench-ptx-remote-no_member2/clover_GK110_gbs-crop.pdf        paper.bbl      ***********               LaTeX Warning: There were undefined references.           )      Here is how much of TeX's memory you used:      4813 strings out of 493848      67832 string characters out of 1152822      195914 words of memory out of 3000000      7995 multiletter control sequences out of 15000+50000      55116 words of font info for 75 fonts, out of 3000000 for 9000      714 hyphenation exceptions out of 8191      39i,14n,67p,482b,1189s stack positions out of 5000i,500n,10000p,200000b,50000s     {/usr/share/texmf-texlive/fonts/enc/dvips/base/8r.enc}</usr/share/texmf-texli     ve/fonts/type1/public/amsfonts/cm/cmbx9.pfb></usr/share/texmf-texlive/fonts/typ     e1/public/amsfonts/cmextra/cmex9.pfb></usr/share/texmf-texlive/fonts/type1/publ     ic/amsfonts/cm/cmmi6.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/     cm/cmmi9.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr6.pfb>     </usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/t     exmf-texlive/fonts/type1/public/amsfonts/cm/cmsl9.pfb></usr/share/texmf-texlive     /fonts/type1/public/amsfonts/cm/cmsy6.pfb></usr/share/texmf-texlive/fonts/type1     /public/amsfonts/cm/cmsy9.pfb></usr/share/texmf-texlive/fonts/type1/public/amsf     onts/cm/cmti9.pfb></usr/share/texmf-texlive/fonts/type1/urw/courier/ucrr8a.pfb>     </usr/share/texmf-texlive/fonts/type1/urw/helvetic/uhvb8a.pfb></usr/share/texmf     -texlive/fonts/type1/urw/helvetic/uhvr8a.pfb></usr/share/texmf-texlive/fonts/ty     pe1/urw/times/utmb8a.pfb></usr/share/texmf-texlive/fonts/type1/urw/times/utmr8a     .pfb></usr/share/texmf-texlive/fonts/type1/urw/times/utmri8a.pfb>     Output written on paper.pdf (9 pages, 377070 bytes).     PDF statistics:      471 PDF objects out of 1000 (max. 8388607)      0 named destinations out of 1000 (max. 500000)      51 words of extra memory for PDF output out of 10000 (max. 10000000)


title: Visual comparison between LaTeX and Word output (hyphenation, typesetting, ligatures etc)

text: I really want to convince my friends and family that LaTeX is the choice for them when it comes to formatting and creating beautiful documents. I am aware of the major advantages that come with using LaTeX but some are not convinced. Can someone please provide a side by side comparison of a Word document (or something of the sort) and a LaTeX document that shows the obvious and subtle differences between the two? I want people to look at it and say "Ahhh, I see it, there's a major difference".


title: No TeX installation detected. Please install TeX before compiling - RStudio Knitr on Mac

text: I have tried to reinstall the MacTex twice. I even reinstall R and RStudio. Nothing could cure this problem. Please Help me, I'm in middle of my thesis and I need to use Knitr and RStudio is only easy and suitable place for me to work in. The output for               which pdflatex     echo $PATH      are:               /usr/texbin/pdflatex     /Users/therimalaya/Library/Enthought/Canopy_64bit/User/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin      respectively


title: Why are all of my footnotes hyperlinked to the titlepage?

text: ## Problem I have various footnotes, which are hyperlinked from the text to the bottom of their respective pages. When I click on the hyperlinks (in the main text), they always take me to the first page of my document. I also have `footnotebackref` which puts a hyperlink _at_ the footnote to take the reader back to the main body of text and these links for fine. ## Edited MWE After a lot of deletion, I have managed to reduce the document to the following lines. One might say that I have found the problem, since the removal of `\usepackage[hang, flushmargin]{footmisc}` stops the problem, but I would still like to have non-indented footnotes.               \documentclass{article}          \usepackage[usenames,dvipsnames]{color}     \usepackage[colorlinks=true]{hyperref}          \usepackage[hang, flushmargin]{footmisc}         %Problem line.     \usepackage{footnotebackref}          \begin{document}     \tableofcontents                 \newpage                     \section{Section}     This is some text\footnote{This is a footnote.}.     \end{document}


title: Set my lstlisting at the exact place in my code (like "h" for figure)

text: When using lstlisting, my displayed code is sent back on the top of my page. I would like to have the same kind of option as:               \begin{figure}[h]     ...     \end{figure}      ie having displayed my code exactly where I put it in my latex code. My current code for lstlisting is as follow:               \begin{lstlisting}[float,style=Bash,caption={toto.bash},label=lst:logging]     ...     \end{lstlisting}      Thanks! **Second question:** How to display lstlisting on 2 followed pages, when the code is too long?


title: Luaotfload complains: "cache : Could not write lookup cache"

text: I am in quite the pickle about my document I would like to compile with LuaLaTeX. This is the set-up I am using for the fonts and such:               \usepackage[no-math]{fontspec}     \usepackage{lipsum}     \usepackage[rm]{titlesec}     %\usepackage{titletoc}     \usepackage[titles]{tocloft}     \usepackage{polyglossia}      \usepackage{csquotes}      \setdefaultlanguage{english}     \defaultfontfeatures{Ligatures=TeX}     \setmainfont[Numbers=Proportional]{Adobe Caslon Pro}      Until now this posed no problem and gave me no errors, but now it does. `luaotfload` complains that it cannot write into the lookupcache or the cache. I don't know what to do about this. Seems solved...


title: Warning: \label in float, but not after \caption

text: In my document, I usually use two following ways to work with pictures:                 \begin{figure}[ht!]         \centering         \includegraphics[scale=0.6]{pic1.pdf}         \caption{ description ...}         \label{enz:fig_usm_1f_RLz}       \end{figure}      and combination with package `Subfigure`:                \begin{figure}[ht!]        \centering        \subfigure[my subcaption 1 ]{          \includegraphics[scale=1.2]{subfig1.pdf}\label{my_subfig1}}        \subfigure[my subcaption 2 ]{          \includegraphics[scale=1.2]{subfig2.pdf}\label{my_subfig2}}        \caption{ bla bla bla bla }        \label{enz:fig_ZD_NLO}      \end{figure}      I have got many warnings from compilers like this:: **\label in float, but not after \caption ...**   * xelatex.exe> This is XeTeX, Version 3.1415926-2.4-0.9998 (MiKTeX 2.9 64-bit)   * editor: Eclipse with Texlipse plugin


title: Combining \obeyspaces and \read

text: It seems to be impossible to combine `\obeyspaces` and `\read` in the following manner:               \newread\myread     \openin\myread=myfile.txt       \obeyspaces  % Deleting this line removes the error       \read\myread to \myinput       \myinput     \closein\myread      The `\tracingall` doesn't really help me for understanding the problem.


title: Is there syntax higlighting for javascript in LaTeX?

text: Is there a `listing` setting for javascript, or a package that can be used instead?


title: MikTeX and TeXStudio portables both unpacked to usb flash drive. Now What?

text: I downloaded the portable packages of MikTex and TeXStudio, and unpacked them onto usb flash drive. I do not understand what to do next to configure the TeXstudio to use or work with the MikTeX. I do not understand how to use the information in the documentation I found. I have seen but really do not understand this: Configuring portable TeXstudio to use MiKTeX portable The files I started with are miktex-portable-2.9.4250.exe and texstudio251_win32-usb.zip. The computer is with Windows XP s.p. 3, intel celeron 2.0 GHz processor; and since the portables listed easily fit on the usb flash drive, the space there is more than enough. Now, what do I do so that I can start to learn to use these programs? How exactly to make the configuring? Thanks.


title: Footnotes with italicized letters

text: I would like to use italicized superscript letters for footnotes rather than numbers. How could I do this? Example: > This is text. _a_ And more text. _b_ > > * * * > > _a_ Footnote 1. > > _b_ Footnote 2.


title: Have \underbrace lead to an arrow pointing towards expression (not replace underbrace)

text: I have a long expression coming from using `\underbrace`. It is causing the equation to look, for lack of a better adjective, strange. Here is the entire equation:               \begin{equation}       \frac{1}{2}g^{\mu\nu}\dm\phi\dn\phi = \frac{1}{2}\left[         \underbrace{g^{0\nu}\d_0\phi\dn\phi}_{g^{00}\d_0\phi\d_0\phi+           \cancel{g^{01}}\d_0\phi\d_1\phi+\cancel{g^{02}}\d_0\phi\d_2\phi+           \cancel{g^{03}}\d_0\phi\d_3\phi}+         g^{1\nu}\d_1\phi\dn\phi+g^{2\nu}\d_2\phi\dn\phi         + g^{3\nu}\d_3\phi\dn\phi\right]     \end{equation}      This is what it looks like: ![Equation](http://i.stack.imgur.com/IEXDV.png) Is it possible to have an arrow come from the underbrace towards somewhere else under the equation so the main equation does not have to accommodate for the length of the expression beneath the underbrace?


title: Equations with operations next to each line

text: I basically want to type a derivation of a specific mathematical formula with the operations that have been done in each line, for e.g.:                 U = R * I      |:R     U/R = I      Handwritten it looks like this: ![enter image description here](http://i.stack.imgur.com/mJaJn.jpg)


title: Arcs not being properly drawn for some special coordinates

text: While attempting to draw some geometry diagrams in TikZ, I was having problems drawing an arc to mark off an angle. The arc kept falling too short and would not intersect both rays of the angle. (It wasn't a PDF zooming issue, the arc falls short at all zoom levels). I also noticed that slightly perturbing one of the coordinates fixes the arc. Here is some code and output showing what I mean:               \documentclass[draft]{article}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          % A = (-4,1.999)     \begin{tikzpicture}         \coordinate [label=below:{$B$}] (B) at (-6,0);         \coordinate [label=below:{$C$}] (C) at (0,0);         \coordinate [label=above:{$A$}] (A) at (-4,1.999);              \draw let \p1=($(B)$),\p2=($(A)$) in             (-1,0) arc (atan2(\x1,\y1):atan2(\x2,\y2):1);              \draw (B) -- (C) -- (A);     \end{tikzpicture}          % A = (-4,2)     \begin{tikzpicture}         \coordinate [label=below:{$B$}] (B) at (-6,0);         \coordinate [label=below:{$C$}] (C) at (0,0);         \coordinate [label=above:{$A$}] (A) at (-4,2.0);              \draw let \p1=($(B)$),\p2=($(A)$) in             (-1,0) arc (atan2(\x1,\y1):atan2(\x2,\y2):1);              \draw (B) -- (C) -- (A);     \end{tikzpicture}          % A = (-4,2.001)     \begin{tikzpicture}         \coordinate [label=below:{$B$}] (B) at (-6,0);         \coordinate [label=below:{$C$}] (C) at (0,0);         \coordinate [label=above:{$A$}] (A) at (-4,2.001);              \draw let \p1=($(B)$),\p2=($(A)$) in             (-1,0) arc (atan2(\x1,\y1):atan2(\x2,\y2):1);              \draw (B) -- (C) -- (A);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/7Qjyw.png) I was wondering why this is happening only for A=(-4,2). Perhaps I am misusing atan2 somehow?


title: Esttab, overriding decimal alignment

text: This is a follow-up question to Estout and dcolumn: Overriding decimal alignment In my case, using esttab, it centers the number of observations but it adds some decimals, for instance: Obersvations 3345.000, probably because I set se(3) or b(3) in the esttab command, which determine how many decimals are to be showed. Any way to fix that?               esttab sex0 sex1 using men_women_aboradTTT.tex, stats(N,layout("\multicolumn{1{c}{@}") ///         label("Observations")) se(3) b(3) ///         noconstant label replace booktabs alignment(D{.}{.}{4,6}) ///


title: How to make (nested) tabularx and multirow play nicely together?

text: I'm trying to make a layout with 3 independent columns. Following answers this question I have tried using tabularx and multirow to make it work. I seem to be nearly there: ![Pagelayout](http://i.stack.imgur.com/ZdBxj.jpg) However I have two issues: 1) How can I make the text in the 3rd (rightmost) column start at the same level as the top of the graphics? If I have to do it manually with a fixnum is there a way of calculating the required value? 2) Why does the text in the third column not seem to respect the multirow? (and why is there a white line) Two other issues are:   * In the first column, why are "Item 1" and "Item 2" not raggedleft whereas "item 3" is? How can I fix that?   * The left edge of the graphics does not align with the left edge of column 1 - is there a way to do that? Here is my minimal example:               %% LyX 2.0.3 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[oneside,english,oldfontcommands,a4paper]{memoir}     \usepackage{fontspec}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm}     \pagestyle{myheadings}     \setcounter{secnumdepth}{2}     \setcounter{tocdepth}{2}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.          \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{colortbl}     \definecolor{grey}{HTML}{F4F4F4}     \setheadfoot{3cm }{ 0.1cm }     \usepackage{multirow}     \usepackage{lipsum}          \makeatother          \usepackage{babel}     \begin{document}     \renewcommand{\tabularxcolumn}[1]{p{#1}}          \noindent\begin{tabularx}{\linewidth}{@{}>{\hsize=1.5\hsize}X|>{\hsize=0.5\hsize\columncolor{grey}}X@{}}     \rule{1.5\linewidth}{0.15\textheight}      &      \multirow{3}{0.5\linewidth}{\lipsum[1]} \tabularnewline  \tabularnewline                {\noindent\begin{tabularx}{1.5\linewidth}{@{}>{\hsize=0.5\hsize\footnotesize\raggedleft\arraybackslash\columncolor{grey}}X|>{\hsize=1.5\hsize}X@{}}     Item 1 \newline Item 2 \newline Item 3 & \lipsum[1-3]   \end{tabularx}}     &      \tabularnewline           \rule{1.5\linewidth}{0.15\textheight}     &     \tabularnewline       \end{tabularx}           \clearpage     \end{document}      Ok, so following comments from @DavidCarlisle below. Here is a simpler example. I have set the rightmost column in the outer tabularx to p{0.2\linewidth}. This means that the rules and inner tabularx work with a width of \linewidth. I have also removed the \columncolor{grey} from the outer tabularx as it seems the grey fill was getting printed on top of the text. So the issues that still remain are 1) aligning the text in the right column of the tabularx with the top of the rule and 2) aligning the left edge of the rules with the left column of the inner tabularx. Revised MWE:               %% LyX 2.0.3 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[10pt,oneside,english,oldfontcommands,a4paper]{memoir}     \usepackage{fontspec}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm}     \pagestyle{myheadings}     \setcounter{secnumdepth}{2}     \setcounter{tocdepth}{2}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.          \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{colortbl}     \definecolor{grey}{HTML}{F4F4F4}     \setheadfoot{3cm }{ 0.1cm }     \usepackage{multirow}     \usepackage{lipsum}          \makeatother          \usepackage{babel}     \begin{document}     \renewcommand{\tabularxcolumn}[1]{p{#1}}          \noindent\begin{tabularx}{\linewidth}{@{}X|p{0.2\linewidth}@{}} \rule{\linewidth}{0.15\textheight}  &  \multirow{3}{\linewidth}{\lipsum[1]} \tabularnewline  \tabularnewline      {\noindent\begin{tabularx}{\linewidth}{@{}>{\hsize=0.5\hsize\footnotesize\raggedleft\arraybackslash\columncolor{grey}}X|>{\hsize=1.5\hsize}X@{}} Item 1 \linebreak Item 2 \linebreak Item 3 \linebreak & \lipsum[1-3]   \end{tabularx}} &  \tabularnewline      \rule{\linewidth}{0.15\textheight} & \tabularnewline   \end{tabularx}      \clearpage \end{document}           \clearpage      \end{document}      Which gives me: ![revised layout](http://i.stack.imgur.com/wfAHC.jpg) Ok. I can align the rule with the edge of the column by doing: \hspace{-\tabcolsep}\rule{\linewidth+\tabcolsep}{0.15\textheight} So aligning the text with the top of the rule is now the issue remaining.


title: What is the difference between \notag and \nonumber in align environment?

text: I use `\notag` or `\nonumber` in `align` environment but there seems no any difference when display. What is the difference between these two commands?


title: Suppressing remarks when not needed

text: I have written some remarks in some of my works that are somewhat informal and repetitive in nature (mainly for my own clarification). I was wondering if there is a way of suppressing them when I don't want to typeset them in the PDF. MWE:               \documentclass{article}          \usepackage{amsmath,amsthm}          \newtheorem*{remark}{Remark}          \begin{document}          \section{Inner Loop (for $l$)}          We begin with inner loop - s.t. the given constraints, we find the optimal     level for individual labour supply in equilibirum,     \begin{equation*}     l=l^{\star }.     \end{equation*}          \begin{remark}     I want to keep this remark.     \end{remark}          \begin{remark}     When necessary, I would like to typeset this remark on or off.     \end{remark}          \end{document}      ![output](http://i.stack.imgur.com/wddQR.png)


title: Why \textbf\& and \textbf\"o behave differently

text: I know it's not a good habit to write latex this way, But just wonder why `\textbf\&` is the same as `\textbf{\&}`, while `\textbf\"o` is not the same as `\textbf{\"o}`?


title: Escape a string printed from Lua using ConTeXt

text: This seems to have come up a couple times, but I cannot glean an answer to the generic question of how one might protect an arbitrary string in Lua to ensure its characters are printed. In other words, given some code in a `.lua` file:               local i_can_be_anything = '&\\%*_'     context(i_can_be_anything)      This balks for any number of reasons, because the characters have special meaning in TeX when ConTeXt pushes them out to the TeX compiler. The most apparent option to me would be to convert the string in Lua so that it contains the proper escaping or substitutions that can be passed to TeX to achieve the desired outcome, which would be in this case along the lines of:               \&\textbackslash{}\%\&\_      I believe the full list of replacements one would be looking for would be along the lines of (and this is from some Python I wrote):               tex_replacements = [         (u'{', ur'\{'),         (u'}', ur'\}'),         (u'[', ur'{[}'),         (u']', ur'{]}'),         (u'\\', ur'\textbackslash{}'),         (u'$', ur'\$'),         (u'%', ur'\%'),         (u'&', ur'\&'),         (u'#', ur'\#'),         (u'_', ur'\_'),         (u'~', ur'\textasciitilde{}'),         (u'^', ur'\textasciicircum{}'),     ]          tex_mapping =  {ord(char):rep for char, rep in tex_replacements}     def escape(s):         return unicode(s).translate(tex_mapping)      Is there no function in Lua or LuaTeX to achieve this set of substitutions (or otherwise) so that an arbitrary string could be printed? A straightforward iteration over the characters with a substitution along the lines of the `tex_replacements` above could do the trick, but I would expect that someone had already written a solution to this problem. * * * ### EDIT It is worth noting that @phg posed a plausible solution of changing the catcodes to vrbcatcode (i.e. `\verbatim`, or `context.sprint(catcodes.numbers.vrbcatcodes, i_can_be_anything)`). This does perform the escaping desired, however it seems to have serious issues with line breaking that make it essentially unusable.


title: LyX, How to use more than the thirteen Roman fonts listed under Document Settings Fonts?

text: I noticed that LyX 2.0.6 has a very limited selection of Roman (Serif) fonts listed under the Document Settings Fonts dropdown menu. I'd like to be able to use any of the LaTeX fonts that come with my TeXLive or MIKTeX installation, that came bundled with the LyX installation. I use LyX 2.0.6 in Kubuntu and Windows, and no matter which document class I set, there are always those very same fonts to pick from, but no more.   * Roman fonts listed on the LyX Document Settings Fonts dropdown menu:     * Default     * Latin Modern Roman     * Computer Modern Roman     * AE (Almost European)     * Times Roman     * Palatino     * Bitstream Charter     * New Century Schoolbook     * Bookman     * Utopia     * Bera Serif      * Concrete Roman      * Zapf Chancery ** Kubuntu (TeXLive) version's dropdown menu also says this font is "(Not Installed)" That's Bera Serif and Concrete Roman. I checked the TUG Font Catalog to pick a favorite, and some that I thought were popular are not listed in the LyX dropdown menu. Here are some highlights of those not included in the dropdown.   * Missing:     * Garamond     * DejaVu Serif     * Linux Libertine and many others. I noticed that LyX includes four typefaces that aren't even listed in the TUG font catalog:     * Zapf Chancery     * Concrete Roman     * Bitstream Charter     * AE (Almost European) I'm not worried about why LyX choose thirteen serif fonts to put on their dropdown menu, or why a couple of them I suppose aren't part of their GNU/Linux installation package (TeXLive), or why four of them aren't available in the TUG font catalog for browsing. I'm writing a novel and researched popular books and the fonts they use. Harry Potter and Hunger Games both use Garamond, for instance. If it's a huge effort to add fonts to LyX, then I'll just add that one. By the way, it appears that the regular latin alphabet for Utopia is identical to Garamond, according to the TUG font catalog. The LyX manual says that other fonts can be added. It instructs to look into the fonts manual. Where do I find the manuals for the fonts that TeXLive or MIKTeX installs? I need to find out how to add all the other LaTeX fonts. By the way, I don't care to explore XeTeX yet. I'm looking for a superb typeset finish in pdf form.


title: How do I put a paragraph in a box that is some percentage of the width of the page I'm putting it in?

text: I have a document that should contain a bordered box with a paragraph of explanatory text. The box's width should be a percentage of that of the page's body. I don't want to make the box a fixed width, because I will be making the document in two page sizes. I hope I'll _only_ need to change the documentclass property, and to that end I hope it's possible to make the box width proportional to the page (or body) so that its width will make sense at both sizes. I tried using `\framebox` but I don't seem to be understanding it properly -- I can't get the text in the framebox to wrap. I suppose I could make a one-celled table, but it seems like I'm missing a more elegant solution.


title: Create 2x2 groupplot with +1 plot to the side?

text: I want to create a 2x2 + 1 plot like...               ---------------------------|     | Plot 1 | Plot 2 |        |     ------------------- Plot 5 |      | Plot 3 | Plot 4 |        |     ---------------------------|      How can I achieve that? With the pgfplots package?


title: "Log file not found" error with MacTeX and Texmaker

text: I have recently installed MacTeX.pkg (http://tug.org/mactex/) as well as Texmaker. I have this famous "Log file not found" problem, and I'm still stuck with it even thought I have already checked many other questions that were previously asked... Could someone help me? Thanks!


title: Error after TeX Live 2012 update: "I can't write on file 'texsys.aux'"

text: I was previously able to run LaTeX with TeX Live 2011, but since installing TeX Live 2012, I get the error message `! I can't write on file 'texsys.aux'.` This is a Windows 7 operating system. I have tried processing a minimal working example from the command line using:               latex test.tex      The MWE               \documentclass{article}     \begin{document}     This is some text.     \end{document}          The log file shows the following:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/W32TeX) (INITEX)  4 JUN 2013 17:34     entering extended mode     restricted \write18 enabled.     %&-line parsing enabled.     (c:/texlive/2012/texmf/web2c/cp227.tcx)     ***latex.ini     (c:/texlive/2012/texmf-dist/tex/latex/latexconfig/latex.ini     (c:/texlive/2012/texmf-config/tex/generic/config/pdftexconfig.tex)     (c:/texlive/2012/texmf-dist/tex/latex/base/latex.ltx     (c:/texlive/2012/texmf-dist/tex/latex/base/texsys.cfg)     ! I can't write on file `texsys.aux'.     l.140 \immediate\openout15=texsys.aux          (Press Enter to retry, or Control-Z to exit; default file extension is `.tex')     Please type another output file name:      ! Emergency stop.     l.140 \immediate\openout15=texsys.aux


title: Why does \addcontentsline not add to TOC?

text: \documentclass[12pt,a4paper]{scrartcl}     \usepackage{ngerman}     \usepackage[latin1]{inputenc}     \usepackage{hyperref}     \usepackage{graphicx}     \title{Rechtevergabe Testdokument}     \author{Test1}     \begin{document}     \maketitle     \newpage     \tableofcontents     \newpage     \addcontentsline{toc}{section}{Bereich A}     \addcontentsline{toc}{subsection}{Kapitel I}     \addcontentsline{toc}{subsection}{Kapitel II}     \addcontentsline{toc}{section}{Bereich B}     \end{document}      Gives me no TOC at all (after running _pdflatex_ twice). Moving `\addcontentsline` to before `\tableofcontents` and removing `\newpage` did no change. I intend to obtain a document with TOC only. Thank you.


title: Create a simple 2 panel graph in LaTeX

text: I am trying to make two panel graph in LaTeX. I don't know how complex it will be. Can anyone suggest what would be the starting point in creating such graphs ? The graph is as follows: ![enter image description here](http://i.stack.imgur.com/GQEen.png) I would appreciate any suggestions.


title: Algorithmicx multiple statements per line aligned over all lines

text: I would like to put a <- b and e <- f, in parallel on a single line in an algorithmicx environment. I want the same with c <- d and g <- h. Then I want to align both lines. The output shouod look like this.               1.    a <- b            e <- f     2.    c <- d            g <- h      This is the code I have now:               \begin{algorithm}     \begin{algorithmic}[1]     \Procedure{Test}{}         \State{$a \gets b$}         \State{$e \gets f$}         \State{$c \gets d$}         \State{$g \gets h$}     \EndProcedure     \end{algorithmic}     \end{algorithm}      Does anyone know how to do this? Could I use the multicolumn environment perhaps?


title: How to change a .bst for references sorted in order of appearance

text: I've been struggling trying to format my references for a paper which needs to follow the LNCS guidelines. They use to provide a .bst file which formats the references exactly as they require, but the only issue is that the references are sorted in alphabetical order, and now it seems they require them sorted in order of appearance. Is there any way of tuning the .bst in order to get the references sorted in order of appearance? Anyone had the same problem? Here the template (including the .bst) I am using: ftp://ftp.springer.de/pub/tex/latex/llncs/latex2e/llncs2e.zip


title: how to cancel a space?

text: I'm trying to cancel the space made by `\item` using `\hspace{0cm}` but this haven't work. Any suggestion please ?               \begingroup     \setlength{\LTleft}{-20cm plus -1fill}     \setlength{\LTright}{\LTleft}     \begin{longtable}{|p{3cm}|p{4cm}|p{7cm}|}     \hline     1 & 2 & 3 \tabularnewline     \hline     \begin{itemize} \item[-] ABC.\item[-] DEF \end{itemize} & AAA & BBB. \tabularnewline     \hline     \multicolumn{3}{l}{} \\[-7pt]       \caption[]{Description.}     \end{longtable}     \endgroup     \vspace{0.5cm}


title: Change text color when inserting a pdf_tex image

text: I am inserting an image from Inkscape using the pdf + LaTeX option since I want the text to appear in the same font and size as in the rest of my document. Can I change the color of the text?               \documentclass{article}     \usepackage{graphicx}     \usepackage{color}          \begin{document}      Some text before the figure.          \color{red}          \begin{figure}      \centering      \def\svgwidth{\textwidth}      \input{figure.pdf_tex}      \caption{Example Figure}     \end{figure}          Some text after the figure.     \end{document}      The following is the content of the figure.pdf_tex file:               \begingroup%       \makeatletter%       \providecommand\color[2][]{%         \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%         \renewcommand\color[2][]{}%       }%       \providecommand\transparent[1]{%         \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%         \renewcommand\transparent[1]{}%       }%       \providecommand\rotatebox[2]{#2}%       \ifx\svgwidth\undefined%         \setlength{\unitlength}{782.075bp}%         \ifx\svgscale\undefined%           \relax%         \else%           \setlength{\unitlength}{\unitlength * \real{\svgscale}}%         \fi%       \else%         \setlength{\unitlength}{\svgwidth}%       \fi%       \global\let\svgwidth\undefined%       \global\let\svgscale\undefined%       \makeatother%       \begin{picture}(1,0.48489595)%         \put(0,0){\includegraphics[width=\unitlength]{figure.pdf}}%         \put(0.21413974,0.24055332){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{Text}}}%       \end{picture}%     \endgroup%      ![The example figure as jpg](http://i.stack.imgur.com/2gKlL.jpg)


title: Remove a dot from a style!

text: I'm using the code below to create a theorem style. The style, however, leave a dot after the title in the title box. I want to remove that. Any ideas?               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{boiboites}          \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,     titleboxcolor = black]{theo}{Theorem}{anything}          \begin{document}      \begin{theo}[Law of Large Numbers]      Let $(X_n)_{n\in \mathbb{N}}$ be an infinite sequence of i.i.d. variables with finite expected value. Then:      $$\frac{1}{n} \sum_{i=1}^n X_i \overset{\textnormal{a.s.}}{\longrightarrow}          \mathbb{E} (X_1) .$$     \end{theo}     \end{document}


title: How do I use fonts from TeX Live in Graphviz?

text: So I need to set my fonts for `dot` the way the `pt` to be the same as in `pdflatex` - so I'm looking for a way to use the same fonts `pdflatex` uses. Note also, that I'm unsure whether `cm-super` or `cm-unicode` (or `cm-lgc`?) is used (what is the way to get that known, BTW?). Any suggestions? **UPDATE:** I found a way to install TeX Live's fonts as system ones (It's all happening on Windows and involves getting `.afm` files, then copying to their place `.pfb` files and then using program _AfmToPfm_ from http://www.proximasoftware.com). Now the remaining part remains - how do I know which font gets used? (I know uninteresting answer involving viewing file properties with `pdffonts` or PDF viewer's "Properties" dialog, but are there other solutions?)


title: memoir: page number on the first page of a chapter

text: This is a minimal working example. Compiling this main code:               \documentclass[a4paper,oneside,italian,12pt,openright]{memoir}     \usepackage{tocloft}     \aliaspagestyle{part}{empty}     \usepackage[font=small]{quoting}     \usepackage[utf8]{inputenc} % scrivere in italiano correttamente     \usepackage[italian]{babel}     \usepackage[T1]{fontenc}     \usepackage[natbibapa]{apacite}     \usepackage{indentfirst}     \usepackage[sectionbib]{chapterbib}     \usepackage[usenames]{color}     \definecolor{citations}{rgb}{0,.5,.5}      \definecolor{link}{rgb}{0,0,1}     \usepackage{doi}     \usepackage{hyperref}     \hypersetup{        colorlinks,breaklinks,        linkcolor = {black}, % e.g. footnotes        urlcolor = {link},        anchorcolor = {link},        citecolor = {citations}}     \usepackage{microtype}     \usepackage{mathptmx}     \usepackage{rotating}     \usepackage{multirow}     \usepackage{amsmath}     \usepackage{url}     \urlstyle{rm}     \usepackage{graphicx}          \usepackage[font=footnotesize,labelfont=bf,labelsep=space]{caption}          \usepackage{textcomp}          \pagestyle{ruled}          \raggedbottom          % numerare sottosezioni e mostrarle nell'indice     \settocdepth{subsection}     \setsecnumdepth{subsection}          \renewcommand*\rmdefault{ppl} % font palatino          \graphicspath{{Figures/}}          \usepackage[top=3cm,bottom=3cm,right=3cm,left=4cm]{geometry} % margins          % Bibliografia non numerata     \AtBeginDocument{       \renewcommand{\bibsection}{%         \section*{\bibname}         \bibmark         \ifnobibintoc\else           \phantomsection           \addcontentsline{toc}{section}{\bibname}         \fi         \prebibhook       }     }          \begin{document}         \OnehalfSpacing         \chapterstyle{madsen}         \renewcommand*{\chapnumfont}{\normalfont\HUGE\bfseries\rmfamily}         \renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\rmfamily}         \frontmatter         \begin{KeepFromToc}             \tableofcontents         \end{KeepFromToc}         \mainmatter         \include{Chapter}     \end{document}      with this chapter file:               \chapter{Chapter title}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur mollis luctus libero. Duis accumsan a eros ut fringilla. Quisque leo metus, sodales quis accumsan nec, posuere at nisi. Aliquam vitae scelerisque justo. Nulla facilisi. Fusce leo augue, fringilla ut tincidunt nec, pharetra in est. Duis ultrices tempor suscipit. Sed sit amet quam et nisi lacinia pulvinar. Sed quis mattis tellus. Sed adipiscing pulvinar sem, nec egestas orci.          Pellentesque ante nisl, adipiscing sed neque et, tempus ultricies erat. Integer sed viverra ipsum. Morbi consequat vehicula justo id ullamcorper. Vivamus ut tortor auctor, ultrices sem quis, luctus metus. Curabitur augue mauris, cursus sed condimentum sit amet, commodo ut lorem. Pellentesque sit amet sodales metus, ac ultricies purus. Praesent eu dui sed lectus elementum hendrerit id in tellus. Phasellus malesuada vestibulum tincidunt.          Suspendisse sollicitudin quam sed congue scelerisque. Nulla arcu dolor, euismod ac est a, posuere volutpat nulla. Nullam cursus nulla eu augue commodo, eu vehicula lectus accumsan. Duis et tortor pellentesque, tristique quam sit amet, porta dui. Phasellus in semper ligula, ac pretium diam. Integer hendrerit mi eget mauris porta euismod vel in massa. Etiam felis nulla, porta nec iaculis eget, ultricies sed nisi. Aenean suscipit posuere rutrum. Sed posuere vestibulum laoreet. Curabitur eros sapien, imperdiet non sapien adipiscing, dapibus venenatis tortor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed vel justo aliquet, consequat turpis sed, tempor felis. Mauris ornare metus nisi, ac consequat nunc vestibulum non. Phasellus eu pellentesque nulla, sit amet mattis diam.          Duis auctor eget nisi adipiscing interdum. Phasellus at blandit lectus. Praesent venenatis quis justo in euismod. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In quis risus adipiscing, vulputate risus et, ornare justo. Curabitur tincidunt, libero non iaculis bibendum, felis odio aliquet quam, luctus volutpat libero nisl in nibh. Phasellus sodales neque augue, in cursus neque feugiat a. Nam egestas arcu et enim consequat varius. Cras convallis lobortis fermentum. Suspendisse fringilla leo nec purus semper gravida. Nulla facilisi. Sed pharetra quam quis quam interdum venenatis. Pellentesque aliquet quis tellus non facilisis. Donec nec metus posuere, porttitor felis cursus, lobortis metus.          Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus tincidunt, lacus in varius venenatis, nibh orci luctus leo, ut mollis dui dui eu justo. Suspendisse id iaculis lacus. Ut porttitor risus at lectus congue iaculis et nec erat. Aliquam eleifend ultrices massa, vitae vulputate tortor. Pellentesque venenatis condimentum nisi, at bibendum ipsum sollicitudin at. Maecenas in ipsum ornare, sagittis ipsum in, volutpat velit. Integer pharetra diam in gravida rhoncus.      The first page of the Table of contents and of the chapter has the page number centered, while the others have the page on the right. **I want that all the pages have the page number on the right, also the first page. How can I do that?**


title: Always using displaystyle only for \lim

text: My question is a short one: I would like `\lim` to always be displayed inline using the `\displaystyle` mode.


title: How to do a simple index?

text: I use               \usepackage{makeidx}      in the document header. I use               COVER, in this page is the `cover\index{ccover}, and the ship\index{sship}       is inside that image and finally `\printindex` before `\end{document}`. What am I doing wrong?               \documentclass[12pt,a4paper,x11names]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[spanish]{babel}     \usepackage{fancyhdr}     \usepackage{makeidx}     \pagestyle{fancy} % seleccionamos un estilo          \rhead{TFG - Metaheurística}          \rfoot{Página \thepage}     \cfoot{}     \pagenumbering{gobble}      \makeindex     \begin{document}     \pagenumbering{arabic}     \setcounter{page}{1}          This document\index{ddocument|(}     COVER, in this page is the cover\index{ccover}, and the ship\index{sship} is inside that image.     \newpage          ABSTRACT     in this page\index{ppage!Parte de arriba} is the upper half     \vspace{15cm}     And after 15 cm, we have page\index{ppage!Parte de abajo}          This document\index{ddocument|(}     \newpage          Starting     jkf jfd sjfj kdjf kdjk sdl kdl fjsdlk jsd fjs ddk jsñkd sdfjg flkjsd kfdl jkldfj lkdfj sdf dfj lkd fgd  fdg gfdfdg dfg fdg f dg fg fdgdf g dfgd ff gs dfgsdf gd f gfd gfd  d\index{Rollo patatero}     \newpage     INDEX     \printindex     \end{document}


title: Tikz Mindmap - how to get more nodes

text: % Author: Till Tantau     % Source: The PGF/TikZ manual     \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{mindmap,trees}     \usepackage{verbatim}          \begin{document}     \pagestyle{empty}          \begin{comment}     :Title: Computer science mindmap     :Tags: Manual, Mindmap          Version 1.09 of PGF/TikZ added a library for drawing mindmaps. Here's an example     from the manual.           | Author: Till Tantau     | Source: The PGF/TikZ manual          \end{comment}     \begin{center}     \begin{tikzpicture}       \path[mindmap,concept color=blue,text=white]         node[concept] {Shabda}[clockwise from=0]     child[concept color=green!50!black] {node[concept] {Prathama}[clockwise from=60]     child { node[concept] {Ekvachana} }           child { node[concept] {Dvivachana} }           child { node[concept] {Bahuvachana} }     }     child[concept color=red!50!black] {node[concept] {Dvitiya}[clockwise from=15]     child { node[concept] {Ekvachana} }           child { node[concept] {Dvivachana} }           child { node[concept] {Bahuvachana} }     }     child[concept color=red!50!black] {node[concept] {Trutiya}[clockwise from=-45]     child { node[concept] {Ekvachana} }           child { node[concept] {Dvivachana} }           child { node[concept] {Bahuvachana} }     }     child[concept color=red!50!black] {node[concept] {Chaturthi}[clockwise from=-90]     child { node[concept] {Ekvachana} }           child { node[concept] {Dvivachana} }           child { node[concept] {Bahuvachana} }     }     child[concept color=red!50!black] {node[concept] {Panchami}[clockwise from=-90]     child { node[concept] {Ekvachana} }           child { node[concept] {Dvivachana} }           child { node[concept] {Bahuvachana} }     }     child[concept color=red!50!black] {node[concept] {Shasthi}[clockwise from=135]     child { node[concept] {Ekvachana} }           child { node[concept] {Dvivachana} }           child { node[concept] {Bahuvachana} }     };          \end{tikzpicture}     \end{center}     \end{document}      I got this example from texexample.net and modified it for my needs, however I can not get more than 6 nodes. Is it the upper limit or can I have 8 nodes and 3 child nodes for all them?


title: Expandable full expansion of tokens that preserves catcodes

text: Is it possible to fully expand tokens in an expandable manner and preserves category codes? I'd like to do this just using pdfTeX. I'm looking for something that would work like this:               \def\foo{foo}     \fullyexpand{\foo bar baz}      which would expand to the 10 tokens "foobar baz" and retain the category codes. If we drop the expandable requirement, then this is easy.               \def\fullyexpand#1{\edef\fetemp{#1}\fetemp}      If we drop the retain catcode requirement, it's doable, but less straight- forward. Here's the best I could come up with.               \def\gobbleprefix#1#2\femarker{%             \ifnum\escapechar<0                     #1%             \else\ifnum\escapechar>255                     #1%             \fi\fi             #2%     }     \def\fullyexpand#1{%             \expandafter\expandafter\expandafter\gobbleprefix             \expandafter\string\csname#1\endcsname\femarker     }      I was hoping to combine the _ε_ -TeX extension `\scantokens` with the above (by an appropriate, trivial modification of `\gobbleprefix`), but of course, that does not work. `\scantokens`'s expansion is empty and pdfTeX just acts like it has opened a new file. (As an aside, it amuses me that not expanding tokens is expandable--using `\unexpanded`--but expanding tokens isn't, at least not obviously so.)


title: How to draw a torus

text: Is there an easy way to draw a contour image of torus below with tikz? Or for that matter with any other graphics package. ![enter image description here](http://i.stack.imgur.com/S1HJL.png)


title: What is the practical difference between latex and pdflatex?

text: I understand that some packages (like PSTricks) can't be used with pdflatex. Are there any other differences between these tools? Can we say that pdflatex is better if we don't care about ps?


title: Extra command in subfig package

text: I would like an extra command to be run in the captions using the `\subfloat` command from the `subfig` package. With normal captions, I just redefine `\captionfont`, but this doesn't work for captions of subfloats. I have tried (the command I want to run is `\sansmath`:               \documentclass{article}     \usepackage{caption}     \renewcommand{\captionfont}{\footnotesize\sffamily}     \usepackage{sansmath}     \usepackage[textfont=sf]{subfig}     \let\bensubfloat\subfloat     \renewcommand{\subfloat}[2][]{\bensubfloat[\sansmath #1]{#2}}          \begin{document}     \begin{figure}         \subfloat[Subcaption $1+1$]{\framebox[3cm]{First}} \hfill         \subfloat[Subcaption $1+a$]{\framebox[3cm]{Second}}         \caption{Main caption}      \end{figure}     \end{document}      This gives the desired output, but also many errors.


title: In LYX, how do I set up two independent viewers for the same file format?

text: I would like to have two independent file viewers for SumatraPDF and Acrobat using the same file format (pdflatex=pdf2). What is the easiest way to achieve this? The viewer seems to be connected to the file format so I either use one or the other right not. But I would love to be able to switch between the two! Sumatra gives you forward and inverse search, but Acrobat prints nicely.


title: minted's listing environment with hyperref and caption package together

text: I use the minted package for code highlight. I use its listing environment. I also use the hyperref package to provide links all through my document: figures, tables, listings, etc. If I import the caption package the listing links do not work properly. They take you to the begining of the document. All other links except listing links work fine. If I do not import the caption package, all links work fine. There is an issue opened at the project home page: Incompatibility with caption package but it seems to point to a compilation problem. Is there any way to make the three packages work together? **EDIT:** I compiled Marco's answer and It worked like a charm so it kept me thinking about it. I have made some tests and I have come to the conclusion that it's in the order of the imports. These are my results:               \documentclass{report}          % it's all in the order of the imports          % this works     \usepackage{caption}     \usepackage{minted}     \usepackage{hyperref}          % this works     %\usepackage{minted}     %\usepackage{hyperref}     %\usepackage{caption}          % this works     %\usepackage{minted}     %\usepackage{caption}     %\usepackage{hyperref}              %this does not work     %\usepackage{hyperref}     %\usepackage{caption}     %\usepackage{minted}          %this does not work     %\usepackage{caption}     %\usepackage{hyperref}     %\usepackage{minted}          %this does not work     %\usepackage{hyperref}     %\usepackage{minted}     %\usepackage{caption}          % I'm thinking that if hyperref is imported before minted it doesn't work          %however this does work (not importing caption at all, yet hyperref is imported before minted)     %\usepackage{hyperref}     %\usepackage{minted}          \begin{document}          \chapter{test}          \clearpage          \begin{listing}[H] \mint{cl}/(car (cons 1 2))/     \caption{Example of a listing.}     \label{lst:example}     \end{listing}     \clearpage          Listing \ref{lst:example} contains an example of a listing.          \end{document}      So, my question is... Why is this happening? **EDIT 2:** In theory, the order of loading packages with \usepackage in principle doesn't matter. Real life, however... > Hyperref has the nasty property that sometimes it conflicts when it is put > earlier, sometimes when it is put later than other widely used packages So, is it fair to blame Hyperref for this?


title: Why doesn't math \fontdimen's work with XeTeX?

text: Why doesn't the `\fontdimen`-command change anything with XeTeX?               \input pgffor     \def\chfndims#1{\foreach\dim in{13,...,19}{\fontdimen\dim#1=20pt}}     \font\mymathfn="XITS Math:script=math" at 10pt \chfndims\mymathfn     \font\mymathfns="XITS Math:script=math;+ssty=0" at 7pt \chfndims\mymathfns     \font\mymathfnss="XITS Math:script=math;+ssty=1" at 5pt \chfndims\mymathfnss     \textfont0=\mymathfn \scriptfont0=\mymathfns \scriptscriptfont0=\mymathfnss     \textfont1=\mymathfn \scriptfont1=\mymathfns \scriptscriptfont1=\mymathfnss     \textfont2=\mymathfn \scriptfont2=\mymathfns \scriptscriptfont2=\mymathfnss     \textfont3=\mymathfn \scriptfont3=\mymathfns \scriptscriptfont3=\mymathfnss     \textfont4=\mymathfn \scriptfont4=\mymathfns \scriptscriptfont4=\mymathfnss     \textfont5=\mymathfn \scriptfont5=\mymathfns \scriptscriptfont5=\mymathfnss     \textfont6=\mymathfn \scriptfont6=\mymathfns \scriptscriptfont6=\mymathfnss     $ a^b \, c_d \, e^1 \, f_2 $     \bye      Nothing changes. I would like to change the horizontal space before a superscript.


title: Change icons associated with phone, mobile, and email in moderncv

text: How can I change moderncv package to give me icons for the `\phone \mobile \email` commands? Currently, it prints H for mobile, T for phone, and B for email which doesn't make any sense. I've seen examples where they have small pictures instead, but I can not tell what the difference between the source for those files and mine is. What I have: https://dl.dropbox.com/u/287148/template.pdf What I want: http://ctan.mirrorcatalogs.com/macros/latex/contrib/moderncv/examples/template.pdf My code:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[red]{classic}                   \title{your Curriculum Vitae title}     \firstname{Name}     \familyname{Lastname}     \mobile{Mobile}     \phone{Phone}     \email{Email}     \homepage{Homepage}     \extrainfo{Extra Info}     \photo[64pt]{picture}     \quote{Subtitle}     \address{Address}{City, Country}          \begin{document}     \maketitle          \section{Section Name}     \cvline{Subject}{Description.}     \cventry{Time}{Position}{Company Name}{City}{Country}{Description}     \cvcomputer{Skill}{Description}{Skill}{Description}     \cvlanguage{Language}{Proficiency}{Description}           \end{document}


title: How to control spacing in a TikZ tree?

text: I want to draw a tree and I don't know how to enforce the spacing between them. Some are overlapping. This is my code:               \begin{tikzpicture}     \tikzstyle{every node}=[circle,draw]     \node {A}     child { node {B}      child { node {E} }     child { node {F} child { node {K} } child { node {L} } child { node {M}}}     child { node {G} }}     child { node {C}      child {node {H}}}     child { node {D} child {node {I}} child {node {J} child {node {N}} child {node {O}}}};     \end{tikzpicture}      The nodes `G` and `H` are overlapping. I've tried using the parameter `node distance` but it doesn't work.


title: tikz: How to mirror the path decoration "text along path"?

text: I'd like to create labeled nested ellipses in tikz. The labels should follow the shape of the ellipses. I used a path decoration with `pre` to move the label to the right place, but I couldn't figure out: a): how to turn it [the `mirror` option mirrors it in the wrong way] and b): as soon as I include `pre` and `pre length`, other options (such as `raise` or `mirror`) do not seem to be respected anymore. Has anyone an idea how to solve this?               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[american]{babel}     \usepackage{tikz}     \usepackage{xcolor}     \usetikzlibrary{shapes,arrows}     \usetikzlibrary{decorations.pathmorphing, decorations.text}          \begin{document}          \begin{tikzpicture}[decoration=zigzag]       % ellipses       \filldraw[fill=gray!10, draw=gray!80] (0,0) ellipse (6.4cm and 3.2cm);       \filldraw[fill=gray!20, draw=gray!80] (0,0) ellipse (4.8cm and 2.4cm);       \filldraw[fill=gray!30, draw=gray!80,                 postaction={decorate,                             decoration={pre=moveto, pre length=3cm, raise=4mm, text along path, text={|\tt|Function 2}}}]                (0,0) ellipse (3.2cm and 1.6cm);       \filldraw[fill=gray!40, draw=gray!80] (0,0) ellipse (1.6cm and 0.8cm) node       {\texttt{Function 1}};     \end{tikzpicture}     \end{document}


title: Referencing an article from a beamer document with xr-hyper

text: I'm trying to link to a label in an article from a beamer file. The reference itself works fine, but the hyperlink doesn't. It gets defaulted to page 1 of the beamer file. This is the article:               \documentclass{article}     \usepackage{hyperref}          \begin{document}     \section{section}\label{target}     \end{document}      This is the beamer:               \documentclass{beamer}     \usepackage{xr-hyper}          \externaldocument[article-]{article}[article.pdf]          \begin{document}     see \ref{article-target}     \end{document}      It works fine when not using the beamer class.


title: Centring without phantom spacing

text: My current approach uses phantom to place the first line where I want it, is there a better way to do this? I would still like the `split` environment or something similar so I can align multiple where clauses.               \newcommand{\graphG}{\mathcal{G}}                                                       \newcommand{\modelM}{\mathcal{M}}     \newcommand{\card}[1]{\left|#1\right|}       \newcommand{\vertices}[1]{V\!\left(#1\right)}           \begin{equation}                                                                        \begin{split}                                                                           &\phantom{aaaaaaaa}\modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} \\       \textbf{where}\;x &= \text{number of maximal overlapping regions in $\modelM$}                         \end{split}                                                                             \end{equation}       ![Desired result](http://i.stack.imgur.com/HY6p7.png)


title: Pgf plots and a tabular legend

text: I have a plot where I want to add a legend which is the combination of lines and marks. For that I want to replace (or define a new) the original pgf plots legend type. As said before, in the following MWE I want to replace the legend in the plot with one similar to the one that is bellow the graphic that uses the same symbols and lines as in the graphic. Is that possible?               \documentclass[10pt,border=0pt]{standalone}          \usepackage[T1]{fontenc}     \usepackage{lmodern}          \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \pgfplotstableread{%     x0  y1  y2  y3  y4  y5  y6       1   3.1 3.1 1.8 2.4 1.6 0.7      3   3.2 2.8 1.8 2.2 1.7 0.5      5   3.3 3.0 1.6 2.6 1.4 0.3      7   3.1 3.0 1.2 2.7 1.5 0.2      9   3.0 2.9 1.5 2.5 1.3 0.2     }{\testdata}          \usetikzlibrary{arrows}     \usetikzlibrary{plotmarks}          % mytick x interval=xmin:xstep:xmax     \pgfplotsset{mytick x interval/.style args={#1:#2:#3}{%             xmin=#1,xmax=#3,xincrement={#1}{#2},             xtick={#1,\xval,...,#3}         },         xincrement/.code 2 args={\pgfmathparse{#1+#2}\xdef\xval{\pgfmathresult}}     }          % mytick y interval=ymin:ystep:ymax     \pgfplotsset{mytick y interval/.style args={#1:#2:#3}{%             ymin=#1,ymax=#3,yincrement={#1}{#2},             ytick={#1,\yval,...,#3}         },         yincrement/.code 2 args={\pgfmathparse{#1+#2}\xdef\yval{\pgfmathresult}}     }          \pgfplotsset{every tick/.style={black,}}          \pgfplotsset{%         compat=1.8,         compat/show suggested version=false,         mytick x interval=1:2:9,         mytick y interval=0:0.5:4,         tick label style={font=\footnotesize},         label style={font=\footnotesize},         xlabel={x-label},         ylabel={y-label},         %enlargelimits=false,         legend style={%             font=\footnotesize,             legend cell align=left,             legend pos=south east,             nodes={inner xsep=2pt,inner ysep=0.4pt,text depth=0.15em},         },     }          \begin{document}          \begin{tikzpicture}     \begin{axis}[%         legend entries={%             A,             B,             C,             S1,             S2,         },         mark options={fill=white,solid},     ]         \addlegendimage{thick,only marks,mark=square*} \label{c1}         \addlegendimage{thick,only marks,mark=triangle*} \label{c2}         \addlegendimage{thick,only marks,mark=*} \label{c3}         \addlegendimage{thick} \label{l1}         \addlegendimage{thick,dashed} \label{l2}         %         \addplot[thick,mark=square*] table[x=x0,y=y2] {\testdata}; \label{n1}         \addplot[thick,dashed,mark=square*] table[x=x0,y=y1] {\testdata}; \label{n2}         \addplot[thick,mark=triangle*] table[x=x0,y=y4] {\testdata}; \label{n3}         \addplot[thick,dashed,mark=triangle*] table[x=x0,y=y3] {\testdata}; \label{n4}         \addplot[thick,mark=*] table[x=x0,y=y6] {\testdata}; \label{n5}         \addplot[thick,dashed,mark=*] table[x=x0,y=y5] {\testdata}; \label{n6}     \end{axis}     \end{tikzpicture}           \begin{tabular}{llll}       &          & S1       & S2 \\       &          & \ref{l1} & \ref{l2} \\     A & \ref{c1} & \ref{n1} & \ref{n2} \\     B & \ref{c2} & \ref{n3} & \ref{n4} \\     C & \ref{c3} & \ref{n5} & \ref{n6} \\     \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/tfYJZ.png)


title: Good way to cut off extra range data in listplot

text: Using `listplot`, is there a way to cut off extra range data? The option `yEnd=10` simply removes the points above `y=10` so that it changes the overall shape of the curve. Here is example code:               \documentclass{article}     \usepackage{pst-plot}          \begin{document}          \def\data{0 0 1 4 1.5 1.75 2.25 4 2.75 7 3 9 3.5 13 4 15 4.5 15 5 1 5.5 1}     \begin{psgraph}(0,0)(6,10){10cm}{3cm}     \listplot[showpoints=true]{\data}     \end{psgraph}          \vspace*{20mm}          \begin{psgraph}(0,0)(6,10){10cm}{3cm}     \listplot[showpoints=true,yEnd=10]{\data}     \end{psgraph}          \end{document}


title: fancyhdr with 2 different fonts

text: I need to write a footer with these requirements: Font for footer – page # Garamond 12 regular, right upper corner, start page 1 with title & authors (after cover page) · Rest of the footer. Font in Word will be Josefin Slab 9.5. Color should be certified from: http://curry.virginia.edu/uploads/resourceLibrary/Center_colors_with_s.jpg I'm having troubles writing the code to have the page number be Garamond 12 regula while the rest of the footer Josefin Slab 9.5 Help will be much appreciated. LyX document: https://www.dropbox.com/s/pmjfirn6qq9av5g/fancyhdr_question.lyx LaTeX document: https://www.dropbox.com/s/jko0wujfxybzxfx/fancyhdr_question.tex Thanks!


title: How can I calculate within style values?

text: Is it possible to calculate (addition etc.) in style values? I wanted to do the following:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning,fit,chains}          \newcommand*{\mypath}[3][0.0]{% looseness adjustment (optional),1st node, 2nd node         \draw (#2.south east) to [in=90, out=90, looseness=0.85+#1] (#3.south west);     }          \begin{document}         \begin{tikzpicture}[start chain]         \node[on chain] (k11) {};         \node[on chain] (k12) {};         \mypath{k11}{k12}            \end{tikzpicture}         \end{document}      The problem is `looseness=0.85+#1` which fails with `Missing number, treated as zero` and `Illegal unit of measure (pt inserted)`.


title: How do I shrink text inside a frame?

text: How do I shrink the text inside the following frame?               \lstset{framexleftmargin=0mm, frame=shadowbox, rulesepcolor=\color{black}}          \begin{ttfamily}     \begin{lstlisting}      root@bt:~# nmap -O we****t***.com          Starting Nmap 6.01 ( http://nmap.org ) at 2012-12-21 15:38 CET     Nmap scan report for we****t***.com (217.6*.***.**)     Host is up (0.0087s latency).     Not shown: 990 filtered ports     PORT     STATE  SERVICE     21/tcp   open   ftp     22/tcp   open   ssh     53/tcp   open   domain     80/tcp   open   http     110/tcp  open   pop3     143/tcp  open   imap     443/tcp  open   https     587/tcp  closed submission     3306/tcp open   mysql     3389/tcp closed ms-wbt-server     Device type: general purpose     Running (JUST GUESSING): Microsoft Windows 7|2008 (90%)     OS CPE: cpe:/o:microsoft:windows_7:::enterprise cpe:/o:microsoft:windows_server_2008::sp1     Aggressive OS guesses: Microsoft Windows 7 Enterprise (90%), Microsoft Windows Server 2008 SP1 (89%)     No exact OS matches for host (test conditions non-ideal).          OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .     Nmap done: 1 IP address (1 host up) scanned in 79.16 seconds     \end{lstlisting}     \end{ttfamily}      Unfortunately what I get exceeds the page's margins.


title: Quickest way to include graphics

text: Whenever I make a presentation with LaTeX, it takes me a long time to include the graphics in the way I want them to look.   * I start with `\includegraphics{foo.jpg}`,    * run `pdflatex` to see what it looks like,    * then add `[trim=1cm 2cm 3cm 4cm]`,    * run `pdflatex` to see what it looks like,    * then add `[scale=.8]`,    * then run `pdflatex`,    * then change `[trim=...]`,    * then change `[scale]....` etc.  Is there a tool that lets on manipulate the picture directly and then produces the LaTeX source? Or what is a better practice to achieve the results?


title: Problem with composite letters in section labels

text: Although there are some advices that deal with the warning message: > Composite letter `\textasciicaron+c'not defined in PD1 encoding See here, for example: Problem with UTF-8 in meta data It seems that I cannot get rid of these warnings if letters appear in section (subsection) labels (`\section{Example: \v{s}}`). Can anyone give me some advice? My header contains:               \documentclass[12pt]{beamer}     \usepackage[english,serbian]{babel}     \usepackage[default,osfigures,scale=0.95]{opensans}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{tabularx}      And I also tried:               \documentclass[12pt]{beamer}     \usepackage[english,serbian]{babel}     \usepackage[default,osfigures,scale=0.95]{opensans}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{tabularx}      Many thanks! PM =========================================================== **MINIMAL EXAMPLE:**               \documentclass[12pt]{beamer}     \usepackage[english,serbian]{babel}     \usepackage[default,osfigures,scale=0.95]{opensans}     \usepackage[T1]{fontenc}     \usepackage[normalem]{ulem}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{color}     \usepackage{setspace}     \usepackage{parskip}     %     \xdefinecolor{myStructureColor}{RGB}{51,158,51}     \xdefinecolor{myAlertedColor}{RGB}{255,51,51}     \xdefinecolor{myTextColor}{RGB}{60,60,60}     \xdefinecolor{midGrey}{RGB}{180,180,180}     \xdefinecolor{lightGrey}{RGB}{225,225,225}     %     \setbeamercolor{normal text}{fg=myTextColor}     \setbeamercolor{structure}{fg=myStructureColor}     \setbeamercolor{alerted text}{fg=myAlertedColor}     \setbeamercolor{section in toc}{fg=myAlertedColor}     %     \setbeamerfont{structure}{shape=\scshape}     \setbeamerfont{section in toc}{shape=\scshape}     %     \setbeamertemplate{itemize item}         {\includegraphics[width=0.06in]{backbulls/bulettA}}     \setbeamertemplate{itemize subitem}         {\includegraphics[width=0.05in]{backbulls/bulettB}}     \setbeamertemplate{itemize subsubitem}         {\includegraphics[width=0.05in]{backbulls/bulettC}}     %     \AtBeginSection[]     {\begin{frame}         \frametitle{Sadr\v zaj}         \tableofcontents[currentsection]     \end{frame}}     %     \setlength{\parskip}{1ex}     %     \title{Slo\v zeni linearni modeli}     \date{\tiny{februar 2014. godine}}     %          \begin{document}          \begin{frame}     \begin{spacing}{2}     \titlepage     \end{spacing}     \end{frame}          \section{Ve\v zba}          \begin{frame}[fragile]     \frametitle{Works}     previous section label works fine...     \end{frame}          \section{\v Cinjenica}          \begin{frame}[fragile]     \frametitle{Does not work}     previous section label does not work...     \end{frame}          \begin{frame}     \vspace*{4\baselineskip}     \begin{center}         {\LARGE{K~~~R~~~A~~~J}}     \end{center}     \end{frame}          \end{document}


Please see the MWE:               \documentclass{JHEP}          \author{me}     \abstract{a}     \title{title}          \begin{document}     \begin{table}     \begin{tabular}{c}      hello     \end{tabular}     \end{table}          \end{document}      After compiling i got this warning: > Warning: Please use \TABLE{...} in place of LaTeX environment Why is that? What does this warning mean? Also getting similar warning with \figure enviroment > Warning: Please use \FIGURE{...} in place of LaTeX environment JHEP avaliable here


title: Why draw diagrams using LaTeX when there are open source tools like OpenOffice?

text: I was looking at recent questions here and was surprized that people were drawing diagrams in LaTeX, when it can be done in SmartDraw, OpenOffice or other programs. Is there any benefit to using LaTeX for diagrams (at least for normal diagrams like a layered architecture)?


title: Placing text under an entire math expression

text: I want to place text under an entire multivariate expression, exactly the way one is able with `\underbrace`, but without the brace. I want it to specifically describe the first variable in the expression, but for the text to span the entire expression. I have scoured the webs and it's all about placing text under single symbols or commands. For example, `\underset`, `\smashoperator`, and `\limits` can't seem to function with more than one command or variable, even when I use brackets around the command line. I got what I wanted using this:                   \begin{align*}           N_{e}(r)\, =\, \sum_{u, v, w}\; &n_{e}\,(\overrightharp{\text{r}}\, -\,  u\overrightharp{\text{a}}\, -\, v\overrightharp{\text{b}}\, -\,  w\overrightharp{\text{c}}) \\[-.4cm]            & \lcurvearrownw \text{\footnotesize{electron density per}}\\[-.2cm]            &\; \; \; \; \; \; \; \text{\footnotesize{primitive unit cell.}}         \end{align*}      but I was wondering if there was a less hacky way of going about it. I want my client to be able to feasibly edit their documents when I am finished. In other words, I want them to know what is going on here.


title: compiling bibtex outputs only numbers

text: I am fairly new to latex, but I have already written a few papers using it on my computer. I am now working on a new computer. I made a regular .bib file and used `~\cite` as usual. I compiled it using texworks, but all I got in the end of the pdf document, where the `\bibliography` tag was at the latex file, is just a list of numbers without the actual text of the authors' name, title etc. What am I doing wrong?


title: TikZ: Accessing coordinates from coded points

text: Consider the code below. In the `scope` environment, I am using a clip to keep the ellipse between the points. From reading, I know with the `let` command I can access the coordinates of the points by defining them in the let command `\p2 = (P2)`. Can I access the coordinates to use in the clip? The goal is so if I change `P2`, the clip will change too.                 \documentclass[tikz, border=5mm]{standalone}       \usetikzlibrary{arrows,calc, decorations.markings, intersections}            \begin{document}            \begin{tikzpicture}[         dot/.style = {outer sep = +0pt, inner sep = +0pt, shape = circle, draw = black, label = {#1}},         small dot/.style = {minimum size = 1pt, dot = {#1}},         big dot/.style = {minimum size = 2pt, dot = {#1}},         line join = round, line cap = round, >=triangle 45         ]         \node[ fill = black, big dot = {below: \(F\)}] (F) at (0, 0) {};         \node[ fill = black, big dot = {below: \(P_1\)}] (P1)  at (2, 0) {};         \node[ fill = black, big dot = {above right=.25cm:\(P_2\)}] (P2) at (-2, 2) {};                  \begin{pgfinterruptboundingbox}                           \begin{scope}[decoration = {markings,             mark = at position 0.5 with {\arrow{>}}           }]           \clip (2, 0) -- (-2, 0) -- (-2, 2.2) -- (2, 2.2) -- cycle;           \draw[name path global = ellp, postaction = decorate] let             \p0 = ($(P2) - (F)$),             \p1 = ($(P1) - (P2)$)           in (P2|-P1) ++ (\x1, 0) arc (0:100: \x1 and \y0);                                                \end{scope}     \end{pgfinterruptboundingbox}          \path[name path = aux1] (P2) circle [radius = 1bp];     \draw[name intersections = {of = ellp and aux1}, -latex] (P2) --     ($(intersection-2)!.75cm!(intersection-1)$);     \draw [-latex] (P2) --     ($(P2)!0.75cm!-90:($(intersection-2)!.75cm!(intersection-1)$)$);                 \end{tikzpicture}       \end{document}


title: Matrix with its name on it, of huge size

text: How can I replace the original matrix `[L]` which is of normal size with a huge one, like this figure shows (the red result is what I want): ![enter image description here](http://i.stack.imgur.com/ZVEY1.png)


title: apalike bibliographystyle:: how to quote title of each article?

text: I am using apalike biblographystile in latex. I would like to quote each article title. Currently, my latex file looks like:                \documentclass[12pt]{article}      \usepackage{apalike}      \usepackage{natbib}      \begin{document}       Here is my text followed by citation in bracket \citep{myCitation}.      \bibliographystyle{apalike}       \bibliography{myRef.bib}      \end{document}      Then my reference looks like: > Zhao, Y., Petkau, A. J., Traboulsee, A., Riddehough, A., and Li, D. K. B. > (2010). Does MRI lesion activity regress in secondary progressive multiple > sclerosis? _Multiple Sclerosis_ , 16:434-442. However, I want the article title to be: > Zhao, Y., Petkau, A. J., Traboulsee, A., Riddehough, A., and Li, D. K. B. > (2010). "Does MRI lesion activity regress in secondary progressive multiple > sclerosis?" _Multiple Sclerosis_ , 16:434-442. Is there an easy fix for this?


title: Wont display .eps image just the frame

text: I have a diagramm from matlab saved as .eps but the only thing I got is this frame with the title beneath and some greek letters inside it.(I write in Greek). ![enter image description here](http://i.stack.imgur.com/gYUrm.png) The TexMaker code for this is here:               %figure1     \begin{figure}[htbp]      \begin{center}         \includegraphics[width=.5\linewidth]{fig_1.eps}         \caption{Δειγματοληψία Ομιλίας \textbf{\textlatin{[matlab]}}}         \label{Σχήμα 1.1}     \end{center}     \end{figure}      What do I miss here? These are the packages I use:               \usepackage[english,greek]{babel}     \usepackage[english]{babel}     \usepackage[iso-8859-7]{inputenc}     \usepackage{epsfig}     \usepackage{indentfirst}     \usepackage{indentfirst}     \usepackage{graphicx}


title: How to achieve line spacing when using custom font

text: I would like to be able to determine the line spacing in the following example: ![enter image description here](http://i.stack.imgur.com/fMhxc.png) The line spacing is clearly not good. My TeX code looks as follows:               \HRule \\[0.5cm]     { \fontsize{30pt}{10cm}\neosanslight This is some random text with not enough line spacing}      \vspace{0.3cm}     \HRule \\[1.5cm]      I thought that the second argument to the `\fontsize` command would determine the line spacing, but no matter what I set it to, it does not change. My definition of the custom font looks like this:               \newfontfamily{\neosanslight}[     UprightFont={* Light},     ItalicFont={* Light Italic}]{NeoSans}      I am using XeLaTeX to be able to use the custom font. Does anyone have suggestions for a solution?