title: Color Gradient between block and blocktitle leave a white line

text: ![enter image description here](http://i.stack.imgur.com/Oi06v.png)![The color gradient between the block title and block body in beamer leaves a small white line to the far left of where the color-gradient bar used to be I used these four lines at the beginning of my page to make more visible.               \useinnertheme{rounded}      \makeatletter     \pgfdeclareverticalshading[lower.bg,upper.bg]{bmb@transition}{-1cm}{color(0pt)=(white_pink); color(0pt)=(white_pink); color(2.7pt)=(white_pink)}     \makeatother      I can remove the distance between the block, but the small white line at the left on block remains. How do I remove this little white line on left between the block-title and the block-body?


title: Comment out input files through flags

text: Following up on a previous question about universal processing of some hundreds of exercises to prepare for my students has arisen a new problem that I try to resolve ... however the fact is that I do not know if LaTeX can handle what I try to do nor know how to do it ... Εach exercise is a separate small file, and refers to the entire spectrum of physics. I have input some **flags** within these separate files, such as energy, entropy, solid body, etc. so that I can sort these. **Well my question.** Is there a way through these flags that can be used to printed only the input files that refer to a flag that I will choose in the main document without printing all other files? Νamely if I want only exercises containing **flag entropy** Is there a way to not print the `exercise.436` that does not contain **flag entropy** ... say something like `\chose{entropy}`               \documentclass[12pt]{book}     \usepackage{xcolor}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %% This piece of code its from previous question     %% And is due to @egreg          \newif\ifflags     \long\def\flags[#1]{%       \ifflags       \par       \begingroup       \let \\ \par        \color{red}\small\\ \textbf{Flags: #1}%       \par\medskip       \endgroup       \fi}          \flagstrue  % comment out for don't appears the flags     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \input{exercise.435.tex}     \input{exercise.436.tex}          \end{document      The files `exercise.435` at the beginning contains the following lines               \flags[energy, entropy, solid.boby]     here is the text of exercise.435.tex      The files `exercise.436` at the beginning contains the following lines               \flags[energy, solid.boby]     here is the text of exercise.436.tex      ![enter image description here](http://i.stack.imgur.com/Y2uoa.png)


title: Fraction whose items are words

text: I have troubles writing a fraction whose items are words not numbers. In a nutshell I should write:               minaccia/vulnerabilità   --> this is the numerator     ----------------------      contromisure             --> this is the denominator      I simply do this, but it doesn't work.               \[     \frac{minaccia/vulnerabilit\'a}{contromisure}      \]      Can anyone help me?


title: How to mantain consisten font size in different plots

text: I usually embed numerous `R` plots in my TeX documents. `knitr` is very handy in helping me producing plots using the same font family of the TeX document. But a different problem of consistency is given by the font _size_ : still I haven't found a way to maintain the same font size independently from the size of the containing box. For instance I might have a plot that extends horizontally over 90 percent of the paper width and then another that will only extends over 45 percent; usually this will result in plots with different font sizes. I can of course go back to the `R` script and tweak the size values until I get the right size but I wonder if there's a smarter solution to set the font size of the plots for the whole document without modifying the plots' source scripts.


title: Latex Enumerated List referencing

text: In latex, when I'm trying to cross reference an item from an enumerated list, instead of getting 6.3, I'm getting 66.3, My list is a normal list just like any other, only I'm declaring the codes below in my preamble:               \renewcommand{\labelenumii}{\theenumii}     \renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}


title: Numerical calculations using PSTricks

text: Assume I have defined a constant `\valueA` as               \def\valueA{25 2 sqrt sqrt mul }      I would like to devide this value by the square root of 2, so I tried               \pstFPdiv\valueB{\valueA}{2 sqrt}      but this is not valid notation. What is the correct way to define the constant `\valueB` as `\valueA`/sqrt(2)?


title: Smart quote in TeXstudio

text: A useful feature of TeXworks is the smart quote. Does TeXstudio have a similar feature? (to replace `""` and `''` with their Unicode opening and closing counterparts)


title: printanswer in table in exam class

text: In the exam class there is an option to `\printanswer`. I have no problems with that, but when I work with a table I can not put the answers in the cells.               \documentclass[11pt,a4paper,addpoints,twoside]{exam}      \noprintanswers     \printanswers     \setlength\answerclearance{1ex}     \renewcommand{\solutiontitle}{\textbf{Oplossing:}\par}     \pointpoints{punt}{punten}     \pointsinrightmargin     \boxedpoints     %\noboxedpoints     \begin{document}     \begin{questions}     \question[6] Vul aan met de juiste waarde      \renewcommand{\arraystretch}{2} %verhoogt de rijhoogte     \begin{center}     \begin{tabular}{|c| c|  p{3cm}| p{3cm} | p{3cm}|}     \hline     a&b&7b&a+b&2a+b\\     \hline     \hline     5&2&&&\\     \hline     1&4&&&\\     \hline     \end{tabular}     \end{center}     \end{questions}     \end{document}      ![enter image description here](http://i.stack.imgur.com/HR8UN.png)


title: How to correctly pad and align a displaystyle inline equation in a table

text: I've got the following code in a document and am at a loss trying to figure out how I can correctly pad the cells and/or align the equations correctly.               \begin{table}[h]     \begin{tabularx}{\columnwidth}{ |X|l| }         \hline         \textbf{Measurement} & \textbf{Equation} \\         \hline \hline         Euclidean distance between the shape model parameters vector for all landmarks $b$ and without the current landmark $b'$ & $\|b-b'\|$ \\         \hline         Average point-wise distance between the matched shape for all landmarks $\bar{x}$ and without the current landmark $\bar{x'}$ & $\displaystyle \frac{\sum_{i=1}^{3(m-1)}\bar{x}_i-\bar{x'}_i}{3(m-1)}$\\     \hline     \end{tabularx}     \caption{Landmark influence measurements.}     \label{tab:1}     \end{table}      This gives me the following output: ![Not so nice looking table](http://i.stack.imgur.com/JoBGv.jpg) Whereas I'd much prefer something like this: ![Much better looking table](http://i.stack.imgur.com/xGLNH.jpg) As you can see, the differences are the vertical padding of the left column and the alignment of the equations in the right column. Can someone point me in the proper direction on this one?


title: Can I make LyX automatically use 'smart' parentheses [\left( \right)] in math mode?

text: When I type in math mode I always prefer to use the parentheses using `\left` and `\right`. Currently, I go into math mode and then press the button on the ribbon that appears in this mode and creates these type of parentheses. I would prefer that when I type in `(` or `)` it would automatically insert `\left` or `\right` accordingly. Is there a way to do so ? I would prefer a way that would not require me to do it for each new document I start. Any help is greatly appreciated!


title: How do I add Hebrew support to TeXLive on Windows (with pdfTeX+babel)?

text: I just downloaded & installed TeXLive 2012 on my Windows 7 box, including Hebrew language support. I then tried to process the following document:               \documentclass{article}     \usepackage[english,hebrew]{babel}     \begin{document}     \L{Hello World}, שלום עולם.     \end{document}      And got the well-known: > (d:/texlive/2012/texmf-dist/tex/generic/babel/lhecmr.fd)name = jerus10, > rootname = jerus, pointsize = 10 mktexmf: empty or non-existent rootfile! > > kpathsea: Running mktexmf jerus10.mf > > The command name is D:\texlive\2012\bin\win32\mktexmf Cannot find > jerus10.mf. > > ! Font LHE/cmr/m/n/10=jerus10 at 10.0pt not loadable: Metric (TFM) file not > found. What are the **step-by-step** instructions for making pdfTeX+babel+Hebrew work after installing TeXLive? **Notes:**   * Suggestions that I use LuaTeX/XeTeX instead are not relevant here (for various reasons).   * See also this question.   * instructions which include both the Culmus and pre-Culmus fonts (Jerusalem, Tel-Aviv, etc.) would be best.


title: Just a part of TOC must be shown, beamer

text: Before I start talking about a new section, I would like to show de TOC whereby the part (section) that I will talk about is shown? So I would like that the rest is only vague opposite the section I will talk about. Can somebody help me? Silke


title: How to get two columns in \cvline?

text: I want to add certifications to my cv with a column with the names and a second column with the dates, currently I have:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[green]{classic}                       \usepackage[utf8]{inputenc}                       \usepackage{floatflt}     \usepackage{fancyhdr}      \usepackage{geometry}     \geometry{a4paper,left=2cm,right=1cm, top=2cm, bottom=1.5cm,headheight=21pt}      \usepackage{tikz}      \usepackage{wrapfig}     \usepackage{lipsum}      \firstname{test}     \familyname{test}     \begin{document}          \section{certifications}     \cvline{Microsoft}{Microsoft SharePoint 2010 Sep 19, 2011\newline Microsoft Word 2010 Expert Sep 14, 2011\newline Microsoft Access 2010 Sep 05, 2011\newline Microsoft PowerPoint 2010 Aug 29, 2011 \newline Microsoft Excel 2010 Expert Aug 09, 2011\newline Microsoft Excel 2010 Jul 14, 2011\newline Microsoft Office Master Specialist Sep 14, 2011}     \cvline{SAP}{test}     \clearpage          \end{document}      This looks like ![t1](http://i.stack.imgur.com/r1wLb.png) But I want to have two columns so that it looks like:               Certification 1                              Date 1     Certification 2                              Date 2      So basically two columns, so that there is a space and that it looks better with this alignment into two columns. How can I get this?


title: I cant get mathptmx to work:

text: I have wasted one whole working day trying to get `mathptmx` to work. In texmaker I get this error when doing a quick build or pdflatex:               ! I can't find file `rsfs10'. <*> ...:=ljfour; mag:=1; nonstopmode; input     rsfs10 Please type another input file name ! Emergency stop. <*> ...:=ljfour;     mag:=1; nonstopmode; input rsfs10 Transcript written on mfput.log.      First I installed the most recent version of texlive with default settings (that thing is huge). Then I fought forever trying to get tlmgr to run. I can finally run that. Then elsewhere on this website, somebody suggested:               ~$ tlmgr install rsfs     tlmgr: package repository http://ctan.uib.no/systems/texlive/tlnet      and               ~$ tlmgr install times     tlmgr: package repository http://ctan.uib.no/systems/texlive/tlnet      which got me no further. Then I downloaded the `freenfss.zip` and `lw35nfss.zip` from CTAN, and extracted them to both `/etc/texmf` and `/usr/share/texmf`, and it still does not work. There were other directories too, named `texmf`, but I wasnt sure which one to use. I get the same error over and over again. I have no idea how to proceed, and I have exhausted all of Google for all informaion which I could though was relevant. I believe that in the past I installed TeX Live using some apt-get install, but I cannot remember which from the Ubuntu terminal. But today I install it again without removing the previous install using with all the default settings using the unix installer which I found on the TeX Users Group web site: http://www.tug.org/ I hope to get your help to solve the problem.


title: How to include Publications in europeCV.lyx from a BibTeX database?

text: I am wondering if I can include publication list using `BibTex Database`. I know that I can write the publications manually but I don't want to if I have a large list of publications.


title: Subbibliography with roman numbers and Biblatex

text: I am currently working on a thesis, where I have to use one subbibliography. This works pretty well with `Biblatex` and keywords. Now my faculty wants to have this subbibliography (and only this) to be numbered with large roman numbers. The main bibliography at the end of the document should still be sorted alphabetically after the first authors. Is there a way to do this or do you have a pointer I missed so far? This is a MWE:               \documentclass{scrreprt}        \usepackage{filecontents}     \usepackage[%      natbib=true,%      citestyle=authoryear,%      bibstyle=authoryear,%      backend=bibtex,%      ]{biblatex}          \defbibfilter{subbib}{keyword=subbib} % Authors publications must have set keyword to "own"     \begin{filecontents}{test.bib}      @article{hoek2008b,        author = {Hoek, K. S. and Schlegel, N. C.},        title = {Novel MITF targets identified using a two-step DNA microarray strategy},        journal = {Pigment Cell Melanoma Res},        volume = {21},        number = {6},        pages = {665-76},        keywords = {subbib},        year = {2008}     }      @article{hou2008,        author = {Hou, L. and Pavan, W. J.},        title = {Transcriptional and signaling regulation in neural crest stem cell-derived melanocyte development: do all roads lead to Mitf?},        journal = {Cell Res},        keywords = {subbib},        year = {2008}     }           @article{alister2013,        author = {Alister, J.A.},        title = {MITF from missense to malady},        journal = {Pigment Cell Melanoma Res},        keywords = {pigment},        year = {2013}     }      \end{filecontents}           \addbibresource{test.bib}     \begin{document}     \tableofcontents      \chapter{This is a test chapter}      This is only test text.       \printbibliography[title={Subbibliography}, filter=subbib]           \chapter{Test for bibliography}       This is a test to cite \parencite{alister2013} and also cite\parencite{hou2008} which has also been        described by \textcite{hoek2008b}.            \printbibliography[title=References]     \end{document}       I want to have the subbibliography numbered with roman numbers, the references at the end should be author-year.


title: How to convert scanned .tiff files into editable LaTeX files

text: I'm new to LaTeX platform and got trained just 1 day on TeX commands 2 days before, my TL rushing me to finish 50 pages per day but I can do only 7 pages a day, what I'm doing is entering each and every words from scanned `.tiff` image file in TeX editor, so it taking huge time. Can anyone please help me to fine some smart working tools to reduce my huge manual work.


title: How to solve a tex run problem'

text: I have tried the `.tex` file in WinEdt in Windows too. I want to run it using the KILE editor. The problem I got is showing below as log file.               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2014.1.17)  20 JAN 2014 16:01     entering extended mode      %&-line parsing enabled.     **"Thesis-Jan 20 -2013.tex"     (./Thesis-Jan 20 -2013.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov     ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1     9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san     skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn     orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian     , estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po     rtuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded.          ! LaTeX Error: File `thesis.cls' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: cls)          Enter file name:      ! Emergency stop.     <read *>           l.2 \usepackage                    {amsmath,mathtools}\usepackage{amssymb}^^M     *** (cannot \read from terminal in nonstop modes)               Here is how much of TeX's memory you used:      10 strings out of 493848      236 string characters out of 1152823      47808 words of memory out of 3000000      3384 multiletter control sequences out of 15000+50000      3640 words of font info for 14 fonts, out of 3000000 for 9000      714 hyphenation exceptions out of 8191      10i,0n,7p,94b,8s stack positions out of 5000i,500n,10000p,200000b,50000s     !  ==> Fatal error occurred, no output PDF file produced!      How can I run the `.tex` file in KILE ?


title: \pageref to customised float environment

text: I would like to include some pictures in my document that are not really figures and should therefore not appear in the list-of-figures. They are to cover a whole page each, which I achieved using the following MWE:               \documentclass{report}          \usepackage[absolute]{textpos}     \usepackage[draft]{graphicx}          \usepackage{hyperref}     \usepackage{lipsum}          \begin{document}          \lipsum[1-2]     \newpage     \begin{textblock*}{\textheight}(20mm,34mm)     \fbox{\includegraphics[height=\textheight,width=\textwidth]{landscape.png}}]{landscape.png}}     \end{textblock*}     \label{pic:ref}     ~\newpage          \lipsum[3]     \pageref{pic:ref}     \lipsum[4]          \end{document}      `textpos` is obviously not the way to go here, as it is not floating, resulting in ugly typesetting of the page prior to the picture. Further does this not set an anchor, such that `\pageref` doesn't work either. **How do I define a new type of float that also allows for anchoring without having a caption?**


title: svjour3 10pt problem

text: I am using svjour3 and font size in article is too small. I want 10pt but end up with 9pt.                   \RequirePackage{fix-cm}         \documentclass[twocolumn,10pt]{svjour3}          % twocolumn         \smartqed  % flush right qed marks, e.g. at end of proof         \usepackage{graphicx}         \usepackage{amssymb,amsmath,amsfonts,latexsym}         \usepackage{algorithm}         \usepackage{algorithmic}         \algsetup{linenosize=\scriptsize}          \usepackage{cite}         \usepackage{epstopdf}         \usepackage{mathptmx}      % use Times fonts if available on your TeX system         \begin{document}


title: Generating a table of all glyphs – including meta data like name, Unicode etc

text: The answers to Generating a table of glyphs with XeTeX cycle through character positions in the font and output a glyph (and its ordinal number) if one is assigned to that position, which is only sometimes the same as Unicode position. Some glyphs may be shared by several Unicode code points. Some Unicode code points have several glyphs assigned to them, possibly selected by smart font features. Furthermore, Unicode has more positions than fit into 16bit (as in Open Type). I can use a font editor to look up the names assigned to glyphs, which may adhere to Adobe’s glyph naming standards, but often deviate from that, especially for alternate glyphs (dot suffixes) and for non-roman characters. Nevertheless, I want to print out a customizable glyph list containing that info using XeLaTeX. How can I adapt @LeoLiu’s code, repeated below, to show glyph names besides ordinal number?               \documentclass[landscape]{article}     \usepackage{geometry}     \usepackage{fontspec}     \setmainfont{Linux Libertine O}     \usepackage{multicol}     \setlength{\columnseprule}{0.4pt}     \setlength{\parindent}{0pt}     \usepackage{multido}     \begin{document}          \begin{multicols}{10}     \multido{\i=0+1}{"10000}{% from 0x0000 to 0xFFFF       \iffontchar\font\i         \makebox[3em][l]{\i}%         \symbol{\i}\endgraf       \fi     }     \end{multicols}          \end{document}      JFTR, as it happens the `libertine` package documentation and guide already include glyph lists, but they might be out of date and I want to do it for other fonts, too. The former has some code that might be relevant, because it seems to generate glyph lists, but I don’t understand it (i.e. the `cathode` magic, I guess):               \renewcommand\DeclareTextGlyphY[3]{%       \makebox[2.5cm]{\LARGE\strut\fbox{\biolinumKeyGlyph{#2}}} #2\\}%     \catcode`\_=12%     \begin{multicols}{2}     \par\noindent     \input{LinBiolinum_K}     \end{multicols}      Update: This is the code from `libertine.sty` (for XeTeX and LuaTeX) which is adapted by the code above:               \providecommand*\DeclareTextGlyphY[3]{%       % \DeclareTextGlyphY{fxl}{s_t}{64262}       % #1=basefont #2=glyphname, #3=position       \def\lib@temp{#1}%       \ifx\lib@temp\lib@fxl \@namedef{#1@#2}{{\libertine\char#3\relax}}\else%         \ifx\lib@temp\lib@fxb \@namedef{#1@#2}{{\biolinum\char#3\relax}}\else%           \ifx\lib@temp\lib@fxk \@namedef{#1@#2}{{\biolinumkey\char#3\relax}}\else%             \ifx\lib@temp\lib@fxi \@namedef{#1@#2}{{\libertineInitial\char#3\relax}}\else%       \fi\fi\fi\fi}     %     \input{LinLibertine_R}     \input{LinBiolinum_R}     \input{LinBiolinum_K}     \input{LinLibertine_I}     %     \DeclareRobustCommand*\libertineGlyph[1]{\@nameuse{LinLibertine_R@#1}}     \DeclareRobustCommand*\biolinumGlyph[1]{\@nameuse{LinBiolinum_R@#1}}     \DeclareRobustCommand*\biolinumKeyGlyph[1]{\@nameuse{LinBiolinum_K@#1}}     \DeclareRobustCommand*\libertineInitialGlyph[1]{\@nameuse{LinLibertine_I@#1}}      The files `LinLibertine_R.tex`, `LinBiolinum_R.tex`, `LinBiolinum_K.tex` and `LinLibertine_I.tex` contain a lot of `\DeclareTextGlyphY` calls and nothing else.


title: Why am I not able to vertically center my row in either a tabular or tikz matrix environment?

text: Neither of these two MWE center the content of the rows. Why? Example 1 using a `tabular` environment`               % arara: pdflatex     % arara: pdflatex     % arara: open     \documentclass[border=6pt]{standalone}          \usepackage{amsmath}     \newcommand\abs[1]{\lvert#1\rvert}          \def\aecaseA{%%       \begin{minipage}{2in}         \begin{gather*}           \abs{x-y}+\abs{x}-\abs{y}           \\=            2x-2y           \end{gather*}       \end{minipage}}          \def\aecaseB{%%       \begin{minipage}{2in}         \begin{gather*}           \abs{x-y}+\abs{x}-\abs{y}            \\=            2x         \end{gather*}       \end{minipage}}          \def\aecaseC{%%        No such points.       }          \def\aecaseD{%%       \begin{minipage}{2in}         \begin{gather*}           \abs{x-y}+\abs{x}-\abs{y}            \\=            0         \end{gather*}     \end{minipage}}          \begin{document}          \begin{tabular}{ccc}        \fbox{Case $x\geq y$} & {$y\geq 0$} & {$y<0$}    \\        {$x\geq 0$}           & {\aecaseA}  & {\aecaseB} \\        {$x<0$}               & {\aecaseC}  & {\aecaseD} \\     \end{tabular}          \end{document}      Example 2 using a `TikZ` `matrix`               % arara: pdflatex     % arara: pdflatex     % arara: open     \documentclass[border=6pt]{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{matrix}          \usepackage{amsmath}     \newcommand\abs[1]{\lvert#1\rvert}          \def\aecaseA{%%       \begin{minipage}{2in}         \begin{gather*}           \abs{x-y}+\abs{x}-\abs{y}           \\=            2x-2y           \end{gather*}       \end{minipage}}          \def\aecaseB{%%       \begin{minipage}{2in}         \begin{gather*}           \abs{x-y}+\abs{x}-\abs{y}            \\=            2x         \end{gather*}       \end{minipage}}          \def\aecaseC{%%        No such points.       }          \def\aecaseD{%%       \begin{minipage}{2in}         \begin{gather*}           \abs{x-y}+\abs{x}-\abs{y}            \\=            0         \end{gather*}     \end{minipage}}          \begin{document}          \begin{tikzpicture}       \matrix[matrix of nodes,nodes={align=center,inner sep=0pt,anchor=center}]       {        \fbox{Case $x\geq y$} & {$y\geq 0$} & {$y<0$}    \\        {$x\geq 0$}           & {\aecaseA}  & {\aecaseB} \\        {$x<0$}               & {\aecaseC}  & {\aecaseD} \\       };     \end{tikzpicture}          \end{document}


title: Boxing some cells in tabular enviroment

text: I would like to make a table in LaTeX, where I box some of the cells within my table. And I would like to be able to nest boxes so that I can have a box in a box. Here I have an example of what I mean: ![enter image description here](http://i.stack.imgur.com/4tbVc.png) I have searched for this problem for some time, and I doesn't seem like I am capable of finding a solution to this problem, and I don't know how to attack the problem, since I'm pretty new to LaTeX.


title: Front end software for people doing editing and typesetting of articles

text: The editors and typesetters at my organization are not very computer savvy, so I don't think they would be interested in editing in LaTeX or XML directly. However, we are interested in pursuing a structured format on the front end since Microsoft Word is a real pain to work with. Our current workflow goes something like this:               Author            Editor             Converter -> Typesetters -> Export -> Ebook formats     Microsoft Word -> Styling in Word -> XML       -> InDesign    -> XML    ->                                                                        -> Export -> Printer                                                                   -> PDF    ->      What are some good options for providing a front end for our editors/typesetters that is structured (XML, DocBook, LaTeX), but not difficult for someone without a lot of computer knowledge to get a handle on? It's imperative that it be _very_ reliable. There are _way_ too many solutions that only work some of the time.


title: How can I typeset LaTeX source code with this very specific syntax highlighting?

text: I want to put some LaTeX source code in my PDF output with the style like this: ![enter image description here](http://i.stack.imgur.com/BQjFg.png) Color in text mode is white, in math mode is yellow and in comments is grey. For control sequences, I divide it into four kinds with different highlight mode:   * Commands in text mode are cyan, and its argument(s) (non-optional) is/are orange and italic.   * Commands in text mode are cyan, but its argument(s) (non-optional) is/are white and upright.   * Commands in text mode are rose-color, and its optional argument(s) is/are orange and italic, non-optional argument(s) is/are cyan and italic.   * Commands in math mode are purple, its arguments (optional or non-optional) should be rose-color and upright. Remember that backslash before a command is always highlighted with the same color of the command, but delimiters of arguments remains white (color of body text). I tried and searched the web for about ten hours, but still failed. Any hints or clues would be appreciated.


title: alignment mark inside box can't be seen from outside this box

text: I didn't really know how to write the title, hope it's clear enough (I'm willing to change it if anyone suggests anything better). My problem is the following: I want to align different items with respect to each other, but with the anchor inside an already aligned environment (this of course fails as it isn't seen outside this environment). Typically I'm giving several definitions of functions, and I'd like to have a pleasing horizontal and vertical alignment between them: horizontal with respect to the column and vertical with respect to the base of first line. Here's a MWE:               \documentclass{minimal}          \usepackage{amsmath}     \usepackage{amsfonts}          \newcommand*\Rset{\mathbb{R}}          \newcommand*\mapping[5]{%        \begingroup           \setlength\arraycolsep{0.2em}%           \begin{array}{ccccc}%              {#1}&\colon&{#2}&\longrightarrow&{#3}\\              &&{#4}&\longmapsto&{#5}%           \end{array}%        \endgroup     }%          \begin{document}     \begin{align*}     &\mapping f\Rset\Rset x{x^2,}&     &\mapping M\Rset\Rset x{x^{42},}\\*[2ex]     &\mapping{\mathrm{Function}}XYx{\dfrac1{1+\dfrac1{1+x^2}},}&     &\mapping U\Rset\Rset x{x.}     \end{align*}     \end{document}      So far my only option is to put the `&` for the `align*` environment in front of the `\mapping` command, so the horizontal alignment is from the beginning of the name of the function. How can I somehow put the `&` inside the `array` environment so that it is not seen by the `array` environment but by the outer `align*` environment? Not mentioning the awful vertical alignment! Maybe you'll have an altogether different (and better) method to achieve this, but anyways, I'd like to know if it is at all possible (in an easy way) or not.


title: Cannot install pythontex

text: I have been trying to install `pythontex` on Windows 8 (64-bit) with `MiKTeX` installed.   * I have tried running "latex pythontex.ins" from the directory but it doesn't work.   * I have tried using the package manager but pythontex is not there.   * I have tried running "tlpkg install pythontex" but it seems its not installed.   * I have tried running "python pythontex_install_texlive.py" from the directory but it complains that it cannot find TEXMF. Please Help :(


title: Making comments stand out when using Sweave and R

text: Is there any way to bold or highlight all comments when using Sweave? Maybe a command to make all lines starting with `#` be bolded?               <<>>=     # I want this to be bold automatically     @


title: biblatex: \textcite author formatting vs. bibliography author formatting

text: For LaTeX citations, I use biblatex/babel. The journal for which I'm writing requires a bibliography with authors formatted as follows: > Guyton AC, Hall JE. That is, with no "and" before the last author. I did manage this (see example below), however, in `\textcite`, "and" is also gone now... Questions   1. Is it possible to remove "and" in the bibliography, but leave it in `\textcite`.    2. Previously, I used `\textcite` together with the authoryear style. Using a solution also posted on this website, I was able to put multiple sources in one `\textcite`, and `biblatex` would place commas and an "and" at the appropriate places. Is it possible to adapt this solution for numeric citation styles?    3. Is there a way to make all authors (and the commas in between them) bold in the bibliography?               \documentclass[a4paper]{article}     \usepackage[american]{babel}     \usepackage[       terseinits=true,       firstinits=true,       backend=biber,       style=numeric     ]{biblatex}          %Put initials after names...     \DeclareNameAlias{sortname}{last-first}     \DeclareNameAlias{default}{last-first}              %Remove "and" before last name. However, this also removes "and" in a textcite...     \renewcommand*{\finalnamedelim}{\addcomma\space}          %I also removed the commas between last names and initials (http://tex.stackexchange.com/questions/17583/biblatex-remove-commas-between-last-and-first-names-in-bibliography). This is however not needed for a minimum working example.          %Generate a test bibliography     \usepackage{filecontents}     \begin{filecontents*}{database.bib}     @BOOK{Guyton2006,       title = {Textbook of Medical Physiology},       publisher = {W.B. Saunders},       year = {2006},       author = {Arthur C. Guyton and John E. Hall},       address = {Philadelphia, Pennsylvania},       edition = {11th Edition}     }     \end{filecontents*}          \bibliography{database.bib}          %Some biber compatibility things (from http://tex.stackexchange.com/questions/21711/setting-up-winedt-6-0-and-miktex-to-run-biblatex-and-biber)...     \makeatletter         \providecommand\bibstyle@faked{}         \providecommand\bibdata@faked{}         \AtBeginDocument{%         \immediate\write\@mainaux{\noexpand\bibstyle@faked}%         \immediate\write\@mainaux{\noexpand\bibdata@faked}}     \makeatother          \begin{document}     The following sentence contains a textcite example. \textcite{Guyton2006} wrote a comprehensive textbook.     \printbibliography     \end{document}


title: How to get a fat version of \mathscr{D}?

text: I'm trying to write a curly/curvy D and it is not `\mathcal{D}` or even `\mathfrak{D}`, rather it seems that it is `\mathscr{D}` I'm looking for, but then when I do write that it is a very thin capital D. I want a fat curvy one, just as shown in the figure below. Anyone know how to get one like that? **Edit:** with fat I mean one which is **wide** with a lot of **white space inside it.** ![Curly Fat D, not thin!!](http://i.stack.imgur.com/4cCrJ.png)


title: Change direction of installation in Mac OS

text: I am new to Mac OS and I used to work with MikTex on Windows. As a habit inherited from Windows, I'd like to install MacTex distribution on the other partition of the hard drive other than the one where system has been installed. Is there a possibility to achieve this target?


title: How to add copyright information to PDF metadata

text: # The Last(?) Word I have now accepted @MatthewLeingang's answer. This directs me to the `hyperxmp` package, which appears to be the simplest solution (for me as a very-end user). The fact that this doesn't work in _my_ workflow and environment isn't Matthew's fault. To chase the rest of my problem, which appears to involve a conflict with `memoir`, readers may be interested in this spin-off question. Thank you all again for your help. * * * # Progress Update 1: First, flouting convention, my sincere thanks to all who have answered or commented (duly upvoted). Special thanks to @diabonas, whose sample PDF does indeed contain a copyright notice. However, there may be a clue here: while his PDF says this: > PDF Producer: XeTeX 0.9997 mine says this: > PDF Producer: xdvipdfmx (0.7.8) Now, I'm processing it with XeLaTeX _via_ `latexmk`, but to keep myself honest, I re-did it with just XeLaTeX, with the same result. * * * # Progress Update 2: Here's an MWE that fails, and gives "PDF Producer: xdvipdfmx (0.7.8)":               % !TEX TS-program = XeLaTeX     % !TEX encoding = UTF-8 Unicode     \documentclass{memoir}     \usepackage{lipsum}     \usepackage{hyperref}     \usepackage{hyperxmp}     \hypersetup{         pdfauthor={Brent Longborough},         pdftitle={O Hai},         pdfcopyright=Copyright © 2012 by Brent Longborough. All rights reserved.}     \begin{document}     \lipsum[1]     \end{document}      By just changing the document class to article, we get "PDF Producer: XeTeX 0.9997", and the copyright notice appears! * * * # Original Question: Using XeLaTeX. I want to add two pieces of metadata to a PDF: copyrighted status and the copyright notice. I'm already using `hyperref` in the document, and I have no special worries about "overheads", only about keeping the workflow simple. On the principle of "monkey see, monkey do", I tried this to no avail:               \hypersetup{%         pdfinfo={%             CopyrightStatus={Copyrighted},             CopyrightNotice={Copyright © 2012 by Brent Longborough}             }         }      So far, I have been unable to find the correct tag names, or to discover even whether I have a chance. All suggestions are welcome, but I'd especially like a pointer to the book of tag names for PDF metadata. * * * The answers and comments from Martin and EGreg deserve some additional explanation on my part. My PDF reader is PDF Xchange Viewer from Tracker Software. When I view the Document Properties, and select the "Additional Metadata..." button, a [third] window appears in which there appear a dropdown labelled "Copyright Status:", with options "Unknown", "Copyrighted", and "Public Domain"; and a text box labelled "Copyright Notice:": ![screenshot of PDF Xchange Viewer's windows](http://i.stack.imgur.com/xK8vg.png) So you can see the source of my half-blind groping for metadata tags... So, I guess what I'm _really_ asking is "What tag names should I be using to fill in these fields?" * * * After hacking at the PDF (using @egreg's tip and then the viewer itself), I found the Copyright stuff in some RDF dc: namespace. I have since tried using the hyperxmp package, but without success (nothing shows up in the PDF), and I suspect that may be because it only works for pdfLaTeX. * * * I have also tried @MatthewLeingang's answer, but can confirm that it definitely requires pdfLaTeX, and I really don't want to go back.


title: Auto-completion for citation in Kile using Biblatex

text: Currently in Kile you can get citation auto-completion when using BibTeX. You just add `\bibliography{file}` and Kile knows from this where the bib file is and what is in it. However biblatex does not use this command. Instead you must use `\addbibresource{file.bib}` in the preamble. Kile dos not recognise this, even though it specifies the path to the bib file in the same way, and therefore I can't get citation autocompletion. Is there a way to get Kile to recognise the `\addbibresource{}` command as providing the path to the bibliography? Edited: as @Psirus says there is backwards compatibility in biblatex. `\bibliography{file}` can be used for the time being without problem.


title: Displaying verse numbers on the left of corresponding column in multi-colmn text

text: I have two-column text that consists of multiple verses that are numbered sequentially. Imagine a text like below flowing into page in two columns.               1 Text for verse one that belongs to first verse. 2 Text for verse two that belongs to second verse. 3 Text for verse three that belongs to third verse. 4 Text for verse four that belongs to fourth verse. 5 Text for verse five that belongs to fifth verse.      Now, instead of displaying verse number next to the verse text, I would like the number appear on the left side of the column that it belongs to (similar to marginpar). So, something like following as desired out...               1 Text for verse one    |   belongs to third        that belongs to first | 4 verse. Text for     2 verse. Text for verse |   verse four that       two that belongs to   |   belongs to fourth     3 second verse. Text    | 5 verse. Text for       for verse three that  |   verse five that...      Is something like this possible? I was looking at Tikz package, but have not been able to figure out the positioning. Would appreciate some direction and help. I'm using {multicol} package for the double-column layout.


title: Adding a keyboard shortcut to the compile process in TeXnicCenter

text: I am using TeXnicCenter, and have just updated to Adobe Reader X. All in all I'm doing okay with the change, but I have one minor tweak that I'd want to make: I prefer the "Read Mode" view in Adobe Reader X, but AFAIK there is no way of setting that to be the default view in the standalone reader (it is the default view in a browser, however). What I would like is some method of automatically switching to Read Mode after the compile process is complete. The approach I was thinking of (though I would welcome any alternatives!) was to use the keyboard shortcut for switching to Read Mode (it is `Ctrl` + `H`). I have a macro recording program on my computer, so I can record > `Ctrl` + `Shift` + `F5` _Delay[x milliseconds]_ `Ctrl` + `H` which will compile and display the document (`Ctrl` + `Shift` + `F5`), wait `x` milliseconds, then switch to Read Mode (`Ctrl` + `H`), but the problem is that depending on the packages being loaded, the compilation time for different documents can vary widely, and I'd like the delay between the two key combinations to be no longer than necessary. If the PDF output hasn't been opened by the end of the delay, the TeXnicCenter window is still in focus and `Ctrl` + `H` is applied there. My question is whether there is a way of incorporating the command "apply `Ctrl` + `H`" into the LaTeX => PDF output profile, and specifically, in a manner such that it will be executed directly after the PDF output has been opened. Perhaps there is something I can add to that "Command" field under "View project's output"? ![](http://i.stack.imgur.com/N38iG.png)


title: In Beamer, how to prevent \includemovie from restarting swf animations?

text: On this frame, there are 3 swf animations starting once the slide opens. I would like to prevent them from automatically looping. I tried a few options without any success, such as `endat=frame:10` or `repeat=0`. This behaviour seems to be specific to swf files. I was using mp4 before, which didn't restart automatically. Unfortunately, having three animations on that page caused Adobe Reader to be extremely unstable, which is why I converted the file to swf. Here is the code:               \frame{     \frametitle{Example 2}     Double cantilever beam     \vfill     \begin{columns}[l]        \column{0.33\textwidth}          \includemovie[autoplay,mouse]{1.\textwidth}{5em}{Pics/Cubic_D_Struct_AnisoShear.swf}          \small{discrete pre-crack}\\          \small{cubic function}         \column{0.33\textwidth}          \includemovie[autoplay,mouse]{1.\textwidth}{5em}{Pics/Quad_D_Struct_AnisoShear.swf}          \small{discrete precrack} \\          \small{quadratic function}         \column{0.33\textwidth}          \includemovie[autoplay,mouse]{1.\textwidth}{5em}{Pics/Cubic_Struct_AnisoShear.swf}          \small{modelled pre-crack} \\          \small{cubic function}      \end{columns}     \vfill     } %%%


title: Make arara ignore \includeonly command

text: I'm actually about to write up my dissertation and have split it into chapters that are included into the main document via `\include{chapter}`. To keep compilation times short while working on it, I use `\includeonly{...}` to compile only the chapter I'm actually working on and normally only compile with `pdflatex`. For the "full" compilation including `biber` and `makeglossaries` (which I omitted in the MWE below) I use `arara` and every now and then I would like to compile the whole document with all chapters. Of course I could just comment the `\includeonly` command, launch `arara` and uncomment `\includeonly` afterwards, but that's a boring solution. Therefore I was asking myself, if there's a way to somehow tell `arara` to ignore the `\includeonly` directive and just compile the whole document. I tried to read the `arara` manual and some questions here on Stackexchange but did not really find a good point to start with.               % arara: pdflatex: { synctex: yes}          \begin{filecontents}{chapter1.tex}          Some text     \end{filecontents}          \begin{filecontents}{chapter2.tex}         Another text     \end{filecontents}          \documentclass{book}          \includeonly{chapter1}          \begin{document}     \include{chapter1}     \include{chapter2}     \end{document}


title: Embedded PDF images in PDF output not selectable / can't be copied

text: I am producing PDF reports with PDF images included using `\includegraphics`. I would like clients to be able to select and copy the resulting images from within Adobe Reader or whatever, but this doesn't seem to be possible (although it is possible with PNG images).


title: How to properly 'make' a latex project?

text: I've got a latex project that looks like this:               project/        |-- main.tex        |-- main.bib        |-- preamble.tex        |-- preamble.fmt        |-- makefile      The preamble (`preamble.tex`) is being precompiled into `preamble.fmt`. `main.bib` is generated using the `file contents` environment in `main.tex`. This is what is in my `makefile`               TEX = pdflatex -shell-escape -interaction=nonstopmode -file-line-error     PRE =  $(TEX) -ini -job-name="preamble" "&pdflatex preamble.tex\dump"     BIB = bibtex          .PHONY: all view          all : main.pdf          view :         open main.pdf          main.pdf : main.tex preamble.fmt main.bbl main.blg         $(TEX) main.tex          main.bbl main.blg : main.bib main.aux         $(BIB) main          main.aux : main.tex         $(TEX) main.tex          main.bib : main.tex         $(TEX) main.tex          preamble.fmt : preamble.tex         $(PRE) preamble.tex      The problem is here that `bibtex` relies on `main.aux` to be generated, and `main.aux` is regenerated every `pdftex` run. This leads to regeneration of the bibtex files every run, which causes makefile to run `$(TEX) main.tex` a second time (it thinks the `.bbl` and `.blg` files are changed, because it looks at their edit time). So, basically every time I call `make all` latex is compiled twice, even if there are no changes to references made anywhere in the document (thus making this unnecessary). Is there a way I can tell `make` that it only compiles twice if there is an actual _change_ to the `.aux` and the `.bib` files. Perhaps by checking of md5 sums? I'm kind of new to the whole makefile thing, so I thought I'd ask here. It could be off-topic, but I thought the latex gurus that reside on this site might have an answer.


title: Clipping using the folding library of tikz

text: I have the following minimal example:               \documentclass{scrartcl}     \usepackage{tikz}     \usetikzlibrary{folding}          \begin{document}          \begin{tikzpicture}     \tikzfoldingdodecahedron[folding line length=2cm,face 1={\fill (0,0) circle (1.5cm);}];     \end{tikzpicture}          \end{document}      The circle in the first face is slightly too big for the pentagon. Is there a way that the circles is clipped to the pentagon? I tried using `clip` and `regular polygon` but it did not work. Any suggestions?


title: Aligning the right hand side of multiline equations

text: I would like to align the RHS of the multiline equations and assign equation number for whole as one.               \begin{multline*}     \frac{\partial P(y_{i}\succ0)} {\partial z_{ij}}=\tfrac {a(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}} e^{-\tfrac{1}{2}a^{2}(1-\tau^{2})^{2}\left(z_{1i}\prime\gamma_{1j}\right)^{2}}\\     \Phi\left(b\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-a\tau \left(z_{1i}\prime\gamma_{1j}\right)\right)\gamma_{1j}+\tfrac {b(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}} e^{-\tfrac{1}{2}b^{2j}(1-\tau^{2})^{2}\left(\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)^{2}}\\     \Phi\left(a\left(z_{1i}\prime\gamma_{1j}\right)-b\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)\tfrac{\gamma_{2j}}{\tau}\\     \end{multline*}          \begin{multline*}     =\phi\left(z_{1i}\prime\gamma_{1}\right)\Phi\left(b\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-a\tau z_{1i}\prime\gamma_{1j}\right)\gamma_{1j}\\     +\phi\left(\tfrac{z_{2i}\prime\gamma_{2}}{\sigma}\right)\Phi\left(a\left(z_{1i}\prime\gamma_{1j}\right)-b\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)\tfrac{\gamma_{2j}}{\tau}     \end{multline*}          \begin{multline*}     =\phi\left(z_{1i}\prime\gamma_{1}\right)\Phi\left(\tfrac{\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-\tau z_{1i}\prime\gamma_{1}}{(1-\tau^{2})^{1/2}}\right)\gamma_{1j}\\     +\phi\left(\tfrac{z_{2i}\prime\gamma_{2}}{\sigma}\right)\Phi\left(\tfrac{z_{1i}\prime\gamma_{1j}-\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}}{(1-\tau^{2})^{1/2}}\right)\tfrac{\gamma_{2j}}{\tau}     \end{multline*}      How do I do that?. I couldn't get it using `align`


title: Problems with undefined control sequence in list of figures

text: I'm using TeXLive 2011. I had a lot of problems with compiling my large document yesterday and finally seemed to have gotten back to a working version, however now I get strange error messages in the list of figures like > [5 ./Diss.lof:61: Undefined control sequence. ...skip \abovedisplayskip \let > \sml@listi =\leftmargin \leftmargini ... l.61 > ...S.~391]{Johannaber2004}}}{49}{figure.2.10} or > [5 ./Diss.lof:61: Undefined control sequence. ...skip \abovedisplayskip \let > \sml@listi =\leftmargin \leftmargini ... l.61 ...te > [S.~6ff]{Starke2004}}}{51}{figure.2.10} The corresponding code in the lof file looks like that:               \contentsline {figure}{\numberline {\relax 2.10}{\ignorespaces Ursachen f\"ur Ma\IeC {\ss }abweichungen des Spritzgie\IeC {\ss }werkzeugs beim Kunststoffspritzguss nach~\textcite [S.~6ff]{Starke2004}}}{51}{figure.2.10}      I'm sorry, that at the moment I can not provide a minimal example, can someone explain, what this undefined control sequences are about? It seems to be a `cite` command in a caption. **EDIT** after Herbert's suggestion, I modified the source in the following way and removed all aux, lof, lot etc. files:               \caption[pure text without any command]{text with~\protect\textcite[][]{}}      But the problem persists: > [5 ! Undefined control sequence. ...skip \abovedisplayskip \let \sml@listi > =\leftmargin \leftmargini ... l.61 ...te > [S.~6ff]{Starke2004}}}{51}{figure.2.10} I'm using the scrbook class (komascript). I'll try to set up a minimal example asap. **EDIT:** a MWE               \documentclass{article}     \usepackage{biblatex}     \bibliography{biblatex-examples}     \begin{document}     \begin{figure}       \caption[Bar \protect\textcite[][]{aksin}]{Foo \protect\textcite[][]{aksin}}     \end{figure}     \listoffigures     \end{document}      resulting in:               (./x.aux) (./x.bbl) (./x.lof     ! Argument of \blx@citeargs@i has an extra }.     <inserted text>                      \par      l.2 ...line {1}{\ignorespaces Bar \textcite [}}{1}          ?      where the lof file is this:               \defcounter {refsection}{0}\relax      \contentsline {figure}{\numberline {1}{\ignorespaces Bar \textcite [}}{1}     \boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax


title: Is there a "ForwardPDF" tool available?

text: When I am working on a big document, I find the srcltx package to be extremely useful. However, I also really like the hyperref package. Is it possible to use both? In particular, is there a way to use ForwardDVI and inverse search with PDFLaTeX?


title: Finding something in the TeX document from the PDF

text: I am compiling a PDF (Adobe) using LaTeX (TexWorks) so I have the text document on one side of the screen and the PDF on the other, is there any way to select something on the PDF and it to find that text/command in the TeX document? I know that I could just highlight it and search the TeX document but if it is some symbol then this won't really work.


title: vspace before itemize in a Table cell, tabular vs longtable

text: In the following MWE, one sees the difference between `tabular` and `longtable`, with respect to the vertical space before an itemize, inside a cell :               \documentclass[12pt]{article}     \usepackage{longtable,enumitem}     \begin{document}     \begin{longtable}{| p{3cm} |p{6cm}|}     \hline%     text &       \begin{itemize}[topsep=0ex,partopsep=0ex]     \item Produkt und Quotient     \item Produkt und Quotient     \end{itemize}     \\ \hline      \end{longtable}          \begin{tabular}{| p{3cm} |p{6cm}|}     \hline%     text &       \begin{itemize}[topsep=0ex,partopsep=0ex]     \item Produkt und Quotient     \item Produkt und Quotient     \end{itemize}     \\ \hline      \end{tabular}          \end{document}      What i would like, is to have in longtable the same vspace as in tabular. By the way, i set both `topsep` and `partopsep` to 0, just because i am ignorant, and i don't really know which one i should use...


title: Remove heading from bibunit

text: I'm using bibunit to enter multiple bibliographies in a document. I don't want the bibunit to have a separate heading. I can remove the text with by redefining `\refname`, but this still leaves big vertical space. How can I drop that space entirely? Here's a toy example:               \documentclass{article}     \usepackage{bibunits}     \begin{document}          \defaultbibliographystyle{plainyr-rev}     \defaultbibliography{ab,ty2}     \renewcommand{\refname}{}          \section{Publications}          Some text goes here.          \begin{bibunit}       \nocite{smith_douglas_ea_2004}       \putbib     \end{bibunit}     \end{document}      This produces: ![](http://i.stack.imgur.com/28kCg.jpg) I've drawn a red line on the image to show the space I want to reduce/eliminate.


title: Using .pdf in Kile: cannot determine size of graphics

text: I am using Kile on a Red Hat/Gnome desktop at my university. My figures are made in R on a Windows machine. When I try to add figures to my `report` class LaTeX document, using the following code:               \begin{figure}[ht]      \includegraphics[width = 0.9\textwidth]{path/biomass_dried_glm.pdf}     \end{figure}      I get the error message: `Cannot determine size of graphic in path/blah` (it doesn't say anything about bounding box anymore). I have looked around, and understand that it has something to do with the dvpdf or something, but if anyone could help me change the settings in Kile or tell me what to do in Kile I would be very happy.


title: Adding a "minimum" vertical space

text: Is there a way to add vertical space, but only if that much vertical space has not already been added? In other words, to say "put a minimum of _X_ points of space here, and if some other command has already put in _X_ or more points, do nothing"? For example, I have a command which creates a blank line and then begins a paragraph, but it puts in too much space when used after a section heading, since the section heading already puts in its own space.


title: Customizing Multiple Choice Questions in EqExam Package

text: I use `eqexam` for creating Multiple Choice Questions with randomized answers. Let's take the following example:               \documentclass{article}     \usepackage[allowrandomize,nopoints,proofing]{eqexam}%          \begin{document}          \useRandomSeed{2012}     \begin{exam}{Exam1}     \begin{problem}     In what year did Columbus sail the ocean blue?     \begin{answers}{2}         \bChoices[random]         \Ans0 1st random choice\eAns         \Ans1\label{eq} 2nd (the correct) random choice\eAns         \Ans0 3rd random choice\eAns         \Ans0 4th random choice\eAns         \Ans0 5th random chioce\eAns         \eFreeze         \Ans0 None of these\eAns         \eChoices     \end{answers}     \end{problem}     \end{exam}          \end{document}      which produces the following output: ![PDF output](http://i.stack.imgur.com/zEliG.jpg) I want to be able to customize the `problem` and `answers` environments, more exactly, to put the problem number inside a `\fbox` and change the text size, and also the way the choices are numbered - I want to put capital letters A, B, C, ... inside `\fbox`, but I don't know how this can be done.


title: symbol for proper ideal (\unlhd + \lneq)

text: How can I write the symbol ![enter image description here](http://i.stack.imgur.com/fi49z.jpg) for a proper ideal? The standard relations `\leq,\subseteq` both have a "proper" version `\lneq,\subsetneq`, but I was unable to find a "proper" version of either `\unlhd` or `\trianglelefteq`. Any suggestions?


title: Sciposter setting A0 page dimensions

text: I’m doing my first A0 poster with LaTeX; after some experiences with web examples I´m using a sciposter template (with multicols and sections) which I find very simple; but when I run it I get a PDF file with all the information there but with 1 third of the page all white; first I assume that geometry package, for setting the page dimensions, would solve the problem, but it seems that nothing works; just need a full page poster… but actually when using `\usepackage{fullpage}` nothing happens; can somebody please help me out?               \documentclass{sciposter}     \usepackage[latin1]{inputenc}     \usepackage[portuges]{babel}     \usepackage[centertags]{amsmath}     \usepackage{hyperref,amsfonts,multicol}     \usepackage[paperwidth=84cm,paperheight=120cm,centering,textwidth=74cm,textheight=100cm,left=2cm,top=2cm]{geometry}     \hypersetup{pdfpagelayout=SinglePage}     \usepackage{graphicx,colortbl}     \pagestyle{plain}     %\usepackage{fullpage}


title: Last visited URL in apa style

text: I'm using the `apa-good.bst` file to typeset my bibliography in APA style. I need to include something like "Last visited..." (using the `urldate` variable) when I cite a webpage but I don't know how I can do this. Can anyone help me?


title: Environments with conditionals in: why doesn't this work?

text: In response to this question I thought the obvious thing to do was the following:               \documentclass{article}     \newif\iffoo     \newenvironment{foobar}{\iffoo}{\fi}     \begin{document}     \begin{foobar}       Here is text     \end{foobar}     Here is more text     \end{document}      This doesn't work: `! Incomplete \iffalse; all text was ignored after line 5.` If, however, I add a `\footrue` to the preamble it compiles fine. Adding `\foofalse` does not make it work. Could someone explain this behaviour? This sort of thing is possible: the `comment` package does exactly this. I am not asking how to achieve this behaviour. My question is: why doesn't this thing work in LaTeX "out of the box"?


title: In Lyx turn greyed out text into comments

text: In Lyx I would like to convert greyed out text into comments. The Lyx environment is `lyxgreyedout`. I have considered switching to another IDE already and it is not an acceptable solution. The website below does something similar I think but I don't quite follow it: http://www.mail-archive.com/lyx-users@lists.lyx.org/msg79368.html If there is some alternate way of allowing comments to show up in a draft but not the final product in Lyx, please let me know.


title: LATEX: Error when use 'cline' in a table

text: I use latex to prepare exam sheets. I use the `exam.cls` package. In the cover page, I created a table to include the question categories and their points:               \begin{table}[H]        \centering        \large            \begin{tabular}{ l  l }                \hline                & \\                \parbox[l]{10cm}{\bf Problem} & \parbox[l]{2.6cm}{\bf Points} \\                \cline{1}                & \\            \end{tabular}     \end{table}      Unfortunately, when I use `\cline` in this table, I receive the following error message (when I remove `\cline`, the error message disappears):               Overfull \hbox (17.62482pt too wide) in paragraph at lines 19--24     [][]     Runaway argument?     1\@nil  \\ & \\ \end {tabular} \end {table}     ! Paragraph ended before \@cline was complete.     <to be read again>                        \par     l.38      How can I solve this error? BTW, here are the packages that I use               \documentclass[addpoints,12pt]{exam}     \usepackage{float}     \restylefloat{table}     \pagestyle{headandfoot}


title: Tikz triangle with point colours

text: How do I draw a triangle in tikz with "point colours" so that every point in the triangle is coloured according to the weighted (by distance) average colour of the corners.


title: utf8 input encoding with biblatex for CJK

text: This is a follow up on the "utf8 input encoding encoding with biblatex" which nicely solves the problem for accented Roman charachters. Now what would have to be done if the bibliography containse a Japanese entry. Manually defining a couple of thousand characters can't be the sensible answer. (Compiling would have to be done with XeTeX obviously)


title: Setting page numbers in bottom center in classicthesis (two-sided page)

text: The library of my school has asked to revise my thesis and put all the page numbers in bottom center. I have written my thesis using `classicthesis`. I am using the following options in my document.               \documentclass[                 twoside,                  openright,                 titlepage, numbers=noenddot, headinclude,                 footinclude=true,                   cleardoublepage=empty,                 BCOR=30mm, paper=letter, fontsize=11pt,                  dottedtoc,                  ngerman, american,                  listof=totoc,                  ]{scrreprt}                \PassOptionsToPackage{                     eulerchapternumbers,                     listings,                     pdfspacing,                     subfig,                     beramono,                     parts}{classicthesis}      I commented out `\pagestyle{scrheadings}` and used `\pagestyle{plain}` instead of that and it did not help. In the manual of `KOMA–Script Package` it is mentioned that > If you use the option `twoside`, page numbers will be set into the outer > margins, otherwise they will be centered. `scrbook` has twoside as the > default. I was able to partially solve this problem by using the following.               \deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark{}}{}     \pagestyle{pgnumbottomcenter}      It works perfectly except for the first page of each chapter as well as some of the pages of preliminary sections such as table of content. In fact, page number is placed at the outer margin. In the following , you can find the result of using this command. ![enter image description here](http://i.stack.imgur.com/UkqJx.jpg) ![enter image description here](http://i.stack.imgur.com/B9ogX.jpg) ![enter image description here](http://i.stack.imgur.com/Y98bO.jpg) Could someone help me how I can force `scrreprt` to place the page numbers at bottom center for all the pages when `twoside` option is being used? I would be grateful for any help (I need to submit my thesis as soon as possible)


title: Complex LaTeX Table

text: I am trying to make a LaTeX table. I have prepared the following code.               \begin{table}[htbp]     \caption{Combination Nomenclature, (Average Fill Factor)}     \resizebox{1.0\textwidth}{!}{     \begin{tabular}{|c||c|c|c|c|}     \hline     \textbf{Combination} &\multicolumn{4}{l|}{\textbf{Included Optional Steps}}\\     \cline{2-5}     &\textbf{1}&\textbf{2}&\textbf{3}&\textbf{4}\\     \hline\hline     \textbf{1}& X & & & \\     \hline     \textbf{2}& X & X & & \\     \hline     \textbf{3}& X & X & X & \\      \hline     \textbf{4}& X & X &  &X \\      \hline     \textbf{5}& X &  & X & \\      \hline     \textbf{6}& X &  & X & X\\      \hline     \textbf{7}& X &  & & X\\     \hline     \textbf{8}&  & X & &\\     \hline     \textbf{9}&  & X &  X &\\     \hline     \textbf{10}&  & X &  X & X\\     \hline     \textbf{11}&  & X & & X\\     \hline     \textbf{12}&  &  & X & \\     \hline     \textbf{13}&  &  & X & X \\     \hline     \textbf{14}&  &  &  & X \\     \hline     \hline     \textbf{15}& \multicolumn{1}{l}{Nano Particles Deposited, Not Sintered} &  &  & \\     \hline     \textbf{16}& \multicolumn{1}{l}{Only Grinded Wafer 1, No Particles Deposited, Not Sintered} &  &  & \\     \hline     \textbf{17}& \multicolumn{1}{l}{Only Grinded Wafer 2, No Particles Deposited, Not Sintered}  &  &  &\\     \hline     \end{tabular}}     \label{table:AverageFillFactor}     \end{table}      As you can see, the combinations 15-17 should be indipendent of the rows above and optional steps 1-4 should have equal width. The problem is that I am not sure, how to separate them.


title: The \the command

text: I wanted to know if someone could point me to a reference where I could learn more about the `\the` command. Searching for "the" has been, without surprise, entirely unproductive. Even consulting "comprehensive" LaTeX command/macro lists has been unfruitful. This blog is the only treatment of the subject that I could find, but it was not very informative.


title: What is a good symbol for day of birth?

text: I am using the `moderncv` package and it includes a nice header with symbols for email (`\Letter`) and mobile phone (`\Mobilefone`). I can't however seem to find a good symbol for a birth date. I was thinking of something like this but the closest thing I found in the comprehensive symbol list was `\Maggie` from the `simpsons` package. Can someone suggest a good symbol for a birth date?


title: Empty line after a tabular environment

text: I would like to have a little table without caption within my text. There should be, however, some space between the preceeding and following lines of text. The following snippet               \documentclass{report}     \begin{document}          Some text. Some text. Some text. Some text. Some text. Some text.     \\     \begin{center}     \begin{tabular}{r|c|c|}     &A&B\\\hline     C&AC&BC\\\hline     D&AD&DB\\\hline     \end{tabular}     \end{center}     \\\noindent     Some text. Some text. Some text. Some text.          \end{document}      does create a blank line above the table, but gives an error below as there is 'no line to end'. What's the right syntax here?


title: “Broken” arrow symbol

text: In his pretty awesome book “Undergraduate Algebraic Geometry” M. Reid uses (e.g. see page 4) symbol of “broken” arrow (which looks quite a like _dash+space+short arrow_ : “- →”) for partially defined maps. What is the most suitable way to produce it in LaTeX? I looked through “The Comprehensive LaTeX Symbol List” but didn't fined something similar.


title: How to define a macro conditionally based on whether it is being used in text mode or math mode?

text: I'd like to be able to make a macro `\foo` whose definition would look something like               \newcommand{\foo}{       \ifintextmode{abc}       \ifinmathmode{x\cdot y\otimes z}     }      so that               \foo $\foo$      produces ![enter image description here](http://i.stack.imgur.com/fVJpp.png) This TeX.SE question seems somewhat related, but I didn't quite understand the answer and it does not directly solve my issue. I'm sorry I don't have anything more to offer, in terms of making any progress myself.


title: How to add nimbus fonts to writeLaTeX.com?

text: Is there a way to include nimbus fonts to the writeLaTeX.com workspace? I tried to follow the example, replacing the custom font TTF with nimbus L, but it doesn't works.


title: Computer Modern fonts and Cyrillic letters

text: I am trying to typeset a multi-language unicode document (English, German, Spanish, Russian and there are more languages to come) in XeLaTeX and I am struggling with Cyrillic letters. Consider the following example:               \documentclass{article}     \usepackage{polyglossia}     \setdefaultlanguage{english}     \setotherlanguage{russian}          \begin{document}     \noindent     \textrm{Hello! Привет!}\\     \textit{Hello! Привет!}\\     \textsl{Hello! Привет!}\\     \textsc{Hello! Привет!}     \end{document}      The document is typeset with XeLaTeX without error messages on my TeXLive 2012 system but the Cyrillic letters don't show up. I made some experiments with the `fontspec` and `cm-unicode` packages but I could not get anything besides the Roman serif font to work (and it was a mess anyway - that is why I did not include it in the above example). What it the correct way to use all available Computer Modern characters for as many languages as possible at the same time in XeLaTeX (or LuaLaTeX)?


title: Make lstlisting honour baselinestretch

text: I have to use `lstlisting` instead of `Verbatim` in a particular case, because math escape doesn't work properly with the latter. I managed to have both look the same, but `lstlisting` ignores my `baselinestretch` settings, so the line spacing is too big:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{fancyvrb}     \usepackage{listings}     \usepackage[scaled=.73]{beramono}     \fvset{baselinestretch=0.94}     \lstdefinelanguage{scala}{       morekeywords={type}%     }     \lstset{       language=scala,%     % baselinestretch=0.94,% keyword doesn't exist       basicstyle=\ttfamily,%       fancyvrb=true,%       mathescape=true,%     }          \begin{document}          \begin{lstlisting}     type Vertex = ($\mathit{lb}_\mathsf{pre}$: Label, $\mathit{lb}_\mathsf{post}$: Label)     Next Line     Next Line     \end{lstlisting}          \begin{Verbatim}     type Vertex = ($\mathit{lb}_\mathsf{pre}$: Label, $\mathit{lb}_\mathsf{post}$: Label)     Next Line     Next Line     \end{Verbatim}          \end{document}      You can see the different line spacing here: ![enter image description here](http://i.stack.imgur.com/TcTig.png) The difference is not that big, but it makes a huge impact on long listings. What is the best way to apply the base line stretching to `lstlisting`?


title: Using math mode escapes with listings enabled fancyvrb

text: I am trying to escape math mode within `Verbatim`, using this answer. This works fine, until I use the listings package with `fancyvrb=true`               \documentclass{article}     \usepackage{fancyvrb}     \usepackage{listings}     \lstset{     % fancyvrb=true,%     }          \begin{document}          \begin{Verbatim}[commandchars=\\\{\},codes={\catcode`$=3\catcode`^=7}]     x=1/sqrt(z**2) ! $\frac{1}{\sqrt{z^2}}$     \end{Verbatim}          \end{document}      If I enable the `fancyvrb=true`, I get the following error: `Missing $ inserted.` And then nothing works. * * * **EDIT** : Taking the idea of adding `mathescape=true` from this answer, it seems to work in some cases, in others not:               \documentclass{article}     \usepackage{fancyvrb}     \usepackage{listings}     \lstset{     fancyvrb=true,%     mathescape=true,%     }          \begin{document}          Outside of verbatim: $\mathsf{lb}_\mathsf{pre}$:          \begin{Verbatim}[commandchars=\\\{\},codes={\catcode`$=3\catcode`^=7}]     x=1/sqrt(z**2) ! $\frac{1}{\sqrt{z^2}}$     Vertex = ($\mathsf{lb}_\mathsf{pre}$: Label, $\mathsf{lb}_\mathsf{post}$: Label)     \end{Verbatim}          \end{document}      The subscript still doesn't work inside the verbatim: ![enter image description here](http://i.stack.imgur.com/p6IS7.png) * * * If there is no solution to this, how could I disable listings temporarily for one particular `Verbatim` block?


title: Installing biber on Ubuntu 10.04

text: My tex file has `backend=biber` in the header. But, as I use tex-live 2009, biber is not installed by default. I downloaded the biber.tar.gz from the biber project page at sourceforg., When I extracted it, it had only one file named `biber`. I placed it in `/usr/bin` dir and made it executable. And I ran `biber my_paper.aux` and it showed an error: `/usr/bin not found`. I cloned the git dev project of biber. And when I tried building it, it showed up lots of dependancy issues. So is there an easy way to get biber working on my 32bit ubuntu 11.04 system?


title: xetex installation broken?

text: I have xetex installed on a Mac with the texlive 2011 installation. here is my source file:               \documentclass[11pt]{article}     \begin{document}     Web 安全与电子商务      \end{document}      here is my error:               $ xetex xetex     This is XeTeX, Version 3.1415926-2.3-0.9997.5 (TeX Live 2011)      restricted \write18 enabled.     entering extended mode     (./xetex.tex     ! Undefined control sequence.     l.1 \documentclass                       [11pt]{article}     ? ^D     ! Emergency stop.     l.1 \documentclass                       [11pt]{article}     No pages of output.     Transcript written on xetex.log.      here is my logfile:               $ cat xetex.log      This is XeTeX, Version 3.1415926-2.3-0.9997.5 (TeX Live 2011) (format=xetex 2011.7.3)  4 OCT 2011 11:04     entering extended mode      restricted \write18 enabled.      %&-line parsing enabled.     **xetex     (./xetex.tex     ! Undefined control sequence.     l.1 \documentclass                       [11pt]{article}     ?      ! Emergency stop.     l.1 \documentclass                       [11pt]{article}     End of file on the terminal!          No pages of output.     $       What am I doing wrong?


title: Checking if a macro expands to one of two given strings

text: I want to test if the expansion of a given macro, say `\mystring`, is equal to one of two given strings, say `string1`, `string2`. I guess it's possible to do this with **etoolbox** , with something like:               \ifstrequal{\mystring}{string2 or string3}{code for True}{code for False}      How? Or, is there another possible method?


title: Math mode in LyX (on a Mac) does not display properly

text: When editing math mode basic symbols (such as `\in`, `\cdot`, `\leq`) do not render properly. Once I leave the edit mode of a particular equation it renders properly in the `cmr` font. (See screen shots below.) I suspect it has to do with installing some font that Lyx uses while editing a formula. I have a MacTex installation, Lyx 2.0.7.1, screen font: Times New Roman, OS 10.9.2. Help appreciated. Here is why I get: While editing math mode: ![text is wierd while editing](https://dl.dropboxusercontent.com/u/162462/Lyx%20while%20editing.png) After exiting editing math mode: ![text appears after editing](https://dl.dropboxusercontent.com/u/162462/Lyx%20after%20editing.png)


title: Listing appendix entries separately

text: I have two chapters in the appendix - tables and figures( "Appendix A Figures" and Appendix B Tables"), i want the TOC of the document to show the entries in each. For example, "A.1 This is some figure". I have no idea how to do this. Currently only the Appendix A and B are listed in the TOC.               \documentclass[12pt,twoside,a4paper]{book}     \usepackage[titletoc,page]{appendix}     \usepackage{caption}               \begin{document}     \tableofcontents                    \begin{appendices}               \captionsetup[table]{list=no}     \renewcommand{\thesection}{\thechapter.\arabic{section}}     \renewcommand{\thesubsection}{\thesection.\arabic{subsection}}     \renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}     \chapter{Tables \label{app:figures}}     \begin{table}     \caption{Test table one}     \end{table}          \begin{table}     \caption{Test table one}     \end{table}     \end{appendices}     \end{document}


title: Plainnat.bst not found and package natbib

text: Trying to create a simple document with package natbib but I get the following               pdflatex mydocument.tex      is fine but with some warnings like               Package natbib Warning: Citation `Dukes:2011:OSP:2206329.2206341' on page 1 und     efined on input line 15.      and `bibtex mydocument.aux` complains that it can't the find the 'plainnat.bst' file.               ---line 11 of file proposal.aux      : \bibstyle{plainnat      :                   }     I'm skipping whatever remains of this command     I found no style file---while reading file proposal.aux      I have MacTex 2012 and have made sure that I have plainnat in `~/Library/texmf/bibtex/bst`. ## Example that does not work               \documentclass[12pt]{article}          \usepackage[authoryear]{natbib}          \begin{document}          Bla bla bal \citep{test}          \bibliographystyle{plainnat}     \bibliography{../bibliography}          \end{document}      where `bibliography.bib` is               @article{test,     author = "aba",     title = "a",     journal = "aa",     year = "2013"}


title: A package with macros for programming languages names?

text: Is there any package with predefined macros for common programming languages' names? I mean, macros that help writing things like C++, C#, F# etc. in a nice way, the same way as for example \TeX? I have already written some of my own macros to do that but surely someone else has already thought about that and have prepared such useful macros in a package. EDIT: Here are macros that I use myself. Might be useful for someone else.               \newcommand{\CPP}{C\nolinebreak[4]\hspace{-.05em}\raisebox{.3ex}{\small++}\xspace}     \newcommand{\CS}{C\nolinebreak[4]\hspace{-.05em}\raisebox{.2ex}{\small\#}\xspace}     \newcommand{\FS}{F\nolinebreak[4]\hspace{-.05em}\raisebox{.2ex}{\small\#}\xspace}


title: How to change color at beamer class using Luebeck theme and split outertheme?

text: I'm using the beamer class together with Luebeck theme and split outertheme. I already managed to adjust to color of the basic structure, if I use a dark color everything is fine, but now I have to use yellow. Here's a example of my code:               \PassOptionsToClass{}{beamer}     \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{helvet} %Helvetica Font     \usetheme{Luebeck}     \useoutertheme{split}     \beamertemplatenavigationsymbolsempty     \definecolor{RVS}{RGB}{251,234,12}     \definecolor{Grey}{RGB}{128,128,128}     \setbeamercolor{structure}{bg=Grey, fg=RVS}     \setbeamercolor{title}{fg=black}     \setbeamercolor{titlelike}{fg=black}      I managed to adjust to color of the title and the headings but I still need to change to color of the text on the TOC page and the TOC at the top provided by split. I want to do the subchapters on the top right in black for better contrast when using the yellow structure. I hope that someone can help me!


title: Can I use PDFLaTeX to produce PDF from user input on a website?

text: What I want to do is take textbox input on a website, use java or javascript to convert it to LaTeX code then output a formatted PDF document to the user. I am wondering if this is possible and where I can find the information on setting up an interface with PDFLaTeX from my website.


title: Figures in appendix are not referenced correctly (or not the way I want them to :) )

text: In my document, I have some figures in my appendix I want to reference in my text but the output of `\ref{}` is only "Figure .2 shows...". It should be something like "Figure B.2". Here's my minimal example:               \documentclass[bibliography=totoc,index=totoc,numbers=noenddot]{scrbook}     \usepackage[demo]{graphicx}     \begin{document}          \frontmatter         \include{Titel}         \tableofcontents          \mainmatter         Here is my text \ref{fig:XYZ}          \backmatter     \appendix     \renewcommand\thesection{\Alph{section}}     \chapter{Appendix}     \section{UML-Diagrams}     \begin{figure}[h]       \begin{center}         \includegraphics[width=15cm]{xyz.jpg}         \caption{\label{fig:XYZ}XYZ}       \end{center}     \end{figure}          \end{document}


title: Is pdftex 1.40.13 outputting malformed pdfs?

text: I have several preexisting projects that produced valid pdf output on versions of pdftex up to 1.40.10. Now with version 1.40.13 I'm getting pdfs that the iText library complains are malformed. My question is whether I'm analyzing the situation correctly and whether it looks like the bug is in pdftex or iText. The following demonstrates the difference in behavior on two systems, one with the old version and one with the new. The pdftk utility parses the pdf using the iText library:               |||| LM  me $ pdflatex --version | head -1     pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)     |||| LM  me $ pdflatex -shell-escape -interaction=nonstopmode me >/dev/null     |||| LM  me $ pdftk me.pdf cat output /dev/null     |||| LM  me $           ---- rintintin me $ pdflatex --version | head -1     pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)     ---- rintintin me $ pdflatex -shell-escape -interaction=nonstopmode me >/dev/null     ---- rintintin me $ pdftk me.pdf cat output /dev/null     Error: Failed to open PDF file:         me.pdf     Errors encountered.  No output created.     Done.  Input errors, so no output created.      This is with identical (freshly synchronized) source files. This doesn't happen with all my projects, and, e.g., I can't produce it with a simple "hello, world" document. I've posted the file me.pdf that generates the error here: http://www.lightandmatter.com/pdftk_bug/ Pdftk doesn't report the type of error, but it's possible to find out what it is by invoking an iText tool from the command line:               ---- rintintin me $ java -cp /usr/share/java/itext1-1.4.jar com.lowagie.tools.plugins.InspectPDF me.pdf     trailer not found.      The old version of pdftex outputs pdf 1.4, the new 1.5. The iText library is supposed to be able to handle pdf versions up to 1.6. Examining the ends of the two pdf files in a text editor, there does seem to be a clear difference in the trailers: Pdf output by old version:               trailer     << /Size 3577     /Root 3575 0 R     /Info 3576 0 R     /ID [<F3E9A772E7220505119484B4C1B5059E> <F3E9A772E7220505119484B4C1B5059E>] >>     startxref     38327286     %%EOF      Pdf output by the new version:               3499 0 obj <<     /Type /XRef     /Index [0 3500]     /Size 3500     /W [1 4 1]     /Root 3497 0 R     /Info 3498 0 R     /ID [<B51C8DB4F9B12A880DBBE0625164918E> <B51C8DB4F9B12A880DBBE0625164918E>]     /Length 9886     /Filter /FlateDecode     >>     stream     x\3325\234w|\224U\376\2663!\275@z#      !!=\201\220\204^D\222^PR\200\320^RJ^R\322CHDAW]u-\253^B     ...lots of binary data snipped for brevity...     w*\374;\233\344\231A\367H\230^?6\3120\233\356t\230\303^C\246\317c^E\362\314\213;^S\346\343\307d\230G7\223\353fr\335$     endstream     endobj     startxref     37919910     %%EOF      The second to last line is supposed to be a byte offset to the cross-reference section.               |||| LM  me $ od -a -j 38327286 me.pdf | head -1     222151766   x   r   e   f  nl   0  sp   3   5   7   7  nl   0   0   0   0          ---- rintintin me $ od -a -j 37919910 me.pdf | head -1     220516246   3   4   9   9  sp   0  sp   o   b   j  sp   <   <  nl   /   T      In the output from the old version, the byte offset points to the string "xref," which seems right. In the output from the new version, it points to something that looks different, perhaps a new style of xref used in pdf 1.5? When I compile a simple "hello, world" document with the new pdftex, it has a format that looks similar to this, but iText doesn't choke on it. I haven't dug into the pdf specs or the source code of iText, so I don't know whether this is actually a malformed pdf or if it's valid pdf 1.5 that iText just isn't accepting. Ghostscript and poppler both accept the file without complaint.


title: Custom figure insertion in tex document

text: I have a report of 3 pages - the first page and the quarter of the second page have texts. I have to include a figure which needs another page. The problem: Figure is appearing only on the 3rd page while I am trying to bring it to the second page and the remaining texts on the third page. The `\begin{figure}[ht!]` option is not working. I am sure there must be a little trick, but what is it?


title: MiKTeX 2.9 CJK Korean font not found error

text: After a day of trying to use Korean fonts in my LaTeX file, I ask this forum for some helpful insight. I'm using MiKTeX 2.9 (just upgraded a few days ago from 2.7). So far, I have been able to use English latex with no problems. I used the MiKTeX Package Manager (Admin) and installed `cjk`, `cjk-fonts`, `cjkpunct` and `miktex- cjkutils-bin-2.9` I used the Options (Admin) to Refresh FNDB and to Update Formats. I have read the CJK documentation file at http://www.inf.ed.ac.uk/systems/tex/CJK/CJK.txt and have searched the web for helpful examples. As far as I can tell, I have the correct installation and use. However, I can not obtain output. I have done two things. 1) The following error is obtained from the miminmal latex source file: the Korean was entered via keyboard via the vim editor (I also used notepad). > >     Running miktex-makemf.exe... >     miktex-makemf: The kmj source file could not be found >     Running hbf2gf.exe >   >     Couldn't find 'kmg.cfg' >     miktex-maketfm: No creation rule for font kmj15 >   >     ! Font C61/mj/m/n/10/15=kmg15 at 10.0pt not loadable: Metric (TFM) file > not found >                 \documentclass{article}     \usepackage{CJK}     \begin{document}     The following should be in Korean     \begin{CJK}{KS}{}     안녕하세요     \end{CJK}     The previous should be in Korean     \end{document}      2) I changed the following `\begin{CJK}{UTF8}{}` and changed vim's encoding to utf-8 via the `:set encoding=utf-8` command. I received a different error. I have a clean compile to dvi. However, dvips complains about missing fonts (also yap tries to build these missing fonts). > >     Trying to make PK font cyberbc5 at 600 DPI... >     Running miktex-makemf.exe... >     miktex-makemf: The cyberbc source file could not be found >


title: Automatically assigning abbreviations to an index in ConTeXt

text: I'm using ConTeXt to provide layout for my thesis across many files comprising the project. I would like to automatically generate an index based on keywords and abbreviations with minimal hinting by me. I suspect the `\setupsynonyms[abbreviation][command=\index]` command has the ability to add abbreviations to the index automatically, but I haven't found an invocation that actually works. Is there a command for ConTeXt that provides either level of automatic index generation?


title: error bar colors in scatter plot

text: A data file contains four columns: x, y, error on y, class. class is an integer which I feed to `scatter src` so i get a graph that has different colors for different classes. However, the error bars don't have class colors.               \begin{tikzpicture}     \begin{axis}[colorbar right, colorbar sampled, colorbar style={samples=3},                  point meta min=-0.5, point meta max=1.5,                  scatter/use mapped color={draw=mapped color, fill=mapped color}]     \addplot[scatter, scatter src=\thisrow{class},            error bars/.cd, y dir=both, y explicit, error bar style={color=mapped color}]            table[x=x,y=y,y error=err] {     x y err class     0 0 1   0     1 1 1   0     2 0 1   1     3 2 2   1     };     \end{axis}     \end{tikzpicture}      In that case, the error bars are black. If instead of `error bar style={color=mapped color}` I use `error bar style={color=red}`,the error bars are red. ![example](http://i.stack.imgur.com/DlJdm.png) How can I get the right colors for the error bars, e.g. those of the points?


title: Bibliography problem: reference not printed

text: I rather new to `bibliography.bib` (bibtex) and I have a weird problem. My problem is that some items the bib files are printed and some not. I added part of the main file and part of the bibtex file below. The first bibfile item is printed while the second is not. I have used `\cite{reference name}` for both the items. My question is can some help me with fixing this problem?               %%%%Main Tex File%%%%     \bibliographystyle{unsrt}      \nocite{*}     \bibliography{12_Bibliography/bibdatabase}\addcontentsline{toc}{chapter}{Bibliography}          %%%% Bibtex File%%%%     @Article{inflatblimp2, %this one is printed     author = {Walkenhorst B.T., Miner G.F., Arnold D.V.},     title = {A low cost, radio controlled blimp as a platform for remote sensing},     journal = {Microwave Earth remote sensing laboratory - Brigham Young University},     year  ={2000},     pages = {}     }          @inbook{TOcost5, %this one is not printed     author = {James R. Wertz, Wiley J. Larson},     title = {Space Mission Analysis And Design},     volume = {8},     edition = {Third},      pages = {800-801},         }


title: LaTeX and Textmate

text: I have been trying to get to grips with TextMate for creating LaTeX files and when I go to view the file I get an error: can't find kpsewhich on path. I have two questions: Do I have to have a LaTeX programme (MacTeX)? Shall I add kpsewhich to the path? I am confused..


title: Managing TDS Trees for Multiple Manuals In GIT Source Controlled Environment

text: We use LaTeX for our all of our documentation, which includes multiple product lines with multiple manuals. These manuals are built right along with our installers using our automated build server. We have developed a pretty sophisticated LaTeX "core", which is a TDS tree of various packages (some home built), classes, fonts, boilerplate text, etc. It is used in all of our documents and is often improved and revised in various ways, some of which are not compatible with "the old way that we did it." (although I try to behave as much as I can. :) As we go along, new products (or new versions of products) use the newest core, while older builds should use the older one. To do this, we've made our core a submodule of all of the GIT repositories. It is branched and revised, just as the products that we make are revised. The issue: I need a way to dynamically add a TDS tree, just before compiling the manual. That is, on any given developer's computer (which might be Mac or PC), they might have multiple branches/versions of projects open, each with (perhaps) a different core. When they hit "compile" in WinEDT or TextMate, I want the system to get the core for that project, automatically. Ideally, I'd like to be able to say something like: `lualatex --tdstree "../core" mymainfile.tex` Which I understand is completely made up. :) Failing that, is there some sort of relatively cross platform way to do the same? My issue is:   * A relative path to the current project is very tricky because no developer puts their local source files in the same spot and "home" is not the same on PC and Mac. I don't think it's really possible to say "relative to the file that is being processed, the TEXMFHOME directory is one back and called core."   * I can never seem to figure out what each platform needs once the TDS tree is set. I think I can figure this out, but it might just be `sudo texhash` and `luatools --generate`. The problem with that is I do not want to have them have to remember this for each time they switch and it would take too long if I ran each command before every compile (not to mention the password issue). I believe that I can skip the `texhash` command by using "//" at the end of the TDS entry, but I don't believe that I can skip `luatools --generate`. At least `luatools` doesn't seem to require `sudo` on the Mac. Has anyone else found a way to easily add a TDS tree as part of a compile command? I'm probably missing something very simple. :P


title: Algorithm tag and page break

text: I'm starting my experiment with LaTeX, i'm writing an article and all that I want is to embed an algorithm inside normal text, this is my code:               \documentclass{article}     \usepackage{algorithmic}     \begin{document}     \section{Lettura file .gpx}      Lorem ipsum ...          \algsetup{indent=1.7em}     \begin{algorithm}     \caption{Alg capt}     \label{alg1}          \begin{algorithmic}[1]     ... algorithm here...     \end{algorithmic}     \end{algorithm}     \end{document}      This is fully working but algorithmic uses a pagebreak automatically, how can I avoid this break and show the algorithm immediately after "lorem ipsum" part?


title: Customize section numbering in TOC

text: I'm working with `report` class and I would like to customize headings of chapters, sections and subsections, abvoe all the look of numbers before their respective headings, both in the text and in the contents. ## My Probolem I've customized `\thechapter`, `\thesection` and `\thesubsection` like that:                   \renewcommand{\thechapter}{\Ordinalstring{chapter}}         \renewcommand{\thesection}{%             \textls{%                 \fontencoding{T1}\fontfamily{phv}\fontsize{9pt}{10.8pt}\selectfont%                 \Numberstring{chapter}.\numberstring{section}%             }%         }         \renewcommand{\thesubsection}{%             \textls[100]{%                 \fontencoding{T1}\fontfamily{phv}\fontsize{11pt}{13.2pt}\selectfont%                 \arabic{chapter}.\arabic{section}.\arabic{subsection}%             }%         }      Now, for table of contents I would like to have a different look for these counters. That's to say, I would like my index looks like this:               Chapter 1       Title of Chapter                                              thepage       1.1         Title of Section .......................................... thepage         1.1.1           Title of Subsection ..................................... thepage      For chapters I've changed the addcontentsline declaration in `\@chapter` definition as follows:                   \addcontentsline{toc}{chapter}{\protect\numberline{Chapter \arabic{chapter}}\newline\hspace*{.7em} #1} % space is not exact for the time being       and so in toc I have ''Chapter 1'', ''Chapter 2'' and so on. I would like to make the same thing for sections and subsections. ## Using `titlesec` and `titletoc` packages After some research I've found `titlesec` and `titletoc` packages and using them my code is this:                   \documentclass[a4paper]{report}         \usepackage[english]{babel}         \usepackage[latin1]{inputenc}         \usepackage[scaled=0.92]{helvet}         \usepackage{mathptmx}         \usepackage[T1]{fontenc}         \usepackage{lipsum}         \usepackage[tracking=true]{microtype}         \usepackage{fmtcount}         %         \renewcommand{\thechapter}{\Ordinalstring{chapter}}         \renewcommand{\thesection}{%             \textls{%                 \fontencoding{T1}\fontfamily{phv}\fontsize{9pt}{10.8pt}\selectfont%                 \Numberstring{chapter}.\numberstring{section}%             }%         }         \renewcommand{\thesubsection}{%             \textls[100]{%                 \fontencoding{T1}\fontfamily{phv}\fontsize{11pt}{13.2pt}\selectfont%                 \arabic{chapter}.\arabic{section}.\arabic{subsection}%             }%         }         \usepackage[rigidchapters,nobottomtitles*,pageatnewline]{titlesec}             \titlespacing*{\section}                           {0em}                           {2em}                           {0.5em}             \titlespacing*{\subsection}                           {0em}                           {2em}                           {0.5em}             \titleformat{\section}                         [display]                         {\fontencoding{T1}\fontfamily{phv}\fontsize{11pt}{13.2pt}\selectfont}                         {\thesection}                         {1ex}                         {}                         {}             \titleformat{\subsection}                         [display]                         {\fontencoding{T1}\fontfamily{phv}\fontsize{11pt}{13.2pt}\selectfont}                         {\thesubsection}                         {0em}                         {}                         {}         %         \usepackage{titletoc}             \titlecontents{chapter}                           [0em]                           {\bfseries}                           {Chapter \thecontentslabel\\*\hspace*{.7em}}                           {}                           {\hfill\contentspage}             \titlecontents{section}                           [1.5em]                           {}                           {\thecontentslabel\\*\hspace*{.7em}}                           {}                           {\titlerule*[.5pc]{.}\contentspage}             \titlecontents*{subsection}                           [3.8em]                           {}                           {\thecontentslabel\\*\hspace*{.7em}}                           {}                           {\titlerule*[.5pc]{.}\contentspage}         %         \begin{document}         \chapter{Foo}              \lipsum[1]              \section{Bar}              \lipsum[2]              \subsection{Qux}              \lipsum[3]              \section{Quux}              \lipsum[4]              \subsection{Quux1}              \lipsum[5]              \chapter{foo}              \section{bar}              \lipsum[4]              \subsection{qux}              \lipsum[5]              \tableofcontents         \end{document}      Here I don't want to change the `\thechapter` contents for toc, but only for sections and subsectios (anyway I could change chapter counter for toc as I made above in `\@chapter` definition and so, declaring `\titlecontents{}[]{}{}{}{}` for `chapter` as above, `\thecontentslabel` would contain arabic numbers for chapters). I've thought to customize `\thecontentslabel` or the definition of `\numberline` (at line 433 in `titletoc.sty`) in `\ttl@tocentry`. As I undersand it, `\numberline` is responsible for printing numbers of sections and subsections in toc, but I don't know how to redefine it... It would be possible to redefine `\thecontentslabel` only for sections and subsection? Please, could I have an explanation about the behavior of `\thecontentslabel`, expecially its definition? If I try to declare `\thecontentslabel` after `\begin{document}`, why does `\LaTeX` give me this error message?               ! Undefined control sequence.     l.76 \thecontentslabel      ## Some attempts I've tried with this:                   \newcommand{\originalthecontentslabel}{}         \global\let\originalthecontentslabel\thecontentslabel         \gdef\thecontentslabel#1{\originalcontentslabel{\arabic{#1}}}      but it seems not to be considered by `\LaTeX`. I think that `titletoc` overwrites my re-definition (I've tried to put it first beforse `titletoc` and then after it, but it's not considered). Then, I've tried with this:                   \def\numberline##1{\global\ttl@labeltrue\gdef\thecontentslabel{\@arabic##1}}%      and this:                   \def\numberline##1{\global\ttl@labeltrue\gdef\thecontentslabel{\arabic{##1}}}%      but they don't work and `\LaTeX` prints this error message:               ! Missing number, treated as zero.     <to be read again>     \let     l.2 ...{\numberline {\Ordinalstringnum {1}}Foo}{1}     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)      ## Summary In summary,   * how to edit sections and subsection counters in order to have different formats for their numbers in the table of contents without using `titletoc`?   * how to make the same thing in the above item with `titletoc` (or other suitable package...)? Hope to have been carefull enought!