title: Prevent xtab breaking table too soon

text: Xtab breaks a long table spanning multiple pages too soon -- see my screenshot: ![Xtab breaking table too soon](http://i.stack.imgur.com/VslYG.png) The output seems rather unsightly to me. Can I make it take more of the available space? Alternatively, is there a package for long tables which produces an output in one pass, and uses available paper space more efficently? ### A little background I need a package to do a one-pass compilation of a table which could span multiple pages, for automated report generation. `supertabular` should be capable of producing a table spanning multiple pages in one pass and, as I understand it, `xtab` is an improvement over it. `longtable` package requires multiple passes (the manual mentions 4 passes) to get it right, which might make report generation too slow.


title: Use \titleformat inside \begin{document}

text: I would like to adjust section headings at some point in the document. However, `\titleformat` can only be used in preamble, something like the following fails:               \documentclass{article}     \usepackage{titlesec}          \begin{document}     \titleformat{name=\section}[display]       {\huge} % format       {} % label       {10pt} %sep       {} %before          \section{test}     \end{document}      Is it possible to adjust `\titleformat` in the middle of a document? **Edit:**               \begin{document}     \titleformat{\section}[display]       {\huge} % format       {} % label       {10pt} %sep       {} %before          \section{test}     \end{document}      works, but then how do I use `page=even` in the `\titleformat`?


title: How to get two column references with author-year style

text: Is there a way to get a two column layout for author-year-citations with a label of "(Wolfram 2002)" in the first column and "Wolfram, S. 2002. A new kind of science. Wolfram Media, Champaign, Ill." in the second column. The best I could get is the label directly followed by the reference with indentation in the following lines; with something I found, but not quite understand:               \usepackage[round, authoryear]{natbib}     \setcitestyle{aysep={}}          \makeatletter            \def\@lbibitem[#1]#2{%            \if\relax\@extra@b@citeb\relax\else            \@ifundefined{br@#2\@extra@b@citeb}{}{%            \@namedef{br@#2}{\@nameuse{br@#2\@extra@b@citeb}}}\fi            \@ifundefined{b@#2\@extra@b@citeb}{\def\NAT@num{}}{\NAT@parse{#2}}%            \item[\hfil\hyper@natanchorstart{#2\@extra@b@citeb}\citep{#2}%            \hyper@natanchorend]%            \NAT@ifcmd#1(@)(@)\@nil{#2}}     \makeatother      I am using Bibtex and pdflatex. Thanks for your help.


title: Reference to page-range -> can I avoid using 2 labels?

text: I'm quite often using references to corresponding sections or text blocks in my thesis. In consequence, I've already defined a lot of `\label{}` commands, which I tried to classify with a naming convention like `int:txt:WhatIsItAbout` for making clear, that it is in the Chapter introduction, refers to a text block and it's about ... However, all the page references only contain the page where the label is typeset. If I'm referring to a chapter or section which spans more than one page, I'd like to have a page number like **S. 23f** or **S. 23ff** By referencing **text blocks** it seems even more complicated (as the end of the range is not defined by the occurrence of the next object on the same level): I add a label somewhere, but to define a text range, I would have to define a second label at the end of the text block which would make things even more confusing. I know about the `varioref`package which can produce such "intelligent" references, but for a page range it also needs 2 labels.   (as described here: Creating a "\label" that, if necessary, spans over several pages)   * Is there a way to avoid that by e. g. defining an environment which      * can be referenced and which automatically outputs the start and end page?     * or which creates 2 labels at its beginning and at its end which are e. g. called LabelnameS and LabelnameE (for start and end) and        * can be read by either the `\vref` command with explicitly entering the 2 label names        * or by a specially defined ref command `\rangeref{Labelname}` which expands it automatically and creates the page range, if start and end are on different pages. _Remark: However, if really an environment would be used for that, it could cause problems if 2 such environments "intersect" (start of 2nd environment before end of first, but end of second environment after end end of first)._   * How do you handle that?       * Do you avoid referencing to page ranges or do you always create 2 labels?     * How do you name your labels to make them short and clear?


title: Multi-column formulas using align

text: > **Possible Duplicate:**   >  Two column align environment with one line spanning both columns I am new to the `amsmath` package, and I am using `alignat` to write a long proof, composed of a number of statements/formulas. I have two columns: the first one is for the formula, the second is for a text explanation of the formula. I also have a few very long formulas without explanation. Since these are very long, using the first column leaving the second empty is not an option. What I would like is a way of inserting multi-column formulas, in such a way that the formula uses the space of the two columns.


title: How would you go about typesetting something like this on TeXworks?

text: This is one of examples the that appears in the TeXbook (pg. 411) and I tried my hands at typseting it but couldn't. I'm a newbie and was hoping someone here could help, please? The code supposedly is:               \input concert     \tsaologo     \medskip     \centerline{Friday, November 19, 1982, 8:00 p.m.}     \bigskip     \centerline{\bf PROGRAM}     \medskip     \composition{Variations on a Theme by Tchaikovsky}     \composer{Anton S. Arensky (1861--1906)}     \smallskip     {\medtype     \movements{Tema: Moderato\cr     Var.~I: Un poco pi\`u mosso&Var.~V: Andante\cr     Var.~II: Allegro non troppo&Var.~VI: Allegro con spirito\cr     Var.~III: Andantino tranquillo&Var.~VII: Andante con moto\cr     Var.~IV: Vivace&Coda: Moderato\cr}     }     \bigskip     \composition{Concerto for Horn and Hardart, S.\,27}     \composer{P. D. Q. Bach (1807--1742)?}     \smallskip     \movements{Allegro con brillo\cr     Tema con variazione \(su un tema differente)\cr     Menuetto con panna e zucchero\cr}     \medskip     \soloists{Ben Lee User, horn\cr     Peter Schickele, hardart\cr}     \bigskip     \centerline{INTERMISSION}     \bigskip     \composition{Symphony No.\,3 in E\flat\ Major\cr     Op.\,55, ``The Eroica''\cr}     \composer{Ludwig van Beethoven (1770--1827)}     \smallskip     \movements{Allegro con brio\cr     Marcia funebre: Adagio assai\cr     Scherzo: Allegro vivace\cr     Finale: Allegro molto\cr}     \bigskip     \smalltype \noindent     Members of the audience are kindly requested to turn off the     alarms on their digital watches, and to cough only between movements.     \bye      Before entering the code (b/w the `\begin` and `\end`), this is what I type:               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{geometry}     \usepackage{graphicx}     \usepackage{calc}     \headheight -0.5in     \textheight 9.5in     \begin{document}     \end{document}      Also, these macros (or definition - I don't know if they're the same thing) are to be used too:               \def\composition#1{\halign{\bf\quad##\hfil\cr     \kern-1em#1\crcr}} % use \cr's if more than one line     \def\composer#1{\rightline{\bf#1}}     \def\movements#1{\halign{\quad\it##\hfil&&\qquad\it##\hfil\cr#1\crcr}}     \def\soloists#1{\centerline{\bf\vbox{\halign{##\hfil\cr#1\crcr}}}}      And               \def\tsaologo{\vbox{\bigtype\bf     \line{\hrulefill}     \kern-.5\baselineskip     \line{\hrulefill\phantom{ THE ST.\,ANFORD ORCHESTRA }\hrulefill}     \kern-.5\baselineskip     \line{\hrulefill\hbox{ THE ST.\,ANFORD ORCHESTRA }\hrulefill}     \kern-.5\baselineskip     \line{\hrulefill\phantom{ R. J. Drofnats, Conductor }\hrulefill}     \kern-.5\baselineskip     \line{\hrulefill\hbox{ R. J. Drofnats, Conductor }\hrulefill}     }}      * * * I've noticed that I can use some of the definitions. For example, I get an error when I try using `\tsaologo` but `\composition{Variations on a Theme by Tchaikovsky}` works fine. Also, `\centerline` command doesn't work, but just `\center`


title: How to reset chapter after each part

text: How could we reset enumeration after each part? I.e. how can we have part I with chapters 1,2,3 etc, and then part II with chapter 1,2,3 ?


title: Changing your bullet points in beamer block, maybe boadilla?

text: Can anyone give me a list of the different styles of bullets in `beamer`? I am looking for the command that will give me the typical 3d looking blue ball in a block I know where to input it in my `\item [\\...?....]` I think I'm looking for `\usepackage{boadilla}` but i don't know how to get this. help a newbie out?


title: Spacing between LaTeX Tables

text: I generated two separate tables in chapter of the appendix of all tables. Of course, LaTeX fit the two tables in the page in order to use the whole page. Instead, since they are the last two I'd like them to be at the top. Shortly, I would like to remove the blank space between two different tables and fill the bottom of the page with blank space.


title: Tweaking makebst output (chicago-style citation)

text: I've created a bst file (below) using makebst. Third time round, I've got most of what I want, except: (1) "Surname, First, 2013." should be "Surname, First. 2013." (Fullstop, not comma, between names and year.) (2) "Surname1, First1 and First2 Surname2" should be "Surname1, First1, and First2 Surname2". (I.e., comma before "and" in two-author citations.) (Note that triple authored items display correctly as "Surname1, First1; First2 Surname2; and First3 Surname3".) (3) In-text citation of dual authored pieces should occur with ampersand (even though "and", not ampersand, occurs in the references section): "Surname1 & Surname2 2013", not "Surname1 and Surname2 2013". (4) In-text citation of triple authored pieces (and quadruple authored ones, etc.) should appear with "et al." (i.e., "Surname1 et al. 2013", not "Surname1, Surname2, and Surname3 2013"). How can I tweak the bst file to achieve these? (I think that some of them aren't explicit options when you process makebst.)               ENTRY       { address         author         booktitle         chapter         edition         editor         eid         howpublished         institution         journal         key         month         note         number         organization         pages         publisher         school         series         title         type         volume         year       }       {}       { label extra.label sort.label short.list }     INTEGERS { output.state before.all mid.sentence after.sentence after.block }     FUNCTION {init.state.consts}     { #0 'before.all :=       #1 'mid.sentence :=       #2 'after.sentence :=       #3 'after.block :=     }     STRINGS { s t}     FUNCTION {output.nonnull}     { 's :=       output.state mid.sentence =         { ", " * write$ }         { output.state after.block =             { add.period$ write$               newline$               "\newblock " write$             }             { output.state before.all =                 'write$                 { add.period$ " " * write$ }               if$             }           if$           mid.sentence 'output.state :=         }       if$       s     }     FUNCTION {output}     { duplicate$ empty$         'pop$         'output.nonnull       if$     }     FUNCTION {output.check}     { 't :=       duplicate$ empty$         { pop$ "empty " t * " in " * cite$ * warning$ }         'output.nonnull       if$     }     FUNCTION {fin.entry}     { add.period$       write$       newline$     }          FUNCTION {new.block}     { output.state before.all =         'skip$         { after.block 'output.state := }       if$     }     FUNCTION {new.sentence}     { output.state after.block =         'skip$         { output.state before.all =             'skip$             { after.sentence 'output.state := }           if$         }       if$     }     FUNCTION {add.blank}     {  " " * before.all 'output.state :=     }          FUNCTION {no.blank.or.punct}     {  "\hspace{0pt}" * before.all 'output.state :=     }          FUNCTION {date.block}     {       new.block     }          FUNCTION {not}     {   { #0 }         { #1 }       if$     }     FUNCTION {and}     {   'skip$         { pop$ #0 }       if$     }     FUNCTION {or}     {   { pop$ #1 }         'skip$       if$     }     FUNCTION {new.block.checkb}     { empty$       swap$ empty$       and         'skip$         'new.block       if$     }     FUNCTION {field.or.null}     { duplicate$ empty$         { pop$ "" }         'skip$       if$     }     FUNCTION {emphasize}     { duplicate$ empty$         { pop$ "" }         { "\emph{" swap$ * "}" * }       if$     }     FUNCTION {scaps}     { duplicate$ empty$         { pop$ "" }         { "\textsc{" swap$ * "}" * }       if$     }     FUNCTION {bib.name.font}     { scaps }     FUNCTION {bib.fname.font}     { bib.name.font }     FUNCTION {tie.or.space.prefix}     { duplicate$ text.length$ #3 <         { "~" }         { " " }       if$       swap$     }          FUNCTION {capitalize}     { "u" change.case$ "t" change.case$ }          FUNCTION {space.word}     { " " swap$ * " " * }      % Here are the language-specific definitions for explicit words.      % Each function has a name bbl.xxx where xxx is the English word.      % The language selected here is ENGLISH     FUNCTION {bbl.and}     { "and"}          FUNCTION {bbl.etal}     { "et~al." }          FUNCTION {bbl.editors}     { "eds." }          FUNCTION {bbl.editor}     { "ed." }          FUNCTION {bbl.edby}     { "edited by" }          FUNCTION {bbl.edition}     { "edition" }          FUNCTION {bbl.volume}     { "volume" }          FUNCTION {bbl.of}     { "of" }          FUNCTION {bbl.number}     { "number" }          FUNCTION {bbl.nr}     { "no." }          FUNCTION {bbl.in}     { "in" }          FUNCTION {bbl.pages}     { "" }          FUNCTION {bbl.page}     { "" }          FUNCTION {bbl.chapter}     { "chapter" }          FUNCTION {bbl.techrep}     { "Technical Report" }          FUNCTION {bbl.mthesis}     { "Master's thesis" }          FUNCTION {bbl.phdthesis}     { "Ph.D. thesis" }          FUNCTION {bibinfo.check}     { swap$       duplicate$ missing$         {           pop$ pop$           ""         }         { duplicate$ empty$             {               swap$ pop$             }             { swap$               pop$             }           if$         }       if$     }     FUNCTION {bibinfo.warn}     { swap$       duplicate$ missing$         {           swap$ "missing " swap$ * " in " * cite$ * warning$ pop$           ""         }         { duplicate$ empty$             {               swap$ "empty " swap$ * " in " * cite$ * warning$             }             { swap$               pop$             }           if$         }       if$     }     INTEGERS { nameptr namesleft numnames }               STRINGS  { bibinfo}          FUNCTION {format.names}     { 'bibinfo :=       duplicate$ empty$ 'skip$ {       's :=       "" 't :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr           duplicate$ #1 >             { "{ff~}{vv~}{ll}{, jj}" }             { "{vv~}{ll}{, ff}{, jj}" }           if$           format.name$           bib.name.font           bibinfo bibinfo.check           't :=           nameptr #1 >             {               namesleft #1 >                 { "; " * t * }                 {                   s nameptr "{ll}" format.name$ duplicate$ "others" =                     { 't := }                     { pop$ }                   if$                   numnames #2 >                   t "others" = not and                     { ";" * }                     'skip$                   if$                   t "others" =                     {                       " " * bbl.etal bib.name.font *                     }                     {                       bbl.and                       space.word * t *                     }                   if$                 }               if$             }             't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$       } if$     }     FUNCTION {format.names.ed}     {       'bibinfo :=       duplicate$ empty$ 'skip$ {       's :=       "" 't :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr           "{ff~}{vv~}{ll}{, jj}"           format.name$           bibinfo bibinfo.check           't :=           nameptr #1 >             {               namesleft #1 >                 { "; " * t * }                 {                   s nameptr "{ll}" format.name$ duplicate$ "others" =                     { 't := }                     { pop$ }                   if$                   numnames #2 >                   t "others" = not and                     { ";" * }                     'skip$                   if$                   t "others" =                     {                            " " * bbl.etal *                     }                     {                       bbl.and                       space.word * t *                     }                   if$                 }               if$             }             't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$       } if$     }     FUNCTION {format.key}     { empty$         { key field.or.null }         { "" }       if$     }          FUNCTION {format.authors}     { author "author" format.names     }     FUNCTION {get.bbl.editor}     { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }          FUNCTION {format.editors}     { editor "editor" format.names duplicate$ empty$ 'skip$         {           "," *           " " *           get.bbl.editor           *         }       if$     }     FUNCTION {format.note}     {      note empty$         { "" }         { note #1 #1 substring$           duplicate$ "{" =             'skip$             { output.state mid.sentence =               { "l" }               { "u" }             if$             change.case$             }           if$           note #2 global.max$ substring$ * "note" bibinfo.check         }       if$     }          FUNCTION {format.title}     { title       duplicate$ empty$ 'skip$         { "t" change.case$ }       if$       "title" bibinfo.check     }     FUNCTION {format.full.names}     {'s :=      "" 't :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr           "{vv~}{ll}" format.name$           't :=           nameptr #1 >             {               namesleft #1 >                 { ", " * t * }                 {                   s nameptr "{ll}" format.name$ duplicate$ "others" =                     { 't := }                     { pop$ }                   if$                   t "others" =                     {                       " " * bbl.etal *                     }                     {                       numnames #2 >                         { "," * }                         'skip$                       if$                       bbl.and                       space.word * t *                     }                   if$                 }               if$             }             't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$     }          FUNCTION {author.editor.key.full}     { author empty$         { editor empty$             { key empty$                 { cite$ #1 #3 substring$ }                 'key               if$             }             { editor format.full.names }           if$         }         { author format.full.names }       if$     }          FUNCTION {author.key.full}     { author empty$         { key empty$              { cite$ #1 #3 substring$ }               'key           if$         }         { author format.full.names }       if$     }          FUNCTION {editor.key.full}     { editor empty$         { key empty$              { cite$ #1 #3 substring$ }               'key           if$         }         { editor format.full.names }       if$     }          FUNCTION {make.full.names}     { type$ "book" =       type$ "inbook" =       or         'author.editor.key.full         { type$ "proceedings" =             'editor.key.full             'author.key.full           if$         }       if$     }          FUNCTION {output.bibitem}     { newline$       "\bibitem[" write$       "\protect\citeauthoryear{" make.full.names * "}{" * write$       label write$       "}{" year duplicate$ empty$         { pop$ "????" }         'skip$       if$       * extra.label * "}]{" * write$       cite$ write$       "}" write$       newline$       ""       before.all 'output.state :=     }          FUNCTION {n.dashify}     {       't :=       ""         { t empty$ not }         { t #1 #1 substring$ "-" =             { t #1 #2 substring$ "--" = not                 { "--" *                   t #2 global.max$ substring$ 't :=                 }                 {   { t #1 #1 substring$ "-" = }                     { "-" *                       t #2 global.max$ substring$ 't :=                     }                   while$                 }               if$             }             { t #1 #1 substring$ *               t #2 global.max$ substring$ 't :=             }           if$         }       while$     }          FUNCTION {word.in}     { "" }          FUNCTION {format.date}     { year "year" bibinfo.check duplicate$ empty$         {           "empty year in " cite$ * "; set to ????" * warning$            pop$ "????"         }         'skip$       if$       extra.label *     }     FUNCTION {format.btitle}     { title "title" bibinfo.check       duplicate$ empty$ 'skip$         {           emphasize         }       if$     }     FUNCTION {either.or.check}     { empty$         'pop$         { "can't use both " swap$ * " fields in " * cite$ * warning$ }       if$     }     FUNCTION {format.bvolume}     { volume empty$         { "" }         { bbl.volume volume tie.or.space.prefix           "volume" bibinfo.check * *           series "series" bibinfo.check           duplicate$ empty$ 'pop$             { swap$ bbl.of space.word * swap$               emphasize * }           if$           "volume and number" number either.or.check         }       if$     }     FUNCTION {format.number.series}     { volume empty$         { number empty$             { series field.or.null }             { series empty$                 { number "number" bibinfo.check }                 { output.state mid.sentence =                     { bbl.number }                     { bbl.number capitalize }                   if$                   number tie.or.space.prefix "number" bibinfo.check * *                   bbl.in space.word *                   series "series" bibinfo.check *                 }               if$             }           if$         }         { "" }       if$     }          FUNCTION {format.edition}     { edition duplicate$ empty$ 'skip$         {           output.state mid.sentence =             { "l" }             { "t" }           if$ change.case$           "edition" bibinfo.check           " " * bbl.edition *         }       if$     }     INTEGERS { multiresult }     FUNCTION {multi.page.check}     { 't :=       #0 'multiresult :=         { multiresult not           t empty$ not           and         }         { t #1 #1 substring$           duplicate$ "-" =           swap$ duplicate$ "," =           swap$ "+" =           or or             { #1 'multiresult := }             { t #2 global.max$ substring$ 't := }           if$         }       while$       multiresult     }     FUNCTION {format.pages}     { pages duplicate$ empty$ 'skip$         { duplicate$ multi.page.check             {               n.dashify             }             {             }           if$           "pages" bibinfo.check         }       if$     }     FUNCTION {format.journal.pages}     { pages duplicate$ empty$ 'pop$         { swap$ duplicate$ empty$             { pop$ pop$ format.pages }             {               ":" *               swap$               n.dashify               "pages" bibinfo.check               *             }           if$         }       if$     }     FUNCTION {format.journal.eid}     { eid "eid" bibinfo.check       duplicate$ empty$ 'pop$         { swap$ duplicate$ empty$ 'skip$           {               ":" *           }           if$           swap$ *         }       if$     }     FUNCTION {format.vol.num.pages}     { volume field.or.null       duplicate$ empty$ 'skip$         {           "volume" bibinfo.check         }       if$       eid empty$         { format.journal.pages }         { format.journal.eid }       if$     }          FUNCTION {format.chapter.pages}     { chapter empty$         'format.pages         { type empty$             { bbl.chapter }             { type "l" change.case$               "type" bibinfo.check             }           if$           chapter tie.or.space.prefix           "chapter" bibinfo.check           * *           pages empty$             'skip$             { ", " * format.pages * }           if$         }       if$     }          FUNCTION {format.booktitle}     {       booktitle "booktitle" bibinfo.check       emphasize     }     FUNCTION {format.in.ed.booktitle}     { format.booktitle duplicate$ empty$ 'skip$         {           editor "editor" format.names.ed duplicate$ empty$ 'pop$             {               bbl.edby               " " * swap$ *               swap$               "," *               " " * swap$               * }           if$           word.in swap$ *         }       if$     }     FUNCTION {format.thesis.type}     { type duplicate$ empty$         'pop$         { swap$ pop$           "t" change.case$ "type" bibinfo.check         }       if$     }     FUNCTION {format.tr.number}     { number "number" bibinfo.check       type duplicate$ empty$         { pop$ bbl.techrep }         'skip$       if$       "type" bibinfo.check       swap$ duplicate$ empty$         { pop$ "t" change.case$ }         { tie.or.space.prefix * * }       if$     }     FUNCTION {format.article.crossref}     {       word.in       " \cite{" * crossref * "}" *     }     FUNCTION {format.book.crossref}     { volume duplicate$ empty$         { "empty volume in " cite$ * "'s crossref of " * crossref * warning$           pop$ word.in         }         { bbl.volume           capitalize           swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *         }       if$       " \cite{" * crossref * "}" *     }     FUNCTION {format.incoll.inproc.crossref}     {       word.in       " \cite{" * crossref * "}" *     }     FUNCTION {format.org.or.pub}     { 't :=       ""       address empty$ t empty$ and         'skip$         {           address "address" bibinfo.check *           t empty$             'skip$             { address empty$                 'skip$                 { ": " * }               if$               t *             }           if$         }       if$     }     FUNCTION {format.publisher.address}     { publisher "publisher" bibinfo.warn format.org.or.pub     }          FUNCTION {format.organization.address}     { organization "organization" bibinfo.check format.org.or.pub     }          FUNCTION {article}     { output.bibitem       format.authors "author" output.check       author format.key output       format.date "year" output.check       date.block       format.title "title" output.check       new.block       crossref missing$         {           journal           "journal" bibinfo.check           emphasize           "journal" output.check           add.blank           format.vol.num.pages output         }         { format.article.crossref output.nonnull           format.pages output         }       if$       new.block       format.note output       fin.entry     }     FUNCTION {book}     { output.bibitem       author empty$         { format.editors "author and editor" output.check           editor format.key output         }         { format.authors output.nonnull           crossref missing$             { "author and editor" editor either.or.check }             'skip$           if$         }       if$       format.date "year" output.check       date.block       format.btitle "title" output.check       crossref missing$         { format.bvolume output           new.block           format.number.series output           new.sentence           format.publisher.address output         }         {           new.block           format.book.crossref output.nonnull         }       if$       format.edition output       new.block       format.note output       fin.entry     }     FUNCTION {booklet}     { output.bibitem       format.authors output       author format.key output       format.date "year" output.check       date.block       format.title "title" output.check       new.block       howpublished "howpublished" bibinfo.check output       address "address" bibinfo.check output       new.block       format.note output       fin.entry     }          FUNCTION {incollection}     { output.bibitem       format.authors "author" output.check       author format.key output       format.date "year" output.check       date.block       format.title "title" output.check       new.block       crossref missing$         { format.in.ed.booktitle "booktitle" output.check           format.bvolume output           format.number.series output           format.chapter.pages output           new.sentence           format.publisher.address output           format.edition output         }         { format.incoll.inproc.crossref output.nonnull           format.chapter.pages output         }       if$       new.block       format.note output       fin.entry     }          FUNCTION {misc}     { output.bibitem       format.authors output       author format.key output       format.date "year" output.check       date.block       format.title output       new.block       howpublished "howpublished" bibinfo.check output       new.block       format.note output       fin.entry     }          INTEGERS { len }     FUNCTION {chop.word}     { 's :=       'len :=       s #1 len substring$ =         { s len #1 + global.max$ substring$ }         's       if$     }     FUNCTION {format.lab.names}     { 's :=       "" 't :=       s #1 "{vv~}{ll}" format.name$       s num.names$ duplicate$       #2 >         { pop$           " " * bbl.etal *         }         { #2 <             'skip$             { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =                 {                   " " * bbl.etal *                 }                 { bbl.and space.word * s #2 "{vv~}{ll}" format.name$                   * }               if$             }           if$         }       if$     }          FUNCTION {author.key.label}     { author empty$         { key empty$             { cite$ #1 #3 substring$ }             'key           if$         }         { author format.lab.names }       if$     }          FUNCTION {author.editor.key.label}     { author empty$         { editor empty$             { key empty$                 { cite$ #1 #3 substring$ }                 'key               if$             }             { editor format.lab.names }           if$         }         { author format.lab.names }       if$     }          FUNCTION {editor.key.label}     { editor empty$         { key empty$             { cite$ #1 #3 substring$ }             'key           if$         }         { editor format.lab.names }       if$     }          FUNCTION {calc.short.authors}     { type$ "book" =       type$ "inbook" =       or         'author.editor.key.label         { type$ "proceedings" =             'editor.key.label             'author.key.label           if$         }       if$       'short.list :=     }          FUNCTION {calc.label}     { calc.short.authors       short.list       ", "       *       year duplicate$ empty$       short.list key field.or.null = or          { pop$ "" }          'skip$       if$       *       'label :=     }          FUNCTION {calc.short.label}     { calc.short.authors short.list       'label :=     }     FUNCTION {sort.format.names}     { 's :=       #1 'nameptr :=       ""       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr           "{ll{ }}{  f{ }}{  jj{ }}"           format.name$ 't :=           nameptr #1 >             {               "   "  *               namesleft #1 = t "others" = and                 { "zzzzz" * }                 { t sortify * }               if$             }             { t sortify * }           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$     }          FUNCTION {sort.format.title}     { 't :=       "A " #2         "An " #3           "The " #4 t chop.word         chop.word       chop.word       sortify       #1 global.max$ substring$     }     FUNCTION {author.sort}     { author empty$         { key empty$             { "to sort, need author or key in " cite$ * warning$               ""             }             { key sortify }           if$         }         { author sort.format.names }       if$     }     FUNCTION {author.editor.sort}     { author empty$         { editor empty$             { key empty$                 { "to sort, need author, editor, or key in " cite$ * warning$                   ""                 }                 { key sortify }               if$             }             { editor sort.format.names }           if$         }         { author sort.format.names }       if$     }     FUNCTION {editor.sort}     { editor empty$         { key empty$             { "to sort, need editor or key in " cite$ * warning$               ""             }             { key sortify }           if$         }         { editor sort.format.names }       if$     }     FUNCTION {presort}     { calc.label       label sortify       "    "       *       type$ "book" =       type$ "inbook" =       or         'author.editor.sort         { type$ "proceedings" =             'editor.sort             'author.sort           if$         }       if$       #1 entry.max$ substring$       'sort.label :=       sort.label       *       "    "       *       title field.or.null       sort.format.title       *       #1 entry.max$ substring$       'sort.key$ :=     }          ITERATE {presort}     SORT     STRINGS { last.label next.extra }     INTEGERS { last.extra.num number.label }     FUNCTION {initialize.extra.label.stuff}     { #0 int.to.chr$ 'last.label :=       "" 'next.extra :=       #0 'last.extra.num :=       #0 'number.label :=     }     FUNCTION {forward.pass}     { last.label label =         { last.extra.num #1 + 'last.extra.num :=           last.extra.num int.to.chr$ 'extra.label :=         }         { "a" chr.to.int$ 'last.extra.num :=           "" 'extra.label :=           label 'last.label :=         }       if$       number.label #1 + 'number.label :=     }     FUNCTION {reverse.pass}     { next.extra "b" =         { "a" 'extra.label := }         'skip$       if$       extra.label 'next.extra :=       extra.label       duplicate$ empty$         'skip$         { "{\natexlab{" swap$ * "}}" * }       if$       'extra.label :=     }     EXECUTE {initialize.extra.label.stuff}     ITERATE {forward.pass}     REVERSE {reverse.pass}     FUNCTION {bib.sort.order}     { sort.label       "    "       *       year field.or.null sortify       *       "    "       *       title field.or.null       sort.format.title       *       #1 entry.max$ substring$       'sort.key$ :=       calc.short.label     }     ITERATE {bib.sort.order}     SORT     FUNCTION {begin.bib}     { preamble$ empty$         'skip$         { preamble$ write$ newline$ }       if$       "\begin{thebibliography}{" number.label int.to.str$ * "}" *       write$ newline$       "\providecommand{\natexlab}[1]{#1}"       write$ newline$     }     EXECUTE {begin.bib}     EXECUTE {init.state.consts}     ITERATE {call.type$}     FUNCTION {end.bib}     { newline$       "\end{thebibliography}" write$ newline$     }     EXECUTE {end.bib}


title: Unnumbered sections and section marks

text: In my document I have numbered and unnumbered sections. Unnumbered sections look like this:               \section*{Introduction}      I use fancyhdr and add section and subsection marks like this.               \pagestyle{fancy}     \fancyhf{} % clear all header and footers     \renewcommand{\sectionmark}[1]{\markboth{\thesection\ #1}{}}     \renewcommand{\subsectionmark}[1]{\markright{\thesubsection\ #1}}     \fancyhead[L]{\rule[-0.25in]{0pt}{0.25in}\parbox{0.9\textwidth}{%       \hdrfont\textbf{\leftmark\\\rightmark}}}     \fancyhead[R]{\hdrfont\thepage\ /~\pageref{LastPage}}     \fancyfoot[L]{\rule[-0.25in]{0pt}{0.25in}\parbox{0.9\textwidth}{%       \hdrfont\textbf{\leftmark\\\rightmark}}}     \fancyfoot[R]{\hdrfont\thepage\ /~\pageref{LastPage}}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}      As a result, the unnumbered sections are ignored in headers. I tried to use this command in unnumbered sections               \sectionmark{Introduction}      Now, I have 0 index for these sections in headers. How to fix this? Any solutions to create unnumbered section which would be treated as numbered ones (without sectionmark, addcontentsline, ...)? MWE               \documentclass[12pt]{article}          \usepackage{lipsum}     \usepackage{fancyhdr}          % -----------------------------------------------------------------------------     \pagestyle{fancy}     \fancyhf{} % clear all header and footers     \renewcommand{\sectionmark}[1]{\markboth{\thesection\ #1}{}}     \renewcommand{\subsectionmark}[1]{\markright{\thesubsection\ #1}}     \fancyhead[L]{\rule[-0.25in]{0pt}{0.25in}\parbox{0.9\textwidth}{%       \textbf{\leftmark\\\rightmark}}}     \fancyhead[R]{\thepage}     \fancyfoot[L]{\rule[-0.25in]{0pt}{0.25in}\parbox{0.9\textwidth}{%       \textbf{\leftmark\\\rightmark}}}     \fancyfoot[R]{ \thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}          \begin{document}     \tableofcontents     \section{Section1}     \lipsum[4-8]     \newpage     \section*{Section2}     \lipsum[4-8]     \newpage     \section{Section3}     \lipsum[4-8]     \newpage     \section*{Section4}     \lipsum[4-8]     \end{document}


title: Difficulty with icelandic characters in bibliography/apacite

text: I have a problem with getting my icelandic characters to show up when I compile. I´m using texstudio and I used jabref for being the reference manager and I´m using apacite for the citing "system" Everything seems to good except my icelandic characters do not show up, I get errors in everything I try to do. Ive tried using just plain bibtex, I´ve tried biblatex and I just get more and more errors... anyways here´s my code in full, it´s not long.               \documentclass[12pt]{article} % Default font size is 12pt, it can be changed here               \usepackage[T1]{fontenc}      \usepackage[utf8]{inputenc}      \usepackage[icelandic]{babel}     \usepackage{color}     \usepackage{amsmath}      \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}     \usepackage{graphicx} % Required for including pictures     \usepackage{apacite}          \geometry{a4paper} % Set the page size to be A4 as opposed to the default US Letter     \usepackage{float} % Allows putting an [H] in \begin{figure} to specify the exact location of the figure     \usepackage{wrapfig} % Allows in-line images such as the example fish picture     \usepackage[shortlabels]{enumitem}     \usepackage{caption}     \usepackage{multicol}     \linespread{1.2} % Line spacing          %\setlength\parindent{0pt} % Uncomment to remove all indentation from paragraphs          \graphicspath{{Pictures/}} % Specifies the directory where pictures are stored     \renewcommand{\topfraction}{.9}     \renewcommand{\bottomfraction}{.9}     \renewcommand{\textfraction}{.1}     \begin{document}               \section{Results} % Sub-section     %------------------------------------------------               \bibliographystyle{apacite}     \bibliography{heimildir2}          \end{multicols}          \end{document}      the errors I get with this are the following.               line 21: Package inputenc Error: Unicode char \u8:�s not set up for use with LaTeX stadall, IST EN 12464-1:2011}}}          : No suitable language definition file (icelandic.apc) found.     line 120: Underfull \hbox (badness 10000) in paragraph      Any ideas? UPDATE: Heres what heimildir2.bib looks like               % This file was created with JabRef 2.9.2.     % Encoding: Cp1252          @BOOK{lysingartaekni,       title = {Kennslubók i Lýsingartækni},       publisher = {IÐNÚ},       year = {2006},       author = {Leif Wall},       owner = {Axel Sig},       timestamp = {2014.02.02}     }          @ARTICLE{journal1,       author = {WJM van Bommel Professor lr, GJ van den Beld lr},       title = {Lighting for work: a review of visual and biological effects},       journal = {Lighting research and technology},       year = {2004},       volume = {36,4},       pages = {255-269},       owner = {Axel Sig},       timestamp = {2014.02.02}     }          @comment{jabref-meta: fileDirectory:C:\\Users\\Axel Sig\\Dropbox\\2man     na möppur\\Andri, Axel, Orri\\Aðferðarfræði\\Skýrsla;}          @comment{jabref-meta: pdfDirectory:C:\\Users\\Axel Sig\\Dropbox\\2mann     a möppur\\Andri, Axel, Orri\\Aðferðarfræði\\Skýrsla;}      and there´s more to come.


title: kozuka gothic pro L

text: I would like to use this font for LateX MikTeX distribution. How do I go about it ? I have very limited experience with using different fonts or changing fonts. Is this font available ? if not, I would be very grateful for any other input.


title: Changing Listing and Figure caption system in Platex

text: I'm working with platex (the Japanese latex compiler) and I'm trying to change the caption system for Listings and Figures. For both I would like the numbering to be based on section so if its a figure or Listing in section 2 I want it to be in the style of 2.1 Also I want to change the tag Listing to list. The doctype I'm using is jarticle because its the only type I found that works with Japanese letters. Any advice would be much appreciated. An example of my current code is as follows               \documentclass[a4paper]{jarticle}     \usepackage{listings}     \usepackage[dvipdfm]{graphicx}     \title{title}     \author{name}     \begin{document}     \begin{titlepage}     \maketitle     \vfill     \tableofcontents     \end{titlepage}          \section{Basics}     \normalsize     \begin{figure}[ht]     \centering     \includegraphics[width=200pt]{1.eps}     \caption{some caption}%     \end{figure}          \section{Bar}     \normalsize     \scriptsize     \lstset{numbers=left, stepnumber=5, caption={text}, escapeinside={\%*}{*)}, frame=single, tabsize=2}     \begin{lstlisting}     code here     \end{lstlisting}          \end{document}


title: Setting latexmk or arara on Windows 7 and MikTeX to be used with TeXworks

text: I am using Windows 7, MikTeX and TeXworks. I would like to set up either latexmk or arara to achieve   * xelatex processing   * continuous preview of pdf    * removal of intermediate file.  Kindly explain stepwise how can I setup either of these tools to achieve this?


title: How to use arara with TeXworks

text: I'm trying to use arara with TeXworks in Ubuntu 12.10 (TeX Live 2012). I've been searching all over the web but couldn't get it working. First: I'm not sure how to correctly implement arara: Should it already come with TeX Live 2012? If no, how can I install it right? (I tried to install it using the `.jar` file and add a symbolic link to arara in `/usr/local/bin`.) Second: How do I tell TeXworks to run arara? (I added a Processing tool in Preferences-Typesetting with `/usr/local/bin/arara` as program, but TeXworks tells me that the program can't be found) I'm kind of stuck and don't know at which point I did wrong. Any help is appreciated!


title: Gedit LaTeX plugin: How to get bibtex and makeindex to compile too?

text: I have been using the Gedit LaTeX plugin for over a year now, but I recently converted my references to bibtex. It is my understanding that the plugin should run `bibtex` and `makeindex` automatically, but I have not found that. I have `thesis.tex`, so once I have compiled in Gedit I have to run:               bibtex thesis       and then               makeindex -o thesis.and thesis.adx      Which then produces the final PDF perfectly. Any ideas on how to integrate this process into the Gedit LaTeX plugin so it happens automatically? It is not that using these commands is difficult (it is not), but that it seems that they should be run by Gedit when they are not. Just to add: I am running Ubuntu 10.04, Rubber 1.1, Gedit 2.30.3, pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)


title: memoir class with subcaption and hyperref packages

text: This is similar to this question about using subfigures in memoir class and this one about using subfigure memoir and hyperref together Is it possible to use memoir class with sucaption package? I tried dissemulating the `ccaption` packages but it doesn't work. `\DisemulatePackage{ccaption}`               \documentclass[a4paper,12pt,fleqn,openany]{memoir}          \usepackage{caption}     \usepackage{subcaption}     \begin{document}          \begin{figure}             \begin{subfigure}[b]{.5\linewidth}             \centering\large A             \caption{A subfigure}\label{fig:1a}         \end{subfigure}%         \begin{subfigure}[b]{.5\linewidth}             \centering\large B             \caption{Another subfigure}\label{fig:1b}         \end{subfigure}         \caption{A figure}\label{fig:1}     \end{figure}          \end{document}      I get the following error > LaTeX Error: Command \subcaption already defined. > > LaTeX Error: Command \subfloat already defined. any ideas? ## Update This doesn't work with `hyperref`... Adding \usepackage{hyperref} leads to compilation errors. So the new question is, is it possible to use memoir class with sucaption and hyperref packages? Are the 3 packages compatible?


title: tkz-fct: error message when plotting tangent line

text: I tried to plot tangent lines to the graph of a function using tkz-fct. See the example below. However I get the following error message:               ERROR: Use of \tkz@DrawTangentLine doesn't match its definition.          --- TeX said ---     \pgfutil@ifnextchar ...1\def \pgfutil@reserved@a {                                                   #2}\def \pgfutil@reserved@...      l.17       \tkzDrawTangentLine[draw](4)      Any idea what's wrong with my code? The example:               \documentclass{article}     \usepackage{tikz}     \usepackage{tkz-fct}     \usetkzobj{all}                   \begin{document}                 \begin{tikzpicture}[xscale=1]               \tikzset{tan style/.style={-}}               \tkzInit[xmin=0,xmax=10,xstep=1,               ymin=0,ymax=5,ystep=1]               \tkzGrid[color=brown,sub,subxstep=50,subystep=200]               \tkzAxeXY               \tkzFct[color=red,samples=100,domain = 0:10]{sqrt(1/2.*\x) + sin(1/2.*\x)}               \tkzDrawTangentLine[draw](4)            \end{tikzpicture}         \end{document}


title: tkz-fct: control ticks of x-axis

text: In tkz-fct, the command `\tkzDrawX` draws the x-axis. Is there an option to control the size of the ticks on this axis? Is it possible to draw the axis even without ticks at all?


title: Custom draws in matrix nodes in tikz v3 with referencing

text: With tikz v3 the matrix behavior has changed slightly. The great example at http://www.texample.net/tikz/examples/BER-measurement/ doesn't seem to compile any longer. The problem is that the default naming of matrix nodes as m-1-1 etc. is now overridden. My question is what would be a good replacement in defining custom node shapes, such as the filter or polarization controller in the example? A way that would keep the matrix element referencing usable. I've searched through some questions related to this problem, and I've found two possible solutions, albeit not satisfactory:   1. Defining custom node styles. This is clearly much more cumbersome approach than before in the example.    2. Nesting `\begin{tikzpicture}customshapehere\end{tikzpicture}` inside the node. However, then the connection behavior of the matrix nodes changes. It also seems that there is a margin between the edge of the nested tikzpicture and the node.


title: What packages do I need to install in Linux for running Latex?

text: I want to know how does Latex work in Linux? What packages do I need to install to use Latex? Thanks.


title: Localizing bibliography without babelbib

text: The gist of my problem is that Slovene isn't supported in babelbib. I've got a half-done .bst file which translates some of the needed words, but not all of them. I also noted there exists a slovene.mbs file in miktex. However, when I tried creating a new bibliography style with makebst, I still didn't get the words translated. Since my bibliography is pretty simple - the only thing I'm missing is translation for 'edition' - I felt it would be best if I edited the existing .bst. How do I go about that?


title: Misalignment of multi-line questions with 3-digit question numbers (exam class)

text: I'm creating a large question paper using the `exam` package, with over 100 questions. The problem is that for question numbers over 100, the extra digit causes multi-line questions to misalign, with the lines after the first coming slightly under the last digit of the question number. An example of what I mean: ![enter image description here](http://i.stack.imgur.com/gtQ0I.png) Is there some way to edit the margin space in which the question number appears to fix this misalignment?


title: Using TikZ to draw Mayan numerals

text: I am looking for a way to draw Maya numerals using TikZ. What I want is a macro `\maya{21}` that gives me a graphical representation of the number 21 in the Mayan numeral system. There is the package `mathabx` that provides something like this. But I can not use it, because I am using `mnsymbol` and there are some compatibility issues. The following picture shows the symbols for each number in the maya system: ![Maya numeral system](http://upload.wikimedia.org/wikipedia/commons/1/1b/Maya.svg) MWE:               \documentclass[border=0.125cm]{standalone}     \usepackage{tikz}          \begin{document}       How to do it?     \end{document}


title: Why is the width in nwu-lecture-style not working?

text: It seems that the code in `nwu-lecture-style`:               \insertshortauthor[width=2cm-2pt,center,respectlinebreaks]\par%      is not working? I tried:               \insertshortauthor[width=2cm minus 2pt,center,respectlinebreaks]\par%      It is not working neither, how to solve it?


title: Gnuplot inside LaTeX not working

text: I'm trying to create a gnuplot image inside my LaTeX document, but nothing is being displayed. My gnuplot works if I do it outside LaTeX.               \begin{figure}[!ht]     \begin{gnuplot}[terminal=pdf, terminaloptions=color, scale=0.9]     set title 'Laptop Steps'     set datafile separator ','     set xlabel 'Query'     set ylabel 'Average time in ms(100 executions)'     set xrange [0:21]     set xtics 1,1,20     set logscale y     set grid ytics lt 0 lw 1 lc rgb '#bbbbbb'     set grid xtics lt 0 lw 1 lc rgb '#bbbbbb'     set key samplen 2 spacing .5 font ',8'     show grid     set style fill solid 0.8 border -1     set boxwidth 0.5 relative     plot for [i=1:14] 'benchmarks/basex-steps-laptop-transposed.csv' u (\$0+1):i title ''.i.'00    kb' with linespoints     \end{gnuplot}                   \end{figure}      I'm using vim with the latex plugin. The structure of my project is:               main       |-chapters/the-file-with-the-gnuplot-code       |-benchmarks/benchmark-file.csv      For gnuplot I have this in my document:               \usepackage{gnuplottex}     \usepackage{epstopdf}      I only get the warning: > Package gnuplottex Warning: Please convert thesis-gnuplottex-fig1.gnuplot > manually Does anyone have an idea what I'm doing wrong?


title: How to make brackets larger?

text: How can the first `{` and last `}` in the following be made larger?                 $A =\left \{a \notin\{1, 2\}, \ b\notin \{4,5\}\right\}$.


title: Print frames rather than boxes with demo/draft version of graphics/graphicx

text: I recently switched to `demo` such that I could compile my `.tex` file without needing the actual image files. Now, instead of the image there is a black box. Is there anyway to get a black border such that when I am printing copies of this I don't waste precious black ink.


title: Strange behaviour of \closing in koma-script scrlttr2 class

text: I'm having some trouble with the command `\closing{\closingphrase}`. If `\closingphrase` is longer (e.g. 'Met vriendelijke groet'), the closing phrase is aligned left and the signature is indented. This is the correct placing of the elements which conforms to the example in the Koma-script manual. But if `\closingphrase` is relatively short (e.g. 'Hoogachtend'), the closing phrase is indented and the signature is aligned left, which looks very strange. As it is customary in Dutch to end a formal letter with 'Hoogachtend' I'd like to prevent this from happening. Can anyone explain this behaviour and help me prevent it? **Example of strange alignment**               \documentclass[DIN,paper=a4,fontsize=11pt]{scrlttr2}          \usepackage[dutch]{babel}          \def\afzender{Richard Kranendonk}     \def\ondertekening{Cheers}     \setkomavar{signature}{\afzender}          \begin{document}     \begin{letter}          Dear Sir,          This is a minimal test letter.           \closing{\ondertekening,}     \end{letter}     \end{document}


title: Writing French characters

text: This question is (almost) exactly the same as this one : How to write directly French characters in Emacs and print them in LaTeX? You may read his question instead of mine, the only difference (I spotted) is that the OP uses Emacs and I use Windows Vista and Miktex. **I have tried the proposed solution, but it doesn't work on my computer**. Unfortunately, I can't post comments below the answer. I am using Miktex (on Windows Vista) which I only recently downloaded ("complete" version). I have encountered problems with special characters. I can't write é,è,à... directly on my keyboard, instead I have to write \'e, \`e, \`a etc which is very cumbersome. I am really ignorant when it comes to computers and software, I hope somebody can help me resolve this issue! **EDIT** : I am using Texmaker. Also, I downloaded the complete Miktex from a french university but didn't get any further packages. Is the package _babel_ included in the "complete Miktex" download? Finally, when I say the proposed solution doesn't work


title: Very fancy bar chart

text: Just wonder if this could be done with tikz? I know I should provide at least a MWE, but I am new to latex and have absolutely no idea where to start. ![enter image description here](http://i.stack.imgur.com/06arG.png) MWE (Addition by HK)               \documentclass[tikz,border=5mm]{standalone}     \usetikzlibrary{positioning,shadows}     \tikzset{       %% fill styles if needed     }          \begin{document}       \begin{tikzpicture}         \node (a) at (0,0)  {a};       \end{tikzpicture}     \end{document}


title: Displaying a really long chain of inequalities

text: I'm trying to enter a long chain of inequalities in math display mode. If I enter the expressions as I want them to, LyX will continue displaying them off the screen - so that they don't show up when I compile the pdf (and I cannot see what I am typing). Is there a way I can enter a long chain of expressions in display mode so that LyX displays them nicely? My only option so far has been to exit display mode when I'm too far right of the screen, hit enter and go back into display mode to enter the next line. However, this doesn't look too great on the pdf, and I have no idea when is a good time to shift to the next line anyway. I'm assuming there is a proper way to do this.


title: \bfseries is to \textbf as WHAT is to \textsf

text: Neither of `\sfseries` nor `\sfshape` seem to work. So what is the command I'm looking for to change the current group to sans serif? `\bfseries`, `\scshape` and `\itshape` work, but I can't find the sans serif command to do the same thing...


title: Strange behaviour of titlesec, with colored titlerule

text: With the following MWE, i get the Section title underlined in black :               \documentclass[12pt]{article}     \usepackage[explicit]{titlesec}     \usepackage[dvipsnames]{xcolor}          \titleformat{\section}%     {\large\sffamily\bfseries}%     {Section \arabic{section}}%     {0.5em}%     {#1}%     [{\titlerule[2.5pt]}]          \begin{document}     \section{mon titre}     \end{document}      My first problem : if i remove the `{ }` enclosing `\titlerule`, i get a compilation error               ! LaTeX Error: Missing \begin{document}      Which is strange, since the content of the `[ ]` is a text to typeset after the section title. For example               [some-after-text]      works. My second problem : if i colorize the rule with               [\textcolor{blue}{\titlerule[2.5pt]}]      I obtain a blue underline, but with an additional vertical space (app 0.5 cm) between the title and the underline. If i use               [{\color{blue}\titlerule[2.5pt]}]      instead, the vertical space disappears... I have to admit, i do not understand that.


title: How to avoid page breaks between the paragraphs of a description item?

text: Is there a way of preventing LaTeX from putting page breaks between two paragraphs of a multi-paragraph `\item` in a `description` environment? Preferably without having to put in explicit `\nopagebreak` commands. (Note: I'm looking for a general solution that will avoid these page breaks altogether, not just a one-off correction for a specific instance. Page breaks between _items_ are fine.)


title: How can I increase spaces between ticks, make the first tick nearer the the axis and remove empty spaces from a pgfplot?

text: The question title explains it all, my plot isn't looking nice. I want to increase the spacing between each xtick, make the first xtick nearer the y axis and remove that space with no x ticks on the right side of the plot. If possible, also indicate how can I set each legend's color/drawing, because each legend column's have a lot in commom, so I wanted to make each legend in a column have the same color but different drawing. I don't know if anyone will understand this, but I tried. Here's the output: ![output](http://i.stack.imgur.com/GfW6B.png) My code is HUGE, but here it is:                   \documentclass{standalone}         \usepackage{booktabs}         \usepackage{pgfplotstable}              \usepackage{pgfplots}                        \begin{document}              \begin{tikzpicture}         \begin{axis}[         height=10cm,         width=15cm,         grid=major,         legend columns = 3,         legend style={         at={(0.5,-0.15)},         anchor = north},         xtick = data,         xlabel = Rodadas,         ylabel = Qualidade,         ]               \addplot coordinates {     (1, 0.678806)     (2, 0.707318)     (3, 0.735688)     (4, 0.758773)     (5, 0.850093)     (6, 0.850093)     (7, 0.850093)     (8, 0.850093)     (9, 0.850093)     (10, 0.871927)     (11, 0.871927)     (12, 0.871927)     (13, 0.871927)     (14, 0.871927)     (15, 0.871927)     (16, 0.873799)     (17, 0.875102)     (18, 0.914746)     (19, 0.914746)     (20, 0.914746)     (21, 0.914746)     (22, 0.914746)     (23, 0.914746)     (24, 0.914746)     (25, 0.914746)     (26, 0.914746)     (27, 0.914746)     (28, 0.914746)     (29, 0.914746)     (30, 0.914746)     };          \addplot coordinates {     (1, 0.755057)     (2, 0.770508)     (3, 0.786410)     (4, 0.817386)     (5, 0.835345)     (6, 0.837206)     (7, 0.841269)     (8, 0.850456)     (9, 0.855433)     (10, 0.856709)     (11, 0.865922)     (12, 0.866900)     (13, 0.884384)     (14, 0.904939)     (15, 0.909285)     (16, 0.909285)     (17, 0.912864)     (18, 0.922196)     (19, 0.942011)     (20, 0.945971)     (21, 0.945971)     (22, 0.946822)     (23, 0.949695)     (24, 0.951748)     (25, 0.955744)     (26, 0.955744)     (27, 0.955744)     (28, 0.955744)     (29, 0.955744)     (30, 0.955830)     };          \addplot coordinates {     (1, 0.779965)     (2, 0.805282)     (3, 0.822174)     (4, 0.831721)     (5, 0.871130)     (6, 0.883848)     (7, 0.889126)     (8, 0.891892)     (9, 0.915892)     (10, 0.932662)     (11, 0.937660)     (12, 0.941063)     (13, 0.954651)     (14, 0.954651)     (15, 0.954651)     (16, 0.954651)     (17, 0.955258)     (18, 0.964528)     (19, 0.964528)     (20, 0.966332)     (21, 0.972416)     (22, 0.973069)     (23, 0.973069)     (24, 0.973069)     (25, 0.975399)     (26, 0.976746)     (27, 0.978759)     (28, 0.986392)     (29, 0.989421)     (30, 0.989421)     };          \addplot coordinates {     (1, 0.248592)     (2, 0.270525)     (3, 0.270525)     (4, 0.274079)     (5, 0.274079)     (6, 0.274079)     (7, 0.276394)     (8, 0.276394)     (9, 0.276394)     (10, 0.276394)     (11, 0.277121)     (12, 0.277121)     (13, 0.277121)     (14, 0.277121)     (15, 0.277121)     (16, 0.277121)     (17, 0.277121)     (18, 0.277121)     (19, 0.291238)     (20, 0.291238)     (21, 0.308117)     (22, 0.316756)     (23, 0.316756)     (24, 0.316756)     (25, 0.316756)     (26, 0.316756)     (27, 0.316756)     (28, 0.316756)     (29, 0.316756)     (30, 0.316756)     };          \addplot coordinates {     (1, 0.301701)     (2, 0.301701)     (3, 0.301701)     (4, 0.301701)     (5, 0.301701)     (6, 0.347555)     (7, 0.347555)     (8, 0.347555)     (9, 0.347555)     (10, 0.347555)     (11, 0.347555)     (12, 0.347555)     (13, 0.347555)     (14, 0.347555)     (15, 0.347555)     (16, 0.347555)     (17, 0.347555)     (18, 0.347555)     (19, 0.369908)     (20, 0.372418)     (21, 0.372418)     (22, 0.372418)     (23, 0.372418)     (24, 0.372418)     (25, 0.372418)     (26, 0.372418)     (27, 0.372418)     (28, 0.372418)     (29, 0.372418)     (30, 0.372418)     };          \addplot coordinates {     (1, 0.301701)     (2, 0.301701)     (3, 0.308213)     (4, 0.309166)     (5, 0.310629)     (6, 0.324628)     (7, 0.324628)     (8, 0.335789)     (9, 0.338966)     (10, 0.346886)     (11, 0.349949)     (12, 0.350236)     (13, 0.355030)     (14, 0.358046)     (15, 0.358046)     (16, 0.360049)     (17, 0.360609)     (18, 0.363103)     (19, 0.367216)     (20, 0.368751)     (21, 0.372306)     (22, 0.376436)     (23, 0.376436)     (24, 0.376436)     (25, 0.376892)     (26, 0.380644)     (27, 0.380780)     (28, 0.385106)     (29, 0.389572)     (30, 0.390048)     };                   \legend{32-2 com busca local, 128-4 com busca local, 256-8 com busca local, 32-2 sem busca local, 128-4 sem busca local, 256-8 sem busca local}                        \end{axis}         \end{tikzpicture}              \end{document}


title: equation with arrows

text: My intention is to create equation which looks similar to one of examples below (I prefer the second one). ![enter image description here](http://i.stack.imgur.com/W7hWJ.png) There should be an arrow from JKL to DEF and GHI and from GHI to DEF. Neither alignment nor equation environment have to be used. Anything that will do is appreciated. Cheers.


title: Getting vinculum in fractions with Asana Math and unicode-math

text: With this minimal example               \documentclass[a4paper,12pt]{article}     \usepackage{fontspec}     \usepackage{unicode-math}     \setmathfont{Asana Math}     \begin{document}     $\frac{2\pi r}{r} = 2\pi$     \end{document}      I am unable to get the horizontal bar or vinculum for the fraction on the left. I am new to unicode-math, and want to use the Asana Math font with Minion Pro as my main font, compiling the document with xelatex. Can someone please suggest what is wrong and how to correct it? Many thanks.


title: TikZ: applying width to nodes programmatically, and 'Undefined control sequence pgf'

text: This is what I want to do: given two (horizontal) nodes, calculate the x distance between them, and produce a rectangular node with the same width as the x-distance between the nodes, placed below them. I have tried the following code, reusing Working with \pgfmathparse inside a path / calculations - Why is this let expression not working in TikZ (calculating a midpoint)? - TeX - LaTeX - Stack Exchange:               \usetikzlibrary{shapes.arrows,chains,positioning,matrix,calc}          \begin{tikzpicture}[font=\tt]         \node (A1) [shape=circle,draw]              {A1};         \node (A2) [shape=circle,draw,right=of A1]  {A2};              % draw a rectangular node         \draw let \p1 = (A1.west), \p2 = (A2.east)            in \pgfextra{             \pgfmathparse{\x2 - \x1}           }             node[draw,right,below=of A1,text width=\pgfmathresult pt]{test};     \end{tikzpicture}      This results with the image below: ![](http://i.stack.imgur.com/bYKHr.png) Obviously - the box is not as wide as the distance between the A1 and A2 nodes (and neither has its right edge aligned with A1.west). Then I wanted to try something similar to the code given in Re: tikz: getting width of node programmatically, which also uses `\pgfextra`, so I tried something like:               \usetikzlibrary{shapes.arrows,chains,positioning,matrix,calc}     \newdimen{\mydim}          \begin{tikzpicture}[font=\tt]         \node (A1) [shape=circle,draw]              {A1};         \node (A2) [shape=circle,draw,right=of A1]  {A2};              % draw a rectangular node         \draw let \p1 = (A1.west), \p2 = (A2.east)            in \pgfextra{             \pgf@x=\n1             \pgf@y=1cm             \divide\pgf@x by \pgf@y             \setlength{\mydim}{\pgf@x}                 }             node[draw,right,below=of A1,text width=\mydim pt]{test};     \end{tikzpicture}      ... however, for that code, LaTeX seems to crash when it encounters `\pgf@x`, since the error message is:               ! Undefined control sequence.     <argument>  \pgf                       @x=\n 1 \pgf @y=1cm \divide \pgf @x by \pgf @y \setlength {...     l.40      }          !  ==> Fatal error occurred, no output PDF file produced!      The only reference I found to this was kind of error was in pgfdeclareshape example not compilable - pgf-users, where the recommendation is: > Does it compile if you put \makeatletter before \pgfdeclareshape{...} and > \makeatother after? (It is missing from the example in the manual, but I > suspect it is necessary). ... however, I do not see how it would apply here - since the purpose of all this pgf use here, is just calculation (not actual drawing/rendering). Well, thanks in advance for any pointers,   Cheers! **EDIT:** Well, with a (sort of a) combo of the approaches above, I am starting to get somewhere:               \usetikzlibrary{shapes.arrows,chains,positioning,matrix,calc}     \newdimen{\mydim}          \begin{tikzpicture}[font=\tt]         \node (A1) [shape=circle,draw]              {A1};         \node (A2) [shape=circle,draw,right=of A1]  {A2};              % draw a rectangular node         \draw let \p1 = (A1.west), \p2 = (A2.east)            in \pgfextra{%             \pgfmathparse{\x2 - \x1}             \setlength{\mydim}{\pgfmathresult pt}                  }             node[draw,right,below=of A1.west,anchor=west,text width=\mydim]{test};     \end{tikzpicture}       ... but it's still not good. By using `anchor=west`, now there is proper alignment; and by getting rid of `\pgf@x`, and using `\pgfmathresult` to set the `\mydim` length - the width looks somewhat better, but longer than expected, see image: ![](http://i.stack.imgur.com/GoPYP.png) So the remaining questions now are:   * how do I get the correct width of the box - so its left edge aligns with A2's left edge?    * Why is this 'crash' on encountering `\pgf@x` in `\pgfextra` happening? Thanks again,   Cheers!


title: Big block matrix with tikz

text: I know this is very similar to plenty of questions. The matrix below s actually bigger, so I realized that I had to use tikz. In this array, A, A',…,L', T are square matrices, and I filled with zeros the right half, although the original matrix doesn't have these trivial entries, so I cannot remove them (don't try to fix the entries in the right side, because the spacing is ok when I introduce their actual values)   * Is there a less ugly way to write this block matrix?   * I'm sure there is a better way to display this tensor product in the non-zero block below, because, as it is displayed, it is not readable. I mean, it seems that `\otimes T` is multiplying only the matrix L!  ![enter image description here](http://i.stack.imgur.com/zDecW.png)               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{arrows,chains,matrix,positioning,scopes}          \begin{document}               \begin{tikzpicture}[node distance=-1ex]     \matrix (mymatrix) [matrix of math nodes,left delimiter={(},right     delimiter={)}]     { 0  &  0 & A&  A'  &  0  &  0  &  0  &  0 & 0 & 0 &  0  &  0  &  0  & 0  &  0  &  0  &  0&0 &\!\!\!\!\! \\     0  &  0  &  B' & B\,\, &  0  &  0  &  0  &  0 & 0 & 0  &  0  &  0  &  0  & 0  &  0  &  0  &  0  &0&\!\!\!\!\!\\     C &  C'  &  0  &  0  &  0  &  0  &  0  &  0 & 0 & 0  &  0  &  0  &  0  & 0  &  0  &  0  &  0  &0&\!\!\!\!\!\\     D' & D &  0  &  0  &  0  &  0  &  0  &  0 & 0 & 0  &  0  &  0  &  0  & 0  &  0  &  0  &  0  &0&\!\!\!\!\!\\     0  &  0  &  0  &  0  &  0  &  0  &  K  &  K' &  & 0  &  0  &  0  &  0  & 0  &  0  &  0  &  0  &0&\!\!\!\!\!\\     0  &  0  &  0  &  0  &  0  &  0  &  L'  & L  & \!\!\!\otimes T & 0  &  0  &  0  &  0  & 0  &  0  &  0  &  0  &0&\!\!\!\!\!\\     0  &  0  &  0  &  0  &  M  &  M'  &  0   &0  &   &  0  &  0  &  0  & 0  &  0  &  0  &  0  & 0&0&\!\!\!\!\!\\     0  &  0  &  0  &  0  &  N'  &  N  &  0  & 0  &   &  0  &  0  &  0  & 0  &  0  &  0  &  0  & 0&0&\!\!\!\!\!\\     };     \draw[blue,dashed] (mymatrix-4-1.south west) -- (mymatrix-4-4.south east);     \draw[blue,dashed] (mymatrix-1-4.north east) -- (mymatrix-4-4.south east);     \draw[red,dashed] (mymatrix-4-4.south east) -- (mymatrix-4-10.south west);     \draw[red,dashed] (mymatrix-5-4.north east) -- (mymatrix-8-4.south east);      \draw[red,dashed] (mymatrix-4-10.south west) -- (mymatrix-8-10.south west);     \draw[red,dashed] (mymatrix-8-4.south east) -- (mymatrix-8-10.south west);     \end{tikzpicture}     \end{document}


title: How to turn off drawing node border in PGF?

text: I'm trying to create a picture for Instant Insanity problem. Here is my following code:               \begin{tikzpicture}     \matrix[nodes=draw]     {     ; & \node{\LARGE R}; & ; & ;\\     \node{\LARGE R}; & \node[draw=white]{\LARGE B}; & \node{\LARGE G}; & \node{\LARGE W};\\     ; & \node{\LARGE R}; & ; & ;\\     };     \end{tikzpicture}      The problem is, the node containing B has relatively thick border. This is due to border overlapping by surrounding nodes. How can I turn off drawing borders of node containing **B** ?


title: Glossary per chapter or section

text: I'm looking for a way of creating glossaries, with the help of `glossaries` package, per chapter or section. In a particular glossary for section should be only the terms used in this section. If term is used in multiple section - appear in correspondent glossaries. Example (done with the help of `description` environment, just for an example): ![enter image description here](http://i.stack.imgur.com/G6HyV.png) How can I achieve this?


title: Sorting logs into different folders

text: When I run `xelatex` (or other compilers), I always end up with many log files in a single folder. This gets difficult to manage. I could create a script which moves them into various folders (e.g. one for glossary-related logs, one for bibliography-related logs), but then the compiler would not find them the next time they compile. Is there a simple way to tell `xelatex` to put the logs into specific folders?


title: When to use math mode?

text: In my document, the numbers inside math mode appear differently than those numbers out. Sometimes, I have numbers like "10 squared" within a paragraph, so it seems useful to use `$10^2$`. However, maybe on the same line, I have "10 km". The style of the 10 is different. In this case, should I also use `$10$ km`?   * Is there a general rule for when it is best to use math mode within a document?


title: Dashed hline in longtabu (arydshln conflicts, does not work?)

text: I have a large table with the following requirements:   * Spans multiple pages (currently using `longtable`)   * The last column's text must wrap (using `tabu`'s `longtabu` environment as `tabularx` does not support multiple pages) I am trying to add dashed horizontal lines like `arydshln`'s `\hdashline`. The `arydshln` documentation indicates that some care must be taken when loading with `longtable`, but even when it is loaded after the table packages, it still will not compile. This question indicates that the `arydshln` package apparently conflicts with `tabu`, but doesn't solve the problem as their table is only one page and can thus be switched to `tabularx`. How can I can I create dashed lines in a multi-page table with one column whose text wraps? A smaller MWE is here, the lipsum paragraphs are a bit longer than realistic, but get the point across:               \documentclass{article}     \usepackage[layout=letterpaper,margin=1in]{geometry}     \usepackage{lipsum}     \usepackage{blindtext}          \usepackage{longtable}     \usepackage{tabu}     %\usepackage{arydshln}          \begin{document}          \begin{longtabu} to \linewidth {c c l X}     \rowfont\bfseries Prefix & Address & Data Field & Description \\ \hline     \endhead     \tt 1000 & \tt 0000 & 32-bit Data & \small\lipsum[1] \\     \tt 1000 & \tt 0001 & 32-bit Data & ... \\     \tt 1000 & \tt 0010 & 32-bit Data & ... \\     \tt 1000 & \tt 0011 & 32-bit Data & ... \\     \tt 1000 & \tt 0100 & 32-bit Data & ... \\     \tt 1000 & \tt 0101 & 32-bit Data & ... \\     \tt 1000 & \tt 1XX0 & 32-bit Data & \small\lipsum[1] \\     \hline % <--- Would like this to be dashed     \tt 1010 & \tt 1000 & 32-bit DMA Data & \small\lipsum[1] \\     \tt 1010 & \tt 1010 & 32-bit Data & ... \\     \tt 1010 & \tt 1011 & 32-bit Data & ... \\     \tt 1010 & \tt 1100 & DMA Control Message$\dagger$ & \small\lipsum[1] \\     \tt 1010 & \tt 1100 & 32-bit Data & ... \\     \hline % <--- Would like this to be dashed     \tt 1011 & \tt 0010 & 32-bit Data & ... \\     \end{longtabu}          \end{document}      ![MWE](http://i.stack.imgur.com/83xHO.png)


title: How to align a node's text RIGHT, i.e. at the end of the line?

text: I'm drawing a diagram with nodes and I have to have the inner text of one node at the END of the line, i.e. at the right side, not left, not centered. Unfortunately I didn't find a way nor information in the web. That's how my picture now looks like: ![](http://i.stack.imgur.com/g1zeP.jpg) As you can see the text in the node "Client" (right side) is covered by the "Anwendungsprogramm"-node. How can I shove the text on the right side of the node? The code:   (It's a large document, that's why I use this many packages. For I'm not sure which packages do influence my graphics, I'll take all.)               \usepackage[babel, german=quotes]{csquotes}     \usepackage{array}     \usepackage[style=alphabetic, backend=bibtex8]{biblatex}     \usepackage{setspace}     \usepackage{geometry}     \usepackage[table]{xcolor}      \usepackage[arrow, matrix, curve]{xy}     \usepackage{calc}     \usepackage{multirow}     \usepackage{tikz}     \usetikzlibrary{matrix,calc,positioning,arrows}          \begin{document}          \begin{figure}[htbp]     \begin{center}           \begin{tikzpicture}                   \node [rectangle, rounded corners=1mm, minimum size=25mm, text width=40mm,                 anchor=base, very thick, draw=black!50, fill=black!10]                                      (server)     {Server};              \node [rectangle, rounded corners=1mm, minimum size=20mm, text width=25mm,                  anchor=base, very thick, draw=black!50, text centered,                 right=20mm of server]                    (webservice) {Webservice};                            \node [rectangle, rounded corners=1mm, minimum size=20mm, text width=20mm,                  anchor=base, very thick, draw=black!50, fill=white!100, text centered,                 right=-25mm of server]                   (server-p)   {Anwen-\\ dungs-\\ programm};                            \node [rectangle, rounded corners=1mm, minimum size=25mm, text width=40mm,                  anchor=base, very thick, draw=black!50, fill=black!10, text centered,                 right=20mm of webservice]                    (client) {Client};                        \node [rectangle, rounded corners=1mm, minimum size=20mm, text width=20mm,                  anchor=base, very thick, draw=black!50, fill=white!100, text centered,                 left=-25mm of client]                    (client-p)   {Anwen-\\ dungs-\\ programm};              \draw [<->, very thick] (webservice) to (server-p);         \draw [<->, very thick] (webservice) to (client-p);          \end{tikzpicture}     \bigskip     \label{fig-funktionaleebenen}        \end{center}         \end{figure}          \end{document}


title: Barebones or Packages

text: As a relatively novice LaTeX user, is it OK to plunge right into using the helpful packages out there, or is it better to stick to core LaTeX primitives and packages so as learn the mechanics of LaTeX? EDIT: I should clarify:   * I'm not a _total_ newbie, and I'm not either a _complete_ idiot as to copy someone else's preamble without understanding the purpose of each package and what it does.    * Although, in general, it's of course important to keep in mind that one can rely on LaTeX to provide a decent format, it's also true that the whole **point** of a program like LaTeX is to provide flexibility and customization. As someone with a programming background, that is what I find attractive about LaTeX in the first place. The point of my question was whether to begin customizations at the high level, using existing packages or to achieve those same customizations (when relatively feasible) at the low level by doing things with just the core commands and packages. For example, to get my margins the way I want them to be, should I use the `geometry` package or do all the calculations on my own. The question is similar to asking whether a novice programmer should immediately start using his programming language's existing Linked List data structure or code his own first so as to gain a thorough understanding of the concept.


title: What can cause generated PDF document whose text are not correctly copyable?

text: I was wondering why some PDF documents compiled from some LaTeX code does not make its text correctly copyable, i.e. what you can get is nonsense text? For example, this pdf document (I don't have the LaTeX code for it).


title: "Correct" way to bold/italicize text?

text: Is either of these considered better/more readable/more "proper"/more conventional than the other for making text bold? If so, what is the reason?               I like my text \textbf{bold}      versus:               I like my text {\bf bold}


title: What commands/environments are supported by jLatexMath?

text: Is there documentation on which commands are available? For example right now I cant even `\\\` to get linebreaks, however `\textcolor{red}{\mathfrak{A}rea}A=\pi r^2` works perfectly...


title: Why is it that coloring in soul in beamer is not visible

text: \documentclass{beamer}      \usepackage{soul,color}      \begin{document}      \begin{frame}      \hl{Hello World}      \end{frame}      \end{document}      I process this with `pdflatex` and I do not see the expected highlight. If I try to assign a color to overstrike same thing happens, as in               \setstcolor{red}     \st{Hello}      but `\st{hello}` by itself does overstrike `hello` in black when no color is set. Why is that and what is a work-around? Many That I tried do not work with long text. The Soul Package Documentation, footnote 5, says something about needing a Postscript driver. I do not have a problem using `soul` package outside of `beamer`.


title: How to expand TeX's "main memory size"? (pgfplots memory overload)

text: I'm compiling one pretty simple LaTeX file with few dozen of `pgfplots`. Now, I can compile part by part, but am **unable to compile it all at once**. I really need good precision for all those plots (noise plots) and would like to avoid decimating graphs more. When I run compile, I get this error message:               [...] TeX capacity exceeded, sorry [main memory size=3000000].      **Is there a way to avoid this message somehow?** How am I supposed to use `pgfplots` if I can't plot couple dozen of figures with it without having TeX overloaded? **How to expand TeX memory size, please?**


title: Latex - How to define commands macros the save way

text: Using: Latex -> pdfLatex, and also loading another tex file written by me with:               \input{\myPath anotherDocument.tex}     %% there is a "private" macro:     \def\foo#1{$\backslash$def$\backslash$#1$\{$the name$\}$}     %% doesn't compile without $          %% all happens before     \begin{document}      1) Why can't I define the macro JUST like others ? Because all other macros are defined without $ but also contain commands like\foo{}.   2) What does $ do ?   3) What does * do ?   4) Why do some packages influence each other ?   5) Why is the Latex syntax inconsistent ?   6) What is wrong with Latex ?


title: TeX capacity exceeded + Semantics package

text: I get the following error:               ! TeX capacity exceeded, sorry [input stack size=5000].     \do #1#2#3->\mathcode `#1                          ="8000     l.14 ..._{1}\; a_{2} -> v_{2}}{a_{1} - a_{2} -> v}          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on samlet.log.     libpng warning: iCCP: known incorrect sRGB profile      It happened after I started using the semantics package: http://get- software.net/macros/latex/contrib/semantic/semantic.pdf The document that makes it not compile can be seen here: http://pastebin.com/ycJ6taKw If I compile with only one of math blocks it will compile just fine, and yes the document is the input to a master .tex file.


title: Language support for Icelandic does not exist?

text: I have been trying for a few days now to get Icelandic characters. I've installed the `cm-super` font package and I'm using MiKTeX 2.9 on a Windows 8 Lenovo yoga btw. Anyways I've made sure that `icelandic.ldf` and `icelandic.sty` are in the directory `\MiKTeX 2.9\tex\generic\babel\`. The line `\DeclareOption{icelandic}{\input{icelandic.ldf}}` is in the file `\MiKTeX 2.9\tex\generic\babel\babel.sty` and I have the file `ishyph.tex` in the directory `\MiKTeX 2.9\tex\generic\hyphen\`. I can't find any other dependency that I'm missing. I've made sure that all these things are selected in the MiKTeX option thing and I've also refreshed FNDB and Updated Formats after each change I've made. So I deduced that my error is in the document rather than in the dependencies.               \documentclass{article}     \usepackage[icelandic]{babel}     \usepackage[T1]{fontenc}     \selectlanguage{icelandic}     \begin{document}     I want these letters in amsart: þÞæÆöÖáÁíÍéÉúÚóÓýÝðÐ (I know I can get æ with \ae but that's useless without the others).     \end{document}      This works btw it is displayed correctly no problem. The problem is that I think I need my document class to be `amsart` (I'm using LaTeX for Linear Algebra homework) and it seems that AMS doesn't support `icelandic`. Is there any workaround or something I can do? What I need to be able to do is make augmented matrices and that's about it. The way I'm doing it atm is adding this:               \makeatletter     \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%       \hskip -\arraycolsep       \let\@ifnextchar\new@ifnextchar       \array{#1}}     \makeatother      to the front of my document and then using syntax like for example this:               $$     \begin{bmatrix}[cccc|c]       a_{11} & a_{21} & \cdots & a_{n1} & b_{1} \\       a_{12} & a_{22} & \cdots & a_{n2} & b_{2} \\       \vdots & \vdots & \ddots & \vdots & \vdots \\       a_{1n} & a_{2n} & \cdots & a_{nn} & b_{n} \\       \vdots & \vdots & \ddots & \vdots & \vdots \\       a_{1m} & a_{2m} & \cdots & a_{nm} & b_{m}     \end{bmatrix}     $$      I don't know how it works but it works except I don't have icelandic characters. If I can get the characters in amsart or the matrices in article I'm happy.


title: ConTeXt+MetaPost: Non-conflicting random background and foreground colours

text: # Overview Looking to create a page that has a random (and non-consecutively repeating) background colour with titles that are also random. # Problem The code has two problems. First, generating a complementary random colour based on the current page's background colour is ineffective. Second, the code to assign a unique complementary colour to each word in the chapter title is ineffective. # Code A relatively short example:               \ctxlua{math.randomseed( 101 )}     \setupcolors[state=start]          \definecolor[ThemeColourGreen][h=8DC366]     \definecolor[ThemeColourBlue][h=79C9EF]     \definecolor[ThemeColourYellow][h=FFD631]          \startMPinclusions       color colours[];       colours[0] := \MPcolor{ThemeColourGreen};       colours[1] := \MPcolor{ThemeColourBlue};       colours[2] := \MPcolor{ThemeColourYellow};       max_colours := 3;            color base_colour;       color old_base_colour;            vardef ThemeBase( expr colour ) =         fill Page withcolor transparent(1, .85, colour );       enddef;            vardef RandomColour =         colours[ round( uniformdeviate( max_colours - 1 ) ) ]       enddef;            vardef GenerateRandomColour( expr colour ) =         color random_colour;              forever:           random_colour := RandomColour;           exitunless random_colour = colour;         endfor;              random_colour       enddef;            base_colour := RandomColour;       old_base_colour := base_colour;     \stopMPinclusions          \startuseMPgraphic{page:ThemeBackground}       base_colour := GenerateRandomColour( old_base_colour );       ThemeBase( base_colour );       old_base_colour := base_colour;     \stopuseMPgraphic          \startuseMPgraphic{heading:ThemeTitleStyle}       color complementary_colour;       complementary_colour := GenerateRandomColour( base_colour );       draw textext( \MPstring{heading:title} ) rotated 30         withcolor complementary_colour;     \stopuseMPgraphic          \defineoverlay[page:ThemeBackground][\uniqueMPgraphic{page:ThemeBackground}]     \defineoverlay[page:ThemeStyle][\uniqueMPgraphic{page:ThemeStyle}]          \defineframed[ThemeTitleStyle][       background=\useMPgraphic{ThemeTitleStyle},     ]          % Called by processwords     \def\processword#1{%       \setMPtext{heading:title}{#1}%       \useMPgraphic{heading:ThemeTitleStyle}     }          \define[1]\ThemeChapterTitle{\processwords{#1}}     \setuphead[chapter][deeptextcommand={\ThemeChapterTitle}]          \starttext       \setupbackgrounds[page][background={page:ThemeBackground}]       \startchapter[title=One is 1st] \input knuth \stopchapter       \startchapter[title=Two is 2nd] \input zapf \stopchapter       \startchapter[title=Three is 3rd] \input knuth \stopchapter       \startchapter[title=Four is 4th] \input zapf \stopchapter       \startchapter[title=Five is 5th] \input knuth \stopchapter       \startchapter[title=Six is 6th] \input zapf \stopchapter     \stoptext      # Algorithm I thought that the algorithm would be:   1. Start MetaPost inclusions.   2. Define a global 'colours' array to store the available colours.   3. Generate a random initial colour, and initialized the "previous" colour.   4. Create a new page.   5. Generate a new random colour for the page background.   6. If the new random colour is the same as the previous, repeat the previous step.   7. Create the title for the page.   8. For each word in the title, generate a complementary colour that does not conflict with the page background. However, while testing it appears that:   * the chapter title is being drawn before the page background; and   * the `\processwords` command is not calling `\processword` for each word in the title. # Related This is related to the following question:   * Randomly generated number, distinct from previously generated number in MetaPost The difference is that I need to generate a random colour such that it does not conflict with a given colour. # Question How would you pick random colours for each word in a chapter title such that the selected colour does not conflict with the page background colour? Note: I am using MetaPost (instead of only ConTeXt) because I'd like to (1) track the page colour; and (2) produce outlined fonts using the `graphictext` command.


title: A problem with using the \ganttbar macros inside another one

text: I'm trying to write a macros for converting day time to a format, which the pgfgrantt package can understand. Here it is:               \newcommand{\htime}[2][0]{       \StrBefore{#2}{:}[\hours]       \StrBehind{#2}{:}[\minutes]       \pgfmathparse{\hours+\minutes/60+#1}       \pgfmathresult     }          \newcommand{\gantthbar}[3]{       \def\from{\htime[1]{#2}}       \def\to{\htime{#3}}       \ganttbar{#1}{\from}{\to}     }          % \gantthbar{test}{11:15}{12:00} -> \ganttbar{test}{12.25}{12.0}      Compilation failed with an error, I can't resolve:               ! Use of \\ganttbar doesn't match its definition.     \kernel@ifnextchar ...rved@d =#1\def \reserved@a {                                                       #2}\def \reserved@b {#3}\f...     l.37   \gantthbar{test}{11:15}{12:00}          ?      This one compiles without errors:               \newcommand{\gantthbar}[3]{       \def\from{\htime[1]{#2}}       \def\to{\htime{#3}}       \ganttbar{#1 \from \to}{12.25}{12.0}     }      Thanks for your help. _Very minimal working example I wrote after reading comments:_               \documentclass[a4paper, 12pt]{report}          \usepackage{xstring}     \usepackage{pgfgantt}          \newcommand{\gantthbar}[3]{       \StrBefore{#2}{:}[\hoursfrom]       \StrBehind{#2}{:}[\minutesfrom]       \StrBefore{#3}{:}[\hoursto]       \StrBehind{#3}{:}[\minutesto]       \pgfmathsetmacro\from{\hoursfrom + \minutesfrom / 60 + 1}       \pgfmathsetmacro\to{\hoursto + \minutesto / 60}       \ganttbar{#1}{\from}{\to}     }          \begin{document}     \begin{ganttchart}[vgrid]{24}       \gantthbar{test}{11:15}{12:00}     \end{ganttchart}     \end{document}


title: Paragraph indenting in an mdframed environment

text: I'm using the `mdframed` package and I've defined my own environment. But it seems that paragraph indentation doesn't work inside a `mdframed` environment. I've used the `settings` option of `mdframed` to set parindent inside but it doesn't seem to work. However when I explicitly add `\setlength{\parindent}{\defparindent}`, which is a rather ugly solution, it indents the first line too a little bit. So either way this whole thing is not okay. How can I tell my `singleframed` environment to set `\parindent` inside itself? ![mdframed parindent](http://i.stack.imgur.com/rpprP.png)               \documentclass{article}          %\usepackage{lipsum}          \usepackage[framemethod=tikz,%     innerleftmargin=\parindent,%     skipabove=0.6\baselineskip,%     skipbelow=0.6\baselineskip,%     innertopmargin=0.4\baselineskip,%     innerbottommargin=0.4\baselineskip]{mdframed}          \newlength{\defparindent}     \setlength{\defparindent}{\parindent}          % The singleframed environment     \newmdenv[linewidth=0.4pt,%     linecolor=black,%     backgroundcolor=white,%     settings={\setlength{\parindent}{\defparindent}}]{singleframed}          \begin{document}          \begin{singleframed}     qwerty          qwerty     \end{singleframed}          \begin{singleframed}     \setlength{\parindent}{\defparindent}     qwerty          qwerty     \end{singleframed}          \end{document}


title: Two column-wide figure in 4 column enviroment

text: I have poster with 4 columns. I want to place figure in the middle of poster, that should be only 2 columns wide. I am using the `a0poster` package. So I have something like this:               \begin{document}     \begin{multicols}{4}      Some text          \begin{figure}[H]% This figure should be two columns wide          \end{figure}     More text     \end{multicols}     \end{document}


title: meta-command - need help with expansion

text: To enforce labeling regulations in a document to be edited by ~50 users (imported subdocuments) i have to re-redine the existing document structuring commands part, chapter, etc to follow a predefined labeling scheme (prefixing with hierarchy level to avoid collisions). As examples speak more than words, here my current definition for chapter (omitting details). Basically, both `\chapter` and `\chapter*` are extended with an optional parameter used to define a label which is automatically prefixed by "`chap:`", reusing the old `\chapter` command. Additionally, a command for creating references is defined where short vs. long reference text is chosen via the boolean variable `\iflongrefs`.               \RequirePackage{letltxmacro}     \RequirePackage{xargs}          \newcommand*\section@namelong{Section}%     \newcommand*\section@nameshort{Sect.}%     \newcommand*\section@prefix{sect}%          \LetLtxMacro{\section@old}{\section}%     \renewcommand\section{\@ifstar \section@star \section@nostar}%     \newcommandx*\section@nostar[3][1=,3=]{%         \ifx &#1&%             \section@old{#2}%         \else%             \section@old[#1]{#2}%         \fi%         \ifx &#3&%         \else%             \label{\section@prefix:#3}%         \fi%     }%     \newcommandx*\section@star[2][2=]{%         \section@old*{#1}%         \ifx &#2&%         \else%             \label{\section@prefix:#2}%         \fi%     }%          \newcommand*\sectionref[1]{         \iflongrefs             \section@namelong~\ref{\section@prefix:#1}         \else             \section@nameshort\,\ref{\section@prefix:#1}         \fi     }      Now, I need similar definitions for part, subsection, etc... Of course I can copy & paste this, replacing `\section@XXX` with `\part@XXX` etc accordingly. However I'd prefer a more elegant solution, such as a "higher-order command" `\extend` encapsulating the (re)definitions. A call to `\extend` for chapters should look like the line given below, and produce all the code seen above.               \extend{section}{Section}{Sect.}{sect}      How can I make this work? Reading through various forum posts I feel `\expandafter` is the way to go, but I did not understand the examples enough to get it working for me. Any help?


title: Article with mathjax to latex document

text: I write articles in my site, and use mathjax, \( and \) for inline mode and $$ and $$ for display mode. I want to move some articles to latex document. What is the simple way to do it?


title: Problem with \hline and reference

text: I am trying to end my table with a `\hline`. My tex is as follows               \begin{center}     \begin{tabular}{ l | c || r }     \hline     1 & 2 & 3 \\ \hline     4 & 5 & 6 \\ \hline     7 & 8 & 9 \\     \hline     \caption{ Result }     \label{tab:a}     \end{tabular}     \end{center}      However the resultant image is as follows: ![enter image description here](http://i.stack.imgur.com/Es6aA.png) As you can see an empty row gets added below the end. Can somebody tell me how to correct it?


title: modification of Revtex 4.1 bibliography style

text: I'm using the `book` class along with `apsrev4-1` bibliographystyle. Everything is fine except from the fact that I'd like titles of the papers that I cite to be visible (not a standard thing in `apsrev4-1` bibliographystyle). Turns out this problem is addressed over here: Revtex 4.1 bibliography style in other classes. Thing is however, that the last suggested solution, i.e., the one including a slight modification of the `apsrev4-1.bst` file, proves to cause the `babel` package errors of the form: > Package babel Error: You haven't defined the language English yet. ! Package > babel Error: You haven't loaded the option Swedish yet. which is totally ridiculous and absent when using the unmodified `apsrev4-1.bst` file. When ignoring them the final `.pdf` is produced and everything seems to be fine (the titles of the papers do appear in the bibliography, with some minor issues such as all words in a title but the first one are in lower case) but they are really irritating. I had tried the solution with separate file and `@Control` sequence in there but this one doesn't work at all. All ideas appreciated,


title: Using counters within \index{...}

text: When trying to use a counter value within `\index` an odd behavior occurs. It seem as if the value would be evaluated at the end of the document, when the counter has already been changed. Therefore all the occurrences of the counter have the same value.               \documentclass{article}          \usepackage{makeidx}     \makeindex          \begin{document}          \section{First Section}     \index{first \arabic{section}}          \section{Second Section}     \index{second \arabic{section}}          \section{Third Section}     \index{third \arabic{section}}          \printindex          \end{document}      results in the following index: ![wrong index](http://i.stack.imgur.com/4fm73.png) though I would like to have: ![desired index](http://i.stack.imgur.com/rzoYN.png)


title: Suppress page numbers in article documentclass

text: I want to suppress page numbers. I am also using `\maketitle` command which seems to trigger the problem. MWE:               \documentclass[a4paper,10pt,english]{article}     \title{My title}     \begin{document}         \thispagestyle{empty}         \maketitle         Hello World     \end{document}