title: initexmf error -- to increase pdflatex memory

text: I am trying to increase main_memory for pdflatex compiler in win7 64. Using `initexmf` didn't work. This is the error I get:               >initexmf --edit-config-file=pdflatex     initexmf: Invalid argument.     initexmf: Data: vi      or               >initexmf --edit-config-file pdflatex     initexmf: Invalid argument.     initexmf: Data: vi      Or which file I can edit directly. I have tried already to edit (be adding `main_memory=10000000` in the files)               C:\Program Files\MiKTeX 2.9\miktex\config\pdflatex.ini      and               C:\Program Files\MiKTeX 2.9\tex\latex\config\pdflatex.ini      but it didn't work. In all cases after compilation I get :               ! TeX capacity exceeded, sorry [main memory size=3000000].      any idea ?? PS: Using pdflatex argument `--main-memory=10000000` seems also is not a solution since I'm using pgfplot externalization the pdflatex command which is invoked by pgfplot does not include `--main-memory=10000000` in the arguments. lualatex also would not be a solution (it is extremely slow).


title: Equivalent of QTikZ for PSTricks

text: I have recently seen the very useful QTikZ program for interactive viewing of TikZ diagrams. I was wondering if a similar program exists for drawing PSTricks diagrams.


title: Set size of \colorbox for a single character

text: my question is simple (or not) I want to set the size of the `\colorbox` command or `\fcolorbox` command for a single character. The problem is the next: ![character box](http://i.stack.imgur.com/veqKm.jpg) As seen in the image, the height and width are different for different characters, but what I want is that the size is the same for all characters. The package that I use is `xcolor`and the code I used to generate the box character is `\noindent\colorbox{black!85}{\textcolor{white}{i}}` **EDIT:** My objective is a box with individually centred character. The background of the box in black color and text in white. Also would be nice if it is a `enumitem` and the items are in a black box


title: Fix for amsart.cls tableofcontents bug regarding starred sections?

text: The command `\section*` is meant to produce a section that is not listed in the table of contents. However, when using amsart.cls, such sections are still listed. I believe this is a known bug. How can I get around it, that is, produce an unnumbered section that is not listed in the table of contents, while still using amsart.cls? Thanks! For example, compiling the following twice produces the erroneous entry in the TOC:               \documentclass{amsart}       \begin{document}       \setcounter{tocdepth}{2}       \tableofcontents       \section{Numbered}       \section*{Still here}       \end{document}


title: dvips has problems finding a font

text: The following mystery/error baffles me. OS: Windows 7 SW: MikTeX 2.9.3888, WinEdt 7.0 Problem: While running `divps`, the following messages appear in the console               Trying to make PK font ecbx1200 at 600 DPI...     The PK font file `C:\Users\Jyrki\AppData\Local\MiKTeX\2.9\fonts/pk/ljfour/jknappen/ec/dpi600\ecbx1200.pk` already exists.      ... and a couple of lines further down:               `dvips.exe`: Font ecbx1200 not found; characters will be left blank.      This is all Greek to me, but may be somebody can suggest a fix? I don't know where this font is used, but I would guess that it is the bold text in **Theorem** , **Lemma** and such. The symptoms of this are even more baffling, because a document with the following header source               \documentclass[a4paper,12pt,leqno]{article}          \usepackage{latexsym,epsf,amsthm}     \usepackage[finnish]{babel}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage[dvips]{graphicx}     \usepackage{float}     \usepackage{psfrag}     \usepackage{hyperref}          \setlength{\oddsidemargin}{0.0in}  %for thesis     \setlength{\textwidth}{6.5in}   %for thesis     \setlength{\baselineskip}{18pt}     \setlength{\topmargin}{-0.25in}     \setlength{\textheight}{8.9in}     \global\baselineskip=18pt          \newtheorem{lause}{Lause}     \newtheorem{lemma}[lause]{Lemma}     \newtheorem{seuraus}[lause]{Seuraus}     \theoremstyle{definition}     \newtheorem{huomautus}[lause]{Huomautus}     \newtheorem{esimerkki}[lause]{Esimerkki}     \newtheorem{maaritelma}[lause]{Määritelmä}     \newtheorem{exer}{Harjoitustehtävä}     \newenvironment{todistus}{{\noindent \bf Todistus.}\rm}{\qed\medskip}     \newenvironment{ratkaisu}{{\noindent \bf Ratkaisu.}\rm}{\medskip}      results in a document that   1. `divpdf` refuses to proceed with (citing missing font `ecbx1200`)   2. processing via `divps` and `ps2pdf` gives a document, where the theorem headers (and numbers) are missing   3. was processed correctly on my previous laptop (older versions of both MikTeX and WinEdt running on WinXP) **BUT** another document with IMHO essential identical header source               \documentclass{report}[12pt]          \usepackage{latexsym,epsf,amsthm}     \usepackage[finnish]{babel}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage[dvips]{graphicx}     \usepackage{float}     \usepackage{psfrag}     \usepackage{hyperref}          \setlength{\oddsidemargin}{0.0in}  %for thesis     \setlength{\textwidth}{6.5in}   %for thesis     \setlength{\baselineskip}{18pt}     \setlength{\topmargin}{-0.25in}     \setlength{\textheight}{8.9in}     \global\baselineskip=18pt          \newtheorem{lause}{Lause}[chapter]     \newtheorem{lemma}[lause]{Lemma}     \newtheorem{seuraus}[lause]{Seuraus}     \theoremstyle{definition}     \newtheorem{huomautus}[lause]{Huomautus}     \newtheorem{esimerkki}[lause]{Esimerkki}     \newtheorem{maaritelma}[lause]{Määritelmä}     \newenvironment{todistus}{{\noindent \bf Todistus.}\rm}{\qed\medskip}     \newenvironment{ratkaisu}{{\noindent \bf Ratkaisu.}\rm}{\medskip}      gives   1. the same error messages    2. but no characters are missing from the output after the `dvips` \+ `ps2pdf` route. Conceivably, `amsmath` could use a different font here for `article`s and `report`s. That might explain the difference in behavior, but I'm more interested in getting a fix.


title: wrapfigure in a newtheorem environment: Why not put in correct place?

text: This must be easy but I can't figure out why the "figure" is not put at the correct spot ( _in_ the example) with `wrapfigure'.               \documentclass{article}          \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage{blindtext}     \newtheorem{example}{Example}[section]          \begin{document}     \begin{example}       \blindtext[1]       \begin{wrapfigure}{r}{0.5\textwidth}         \framebox[0.5\textwidth]{\rule{0pt}{100pt} Figure}       \end{wrapfigure}       \blindtext[1]     \end{example}     \blindtext[2]     \end{document}


title: Opacity and transparency

text: I found some discussions about the opacity parameter in pstricks, but I still can't make it work. Here is my tex file:               \documentclass{article}     \usepackage{pstricks}     \usepackage{pstricks-add}           \begin{document}          \begin{pspicture}(-2,-2)(2,2)         \psset{fillstyle=solid}         \psline[linecolor=blue,linewidth=12pt](-2,-2)(2,2)         \psframe[fillcolor=red,opacity=0.5](-1,-1)(1,1)     \end{pspicture}          \end{document}      I compile it on Ubuntu using:               latex opacity.tex     dvips opacity.dvi      but in the PS file, there is no transparency. What should I do to see the picture with the transparency effect?


title: Italic in theorem environment

text: Consider the following theorem:               \begin{theorem}        If $x=0$, then $xy$ is equal to 0.     \end{theorem}      The first "0" will be typeset in upright typeface and the second one in italic. Including `amsthm` has no effect. Is this a bug? I personally think it look very weird. I think I know how to fix this, and this question is more about the why it is not fixed by default. However, if you have a clever trick for avoiding this, feel free to share it.


title: One style for one chapter at a time

text: _I saw some of the questions that may not answer my question, this question is more on decoration-like aspect._ When reading some (coloured illustrated) textbooks, one may find that the chapters have different layout styles. Such as the theme colour and icons. If I would like to have this feature in my document. What should I do. _If anyone would need a MWE, please request in comment and tell me what sort of MWE is needed. I am not good at providing MWE._ _Edit:_ May I provide some existing examples such as the IB textbook published by OUP, they provide a sample chapter that is coloured. What I would like is each chapter has different _headings_ in different theme colours, and also different _page numbers_ with the corresponding colours (which is on the bottom of the page). I don't need to be the same as the example, however.


title: Which Windows TeX package goes well with TexMaker ?

text: I'm trying to setup my Windows 7 box with LaTeX. I had installed TexMaker 3.0, but I later found out I had to install a TeX Package (like MikTeX/TeXLive) _before_ installing TexMaker. My question is very simple - for a normal day-to-day use (writing papers/formatting CVs), which is the best Windows implementation that works with TexMaker on Windows 7?


title: Delayed drawing of arrows in tikz-cd

text: I want to draw an arrow which passes over another arrow in a tikz-cd commutative diagram. I can do that as follows from the documentation:               \documentclass{article}     \usepackage{tikz-cd}     \begin{document}     \[     \begin{tikzcd}[ampersand replacement=\&,column sep=small]       GM \arrow[pos=0.75]{rr}{\models_{M}}          \arrow[two heads,swap]{dr}{e_{M}}          \arrow[swap]{dd}{Gf}          \&      \&           R^{FM}            \arrow{dd}{R^{Ff}} \\          \& T M          \arrow[tail,swap]{ru}{m_{M}}         \arrow[swap,pos=0.75]{dd}{T f}          \& \\       GN \arrow[pos=0.75,crossing over]{rr}{\models_{N}}          \arrow[two heads,swap]{dr}{e_{N}}          \&      \& R^{FN} \\          \& T N          \arrow[tail,swap]{ru}{m_{N}} \&         \end{tikzcd}     \]     \end{document}        ![Result](http://i.stack.imgur.com/5COUc.png) However, I want the arrow `$Tf$` pass over the arrow `$\models_{N}$`. (I.e. the over and under crossing reversed). But as the arrow, which is supposed to be drawn over the other, is drawn before the other the `crossing over' option does not work. I tried to use nodes for the entries in the diagram to be able to draw the arrow later (from node to node), but that gives me a compile error. I can always return to plain tikz, but I guess others using tikz-cd might find it also helpful to know how to use nodes or delay drawing an arrow. Any hint?


title: revtex4-1 and colortbl doesn't fill cells

text: The MWE below shows that the `\cellcolor` command doesn't properly fill a table cell in `revtex4-1` where it would do so in a simple `article`. Can anyone help me get fills that extend to the boundaries of my cells in `revtex4-1`? ![Difference between article and revtex colortbl](http://i.stack.imgur.com/GUxPx.png)               \documentclass{revtex4-1}     \usepackage{colortbl}     \begin{document}     \begin{tabular}{ |c|l|l| } \hline     \rowcolor{red} A    & B     & C     \\ \hline     Hello World         & other     & \cellcolor{blue}stuff\\ \hline     \end{tabular}     \end{document}


title: Adding image file in Latex

text: I'm trying to add a image file in the middle of report but it always go in the next page.               \begin{figure}[h]     \centering     \includegraphics[angle=45,width=62mm]{images/X}      \caption{Diagram}     \label{fig:physical}     \end{figure}      Any suggestion? Thanks.


title: Harvard Reference using Biblatex

text: I'm trying to build a Harvard reference template using biblatex. I at first gave the Harvard package a try but was then informed that this package is out- dated and instead should use biblatex. After setting up LaTex (see here) I went through the lovely 91 examples that came with the biblatex package. Sadly _none_ of them had any full Harvard example. Which is a little strange seeing as this is the almost de-facto when it comes to references for academic papers. My current code looks like this:               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents*}{refs.bib}     @BOOK         {KandR,          AUTHOR  = "Kernighan, Brian W. and Ritchie, Dennis M.",          TITLE   = "{The C Programming Language Second Edition}",          PUBLISHER = "Prentice-Hall, Inc.",          YEAR = 1988     }     @ONLINE     {CUEDCplusplus,          AUTHOR  = "Love, T.P.",          TITLE   = "{CUED C++}",          URL = "http://www-h.eng.cam.ac.uk/help/tpl/languages/C++.html",          URLYEAR = 2010,          PRESORT="aa"     }     \end{filecontents*}     \usepackage[style=authoryear-ibid,backend=biber]{biblatex}     \addbibresource{refs.bib}          \begin{document}          In 1988 C was totally awesome. \cite{KandR}     According to \cite{CUEDCplusplus} C++ was even better.          \printbibliography      \end{document}      Does anybody know how I can instead have an output that fully matches the Harvard referencing system. In other words, instead of looking like this (as it currently does) ![Current output](http://i.stack.imgur.com/8MoGo.png) It will look like this (The bibliography is correct though, so no need to change that) ![Want](http://i.stack.imgur.com/Un2T7.png) Any help would be really appreciated.


title: booktabs with custom column spacing

text: I'm trying to use the `booktabs` package, and I'm trying to make tables with "column groups" that are delimited by extra space. In the following, I am doing this using the `@{}` syntax in the `tabular` environment header. Unfortunately, however, this seems to ruin the alignment of the `multicolumns` and the `cmidrules`. Any ideas how I can fix this?               \documentclass{article}     \usepackage{booktabs}     \begin{document}     \begin{table}      \centering      \begin{tabular}{cc @{\hskip 4\tabcolsep}         *{2}{c} @{\hskip 4\tabcolsep}         *{2}{c} @{\hskip 4\tabcolsep}         *{2}{c} }       \toprule       & & \multicolumn{2}{c}{A} & \multicolumn{2}{c}{B} &       \multicolumn{2}{c}{C}\\       \cmidrule(lr){3-4} \cmidrule(lr){5-6}     \cmidrule(lr){7-8}       & D & E & F & E & F & E & F\\       \midrule       G    & 4.6 & 1.7 & 0.35 & 0.30 & 0.5 & 0.21 & 0.24\\       H    & 6.5 & 2.7 & 1.4  & 1.2  & 1.3  & 0.30 & 5\\       I    & 8.7 & 7.3 & 4.6  & 8.5  & 89.3  & 3.7  & 2\\       J    & 1.4  & 13  & 9.7  & 13   & 8.7  & 8.2   & 4\\       K    & 5 & 2  & 85   & 18   & 74   & 2.9   & 0.24\\       \bottomrule       \end{tabular}     \end{table}     \end{document}


title: Tikz anchor for nodes are not set?

text: I have a problem just getting started with TikZ. I want to use it in `beamer` but I have the same problem with minimal so I just give the `beamer` test.               \documentclass{beamer}     \usepackage{tikz}     \begin{document}     \begin{frame}{}     \tikz\node (A){$A$};\hspace{1cm}     \tikz\node (B){$B$};\hspace{1cm}     \tikz\node (C){$C$};     \begin{tikzpicture}            \draw[<->] (A) -- (B);            \draw[<->] (A) -- (C);     \end{tikzpicture}     \end{frame}     \end{document}      And here is the result: ![result](http://i.stack.imgur.com/FlcOw.jpg) What could be the problem? Thanks!


title: Adding something automatically to every paragraph in an environment

text: I'd like to know if it's possible to have something added automatically to any paragraph in a given environment. I use LaTeX mostly for doing fill-in-the-blank worksheets at the school where I work. I have an environment called `FillInTheBlanks`(*). It outputs the page twice---once with certain words that I've indicated with `\blank{}` blanked out with an underline in their place, and another page(s) with the answers filled in. I also find it useful to have the paragraphs numbered, to make it easier to talk with the students about the content (e.g. "At the end of paragraph 3, you'll notice..."). In my Worksheets.sty file, I added:               \reversemarginpar     \newcommand\marginlabel[1]{\mbox{}\marginpar       {\hspace{2em}#1}}      so I can add a paragraph number in the margin to each paragraph. The only thing is, using this I have to add `\marginlabel{"a number"}` at the beginning of each paragraph manually. I'd like it to be done automatically. If I made a `\newcommand` to wrap around each paragraph, it could write the command so that it would save me the effort of manually inputting the paragraph numbers, but given that there are usually half a dozen paragraphs per page or less, it doesn't actually save much labour. Is there some way I could have the `\marginlabel{}` command inserted automatically whenever a new paragraph starts? (*) I know the `exam` class does something like this, but it doesn't do it the way I wanted to, so I rolled my own.


title: convert matematical pi 6 font (type1) into *.vf files

text: I have bought the mathematical-pi font volume in type1 format and I want to use it in LaTeX. I already know that I have to rename *.pfb and *.afm files using the instructions described in Karl Berry' fontname, then get *.tfm files from the afm ones using afm2tfm. But I also need the virtual font files because I want to use the following instructions of mathtime package, that allow you to use mathematical-pi 6 in blackboard format:                 \DeclareMathAlphabet\mathbb{U}{mh6}{m}{n}      (In addition, Karl Berry's instructions suggest to rename these pi fonts into ppi02#, where # is 0 for mathematicalpi-one and 5 for mathematicalpi-six, but the line above seems to force you to rename those mh#). So, I can't get *.pl and *.vpl files, and I can't create *.fd files in order to get an encoding of these fonts.


title: Memoir class -- Displayed heading for subsubsection

text: I am trying to make a subsection heading with the memoir class. The problem is the following: I want to have a displayed heading for my subsubsection. The text should begin right after the subsubsec heading as a new line, and NOT as a new paragraph. Memoir sets as a vertikal space after the headings the lenghts `afterskip + \parskip(of heading font) + \baselineskip(of text font)`. To solve the problem, it would be plausible to set afterskip to -parskip. But, if afterskip becomes a negative value, the heading will turn into a run-in style. I made my tests with the following minimal example:               \documentclass[11pt]{memoir}     \parskip9pt     \parindent0pt          \setcounter{secnumdepth}{2}     \setbeforesubsubsecskip{9pt}     \setaftersubsubsecskip{1pt}          \setsubsubsecheadstyle{\scshape}     \begin{document}          \subsubsection{lorem ipsum}     lorem ipsum          lorem ipsum      \end{document}      I used before the titlesec package, and it was excelent, till I not tried to use \titleref... This \titleref doesn't work with this package only for the chapters. If I dont't use titlesec, the references for sections working also good.


title: Set width of text in list

text: I am attempting to produce a list that has a width of (say) 5cm, as opposed to going to the far right of the page. Any advice is appreciated.


title: How to change text leading in node

text: My goal is to get text in a node closer. Here is how it should be done: Look at XXXXXXXXXXX node. ![enter image description here](http://i.stack.imgur.com/1wyWi.png)               \documentclass{beamer}%     \mode<presentation>%     {     \usetheme{Madrid}%     \setbeamercovered{transparent}     }          \makeatletter        \newcommand\myFont{\@setfontsize\myFont{6pt}{7}}     \makeatother          \usepackage[utf8x]{inputenc}     \usepackage[MeX]{polski}          \usepackage{pgf}     \usepackage{tikz}     \usetikzlibrary{%       arrows,%       shapes.misc,%       shapes.arrows,%       positioning,% wg. " of "       scopes,%       decorations.pathmorphing,%       shadows%     }          \usepackage{amsmath}     \usepackage{tgheros}     \renewcommand*\familydefault{\sfdefault}           \title[Example]%     {\textbf{How to get better leading in node}} %     \subtitle{}%     \author[]%     {Foo Bar}%     \institute[of Beamer]%     {      %     }     \date[\today]%     {}%          \subject{Talks}%          \definecolor{niebieski}{HTML}{aac9cb}     \definecolor{szary}{HTML}{7a7a7a}          \tikzstyle{kwadrat}=[rectangle, rounded corners=2pt, thin, black,top color=white, bottom color=niebieski, draw=szary, text= black, minimum width=2.5cm, minimum height=0.5cm, drop shadow, text width = 2.5cm, text badly centered, inner ysep=-2pt, ]          \begin{document}     \begin{frame}     {\myFont \textbf{SOME TEXT}}      \vspace{2pt}           \begin{tikzpicture}[node distance=3cm]          \node[kwadrat,](m1){\tiny d};          \node[kwadrat, right of=m1] (p1){\tiny c};          \node[kwadrat, right of=p1] (k1) {\tiny b};          \node[kwadrat, right of=k1] (a1) {\tiny a};      \end{tikzpicture}      \vspace{10pt}           {\myFont \textbf{SOME TEXT}}      \vspace{2pt}           \begin{tikzpicture}[node distance=3cm]          \node[kwadrat, below of=m1](m2){\tiny D};          \node[kwadrat, right of=m2] (p2){\tiny C};          \node[kwadrat, right of=p2] (k2) {\tiny THE PROBLEM IS HERE TOO MUCH SPACE BETWEEN LINES OF TEXT};          \end{tikzpicture}       \vspace{10pt}           {\myFont \textbf{SOME TEXT}}       \vspace{2pt}           \begin{tikzpicture}[node distance=3cm]          \node[kwadrat,](m1){\tiny A};          \node[kwadrat, right of=m1] (p1){\tiny B};          \node[kwadrat, right of=p1] (k1) {\tiny C};          \node[kwadrat, right of=k1] (a1) {\tiny D};       \end{tikzpicture}           \end{frame}      \end{document}


title: Biblatex: How to manipulate citestyle/bibstyle?

text: Do you have any advices how to costumize the citestyle (analog: bibstyle) in biblatex? Namely I want to replace e.g. `alphabetic` by `myAlphabetic` which results for               author = {Mihalas, Dimitri and Weibel Mihalas, Barbara}      not in `[MW84]` but in `[Mih1984]` or `[Mih84]`. Always use 3 starting letters of 1st author; if its name is shorter, e.g. `Lu`, it should be something like `[Lu84]`. Thanks a lot!


title: A compatibility problem between the fontspec package and asymptote

text: Has anyone run across a compatibility issue between the `fontspec` package and `asymptote`? In the MWE below, commenting out the `\usepackage{fontspec}` allows for proper compilation and embedding of the 3D asymptote manipulative. Without commenting out the fontspec package, I receive errors like               "Latex Error: ./untitled-1.tex:1 LaTeX Error: Can be used only in preamble.           Latex Error: ./untitled-1.tex:9 Undefined control sequence."      and while the manipulative is embedded in the output, there's the word `everypage` embedded as well.               \documentclass{article}     \usepackage{fontspec}     %\setmainfont[ItalicFont={Calibri Italic}]{Cambria}     \usepackage{asymptote}     \begin{document}     \section{Basic Definitions}     We start with the real numbers      \begin{center}     \begin{asy}          import solids;         import three;         import graph3;         size(14cm,0);         currentlight=Viewport;         currentprojection=perspective(4,-4,3);         material Gray=material(heavygray+opacity(0.75),emissivepen=heavygray,ambientpen=heavygray);         material Blue=material(blue+opacity(0.75),emissivepen=blue);         surface y=shift((-.5,0,0))*unitplane;         draw(scale3(6)*y,Gray);         draw((0,3,2)--(2,3,0),linewidth(2));         surface r=shift((0,3,1))*unitsphere;         draw(surface(r),Blue,render(merge=true));     \end{asy}     \end{center}     \end{document}


title: How to typeset - - with lstlisting package?

text: Consider this small example:               \documentclass[a4paper,10pt]{article}     \usepackage[utf8x]{inputenc}     \usepackage{listings} %for listings of the source code          \begin{document}          \lstset{language=sh}     \begin{lstlisting}     --   <-- Works!     a--b <-- Does not work!     -{}- <-- Won't help!     \end{lstlisting}          \end{document}      How to force `lstlisting` to typeset `--` instead of a long dash always? Also, how to increase distance between two consecutive dashes?


title: Rectangular diagram with TikZ

text: I have a problem with getting rectangular diagrams in LaTeX. For example, the diagram below gives a diagram which looks like a trapezium. What do I need to change to get what I want ?               \begin{center}     \begin{tikzpicture}       % Tell it where the nodes are       \node (A) {$short expression$};       \node (B) [below=of A] {$long expression$};       \node (C) [right=of A] {$short expression$};       \node (D) [right=of B] {$long expression$};       % Tell it what arrows to draw       \draw[-stealth] (A)-- node[left] {} (B);       \draw[stealth-] (B)-- node [below] {} (D);       \draw[stealth-] (A)-- node [above] {} (C);       \draw[-stealth] (C)-- node [right] {} (D);,     \end{tikzpicture}     \end{center}


title: How do I insert the section name into the header?

text: I'm trying to use `fancyhdr` to put the current section name into my header, but the below code just returns a blank header. I can display the current page number without a problem.               \documentclass[paper=a4,fontsize=11pt]{scrartcl}     \usepackage[letterspace=150]{microtype}     \usepackage{sectsty}     \usepackage{parskip}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \chead{\rightmark}     \renewcommand{\headrulewidth}{0pt}          \begin{document}     \section*{sect.name}     \subsection*{sub.sect.name.a}     \section*{sub.sect.name.b}     \end{document}      What is the correct way to do this?


title: How to draw a Tikz chart of modular files?

text: I want to draw a small chart showing a modular C++-program. I don't know where to start.               +-------------\  **    +------------\        + compiled src --+     | module.hpp  |\   **  | main.cpp   |\       |                |     +-------------+-+    **+------------+-+      | void func()    |     |               |      | #include "...|  ==> | int main() {   |     | void func();  |    **| int main() { |      |   ...          |     |               |  **  |   ...        |      |                |     +---------------+**    +--------------+      +----------------+      The `module.hpp` should visually "go into" the `#include`-line in `main.cpp`, so I thought about connecting lines that I draw as `**`-lines. I will replace the text in the boxes with a bit better text, and probably add another box to the right for the applied compiler. I can not think of what should be nodes here.


title: Listings, problem with rendering embedded strings

text: this is my style defined for C#:               \lstdefinestyle{CSharp}{       language=[Sharp]C       ,captionpos=b       ,columns=fixed       ,morekeywords={var,get,set}       ,basicstyle=\footnotesize\ttfamily        ,keywordstyle=\color{blue}       ,commentstyle=\color{ForestGreen}       ,stringstyle=\color{BrickRed};       ,breaklines=true       ,tabsize=1       ,showstringspaces=false       ,showspaces=false       ,showtabs=false       ,breakatwhitespace=true       ,escapeinside={(*@}{@*)}       ,emph={double,bool,int,unsigned,char,true,false,void,get,set}       ,emphstyle=\color{blue}       ,lineskip={-1.5pt} % single line spacing     }      The problem is that for some reason, when the embedded strings are rendered, they look like this:               Console.WriteLine(;";S;:;String;");      but should:               Console.WriteLine("S:String");      I would appreciate any help.


title: Setting up the appendix with memoir

text: I need some help setting up the layout for the appendix of a Thesis template I am working with Memoir Class. Before the appendix all the document have the following format > Top, right and bottom margins 1in Left margin 1.5in Type Bock Size 9in > Distance from chapter title and top of the page 2in The problem now is that on the appendix they are asking for something a little different > Top, right and bottom margins 1in Left margin 1.5in Distance from chapter > title and top of the page 1in (Same font size as text) Any successive pages from the appendix should have in the top Appendix A (cont.) and they should be 1in from the top of the page. I have tried many things without success. I will like to know if you have any ideas on how to solve this.


title: How to understand the LaTeX warning “there were undefined references”?

text: I am running this LaTeX file through `pdflatex` and getting these warnings: > latex warning: there were undefined references.   >  latex warning: label(s) may have changed. Rerun to get cross-reference > right. and also some more warnings like this: > latex warning: reference 'lastpage' on page 76 undefined on input line 3200. on every page end. My LaTeX file is like this               \documentclass[a4paper,leqno,twoside]{article}          \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     \usepackage{multirow}          \renewcommand{\familydefault}{\sfdefault}          \usepackage{color}     \usepackage[colorlinks=true]{hyperref}     \usepackage{draftwatermark}     \SetWatermarkText{EXPERIMENTAL}      \SetWatermarkScale{0.6}      \usepackage{parskip}           \graphicspath{{Figure/}}            \let\oldsection\section      \renewcommand{\section}{\clearpage\oldsection}       \begin{document}                      % Issued by {Name, acronym, department, phone}      \issuedby{vrebwr}      % Checked by       \checkedby{-}       % Approved by      \approvedby{-}       % Document title. Use \doctitleShort{} to insert a shorter title in the header.       \doctitle{test numbers with id}       \doctitleShort{document for tests}       % Publish date      \publishdate{\today}                 % Titlepage      \frontmatter % Should be on first page      \maketitle                     \vspace*{08eX}       \begin{center}        \subsection*{Abstract}        \end{center}            \noindent          it contains information about tests.        \newpage         \mainmatter         % Main pages. This command should be on page 2 or later.         \phantom{phantom}        \cleardoublepage             \subsection*{Change Record}            \begin{itemize}       \item R.1: Initial version.        \begin{itemize}       \item  generation of documentation using the vrebwr         \end{itemize}        \end{itemize}              \cleardoublepage            \setcounter{tocdepth}{2}         \tableofcontents              \cleardoublepage             \section{ How to read the tset information}             \begin{enumerate}          \item information how to read         \item information of tests         \end{enumerate}              \section{test numbers}             \subsection*{1, temperature sensor. }        \addcontentsline{toc}{subsection}{ 1, temperature sensor.}        \subsubsection*{data}        some data regarding test where we performed        \subsubsection*{values}        temperature sensor value here three or more.         \subsubsection*{reason}            why we get like this.          \newpage              \subsection*{2, humidity sensor. }         \addcontentsline{toc}{subsection}{ 2, humidity sensor.}        \subsubsection*{data}        some data regarding test where we performed        \subsubsection*{values}        humidity sensor value here three or more.         \subsubsection*{reason}             why we get like this.            \subsection*{3, pressure sensor. }        \addcontentsline{toc}{subsection}{ 3, pressure sensor.}        \subsubsection*{data}        some data regarding test where we performed        \subsubsection*{values}        pressure sensor value here three or more.        \subsubsection*{reason}          why we get like this.        \newpage       \end{document}      In the above LaTeX file I have around 100 tests. I used the `*` symbol to eliminate numbering in subsections, because I am using test names with number so there is no need to add numbering. It looks bad in the PDF, so I tried to add that test name and number in table of contents by using this command:               \addcontentsline{toc}{subsection}{1,temperature sensor.}      When I used this command I am getting errors like as I explained above. I searched and I found some reasons why this error occurred, because of `\label{}` and `\ref{}` is not used like that. But I don't know how to use that in my file. Can anyone help me with it?


title: Why does \begin{align} &&&\cr \end{align} give "Missing number"?

text: Consider the following MWE:               \documentclass{article}     \usepackage{amsmath,bbm}          \begin{document}          \begin{align}       &&&\cr     \end{align}          \end{document}      It generates both the "Missing number, treated as zero" and "Illegal unit of measure (pt inserted)" error messages. Why? (My goal is to have 2 spaced equations on one line but no equation number for that line. I realize I can accomplish this with something like `\begin{align} \nonumber a&=1 & b&=2\\ c\end{align}` but why is this necessary?)


title: TeXworks: synctex works only partially

text: I've got a document that compiles without error or warnings (and looks about right) but for some segments of the document synctex doesn't seem to be working. What could be wrong? The document consists of one root `.tex` file which `\input`s a bunch of others. Synctex works for all these sub-documents - except for one. In practice, this means I can Ctrl-Click in the viewer and find the appropriate spot both in parts of the text before and after this particular subdocument. Conversely, I can Ctrl-Click in the editor and jump to the right spot in the view in all subdocuments but this one. However, when I Ctrl-Click on a part of the output corresponding to this particular subdocument I get the following error popup: `Cannot read file "E:/emn/uni/Thesis/doc": Access is denied.` in the TeXworks viewer. The path in this error message exists but is a directory: namely the one containing the tex files.   * All filenames consist of only latin letters, numbers, and underscores and the extension `.tex`. The problematic file is called `G2MLVQ_9_Refinements.tex` whereas a (working) file is called `G2MLVQ_7_Implementation.tex`   * I can't make a small example which fails - small examples don't fail; however the order of files seems to matter, so perhaps something in an earlier file is affecting synctex later on... (once I've isolated this, I'll update the question).   * Concerns MiKTeX 2.9 and the bundled TeXworks version 0.4.3 r.857. I'm stumped: what could be going wrong? **Edit:** user59152 tried to isolate the error: > It is virtually impossible to create a minimum working example (MWE) for > this problem, so I have posted a "jing" (screencast) movie illustrating the > error. You can see the file names at the tops of the windows. The one being > edited (`Introduction.tex`) comes BEFORE the file that can't be opened using > inverse search (`SourceAndSinkFreeContinuumRVtracking.tex`). The > screencapture movie confirms that `\clearpage` restores inverse search > capability, but fouls up the layout of the document, so this problem appears > to remain unsolved. I'm using TeXworks version 0.4.4 r.1003 and MikTex 2.9.


title: How to turn off firstinits for a single entry with biblatex?

text: I have taken the data from the Steel Statistical Yearbooks (from each of them from 1978--2011) and made various plots from it. Naturally I want to cite it. Reading the biblatex documentation, I've chosen the mvreference as the entry type. This is what my `.bib` entry looks like:               @mvreference{worldsteel,         shorthand={WSA78},         editor={World Steel Association},         title={Steel Statistical Yearbook},         year={1978-2011}     }      Now, since I also have the `firstinits=true` option set in biblatex, the entry looks like this: ![Bibliography Entry](http://i.stack.imgur.com/fw7s2.jpg) I would perfere it to be spelled out. Additionally, or perhaps this should have been my main question, what should the bibliography entry be for something like this?


title: Remove space before punctuation

text: I need to remove locally spaces arround (especially before) punctuation signs. This spaces are added by french polyglossia.               \documentclass{article}     \usepackage{fontspec}     \usepackage{polyglossia}     \setmainlanguage{french}          \newcommand{\nospace}[1]{\texttt{#1}}          \begin{document}     \nospace{a:b}     \end{document}      ![space to remove](http://i.stack.imgur.com/yxBFY.png) Thanks for help.


title: Including multiple figures/subfigures within an fbox (minipage)

text: From what I understand, it's pretty much impossible to include floats within an fbox/minipage. I basically want a paragraph of framed text with a couple of subfigures included within the frame. Any ideas as to how I might implement this?


title: How to use \pdfcolorstack?

text: Consider this code:               \chardef\Color=\pdfcolorstackinit page direct{0 g}     \pdfcolorstack \Color push {1 0 0 rg 1 0 0 RG}     red     \pdfcolorstack \Color pop {}     black     \hrule height 1pt width 50pt          \bye      I try to use the color stack to write "red" in red and switch back to the previous color (black) and write the word "black" in that color (works fine). But why is the `\hrule` still affected by the color switch? Obviously I don't know how to use `\pdfcolorstack`, but what is the intended semantic? I'd like to keep `1 0 0 RG` as I also want to set the color for stroking operations. ![enter image description here](http://i.stack.imgur.com/I1IkO.png)


title: encoding problem with \verbatiminput : Package inputenc Error: Unicode char \u8: not set up for use with LaTeX

text: I'm trying to import some logs files using \verbatiminput to do a automatic report from our logs. I got some encoding problem. My objective: import some logs files with various special char (included hidden one) as verbatim.   * I believed the file to be in ISO-8859-1. (the server OS is windows)   * I got a LOT of file. So the usual solution "rewrite it"/"look for the faulty char" is not an option.   * I run pdflatex from a mac osx.   * I converted the files with (notice the -c option to drop faulty char) .               for file in ./test*/*.txt     do       iconv -c -f ISO-8859-1 -t utf8 $file  > $file.n1       mv -f $file.n1 $file      done      My tex header:               \usepackage{verbatim}     \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}      error message I got :               ! Package inputenc Error: Unicode char \u8:° not set up for use with LaTeX.      To solve the "degree" problem, I added               cat $file.n1 | tr '°' 'º' > $file.n2      then I got an other error on an other file, this time with an invisible char.               ! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX.      I first tried to not convert the file and import them as T1/latin1 or LY1/ascinew, but I got the error               ! Package inputenc Error: Keyboard character used is undefined     (inputenc)                in inputencoding `latin1'.      on different files. My question:   * Is there a way to ignore/replace ALL the faulty char?    * from LaTeX ? from the shell ?    * using "tr" or "iconv" ?   * Am I doing something wrong when importing the files / doing the conversion?   * with which encoding will I have less problem ? any help is welcome, as I am blocked on this since two days. PS: My problem is not with the degree symbole in particular, but with unicode char that LaTeX cannot printout.


title: Text not spanning full page after wraptable

text: I wonder why latex doesn't go back to full textwidth after a table that was added in a wraptable? The actual code where I experience this problem is here: http://pastebin.com/CRjHMZdT I would expect, that after the table has been rendered to the right side of the page, the then following text is able to span the whole width of the page. Instead, this is what happens: ![output](http://i.stack.imgur.com/5fa64.jpg) ((On the following page, the text is set across the whole width again.))* I compile using               latex "${FILE}.tex"     dvips -Ppdf -o "${FILE}-pics.ps" "${FILE}.dvi"     ps2pdf -dAutoRotatePages=/None "${FILE}-pics.ps" "${FILE}-pics.pdf"     pdflatex "${FILE}.tex"      **EDIT** Ok, this* is not true, on the following pages, the text can't take up full textwidth, too. **EDIT 2** Ok, I tried to make a MWE from my original code which shows the same problem. This code now shows the same problem (and another one, something seems to be really wrong)               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{wrapfig}     \begin{document}     \begin{wraptable}{r}{5cm}       \centering       \begin{tabular}{|c|c|c|c|}         \hline         $i$ & $NW_{i1}$ & $NW_{i2}$ & $NW_{i3}$ \\\hline\hline         0 & 0 & 0 & 0 \\\hline         1 & 0 & 0 & 1 \\\hline            \end{tabular}       \caption{Some table}     \end{wraptable}          \section*{A section}     \subsection*{subsections are nice}     Some text.          \begin{wraptable}{l}{5cm}       \centering       \begin{tabular}{|c|c|}         \hline         $NW_i$ & $CW_i$ \\\hline\hline         000 & 00000 \\\hline         001 & 10111 \\\hline         010 & 10010 \\\hline         011 & 00101 \\\hline         100 & 01100 \\\hline         101 & 11011 \\\hline         110 & 11110 \\\hline         111 & 01001 \\\hline       \end{tabular}       \caption{table two}     \end{wraptable}               \subsection*{the next subsection}     text.          \begin{wraptable}{r}{8cm}       \centering       %\renewcommand\arraystretch{1.3}% (MyValue=1.0 is for standard spacing)        \begin{tabular}{|c|c|}         \hline         $w$ & $A(w)$ \\\hline\hline         0 & $\frac{0}{8}$ \\\hline         1 & $\frac{4}{8}$ \\\hline            \end{tabular}       \caption{table 3}     \end{wraptable}               \subsection*{another subsection}     even more text.          \subsection*{yeah}     i want more more more more more more more more more more more more more more     more more more more more more more more more more more more more more more more     more and even more more more more more more more more more more more more more     more more more text.                         \section*{another section in the wall}     text          \subsection*{yeah}     i want more more more more more more more more more more more more more more     more more more more more more more more more more more more more more more more     more and even more more more more more more more more more more more more more     more more more text.     \end{document}      (Pasting code here is not much fun, btw) It doesn't matter if I change the tables ordering, e.g. moving the second table to the third tables position and the third table up the the former second tables position doesn't change anything. **EDIT 3** Ok, making the example more minimal (stripping out math mode, babel package, centering, caption) is possible, too. Also compiling with pdflatex AND latex gives the same result. What is wrong here? **EDIT 4** Not using the star version of section and subsection "solves" the issue. I don't think that this is a feature, it seems more like a bug to me?


title: Aligning caption of subfigure with math environmenth to the bottom

text: I was trying to align the subcaption letter of a subfigure that contains a math environment using temporal boxes, to align it vertically to the biggest one. However, when I do it the subcaption letter moves to the side. ![error image](http://i.stack.imgur.com/a10rZ.png) What I'm doing wrong? I want to have the third expression align to the middle (vertically) and the three caption letter to appear align horizontally.               \documentclass[twocols]{article}     \usepackage{amsmath}     \usepackage{subfig}     \begin{document}          \newbox{\tmpbox}     \begin{figure}     \sbox{\tmpbox}{$%     \begin{bmatrix}%     1 & 2 & 3\\     1 & 2 & 3\\     1 & 2 & 3     \end{bmatrix}%     $}%     \subfloat[]{%     \usebox{\tmpbox}\label{fig:ex-a}%     }     \subfloat[]{%     \label{fig:ex-b}     $     \begin{bmatrix}     1 & 2 & 3\\     1 & 2 & 3\\     1 & 2 & 3     \end{bmatrix}     $     }%     \subfloat[]{%     \vbox to \ht\tmpbox{%     \vfill%     $\overbrace{123}^{x}\overbrace{45}^{y}\overbrace{67}^{z}$%     \vfill}\label{fig:ex-c}%     }     \caption{My caption.}     \label{fig:ex}     \end{figure}          \end{document}


title: \mode<presentation> between two frames in beamerarticle

text: There is a minimal code of what I want to do :               \documentclass{beamer}     \begin{document}     \begin{frame}     text 1     \mode<presentation>{     \end{frame}     \begin{frame}     }     text 2     \end{frame}     \end{document}      I get the following error :               ! Extra }, or forgotten \endgroup.      In my mind, I thought it would the same than :               \documentclass{beamer}     \begin{document}     \begin{frame}     text 1     \end{frame}     \begin{frame}     text 2     \end{frame}     \end{document}      EDIT : I want to have a document and a presentation. The document works well :               \documentclass{article}     \usepackage{beamerarticle}     \begin{document}     \begin{frame}         \begin{block}{Block title}             text1\newline             \uncover<2->{text2}\newline             text3\newline     \mode<presentation>{         \end{block}     \end{frame}     \begin{frame}         \begin{block}     }             \noindent text4\newline             \uncover<2->{text5}\newline             text6\newline         \end{block}     \end{frame}     \end{document}      But the presentation doesn't :               \documentclass{beamer}     \begin{document}     \begin{frame}         \begin{block}{Block title}             text1\newline             \uncover<2->{text2}\newline             text3\newline     \mode<presentation>{         \end{block}     \end{frame}     \begin{frame}         \begin{block}     }             \noindent text4\newline             \uncover<2->{text5}\newline             text6\newline         \end{block}     \end{frame}     \end{document}      I don't want to use [allowframebreaks] because the \uncover command doesn't works with... I don't want to create two blocks because it will create two blocks in the document I want all the text in one block for the document and half the text in one block in the presentation and half the text in one other block on one other frame... This in order to be able to use \uncover command


title: Placement of caption in \chemfig via \chemname command - how to reset spacing

text: I'm trying to put a number of different molecule structures into one document with the help of the chemfig package. The package also allows to add the name of the compound to the structure as a caption via the chemname command. As far as I understand the distance of the label from the structure is measured by the package and to avoid overlaps the largest spacing found is used for all subsequent labels. This leads to the effect of a large distance if the following molecule structure is small. Is there a way to reset the distance measured between the `\chemname` commands? Thank you very much for your help and please also see the example code below. Thomas               \documentclass{article}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{chemfig}     \begin{document}     \chemname{\chemfig{-[7]-[1]P(=[2]O)(-[6]-[7])-[7]-[1]}}{Triethylphosphine oxide}          \chemname{\chemfig{-[1](-[2]OH)-[7]}}{Isopropanol}          \chemname{\chemfig{H_2N-[1](=[2]O)-[7]NH_2}}{Urea}     \end{document}


title: PGFPlots: Change the color of axis lines

text: I want to change the color of the axis lines only without changing the color of the axis labels, tick labels etc. **MWE:**               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     %     \begin{document}     %       \pgfplotsset{         every axis/.append style={%           red          }          }     %       \begin{tikzpicture}         \begin{axis}[%             xlabel={X},             ylabel={Y}           ]%           \end{axis}       \end{tikzpicture}     %     \end{document}      I am not aware of a `pgfkey` for axis lines only along the lines of `/pgfplots/tick style`.


title: Sorted list of publications in moderncv from bibtex

text: I am trying to create my CV in Latex, after I got fed up with MS Word. I decided to use this template, just because it looks nice. But now I am struggling to add the list of my publications (stored in a bibtex file). Ideally I would like the list to correspond to the overall layout of the document, so to be able to generate a list that looks like this:               \section{Publications}      \cvitem{2012}{Authors 1, title 1,\textit{Journal}, etc}      \cvitem{2011}{Authors 2, title 2,\textit{Journal}, etc}      If this is not possible, I would at least like to generate the entries using `apa` style from `natbib`, but sort them descending wrt the year of publication - because this seems more appropriate for a CV. How can I do it? EDIT: I tried to follow the approach to change one of the bst files, but I did it wrong for inproceedings. An example tex file is:               \documentclass{moderncv}     \moderncvstyle{classic}       \moderncvcolor{blue}                 \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @INPROCEEDINGS{a,       author = {B},       title = {C},       booktitle = {D},       year = {2004},       pages = {373-385},       publisher = {Springer},     }     \end{filecontents}          \firstname{E}     \familyname{Xample}     \begin{document}          \section{Publications}     \nocite{*}     \bibliographystyle{moderncv}     \bibliography{\jobname}     \end{document}      and the bst file I am using is (sorry for the big file):               ENTRY       { address         author         booktitle         chapter         edition         editor         howpublished         institution         journal         key         month         note         number         organization         pages         publisher         school         series         title         type         volume         year       }       {}       { label }          INTEGERS { output.state before.all mid.sentence after.sentence after.block }          FUNCTION {init.state.consts}     { #0 'before.all :=       #1 'mid.sentence :=       #2 'after.sentence :=       #3 'after.block :=     }          STRINGS { s t }          FUNCTION {output.nonnull}     { 's :=       output.state mid.sentence =         { ", " * write$ }         { output.state after.block =             { add.period$ write$               newline$               "\newblock " write$             }             { output.state before.all =                 'write$                 { add.period$ " " * write$ }               if$             }           if$           mid.sentence 'output.state :=         }       if$       s     }          FUNCTION {output}     { duplicate$ empty$         'pop$         'output.nonnull       if$     }          FUNCTION {output.check}     { 't :=       duplicate$ empty$         { pop$ "empty " t * " in " * cite$ * warning$ }         'output.nonnull       if$     }          FUNCTION {output.bibitem}     { newline$       "\cvitem{" write$       year write$       "}" write$       newline$       ""       before.all 'output.state :=     }          FUNCTION {fin.entry}     { add.period$       write$       newline$     }          FUNCTION {new.block}     { output.state before.all =         'skip$         { after.block 'output.state := }       if$     }          FUNCTION {new.sentence}     { output.state after.block =         'skip$         { output.state before.all =             'skip$             { after.sentence 'output.state := }           if$         }       if$     }          FUNCTION {not}     {   { #0 }         { #1 }       if$     }          FUNCTION {and}     {   'skip$         { pop$ #0 }       if$     }          FUNCTION {or}     {   { pop$ #1 }         'skip$       if$     }          FUNCTION {new.block.checka}     { empty$         'skip$         'new.block       if$     }          FUNCTION {new.block.checkb}     { empty$       swap$ empty$       and         'skip$         'new.block       if$     }          FUNCTION {new.sentence.checka}     { empty$         'skip$         'new.sentence       if$     }          FUNCTION {new.sentence.checkb}     { empty$       swap$ empty$       and         'skip$         'new.sentence       if$     }          FUNCTION {field.or.null}     { duplicate$ empty$         { pop$ "" }         'skip$       if$     }          FUNCTION {emphasize}     { duplicate$ empty$         { pop$ "" }         { "{\em " swap$ * "}" * }       if$     }          INTEGERS { nameptr namesleft numnames }          FUNCTION {format.names}     { 's :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=           nameptr #1 >             { namesleft #1 >                 { ", " * t * }                 { numnames #2 >                     { "," * }                     'skip$                   if$                   t "others" =                     { " et~al." * }                     { " and " * t * }                   if$                 }               if$             }             't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$     }          FUNCTION {format.authors}     { author empty$         { "" }         { author format.names }       if$     }          FUNCTION {format.editors}     { editor empty$         { "" }         { editor format.names           editor num.names$ #1 >             { ", editors" * }             { ", editor" * }           if$         }       if$     }          FUNCTION {format.title}     { title empty$         { "" }         { title "t" change.case$ }       if$     }          FUNCTION {n.dashify}     { 't :=       ""         { t empty$ not }         { t #1 #1 substring$ "-" =             { t #1 #2 substring$ "--" = not                 { "--" *                   t #2 global.max$ substring$ 't :=                 }                 {   { t #1 #1 substring$ "-" = }                     { "-" *                       t #2 global.max$ substring$ 't :=                     }                   while$                 }               if$             }             { t #1 #1 substring$ *               t #2 global.max$ substring$ 't :=             }           if$         }       while$     }          FUNCTION {format.date}     { year empty$         { month empty$             { "" }             { "there's a month but no year in " cite$ * warning$               month             }           if$         }         { month empty$             'year             { month " " * year * }           if$         }       if$     }          FUNCTION {format.btitle}     { title emphasize     }          FUNCTION {tie.or.space.connect}     { duplicate$ text.length$ #3 <         { "~" }         { " " }       if$       swap$ * *     }          FUNCTION {either.or.check}     { empty$         'pop$         { "can't use both " swap$ * " fields in " * cite$ * warning$ }       if$     }          FUNCTION {format.bvolume}     { volume empty$         { "" }         { "volume" volume tie.or.space.connect           series empty$             'skip$             { " of " * series emphasize * }           if$           "volume and number" number either.or.check         }       if$     }          FUNCTION {format.number.series}     { volume empty$         { number empty$             { series field.or.null }             { output.state mid.sentence =                 { "number" }                 { "Number" }               if$               number tie.or.space.connect               series empty$                 { "there's a number but no series in " cite$ * warning$ }                 { " in " * series * }               if$             }           if$         }         { "" }       if$     }          FUNCTION {format.edition}     { edition empty$         { "" }         { output.state mid.sentence =             { edition "l" change.case$ " edition" * }             { edition "t" change.case$ " edition" * }           if$         }       if$     }          INTEGERS { multiresult }          FUNCTION {multi.page.check}     { 't :=       #0 'multiresult :=         { multiresult not           t empty$ not           and         }         { t #1 #1 substring$           duplicate$ "-" =           swap$ duplicate$ "," =           swap$ "+" =           or or             { #1 'multiresult := }             { t #2 global.max$ substring$ 't := }           if$         }       while$       multiresult     }          FUNCTION {format.pages}     { pages empty$         { "" }         { pages multi.page.check             { "pages" pages n.dashify tie.or.space.connect }             { "page" pages tie.or.space.connect }           if$         }       if$     }          FUNCTION {format.vol.num.pages}     { volume field.or.null       number empty$         'skip$         { "(" number * ")" * *           volume empty$             { "there's a number but no volume in " cite$ * warning$ }             'skip$           if$         }       if$       pages empty$         'skip$         { duplicate$ empty$             { pop$ format.pages }             { ":" * pages n.dashify * }           if$         }       if$     }          FUNCTION {format.chapter.pages}     { chapter empty$         'format.pages         { type empty$             { "chapter" }             { type "l" change.case$ }           if$           chapter tie.or.space.connect           pages empty$             'skip$             { ", " * format.pages * }           if$         }       if$     }          FUNCTION {format.in.ed.booktitle}     { booktitle empty$         { "" }         { editor empty$             { "In " booktitle emphasize * }             { "In " format.editors * ", " * booktitle emphasize * }           if$         }       if$     }          FUNCTION {empty.misc.check}     { author empty$ title empty$ howpublished empty$       month empty$ year empty$ note empty$       and and and and and       key empty$ not and         { "all relevant fields are empty in " cite$ * warning$ }         'skip$       if$     }          FUNCTION {format.thesis.type}     { type empty$         'skip$         { pop$           type "t" change.case$         }       if$     }          FUNCTION {format.tr.number}     { type empty$         { "Technical Report" }         'type       if$       number empty$         { "t" change.case$ }         { number tie.or.space.connect }       if$     }          FUNCTION {format.article.crossref}     { key empty$         { journal empty$             { "need key or journal for " cite$ * " to crossref " * crossref *               warning$               ""             }             { "In {\em " journal * "\/}" * }           if$         }         { "In " key * }       if$       " \cite{" * crossref * "}" *     }          FUNCTION {format.crossref.editor}     { editor #1 "{vv~}{ll}" format.name$       editor num.names$ duplicate$       #2 >         { pop$ " et~al." * }         { #2 <             'skip$             { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =                 { " et~al." * }                 { " and " * editor #2 "{vv~}{ll}" format.name$ * }               if$             }           if$         }       if$     }          FUNCTION {format.book.crossref}     { volume empty$         { "empty volume in " cite$ * "'s crossref of " * crossref * warning$           "In "         }         { "Volume" volume tie.or.space.connect           " of " *         }       if$       editor empty$       editor field.or.null author field.or.null =       or         { key empty$             { series empty$                 { "need editor, key, or series for " cite$ * " to crossref " *                   crossref * warning$                   "" *                 }                 { "{\em " * series * "\/}" * }               if$             }             { key * }           if$         }         { format.crossref.editor * }       if$       " \cite{" * crossref * "}" *     }          FUNCTION {format.incoll.inproc.crossref}     { editor empty$       editor field.or.null author field.or.null =       or         { key empty$             { booktitle empty$                 { "need editor, key, or booktitle for " cite$ * " to crossref " *                   crossref * warning$                   ""                 }                 { "In {\em " booktitle * "\/}" * }               if$             }             { "In " key * }           if$         }         { "In " format.crossref.editor * }       if$       " \cite{" * crossref * "}" *     }          FUNCTION {article}     { output.bibitem       "{" write$       format.authors "author" output.check        format.title "title" output.check       journal emphasize "journal" output.check       format.vol.num.pages output       fin.entry       "}" write$     }          FUNCTION {book}     { output.bibitem       author empty$         { format.editors "author and editor" output.check }         { format.authors output.nonnull           crossref missing$             { "author and editor" editor either.or.check }             'skip$           if$         }       if$       new.block       format.btitle "title" output.check       crossref missing$         { format.bvolume output           new.block           format.number.series output           new.sentence           publisher "publisher" output.check           address output         }         { new.block           format.book.crossref output.nonnull         }       if$       format.edition output       format.date "year" output.check       new.block       note output       fin.entry     }          FUNCTION {booklet}     { output.bibitem       format.authors output       new.block       format.title "title" output.check       howpublished address new.block.checkb       howpublished output       address output       format.date output       new.block       note output       fin.entry     }          FUNCTION {inbook}     { output.bibitem       author empty$         { format.editors "author and editor" output.check }         { format.authors output.nonnull           crossref missing$             { "author and editor" editor either.or.check }             'skip$           if$         }       if$       new.block       format.btitle "title" output.check       crossref missing$         { format.bvolume output           format.chapter.pages "chapter and pages" output.check           new.block           format.number.series output           new.sentence           publisher "publisher" output.check           address output         }         { format.chapter.pages "chapter and pages" output.check           new.block           format.book.crossref output.nonnull         }       if$       format.edition output       format.date "year" output.check       new.block       note output       fin.entry     }          FUNCTION {incollection}     { output.bibitem       format.authors "author" output.check       new.block       format.title "title" output.check       new.block       crossref missing$         { format.in.ed.booktitle "booktitle" output.check           format.bvolume output           format.number.series output           format.chapter.pages output           new.sentence           publisher "publisher" output.check           address output           format.edition output           format.date "year" output.check         }         { format.incoll.inproc.crossref output.nonnull           format.chapter.pages output         }       if$       new.block       note output       fin.entry     }          FUNCTION {inproceedings}     { output.bibitem       "{" write$       format.authors "author" output.check        format.title "title" output.check       format.in.ed.booktitle "booktitle" output.check       format.bvolume output       format.number.series output       format.pages output         address empty$           { organization output             publisher output           }           { address output.nonnull             organization output             publisher output           }         if$       fin.entry       "}" write$     }          FUNCTION {conference} { inproceedings }          FUNCTION {manual}     { output.bibitem       author empty$         { organization empty$             'skip$             { organization output.nonnull               address output             }           if$         }         { format.authors output.nonnull }       if$       new.block       format.btitle "title" output.check       author empty$         { organization empty$             { address new.block.checka               address output             }             'skip$           if$         }         { organization address new.block.checkb           organization output           address output         }       if$       format.edition output       format.date output       new.block       note output       fin.entry     }          FUNCTION {mastersthesis}     { output.bibitem       format.authors "author" output.check       new.block       format.title "title" output.check       new.block       "Master's thesis" format.thesis.type output.nonnull       school "school" output.check       address output       format.date "year" output.check       new.block       note output       fin.entry     }          FUNCTION {misc}     { output.bibitem       format.authors output       title howpublished new.block.checkb       format.title output       howpublished new.block.checka       howpublished output       format.date output       new.block       note output       fin.entry       empty.misc.check     }          FUNCTION {phdthesis}     { output.bibitem       format.authors "author" output.check       new.block       format.btitle "title" output.check       new.block       "PhD thesis" format.thesis.type output.nonnull       school "school" output.check       address output       format.date "year" output.check       new.block       note output       fin.entry     }          FUNCTION {proceedings}     { output.bibitem       editor empty$         { organization output }         { format.editors output.nonnull }       if$       new.block       format.btitle "title" output.check       format.bvolume output       format.number.series output       address empty$         { editor empty$             { publisher new.sentence.checka }             { organization publisher new.sentence.checkb               organization output             }           if$           publisher output           format.date "year" output.check         }         { address output.nonnull           format.date "year" output.check           new.sentence           editor empty$             'skip$             { organization output }           if$           publisher output         }       if$       new.block       note output       fin.entry     }          FUNCTION {techreport}     { output.bibitem       format.authors "author" output.check       new.block       format.title "title" output.check       new.block       format.tr.number output.nonnull       institution "institution" output.check       address output       format.date "year" output.check       new.block       note output       fin.entry     }          FUNCTION {unpublished}     { output.bibitem       "{" write$       format.authors "author" output.check        format.title "title" output.check       note "note" output.check       fin.entry       "}" write$     }          FUNCTION {default.type} { misc }          MACRO {jan} {"January"}          MACRO {feb} {"February"}          MACRO {mar} {"March"}          MACRO {apr} {"April"}          MACRO {may} {"May"}          MACRO {jun} {"June"}          MACRO {jul} {"July"}          MACRO {aug} {"August"}          MACRO {sep} {"September"}          MACRO {oct} {"October"}          MACRO {nov} {"November"}          MACRO {dec} {"December"}          MACRO {acmcs} {"ACM Computing Surveys"}          MACRO {acta} {"Acta Informatica"}          MACRO {cacm} {"Communications of the ACM"}          MACRO {ibmjrd} {"IBM Journal of Research and Development"}          MACRO {ibmsj} {"IBM Systems Journal"}          MACRO {ieeese} {"IEEE Transactions on Software Engineering"}          MACRO {ieeetc} {"IEEE Transactions on Computers"}          MACRO {ieeetcad}      {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}          MACRO {ipl} {"Information Processing Letters"}          MACRO {jacm} {"Journal of the ACM"}          MACRO {jcss} {"Journal of Computer and System Sciences"}          MACRO {scp} {"Science of Computer Programming"}          MACRO {sicomp} {"SIAM Journal on Computing"}          MACRO {tocs} {"ACM Transactions on Computer Systems"}          MACRO {tods} {"ACM Transactions on Database Systems"}          MACRO {tog} {"ACM Transactions on Graphics"}          MACRO {toms} {"ACM Transactions on Mathematical Software"}          MACRO {toois} {"ACM Transactions on Office Information Systems"}          MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}          MACRO {tcs} {"Theoretical Computer Science"}          READ          FUNCTION {sortify}     { purify$       "l" change.case$     }          INTEGERS { len }          FUNCTION {chop.word}     { 's :=       'len :=       s #1 len substring$ =         { s len #1 + global.max$ substring$ }         's       if$     }          FUNCTION {sort.format.names}     { 's :=       #1 'nameptr :=       ""       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { nameptr #1 >             { "   " * }             'skip$           if$           s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=           nameptr numnames = t "others" = and             { "et al" * }             { t sortify * }           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$     }          FUNCTION {sort.format.title}     { 't :=       "A " #2         "An " #3           "The " #4 t chop.word         chop.word       chop.word       sortify       #1 global.max$ substring$     }          FUNCTION {year.sort}     { year empty$         { key empty$             { "to sort, need year or key in " cite$ * warning$               ""             }             { key sortify }           if$         }         { year sort.format.names }       if$     }          FUNCTION {author.sort}     { author empty$         { key empty$             { "to sort, need author or key in " cite$ * warning$               ""             }             { key sortify }           if$         }         { author sort.format.names }       if$     }          FUNCTION {author.editor.sort}     { author empty$         { editor empty$             { key empty$                 { "to sort, need author, editor, or key in " cite$ * warning$                   ""                 }                 { key sortify }               if$             }             { editor sort.format.names }           if$         }         { author sort.format.names }       if$     }          FUNCTION {author.organization.sort}     { author empty$         { organization empty$             { key empty$                 { "to sort, need author, organization, or key in " cite$ * warning$                   ""                 }                 { key sortify }               if$             }             { "The " #4 organization chop.word sortify }           if$         }         { author sort.format.names }       if$     }          FUNCTION {editor.organization.sort}     { editor empty$         { organization empty$             { key empty$                 { "to sort, need editor, organization, or key in " cite$ * warning$                   ""                 }                 { key sortify }               if$             }             { "The " #4 organization chop.word sortify }           if$         }         { editor sort.format.names }       if$     }          FUNCTION {presort}     { type$ "book" =       type$ "inbook" =       or         'author.editor.sort         { type$ "proceedings" =             'editor.organization.sort             { type$ "manual" =                 'author.organization.sort                 'year.sort               if$             }           if$         }       if$       "    "       *       author field.or.null       sort.format.names       *       "    "       *       title field.or.null       sort.format.title       *       #1 entry.max$ substring$       'sort.key$ :=     }          ITERATE {presort}          SORT          STRINGS { longest.label }          INTEGERS { number.label longest.label.width }          FUNCTION {initialize.longest.label}     { "" 'longest.label :=       #1 'number.label :=       #0 'longest.label.width :=     }          FUNCTION {longest.label.pass}     { number.label int.to.str$ 'label :=       number.label #1 + 'number.label :=       label width$ longest.label.width >         { label 'longest.label :=           label width$ 'longest.label.width :=         }         'skip$       if$     }          EXECUTE {initialize.longest.label}          ITERATE {longest.label.pass}          FUNCTION {begin.bib}     {      }          EXECUTE {begin.bib}          EXECUTE {init.state.consts}          REVERSE {call.type$}          FUNCTION {end.bib}     {      }          EXECUTE {end.bib}


title: Need to remove comma after last author (only)

text: I'm trying to submit to a journal that has a non-standard bibliography format: citations look like this: > **Gordon, R. H., C.-E. Bai, and D. D. Li**. 1999. "Efficiency Losses from > Tax Distortions vs. Government Control," _European Economic Review_ , 43, > 1095-1103. Anyhow, using custom-bib I've almost got a `bst` file that works. I have two problems: 1) I have a trailing comma on the authors: e.g. > **Gordon, R. H., C.-E. Bai, and D. D. Li**., 1999. ... 2) I'm missing the comma between volume and page .e.g: > _European Economic Review_ , 43 1095-1103. I followed the instructions here to remove the comma after the last author here: remove comma after the last author But that resulted in removing all of the commas. Any suggestion on what to look for in the `bst` file would be helpful. I really don't understand `bst` files.


title: Cite Author's Full Name

text: I'd like to generate a linked citation with a full author's name. For instance, if I use               According to \citet{bob2000} apples are tasty.      And run with `hyperref`, I get the author's last name and a nice hyperlink to the bibliography. But I want the author's full name! How can I achieve this? (BibLaTeX is also an option, but equally mysterious on this point.)


title: Map marker symbol in TikZ (symbol with em and ex units doesn’t scale properly)

text: Since there is no map marker symbol in the symbols list (at least I could not find it) I decided to draw it with TikZ. This is it:               \documentclass{article}     \usepackage{tikz}         \newcommand{\point}{\tikz{            \draw [rounded corners,blue, fill=blue](0,0) .. controls (-.05em,.2ex) and (-.3em,1.2ex) .. (0em,2.2ex) .. controls (.3em,1.2ex) and (.05em,.2ex) .. (0,0);            \draw [blue,fill=white](0,1.15ex) circle (0.12em);}     }     \begin{document}     \tiny tiny \point text          \normalsize normal \point text          \Huge huge \point text     \end{document}      The problem is that it does not scale properly if I change the font size, for example `{\Large text \point text}` ![problem with scaling](http://i.stack.imgur.com/fBQHa.png) Do I need to draw a different symbol for each size I use or is there a way to let it scale properly?


title: Faulty right alignment for comments in algorithmic package

text: I'm trying to right align comments in a pseudocode environment using the algorithmic package. So I renewed the `algorithmiccomment` command. There's a different way to create comments for "normal" statements and for pre-defined statements such as "for", "if", etc. The problem is, that the right alignment differs for the "normal" comments and the others. How can that be fixed, so that all comments nicely align? Here's what I mean. ![Comments not really aligned well](http://i.stack.imgur.com/ZpfwJ.jpg) And this is the code to reproduce my example. Any help is greatly appreciated.               \documentclass[a4paper]{article}     \usepackage{algorithmic}     \renewcommand{\algorithmiccomment}[1]{\hfill \tiny//~#1\normalsize}          \begin{document}     \begin{algorithmic}     \FORALL[This comment is not quite right aligned]{ $a \in B$}         \STATE X  \COMMENT{This comment is further to the right}     \ENDFOR     \end{algorithmic}     \end{document}


title: How do you use § instead of page number?

text: I am using `biblatex`. When using the cite command `\cite[3]{xx}` I would like it to print `§ 3 xx` instead of `p.3 xx` for some citations. For others I want to cite pages. How can I do this?


title: Using multiple font types

text: I wish to use the font tgpagella without it being used throughout the entire document. How do I import this font into my document without causing it to be used by default?


title: How to reference figures by the order their reference appears in the text rather than the order the figure appears in the text

text: I have a two page document with three figures, A and B is small and C is big. Therefore in this document I have my text all on one page and then on the second page my three figures. To make best use of the space I have placed A and B at the top of the page (side by side) and C underneath them. However, this means that latex has labeled A as figure.1, B as figure.2 and C as figure.3 as this is the order they appear, but since my text talks about the figures in a difference order (A, C, B) this means that in my text the figure references are out of order as (Fig.1, Fig.3 and Fig.2). Is there anyway to get latex to label the figures by the order I reference them in the text rather than the way they physically appear in the document? I am including the figures in my text using:               \begin{Figure}      \includegraphics[width=0.7\textwidth, left]{Graphic}      \captionof{figure}{\scriptsize Figure A   }      \label{Figure A}     \end{Figure}


title: Superflous leading dot in biblatex/numeric and beamer

text: The combination of `beamer` and `biblatex` with the `numeric` style leads to an undesired dot and space at the beginning of `@MISC` entries. ![extra dot](http://i.stack.imgur.com/bHcwP.png)               \begin{filecontents}{mybib.bib}     @MISC{www,        title={TeX.SX},        url={www.tex.stackexchange.com},        urldate={2012-02-02},     }     \end{filecontents}          \documentclass{beamer}          \usepackage[backend=biber,style=numeric]{biblatex}     \addbibresource{mybib.bib}          \begin{document}     \frame{Test \cite{www}}          \frame{\printbibliography}     \end{document}      Since this only happens with `beamer` and not `scrarticle` I guess it’s a `beamer` problem/imcompability. Is it possible to fix it?


title: How do you get a BST file to support natbib cite* commands

text: I have heavily modified an existing _.bst_ file (`apalike2`) to get the format working perfectly. However, an editor I'm working with tells me that the first time a multi-author citation is used, I need to give all of the authors in the citation. I thought "no problem, I'll just add longnamesfirst". I tried that, and it didn't work, and further research leads me to find out that a _.bst_ file needs specific support for that feature to work, and `apalike` doesn't have that support. I have _used_ LaTeX for a long time, but am not an expert. The way that packages work internally have always been a mystery to me. I've managed to hack at the `apalike2` _.bst_ to get it to work how I want, but I can't find the hook to support `longnamesfirst`, or even the `*`-version of the `\cite` commands. If anyone can give me even a nudge in the right direction, I would appreciate it.


title: Specific arrow tip style for specific path

text: \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}          \begin{document}          \begin{tikzpicture}[scale=1.5,cap ,color= blue]           % grid     \draw[very thin,color = green,step = 0.5 cm, opacity= 0.9](0,0) grid (4, 4);          % axis      \draw[->]  [blue,  thick] ( 0,0) --( 4,0) node[right] {$x$};     \draw[->]  [blue,  thick] ( 0,0) --( 0,4) node[above] {$y$};     % how to change the arrow tip style at specific path     % how to set up unique arrow head as a decoration at (1,0) coordinate and at (0,1)      \draw[decoration={markings, mark=at position 0.5 with {\arrow [ ultra thick] {>}}},            postaction={decorate}]             (0,0)--( 2,0);     \draw[decoration={markings, mark=at position 0.5 with {\arrow [ ultra thick] {>}}},            postaction={decorate}]             (0,0)--( 0,2);     \end{tikzpicture}     \end{document}


title: Improvements on table of contents in classicthesis

text: I'm using `classicthesis` for my master degree dissertation and I'm having very hard time to make table of content more pleasing. What I have right now is this: ![enter image description here](http://i.stack.imgur.com/5uErq.png) and what I'm trying to achieve is a basic simple toc (something like the image below) ![enter image description here](http://i.stack.imgur.com/BgFqe.png) To be more precise, I don't want any `all caps`, bold face on chapter title and finally, proportional font size (contrary of what is now). Any guidelines or starting point for someone who is not a master of renewing commands? P.S. I like the title of the page (allcaps surrounded by lines) and the font of toc and I prefer not to change them. P.P.S. I'm using `classicthesis` with the following options:               \usepackage[linedheaders,pdfspacing,dottedtoc]{classicthesis}


title: Text width in one sided documents?

text: Example:               \documentclass[paper=a4, fontsize=10pt, parskip=half, DIV=9]{scrartcl}      _How do I calculate text width?_ In particular: I understand that `DIV=9` specifies that the page is divided into nine stripes, but how many are used for the border, in case the document is single sided? In the documentation I only found explanation for two sided documents. I measured text width with a ruler, and it's about: 14cm


title: How to make xparse play nicely inside another command?

text: I'm trying to define a command that inserts a space at the end if necessary, and then a starred version of the same command which does _not_ include a space at the end. I suspect that the problem has to do with `\xspace` being inside another command, but I have no idea how to fix it. Minimal example:               \documentclass{article}     \usepackage{xparse, xspace}          \NewDocumentCommand{\setInSC}{sm}{%       \textsc{#2}%       \IfBooleanTF{}{%         \xspace%       }%     }          \begin{document}          \setInSC{test}should be separated with a space          \setInSC*{test}should not be separated with a space          \end{document}


title: Can I make lyx produce double dollar signs instead of \[ and \] it currently produces for inline math?

text: I am using LyX to type answers and questions for Math.SE and many times I need to use use inline math (by writing two dollars signs instead of just the one, i.e $$). After finishing typing I copy the text from "body" view (so I can copy all of it at once) and paste it to the forum. The only problem is that for the opening instead of the double dollar signs I have [ and for the closing double dollar signs I have ] Then I go over all instances and changes them by hand. Can I make LyX use $$ ?


title: TeXLipse, Pygments and the minted package not working

text: I've got a little problem to get minted working on Mac OS X 10.8.3. Things I've installed:   * minted 1.7 (was already installed via TeX Live Utility)   * Python 2.7   * Pygments 1.6 (is in $PATH environment and can be called from everywhere in the terminal) For writing TeX-Code I'm using the Eclipse Plugin TeXLipse. For generating PDF output it uses XeLaTeX with the "--shell-escape" argument. For the following code i get the error message:               Package minted Error: You must have `pygmentize' installed to use this package.      The minimal code is:               \documentclass{article}     \usepackage{minted}          \begin{document}          \section{My sourcecode}     Code          \end{document}      Maybe someone has an idea how to get minted working. Thanks for that!


title: How to change letter spacing / condense letters together

text: I'm starting up with LaTeX today in order to be able to produce better-looking PDFs for university assignments. I'm working through a list of small exercises, handed out by a volunteer professor, and a certain one has stalled me a bit. This is what I'm supposed to have in my output: ![enter image description here](http://i.stack.imgur.com/588HV.png) So, to tackle it, here's the code I wrote:               \section{\gt Άσκηση 1η} \gt     \fontsize{14}{16.8} \selectfont Α     \fontsize{16}{19.2} \selectfont Β     \fontsize{20}{24}   \selectfont Γ     \fontsize{24}{28.8} \selectfont Δ     \fontsize{28}{33.6} \selectfont Ε     \fontsize{32}{38.4} \selectfont Ζ     \fontsize{36}{43.2} \selectfont Η     \fontsize{40}{48}   \selectfont Θ      \fontsize{44}{52.8} \selectfont Ι     \fontsize{40}{48}   \selectfont κ     \fontsize{36}{43.2} \selectfont λ     \fontsize{32}{38.4} \selectfont μ     \fontsize{28}{33.6} \selectfont ν     \fontsize{24}{28.8} \selectfont ξ     \fontsize{20}{24}   \selectfont ο     \fontsize{16}{19.2} \selectfont π      The output is, of course, the following: ![enter image description here](http://i.stack.imgur.com/0fBoy.png) Obviously I still have to do something for the letter spacing, condense them together. I've gone through at least 6 similar topics on `tex.stackexchange` and I haven't been able to solve it using the already proposed solutions. Any help related to my question or with any problems in my code (maybe I've written redundant lines) would be greatly appreciated. I'm using TeXStudio and MiKTeX.


title: Tabular alignment of text and figure

text: For an exam paper I'm preparing, I want to properly build a top page header, with the university logo, and two block of text side-by-side (for course, department, etc.). I have already seen some possible solutions: How to vertically-center the text of the cells? How to vertically center text with an image in the same row of a table but none provided me with a proper solution for my case. I want to be able to vertically align the two texts independently with `t`,`c`,`b` and also align the picture with the first text. The problem is in this latter alignment, because it should be flexible enough so that the figure and the first text can be aligned at `t`, `c`,`b`. To be clear, possible outputs include:   * the picture and the first text center aligned, and the last text top aligned with the first text; or    * all aligned at top, bottom, center; or even   * the picture and the first text top aligned, and the last text bottom aligned with the first text. ![enter image description here](http://i.stack.imgur.com/8YEFp.png)               \documentclass[10pt]{scrartcl}          \usepackage{lmodern}     \usepackage[a4paper,showframe]{geometry}     \usepackage{graphicx}     \DeclareGraphicsExtensions{.pdf}          \usepackage{array}          \usepackage{varwidth}     \usepackage{ragged2e}          \setlength{\fboxsep}{0pt}          \newcommand*{\mtab}[1]{\begin{tabular}[t]{@{}l@{}} #1 \end{tabular}}     \newcommand*{\lbox}[2][t]{\parbox[#1]{\linewidth}{\RaggedRight\fbox{\mtab{#2}}}}     \newcommand*{\rbox}[2][t]{\parbox[#1]{\linewidth}{\RaggedLeft\fbox{\mtab{#2}}}}     \newcommand*{\cbox}[2][t]{\parbox[#1]{\linewidth}{\Centering\fbox{\mtab{#2}}}}          \newcommand*{\Logo}{\includegraphics[width=\linewidth]{example-image}}          \begin{document}          \begingroup     \noindent     \begin{tabular}{@{}p{0.15\textwidth}p{0.5\textwidth}p{\dimexpr 0.35\textwidth-4\tabcolsep\relax}@{}}     \lbox{\raisebox{-0.5\height}{\Logo}} & \cbox[t]{aaa\\ bbb\\ ccc\\ ddd} & \rbox[t]{fff\\ hhh}     \end{tabular}     \endgroup     \par\bigskip     \begingroup     \noindent     \begin{tabular}{@{}p{0.6\textwidth}@{}p{0.2\textwidth}@{}p{0.2\textwidth}@{}}     Name: & Num: & Class:     \end{tabular}     \endgroup     \par\bigskip          Normal text here!          \end{document}


title: Various arrow shapes above letters

text: I needed to type vectors with bend arrows, (in the debate arrow- bold, I vote for arrow). I did not find anything about that on internet (wording problem may be) but the closest I found was Dot notation for derivative of a vector [closed]. Therefore I am not sure it has any interest for anybody else, but if it has, I slightly modified the code given by Todd Lehman in the above question to get the result on the picture. ![enter image description here](http://i.stack.imgur.com/eRCci.png)               \usepackage{tikz}         % For arrow and dots in \xvec     \usetikzlibrary{arrows}     % --- Macro \pvec - (pseudo vector)     %Note that the percent after \rlap should NOT be deleted (just try it...)     \makeatletter     \newlength\pvec@height     \newlength\pvec@depth     \newlength\pvec@width     \newcommand{\pvec}[2][]{         \settoheight{\pvec@height}{$#2$}         \settodepth{\pvec@depth}{$#2$}         \settowidth{\pvec@width}{$#2$}       \def\pvec@arg{#1}       \raisebox{.2ex}{\raisebox{\pvec@height}{\rlap{%          \kern.05em         \begin{tikzpicture}[scale=1,shorten >=-3pt,shorten <=-3pt]         \pgfsetroundcap         \coordinate (Stx) at (.05em,0) ;         \coordinate (Arx) at (\pvec@width-.05em,0) ;         \draw[->](Stx) to[bend right] (Arx);         \end{tikzpicture}       }}}       #2     }     \makeatother      Posted, just in case it helps... A complete MWE:               % ----------------------------------------------------------------     % Article Class (This is a LaTeX2e document)  ********************     % ----------------------------------------------------------------     \documentclass[12pt]{article}     %\usepackage[english]{babel}     %\usepackage{amsmath,amsthm}     %\usepackage{amsfonts}     \usepackage[T1]{fontenc}     \usepackage{mathpazo}     \usepackage{tikz}         % For arrow and dots in \xvec     \usetikzlibrary{arrows}     % --- Macro \pvec - (pseudo vector)     %Note that the percent after \rlap should NOT be deleted (just try it...)     \makeatletter     \newlength\pvec@height     \newlength\pvec@depth     \newlength\pvec@width     \newcommand{\pvec}[2][]{%         \settoheight{\pvec@height}{$#2$}         \settodepth{\pvec@depth}{$#2$}         \settowidth{\pvec@width}{$#2$}       \def\pvec@arg{#1}       \raisebox{.2ex}{\raisebox{\pvec@height}{\rlap{%         \kern.05em         \begin{tikzpicture}[scale=1,shorten >=-3pt,shorten <=-3pt]         \pgfsetroundcap         \coordinate (Stx) at (.05em,0) ;         \coordinate (Arx) at (\pvec@width-.05em,0) ;         \draw[->](Stx) to[bend right] (Arx);         \end{tikzpicture}       }}}       #2     }          \newcommand{\pvecl}[2][]{%                   % for downward arrow         \settoheight{\pvec@height}{$#2$}         \settodepth{\pvec@depth}{$#2$}         \settowidth{\pvec@width}{$#2$}       \def\pvec@arg{#1}       \raisebox{.2ex}{\raisebox{\pvec@height}{\rlap{%         \kern.05em         \begin{tikzpicture}[scale=1,shorten >=-3pt,shorten <=-3pt]         \pgfsetroundcap         \coordinate (Stx) at (.05em,0) ;         \coordinate (Arx) at (\pvec@width-.05em,0) ;         \draw[->](Stx) to[bend left] (Arx);         \end{tikzpicture}       }}}       #2     }     \makeatother          % ----------------------------------------------------------------     \begin{document}     $\pvec{a}\qquad$ $\qquad\pvec{OA}$ $\qquad\pvecl{OA}$     \newline          Quaternions: $\qquad\pvecl{q_{r}} = s + \vec{v}, \pvecl{Q} $     \newline          Pseudo vectors: $\qquad\pvec{a}\qquad$ $\qquad\pvec{OA}$          % ----------------------------------------------------------------     \end{document}     % ----------------------------------------------------------------      ![enter image description here](http://i.stack.imgur.com/jbUkq.png)


title: How to create symbolic x coords without losing last bar

text: I've created a bar chart with labels for the x coordinates. But if I don't put a xmin/xmax in, only half of the first and last bar appear. If I add a xmax it shows up on the axis.               \begin{figure}[h!]     \small     \begin{tikzpicture}     \begin{axis}[%     width=3.5in,     height=1.5in,     axis x line=center,     axis y line=left,     symbolic x  coords={0,Choice1,Choice2 Here,Choice3 Here,Choice4 Goes Here,Last Choice, 1},     ymin=0, ymax=2,     xmin=0, xmax=1,     nodes near coords,     ylabel style={align=center},     ylabel={Mean days\\per month},     x tick label style={font=\small,text width=1cm,align=center},     ybar]               \addplot[color=blue,fill] coordinates {(Choice1,0.6)(Choice2 Here,0.1) (Choice3 Here,1.6)};     \addplot[color=black,shade] coordinates {(Choice4 Goes Here,0.9) (Last Choice,0.9)};          \end{axis}     \end{tikzpicture}     \end{figure}      ![Bar chart](http://i.stack.imgur.com/BaqX2.png)


title: Natbib ‘numbers’ option breaks capitalization of "von" component of name

text: I'm currently working on my thesis and I am trying to cite a Dutch author. Some Dutch surnames have a "von" component (e.g., van, van der, de) which should be capitalized if and only if the first name is not included. To remedy this, `natbib` allows you to use either `\citet` or `\Citet` to manage the capitalization. The `\Citet` command, however, seems to be broken when the `numbers` option is used. In this case, the "von" component is left uncapitalized. Below I have included a MWE. .tex:               \documentclass{article}     \usepackage[numbers]{natbib}          \begin{document}          \citet{vannoort}          \Citet{vannoort}          \bibliography{library}     \bibliographystyle{unsrtnat}          \end{document}      .bib:               @article{vannoort,     author={van Noort, Thomas},     title={An important paper},     year=2010,     }      Is there a way to solve this?


title: Streched vertical space between two subfigures

text: I want to add vertical space between two subfigures so that so that the upper figure is aligned with the top of the page and the last line of this figure caption is aligned with the bottom of the page. My approach is the following one, but without success:                 \begin{figure}[p]       %       \centering       \subfloat[]{\includegraphics[width=5cm]{Lenna.png}}\\       \vfill       \subfloat[]{\includegraphics[width=5cm]{Lenna.png}}       %       \caption{Vertical filling space (between the two subfigures) should         be added so that the upper figure is aligned with the top of the         page and the last line of this figure caption is aligned with the         bottom of the page.}        %     \end{figure}      ![enter image description here](http://i.stack.imgur.com/DY1sf.jpg)


title: How can I generate a nicely laid out image including text and a png image?

text: I would like to generate an image which incorporates some text, nicely laid out with a nice font, and a png image which has to be included in the image. I could put this together quite quickly in GIMP or similar. However: I want to be able to create this image programmatically from some metadata (some details about the text and the PNG) which will vary, while the basic format of the image will stay the same. The idea is to be able to commit the script to create the image into version control, to use a Makefile, etc. The image to be included is a QR code, which unfortunately I cannot generate on-the-fly from data - I have to use a pre-made PNG for technical reasons. Now, if I didn't have to include the PNG, I could do this nicely by generating an SVG file which lays out the text properly, and can be rendered into other formats. I know how to do most of the formatting in LaTeX, however I am not sure is this is the best option, as my layout is very custom and un- documentlike, with no margins, weird text spacing etc., and I only want a single image. I think that TeX could work for this, but I have no knowledge of it or where to start with this. Furthermore, I ideally want a PNG as output, which I'm not sure will work with either TeX or LaTeX... Should I use one of these tools, and what is the best way to do so? Any other ideas of how to do this or what to use?


title: Randomly assign color to background in the PDF whenever page is turned

text: Is it possible to change the background color of a Beamer presentation in the PDF in such way, that whenever I switch a page, the color is switched as well? Note that I do not seek a solution to randomly switch during compilation (although that could be interesting as well), I look for a way to switch the color whenever I switch pages in the final PDF. So going from slide 1 to slide 2 and back should generate two different background colors for slide 1.