title: biber.conf: suppress warning when not overwriting a field

text: I use two fields (type and entrysubtype) in formatting a particular entrytype [explanation below, in case it triggers any thoughts]. In most cases these are the same; occasionally there would be reasons to have them set differently. It would be a painful waste of a user's time to require both to be entered in cases where they would be identical. To simplify the handling in biblatex, it occurred to me that I could just use biber to set the entrysubtype field from the type field if the user had not entered an entrysubtype field. For that purpose I use the following (in biber 0.9.9)               <map map_overwrite="0">       <per_type>LEGISLATION</per_type>       <map_step map_field_source="type"                 map_final="1"/>       <map_step map_field_set="entrysubtype"                 map_origfieldval="1"/>     </map>      This works as expected. The "final" in the first step, strictly unnecessary, makes sure it doesn't fuss over cases where there is no type field. The second step correctly adds an entrysubtype only when none has been set. But in those cases, although its behaviour is perfectly correct, it generates warnings, which propagate to the LaTeX run too, to the effect that it has _not_ overwritten the entrysubtype field. Other things being equal, I'd rather _not_ warn users when the program is doing what it's supposed to. Is there a way to stop such warnings? (What I suppose I need is a map step which checks if an entrytype is already set and terminates processing if it is; but I can't think how to construct such a step, though that's probably because I'm a complete biber.conf novice.) Or is there something to worry about that I'm not aware of? (I realise I could do all of this by checking for undefined fields within biblatex, but I think my alternative solution will make for cleaner code.) [Type is used to determine what should be printed (say "Decision") and entrytype is used to determine what index a particular source ends up in. In most cases a piece of legislation that calls itself a Decision _is_ a Decision: occasionally it's something else, and should be indexed accordingly.]


title: Label automatically positioned so that it doesn't overlap anything

text: I produce automatically generated LaTeX-files with nodes and links. Is it possible to put the label of the node outside of the node and it is automatically positioned somewhere, such that there is no line crossing it? I know I can position the label by hand:               \node[label= above right: N-1](N-1) at (0.0,2.0){ };      But this it not what I want, since sometimes there could be a line right there. Does anyone have any idea?


title: Numerical order of citation - bibliography in Lyx

text: I'm writing my PhD thesis in Lyx. I'm using a master lyx document to compile the various chapters in their own child lyx file. Each child has its own bibtex bibliography at the end. Articles should appear in order of citation in the text: "Hello [1], this [2] is [3] a text [4-7]." "Bibliography [1] Ref 1 [2] Ref 2 [3] Ref 3 ..." I'm struggling to obtain each bibliography done. Here are the problems:   1. Citations in the text are chaotic like this: "Hello [42], this [31] is [27]."    2. They should also be compact when subsequent citations are called "[4-7]"    3. Bibliography at the end has entries chaotically distributed, no matter the style I use (seems).    4. Citation of other chapters are present in each bibliography, despite different .bib have created for each chapter. Settings: both master and child docs with Sectioned Bibliography selected. For each bibliography I tried unsert, plain,... (others return errors). Citation style: default (numeric), Processor. (Default). Document class: sectcnreset,sort&compress.


title: How to scale images when imported as .tex files

text: I have quite a few diagrams created by Gnu Octave/MathLab which I need to include in a document. Octave can create several different outputs, but its PDF output is not really that nice as it has a lot of empty space above and below the diagram. I have tried to create diagrams as latex documents which in can use `\input` on, but then I can't figure out how to rescale the diagram. The most ideal solution would be to be able to scale just the image keeping the text at the same size, but if that is not possible it would also be great to be able to scale the diagram and let Octave increase the text size. How can I rescale such images when Octave creates the latex document and an EPS image and I can only include the latex document?


title: Manually installing a font map in TEXMFHOME - updmap can't find the map-file

text: I am trying to install newtx from CTAN for my user only. At first, I tried to follow the README which is available there. First of, I am using `TeXlive 2011` on `Archlinux`. I have also checked if all my `TEXMF...` variables point to the right places using `kpsewhich --var- value`:   * `TEXMFHOME` = `/home/$USER/texmf`   * `TEXMFCONFIG` = `/home/$USER/.texlive/texmf-config` Then I did the "installation":   * `mkdir -p /home/$USER/texmf/tex/latex/newtx`   * `cp -r` everything from `newtx.zip` to that file   * Create the `ls-R` by running `texhash /home/$USER/texmf/`   * Run `updmap --enable Map=ntx.map`   * Get the first error: `$ updmap --enable Map=ntx.map`:               copy /etc/texmf/web2c/updmap.cfg => /home/$USER/.texlive/texmf-config/web2c/updmap.cfg     Config file: "/home/$USER/.texlive/texmf-config/web2c/updmap.cfg"     dvips output dir: "/home/$USER/.texlive/texmf-var/fonts/map/dvips/updmap"     pdftex output dir: "/home/$USER/.texlive/texmf-var/fonts/map/pdftex/updmap"     dvipdfm output dir: "/home/$USER/.texlive/texmf-var/fonts/map/dvipdfm/updmap"     pxdvi output dir: "/home/$USER/.texlive/texmf-var/fonts/map/pxdvi/updmap"          /usr/bin/updmap is creating new map files     using the following configuration:       LW35 font names                  : URWkb       prefer outlines                  : true       texhash enabled                  : true       download standard fonts (dvips)  : true       download standard fonts (pdftex) : true       create a mapfile for pxdvi       : false          Scanning for LW35 support files  [  3 files]     Scanning for MixedMap entries    [ 36 files]     Scanning for KanjiMap entries    [  0 files]     Scanning for Map entries         [129 files]               ERROR:  The following map file(s) couldn't be found:         ntx.map              Did you run mktexlsr?              You can delete non-existent map entries using the option           --syncwithtrees.      It can't find `ntx.map`! I found this guide for installing maps on Debian, and tried to adapt it to my system. So I did the same steps as above, but now putting `ntx.map` into `/home/$USER/texmf/fonts/map/newtx/`. `updmap --enable Map=ntx.map` runs through nicely now, and I can find an entry `Map ntx.map` in `/home/$USER/.texlive/texmf-config/web2c/updmap.cfg`, as it should. But having a minimal example:               \documentclass{minimal}          \usepackage{mathtools}     \usepackage{newtxmath}          \begin{document}     \begin{equation*}         \Phi(u) = \frac{1}{\sqrt{2\pi}} \int^u_{-\infty} e^{-t^2/2} dt     \end{equation*}     \end{document}      I get a compilation error with `pdflatex` now, it can't find the font `ntxmi` (just a small excerpt from the log):               kpathsea: Running mktextfm ntxmi     /usr/share/texmf/web2c/mktexnam: Could not map typeface abbreviation tx for ntxmi.     /usr/share/texmf/web2c/mktexnam: Need to update /usr/share/texmf-dist/fonts/map/fontname/special.map?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ntxmi     This is METAFONT, Version 2.718281 (TeX Live 2012/dev/Arch Linux)               kpathsea: Running mktexmf ntxmi     ! I can't find file `ntxmi'.     <*> ...e:=ljfour; mag:=1; nonstopmode; input ntxmi          Please type another input file name     ! Emergency stop.     <*> ...e:=ljfour; mag:=1; nonstopmode; input ntxmi          Transcript written on mfput.log.     grep: ntxmi.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ntxmi' failed to make ntxmi.tfm.      What to do? **EDIT:** `kpsewhich newtxmath.sty` correctly points to `/home/$USER/texmf/tex/latex/newtx/newtxmath.sty`, and `kpsewhich ntx.map` to `/home/$USER/texmf/fonts/map/newtx/ntx.map`.


title: LyX: Paragraphs ignored in PDF output

text: I have a document with `article` class. Here's the minimal example:               #LyX 2.0 created this file. For more info see http://www.lyx.org/     \lyxformat 413     \begin_document     \begin_header     \textclass article     \begin_preamble     \usepackage{dirtree}     \end_preamble     \use_default_options true     \begin_modules     \end_modules     \begin_local_layout     Float             Type                  listing             GuiName               Listing             Placement             tbp             Extension             lol             NumberWithin          none             Style                 ruled             ListName              "List of Listings"             IsPredefined          false             UsesFloatPkg          true             RefPrefix             lst     End     \end_local_layout          \end_header          \begin_body          \begin_layout Section     Good Lorem ipsum     \end_layout          \begin_layout Standard     Lorem ipsum dolor sit amet, consectetur adipiscing elit.      In venenatis varius mauris in ullamcorper.     \end_layout          \begin_layout Standard     Integer eget lectus in nisi aliquet euismod.     \end_layout          \begin_layout Subsection     A dirtree (the cause)     \end_layout          \begin_layout Standard     \begin_inset ERT     status open          \begin_layout Plain Layout               \backslash     dirtree{%     \end_layout          \begin_layout Plain Layout          .1 Lorem ipsum.          \end_layout          \begin_layout Plain Layout          }     \end_layout          \end_inset               \end_layout          \begin_layout Section     Bad Lorem ipsum     \end_layout          \begin_layout Standard     Aliquam vitae mauris erat, in vehicula est.     \end_layout          \begin_layout Standard     Pellentesque ut justo quis lorem egestas consectetur non non felis.     \end_layout          \begin_layout Standard     Lorem ipsum dolor sit amet, consectetur adipiscing elit.      Curabitur a odio eget enim feugiat congue.     \end_layout          \end_body     \end_document      When I export the document to PDF (I'm using XeTeX and Freetype Fonts, btw) paragraphs are not indented or otherwise separated in PDF output, although in LyX everything shows as it should (all paragraphs indented except the first in a section). I tried switching from indentation to vertical space but to no avail - LyX shows everything correctly, but output PDF is unchanged. It's worth mentioning I don't use anything fancy as paragraphs, just plain Standard. Apparently the problem goes away if I remove the dirtree ERT, but I really need it (or some alternative - please suggest). What am I missing here? Any ideas? Version info:               ❯❯ xetex -version     XeTeX using libpoppler 3.1415926-2.4-0.9998 (TeX Live 2012/TeX Live for opensuse.org)     kpathsea version 6.1.0     ...     ❯❯ zypper if lyx|grep Version     Version: 2.0.5.1-2.1.2     ❯❯ zypper if texlive-dirtree|grep Version     Version: 2012.63.0.0.2svn19882-61.1


title: vim-latex: "I can't write on ..." error

text: I am using vim-latex. I compile TeX document using `\ll` command, then `\lv` to view it. It generates a PDF file. So far, so good. The problem starts when I try to modify my TeX file and compile it again with `\ll`. I get an error: > I can't write on "filename". I have to close the previously generated PDF file in order to compile again. How can I avoid this and make vim to refresh the PDF file? Any suggestions?


title: Inserting evil red code in LyX in mathmode

text: How can I put code inside a math environment in LyX. For example, I want to insert a matrix, that is created via the `\tikzpicture` command, like in the first answer from here. But if I just copy the code from there and paste it into math mode, it turns to text - I don't seems to be able to insert evil red code in math mode. I can only type (which is tiring) some of the code hand, but can't insert text like `\\\` this automatically is converted from evil red code to a text backslash. Is there any solution for this ? I would really like to have LyX display to me the matrices on the left and right, from the post of the link above, and have only the middle in evil red code. (Of course I could just put everything in evil red code, including the math stuff, but then the left and right matrices would also be in code, which would be a pity).


title: LaTeX scaling tikzpicture does not work

text: The TikZ picture in the following code does not scale correctly. It overlaps with text. If I comment out `transform canvas={scale=0.5}` then it works correctly (but I would like to scale everything).               \documentclass{article}     \usepackage{subfig}     \usepackage{tikz}     \usepackage{graphicx}               \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,       decorations.pathreplacing,decorations.pathmorphing,shapes,matrix,shapes.symbols}          \tikzset{       >=stealth',       punktchain/.style={         rectangle,          rounded corners,          % fill=black!10,         draw=black, very thick,         text width=8em,          minimum height=3em,          text centered,          on chain},       line/.style={draw, thick, <-},       element/.style={         tape,         top color=white,         bottom color=blue!50!black!60!,         minimum width=7em,         draw=blue!40!black!90, very thick,         text width=7em,          minimum height=3.5em,          text centered,          on chain},       every join/.style={->, thick,shorten >=1pt},       decoration={brace},       tuborg/.style={decorate},       node/.style={scale=0.45},       tubnode/.style={midway, right=4pt},     }                    \newcommand\schema{            \begin{tikzpicture}[node distance=.8cm, start chain=going below,transform canvas={scale=0.5}]       %\begin{tikzpicture}[node distance=.8cm, start chain=going below]         \node (preprocessing) [punktchain ]  {text text};              \begin{scope}[start branch=venstre,           every join/.style={->, thick, shorten <=1pt}, ]           \node[punktchain, on chain=going left, join=by {<-}]           (landmarks) {             \begin{tabular}{l}               text \\               text \\              \end{tabular}           };         \end{scope}              \node[punktchain, join,] (potentialfunction) {           \begin{tabular}{l}             text \\             text \\            \end{tabular}         };         \node[punktchain, join,] (query) {text};         \begin{scope}[start branch=venstre,           every join/.style={->, thick, shorten <=1pt}, ]           \node[punktchain, on chain=going left, join=by {<-}]           (input) {             text };         \end{scope}              \draw[tuborg, decoration={brace}] let \p1=(preprocessing.north), \p2=(preprocessing.south) in         ($(1.5, \y1)$) -- ($(1.5, \y2)$) node[tubnode] {           \begin{tabular}{l}             text \\             text \\           \end{tabular}         };              \draw[tuborg, decoration={brace}] let \p1=(potentialfunction.north), \p2=(query.south) in         ($(1.5, \y1)$) -- ($(1.5, \y2)$) node[tubnode] {           \begin{tabular}{l}             text \\             text \\            \end{tabular}         };           \end{tikzpicture}     }               \begin{document}          \begin{figure}            \centering       \subfloat[1 ] {  \schema }       \hspace{0.5cm}       \subfloat[2 ] {  \schema }            \caption{Comparison }                 \end{figure}          \end{document}


title: Label for y-axis on both sides of a pgfplot

text: Is there an easy way to have two y-axis labels, on both the left and right side of a pgfplots ? It is possible to create two overlapping axes, however this isn't a nice solution. Is it possible to avoid the creation of a second axis and simply create a new pgfplots key ? Here is the expected result : ![enter image description here](http://i.stack.imgur.com/LLLTQ.jpg)               \documentclass{beamer}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}          \begin{document}          \begin{tikzpicture}     \begin{axis}[ylabel=Left label]     \addplot coordinates {(0,1) (1,1)};     \end{axis}     \begin{axis}[ticks=none,ytick pos=right,ylabel=Right label]     \addplot coordinates {(0,1) (1,1)};     \end{axis}     \end{tikzpicture}          \end{document}


title: BiBTeX: I couldn't open file name 'myBib.aux'

text: My article `paper.tex` compiles fine, but `myBib.bib` doesn't.               $ pdflatex paper.tex     $ bibtex myBib     I couldn't open file name `myBib.aux'      I happen to be using TeXShop, but the command line is unambiguous. Thanks in advance.


title: How to remove parenthesis in an equation number created by \tag?

text: This is probably simple, but I can't figure it out. How can I remove the parentheses around a `\tag` in an `align` equation? I would like the second line (and only that) to contain `[2]` instead of `([2])`. A workaround would be to give it no label, to see the label `[2]` as part of the equation, and move it to the right text margin by hand. But how? `\hfill` does not insert space here.               \documentclass{scrartcl}          \usepackage[T1]{fontenc}     \usepackage[american,ngerman]{babel}     \usepackage{amsmath}          \begin{document}     \begin{align}       a &= b \\       c &= d \tag{[2]}     \end{align}     \end{document}


title: Hebrew TeXLive on Ubuntu 12.04 missing fonts

text: The installation is TeXLive on Ubuntu 12.04. I've been using a variety of source files, some of them extremely simple. I can post if necessary, but thought it might be irrelevant given the seeming ubiquity of this error. It's weird too because I had it working briefly (sort of), by deleting all the `/emph` modified Hebrew text. Then I kept screwing around with the installation and after that it stopped working again. What was I doing? Mostly tlmgr commands to update stuff. And fc commands like `fc-cache -fv`. Nothing else can think of. I've wasted way too much time on this today. Any pointers or clues greately appreciated. Anyways here's one source file:               % !TEX TS-program = pdflatex     % !TEX encoding = UTF-8 Unicode          \documentclass[10pt]{article} % use larger type; default would be 10pt          %%% PAGE DIMENSIONS     \usepackage{geometry} % to change the page dimensions     \geometry{a4paper} % or letterpaper (US) or a5paper or....           \geometry{top=.75in, right=.5in,bottom=.5in, left=.5in} % for example, change the margins to 2 inches all round     %\geometry{landscape} % set up the page for landscape      %%%   read geometry.pdf for detailed page layout information      %%%josh here: i've set these margins up for good 2 or 3 inch marginnotes.            %%% PACKAGES     \usepackage{endnotes}     \usepackage{graphicx} % support the \includegraphics command and options     \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent     \usepackage{booktabs} % for much better looking tables     \usepackage{array} % for better arrays (eg matrices) in maths     \usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)     \usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float     % These packages are all incorporated in the memoir class to one degree or another...          \usepackage[utf8x]{inputenc} % set input encoding (not needed with XeLaTeX)     \usepackage[hebrew,english]{babel}          %%%  COMMANDS     \newcommand{\hebmy}[1]{\R{#1}}     \newcommand{\heb}[1]{\begin{small}\R{#1}\end{small}}     \newcommand{\hebt}[1]{\begin{scriptsize}\R{#1}\end{scriptsize}}          %%% HEADERS & FOOTERS     \usepackage{fancyhdr} % This should be set AFTER setting up the page geometry     \fancypagestyle{test}{\fancyhf{}%         \fancyhead[RO,LE]{\thepage}%         \fancyhead[LO,RE]{test}%         \fancyfoot[R]{\scriptsize\today}         \renewcommand\headrulewidth{1pt}}          \pagestyle{fancy} % options: empty , plain , fancy     \headsep=.75in \textwidth=424pt \textheight=700pt     \renewcommand{\headrulewidth}{0pt} % customise the layout...     \lhead{\tiny George Washington \#5 \\ Jerusalem \\ \hebmy{רח ג'ורג' וושינגטון 5} \\ \hebmy{ירושלים} \\ 94187}     \chead{Joshua Cullick \\ \hebmy{יהושוע קוליק}\\ \small joshua.cullick@gmail.com}     \rhead{\tiny Analysis \& \\ \emph{Intelligent} \\ Design}     \lfoot{\tiny \today}\cfoot{ }\rfoot{\tiny \thepage}          %% SECTION TITLE APPEARANCE     \usepackage{sectsty}      \usepackage{lineno}     \usepackage{multicol}     \allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help)     % (This matches ConTeXt defaults)          %%% ToC (table of contents) APPEARANCE     \usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC     \usepackage[titles,subfigure]{tocloft} % Alter the style of the Table of Contents     \usepackage{amsmath}     \usepackage{amssymb}     \renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}     \renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape} % No bold!          %%%josh here, trying to reduce whitespace between sections, below     \usepackage[compact]{titlesec}     \titlespacing{\section}{0pt}{*0}{*0}     \titlespacing{\subsection}{0pt}{*0}{*0}     \titlespacing{\subsubsection}{0pt}{*0}{*0}     %%% END Article customizations     %%% The "real" document content comes below...      %%%%%%%%%%%%%%%%%%%%%%%%%          \date{\today} % Activate to display a given date or no date (if empty),       % otherwise the current date is printed       \begin{document}               Hello my name is \hebmy {יהושוע קוליק}               \end{document}      This is my BASH log trying to compile:                {LID: command not found     suwylie@wylie-ThinkPad-X61-Tablet:~$ sudo su     [sudo] password for wylie:      root@wylie-ThinkPad-X61-Tablet:/home/wylie# gedit     root@wylie-ThinkPad-X61-Tablet:/home/wylie# updmap-sys --syncwithtrees     Config file: "/usr/local/texlive/2011/texmf-config/web2c/updmap.cfg"     root@wylie-ThinkPad-X61-Tablet:/home/wylie# cd Desktop/     root@wylie-ThinkPad-X61-Tablet:/home/wylie/Desktop# cd texpad/     root@wylie-ThinkPad-X61-Tablet:/home/wylie/Desktop/texpad# pdflatex 20_June_sample.tex      This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)      restricted \write18 enabled.     entering extended mode     (./20_June_sample.tex     LaTeX2e      Babel  and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h     ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma     rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,      kurmanji, lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nyn     orsk, polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbia     nc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorb     ian, welsh, loaded.     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2011/texmf-dist/tex/latex/geometry/geometry.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/ifpdf.sty)     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/ifvtex.sty)     (/usr/local/texlive/2011/texmf-dist/tex/generic/ifxetex/ifxetex.sty))     (/usr/local/texlive/2011/texmf-dist/tex/latex/endnotes/endnotes.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/graphics/graphicx.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/graphics/graphics.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/graphics/trig.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/latexconfig/graphics.cfg)     (/usr/local/texlive/2011/texmf-dist/tex/latex/pdftex-def/pdftex.def     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))     (/usr/local/texlive/2011/texmf-dist/tex/latex/parskip/parskip.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/booktabs/booktabs.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/tools/array.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/paralist/paralist.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/subfig/subfig.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/caption/caption.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/caption/caption3.sty)))     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/inputenc.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/ucs/utf8x.def))     (/usr/local/texlive/2011/texmf-dist/tex/latex/ucs/ucs.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/ucs/data/uni-global.def))     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/babel.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/rlbabel.def)     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/hebrew.ldf     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/babel.def)          Package babel Warning: No hyphenation patterns were loaded for     (babel)                the language `Hebrew'     (babel)                I will use the patterns loaded for \language=0 instead.          ) (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/english.ldf))     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/lheenc.def)     (/usr/local/texlive/2011/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/sectsty/sectsty.sty          LaTeX Warning: Command \underline  has changed.                    Check if current package is valid.          ) (/usr/local/texlive/2011/texmf-dist/tex/latex/lineno/lineno.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/tools/multicol.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/tocbibind/tocbibind.sty          Package tocbibind Note: Using section or other style headings.          ) (/usr/local/texlive/2011/texmf-dist/tex/latex/tocloft/tocloft.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsmath/amsmath.sty     For additional information on amsmath, use the `?' option.     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsmath/amstext.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsmath/amsgen.sty))     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsmath/amsbsy.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsmath/amsopn.sty))     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amssymb.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amsfonts.sty))     (/usr/local/texlive/2011/texmf-dist/tex/latex/titlesec/titlesec.sty)     No file 20_June_sample.aux.     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/lhecmr.fd)     *geometry* driver: auto-detecting     *geometry* detected driver: pdftex     (/usr/local/texlive/2011/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/ifluatex.sty))     (/usr/local/texlive/2011/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/oberdiek/grfext.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))     (/usr/local/texlive/2011/texmf-dist/tex/latex/oberdiek/kvoptions.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))     (/usr/local/texlive/2011/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))          Package caption Warning: \caption will not be redefined since it's already     (caption)                redefined by a document class or package which is     (caption)                unknown to the caption package.     See the caption package documentation for explanation.          (/usr/local/texlive/2011/texmf-dist/tex/latex/ucs/ucsencs.def)     kpathsea: Running mktextfm jerus10     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input jerus10     This is METAFONT, Version 2.718281 (TeX Live 2011)               kpathsea: Running mktexmf jerus10     ! I can't find file `jerus10'.      ...=ljfour; mag:=1; nonstopmode; input jerus10          Please type another input file name     ! Emergency stop.      ...=ljfour; mag:=1; nonstopmode; input jerus10          Transcript written on mfput.log.     grep: jerus10.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input jerus10' failed to make jerus10.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font LHE/cmr/m/n/10=jerus10 at 10.0pt not loadable: Metric (TFM) file not fou     nd.                              relax      l.78 ...y name is \hebmy {יהושוע קוליק}   I tried using a variety of source files, some of my own that I know had worked from my Window7 / MiKTeX installation, some of which I found online. The following source file I found online as an example of working with Hebrew in LaTeX: Source file can be found at hebexample for this particular file the BASH log looks like:                root@wylie-ThinkPad-X61-Tablet:/home/wylie/Desktop/texpad# pdflatex hebexample\ \(1\).tex      This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)      restricted \write18 enabled.     entering extended mode     (./hebexample (1).tex     LaTeX2e      Babel  and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h     ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma     rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,      kurmanji, lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nyn     orsk, polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbia     nc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorb     ian, welsh, loaded.     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/size11.clo))     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/inputenc.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/ucs/utf8x.def))     (/usr/local/texlive/2011/texmf-dist/tex/latex/ucs/ucs.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/ucs/data/uni-global.def))     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/babel.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/rlbabel.def)     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/hebrew.ldf     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/babel.def)          Package babel Warning: No hyphenation patterns were loaded for     (babel)                the language `Hebrew'     (babel)                I will use the patterns loaded for \language=0 instead.          ) (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/english.ldf))     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/lheenc.def)     No file "hebexample (1)".aux.     (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/lhecmr.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/ucs/ucsencs.def)     kpathsea: Running mktextfm deads10     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input deads10     This is METAFONT, Version 2.718281 (TeX Live 2011)               kpathsea: Running mktexmf deads10     ! I can't find file `deads10'.      ...=ljfour; mag:=1; nonstopmode; input deads10          Please type another input file name     ! Emergency stop.      ...=ljfour; mag:=1; nonstopmode; input deads10          Transcript written on mfput.log.     grep: deads10.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input deads10' failed to make deads10.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font LHE/cmr/bx/n/14.4=deads10 at 14.4pt not loadable: Metric (TFM) file not      found.                              relax      l.10 ...�באה מכילה טקסט בעברית}}          ? ^C! Interruption.     extract@font ...ont font@name external@font relax                                                        font@name relax csname f@e...     l.10 ...�באה מכילה טקסט בעברית}}          ? x     No pages of output.     Transcript written on "hebexample (1).log".     root@wylie-ThinkPad-X61-Tablet:/home/wylie/Desktop/texpad#


title: Headings in appendix `\section*`

text: I'm using this and this approaches to get my appendix sections as I want, so a MWE of my code would look like:               \documentclass{article}     \pagestyle{headings}     \begin{document}     \tableofcontents     \clearpage     \section{abc}     def     \section{ghi}     jkl          \appendix     \clearpage     \section*{Ap: ETC}     \addcontentsline{toc}{section}{{Ap: ETC}}     \renewcommand{\thesubsection}{A.\arabic{subsection}}     App. content.          \subsection{First A.}     F. A. content.     \subsection{Second A.}     S. A. content.          \end{document}      The problem is that this makes the appendices pages heading to be the previous non-appendix section's one. One option may be to use `\pagestyle{myheadings}` and `\markboth` but, is there any more automatic solution?


title: Why am i getting a counter error while defining a Theorem environment?

text: I have this in a latex file:                  \documentclass[conference]{IEEEtran}         \newtheorem{theorem}{Theorem}      and at some point i have this:               \begin{theorem}     foo     \end{theorem}      but i am getting this error:               ! LaTeX Error: No counter 'Theorem' defined.


title: How to Align text across multiple rows

text: I wish to use the below code write the context shown as in the following picture. However, the code cannot make the text align, is there a easy way to align the text?               \begin{figure*}[t]     \begin{small}         \emph{Role Buyer \{var counter  $=$ 0; }\\         \emph{      Main () $=$ B2S!\{bch\} $\rightarrow$ Session();} \\         \emph{~~~~~Session() $=$ bch!QuoteRequest $\rightarrow$ $counter++$; bch?QuoteResonse.x $\rightarrow$ }\\         \emph{~~~~~~~~~~~~~~~if (x $\leq$ 1000) \{ ~ bch!QuoteAccept $\rightarrow$ bch?OrderConfirmation $\rightarrow$ bch?DeliveryDetails.y $\rightarrow$ Stop ~ \}} \\         \emph{ elseif (counter > 3) \{ bch!QuoteReject $\rightarrow$ Session() \} ~else~ \{ Stop \}; ~\} }\\          \} \\       \end{small}      \end{figure*}      ![enter image description here](http://i.stack.imgur.com/793jH.png)


title: How we should make index?

text: I wrote this LaTeX file with TexMaker and I don't know why there is no index in the PDF file. Please tell me where I'm wrong.               \documentclass[10pt,twoside,a4paper]{book}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \author{A H}     %define the title     \title{Modern Real Analysis}     \makeindex     \begin{document}     %generates the title     \maketitle     %insert the table of contents     \tableofcontents     \chapter{Measure Theory}     In this chapter we introduce new definitions .....     \section{Summery}          \chapter{Topologycal Aspects}     The Riesz Representation Theorem and \index{Regular Borel measures} are most important things in this chapter ....     \section{Summery}          \chapter{Lebesgue measure in $\mathbb{R}^{n}$}     This part want generalized ....     \section{Summery}     Page2 : \index{Alpha}     \printindex     \end{document}


How do I get rid of this error:               PDF inclusion: found PDF version <1.5>, but at most version <1. 4> allowed      I tried putting `\pdfoptionpdfminorversion=5` after my preamble, but nothing happens. * * * (Edit added by Andrew Stacey): I've seen this error in the following situation.   1. I created some PDFs using TeXLive2010 with the most recent stable PGF/TikZ (in case it is relevant).   2. I cropped these PDFs using `pdfcrop`, again from TeXLive 2010.   3. I sent these to another person, who included them in their document with the `graphicx` package.   4. That person used TeXLive **2009** to compile the document. (I'll need a little time to dig out a MWE! I'll need to figure out how to switch between TL2010 and TL2009 on my machine.)


title: Save region/boundbox of generated pdf as an image to disk

text: Similar to Save tikz picture to disk but more general.               ...     \SaveRegion{filename}{ ... latex code here ... }     ...      would save whatever graphics is generated by the `latex code here` to an image. I do not believe latex has such capabilities. (any post processing such as overlays and stuff would probably not be saved) Therefore, what i would like to do is be able to extract the page number and "coordinates" of the bounding box of the enclosed code which I could then use to get the image from the pdf/div/ps/etc... i.e., `\SaveRegion` gives all the necessary information to be able to extract the image after the pdf is generated(which I would also need to know how to do but it is probably straight forward). (and if `\SaveRegion` could save the image then that would probably be best) Does anyone have an idea how to implement a type of `\SaveRegion`?


title: Using usepackage twice with the same package name

text: I've seen duplicated package inclusion multiple times in questions. I've looming memories of comments like "it's a really bad thing to do" (which I couldn't find). I was wondering what are the drawbacks of doing something like this. Other than realisation like "I've deleted the `\usepackage` but my code still uses the package". Example:               \usepackage{floatrow}     ...     \usepackage{tikz,floatrow,hyperref}      What troubles can be caused that way other than "bad sourcecode"?


title: How to store and append text for later use (inside enumerate environment)

text: I'd like to make a container in LaTeX in which I can store and append LaTeX- code for later use. I have found many solutions to what I'm basically try to do (here for instance), but if they work, they stop working when you try to use it inside an enumerate environment. To make sure the solution works in my case, I've made an example that uses all relevant features the container must be capable of. In this example `\addtotraceabilitymatrixcontent` should append `#1 &#2\\\` to the `\traceabilitymatrixcontent` container.               \documentclass{article}          \newcommand{\traceabilitymatrixcontent}{}     \newcommand{\addtotraceabilitymatrixcontent}[2]     {         % something that safely appends {#1 &#2 \\}          % to \traceabilitymatrixcontent while keeping         % the references intact.     }          \newcommand{\maketraceabilitymatrix}     {         \begin{tabular}{ll}             Requirement & Validation \\             \traceabilitymatrixcontent         \end{tabular}     }          \newcommand{\reqitem}[2]     {         \item \label{req:#1} \addtotraceabilitymatrixcontent{\ref{req:#1}}{#2}     }          \begin{document}              \maketraceabilitymatrix              \begin{enumerate}             \reqitem{1}{\ref{val:1}} Requirement one             \reqitem{2}{\ref{val:2}, \ref{val:3}} Requirement two             \reqitem{3}{\ref{val:2}, \ref{val:3}} Requirement three         \end{enumerate}              \begin{enumerate}             \item \label{val:1} Test to validate requirement one             \item \label{val:2} Test to validate requirement two and three partially             \item \label{val:3} Test to validate requirement two and three partially         \end{enumerate}     \end{document}


title: Help drawing a very simple number line using TikZ

text: I want to draw a very simple number line, i found some code that got me started here. I have modified the code to get the following picture ![enter image description here](http://i.stack.imgur.com/0YpxR.png) The problem is that I want the numbers below the line to show up as {-3,2,1,0,1,2,3} but I can't figure out how to modify the following code to do this.               \usetikzlibrary{arrows}     \begin{tikzpicture}     \draw[latex-] (-6.5,0) -- (6.5,0) ;     \draw[-latex] (-6.5,0) -- (6.5,0) ;     \foreach \x in  {-6,-4,-2,0,2,4,6}     \draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);     \foreach \x in {-6,-4,-2,0,2,4,6}     \draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-3pt) node[below]      {$\x$};     \draw[*-o] (0.92,0) -- (2.08,0);     \draw[very thick    ] (0.92,0) -- (1.92,0);          \end{tikzpicture}      It would nice if I could just divide `\x` by 2 in place of `node[below] {$\x$}`, but I don't know how to do this. Thanks!


title: Making memoir Chapter entries in ToC all-caps and Appendix entries regular case, without breaking hyperref

text: I have a thesis style working, but around 10% of my code is a copy of memoir's `\def\@chapter` that lets me put all regular chapter entries in all caps, and keep appendix entries in regular case. This works, but I'd assume there was an easier way. Ideally, I'd like to have my students keep using the `\chapter` command rather than define my own document division. I've managed to find a split in the logic between chapters and appendices in memoir.cls -- chapters call the `\l@chapter` command, and appendices call the `\l@appendix` command:               \newcommand*{\l@chapter}[2]{%       \l@chapapp{#1}{#2}{\cftchaptername}}          \newcommand*{\l@appendix}[2]{%       \l@chapapp{#1}{#2}{\cftappendixname}}      I've tried adding an `\uppercase` to the first one as shown below, but doing this breaks hyperrefs -- the links are still present, but have a black border and don't link to the right place. Minimal example (comment out the `\renewcommand` for a ToC with proper links but wrong case, or leave it in for the right case and dead links):               \documentclass{memoir}     \usepackage{lipsum}     \usepackage{hyperref}     \makeatletter     \renewcommand*{\l@chapter}[2]{%       \l@chapapp{\uppercase{#1}}{#2}{\cftchaptername}}     \makeatother          \begin{document}     \tableofcontents*          \chapter{One}     \lipsum     \chapter{Two}     \lipsum     \appendix \appendixpage     \chapter{Alpha}     \lipsum     \end{document}      ![ToC with broken links](http://i.stack.imgur.com/teeeQ.png) ![ToC with links intact](http://i.stack.imgur.com/97ioa.png) * * * EDIT (2011/02/23): I've had another idea to patch `\@chapter` instead of copying all its code and making the one change. But that's failing, too. I suspect it's either because I haven't escaped backslashes or other characters properly:               \documentclass{memoir}     \usepackage{lipsum}     \usepackage{etoolbox}     \usepackage{hyperref}          \makeatletter     \ifpatchable*{\@chapter}{\typeout{Chapter can be patched}}{\typeout{Chapter cannot be patched}}     \patchcmd{\@chapter}{\protect\chapternumberline{\thechapter}\f@rtoc}{\protect\chapternumberline{\thechapter}\uppercase\expandafter{\f@rtoc}}{\typeout{Succeeded}}{\typeout{Failed}}     \makeatother          \begin{document}     \tableofcontents*          \chapter{One}     \lipsum     \chapter{Two}     \lipsum     \appendix \appendixpage     \chapter{Alpha}     \lipsum     \end{document}      which returns in the log               Chapter can be patched     Failed      SECOND EDIT (2011/02/23): working etoolbox patch is in this post, but hyperref still interferes.


title: A float is stuck (cannot be placed)

text: I am writing an article using revtex4-1, and I am facing the following warning:               MnBi.bbl|1 warning| LaTeX Warning: A float is stuck (cannot be placed) on input line 1.      (As from `vim`'s `quickfix` output, using `latexmk`) My `bib` file is fine and it is compiled fine using `bibtex`. I tried to create a minimal example, but unable to reproduce the warning. Also, while running `pdflatex`, I get same warning, but for different position, as:               Underfull \hbox (badness 10000) in paragraph at lines 322--323     []\OT1/cmr/m/n/10 This work is sup-ported by EP-SRC grant     (./MnBi.bbl [2 <./images/cellE.png> <./images/Perfect_anisotropy.png> <./images     /Mn_ExcessT.png>]     LaTeX Warning: A float is stuck (cannot be placed) on input line 1.     LaTeX Warning: A float is stuck (cannot be placed) on input line 1.     Class revtex4-1 Warning: Deferred float stuck during \clearpage processing.      How can I get rid of this warning? **edit:** This is said in the Revtex Manual:               Sometimes in L A TEX the float placement mechanism     breaks down and a float can’t be placed. Such a “stuck”     float may mean that it and all floats that follow are moved     to the end of the job (and if there are too many of floats,     the fatal error Too many unprocessed floats will oc-     cur). REVTEX 4 provides the class option floatfix     which attempts to invoke emergency float processing to     avoid creating a “stuck” float. REVTEX 4 will provide     a message suggesting the use of floatfix. If floatfix     doesn’t work or if the resulting positioning of the float is     poor, the float should be repositioned by hand.


title: Resetting glossary glsdisplayfirst

text: I'm working on a paper that includes a summary at the start of the document, and I would like to reset the `glsdisplayfirst` properties somehow, so that my glossary entries and acronyms are defined both in the summary and in the document itself. I can't seem to find a way to do this, so help is appreciated. Example:               \documentclass[oneside]{article}     \usepackage[nonumberlist,acronym]{glossaries}          \DeclareRobustCommand{\glossfirstformat}[1]{\textit{#1}}     \renewcommand*{\glsdisplayfirst}[4]{\glossfirstformat{#1#4}}     \makeglossaries          \newglossaryentry{term}{name={Term}, text={term}, description={A term that obviously needs explaining in the glossary}}     \newacronym{test}{TIAT}{This Is A Test}          \begin{document}          \section{Summary}     The first occurence of \gls{term} should be \textit{italic}.      The second occurence of \gls{term} shouldn't, though.           The full definition of \gls{test} should show just the first time, and the abbreviation afterwards, like this: \gls{test}.          \section{Rest}     The first occurence of \gls{term} should - again - be \textit{italic}.      The rest of the occurences of \gls{term} throughout the rest of the document shouldn't, though.           The full definition of \gls{test} should - again - show just the first time, and the abbreviation afterwards, like this: \gls{test}.          \printglossaries          \end{document}


title: How can I modify arrows to complement this drawing?

text: Following the answer to this question, I'm now at a point where I have very unsatisfying looking arrows. If I use the `double` option in the `\draw` command the spacing is too small, and when I increase it, the arrow heads look awful. As it stands, the arrows look weeny and out of place; I'd like wide arrows (double) with thin arrow heads. _**How can I modify the arrows - preferably in global manner - so that they are in keeping with the drawing?_** And, **_How can modify the arrows so that they are perpendicular to the surfaces they point to?_** ![enter image description here](http://i.stack.imgur.com/NKKTt.png)               \documentclass{book}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows,positioning,fit}     \pgfdeclarelayer{container}     \pgfsetlayers{container,main}          \tikzset{>=stealth}     \tikzset{         narrow/.style={draw, fill=blue!20, text width=2cm, text centered, minimum height=1cm},         small/.style={draw, fill=blue!10, text width=1.2cm, text centered, minimum height=0.625cm, draw=black!60, font=\scriptsize},         wide/.style={draw, fill=orange!20, text width=8.5cm, text centered, minimum height=1.75cm, rounded corners},         tall/.style={draw, fill=green!20, text width=1.75cm, text centered, minimum height=8cm, rounded corners},         squar/.style={draw, fill=yellow!10, text width=5.25cm, text centered, minimum height=3.5cm, rounded corners, draw=black!60, dashed}     }          \def\blockdist{5}     \def\edgedist{5}     \begin{document}     \begin{tikzpicture}       \node                 (lib)     [tall]   {Library};       \node at (3,-1)       (tman)    [narrow] {tmon};       \node                 (ksman)   [narrow] [right=.75cm of tman]   {ksmon};       \node                 (stsp)    [narrow] [right=.75cm of ksman]  {stosp};       \node                 (daemon)  [wide]   [below=.75cm of ksman]  {Daemon};       \node                 (imgan)   [narrow] [above=1.375cm of tman] {img-analysis};       \node                 (thrman)  [narrow] [above=.75cm of imgan]  {thermal-analysis};       \begin{pgfonlayer}{container}          \node              (dio)     [fill=red!10, inner sep=.35cm, fit=(tman)(stsp),  rounded corners, draw=black!60, dashed] {};          \node              (manufac) [fill=red!25, inner sep=.1cm, fit=(ksman)(stsp), rounded corners, draw=black!60, dashed] {};       \end{pgfonlayer}       \node                 (scrpts)  [squar]  [above=1.5cm of manufac.center] {};            \node                 (scrr2c2) [small]  [above=0.1cm of scrpts.center] {shell};       \node                 (scrr1c2) [small]  [above=0.2cm of scrr2c2]       {shell};       \node                 (scrr3c2) [small]  [below=0.1cm of scrpts.center] {shell};       \node                 (scrr4c2) [small]  [below=0.2cm of scrr3c2]       {shell};            \node                     (scrr1c1) [small]  [left=0.2cm of scrr1c2] {shell};       \node                     (scrr2c1) [small]  [left=0.2cm of scrr2c2] {shell};       \node                     (scrr3c1) [small]  [left=0.2cm of scrr3c2] {shell};       \node                     (scrr4c1) [small]  [left=0.2cm of scrr4c2] {shell};            \node                     (scrr1c3) [small]  [right=0.2cm of scrr1c2] {shell};       \node                     (scrr2c3) [small]  [right=0.2cm of scrr2c2] {shell};       \node                     (scrr3c3) [small]  [right=0.2cm of scrr3c2] {shell};       \node                     (scrr4c3) [small]  [right=0.2cm of scrr4c2] {shell};            \draw[<->] (manufac.north) -- (scrpts.south);       \draw[<->] (imgan.east) -- (scrpts);       \draw[<->] (thrman.east) -- (scrpts);       \draw[<->] (thrman.west) -- (lib);       \draw[<->] (imgan.west) -- (lib);       \draw[<->] (dio.west) -- (lib);       \draw[<->] (daemon.west) -- (lib);       \draw[<->] (daemon.north) -- (dio.south);     \end{tikzpicture}     \end{document}


title: Algorithm in LaTeX

text: I wrote the following algorithm, however its not compiling and throws a few errors. I am not sure of what I did wrong. Any help would be appreciated.               \begin{algorithm}         \caption{Bridging Score(BRS) Computation}         \begin{algorithmic}          Given: User-Noun Matrix $X$          \For {$i = 1 \to n$}         Let $S_i$ = {$s{i,j}$ | $0\le j \le l_i$} be set of nodes which have links to $i$;         \IF $\left({l_i=0$ OR $l_i=1 \right)}$ \THEN           $b_i=0$;         \ELSE           Compute the similarity score vectors $r_{s,1},r_{s,2},...,r_{s,l_i}$ for each $S_i=s_1,s_2,...s_{l_i}$; \\           Construct $l_i \times l_i$ matrix $R_i= \left[r_{s,1},r_{s,2},...,r_{s,l_i}\right]$;           Take the average of all non-diagonal elements in $R_i$ to obtain $\hat{r_s}$;           $b_i= 1/\hat{r_s}$;           \ENDIF      \ENDFOR      \RETURN vector $b$ of bridging scores;         \end{algorithmic}     \end{algorithm}


title: Lengthy math description in 2 column paper

text: I have some lengthy math description in 2 column paper to override the next column. ![enter image description here](http://i.stack.imgur.com/8CILQ.png) I think I need to make the math description in one column. How can I do that in 2 column mode? The code (only the math part) is something like this               \documentclass[twocolumn]{article}     \usepackage{listings}     \usepackage{graphicx}     \usepackage{amsmath}          \newcommand{\caller}[1]{\textsc{Caller}(#1)}     \newcommand{\type}[2]{\textsc{Type}(#1, #2)}     \newcommand{\getset}[2]{\ensuremath{\{\, #1 \mid #2 \, \}}}          \newcommand{\phantomstring}{\hphantom{\caller{\textbf{C}.m}}}          \begin{document}1          \begin{align*}     \rlap{\caller{\textbf{C}.$f$}}\phantomstring       &= \getset{m'}{\forall m' \to \text{invoke static field\ }  \textbf{C}.f}\\     \rlap{\type{$i$}{$m$}}\phantomstring       &= \text{returns the instantiation type of class that contains method $m$, which is invoked by method $i$}\\     \rlap{\type{$i$}{$f$}}\phantomstring       &= \text{returns the instantiation type of class that contains field $f$, which is accessed by method $i$}     \end{align*}          \end{document}


title: Latex Code for curly H used for Hausdorff dimension

text: Does anybody know the LaTeX Code for curly H used for Hausdorff dimension.


title: \mathclap not centering

text: I'm trying to stack two symbols on top of each other (not `\stackrel`) using `\mathclap` in the `mathtools` package, but the symbols are not centering:               \mathclap{\rightleftharpoons}\circ      How do I get the circle in the center of the arrows?


title: Different default color for each font in ConTeXt

text: Is there a way to specify the color along with the font name when using `simplefonts`? At the moment, I use the following to setup my default fonts.               \usemodule[simplefonts]     \setmainfont[Ubuntu]     \setsansfont[charter] % the reversal of serif and sans roles was intentional     \setmonofont[FreeMono]     \setmathfont[euler]      This is working as expected. However, I'd like to have all math to be shown in dark red. I can switch it manually every time like so:               \color[darkred]{$my+new+equation$}        1. Is there something I can add to `\setmathfont` so that it changes the color without having to type the extra color commands every time? Ideally, it should work for all the commands used for display-math and inline-math.   2. In addition to that, when the surrounding text overrides the color, the color should be in the new, overriding color instead. So, `\color[green]{Important: you need to tune $x$ to use the above.}`, should be set entirely in green.


title: PDF image files and `htlatex`

text: When `eps` files are provided, `htlatex` from `tex4ht` automatically converts to `png` files so that graphic files can be shown in the final `html` output. However, I use most of the time the `pdf` graphic file format with `pdflatex`. Is there any easy way to make `htlatex` work for `pdf` graphic files?


title: Decrease space between paragraph and header

text: ![l](http://i.imgur.com/AuUznEA.png) How can I decrease the white space marked with blue? I tried \vspace with negative marks but to no avail (it normally does the trick but not this time). I am using the 'fancyhdr'-package.               \documentclass[12pt, a4paper]{article}     \usepackage[a4paper]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern, amsmath, amssymb, fancyhdr, eulervm}          \setlength{\parindent}{0in}     \setlength{\headheight}{15pt}     \pagestyle{fancy}     \lhead{Left header, text}     \rhead{Right header, text}          \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse     cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non     proident, sunt in culpa qui officia deserunt mollit anim id est laborum.     \[     \int \!\! \int f(x,y) \, \text{d}x\text{d}y \quad \text{och} \quad \sum_{n=0}^{\infty}         \Big( n^2 + n + n! \Big)     \]     \end{document}


title: In \DeclareStringOption, what is the difference between <init> and <default>?

text: In the `kvoptions` package the following macro is defined:               \DeclareStringOption [⟨init⟩] {⟨key⟩} [⟨default⟩]      Following is the related documentation: > A macro is created that remembers the value of the key ⟨key⟩. The name of > the macro consists of the option name ⟨key⟩ that is prefixed by the prefix > (see 2.1.3). The initial contents of the macro can be given by the first > optional argument ⟨init⟩. The default is empty. The the option ⟨key⟩ is > defined. The option code just stores its value in the macro. If the optional > argument at the end of `\DeclareStringOption` is given, then option ⟨key⟩ is > defined with the default ⟨default⟩. I fail to understand what is the difference between the `default` value and the `init` one. Can someone please explain?


title: Table too wide, want to put it in another page

text: > **Possible Duplicate:**   >  table too wide for twocolumn-mode document I'm writing a two-column style conference paper, and I am having a table that's too wide to fit into a single column. I saw there are some related discussions on the forum, but I don't want to use `\scalebox` or `\resizebox` since I just have that much data to show (some high precision digits have to be shown in one table). I don't want to rotate it 90 degrees either. Is it possible to just put it into its own page? Just like figures do. I know I can add a pair of `\begin{figure}` and `\end{figure}` just for layout but it will mess up `caption` and `ref`.


title: Create a "yearbook-style" multi-page layout of photos

text: I would like to create a "yearbook-style" layout of photos in LaTeX. Each photo would have a caption and the objective would be to automatically layout the differently sized rectangular photos to minimize the whitespace on the page (with a mandatory margin around each photo and caption). If I could do this with a browser as well that would also be helpful, but that is a question for a different forum. I would have expected this problem to be solved problematically with some kind of open sourced package but I have found none. ![enter image description here](http://i.stack.imgur.com/JT2jP.gif) Survey of 2D packing algorithms


title: Extra line of vertical separator using itemize in tabular

text: I'm creating a resume based off of the example tutorial HERE. It's fairly simple, actually -- just a two columned table with dates on the left and job on the right. I prefer bullets vs. a paragraph for the explanations, and also liked the look of a vertical seporator, so I tried to go with something like this:               \begin{tabularx}{0.97\linewidth}{>{\raggedleft\scshape}p{2.75cm}|X}          \small{09/2008 -- Present} & \textbf{Title} \\     & Company Name Here $\cdot$ City, State     \begin{itemize}[itemsep=4pt,parsep=0pt,topsep=3pt]         \item Some stuff that I did to fill in a bullet.         \item Some more stuff that I did just to make sure I have one example of a two           line bullet here for variety's sake.     \end{itemize} \\     \end{tabularx}      I'm using the enumitem package to play with itemize spacing, and this is the tabularx package. as recommended in the linked blog post. I get an extra line of vertical separator in the table when I do this, like so (see how the separator carries down about a line after the text stops?): ![shot of extra separator line](http://i.imgur.com/YB2wh.png) I also tried switching to regular 'ol tabular but got the same results:               \begin{tabular}{r|p{13.7cm}}          \small{09/2008 -- Present} & \textbf{Title} \\     & Company Name Here $\cdot$ City, State     \begin{itemize}[itemsep=4pt,parsep=0pt,topsep=3pt]         \item Some stuff that I did to fill in a bullet.         \item Some more stuff that I did just to make sure I have one example of a two           line bullet here for variety's sake.     \end{itemize} \\     \end{tabular}      Lastly, on a fluke, I had an extra end brace inserted in tabular and found a magic fix! Switching that `\end{tabular}` to `\end{tabular}}` gave some errors, but gives me this: ![shot of proper separator](http://i.imgur.com/q6wdY.png) See the difference? I tried the same with tabularx (since it makes an easier time for specifying widths and such), but it doesn't even render the table with them present. Any thoughts as to what's going on and how I can legitimately get rid of that extra line without "cheating"? In my skimming, I ran across people trying to get rid of _top_ whitespace in tables (like HERE), but using the `\compress` trick didn't fix my problem either.


title: Using the alt+number symbols in windows

text: I recently discovered at that one can make many symbols by pressing `Alt` + `num pad`. I then tried to insert these symbols into my latex file, and it compiled, but just seemed to insert a space there. The symbols I am talking about are: `☺☻♥♦♣♠•◘○` (Alt + 1-9). They show up in my editor (winEdt 8). MWE:               \documentclass{article}     \begin{document}     ☺☻♥♣♠•○     \end{document}


title: Pagebreak at the end of a page

text: I have reproduced a simple example, which shows my spacing problem. Description: The page is completely filled with text, only 1-2 words go over to the next page, despite it looks as if there was enough room on the previous page left. How can I solve this? I realized one solution is `\vspace*{-x pt}`, but I don't know if it is ideal. I believe many of you faced this case before. What is the correct way to deal with it? MWE:               \documentclass[a4paper, 12pt, headsepline]{scrreprt}     \usepackage[onehalfspacing]{setspace}     \usepackage{amsmath, amssymb, mathtools}     \usepackage{mathptmx}     \usepackage[a4paper,showframe]{geometry}     \geometry{left=2cm,right=5cm,top=2cm,bottom=2cm}     % \usepackage{lipsum} %\lipsum     \usepackage[pangram]{blindtext}          \begin{document}     \Blindtext[1][4]%1 paragraph, 3 pangrams     Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem     % \vspace*{-1pt}     \end{document}      If you uncomment the line `\vspace*{-1pt}`, you will see that it works. But I am not sure if this is harmless or the best way. Edit: I need to keep the `geometry` values, so if possible, the solution should remain them as they are. Thanks.


title: Different alignment in one column of longtable

text: I have a longtable with this row ![enter image description here](http://i.stack.imgur.com/z59pA.png)               \begin{center}     \renewcommand{\arraystretch}{1.75}     \begin{longtable}{c|c|c}     ...     $x^\alpha$ & $\frac{x^{\alpha+1}}{\alpha+1}+c$ & \multicolumn{1}{l}{$\left\{\begin{tabular}{@{\ }l@{}} 1 \\ 2 \\ 3     \end{tabular}\right.$} \\ \hline     ...     \end{longtable}     \end{center}      I need to let the brace on the left of column but I would like to have 1, 2, 3 in the middle of column. How to do that? Thank you!


title: Repeated Access Statement "Visited on" in biblatex-chicago

text: While trying the different biblatex referencing styles in texlive 2012, I came upon what I think might be a bug in biblatex-chicago. The access phrase "Visited on" was repeated. Has anyone had the same experience? Here is the code               \documentclass{article}          \usepackage[style=chicago-authordate,backend=bibtex,]{biblatex}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @online{fat,     author = {},     title = {Fat Secret},     date = {2012},     urldate = {2012-02-24},     url = {http://www.fatsecret.com/Diary.aspx?pa=fjrd&rid=2647991}     }     \end{filecontents}          \addbibresource{\jobname.bib}          \nocite{*}          \begin{document}               \printbibliography          \end{document}      Sorry but I can't post pictures yet according to moderator. :)


title: Problem with Preview using TeXlipse in Mac OS Snow Leopard

text: I basically configured everything as indicated in this website but I cannot get to preview my document. When I click on Latex > Preview Document I get an error message indicating: > Launching preview document in yap' has encountered a problem. Could not > start previewer yap. Please make sure you have entered the correct path and > filename in the viewer preferences Details are: > Could not start previewer 'yap'. Please make sure you have entered the > correct path and filename in the viewer preferences. Cannot run program "" > (in directory "/Users/ohd/Documents/workspace/Seminar"): error=2, No such > file or directory This is one of the preview programs listed on the Viewer Settings, but I have acroread in the 1st place. Any ideas on how to solve this?


title: How to draw the Queen's moves on a chessboard?

text: I saw on the Internet a lecture with the title 8 QUEENS PROBLEM USING BACK TRACKING. There is a drawing of the Board following. How to make this using the Latex? (I tried using the package Chessboard, but the result is very different)               \documentclass{article}     \usepackage{chessboard}     \storechessboardstyle{8x8}{maxfield=d8}     \begin{document}     \chessboard[style=4x4,setwhite={Qd4}, pgfstyle=straightmove,     arrow=to,linewidth=0.2ex,     color=red,     pgfstyle=straightmove,     markmoves={d4-h8,d4-a7,d4-a1,d4-g1,d4-d8,d4-d1,d4-a4,d4-h4},     shortenstart=1ex,showmover=false]     \end{document}      ![enter image description here](http://i.stack.imgur.com/yooWe.jpg)


title: How to refer to the count value of number of lines in a lstlisting

text: I need to refer to to the count value of the number of lines in a listing. Is there a way to do that ?                   \lstinputlisting[caption={SPARQL query used...},label={lst:sqry}]{codes/sparql_query.sparql}      I can refer to this listing in a document by using \ref{lst:sqry}, but I need to be able to automatically count the number of lines in that listing and refer to the value. I would deeply appreciate any help.


title: How to modify the "x" of the fraction to the same size of the first one?

text: Here is a screenshot from a `beamer` file. I want to change the "x" of the fraction to the same size of the first "x". Anyone can help?               \documentclass[mathserif,10pt]{beamer}      %\usecolortheme[named=Plum]{structure}      %\documentclass{beamer}     \usetheme{CambridgeUS}     \setbeamertemplate{navigation symbols}{}     %\setbeamertemplate{headline}{}     \setbeamertemplate{items}[square]     %\setbeamerfont{title}                    %\setbeamertemplate{footline}{}          \usepackage{CJKutf8}     %\usepackage{CJKspace}     %\usepackage{amsmath}     \usepackage{latexsym,bm,amsmath,amssymb}          %\setbeamertemplate{navigation symbols}{}      \mode <presentation>          %\title[TINLPN]{There Is No Largest Prime Number}     %\author[赵]{赵moumou \\ \texttt{euclid@123.com}}     %\date[ISPN'80]{27th International Symposium of Prime Numbers\\}          \begin{document}          \begin{CJK}{UTF8}{gbsn}               %%     \title{专题Largest Prime Number}     \author[赵]{赵moumou \\ \texttt{euclid@tokoyo.edu}}     \institute[UMBC]{UMBCdjskfljadfl}     \date[2013-07-09]{27th International Symposium of Prime Numbers}     %%     %%第一个frame     \begin{frame}                    \titlepage     \end{frame}               %第二个frame     \begin{frame}       \frametitle{Frame名称}       \tableofcontents[pausesections]     \end{frame}               %About Section and Subsection     %\section{Motivation}     %\subsection{The Basic Problem That We Studied}               %%第三个frame%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{frame}[t]       \frametitle{What Are Prime Numbers?}                   \begin{definition}         A \alert{prime number} is a number that has exactly two divisors.        \end{definition}         \pause       \begin{exampleblock} {例子}         \begin{itemize}         \item 2 is prime (two divisors: 1 and 2).           \pause         \item 3 is prime (two divisors: 1 and 3).           \pause         \item 4 is not prime (\alert{three} divisors: 1, 2, and 4).         \end{itemize}        \end{exampleblock}     \end{frame}          %%第四个frame%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{frame}[t]     \frametitle{}     例题：\\     \small{$f'(x)=3x+89$}     已知$g(x)=x+\tfrac{1}{x}-lnx$\\好题     \end{frame}          \end{CJK}     \end {document}      ![enter image description here](http://i.stack.imgur.com/oYFHE.png)


title: How to insert the database information in biblatex-mla?

text: Here is the full citation information: > Port, Larry. "Four Ways to Eliminate Procrastination." Law Practice: The > Business of Practicing Law 36.5 (2010): 18. Academic Search Complete. EBSCO. > Web. 8 Sept. 2011. And here is my bibtex code:               @ARTICLE{why_not_procrastinate,        AUTHOR  = {Larry Port},        TITLE   = {Four Ways to Eliminate Procrastination},        YEAR    = {2010},        JOURNAL = {Law Practice: The Business of Practicing Law},        VOLUME  = {36},        NUMBER  = {5},        PAGES   = {18},        COPYRIGHT = {Academic Search Complete. EBSCO. Web. 8 Sept. 2011}     }      But here is my output: > Port, Larry. “Four Ways to Eliminate Procrastination.” Law Practice: The > Business of Practicing Law 36.5 (2010): 18. Print. So... Where does "Print." comes from, and how could I replace it with "Academic Search Complete. EBSCO. Web. 8 Sept. 2011."?


title: Usage of central documentation system for TeXLive distribution (texdoc)

text: Recently, when peeking over the shoulder of someone who has years of experience working with TeX, I saw him type something into the terminal that caused a pdf with the documentation for a LaTeX package we were working with to open. I asked if he had a central utility for finding the documentation for a package, his answer was: "Yes, it's called `texdoc`, look into it." We then kept doing our thing, and since his time for me is limited, I didn't further inquire and figured I'd find out on my own. And so I tried, but can't seem to get the hang of it. I have a full working installation of TeX Live 2012 set up, and get this output:               $ texdoc     /usr/local/texlive/2012/bin/i386-linux/texdoc:7: module 'texdoc.main' not found:     no field package.preload['texdoc.main']     [kpse lua searcher] file not found: 'texdoc.main'     [kpse C searcher] file not found: 'texdoc.main'     [kpse All-in-one searcher] file not found: 'texdoc'      So apparently something is missing or not configured, as far as I can tell. I made sure that I had also installed the documentation, and `tlmgr` confirmed this. Considering this mentor of mine is already an older gentleman, is this software maybe outdated? Or (what seems more plausible) am I just doing it wrong? ### Follow-up problem 1 [solved] Thanks to David Carlisle's answer, I seem to have resolved the issue of `texdoc` not working properly. However, now all I get is the following:               ~$ texdoc geometry     Sorry, no documentation found for geometry.     If you are unsure about the name, try searching CTAN's TeX catalogue at     http://ctan.org/search.html#byDescription.      **EDIT/SOLVED:** Since I had installed the `medium` scheme originally, there was no documentation for all the packages that were downloaded then. A reinstallation of TeXLive fixed that problem.


title: Putting animations into latex beamer presentation. Use png, gif?

text: I need to put an animation into a slideshow I am making using the beamer package for LaTex. Ideally I would like it to loop and play again and again like a GIF, but anything similar would work as well. I used MatLab to generate the figures (right now I just have a sequence of pictures, but I should be able to put it into any format necessary). I know there is an animator function in beamer, but I've no idea how to really use it. I've also seen some places that using PNG files can accomplish the same result as GIF's, but once again I'm not sure how to do this. I found a similar question on this site, but they seem to have LaTex generating the figures??? Besides when I copied the code into my editor it didn't run. I really like the format of the animation in this example, but no idea how to adapt it to work for me. Here is the link to the page: Similar Question with Answer. Any advice would be greatly appreciated.


title: How to send an email with LaTeX

text: Risking of this question being closed, I'm just wondering if any of your use ---or know--- of any email platform that supports writing in LaTeX. I made a quick search around the site and found this question: LaTeX on Gmail (GmailTex?) So I'm guessing Gmail is not supporting it... or at least that seemed so as of 2012. Maybe this changed in the last year? But what about other services? Do you know if Yahoo!, hotmail, or any other in particular is capable of handling it? How do you send e-mails with LaTeX? PS: Using an editor and then attaching the pdf is not a valid answer :P


title: What is the difference between unicode-math and mathspec?

text: I'm currently typesetting my lecture notes for classical electrodynamics using the `tufte-book` class and XeLaTeX. This is my first time using XeLaTeX and so I stumbled upon the two packages `unicode-math` and `mathspec`, when it came to include an OpenType math font (here TeX Gyre Pagelle Math). I browsed the documentation of the two packages a little bit, but wasn't able to find out, which is the "better practice" to use. **Question:** Should I use `unicode-math` or `mathspec` for my XeLaTeX documents?


title: How to show a symbol from amssymb package in XeLaTeX?

text: I would like to use the `\bigstar` symbol (`amssymb` package) as bullet (`itemize` environment) in Beamer using XeLaTeX but I cannot get it. Any solutions?


title: bug? unwanted gap in 2nd columnset

text: (Disclosure: I posted this question on the NTG ConTeXt mailing list before the weekend. I have not received any replies yet, so now I'm asking here.) We have a document where a gap occurs in a columnset under certain conditions. It seems to be a confluence of:   * 2 sections, each with 2-column columnsets   * The first section ends in the first column of an even page, or the second column of an odd page.   * the 2nd section has a tighter interline space (which we normally accompany with a smaller font setting, but that's not required to exercise the bug) The symptom of the problem is that on the first page of the second section, a gap appears (where gridlines 50 and 51 are, if you turn on `\showgrid`). Screenshot of the problem: ![Gap across first page of second section](http://i.stack.imgur.com/w1CJ0.png) It may be a coincidence, but 50 is also the number of lines per page in the first section. We've found that "coincidence" to be true even with different page and font sizes. Can anyone tell us a way to get rid of the gap? We've tried things like               \setupcolumnsetlines[columnsetbibliography][4][1][-1]     \setupcolumnsetlines[columnsetbibliography][5][2][-1]      with various values for the last parameter, but nothing helps. Below is a small, self-contained sample. We're using mkii, but a similar gap appears when we use mkiv. Version information:               This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012)     (format=cont-en 2012.11.14)  13 SEP 2013 11:38     ConTeXt  ver: 2012.05.30 11:26 MKII  fmt: 2012.11.14  int: english/english      The example document:               \setupinterlinespace[line=12pt]          \definecolumnset[columnset1][n=2]     \setupcolumnset[columnset1][distance=5mm,balance=yes]          \starttext          \section{Introduction}     \startcolumnset[columnset1]         \dorecurse {7} { \input knuth }      \stopcolumnset          \section{Bibliography}     \setupinterlinespace[line=9.3pt]     \startcolumnset[columnset1]         \dorecurse {10} { \input knuth }     \stopcolumnset          \stoptext      Many thanks... We are nearing the finish line on this long project, but have not been able to find a workaround for this problem.


title: Splitting a string greedily

text: I would like to split a string on a certain character, say `/`, but with the first part being matched greedily. In other words, my first approach               \makeatletter     \newcommand{\splitstring}[1]{\@mysplit#1\@nil}     \def\@mysplit#1/#2\@nil{First: #1 -- Second: #2}     \makeatother      on `\splitstring{1/2/3}` leads to `First: 1 – Second: 2/3`, whereas I want it to result in `First: 1/2 – Second: 3`. Is there a simple TeX solution for that?


title: amsmath "\substack"-command in section title

text: I do use the `\substack`-command in text for creating a small (2,1)-Vector. Unfortunately it does not work in the title of a section. Here a minimal example, which does not work:               \documentclass{scrreprt}     \usepackage{amsmath}     \begin{document}     \section{$\substack{ a\\b }$}     \end{document}      To my surprise it works, if I use `\section*` instead of `\section`. I am far from understanding enough about TeX to tell why this happens, but can anyone give me an advise how I can fix it? PS: I also tried to substitute `\substack` by `smallmatrix`, which did work for the first two times I compiled the file. After the third compilation I got the same problems. EDIT: The Problem was solved, using the `\protect`-command. But now I want to use the same sectiontitle for a beamer presentation, using the `beamer`-class. Also using the `\protect`-command I receive an error. How can I solve this?


title: How do I use \hfill and \maketitle without creating a blank page?

text: I'm trying to put my name in the right-hand side of the header and have a title that is not on its own page. When I put `\hfill` before `\maketitle`, I get a page with just the header, followed by the rest of the document. When I put it after, LaTeX prints the header below the title. I tried using `\nopagebreak[4]` but it didn't make a difference. How can I get the header to print above the title on one page? This is the start of my code:               \documentclass[12pt]{article}     \usepackage{tikz, amsmath}     \title{My title}     \author{}     \date{}     \setlength{\parindent}{.5in}     \pdfpagewidth 8.5in     \pdfpageheight 11in          \usepackage[left=1in,top=1in,right=1in,bottom=1in,nohead]{geometry}          \begin{document}     \hfill My Name     \maketitle


title: How do I generate a symbol that is like ː (\textlengthmark) with a small circle exactly in the middle?

text: I would like to generate a symbol that is `tipa`'s `\textlengthmark` with a small circle overlaid perfectly in the middle, so that the symbol has vertical and horizontal symmetry. How do I do this? (I have a suspicion that `tikz` will help, but I am not sure whether this machinery is really needed.) Some clarifications:   * The symbol should scale to arbitrary sizes. (I am using `anyfontsize`.)   * The circle should be small, that is I _don't_ want `\text{\textcircled{\\(\Utextlengthmark\\)}}` (with an enclosing circle).   * There are a couple of similar questions here, but the point is that I don't want to have to manually adjust the vertical alignment. There should be a way of having TeX automatically match their horizontal _and_ vertical centers. Also, if I use a manual shift amount for a `\raisebox`, that's not gonna work in a subscript context etc. (I never figured out how to get manually scaled and shifted symbols to automatically "work" in subscripts.) * * * The following code (adapted from here)               \documentclass{memoir}     \usepackage[T3,T1]{fontenc}     \usepackage[noenc,safe]{tipa}          \def\typeC{\mathrel{%         \mathchoice{\TYPEC}{\TYPEC}{\scriptsize\TYPEC}{\tiny\TYPEC}%     }}     \def\TYPEC{{%         \setbox0\hbox{\textlengthmark}%         \rlap{\hbox to \wd0{\hss\(\circ\)\hss}}\box0     }}          \begin{document}          \(\typeC + S_{\typeC}\)          \end{document}      has two problems:   * The `\circ` is too large; about half the size would be desired.   * The `\circ` is not vertically centered.


title: Pandoc-generated PDF contains large images, how can I make them fit into the page?

text: I am using pandoc to generate pdf output out of my markdown code. So far, it works fine without any warning or error, except the fact that figures are large, so that some figures get cut and don't fit in the page. I need to rescale all figures by say 40% reduction. How can I enforce this? Where do I specify such information?


title: Is it possible in beamer to darken all colors on an inserted pdf image?

text: I'm using \includegraphic{image.pdf} to insert an image into a Beamer presentation. The image that I have is a drawn diagram that was scanned. Part of the diagram is sketched in light blue which looked alright on the piece of paper but is washed out by surrounding white paper around it once scanned. Is there a way in beamer to darken all colors of an pdf image?


title: It doesn't displayed \section name, number... at header in \tcolorbox

text: I am trying about section's in tcolorbox. My code is               \documentclass[a4paper,twoside,openright,11pt]{scrbook}     \usepackage[left=1cm,right=1cm,top=3cm,bottom=1.5cm,marginparwidth=6cm,marginparsep=.5cm,     outer=7.5cm]{geometry}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage{color}     \usepackage[svgnames]{xcolor}     \usepackage[listings,skins,breakable,hooks,theorems]{tcolorbox}     \usepackage{mhsetup}     \usepackage{mathtools}     \usepackage{amssymb}     \usepackage{ifoddpage}     \usepackage{fancyhdr}     \usepackage{lipsum}          \pagestyle{fancy}     \fancyheadoffset[LE,RO]{\marginparsep+\marginparwidth}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{ #1}}     \fancyhf{}     \fancyhead[RO]{\textbf{\nouppercase{Section \thesection{}}\quad\textcolor{orange}{$\blacksquare$}\quad}\textit{\rightmark}\quad\quad\textcolor{blue}{\textbf\thepage}}     \fancyhead[LE]{\textcolor{blue}{\textbf\thepage}\textbf{\quad\quad\nouppercase{Chapter{ }\thechapter\quad\textcolor{orange}{$\blacksquare$}\quad}}\textit{\leftmark}}     \fancypagestyle{plain}{%     \fancyhead{} % get rid of headers     \renewcommand{\headrulewidth}{0pt}     }          \begin{document}     \chapter{Hello}     \lipsum[1-7]          \begin{tcolorbox}[enhanced,interior style={left color=red!20!yellow,right color=black!40!white},leftrule=0mm,frame hidden,left=0mm,right=0mm,top=-1mm,bottom=1mm,arc=2mm]\textit{\section{Coulomb’s Law}}     \end{tcolorbox}          \lipsum[1-7]          \begin{tcolorbox}[enhanced,interior style={left color=red!20!yellow,right color=black!40!white},leftrule=0mm,frame hidden,left=0mm,right=0mm,top=-1mm,bottom=1mm,arc=2mm]\textit{\section{Heron's Law}}     \end{tcolorbox}          \lipsum[1-7]     \section{Leva's Law}     \lipsum[1-7]     \end{document}      But, it doesn't display `\section` name, number... at header in `\tcolorbox`. In the other hand it does display `\section` name, number... at header in not `\tcolorbox`. That is, In the 3. page, section information is not displayed. In the `\section{Leva's Law}` working but other sections not working. It may be the solution this problem? ...EDITED... Page 3 and page 4 good working. ![enter image description here](http://i.stack.imgur.com/iX08Q.png) But I wrote @Christian Hupfer's codes, displayed following the picture. **Section 1.10** is not _Test_ section. ![enter image description here](http://i.stack.imgur.com/Pm5Hi.png)