title: Creating a diagram through gnuplot then putting it into LaTeX

text: I'm honestly at a loss. I've honestly tried using gnuplot and LaTeX together but it never seems to give anything desirable. I have the gnuplot code;               reset          set lmargin at screen 0.2;     set rmargin at screen 0.977;     set tmargin at screen 0.96;     set bmargin at screen 0.13;          # Define colour range to be consistent amongst plots     set cbrange [lowcol:highcol];               set terminal latex     set out 'psi.tex'     set termoption dash          #set title istitle;     set xlabel '$x/a$';     set ylabel '$y/a$' offset 1.7;     set contour;     set view map;     unset surface;     set cntrparam levels 8;     set isosamples 50;     unset key     unset colorbox     splot 'loop_bottom.txt' w l notitle,'loop_top.txt' w l notitle      and the minimal package               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \input{psi.tex}     \end{document}      and I get something that looks like http://postimg.org/image/btyar3tq7/ Which is kind of okay. But the lines are very grainy, I also need the x-axis half the size and "set size 0.5,1" doesn't seem to be working. Unfortunately I can't put the text files that contain the data points on here, but would there be a better (and easily understandable, the deadline for this project is very soon) to be able to plot a monochromatic contour plot of data points in LaTeX, like the one in the picture?


title: Expansion issue with \begingroup and \foreach

text: > **This question led to a new package:**   >  `nowidow` I'm trying to define a dynamic `\begingroup` command to get rid of widows:               \usepackage{pgffor}     \newcommand{\nowidow}[1][2]{%      \begingroup\widowpenalties #1 \foreach \n in {2,...,#1}{10000 } 0       \par\endgroup     }      This fails complaining that `\begingroup` requires a number and I'm guessing this has to do with expansion. Here is a MWE:               \documentclass{scrbook}          \usepackage{lipsum}          \usepackage{pgffor}     \newcommand{\nowidow}[1][2]{%      \begingroup\widowpenalties #1 \foreach \n in {2,...,#1}{10000 } 0      \par\endgroup     }          \begin{document}          \lipsum     \nowidow          \end{document}      How can I get this to work? Would it be easier (although less portable) to do it in Lua?


title: relative paths for bibtex in lyx

text: I insert a bibliography into my LyX document through `insert > list/TOC > bibtex bibliography`. I find my file and everything works out. However, the path it uses is absolute as opposed to relative so when I open things up on another machine the bibliography is not found. How do I specify a relative path for my bibtex file in LyX?


title: Help with command \author for more than 2 authors

text: I need to insert two authors name in a paper. However, the names appear separated by a comma and not with the word AND between them. I am using the command \author for each author and also the other related commands as \emailauthor and \address are being used for each author. How to change to appear the names with AND between them?


title: Vertical spaces around display math

text: _(First of all, I know that`\[ \]` should be used instead of `$$ $$` and I do it.)_ I'd like to know about the vertical spacing around math display blocks. According to `texdef -t latex \[` we have               \[:     macro:->\relax \ifmmode \@badmath \else \ifvmode \nointerlineskip \makebox [.6\linewidth ]{}\fi $$\fi       and `texdef -t latex \]` returns               \]:     macro:->\relax \ifmmode \ifinner \@badmath \else $$\fi \else \@badmath \fi \ignorespaces       So I didn't see any command for vertical spacing. Since the command `$$` appears in the code above I tried also `texdef -t tex $$` and `texdef -t latex $$` with no success. If I'm not wrong I remember something related with `\abovedisplayskip` or something similar. **Well, my question is:** Are the vertical spaces above and below the command `\[ \]` the same as the ones inserted by `\begin{equation}\end{equation}` (and its stared versions)? How to check this reading the macros and codes?


title: How to use 'Bundledoc', 'Snapshot' and 'Arlatex'?

text: I am writing a document and I want to share it with some partners I've been searching around and I found that Bundledoc, Snapshot and arlatex could help me to create my document and share it, the only problem is that I do not know how to use them I already read Is there a way to create a standalone folder/document with non standard packages? but I do not know where do I have to write the bundle and arlatex commands? inside the same latex document, in another document or in the terminal. I am new to latex so I do not know a lot could you help me please? I do not know if this matters I am using a macbook pro.


title: A macro that passes each word of its argument to another macro as an argument (again)

text: I know that this is a duplicate to A macro that passes each word of its argument to another macro as an argument?, that's why I kept the title, but I didn't manage to get the right result when the argument that contained the words is given also as a macro. See the code below:               \documentclass{minimal}%     \begin{document}          \def\somefigures{1 2 3 4 5 6 7 8 9}     \def\wbox#1{\boxw#1 \empty}     \def\boxw#1 #2{\fbox{#1}\ \ifx #2\empty\else\expandafter\boxw\fi #2}          \wbox{1 2 3 4 5 6 7 8 9}\bigskip          \wbox{\somefigures}          \end{document}


title: Transaction Report Advanced Formatting

text: I am in the process of transitioning internal reports to latex from manually created PDF files. And, for the most part I can get the information on the page, but formatting is proving to be more difficult than I anticipated. I've been able to get the basic set up using the longtable package, and striping with colortbl. But I haven't figured out how to put the stroke above and below the page header, or format the region at the top of the page. I have included an example of the report I am currently working with. Any advice would be appreciated, especially for formatting the region including "Midwest" and above. http://dl.dropbox.com/u/299036/sample-report.pdf Thanks.


title: pdflatex cannot be found

text: I have read the many posts on this topic already, but I have had zero success with all of the solutions. Just purchased a macbook (OSX 10.8.2) and used the `mactex` package to run the standard install. `TeXShop` opens up, but when I try to typeset a document, I get the error message : > "/usr/texbin/pdflatex does not exist. Perhaps TeXLive was not installed or > was removed during a system upgrade. If so, go to the TeXShop web site and > follow the instructions to (re)install TeXLive." I'm going to re-download and re-install `mactex`, but I don't see how that will help. I'm totally new at all of this stuff, so go easy.


title: page-numbering doesn't work

text: here it is my document               \pagenumbering{gobble}          \input{frontmatter/frontespizio}          \pagenumbering{roman}     \tableofcontents          \pagenumbering{arabic}     \input{mainmatter/chapter_1}      what it happens is that `tableofcontents` receives arabic numbering and I don't get roman numbering


title: Building chemical "ICE" tables with tabular environment

text: I am starting to write my chemistry lab reports out in LaTeX, but keep getting stuck on the "ICE" tables (see the LaTeX example below). I can't figure out how to get the `+` and `\rightleftharpoons` in the heading to go in between the columns. They should be in the middle between the columns (almost over the &).                   \begin{tabular}[c|ccc]         \hline         X   &   $[H^+]$ $+$ & $[OH^-]$  $\leftrightharpoons$ & $[H_2O]$ \\         \hline         I   &       x.xx    &   x.xx                         &  x.xx    \\         C   &       x.xx    &   x.xx                         &  x.xx    \\         E   &       x.xx    &   x.xx                         &  x.xx    \\         \hline         \end{tabular}      I tried to find a photo example, but there didn't seem to be any on Google Images. Seems like I'm not the only one who hasn't figured out a good way to do this.


title: Change vertical position of \chapter

text: I am doing my Bachelor report. I can't get the chapter name to an higher location, so there is more space for text.


title: How to get caption above listing with minted?

text: I'm using the `minted` package. How can I get the caption to show before the code in the document?               \documentclass[a4paper]{scrartcl}     \usepackage{minted}     \begin{document}         \begin{listing}[H]             \caption{This is below the code.}             \inputminted{matlab}{myfile.m}             \label{lst:the-code}         \end{listing}     \end{document}


title: Parts numbering in Proofs

text: I am using `proof` environment from `amsthm` to type proofs. Some proofs are long, so it would be nice to split them into numbered parts. I have defined new theorem environment called `proofpart` for that purpose. The problem is that the `proofpart` counter does not reset inside a new proof and continues to grow. So I wonder how the counter can be reset for such case. Sample document:               \documentclass{article}     \usepackage{amsthm}               \theoremstyle{definition}     \newtheorem{proofpart}{Part}     \newtheorem{theorem}{Theorem}          \begin{document}       \begin{theorem}         Some theorem       \end{theorem}            \begin{proof}         Proof of some theorem         \begin{proofpart} % 1           First part          \end{proofpart}         \begin{proofpart} % 2           Second part         \end{proofpart}       \end{proof}                 \begin{theorem}         Another theorem       \end{theorem}            \begin{proof}         Proof of another theorem         \begin{proofpart} % 3, but should be 1           First part         \end{proofpart}         \begin{proofpart} % 4, but should be 2           Second part         \end{proofpart}       \end{proof}          \end{document}


title: How do I make Kile create a new folder for each .tex file I compile?

text: I am having trouble organizing my LaTeX files; I think encapsulating each file in a folder of the same name might be my best solution. In order to do this efficiently, I need to change the build parameters for PDFLaTeX, QuickBuild, and XeLaTex (and, frankly, all of the other build modes) in Kile so that, when I press the toolbar build buttons, a folder is automatically created for the file, the file is put in that folder (or the folder is created around the file) and the auxiliary files are created. How would I do this with kile? The structure is as follows:               . file       .. file.tex       .. file.aux       .. file.pdf       .. file.log       .. file.synctex.gz      Alternatively, is there a way I can embed all these files in a PDF and then have Kile (and other editors) read and write to those files in the PDF?


title: Detect closing braces with a command

text: I want to make a command that detects if the next token written in the document is a closing brace. My best approach is to use the `\@ifnextchar` command. In fact, the following code:               \makeatletter     {     \@ifnextchar{\egroup}{yes}{no}     }     \makeatother      Does print `yes`. But when i try to define a command `\demo` in a `.sty` file as:               \newcommand{\demo}     {     \@ifnextchar{\egroup}{yes}{no}     }      and make the call:               {\demo}      It prints `no`. I suppose that this happens because LaTeX detects a "end of command" token before returning to the document. Anyway, I would like to know the actual reason of why this happens, and how should I define the `\demo` command for printing `yes` in the last example. edit: In a blank document it actually prints yes. This is my minimal working example where it prints no:               \documentclass[a5paper]{book}          \usepackage{xparse}          \NewDocumentCommand{\wrapper}{ >{\SplitList{.}} m }     {     \begin{itemize}     \ProcessList{#1}{\entry}     \end{itemize}     }          \newcommand{\entry}[1]     {     \item \begin{math} #1 \end{math}     }     \makeatletter     \newcommand{\demo}{\@ifnextchar{\egroup}{yes}{no}}     \makeatother          \begin{document}          \wrapper{a.b.{\demo}.d} prints no     but {\demo} prints yes               \end{document}      edit 2: I just noticed that in my project, detecting that `\demo` is the last one within a `\wrapper` could be enough. So:               \wrapper{\demo.\demo}      should print `no` first and then `yes`. Now that I look at it this way, I'm sure it has to be another way to get this information easier.


title: enpassant chess font

text: I have got a ttf-font that I will like to use in chess diagrams. I have installed in the enpassant package before, but this time I only have the ttf- file. How do I convert this into the LaTeX package?


title: Display and format of section and subsection in RTL (Hebrew)

text: I have come across a very peculiar problem. The `sections` and `subsections` show correctly in my output when the language is set to English. But when I change the language to Hebrew which it needs to be to display the RTL language correctly, the `sections` and `subsections` are messed up. I need to understand why this is happening and how to fix it, please. The only change between the two examples is `\setmainlanguage{english}` changed to `\setmainlanguage{hebrew}`. An ideal answer would use the `hebrewnumerals` feature, but show only the relevant `subsection` and `section` parts of the number. As in 2 instead of 1.1.2 or rather ב instead of א.א.ב ## Example 1: ![enter image description here](http://i.stack.imgur.com/VP86s.png) ## Example 2: ![enter image description here](http://i.stack.imgur.com/MnWdc.png) ## MWE: (compile it in `XeLaTeX` with Cardo font)               \documentclass[paper=a5,pagesize=pdftex]{scrbook}     \usepackage[top=2cm,bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}     \usepackage[pagestyles]{titlesec}     \usepackage{lettrine}     \usepackage{xltxtra}     \usepackage{tocloft}     \usepackage{etoolbox}     \usepackage[toc]{multitoc}     \usepackage{setspace}          \renewcommand{\thesection}{\arabic{section}}     \renewcommand{\thesubsection}{\arabic{subsection}}          \setcounter{tocdepth}{0}     \setcounter{secnumdepth}{2}          \defaultfontfeatures{Mapping=tex-text}     \setmainfont{Cardo}          % sets the marks to be used (section and subsection)     \setmarks{section}{subsection}          \newlength\howwide          \newcommand\defhowwide{         \ifnumless{\value{section}}{99}{\ifnumgreater{\value{section}}{8}{\setlength{\howwide}{2.5em}}{\setlength{\howwide}{1.2em}}}{\ifnumgreater{\value{section}}{98}{\setlength{\howwide}{3.5em}}{\setlength{\howwide}{2.5em}}}     }          % sections and subsections formatting     \titleformat{\section}{}{\lettrine{\thesection}}{0em}{}[\vskip-1\baselineskip]     \titleformat{\subsection}[runin]{\small\bfseries}{\thesubsection}{1em}{}     \titlespacing{\section}{\howwide}{-1pt}{0pt}     \titlespacing{\subsection}{0pt}{0pt}{1em}          \setlength{\parindent}{0pt}          \newlength\NumLen     \newlength\LinLen     % indents one line of text. Indentation= width of section number + 1em     \newcommand\IndOne{%       \setlength\NumLen{\howwide}       \addtolength\NumLen{0.5em}       \setlength\LinLen{\dimexpr\textwidth-\NumLen}%\the\NumLen\the\LinLen       \parshape 2 \NumLen \LinLen 0pt \textwidth}     % indents two lines of text. Indentation= width of section number + 1em     \newcommand\IndTwo{%       \setlength\NumLen{\howwide}       \addtolength\NumLen{0.5em}       \setlength\LinLen{\dimexpr\textwidth-\NumLen}%\the\NumLen\the\LinLen       \parshape 3 \NumLen \LinLen \NumLen \LinLen 0pt \textwidth}          \usepackage{polyglossia}         \setmainlanguage{english}         \setotherlanguage{english}          \begin{document}          \mainmatter          \newlength{\myIndent}     \setcounter{section}{0}          \addtocounter{chapter}{1}          \setcounter{section}{0}     \defhowwide     \section{}     \settowidth{\myIndent}     {\IndOne בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ׃}     \ifdimless{\the\myIndent}     {\textwidth-\howwide+0.75em}     {\IndOne בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ׃ \stepcounter{subsection}     \subsection{} \IndOne וְהָאָרֶץ הָיְתָה תֹהוּ וָבֹהוּ וְחֹשֶׁךְ עַל־פְּנֵי תְהֹום וְרוּחַ אֱלֹהִים מְרַחֶפֶת עַל־פְּנֵי הַמָּיִם׃}     {\IndTwo בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ׃ \stepcounter{subsection} \subsection{} וְהָאָרֶץ הָיְתָה תֹהוּ וָבֹהוּ וְחֹשֶׁךְ עַל־פְּנֵי תְהֹום וְרוּחַ אֱלֹהִים מְרַחֶפֶת עַל־פְּנֵי הַמָּיִם׃}     \subsection{} וַיֹּאמֶר אֱלֹהִים יְהִי אֹור וַיְהִי־אֹור׃     \end{document}


title: How to build one efficient alpha numbering?

text: Seeing this post, I'm looking for one good solution for alpha numbering. For my point of view, the way the numbering must be displayed depends on the maximum of the numbers.   1. If MAX = 26, then the alpha numbering must be `a, b, c, ..., z`.   2. If MAX = 26^2, then the alpha numbering must be `aa, ab, ac, ..., az, ba, bb, bc, ..., bz, ..., za, zb, zc, ..., zz`.   3. If MAX = 26^n, then the alpha numbering must be similar but with n letters instead of two. How this features can be obtained by using one command with one constant to indicate the numbers n of letters to use for the alpha numbering ?


title: Align text in tables in LyX

text: I want to align the text of one of my tables like this: ![enter image description here](http://i.stack.imgur.com/Edo4t.jpg) However, I got this: ![enter image description here](http://i.stack.imgur.com/bHjit.jpg) The header of the table are centered and rotated (in case of the first column header) and the rest of the text are aligned to the left (second column) and right (rest of the columns). So, because I'm new in this, I'm doing some bad techniques of LaTeX programming in LyX with my LyX file.


title: kpathsea and path prefixes

text: On page 27, the kpathsea manual states:   * [A search path is a colon-separated list of path elements.]   * ...   * To check a particular path element `e`, Kpathsea first sees if a prebuilt database applies to `e`, i.e., if the database is in a directory that is a prefix of `e`. If so, the path specification is matched against the contents of the database. A few things aren't clear in the last sentence of this description. I'd be much obliged if somebody could point me to a more accurate description or provide an explanation how it works. The following are some questions I have.   1. The path element `e` may have several prefixes. In what order are they searched? For example, if `e` is equal to `/a/b/c`, then `/a` and `/a/b` are both prefixes of `e`. (I suspect the order is given by: longest prefix first ... shortest prefix last.)   2. Is `e` a prefix of itself? (I supect yes.) The following is a possible solution to Question 1. Could it be that there is an implicit assumption that there may be at most one prefix of any path element that can may an `ls-R` database? If so, should the directory containing the `ls-R` database be in `TEXMFDBS`? It would make sense. For example, `find /usr/local/texlive -name ls-R` gives:               /usr/local/texlive/texmf-local/ls-R     /usr/local/texlive/2011/texmf/ls-R     /usr/local/texlive/2011/texmf-dist/ls-R     /usr/local/texlive/2011/texmf-var/ls-R     /usr/local/texlive/2011/texmf-config/ls-R      and `kpsewhich -var-value=TEXMFDBS` gives:               {!!/usr/local/texlive/2011/texmf-config,     !!/usr/local/texlive/2011/texmf-var,     !!/usr/local/texlive/2011/texmf,     !!/usr/local/texlive/2011/../texmf-local,     !!/usr/local/texlive/2011/texmf-dist}      **EDIT (2 March, 2012)** I sent an email to the `kathsea` mailing list. I got a reply from Karl Berry suggesting that there should be no more than one `ls-R` database along one path leading from the root to any leaf. Also, the directory containing the ls-R database should be in `TEXMFDBS`.


title: Morphing only a part of a full path in tikz

text: This might be a `tikz` newbie question but I have some trouble solving this. I want to draw and fill a rectangular path where path morphing should be applied only to the upper side of the shape, more specifically I want to have an upper part with random steps. The rest of the path (left, lower and right sides) should just be straight lines. The shape should be closed and filled with one color. My problem is that I cannot figure out how to apply the morphing only to the upper side and I suppose I cannot break up the path into different subpaths since I want to fill the final shape. Is there a way to use the morphing only on a part of the full path? Another problem is that the cycle command does not really close the shape at the upper left corner. I tried to find a solution in the `tikz` manual but there was nothing that really helped me. Here is some example code:               \documentclass[tikz, border=10pt]{standalone}     \usepackage{tikz}          \begin{document}          \usetikzlibrary{decorations.pathmorphing}     \begin{tikzpicture}          \draw[decorate, decoration={random steps,segment length=3.0mm, amplitude=2.0mm}, thick, rounded corners=1ex, fill=brown!70] (0,0) -- (4,0) -- ++(0, -1) -- ++(-4,0) -- cycle;               \end{tikzpicture}     \end{document}


title: Wire not centered in the connector (electrical circuits)

text: Why isn't the wire centered in the connector located at the point `(2.5,0)`?               \documentclass[]{article}          \usepackage{tikz}          \usetikzlibrary{circuits.logic.IEC}     \tikzset{circuit declare symbol = ammeter}     \tikzset{set ammeter graphic ={draw,generic circle IEC, minimum size=5mm,info=center:A}}     \tikzset{circuit declare symbol = vmmeter}     \tikzset{set vmmeter graphic ={draw,generic circle IEC, minimum size=5mm,info=center:V}}          \begin{document}     \begin{tikzpicture}[circuit ee IEC,every info/.style=red,     set resistor graphic=var resistor IEC graphic]          \draw (0,0)      to[battery] (0,2) to [make contact](3,2)     to [ammeter] (3,0)--(2.5,0)     to [vmmeter] (.5,0)--(0,0);     \draw (0,0)--(.5,0) to[contact={at start}] (.5,-2) to[resistor={info={R ($\Omega$)}}] (2.5,-2) to[contact={at end}] (2.5,0)--(3,0);\end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/uSQsX.jpg)


title: Change default width of images in graphicx package

text: Is it possible to change the default width of an image included via `\includegraphics` (from the `graphicx` package) to a custom value, for example `\linewidth`. So I want something like this:               \documentclass{article}          \usepackage[draft,width=\linewidth]{graphicx}          %or something like \setglobalimagewidth=\linewidth          \begin{document}          \includegraphics{test1} %width=\linewidth     \includegraphics[width=4cm]{test1} %width=4cm               \end{document}


title: Gridsetting: Space between section and subsection (ConTeXt)

text: Here is my Minexample               \mainlanguage   [de]          \definepapersize[MyBook][A5]     \setuppapersize[MyBook][A5]          \usetypescript[times]     \setupbodyfont[times,10pt]     \setupbodyfontenvironment   [default][em=italic] % use italic as em, not slanted          \setuphead[subsection][before={\blank[line]},style=bold] % Kleine subsections, besserer grid     \setuphead[section][after={\blank[line]}]          \setuplayout[grid=yes]          \showgrid     %\setupbackgrounds  [header][text][frame=off,bottomframe=on]          \starttext     Last paragraph Text.....          \section{First section}          \subsection{First Subsection}          \stoptext      Now you see in the grid, that the placement is not optimal. There are three lines before and after the section. It would be better to have f.e. 3 before and 1 after, or 2 before and 1 after or aynthing like that. How to achieve that?


title: How to align right this long table?

text: I have a longtable. This is my code               \documentclass[12pt,a4paper]{article}     \usepackage{amsmath,amsxtra,amssymb,latexsym, amscd,amsthm}     \usepackage{indentfirst}     \usepackage[mathscr]{eucal}     \usepackage{graphicx}     \usepackage{makecell}     \usepackage{longtable}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage{answers}     \theoremstyle{definition}     \newtheorem{cauhoi}{Quetion}     \Newassociation{ans}{Soln}{hint}     \renewcommand{\Solnlabel}[1]{{\bf  Answer #1}.}          \newenvironment{point}{%     \par\noindent     \begin{longtable}[t]{|p{14cm}|p{1.2cm}|}          \hline     }{%     \end{longtable}     }     \newcommand\diem[1]{ & \hfil \textbf{#1} \\ \hline}     \newcommand\tongdiem[1]{\dotfill [\textbf{#1} points]}     %\newcommand\tongdiem[1]{\fill [\textbf{#1} điểm]}     \usepackage{mathpazo}     \begin{document}     \setlength{\baselineskip}{16truept}     \Opensolutionfile{hint}[ans]           \thispagestyle{empty}     \begin{center}     QUESTIONS     \end{center}     \begin{cauhoi}%1     (2 points) Find the domain of definition of the function \begin{equation*}     y = \sqrt{x^2 - 3x + 2} + \dfrac{1}{x + 4}.     \end{equation*}     \begin{ans}\tongdiem{2.5}     \begin{point}     First \diem{1}          This is      \diem{1.0}          Second     \diem{0.5}          \end{point}     \end{ans}     \end{cauhoi}               \begin{cauhoi}%2     (2 points) Solve the equation \begin{equation*}     \sqrt{x + 1} + \sqrt{x + 2}-\sqrt{x + 3} =5.     \end{equation*}     \begin{ans}\tongdiem{2.5}     \begin{point}     First \diem{1}          Second     \diem{1.0}          Thirt     \diem{0.5}          \end{point}     \end{ans}     \end{cauhoi}               \vfill     \noindent \hrulefill          \Closesolutionfile{hint}     \newpage     \begin{center}     \large\textbf{ANSWER}     \end{center}     \Readsolutionfile{hint}          \end{document}      I want the out put has the form. Please help me. ![enter image description here](http://i.stack.imgur.com/1zXUo.gif)


title: skipbib without BibLaTeX

text: Is there any way to use `skipbib` or equivalent in regular BibTeX with `natbib` and without using BibLaTeX?


title: How to enlarge title font size of nomenclature

text: I use these codes (in preamble):               \usepackage{tocloft}     \renewcommand{\cfttoctitlefont}{\LARGE\bfseries}      That used for customize the font size of "Table of Content" to be LARGE (about 18pt). So that it will be same size as chapter title. I already used the same method for List of Figure and List of Table.               \cftloftitlefont     \cftlottitlefont      Now, I want to apply the same effect to Nomenclature, but I could not find the right code. Anyone know about it?


title: subscript is set too low in math-mode with xits-math

text: I use `unicode-math` with `xits-math` as math font and `asana-math` for math double-struck symbols. I compile with `lualatex`, and my packages are from TeXlive 2011. Now, when use `asana-math` mixed with `xits`, I have the following problem: In math mode, if I type `$\deg_s ϕ$` my output is > ![subscript too low](http://i.stack.imgur.com/RhPz6.png) What I want is: > ![subscript okay](http://i.stack.imgur.com/DYaA4.png) Here is a minimal working example               \documentclass{minimal}          \usepackage{unicode-math}              \setmathfont{xits-math.otf}         \setmathfont[range={\mathbb}]{Asana-Math.otf}          \begin{document}         $\deg_s \phi$     \end{document}      This problem also occurs when I use only `asana-math` as math font, so that's probably from where it comes. I need asana-math for its double-struck math characters which I prefer over xits-math's. Is this a bug or is it supposed to be set so low? Can I fix this somehow? Is it unclean to mix fonts? Edit: I now updated the question according to what I found out. Sorry for being so uninformative before, I underestimated the problem. : - ) (Thanks, Caramdir)


title: Caption on side by side matrices

text: I have two matrices side by side, like this:               \[       \left[\begin{array}{cc}         a & b \\         c & d       \end{array}\right] \qquad       \left[\begin{array}{cc}         e & f \\         g & h       \end{array}\right]     \]      ![The result is this:](http://i.stack.imgur.com/jbia2.png) I want to:   1. have a caption to both matrices   2. if possible, have it recognized as figure (so it appears on the figure list).


title: Row with invisible cells

text: Is there any easy way to obtain something like this in LaTeX? ![http://img15.hostingpics.net/pics/574631tab.png](http://i.stack.imgur.com/5ByBJ.png) My guess was to try to make the first and third cell of the first row invisible, but then I lose the right and left border of the `Main 1` cell... I didn't find any package that would allow to do this easily, so if you have any package name or trick (maybe it's fairly simple using standard LaTeX tables, I don't know), it would greatly help me.


title: getting the arXiv to produce a pdf with embedded fonts

text: I've produced a .tex file using the `pstricks` package for figures and the Times font (via the `mathptmx` package). When the arXiv compiles this to a .pdf file it doesn't seem to have the necessary fonts embedded. It seems that that iPad and some other devices don't have the times font available, so some characters are missing when viewing the arXiv PDF on an iPad. Does anyone know if it is possible to get the arXiv to produce a PDF with embedded fonts. The problem seems to have to do with the fact that `pstricks` necessitates a `latex` -> `dvips` -> `ps2pdf` compilation instead of `pdflatex`. I'm aware of solutions like using `pdftricks` or converting the figures to PDFs and then using `\includegraphics{...}`, but the former seems to require some hand tweaking and the latter is a bit more fuss if I want to edit something in the future. Any ideas?


title: How can I have a hyphenated XML tag in a listing?

text: Consider the following valid XML according to http://stackoverflow.com/a/1478623/1443496?               \documentclass{article}     \usepackage{listings}     \lstset{       language=xml,       morekeywords=some-tag,     }     \begin{document}     \begin{lstlisting}     <some-tag>       text     </some-tag>     \end{lstlisting}     \end{document}


title: What's the right way to globally change the font size?

text: Inside of a group, a command like `\tiny` has effect only until the group ends. One would like to be able to say `\global\tiny` to have it last after the group ends, but that does not work. The best that I was able to come up with (described here) is the following.               \newif\ifhelper     \makeatletter     \def\unithelper#1\@nnil{\global\helpertrue\helper}     \def\helper{\ifhelper\afterassignment\helper\global\fi}     \newcommand*\globalfontsize[1]{%     \begingroup            #1%            \def\@defaultunits{\helperfalse\afterassignment\unithelper\global}%            \let\realvrule\vrule            \def\vrule{\helperfalse\global\helpertrue\afterassignment\helper\realvrule}%            \global\helpertrue            \helper#1%            \helperfalse     \endgroup}     \makeatother      Then you can say `\globalfontsize\tiny` or `\globalfontsize\normalsize` to achieve the desired effect. What is the right way to do that? Edit: Several people have suggested some variant of `\documentclass[10pt]{article}`. That is not related to my question. I'm using "global" in analogy to the TeX primitive `\global`.


title: LaTeX for beginners

text: My dad's an author (English books with some Arabic) and until recently has been using WordPerfect for DOS for all his writing. He's been moving to Word and hates the lack of control he has compared to WP. I'm looking for options and LaTeX seems to be a good one. Here are the things I'd like to be able to do:   * Arabic inline text   * Support for chapters (as separate files)   * Support for ebook output (epub/mobi)   * Cross platform environment (Mac and Windows)   * Some way to move from WP and Word Is this realistic with LaTeX, and what would be the best way to start for a newbie?


title: Multiple shapes on edges of automaton

text: Anybody who knows how to add multiple objects to edge of automaton? I tried label, but I can add only one label. I need to draw streett automaton, like in this picture: ![No more grumpy cats](http://i.stack.imgur.com/dUbrY.png)


title: What is the minimum distribution for LaTeX

text: I am using LaTeX to document a system I am developing. The system is itself a development environment which will be generating documentation. What is the minimum distribution I need to include in my system in order for users to produce documents from the generated LaTeX code. What is the minimum distribution that will meet the first requirement, and satisfy all the license conditions of all distributed material (I assume this will be larger). In response to comments: OS Window XP Distribution MikTex + TexNic centre


title: Drawing Lattice/Trellis Graphs using PGF/TikZ

text: I am trying to draw a graph containing lattice points and vectors. I wish it to look something like this: ![Lattice in $\\mathbb{R}^{2}$](http://i.stack.imgur.com/PaHsV.jpg) I am not sure how to go about it, however, I would ideally like to be able to use PGF/TikZ. Is this possible, or would I need to download and install a package like GeoGebra to create the graph, and export it into PGF/TikZ format? Again, I am not sure whether or not this is possible using GeoGebra. Any suggestions would be appreciated. * * * Follow-up Question: Aligning x- and y-axis with lattice points on a graph using PGF/TikZ


title: OAI field in biblatex/biber

text: Similarly to DOI, will an OAI (Open Archives Initiative) field be soon added to bibtex/biblatex styles?


title: Astrology Charts in LaTeX

text: Is anyone here using LaTeX to typeset astrology charts? Would pgf/tikz be an appropriate tool to use for that purpose?


title: How to display italics with lmodern package

text: When I use the `lmodern` package, I cannot get italics to display. Here is an example:               \listfiles      % added to get in the log the package versions     \documentclass{article}     \usepackage{lmodern}     \begin{document}     non-italic \emph{should be italic} itshape: {\itshape should be italic}      textit: \textit{should be italic}     \end{document}      None of the "should be italic" are italic. If I remove the `lmodern` package, all of these are italic. How can I get italic characters with the `lmodern` package? I'm compiling with pdflatex (or pdfeTex 3.141592-1.21a-2.2 according to the log). \listfiles provides:               article.cls    2004/02/16 v1.4f Standard LaTeX document class     size10.clo    2004/02/16 v1.4f Standard LaTeX file (size option)      There are no errors or warnings in the output.


title: finding tex-site.el from emacs on mac os x 10.8

text: I am writing a question hoping to find some clue what's going on in my auctex/emacs combination. I use emacs/auctex to typeset latex document. In my macbook pro, I am using GNU emacs 22.3.1. With `M-x locate-library tex- site.el`, it finds               "Applications/Emacs.app/Contents/Resources/site-lisp/tex-site.el".      I do not even need to specify the path to `tex-site.el`. I don't know how auctex got installed into emacs app directory. In my iMAC, I am using GNU emacs 24.3.1. I installed auctex 11.87. I first have to specify the path to auctex; (setq load-path (cons "/usr/share/emacs/site-lisp" load-path)) With `M-x located-library tex-site`, it finds               "/usr/share/emacs/site-lisp/tex-site.el".      What is the cause for the difference? The reason I am asking this question is "View" command. In macbook, "View" command of auctex (`C-c C-c` View) opens my pdf document with acrobat nicely. In iMAC, "View" command of acutex does not do anything without any complaint. Thanks. yjw


title: Caption is bold. Can I have part of it not bold?

text: What is the simplest way to have part of a bold caption (including some inline math) non-bold?


title: Table with arrows between cells

text: I want to create a table with arrows between some cells, for which I've used `tabularx` and TkiZ. I have the following problems:   * Text in cells aligned vertically to the center and at the same heigh (TikZ nodes are not inline with normal cells text in a same row).   * Inability to align to the center with `\begin{center}•\end{center}`.   * I don't know how to fix the size of the cells. This is what I currently have: ## Code               \documentclass{article}     \usepackage{tabularx}     \usepackage{tikz}     \tikzset{every picture/.style={remember picture}}     \begin{document}     \begin{tabularx}{\textwidth}{r|c|c|c|c|l}         &$D_1$&$D_2$&$D_3$&$D_4$&foo\\ \cline{1-6}         $O_1$&\tikz[baseline]{\node (a11) {50};}&\tikz[baseline]{\node (a12) {0};}&&&50\\[2em] \cline{1-6}         $O_2$&&\tikz[baseline]{\node (a22) {60};}&&&60\\[2em] \cline{1-6}         $O_3$&&\tikz[baseline]{\node (a32) {10};}&\tikz[baseline]{\node (a33) {30};}&\tikz[baseline]{\node (a34) {10};}&50\\[2em] \cline{1-6}         $O_4$&&&&\tikz[baseline]{\node (a44) {50};}&50\\[2em] \cline{1-6}         bar&50&70&30&60&210\\     \end{tabularx}     \begin{tikzpicture}[overlay]         \path[thick,->] (a11) edge (a12);         \path[thick,->] (a12) edge (a22);         \path[thick,->] (a22) edge (a32);         \path[thick,->] (a32) edge (a33);         \path[thick,->] (a33) edge (a34);         \path[thick,->] (a34) edge (a44);     \end{tikzpicture}     \end{document}      ![Output](http://i.stack.imgur.com/PfhFc.png) Besides, I get the following warnings: > Underfull `\hbox` (badness 10000) in alignment at lines 13--13 > > Overfull `\hbox` (15.0pt too wide) in paragraph at lines 13--22


title: LaTeX architecture - how does it all work?

text: I'm interested in the general application architecture, how it hangs together. I know it was originally written by Knuth, and it's clear others can write plugin packages to achieve certain things, but what is the overall application structure? How does it work? What are packages written in? What do they conform to? Thanks


title: Triple f-ligatures for urw-garamond

text: I am setting the following in my preamble:               \usepackage[urw-garamond]{mathdesign}     \usepackage[T1]{fontenc}      I find that the **ffi** and **ffl** ligatures aren't available in `urw- garamond`. As advised in this Fonts.com page, if triple f-ligatures aren't available in the font, it is better to suppress it and use individual letters instead. An example word is:               officers      How do I suppress just the triple f-ligatures? Or is there a way to incorporate triple f-ligatures to `urw-garamond`?


title: Using LyX, List of Figures is included in document but does not appear in output

text: I am using LyX with the book document class and am trying to include a List of Figures using the following code at the beginning of the page:               \addcontentsline{toc}{chapter}{LIST OF FIGURES}     \renewcommand{\listfigurename}{LIST OF FIGURES}      This is followed by the inserted "List of Figures" from the List/TOC submenu. The output displays a page titled "List of Figures," but the page is blank (besides the title) even though I have 12 figures included as floats throughout the document. Do I need to add something to the LaTeX preamble of the document? Do I need to change something about the document settings or the settings of the floats themselves? Note: I am having the identical problem with the "List of Tables." Everything appears as it should in the table of contents, but the lists of figures and tables have no content.


title: Force position of full page sized figure

text: I'd like to have text that is placed after a figure **which occupies a whole page** also to be placed after that page in the produces PDF file. Imagine this (pseudo latex, not necessarily a working example):               \documentclass{scrbook}          \begin{document}     \section{ONE}     lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem      ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum      dolor sit amet           \begin{figure}[!htbp]       % some figure that takes the whole next page     \end{figure}          \section{TWO}     lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem      ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum      dolor sit amet      \end{document}          This results in a pdf document which looks kind of like this:               ONE     lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem      ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum      dolor sit amet           TWO     lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem      ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum      dolor sit amet      ---- page break ----          [FIGURE]          ---- page break ----      So, how do I get the figure to be placed at the end of section{one} and before section{two} where it is supposed to be instead of slipping into section{two}? Even if that means that section{one} only takes a fraction of page. Isn't that what [!htbp] actually is for? **//edit** Regarding this text (in German, unfortunately; I hope you'll understand it anyway, in case of necessity, using Google Translator) in some cases it's just not a good idea to use floats. What do you think about it?


title: How do I get non-italic words in a theorem environment?

text: I want some words in my theorem environment to not be italic. I know there are simple ways to get the entire theorem in roman, but I'm looking for an italic theorem with specified words in roman. I tried:               \documentclass{article}     \usepackage{framed}     \usepackage{amsthm}     \usepackage[svgnames]{xcolor}          \newtheorem{mydef}{Definitie}[section]     \definecolor{shadecolor}{named}{LightGray}          \begin{document}     \begin{shaded}\begin{mydef}     I want \textrm{this} word to be non-italic.     \end{mydef}\end{shaded}     \end{document}      But apparently \textrm{} is not the way to go because everything is still italic


title: Problem with font in theorem environment

text: I use `LuaLaTeX`, `fontspec` and `XITS` maths font. Additionally, I had a problem with theorem environment and long headers so I based my solution on this. My problem is that I now get a different font for the `\mathcal{S}` when I use optional name. Any ideas why?               \documentclass{article}     \usepackage{fontspec}     \usepackage{amsmath}     \usepackage[math-style=ISO]{unicode-math}     \setmathfont{XITS Math}     \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{XITS Math}           \usepackage[thmmarks,amsmath,amsthm,hyperref]{ntheorem}     \makeatletter     \newtheoremstyle{Myplain}%       {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2.\theorem@separator]}%       {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2]\theorem@headerfont (##3).\theorem@separator\normalfont\itshape}     \newtheoremstyle{nonumberMyplain}%       {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%       {\item[\theorem@headerfont\hskip \labelsep ##1]\theorem@headerfont (##3).\theorem@separator\newline\normalfont\itshape}     \makeatother          \theoremstyle{Myplain}          \usepackage{thmtools}     \declaretheorem[numberwithin=section]{theorem}          \begin{document}          \section{Title}     \begin{theorem}[A a a very very very very long long name theorem theorem name name]     A named theorem $\mathcal{S}$.     \end{theorem}          \begin{theorem}     Unnamed theorem $\mathcal{S}$.     \end{theorem}          \end{document}


title: How do I create a simple page of homework in LaTeX?

text: I've been frustrated with using Microsoft Word for typing out equations, so I've decided to switch over to LaTeX to write all of my homework with. I've never used LaTeX before to typeset anything, so I'm a little overwhelmed right now. At the moment, all I need to do is make a simple document that has the following format: > My Name   >  My ID Number   >  Class Name > > ## Document Title > > Multiple paragraphs of double-spaced text will go here. > > Another paragraph of text. How can I typeset this simple document in LaTeX?


title: How to write partial eta square in LaTeX?

text: **Problem:** Writing partial eta square in LaTeX. I couldn't find anywhere online giving guidance to this statistic symbol. **Example (it's the symbol to the left):** ![enter image description here](http://i.stack.imgur.com/74BjB.png) Any help would be appreciated.


title: fontspec and xeCJK conflict: tie (\t{}) over Latin character displaced one position

text: I want to create a tie over `ng` by typing: `\t{ng}`: ![Working tie](http://i.stack.imgur.com/kRJU3.png) The following minimal example causes the tie over _ng_ to be displaced one position to the right, so that it appears over the _g_ and empty space. The problem persists regardless of font. It works fine if I don't load either `xeCJK` or `fontspec`, but not if I load both. I'm compiling with `xelatex` on Mac OS Mavericks.               \documentclass[utf8,12pt,letterpaper]{article}     \usepackage{xeCJK}     \usepackage{fontspec}     \setmainfont{Gentium Plus}     \begin{document}     \t{ng}     \end{document}      ![Displaced tie](http://i.stack.imgur.com/dfne8.png)


title: tikzDevice is not getting sizes right (knitr)

text: I am using OSX, pdflatex, R (cran), tikz/tikzDevice and knitr to create my documents. My problem is that the font sizes of the produced tikZ-file do not match the LaTeX document font sizes. ## Result / Problem Here's a screenshot of the result: ![Screenshot 1](http://i.stack.imgur.com/CMz7E.png) As you can see, the text is way to big and the points/circles are too small. ## Files I have a main LaTeX file, called `main.tex`, which contains:               \documentclass[a4paper,12pt]{article}          \usepackage{tikz}          \begin{document}          %% begin.rcode myplot, dev='tikz',  external=FALSE, fig.width=5, fig.height=5     % plot(cars)     %% end.rcode          \hspace*{6.3cm}\color{red} speed          \end{document}      I then use a R-Script, called `knit.R` to convert the result of `plot` to tikZ-Code:               library(knitr)     render_latex()     knit("/Users/ralfix/Documents/main.tex")      It creates a new LaTeX file, called `main-out.tex` which contains the following:               ...     \input{figure/myplot.tikz}     ...     \hspace*{6.3cm}\color{red} speed     ...      and a new tikZ-file, called `myplot.tikz`:               % Created by tikzDevice version 0.6.2-92-0ad2792 on 2013-03-30 18:14:48     % !TEX encoding = UTF-8 Unicode     \begin{tikzpicture}[x=1pt,y=1pt]     ...     \node[text=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale=  3.00] at (185.47,  6.24) {speed};     ...     \end{tikzpicture}      I can remove the `scale=3.0` in the tikz file to get the text right, but then some positioning is broken and the circles stay too small. ## First Idea If I remove the `[a4paper,12pt]` from my documentclass declaration and re-run my script, I get this much better result: ![Screenshot 2](http://i.stack.imgur.com/bkSRG.png) But if you compare the tikz output with the red LaTeX-output, the text is still too big. The tikz-file says `scale=1.2` for text now. How and where can I modify something to get every sizing correct?


title: What is the difference between \def and \newlength?

text: I wrote the following LaTeX documents.               \documentclass[11pt]{book}          \newlength{\mywidth}     \newlength{\myheight}     \setlength{\mywidth}{85mm}     \setlength{\myheight}{112mm}          \newcommand{\setpagesize}[2]{%       \special{papersize=#1,#2}%     }          \setpagesize{\mywidth}{\myheight}          \begin{document}     The quick brown fox jumps over the lazy dog     \end{document}      I got following error messages from `dvipdfmx`and failed.               $ latex abc.tex     $ dvipdfmx abc.dvi      abc.dvi -> abc.pdf          ** WARNING ** Reading special command failed: "papersize=\mywidth ,\myheight "     [1     ** WARNING ** Reading special command failed: "papersize=\mywidth ,\myheight "     ]     4327 bytes written      When I use `\def` in place of `\newlength` and `\setlength`, it worked.               \documentclass[11pt]{book}          \def\mywidth{85mm}     \def\myheight{112mm}          \newcommand{\setpagesize}[2]{%       \special{papersize=#1,#2}%     }     % ...               $ latex abc.tex     $ dvipdfmx abc.dvi      abc.dvi -> abc.pdf     [1]     4331 bytes written      Why?


title: How to change the format of acronyms?

text: I use the `acronym` package. Please help me to change a gap between the acronym and full name of acronym and to put a dash between them like this: > >     PG       - some text >   >     HRoT     - some text some text some text some text some   >                text some   text some text some text some text some text >   Also I would like to make the acronyms shown in Roman text-style (by default it's in Bold)                 \documentclass[12pt]{report}        \usepackage{fontspec}       \usepackage{xunicode}       \usepackage[no-sscript]{xltxtra}       \usepackage[babel=false]{csquotes}       \usepackage{polyglossia}       \setdefaultlanguage{french}       \setotherlanguages{german,english,greek,polish,russian}       \setmainfont[Mapping=tex-text]{Linux Libertine}       \usepackage{acronym}            \makeatletter       \def\uplabel#1{{\normalfont{\textsf{#1}}\hfill}-}       \renewenvironment{AC@deflist}[1]%         {\ifAC@nolist%          \else%             \raggedright\begin{list}{}%                 {\settowidth{\labelwidth}{\normalfont{\textsf{#1}}\hspace*{3em}}% change 2em to the desired value                 \setlength{\leftmargin}{\labelwidth}%                 \addtolength{\leftmargin}{\labelsep}%                 \renewcommand{\makelabel}{\uplabel}}%           \fi}%         {\ifAC@nolist%          \else%             \end{list}%          \fi}%       \makeatother            \begin{document}       \begin{acronym}       \acro{Esj}{some text some text some text some text some text some text some text some text some textsome text some text some text}            \acro{At}{some text some text some text some text some text some text some text some text some text some text some textsome textsome text some text some text}       \end{acronym}       \end{document}      ![enter image description here](http://i.stack.imgur.com/kZP4M.jpg) EDIT: Extra dash ![enter image description here](http://i.stack.imgur.com/hfdS3.jpg)


title: Taking notes for class in Latex, and changing parts of fancy header across include

text: I am beginning grad school in the fall and I wanted to try and take (or copy over after class) all my notes in `LaTeX`. I wrote a python script that looks at my calendar for all occurrences of classes. Then I generate a file structure for each class and date as follows:               root        |--- semesterNum\               |--- class1\               |      |--- classDay-1\               |      |      |--- className_date.tex               |      |      |--- main.tex               |      |                |      |--- ...               |      |--- classDay-N\               |      |--- images\               |      |--- main\               |             |--- main.tex               |               |--- classN\               |--- main\                      |--- main.tex      In `className_date.tex` is where I will place my actually notes for a given class and date. The `main.tex` below `className_date.tex` is where I can compile my day to day notes. I keep all my preambles in the `main.tex` files In the `root/semesterNum/classN/main/main.tex` is where I wanted to compile all the notes from one class And in `root/semesterNum/main/main.tex` is where I want to compile all my notes from the whole semester for all classes So to do this I was going to be include each days file into the correct `main.tex` files My issue is that I have 6 parameters in my tex template that get replaced in my python code they are as follows: `cName`, `cNum`, `cClass` of `tClass`, `cDate`, and `tName` class name, class number (i.e MATH 101), current class number of totals classes, class date, and professor name, respectively               \fancyhead[L]{\begin{tabular}{l r | l r}     \textbf{Class Name} & cName & \textbf{Class Num} & cNum  \\     \textbf{Page} & \thepage/\pageref{LastPage}& \textbf{Note} & cClass/tClass \\     \textbf{Class Date}& cDate & \textbf{Updated} & \today \\     \textbf{Author} & my name & \textbf{Professor} & tName \\     \end{tabular}}      In the `main.tex` for each class date I set the 6 variables. The issue is when I want to include all the notes for one class the current class number of total classes needs to change for each include. but they are set in the level up's preamble, and if I set the variables in the class preamble they won't change for each include. And when I include all my notes for all classes, the 6 variables need to change for each class and each class date. I had considered just compiling each set of notes separately then putting just putting them all in one file. But if I do this the page numbers and sections numbers wont change across the whole document. Is there a way for me to change the fancy header data within the body in for each class date? Here is my rough template               \documentclass[11pt,a4paper]{article}          \usepackage{marginnote}     \usepackage{wallpaper}     \usepackage{lastpage}     \usepackage[left=1.3cm,right=4.7cm,top=1.8cm,bottom=4.0cm,marginparwidth=3.4cm]{geometry}       \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{xcolor}     \usepackage{float}     \usepackage[boxed]{algorithm2e}     \numberwithin{equation}{subsection}     \usepackage[yyyymmdd]{datetime}           \usepackage{tikz}     \usetikzlibrary{shapes.geometric,positioning}     \usetikzlibrary{intersections}     \usetikzlibrary{arrows}          \usepackage{pgfplots}     \pgfplotsset{compat=1.9}          \usepackage{fancyhdr}      \setlength{\headheight}{80pt}     \pagestyle{fancy}\fancyhf{}     \renewcommand{\headrulewidth}{0pt}          \setlength{\parindent}{0cm}     \newcommand{\tab}{\hspace*{2em}}     \newcommand{\mn}[1]{\marginnote{\footnotesize #1}}          \newcommand\BackgroundStructure{     \setlength{\unitlength}{1mm}          \setlength\fboxsep{0mm}     \setlength\fboxrule{0.5mm}      \put(10, 10){\fcolorbox{black}{blue!10}{\framebox(155,247){}}}     \put(165, 10){\fcolorbox{black}{blue!10}{\framebox(37,247){}}}     \put(10, 262){\fcolorbox{black}{white!10}{\framebox(192, 25){}}}     \put(137, 265){\includegraphics[height=18mm,keepaspectratio]{rit_black_no_bar}}     }          \fancyhead[L]{\begin{tabular}{l r | l r}     \textbf{Class Name} & cName & \textbf{Class Num} & cNum  \\     \textbf{Page} & \thepage/\pageref{LastPage}& \textbf{Note} & cClass/tClass \\     \textbf{Class Date}& cDate & \textbf{Updated} & \today \\     \textbf{Author} & my name & \textbf{Professor} & tName \\     \end{tabular}}          \begin{document}     \AddToShipoutPicture{\BackgroundStructure}     \include{className_date.tex}     \end{document}


title: Additional white spaces with xelatex and fancyvrb/Verbatim

text: I've tested xelatex with the following code:               \documentclass[b5paper,11pt]{article}     \usepackage{fontspec}     \usepackage{xeCJK}     \usepackage{fancyvrb}     \setCJKmonofont{Adobe Ming Std}      \setmonofont{Courier Std}     \begin{document}     \begin{Verbatim}[commandchars=\\\{\},numbers=left]     test中文     "test中文"     \end{Verbatim}     \end{document}      There are no white spaces between "test" and unicode characters "中文". But in the pdf result, `fancyvrb` seems output additional spaces. ![enter image description here](http://i.stack.imgur.com/Aguec.png) Any solution to remove these spaces?


title: Differences among commands in coloring node labels in tikz

text: I wonder if there are fundamental differences among the following label coloring procedures in `TiKZ` (aside from defining a style as mentioned in the manual) since they seem to produce the same effect, or is it just a matter of coding style?               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{document}          \begin{tikzpicture}     \node (m1) at (0,0) (0,-2mm) [label={[red]right:$A$}]{First method}; %     \node (m2) [below=of m1] [label=right:\textcolor{red}{$A$}]{Second method};     \node (m3) [below=of m2] [label=right:{\color{red}$A$}]{Third method};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/BIGuo.png)


title: KOMA-Script footer margins

text: I am doing one-page documents with title and I need more space so all text can be put on that page. I achieve this by `\typearea{12}`. What happens is that the footer margin gets _absurdly_ large (say, 3 times side margins!). I've tried to fix that using `\usepackage[bottom=10em]{geometry}`, however this command effects _all_ margins and there is no gain. Is there any way just to make the footer margin thinner?               \documentclass[10pt]{scrartcl}          \typearea{12}     \renewcommand*{\titlepagestyle}{empty}          \begin{document}          \title{Title}     \author{Author}     \date{Date}     \maketitle          A lot of text.          \end{document}


title: Cannot start AcrobatReader or open the document - Winshell

text: When i try to PDFView Command in Winshell I'm getting the below error. I'm using Winshell 3.3.2.4 ![enter image description here](http://i.stack.imgur.com/O8Ty7.jpg)


title: Some vectorlike overset

text: Is there some method to write the following ? ![enter image description here](http://i.stack.imgur.com/tFBxT.png) I have searched a lot but couldnt find anything.


title: upLaTeX & DVI output - "font file over" error

text: I use the upLaTeX (from TeXLive) and DVI output. The error `font file over: C:\texlive\2013\texmf-dist\fonts\vf\uptex\jis\upjisr-h` is appears. I've tried to set the `C:\texlive\2013\texmf-dist` to full control, however, nothing changed. ![DVI output error message](http://i.stack.imgur.com/zD5cI.jpg) The MWE is               \documentclass{ujarticle}     \begin{document}     upLaTeX検査。今日は！     \end{document}      however, your DVI oputput already setted and will display everything, I can suppose. Maybe I need to set to full control anythig else?


title: Using Titlesec, titletoc, and titleps together affects the command \tableofcontents

text: Writing a book of probability in arabic, I want to use the `titleps` package for different beautiful headpages, in my files where I use `titletoc` for partial table of contents. All was good until I used the package `titleps` together with `titlesec` and `titletoc`. When I put the command `\tableofcontents`, the compilation does not end, but appears to go into an infinite loop... I have tried to use `titlesec` and `titletoc`, and obtain the contents with `\tableofcontents`, and all worked well, but not when using all three packages. Why does this happen? How can I write the contents and the partial contents at the same time, and use at the same time `titleps`? Here is a WME, used with Texmaker on Windows 8.1, where I replaced the arabic names by latin names, to watch the effect of compilation. Don't be concerned about right-to-left text, because of the main language which is arabic here, a right-to-left language...               \documentclass[14pt,a4paper]{extbook}     \usepackage{titlesec}     \usepackage{titletoc}     \usepackage{etoolbox}     \usepackage{multicol}     \usepackage{titleps}          \setlength{\columnseprule}{0.1pt}          \usepackage{polyglossia}     \setmainlanguage[numerals=maghrib]{arabic}     \setotherlanguage{english}          \newfontfamily\arabicfont[Script=Arabic,Scale=1.2,AutoFakeSlant=-0.02]{Traditional Arabic}     \setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic}          \gappto\captionsarabic{\renewcommand{\chaptername}{Chaptername}}     \gappto\captionsarabic{\renewcommand{\contentsname}{Contents}}          \begin{document}          \titlecontents{lsection}       [2.3em]{\small}{\contentslabel{2.3em}}       {\hspace*{-2.3em}}       {}     \titlecontents{lsubsection}       [4.6em]{\small}{\contentslabel{2.3em}}       {\hspace*{-2.3em}}       {}               \newpagestyle{Mystyle}{       \setheadrule{.1pt}% Header rule       \sethead[\thepage\hspace*{14pt}         Titlebook]% even left         []% even centre         [\sectiontitle \hspace*{5pt} .\thesection]% even right         {}% odd left         {}% odd centre         {\chaptertitle         \hspace*{14pt}         \thepage}% odd right     }            \pagestyle{Mystyle}               %  \tableofcontents          \chapter{Chapter 1}     \startcontents[chapters]     {\large\bf Minicontents}     \vspace*{5pt}     \hrule \vspace*{-10pt}      \begin{multicols}{2}       \printcontents[chapters]{l}{1}{\setcounter{tocdepth}{1}}     \end{multicols}     \vspace*{-5pt} \hrule          \section{Section 1}     \section{Section 2}     \newpage     \section{Section 3}     \section{Section 4}          \end{document}      The compilation gives this pdf file, and when I uncomment `% \tableofcontents`, the compilation never stops. I just want to put the command `\tableofcontents` at the beginning of the file ! ![enter image description here](http://i.stack.imgur.com/KFWKh.gif)![enter image description here](http://i.stack.imgur.com/wkH2m.gif) I've tried to go down a level in the contents, by transforming chapter in section, and section in subsection, and now all is good ! There's no problem of compilation, it gives the contents, partial contents and uses the titleps package... But I need of course to go up by a level, because there is chapters in my book !...This fact may, I think, give some ideas for programmers of Latex.. I give the following MWE               \documentclass[14pt,a4paper]{extbook}     \usepackage{titlesec}     \usepackage{titletoc}     \usepackage{etoolbox}     \usepackage{multicol}     \usepackage{titleps}          \setlength{\columnseprule}{0.1pt}          \usepackage{polyglossia}     \setmainlanguage[numerals=maghrib]{arabic}     \setotherlanguage{english}          \newfontfamily\arabicfont[Script=Arabic,Scale=1.2,AutoFakeSlant=-0.02]{Traditional Arabic}     \setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic}          \gappto\captionsarabic{\renewcommand{\contentsname}{Contents}}          \begin{document}          \titlecontents{lsection}       [2.3em]{\small}{\contentslabel{2.3em}}       {\hspace*{-2.3em}}       {}     \titlecontents{lsubsection}       [4.6em]{\small}{\contentslabel{2.3em}}       {\hspace*{-2.3em}}       {}          \newpagestyle{Mystyle}{       \setheadrule{.1pt}% Header rule       \sethead[\thepage\hspace*{14pt}         Titlebook]% even left         []% even centre         [\sectiontitle \hspace*{5pt} .\thesection]% even right         {}% odd left         {}% odd centre         {\sectiontitle         \hspace*{14pt}         \thepage}% odd right     }            \pagestyle{Mystyle}          \tableofcontents          \section{section 1}     \startcontents[sections]     {\large\bf Minicontents}     \vspace*{5pt}     \hrule \vspace*{-10pt}      \begin{multicols}{2}       \printcontents[sections]{l}{1}{\setcounter{tocdepth}{2}}     \end{multicols}     \vspace*{-5pt} \hrule          \subsection{subsection 1}     \subsection{subsection 2}     \newpage     \subsection{subsection 3}     \subsection{subsection 4}          \end{document}      which gives the following output. I want the same output; but with "chapter" instead of "section" ![enter image description here](http://i.stack.imgur.com/czPjs.gif) ![enter image description here](http://i.stack.imgur.com/vHMHF.gif)


title: Expanding command in \addchaptertocentry

text: I'm using a counter to increment months in a journal and the `datetime` package to turn the counter into months. The months then become chapter titles in the document, so I have something like this:               \documentclass{scrbook}          \usepackage[french]{babel}     \usepackage{datetime}     \usepackage{hyperref}     \usepackage{lipsum}          \newcounter{month}          \newcommand{\newmonth}{%       \addtocounter{month}{1}%       \chapter{\monthname[\themonth]}     }           \begin{document}          \newmonth          \lipsum          \newmonth          \lipsum          \end{document}      The month appears ok in the text, but not in the PDF index. I tracked down this problem to `\addchaptertocentry`, since I can reproduce it by calling `\addchaptertocentry{\monthname[\themonth]}`. The `.aux` file contains the command verbatim:               \@writefile{toc}{\contentsline {chapter}{\numberline {1}\monthname [1]}{1}{chapter.1}}      How can I make it so that the `\monthname` command is expanded so that the PDF index looks right? Edit: My reason for using datetime here is to support multiple languages (French in this example), so I would rather avoid redefining the month list.


title: How to fit a wide table

text: I see that many people have already asked the same question, but unfortunately I can't make it work for me at the moment. So, once again, how can I centre and fit tables larger than that to my report? Command `\scalebox{0.8}` doesn't work for larger tables.               \documentclass[12pt,a4paper]{article}     \usepackage{setspace}      \spacing{1.5}     % \raggedright          \usepackage[margin=1.3in]{geometry}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{soul}     \usepackage{color}     \usepackage{graphicx}          \newcommand{\head}[1]{\textnormal{\textbf{#1}}}          \usepackage[polutonikogreek,english]{babel}     \usepackage[utf8x]{inputenx}     \newcommand{\greek}[1]{{\selectlanguage{polutonikogreek}#1}}          \begin{document}          \begin{table}         \centering         \resizebox{\linewidth}{!}{\begin{tabular}{ll}         \hline         \head{XXXXXXXXX} & \head{XXXXXXXXX}\\         \hline         \ttfamily xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & \ttfamily xxxxxxxxxxxxxxxxxxxxxx \\         \ttfamily xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & \ttfamily xxxxxxxxxxxxxxxxx \\         \ttfamily xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & \ttfamily xxxxxxxxxxxxxxxxx \\         \ttfamily xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & \ttfamily xxxxxxxxxxxxxxxxx \\         \hline         \end{tabular}}         \caption{Articles related to stock-prediction techniques}         \label{tab:RegressionMarketEquitiesRSSs}     \end{table}          \end{document}


title: Extracting content of .tex files

text: Is there any GUI fast way for extracting content of `.tex` files? (Stripping all tags and meta-data) Among TeX editors which one support export content to plain `.txt` file? (I found some command-line tools and some RegExp solutions, but using them is not so convenience. It seems that this is an essential need, I wonder why there is not a known solution for it.)


title: Making a zip macro

text: In functional languages, there often is a function called `zip`, which can be handy in many situations; for example in ruby, one can say:               %w(a b c).zip(%w(d e f))      to get an array of arrays `[["a", "d"], ["b", "e"], ["c", "f"]]`. It seems that there are many ways to make a `zip` function, either with a `map` (another one), or `foldr`. (The `map` might actually be done with `foldr`.) But given that the `lambda.sty` lists do not seem to support nested lists, I'm not sure how would one go about making `zip` in TeX (with `lambda.sty`). I tried something along the lines of which seemed the most simple;               \catcode`@=11     \input lambda.sty          \def\Zipwith#1#2#3{\Foldr#1{#3}{#2}}          \def\lista{\Listize[a,b,c]}     \def\listb{\Listize[d,e,f]}          \Unlistize{\Zipwith\Map\lista\listb}     \bye      but it results in `[abcd, abce, abcf]`. So, close but no cigar. Would you have an idea? I wouldn't actually need there to be nested lists as a result, just that for `lista` zipped with `listb`, some macro `\foo#1#2` would get run for (continuing with the example lists) three times, getting as its arguments on the first run `#1<-a, #2<-d`, on the second run `#1<-b, #2<-e`, and on the third `#1<-c, #2<-f`.


title: Videos in beamer inside boxes?

text: I'm absolute beginner in bearmer not latex. I would like to add videos insides boxes as the following picture. ![here](http://i.stack.imgur.com/Z9345.jpg) How possible is that?


title: MikTeX cannot compile when breqn package included

text: I'm seeking for automatic line breaking of math expressions (the example bellow), best recommended option seems `breqn` package. After MikTeX installed **mh** packages, MikTeX cannot build an output (I use TeXnic Center editor) (the text content is shortened):               \documentclass[a4paper,fleqn,leqno]{article}          \usepackage[utf8]{inputenc}         \usepackage[czech]{babel}         \usepackage[IL2]{fontenc}         \usepackage{color}         \usepackage[top=1.5in, bottom=1.5in, left=1in, right=1in]{geometry}         \usepackage{hyperref}         \usepackage{tikz}         \usepackage{amsmath,breqn}         \usepackage[fontsize=12]{scrextend}         \DeclareMathSizes{12}{16}{16}{16}         \pagestyle{headings}         \linespread{1}         \hypersetup{colorlinks=true,linkcolor=black,pdfnewwindow=true,urlcolor=blue}         \begin{document}              \section{Nadpis}\label{sec:nadpisa}         Text pod nadpisem.         \subsection{Podnadpis}\label{sec:podnadpisa}         Text pod podnadpisem.         \subsubsection{Podpodnadpis}\label{sec:podpodnadpisa}         Text pod podpodnadpisem.              \begin{multline}         t_{2}x_{1}cos\alpha+t_{2}y_{1}sin\alpha+t_{2}z_{1}sin\gamma cos\alpha-t_{2}z_{1}sin\alpha sin\beta-t_{3}x_{1}cos\alpha-t_{3}y_{1}sin\alpha-t_{3}z_{1}sin\gamma cos\alpha+t_{3}z_{1}sin\alpha sin\beta-t_{1}x_{2}cos\alpha-t_{1}y_{2}sin\alpha-t_{1}z_{2}sin\gamma cos\alpha+t_{1}z_{2}sin\alpha sin\beta+ t_{1}x_{3}cos\alpha+t_{1}y_{3}sin\alpha+t_{1}z_{3}sin\gamma cos\alpha-t_{1}z_{3}sin\alpha sin\beta+ t_{3}x_{2}cos\alpha+t_{3}y_{2}sin\alpha+t_{3}z_{2}sin\gamma cos\alpha-t_{3}z_{2}sin\alpha sin\beta- t_{2}x_{3}cos\alpha-t_{2}y_{3}sin\alpha-t_{2}z_{3}sin\gamma cos\alpha+t_{2}z_{3}sin\alpha sin\beta         \end{multline}         \end{document}      It freezes displaying: ![TeXnic Center getting stuck](http://i.stack.imgur.com/kNOLO.gif) without pdf output. After excluding `breqn` package the error disappear. After excluding `\usepackage[IL2]{fontenc}` it freezes three lines before: ![TeXnic Center getting stuck #2](http://i.stack.imgur.com/xnUB4.gif) showing the same error. Is there any solution without rewriting the whole content?


title: Including LaTeX vector output in input to Graphviz (dot)

text: Graphviz (http://www.graphviz.org/) is an exceptionally effective package for drawing graphs of all kinds. Its internal node labelling facility is relatively primitive, but as it allows images to be used as labels, one can produce beautiful graphs using LaTeX to generate appropriate images and then calling Graphviz. I have got this to work by   1. Using LaTeX to generate a PDF with one image on each page   2. Using ImageMagick convert to convert the PDF into a series of PNGs   3. Including the PNGs in input to Graphviz's 'dot' utility. The results are nice, but it is clear that using a raster format in step 2-3 is visibly degrading the results. I would like to use a vector format instead. Unfortunately, AFAICS, Graphviz does not accept eps and LaTeX does not generate svg. Can anyone see a viable series of tools to get this to work? (This list of input formats accepted by Graphviz may help: http://www.graphviz.org/doc/info/output.html#d:image_fmts) NB. I am aware that Graphviz has some limited facility for accepting LaTeX node labels. I am however using pretty complicated drawings. Edit: here's an example of the kind of thing I'm drawing... http://people.ds.cam.ac.uk/mg262/derivation404.png


title: Does pgfplots support "spatial" plotting?

text: As the title states, I like to know if I can plot "spatial" with pgfplots. And I think I have to explain what I mean by that (I couldn't find a good expression in english): In a pgfplots 3d plot, the axis labels are just rotated in one direction. Example (taken from pgfplots project page at sourceforge.net): ![enter image description here](http://i.stack.imgur.com/J9fnl.jpg) In contrast, what I would like to see, is this example, done with Origin (taken from the OriginLab website): ![enter image description here](http://i.stack.imgur.com/0QwXG.png) So the question is, can I achieve that also with pgfplot?


title: Position a TikZ node in relation to a specific Forest node

text: Is it possible to avoid hardcoding the `\node` position in the below MWE and apply horisontal offset of the Forest node to the TikZ node it links to? The goal is to put the green nodes as close as possible to right above the linked Forest node, but at the same time try not to overlap other Forest nodes. The vertical position will have to be hardcoded.               \documentclass{standalone}     \usepackage{forest}          \begin{document}     \begin{forest}      for tree={         draw=black, align=center, l sep=4ex, parent anchor=south, child anchor=north,         node options={font=\footnotesize, minimum width=14em, minimum height=10ex},         edge path={             \noexpand\path[\forestoption{edge}]             (!u.parent anchor) -- +(0,-2ex) -| (.child anchor)\forestoption{edge label};         }     }     [Parent         [SubParent             [Child1                 [Child11]                 [Child12,name=Child12]             ]             [Child2                 [Child21]                 [Child22]                 [Child23,name=Child23]             ]             [Child3                 [Child31]                 [Child32]             ]         ]     ]     %     \tikzset{every node/.style={font=\footnotesize, draw=green, minimum width=14em, minimum height=10ex}}     %     \node[anchor=south,draw=green](Second1)  at (-30em, -15ex) {Second Parent 1}[];     \node[anchor=south,draw=green](Second2) at (15em, -15ex) {Second Parent 2}[];     %     \draw[->,dotted] (Child12) to[out=north east,in=south] (Second1);     \draw[->,dotted] (Child23) to[out=north east,in=south] (Second2);     \end{forest}     \end{document}


title: Saving a non-animated version of animated beamer/fancyslides slides

text: I'm new to LaTeX so I don't even know how to phrase my question to search for it! I am making lecture slides for a course. I use `\pause` before pretty much every bullet point so we can go over each point one by one. However, this makes each bullet point into a new slide, so a 20 frame presentation quickly becomes a 50+ slide PDF document. For the purposes of posting the lecture slides on the course website so students can study them later, I would like a version of the PDF which only has the frames (ie all the bulletpoints, no frames that are blank or just have the first few bullets). I could do this by removing/commenting out all the `\pause` and creating a second document, but I'm wondering if there's a better way? Related: is there a way to put slide numbers (by frame, not by bullet point) on fancyslides? This:               \setbeamertemplate{footline}[page number]      doesn't work. * * * Here's an example of my document (which uses fancyslides.cls):               \documentclass[handout]{fancyslides}     \usetheme{default}      \setbeamertemplate{navigation symbols}{}      \setbeamercolor{structure}{fg=\yourowntexcol}      \setbeamercolor{normal text}{fg=\yourowntexcol}      \newcommand{\structureopacity}{0.80}      \newcommand{\strcolor}{blue}      \newcommand{\yourowntexcol}{white}           \begin{document}     \begin{frame}     {\color{blue}\huge Slide title}     \itemized{     \pause     \item bullet points      \pause     \item shown one by one     \pause     \item one frame, four slides     }     \end{frame}     \end{document}      `[handout]` doesn't seem to do anything on fancyslides. I suspect my footer page number issue has to do with the fact that my font color and background color are white?


title: multline and mdframed bug

text: I do not think this bug has been reported anywhere. At least, I could not find such a report. Below is a piece of code to see the problem. The frame in the right margin is improperly calculated.               \documentclass[10pt,fleqn]{book}     \usepackage{xcolor}     \usepackage{amsmath,amsthm}     \usepackage[framemethod=tikz]{mdframed}     \newmdtheoremenv[backgroundcolor=red!10]{theorem}{Theorem}     \begin{document}     \begin{theorem}text\begin{multline}text\end{multline}text\end{theorem}     \begin{theorem}text\begin{equation}text\end{equation}text\end{theorem}     \end{document}


title: Is there a "medium" \cap?

text: When displaying the intersection symbol in equations, e.g.,               $$Hom(A,B) \cap Hom(B,C)$$      I find that the "cap" is too small; its height is, in fact, subordinate to the surrounding content. On the other hand, `\bigcap` is entirely too big, dwarfing the surrounding content. This is especially unnecessary if the intersection is not indexed, for example. What is needed is a "medium" cap whose size is somewhere between the big cap and the regular cap. Does such a symbol/construct exist? Note that similar comments apply to `\bigcup` and `\cup`.


title: How to \ref to subcaption numbers (a, b) when using memoirs subcaptions?

text: How can I get references to subcaption numbers when using memoir? In this example:               \documentclass{memoir}          \newsubfloat{figure}     \begin{document}          \chapter{Lorem}     \section{ipsum}          \begin{figure}[b]     \begin{minipage}{0.49\textwidth}         \centering         \Large \textbf{Lorem}         \subcaption{Lorem}         \label{lorem}     \end{minipage}     \begin{minipage}{0.49\textwidth}         \centering         \Large \textbf{ipsum}         \subcaption{Ipsum}         \label{ipsum}     \end{minipage}     \caption{Lorem Ipsum}     \end{figure}          Lorem (figure:~\ref{lorem}) ipsum (figure:~\ref{ipsum}) dolor sit amet, consectetur adipiscing elit. Nullam ut nunc lacus, ac vestibulum orci. Nullam viverra dictum dolor, in molestie neque ullamcorper sed. Nullam felis velit, vestibulum ut convallis quis, luctus sit amet est. Etiam vel viverra magna. Phasellus euismod venenatis augue, quis rutrum sem pulvinar at. Donec pellentesque enim vitae ante tristique lacinia. Nulla auctor fermentum lorem, ut scelerisque nunc vehicula id. Phasellus sed facilisis erat. Nulla porttitor, metus eu bibendum molestie, elit dui lacinia dolor, nec iaculis sem tortor sit amet tortor. Vivamus a euismod arcu.          \end{document}      I would like to get references like "Lorem (figure: 1.1a) ipsum (figure: 1.1b)" instead it looks like this: ![enter image description here](http://i.stack.imgur.com/Dwz1j.png) With the subcaption package which was used before I switched to memoir it seems this worked out of the box. How can I get this behavior with memoir?


title: Protect text from being interrupted by figures or tables

text: I have read How to protect text from being split by a float? by it does not exactly cover what I want. I have a text that is interspersed with figures. I do not wish to copy all the figures to the end of the document, but wish that they all appear there, leaving the text proper uninterrupted by them. Isn't there some environment that could do this for me ?


title: How to make short caption show up

text: I'm using the caption package. I want to say \caption[My short Caption] {My longer longer caption} and have both show up? How can I do that?


title: Increment custom counter with standard sectioning command?

text: My document is a (scr)book and I'm talking of parts and chapters here, but I think the underlying question is pretty generic.   * I want tables in the book to be enumerated continuously, in a chapter.table way.   * I reset the `chapter` counter for each part of the book using a custom-made `MyPart` command, which is necessary for several other reasons not presented here.   * However, **I do _not_ want to reset the table numbering**. (I.e., the "chapter" part in the table number should keep a running total of chapters across part boundaries.) I got it working by defining a counter `tabchapter`, and bumping that one manually whenever a new `\chapter` is declared. I wanted to avoid having to declare something like `\MyChapter` solely for this purpose, but I was **not** satisfied with my solution:               \documentclass[open=any]{scrbook}          \usepackage{titlesec}          \newcounter{tabchapter}     \renewcommand*{\thetable}{\arabic{tabchapter}.\arabic{table}}     \renewcommand*{\tableformat}{Tab. \thetable}          %% Ugly hijacking of a formatting command to follow...     \titleformat{\chapter}         {\addtocounter{tabchapter}{1}\Huge\bfseries}   %% <<----  *COUGH*...         {}         {0pt}         {}          \newcommand{\MyPart}[1]{         \setcounter{chapter}{0}         \refstepcounter{part}     }          \newcommand{\exampletable}[1]{         \begin{table}             \caption{#1}             \begin{tabular}{c}                 Nothing much.             \end{tabular}         \end{table}     }          \begin{document}     \MyPart{Book One}     \chapter{The First}     \exampletable{Some Table}     \chapter{The Second}     \exampletable{Other Table}     \MyPart{Book Two}     \chapter{The First of the Second}     \exampletable{Yet Another Table}     \end{document}      Is there another way to have some counter incremented whenever a **standard** sectioning command is called (i.e., somehow "linking" it to the standard counter)? _Other_ than wrapping the bump in a custom `\MyChapter` command?


title: Selecting main math font in LuaTeX?

text: I’d to set some fairly simple maths in Minion Pro (and potentially other system fonts), using LuaTeX. I’d hoped that something like the following should work:               \documentclass{minimal}          \usepackage{fontspec}     \setmainfont{Minion Pro}          \begin{document}     Here’s some text.  Now some math: $x^2 + y^2 = z^2$.     \end{document}      However, the `x^2 + y^2 + z^2` is set in Computer Modern. Material in `\mathit`, `\mathrm` etc. appears in Minion as hoped, and can be further controlled by `\setmathrm` and so on, but is there any way to control the main math font? I don’t have Minion Math, and trying to use ordinary Minion Pro as the math font via `unicode-math` doesn’t help—indeed, it puts `\mathit` material back into CM! `MnSymbol` also doesn’t help. But in any case, I’d prefer a solution that generalises to other fonts, if possible. Alternatively, changing to XeLaTeX, the `mathspec` package does the trick, using `\setmathfont(Digits,Latin){Minion Pro}`. But I’d be sad to give up `microtype` and the rest of the power of LuaTeX!


title: Is it possible to determine the alignment of the paragraph?

text: I have this short code that uses the `\aftergroup command` to inject a `\centering` before inserting a figure and then tries and restore the paragraph settings after the image is typeset. ![enter image description here](http://i.stack.imgur.com/GwmXI.png) I am trying to modify the code so that it can detect the environment that was in before the macro was expanded, i.e if the previous settings were justified then after the image is typeset the environment is restored. How do I do this? Minimal shown below:               \documentclass{article}     \usepackage{graphicx,lipsum}          \def\agraphic{{\begin{minipage}{3cm}\par \includegraphics[width=\textwidth]{./graphics/amato}\end{minipage}\par}}     \def\testafter{{ \gdef\aword{\centering}\aftergroup\aword\aftergroup \agraphic\aftergroup\flushleft }}     \begin{document}     \lipsum[1]     \testafter     \lipsum[2]     \agraphic     \lipsum[1]     \end{document}


title: Problem Installing MacTeX-2011-1 on OSX 10.4.11

text: I have a problem installing the MacTeX-2011-1.mpkg on my macbook (OS X 10.4.11). The first few steps (like Software License Agreement etc.) are working, but when it comes to the "proper" installation it fails: The screen shot shows the problem: After choosing the volume to install onto, the installer asks whether I want to check some boxes (for example "Tex Live 2011" etc., (überspringen = engl. skip)). When I try to check the boxes nothing happens, they don't "take" the check. When I just press the button "installieren" (install) the box on the top appears. It says "You cannot continue. The software for the installation is missing". Does anyone know what to do? ![screenshot of error](http://i.stack.imgur.com/RZAFq.png)


title: installing comicsans to TeX Live, Windows

text: I need help to install the `comicsans` package and the fonts. My system is TeX Live 2011, and Windows 7. Below is what I did:   1. Copied `comic.ttf` and `comicbd.ttf` in `C:\texlive\texmf-local\fonts\ttf`. (I created the `ttf` directory.)   2. Copied `dvips`, `tfm`, and `vf` directories from the `comicsans.zip` to `C:\texlive\texmf-local\fonts`.    3. Ran `mktexlsr` to update the file name database.   4. Copied `comicsans.dtx` and `comicsans.ins` in `C:\texlive\texmf-local\tex\latex\comicsans`. (I created the `comicsans` directory.)   5. Ran `tex comicsans.ins` in `C:\texlive\texmf-local\tex\latex\comicsans`.   6. Ran `mktexlsr` to update the file name database.   7. Ran `updmap-sys --enable Map=comicsans.map`.   8. Ran `mktexlsr` to update the file name database. Using TeXworks, I tested it with:               \documentclass{article}     \usepackage{comicsans}     \renewcommand{\sfdefault}{comic}          \begin{document}     This is a text.     \end{document}      and it did not work. No font change, no error message. Did I make any mistake, or miss any step? I believe some of the above steps are unnecessary, which one?


title: Inserting a sentence at the top of the page

text: I want to insert a sentence (Author's personal copy) at the top of the page which is centered. I don't want a header with line. Just want to add a sentence ( **bold** or _italic_ ). How can I add that for   1. first page only   2. each page


title: How to draw a horizontal line between middle of the page and one of the edges (in beamerposter)

text: I have a two column layout with beamerposter, where the columns are seperated by a vertical (thanks to egreg). Now I need the sections to be divided by horizontal lines that range from the edge of the paper to the vertical line at the middle of the poster. I already tried to correct the length and position of the horizontal rules by using the `\rule` command with negative length in front of the actual rule command, but the steps in which the line could shifted seemed to be to coarse (the line ended either to early or started and ended to late). Here is an example of what I mean, but how do I achieve horizontal lines of the right length and position?               \documentclass[final,hyperref={pdfpagelabels=false}]{beamer}          \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}                    \usepackage{lipsum}          \begin{document}     \begin{frame}       \begin{beamercolorbox}[wd=\paperwidth]{headline}         \centering\huge Headline and stuff\\         \rule{.5\paperwidth}{2mm}\kern-1mm         \smash{\vrule height 0pt depth \paperheight width 2mm}\kern-1mm         \rule{.5\paperwidth}{2mm}%       \end{beamercolorbox}            \begin{columns}        \begin{column}{0.01\textwidth}        \end{column}        \begin{column}{0.48\textwidth}         \huge \lipsum[1]         \rule{0.5\paperwidth}{2mm}         End of part one        \end{column}        \begin{column}{0.02\textwidth}        \end{column}        \begin{column}{0.48\textwidth}         \huge Start of part two\\         \rule{0.5\paperwidth}{2mm}         \lipsum[2]        \end{column}        \begin{column}{0.01\textwidth}        \end{column}       \end{columns}     \end{frame}     \end{document}      edit: I tried to draw the line via tikz, by substituting the horizontal rules with               \tikz[remember picture] \coordinate (A);     \begin{tikzpicture}[overlay]           \path[->,red] let \p1 = (A), \p2 = (current page.center) in (\x2-0.5\paperwidth,\y1) edge (\x2,\y1);     \end{tikzpicture}      For some reason there is an offset in both dimension with this approach. Where does it come from and how much do I have to shift the tikzpicture to compensate it (if this approach can do it at all)?


title: pgfplots: multiple legends or one legend and a heading

text: In my plot, I want my standard legend that says what value of c corresponds to what color. However, I would also look to put the function in plot.               \documentclass[tikz]{standalone}     \usepackage{mathtools}     \DeclareMathOperator{\sech}{sech}     \usepackage{pgfplots}     \pgfplotsset{compat = 1.8}     \begin{document}     \begin{tikzpicture}       \begin{axis}[         samples = 1000,         domain = -10:10,         ymin = 0,         ymax = 2,         xmin = -7,         xmax = 7         ]         \foreach \c/\col in {1/red, 2/blue, 3/green, 4/yellow}{           \edef\temp{\noexpand\addplot[red, \col]             {2 * \c / (exp(.5 * sqrt(\c) * x) + exp(-.5 * sqrt(\c) * x))^2};           }           \temp         }         \legend{$c = 1$\\ $c = 2$\\ $c = 3$\\ $c = 4$\\}       \end{axis}     \end{tikzpicture}     \end{document}      I also want to put somewhere in the plot `\(u(\xi = x - ct) = \frac{c}{2}\sech^2\left[\frac{\sqrt{c}}{2}(\xi - \xi_0)\right]\)`. How can this be achieved? ![enter image description here](http://i.stack.imgur.com/4PGwa.png)


title: Change \abovecaptionskip for some floats only

text: I'd like to change the `\abovecaptionskip` (space between figure and caption) for the listing floats of the `minted` package only. How can I do that?


title: Htlatex and Tikz creates sometimes incorrect svgs

text: I have a document with a large number of Tikz pictures and I need to generate a html page from it. I have declared a driver to have TikZ pictures as SVGs (after this question) and run `htlatex main.tex`:               \ifx\HCode\UnDef\else\def\pgfsysdriver{pgfsys-tex4ht.def}\fi      However, for some pictures SVGs are correctly generated for some they are not (e.g., TikZ pictures from answers to this question). For most of them, I got _XML Parsing Error: mismatched tag_ error with `</text>` mentioned, e.g.:               alt="ExAAel "  class="pic-halign" ></text>       Is there any website that would help me to understand which kind of TikZ pictures are supported by htlatex? UPDATE: Because of problems with SVG generation, I decided to try to generate pngs. I use tikzexternalize as Andrew Stacey suggested. I am on MacOs so I also needed to install (with macports) poppler to have pdftoppm and pnmtopng. Here is my example document:               \documentclass[11pt,a4paper]{article}     \usepackage{pgf}     \usepackage{tikz}     \usepackage{pgf}     \usetikzlibrary{external}     \tikzexternalize[prefix=figures_external/]          \begin{document}          \tikzset{external/system call={pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource" && pdftoppm "\image.pdf" | pnmtopng > "\image.png"}}            \tikzset{external/figure name={tikz-figure}}           \begin{tikzpicture}         % Picture code     \end{tikzpicture}           \end{document}      Unfortunately I got the following error: > >     > Package tikz Error: Sorry, the system call 'pdflatex -halt-on-error >     > -interact ion=batchmode -jobname "figures_external/braids-figure0" > "\def\tikzexternalreal >     > job{example_tikz_external}\input{example_tikz_external}" && pdftoppm >     > "figures_e xternal/braids-figure0.pdf" | pnmtopng > >     > "figures_external/braids-figure0.png"' did NOT result in a usable >     > output file 'figures_external/braids-figure0' (expe cted one of >     > .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system >     > calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is >     > also nam ed 'write 18' or something like that. Or maybe the command >     > simply failed? Error messages can be found in >     > 'figures_external/braids-figure0.log'. If you continu e now, I'll try >     > to typeset the picture. See the tikz package documentation for >     > explanation. Type H <return> for immediate help. >   I wonder what could be a reason that the externalize call fails.


title: Small (half width) framed table of contents

text: I am writing a 4-5 pages article document, and a full-width, traditional table of contents really feels over the top and would take up too much space, but I still feel a toc is really great to show the document structure. Ideally, I would like to have my toc framed in the top left of the article (with the content starting inmmediately to its right), just like many journals or even wikipedia does. So far, I've attempted to achieve that with columns, minipage and wrapfigure, but none of those solutions is really satisfying (I've been using latex for some time now, but I always let him do the job, so I'm not that familiar with manually doing stuff). The main issues are getting the starting content to properly and automatically wrap around the toc (didn't achieve with colums or minipage), and getting the starting content and the toc correctly aligned and clean (didn't achieve with wrapfigure). Here's my best attempt so far:               \documentclass[a4paper]{article}     \usepackage[frenchb]{babel}     \usepackage[utf8]{inputenc}     \usepackage{textcomp}     \usepackage[T1]{fontenc}     \usepackage{fixltx2e}          \usepackage{lipsum}          \usepackage{float}                            %floats and figures     \usepackage{graphicx}                         %load images     \usepackage{wrapfig}                          %figures within text     \usepackage{subcaption}                       %multiple subfigures and subcaptions          \usepackage{amsmath}          \begin{document}     \begin{center}       {\LARGE Rapport de visite d'entreprise}\\       {\includegraphics[width=.3\textwidth]{ABB.jpg}}\\       Nathan Dwek\\       \today     \end{center}          \begin{wrapfigure}{L!}{.5\textwidth}       \tableofcontents     \end{wrapfigure}                    \section{Le groupe ABB}     \lipsum[1]          \section{ABB Jumet}          \lipsum[2]          \section{La ligne de production de condensateurs}               \subsection{La métallisation}          \subsection{Le choupage\label{choupage}}               \subsection{Traitements de finition}               \section{Systèmes à condensateurs}          \subsection{Condensateurs en triphasé}          \subsection{Armoires à condensateurs}          \end{document}                and the result: ![](http://i.imgur.com/n8AQXbJ.png) as you can see the section title is out of place (should be right above starting text) and the toc has a weird horizontal alignment (see @Keks Dose 's answer for this part) Any hints? Thank you in advance


title: Settings options doesn't seem to work with the achemso document class

text: I'm submitting a paper to a non-ACS journal that nonetheless follows _most_ of the ACS formatting guidelines. So I'm trying to use the `achemso` document class and setting a few options to meet the journal's idiosyncrasies. In particular I need the citations to not be superscripted and appear in square brackets and before punctuation, like: [5]. Also the list of references should be enumerated as 1. 2. 3. etc. not (1) (2) (3). The `achemso` documentation says you can set some of these options using the `\setkeys{acs}{}` command after the document class as appears below. However it appears this command is totally ignored when the TeX is compiled. Any ideas? For what its worth, I'm using TeXShop/TexLive on a mac and using the most recent `achemso` package updated 2011/12/30.               \documentclass[journal=jacsat,manuscript=article,layout=traditional,super=false]{achemso}     \setkeys{acs}{biblabel=period,super=false}          % Handles moving citation markers before punctuation at end of sentence     \usepackage{natmove}     \renewcommand*{\natmovechars}{}          \title{Awesome Paper}          \begin{document}          \begin{abstract}     Abstract goes here     \end{abstract}          \section{Introduction}     Here is some text for the awesome paper.       This sentence was written with a cite before the period\cite{LyonCE1998}.      This sentence has cites to three papers after the period.\cite{LyonCE1998,NataroJCE2004,MartinCE2005}        Here's a cite to two papers after the period.\cite{MartinCE2005,LyonCE1998}            \bibliography{achemsotest}          \end{document}


title: LaTeX wants a $ where there shouldn't be one

text: I have a variable name that I need to include mid-paragraph. The variable is called "oral_read_score". LaTeX seems to think that I meant the "r" and "s" to be subscripts, and gives an error unless I change to `$oral_read_score$`, which is not what I want. Is there some option I can use to turn this error off?


title: Capture a macro's subscripts/superscripts by the macro

text: Is it possible to capture sub-/superscripts added to a macro by the macro itself? Consider the following example:               \newcommand{\fx}[1]{f(x)}     \fx{x}   % -> f(x)     \fx{x}^2 % -> f(x)²      Now the question, is it possible to do something like               \newcommand{\fx}[1]{f<superscript-here>(x)}     \fx{x}^2 % -> f²(x)      of course not in this way, but in principle using some hacky TeX stuff?