title: \cline going out of matrix

text: I am trying to reproduce the following matrix ![enter image description here](http://i.stack.imgur.com/kxxN1.png) I tried with this:               \begin{equation*}     \begin{bmatrix}[ccc:c]     a_{11} & \cdots & a_{1n} & b_1 \\     \vdots &  & \vdots & \vdots \\     a_{n1} & \cdots & a_{nn} & b_n     \end{bmatrix}\sim     \begin{bmatrix}[ccc|ccc:c]     a'_{11} & & 0 & & & & b'_1 \\      & \ddots & & & \mbox{\Huge 0} & & \vdots \\      0 & & a'_{kk} & & & & \vdots \\ \cline{1-6}       & & & a'_{kn} & & & \vdots \\       & \mbox{\Huge 0} & & & \ddots & & \vdots \\       & & & & & & b'_k     \end{bmatrix}     \end{equation*}      but I get this: ![enter image description here](http://i.stack.imgur.com/yCQDh.png) Why is the left side of `\cline` going 'out of matrix bounds'? My preamble looks like this:               \documentclass[a4paper,12pt,twoside]{article}               \usepackage{amsmath,amssymb,amsthm,amssymb}     \usepackage{mathtools}     \usepackage{bbm}     \usepackage{graphicx}     \usepackage{floatrow}     \usepackage{float}     \usepackage{caption}     \usepackage{subcaption}     \usepackage[croatian]{babel}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{enumerate}     \usepackage{fullpage}     \usepackage[dvipdfm,colorlinks=true,pdfstartview=FitB,bookmarks=false,urlcolor=blue,citecolor=LimeGreen,linkcolor=BrickRed,bookmarksnumbered]{hyperref}     \usepackage{url}     %\usepackage[all]{hypcap}     \usepackage{tgtermes}     \usepackage{newtxmath}     \usepackage[usenames,dvipsnames,svgnames]{xcolor}     \usepackage{titlesec}     \usepackage{wrapfig}     \usepackage{arydshln,leftidx}     \usepackage{multirow}     \usepackage{bigdelim}     %\usepackage{subcaption}     %\usepackage[labelformat=empty]{caption}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usetikzlibrary{decorations.shapes}          % Table float box with bottom caption, box width adjusted to content     \newfloatcommand{capbtabbox}{table}[][\FBwidth]          \makeatletter       \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%         \hskip -\arraycolsep         \let\@ifnextchar\new@ifnextchar       \array{#1}}     \makeatother          \newtheorem{crteorem}{Teorem}     \newtheorem{podt}{Podteorem}     \newtheorem{definicija}{Definicija}     \newtheorem{korolar}{Korolar}     \newtheorem{lema}{Lema}          \titleformat*{\section}{\normalfont\Large\bfseries\color{RoyalBlue}}     \titleformat*{\subsection}{\normalfont\large\bfseries\color{PineGreen}}     \titleformat*{\subsubsection}{\normalfont\normalsize\bfseries\color{RedViolet}}               \renewcommand{\d}[2]{\frac{d #1}{d #2}} % derivacije     \newcommand{\dd}[2]{\frac{d^2 #1}{d #2^2}} % druga derivacija     \newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}      % parcijalna derivacija     \newcommand{\pdd}[2]{\frac{\partial^2 #1}{\partial #2^2}}      % druga parcijalna derivacija     \newcommand{\abs}[1]{\left| #1 \right|} % za apsolutnu vrijednost          \makeatletter     \def\Ddots{\mathinner{\mkern1mu\raise\p@     \vbox{\kern7\p@\hbox{.}}\mkern2mu     \raise4\p@\hbox{.}\mkern2mu\raise7\p@\hbox{.}\mkern1mu}}     \makeatother          \urlstyle{rm}          \numberwithin{equation}{section}     \thispagestyle{headings}     \pagenumbering{roman}      I tried by loading minimum amount of packages (like math ones), but in that case tex won't recognise the [ccc|ccc:c] part :\ Also, the right upper side of the second matrix is kinda uneven :S


title: How to print DIN C4-size envelopes?

text: I would like to print a DIN C4-size envelope with `FROMADRESS` and `TOADRESS` (according to DIN). But I haven't found a solution implemented already in `scrlttr2`. Is there an easy solution?


title: Neo Euler won't display greek letters

text: I'm trying to use the Neo Euler math font in a document, compiled using XeLaTeX:               \documentclass{scrartcl}     \usepackage{amsmath}     \usepackage{blindtext}     \usepackage{unicode-math}     \setmainfont{Palatino LT Std}     \setmathfont{Neo Euler}          \begin{document}     \blindtext     \begin{align*}         F(\lambda) = \sum_{u = -\infty}^{\infty}a_{u}\exp (i2\pi \lambda u)     \end{align*}     \end{document}      However, it won't display the greek letters Pi and Lambda. Instead I get: ![Greek letters not showing](http://i.stack.imgur.com/mPRCw.png) Setting the main font to Palatino works as evident from the blind text. I downloaded the `euler.otf`from https://github.com/khaledhosny/euler-otf and copied it into my `/Library/Fonts/` directory (I'm on OS X 10.9). Thanks!


title: Full height right/left panel in WinEdt

text: I am wondering whether there is a way to pull down right/left panels in WinEdt and make them cover the full height of the WinEdt windows. Below is an image to make my question more clear. I have played with Froms.ini but with no luck! ![enter image description here](http://i.stack.imgur.com/YrOW3.jpg)


title: How add decoration arrow for pgfplotfunction

text: I want to draw a series of curves with directions. `pgfplotfunction` is an option because it's easy to draw curves in a batch. However, I don't know how to add annotation arrow for it. It's there a similar way for pgf as the `decorations` library for `\draw`? Sample code:               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}     \draw[clip] (-1,-1)--(1,-1)--(1,1)--(-1,1)--cycle;     \draw (-1,0) -- (1,0);     \draw (0,-1) -- (0,1);     \begin{scope}[rotate=60]     \foreach \s in {1,2,3,4,5,6} {         \pgfplothandlerlineto             \pgfplotfunction{\t}{0,10,...,1024}{\pgfpointxy{(0.0005+0.0001*\s)*\t*2*cos(\t)}{(0.0005+0.0001*\s)*\t*sin(\t)}}         \pgfusepath{stroke}     }     \end{scope}     \end{tikzpicture}     \end{document}


title: How can I get to use the sideset command on unusual symbols without an error message

text: I would like to use the command, `$\sideset{_\sigma}{_f}\times$` without an error message. This command renders the way I want it to, (a times with a left subscript of `\sigma`, and a right subscript of f). My issue however is that I would like to compile through this error without have to skip it. So my question is can I put a command on that line that will compile though just that line, while being able to troubleshoot around it. In particular I would like to skip a particular error. If not this, is their some other way I might be able to typeset this. EDIT Here is the code:               \documentclass[12pt]{article}     %\usepackage{MnSymbol}     \usepackage{amsmath,amssymb,amsfonts, xypic, mathrsfs, graphicx}     \usepackage[all]{xy}          \begin{document}     $\sideset{_g}{_f}\times$     \end{document}      Here is the error message:               ./test2.tex:7:Limit controlsmust follow a math operator.          < argument > \times \nolimits                                           _f     1.7      $\sideset{_\sigma}{_f}\times                                       $     ?


title: how to create scatter of points?

text: I am going to teach econometrics soon and as some of you might know, there is this concept of regression where we try to fit a a best plot on the data. I know how to make a graph with just one point (as shown below). But is there a simpler way to plot some random points around a straight line? Basically I would like to create a scatterplot such that the points are random on the graph but not too much. In other words points are on a line but say there is a random error in $y$. Also, can I control the variance of this error with values of $x$?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[xscale=3, yscale=1.5]     \draw [thick, <->] (0,1) -- (0,0) -- (1,0);     \node [below right] at (1,0) {$x$};     14     \node [left] at (0,1) {$y$};     \draw[fill] (.4,.6) circle [radius=.5pt];     \end{tikzpicture}     \end{document}


title: math environment & overline in a subfigure

text: I would like to use the `\overline` in several subfigures to signify negation at the moment I am using the `$\neg$b` to signify negation, is this possible? Currently when using the `\overbar` I get errors. A snippet of how I've laid them out:               \begin{figure}[H]`\begin{figure}[H]     \centering     \subfigure[a = $\neg$b $\neg$d + c + b d + a]{%     \includegraphics[width=40mm]{a.png}     \label{fig:subfigure1}}     \quad     \subfigure[b = $\neg$b + $\neg$c $\neg$d + c d] {%     \includegraphics[width=40mm]{b.png}     \label{fig:subfigure2}}     \subfigure[c = $\neg$c + d + b]{%     \includegraphics[width=40mm]{c.png}     \label{fig:subfigure3}}     \quad`     \centering     \subfigure[a = $\neg$b $\neg$d + c + b d + a]{%     \includegraphics[width=40mm]{a.png}     \label{fig:subfigure1}}     \quad     \subfigure[b = $\neg$b + $\neg$c $\neg$d + c d] {%     \includegraphics[width=40mm]{b.png}     \label{fig:subfigure2}}     \subfigure[c = $\neg$c + d + b]{%     \includegraphics[width=40mm]{c.png}     \label{fig:subfigure3}}     \quad


title: Specific column alignment in typesetting a resume

text: I am in the process of transferring my resume from a word processor format to LaTeX. For the body of the resume, I'd like each section (e.g. education, work experience) to appear like ![enter image description here](http://i.stack.imgur.com/qVnVj.png) I used a table in Word with two columns to get that look but I can't implement this in `LaTeX`.


title: Hyperref does not work for legend labels inside \subbottom

text: When I use `Hyperref` package together with memoir class, and when I put a label to a `PGFPlot` inside a `subbottom` environment, and try to reference to it, an error reported:               ! File ended while scanning use of \Hy@setref@link.      A MWE:               \documentclass[11pt, letterpaper, oneside, article]{memoir}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}     \usepackage[hyperfootnotes=true]{hyperref}     \newsubfloat{figure}          \begin{document}     A test for hyperref, subbottom of memoir class, and legend reference.     This is the legend reference:\ref{plot:firstplot}.          \begin{figure}[hbt]     \centering     \subbottom[]{     \begin{tikzpicture}     \begin{axis}       \addplot coordinates {(0,0)(0.5,1)(1,2)};       \label{plot:firstplot}     \end{axis}     \end{tikzpicture}     }     \end{figure}          \end{document}      If we do not use `Hyperref`, or if we do not put the plot inside `subbottom`, things would work out well.


title: Declaration of cumulative distribution function

text: I have a code that illustrates a certain figure.               \documentclass{article}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}[     declare function={ Nprime(\x)                 = 1/(sqrt(2*pi))*exp(-0.5*(pow(\x,2)));                         d2(\x,\y,\KK,\RR,\SIG)     = (ln(\x/\KK)+(\RR-(pow(\SIG,2)/2)*\y))/(\SIG*(sqrt(\y)));                        myfun(\x,\y,\KK,\RR,\SIG)  = exp(-\RR*\y)*Nprime(d2(\x,\y,\KK,\RR,\SIG))/(\x*\SIG*sqrt(\y));                      },     ]     \begin{axis}[y domain=0.01:0.3,domain=95:105,view={150}{20}]     \addplot3[surf] {myfun(x,y,100,0,0.09)};     \end{axis}     \end{tikzpicture}               \end{document}      Instead of `Nprime(\x)` I would like to declare and integrate a cumulative distribution function `N(\x). A very close approximation of cumulative distribution function would also be fine. Everything else should remain equal. Does anybody know how to do it? Thanks in advance!!! Here is the formula: enter link description here Something similar is provided here enter link description here but I dont know how to integrate is according to my needs :( Here is a modified version that doesn't work. The last part of the function, i.e. (\x*\SIG*sqrt(\y)) was removed because it is not needed in this case. Here is the code               \documentclass{article}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}[     declare function={ normcdf(\x,\m,\s)          = 1/(1 + exp(-0.07056*((\x-\m)/\s)^3 - 1.5976*(\x-\m)/\s));;                         d2(\x,\y,\KK,\RR,\SIG)     = (ln(\x/\KK)+(\RR-(pow(\SIG,2)/2)*\y))/(\SIG*(sqrt(\y)));                        myfun(\x,\y,\KK,\RR,\SIG)  = exp(-\RR*\y)*normdcf(d2(\x,\y,\KK,\RR,\SIG))                      },     ]     \begin{axis}[y domain=0.01:0.3,domain=95:105,view={150}{20}]     \addplot3[surf] {myfun(x,y,100,0,0.09)};     \end{axis}     \end{tikzpicture}               \end{document}


title: correct usage of \@namedef and \@nameuse

text: In a previous question I asked how to generate multiple saveboxes in a loop. The answer build around `csname` and the part inside `csname` is rather long and I need the name several times (create the box, fill the box, get properties and use it). Therefore I would like to shorten this. I tried               \makeatletter     ...     \@namedef{saveBox}{<what was inbetween \csname \endcsname>}     ...     \expandafter\newsavebox\@nameuse{saveBox}     ...     \makeatother      which is not working for me. A short background information on the inner workings/general intended use would be a bonus. * * * The awnser leaves me with one issue, I can't get the `\def` version to work with a direct version, see example for clarification:               \def\floatRow@currentSaveBox{floatRow@savebox\alph{floatRow@rowImageCount}}     %\expandafter\newsavebox\csname\floatRow@currentSaveBox\endcsname   %works     \expandafter\newsavebox\csname{}floatRow@savebox\alph{floatRow@saveboxCount}\endcsname  %gives mising number error      I assume that my separation of `\commandName` and the string `floatRow@savebox` is wrong. Here is a MWE:               \documentclass{report}     \begin{document}     \newcounter{c}     \def\currentSBox{prefix\alph{c}}     \expandafter\newsavebox\csname\currentSBox\endcsname     \expandafter\savebox\csname\currentSBox\endcsname{dummy}     \expandafter\usebox\csname\currentSBox\endcsname     \expandafter\usebox\csname{}prefix\alph{c}\endcsname     \end{document}


title: Footnote is placed below instead above key word?

text: Thanks for all the assistance so far! You're great! :D anyway I have a problem that when using the footnote command `\footnote` the footnote number is placed subscripted to the key word instead of superscript... anybody might know why? I'm working in sharelatex if that any help...               \documentclass[11pt,a4paper,english,oneside]{book}     \usepackage{etex}      \usepackage[left=1in, right=1in]{geometry}      \usepackage[Lenny]{fncychap}      \usepackage[utf8]{inputenc}      \usepackage[british]{babel}     \usepackage{dsfont}      \usepackage{fancyhdr}      \usepackage{booktabs}      \usepackage[hang,bottom,stable,multiple]{footmisc}      \usepackage{appendix}      \usepackage{amsmath}     \usepackage[pdftex]{graphicx}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{multirow}     \usepackage{amssymb}     \usepackage{mathtools}     \usepackage[margin=10pt, font=small, labelfont=bf, labelsep=endash]{caption}     \usepackage{chngcntr}      \usepackage{etoolbox}     \usepackage{amsthm}      \usepackage{thmtools}      \usepackage{setspace}      \usepackage{lipsum}      \usepackage{datetime}      \usepackage{graphicx,listings,xcolor,textcomp}      \usepackage{hyperref}      \usepackage{xparse}      \usepackage{cleveref}      \usepackage{arydshln}      \usepackage{array,hhline}      \usepackage{amssymb,amsmath}     \usepackage{rotating}      \usepackage{breqn}     \usepackage{lscape}     \usepackage{placeins}     \usepackage{morefloats}     \usepackage{floatflt}     \usepackage{tabularx}     \usepackage{graphicx}     \usepackage{tablefootnote}     \graphicspath{{Images/}}     \usepackage{natbib}     \bibliographystyle{abbrvnat}     \setcitestyle{authoryear,open={((},close={))}}     \begin{document}     Usually the Monte Carlo Simulation\footnote{blablablablabla}is used to blabla.          \end{document}      The foot note is noted as a subscript instead as a superscript... any ideas why?


title: Which pseudocode package produces this output?

text: I'm reading a computer science paper right now and I really like the way the pseudocode is displayed. I'm unsure, however, of what pseudocode package this is. Any help would be appreciated. An image is below: ![enter image description here](http://i.stack.imgur.com/N3zyc.png)


title: Why does cleveref's \crefname command have no effect when it appears within a \foreach?

text: This question follows on from this one, which I asked a few weeks ago. I have since discovered the cleveref package, and I would like to use it for ease in referring to theorem-like environments without having to remember whether a given statement was a theorem, a lemma, a proposition, etc. Here is a small example document. When I compile this document, the final line of text begins "Here are some references to ?? 1.1, ?? 1.2 and theorem 1.3." The attempt to use `\crefname` to set reference names (I'm not up on the terminology) for the different environments is not working. However, if the line marked with `% (*)` is uncommented, the second "??" will become "toybox". So it is something to do with being in a `\foreach`. But I can't find a way to make it work. It is as though the invocation of `\crefname` is totally ignored within the `\foreach`. Why does this happen?               \documentclass[a4paper]{amsart}          \def\myTheoremEnvironments{%         theorem/theorems,%         cobblestone/cobblestones,%         toybox/toyboxes%     }          \usepackage{tikz, titlecaps, cleveref}          % Number all definition, theorem, etc. environments using the same counter.     % Start counting again at the start of each section.     % Style these environments using LaTeX's "definition" style.     \theoremstyle{definition}     \newtheorem{baseTheorem}{Base Theorem}[section]     \foreach \x/\y in \myTheoremEnvironments {         \edef\tmp{\noexpand\newtheorem{\x}[baseTheorem]{\noexpand\titlecap{\x}}}\tmp         \crefname{\x}{\x}{\y}     }          %\crefname{toybox}{toybox}{toyboxes} % (*)          \begin{document}          \section{Hello, and welcome to my document.}          \begin{cobblestone}         \label{csref}         Hello. I am an ``cobblestone'' environment.     \end{cobblestone}          \begin{toybox}         \label{tbref}         I am a ``toybox'' environment. What a strange name that is for an environment.     \end{toybox}          \begin{theorem}         \label{thmref}         People trying to do strange things with ``foreach'' should expect trouble.     \end{theorem}          Here are some references to \cref{csref}, \cref{tbref} and \cref{thmref}.     I could have tried using just one call to ``cref'' here,     but it's best not to run before you can walk.          \end{document}


title: How to write something vertically below another math symbol

text: I have to write some equations in latex, but I'm having trouble finishing them. ![Image 1](http://i.stack.imgur.com/ljDPo.png) My Latex equation for image 1:               \widehat{f}(x,y)=median \left\{g(s,t)\right\}      ![Image 2](http://i.stack.imgur.com/oX2kx.png) My Latex equation for image 2:               A\oplus B = U A_{b}      How can I make a subscript below the formulas?


title: mdframed box spanning over page break: prevent images in between

text: I've run into a problem in a bigger documents where pictures get in between the breaks of mdframed boxes. So the scenario is that the **mdframed box should break at pageend** if it's to large and not fitting and **images should be positioned automatically**. **But the image should not be in between the two parts of the mdframed box**. So the mdframed should either be before or after the image (i.e. a page is allowed to break a mdframed, but an image should not be allowed). Is there any way to change either the pagebreaking-and-positioning of mdframed or the positioning of images accordingly? So something like giving the mdframed float "priority" over the image float. (Of course I could always make an exception for a single special "wrongly" positioned image and position it e.g. "[b]", but I'm looking for an automatic option). MWE and screenshot below. Kind regards and thanks for your time, NextThursday               \documentclass{scrbook}     \usepackage{lipsum}     \usepackage{mdframed}     \usepackage[demo]{graphicx}          \begin{document}\mainmatter\chapter{MWE}     \lipsum[1-3]     \begin{figure}\centering{\includegraphics[width=8cm,height=5cm]{exampleimg}\caption{exampleimg}}\end{figure}     \begin{mdframed}     \lipsum[4-6]     \end{mdframed}%          \end{document}      ![MWE screenshot](http://i.stack.imgur.com/l58vI.png) # UPDATE As there doesn't seem to be much solutions this update should document (IMHO inferior) possible fixes, in case somebody stumbles over this question and the hot fixes solve their problem:   * mdframed has an option like `\mdfsetup{nobreak=true}` to prevent the boxes from spanning multiple pages   * figure positioning is discussed a lot already and has good answers One possible idea would be to use a \FloatBarrier (pkg:placeins) before each mdframed-box, although that is not as intelligent as it should be. It might break more than it fixes: a very small mdframed box which might fit into the remainder of the page is forbidden and the bigger image which doesn't fit results in unused remainder of the first page. The MWE for this would be:               \documentclass{scrbook}     \usepackage{lipsum}\usepackage{mdframed}\usepackage[demo]{graphicx}          \usepackage{placeins}          \newenvironment{mymdframed}{\FloatBarrier\begin{mdframed}}{\end{mdframed}}          \begin{document}\mainmatter\chapter{MWE}     \lipsum[1-3]     \begin{figure}\centering{\includegraphics[width=8cm,height=5cm{exampleimg}\caption{exampleimg}}\end{figure}     \begin{mymdframed}\lipsum[4-6]\end{mymdframed}%     \lipsum[4-16]     \end{document}


title: Write 'text' **correctly** in equations

text: Although many has attempted to explain the difference among `\mathrm`, `\textrm`, `\textnormal` and `\text` (and others?), I found them misleading. See for example the LaTeX's Wiki `\mathrm` explanation ![enter image description here](http://i.stack.imgur.com/OdD6F.png) Why is it wrong? Let's try all of them within an `article` and a `beamer` and you'll see the difference and, therefore, error equation.tex               \begin{eqnarray*}       \int_1^9\! \cos{x} \,\mathrm{d}x & & \textrm{this is textrm}\\       \sum_1^9 y                       & & \textsf{this is textsf}\\       \prod_1^9 z                      & & \textnormal{this is textnormal}\\       \bigcup_1^9 w                    & & \text{and this is just text}     \end{eqnarray*}      article.tex               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \begin{document}       \input {equation}     \end{document}      ![enter image description here](http://i.stack.imgur.com/xnfdx.png) And until here everything looks fine... beamer.tex               \documentclass{beamer}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \begin{document}       \begin{frame}         \input{equation}       \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/59JYt.png) And here we can clearly see that `\mathrm` does not behave as expected, i.e. does not provide a _function_ aspect to the _d_. Does anyone know what am I supposed to use here instead? Just `\text`?? o.O Moreover, I cannot see any difference between `\textnormal` and `\text`. Finally, `\textrm` looks useless..


title: How "safe" is it to use LaTeX3 (l3packages, l3kernel)?

text: Are `l3kernel` and `l3packages` present in most of the LaTeX distributions? Are they "stable enough"? I am asking this because I am preparing a `.tex` document for a client. I have found convenient to use things like the `xparse` package or `expl3` syntaxis. How likely is that the client will have problems to compile it (either now or in the future, in case the packages cease to be available or change substantially)? Should I avoid LaTeX3 by now and stick to LaTeX2e? I'm pretty new both to this forums and to LaTeX3, so please let me apologize if the question is not appropriate in any way. Thanks a lot in advance!


title: Indentation missing for algorithm package in documentclass{minimal}

text: I am trying to get write an algorithm in LaTeX for `minimal` document class. Unfortunately, the indentation is completely missing. Following is my sample code:               \documentclass{minimal}     \usepackage{algorithm2e}     \usepackage{algorithmic}     \usepackage{pslatex}          \special{papersize=36in,24in}     \setlength{\paperwidth}{36in}     \setlength{\paperheight}{24in}     \topskip0pt          \begin{document}          \begin{algorithm}     \SetAlgoLined     \KwData{this text}     \KwResult{how to write algorithm with \LaTeX2e }      initialization\;     \While{not at end of this document}{      read current\;     \eIf{understand}{      go to next section\;      current section becomes this one\;      }{      go back to the beginning of current section\;      }     }     \end{algorithm}     \end{document}      This is how it currently appears using document class - `minimal`: ![enter image description here](http://i.stack.imgur.com/wVB3k.png) This is how want it to appear: ![enter image description here](http://i.stack.imgur.com/To64O.png) How do I fix this?


title: What package contains "bitset.sty"?

text: I am doing a document in latex (texworks), but I am getting the following error:               ! LaTeX Error: File `bitset.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name:       Texworks is not able to download it automatically...


title: Change behavior of geometry for all pages

text: I'm using the `llncs` document class and wanted to change the margin of all pages, using the `geometry` package. I use the following command:               \usepackage[left=3.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}      The problem is that the left margin is switching between odd and even pages. Even numbered pages have the 'left' margin on the right side and the odd numbered pages have the 'left' margin on the actual left side. I don't know if this is a problem with `llncs` or `geometry` (thus, the title could be misleading), but how would I tell my document to have the left margin on the actual left side, for every page?


title: Generalised: Accessing the logic values of a TikZ coordinate

text: In another question concerning Access to logic coordinates on Accessing the logic values of a TikZ coordinate I used these functions, until I came to a scaled tikzpicture and then it was off. I now have added a factor for the scaling, but I am looking for a method to make it universal. That would mean the xcoord/ycoord would take the picture's scaling into account through a tikz/pgf variable.               \makeatletter     \newcommand\xcoord[2][center]{{%       \pgfpointanchor{#2}{#1}%       \pgfmathparse{\pgf@x/\pgf@xx}%       \pgfmathprintnumber{\pgfmathresult}%     }}     \newcommand\ycoord[2][center]{{%       \pgfpointanchor{#2}{#1}%       \pgfmathparse{\pgf@y/\pgf@yy}%       \pgfmathprintnumber{\pgfmathresult}%      }}      \makeatother      Any suggestion to that effect? An MWE is:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{pgffor}          \makeatletter     \newcommand\xcoorda[2][center]{{%       \pgfpointanchor{#2}{#1}%       \pgfmathparse{\pgf@x/\pgf@xx}%       \pgfmathprintnumber{\pgfmathresult}%     }}          \makeatletter     \newcommand\xcoord[2][center]{{%      \pgfpointanchor{#2}{#1}%      \pgfmathparse{\pgf@x/\pgf@xx/.17}%      \pgfmathprintnumber{\pgfmathresult}%     }}          \newcommand\ycoorda[2][center]{{%       \pgfpointanchor{#2}{#1}%       \pgfmathparse{\pgf@y/\pgf@yy}%       \pgfmathprintnumber{\pgfmathresult}%     }}     \makeatother          \usetikzlibrary{intersections}               \begin{document}          \begin{tikzpicture}[domain=-0.01:0.55,xscale=17,yscale=0.01]      % the scaling is also in xcoord     \draw[-stealth,name path=xline] (0,0) -- (0.55,0);     \draw[stealth-stealth,name path=yline] (0,-220) -- (0,220);     \draw[color=blue,name path=func] (0,200) parabola bend (.25,-50) (.50,200);     \path[name intersections={of=func and xline,by={i1,i2}}];     \node[above=15pt] (i1label) at(i1) {\xcoord{i1}\%};     \draw[-stealth,green] (i1label.south) -- (i1);     \node[below=20pt,text width=2cm,align=center,draw,fill=red!25] (i1label_a)       at(i1) {\xcoorda{i1}\%\\ sans scaling \\ wrong!};     \draw[-stealth,red] (i1label_a.north) -- (i1);     \node[above=15pt] (i2label) at(i2) {\xcoord{i2}\%};     \draw[-stealth,green] (i2label.south) -- (i2);     \node[below=20pt,text width=2cm,draw,align=center,fill=red!25] (i2label_a)       at(i2) {\xcoorda{i2}\%\\ sans scaling \\ wrong!};     \draw[-stealth,red] (i2label_a.north) -- (i2);     \foreach \t in {10,20,...,50} {     \pgfmathparse{\t/100}\edef\v{\pgfmathresult}       \draw[thin] (\v,10) -- (\v,-10) node[below] {\t\%};     }     \foreach \t in {-200,-100,...,200} {      \draw[thin] (.010,\t) -- (-0.01,\t) node[left] {\small\t};     }     \end{tikzpicture}          \end{document}      I used a parabola in the MWE and marked the scaled and unscaled xcoord's in both cases.


title: Why are my variables getting erased?

text: I'm making a custom document class and I've noticed that after my custom variables get typeset on the title page, they somehow get reset to nothing. They show up on the title page, but then my header isn't working. Nevermind the assignment part - that's something I just didn't change yet. It's supposed to be lecture. ![enter image description here](http://i.stack.imgur.com/4jK3x.png) Here is my code to make this simple document:               \documentclass{notes}          \coursenumber{Course 101}     \semester{Winter 2013}     \lecture{1}     \studentname{My Name}     \studentid{My ID}          \begin{document}         \maketitle              asdf     \end{document}      And here's my notes.cls file:               \ProvidesClass{notes}          \LoadClass[10pt,letterpaper]{article}          \RequirePackage{ifthen}     \RequirePackage[left=1.25in,right=1.25in,top=1.25in,bottom=1.25in]{geometry}     \RequirePackage{setspace}     \RequirePackage{amsmath}     \RequirePackage{titling}     \RequirePackage{fancyhdr}     \RequirePackage{amsfonts}          \newcommand{\@coursenumber}{{\em No \textbackslash coursenumber specified}}     \newcommand{\@semester}{{\em No \textbackslash semester specified}}     \newcommand{\@studentname}{{\em \textbackslash studentname unknown}}     \newcommand{\@studentid}{{\em \textbackslash studentid unknown}}     \newcommand{\@school}{{\em \textbackslash school unknown}}     \newcommand{\@department}{{\em \textbackslash department unknown}}     \newcommand{\@lecture}{\textbackslash lecture}     \newcommand{\solutionstext}{\bfseries (Solutions)}     \newcommand{\coursenumber}[1]{\renewcommand{\@coursenumber}{#1}}     \newcommand{\semester}[1]{\renewcommand{\@semester}{#1}}     \newcommand{\studentname}[1]{\renewcommand{\@studentname}{#1}}     \newcommand{\studentid}[1]{\renewcommand{\@studentid}{#1}}     \newcommand{\school}[1]{\renewcommand{\@school}{#1}}     \newcommand{\department}[1]{\renewcommand{\@department}{#1}}     \newcommand{\lecture}[1]{\renewcommand{\@lecture}{#1}}          \renewcommand{\maketitle}{       \begin{titlepage}         \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % Defines a new command for the horizontal lines, change thickness here         \center         \leavevmode\\[4cm] % Center everything on the page         \HRule \\[0.4cm]         { \huge \bfseries \@coursenumber}\\[0.0cm] % Title of your document         \HRule \\[1.5cm]         \textsc{\Large \@semester}\\[0.5cm] % Semester         \textsc{\Large \today}\\[0.5cm] % Date         \textsc{\Large Lecture \#\@lecture}\\[1.0cm] % Lecture         \HRule \\[1.0cm]         \Large \emph{Author:} \\ \@studentname \\          \@studentid \\[3cm]         \vfill % Fill the rest of the page with whitespace       \end{titlepage}     }          \makeatletter     % These commands follow the titling package format for titles     % They define user commands to format the subtitle     \newcommand\presubtitle[1]{\gdef\@presubtitle{#1}}     \newcommand\postsubtitle[1]{\gdef\@postsubtitle{#1}}     % This command takes the subtitle as its argument, and uses the titling command     % \maketitlehookb plus the previously defined formatting commands to insert     % the subtitle into the titlepage. It also generates \thesubtitle for subsequent use     \newcommand\subtitle[1]{%       \renewcommand{\maketitlehookb}{\@presubtitle#1\@postsubtitle}       \newcommand\thesubtitle{#1}}     \makeatother     % Now we define the formatting for the subtitle     \presubtitle{\begin{center}\Large} % change this as needed     \postsubtitle{\end{center}}          % These commands set up the headers. They are set up for even and odd pages the same     % Check the fancyhdr documentation for information on how to set them differently     % for odd and even pages     \lhead{\begin{tabular}{@{}l}\@coursenumber\ (\@semester)\\\@studentname\ (\@studentid)\end{tabular}}     \chead{}     \rhead{\begin{tabular}{r@{}}Assignment \#\@assignment\\\today\end{tabular}}     \lfoot{}     \cfoot{\thepage}     \rfoot{}     % Set the width of the header rule. Make 0pt to remove the rule.     \renewcommand{\headrulewidth}{.5pt}     \renewcommand{\footrulewidth}{0pt}     % Make the head height match the size of the header     \setlength{\headheight}{24pt}     \pagestyle{fancy}     % Remove "Chapter" from the marks     %\renewcommand{\chaptermark}[1]{%     %  \markboth{\thechapter.\ #1}{}}


title: Spacing of sectioning commands for grid typesetting

text: I know questions about grid typesetting have been asked before, and some packages (`grid`, `gridpos`) exist. The scenario I have at the moment is simpler than that, and is mostly a question about elastic lengths. I'm not claiming the result is excellent typography, but I'm curious whether and how it could be done :) In typesetting my thesis, I have a page where `\textheight` is an exact multiple of `\baselineskip`, so I can fit exactly 34 lines of text into the page. The section and subsection commands are defined by the style file as               \renewcommand\section{\@startsection {section}{1}{\z@}%            {-3.5ex \@plus -1ex \@minus -.2ex}%            {2.3ex \@plus.2ex}%            {\def\baselinestretch{1.0}\reset@font\normalsize\bfseries\slshape}}     \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%            {-3.25ex\@plus -1ex \@minus -.2ex}%            {1.5ex \@plus .2ex}%            {\reset@font\normalsize\mdseries\itshape}}      (Which as far as I can tell have been copied and pasted from elsewhere on the web without any particular rhyme or reason. Why should the space around section headings have anything to do with the x-height of the font?) On pages that have 0 or 2+ section headings, there is enough stretchability around the headings to account for their non-integral-multiple- of-`\baselineskip` heights. On pages that have 1 section heading _in the middle of the page_ , there is again enough stretchability before and after the heading. But on pages where the section heading is the first thing in the page, the before-heading space is elided, along with its stretchability, and I get underfull `\vbox`es. My question is, is there a way to change the spaces in these definitions so that when a section heading starts a page, it skips a full line, but when it is in the middle of the page, it uses these smaller stretchabilities? A manual solution is to insert `\vspace*{0pt plus 0.5\baselineskip}` at each problematic section heading, which lets TeX "round up" to the next nearest line, but if I simply insert that spacing everywhere, then TeX will use that stretch even when it doesn't need to... I tried looking at the internal definitions of `\@startsection` and `\@ssect`, but I don't see any way for them to detect when the before-space is elided from the page.


title: Make chapters start on odd pages

text: I need to make my chapters start on odd pages and keep heading and page numbering for the blank page before it. I read somewhere that Latex makes this in book documents by default, but I'm still having chapters on even pages.               \documentclass[12pt,a4paper]{book}      \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{parskip}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{float}     \usepackage[top=3cm,bottom=1.5cm,left=2.5cm,right=2.5cm,asymmetric]{geometry}     \usepackage{booktabs,dcolumn}     \usepackage[figureposition=bottom]{caption}     \usepackage{fancyhdr}     \hyphenation{hoch-warm-fester Legier-ungs-bestandteile simul-ieren makrosko-pischen SX-Nickellegierung-en Legierungs-bestand-teile SX-Superlegier-ung Multiphasen-feld-Methode Fehlpassu-ng Mikrostruktur-entwicklung}     \raggedbottom     \numberwithin{equation}{chapter}     \fancyhf{}     \fancyhead[C]{\ifnum\value{chapter}>0 \thechapter.\ \fi\leftmark}     \fancyhead[LE,RO]{\thepage}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\chaptermark}[1]{     \markboth{#1}{}}     \setlength{\headheight}{14.5pt}     \newcolumntype{d}[1]{D{.}{.}{#1}}     \newcommand*{\mc}[1]{\multicolumn{1}{c}{#1}}     \newcommand*{\mcTwo}[1]{\multicolumn{2}{c}{#1}}     \linespread{1.8}     \setlength\parindent{0pt}     \begin{document}      \selectlanguage{ngerman}     \pagenumbering{gobble}     \tableofcontents     \cleardoublepage     \pagenumbering{arabic}


title: Suppress empty page before chapter

text: > **Possible Duplicate:**   >  Chapter on the right side - How to turn it off? How do I remove empty pages before chapters? The following document renders as three pages; I just want two.               \documentclass[]{scrbook}          \usepackage[english]{babel}     \begin{document}     \chapter{Foo}     \chapter{Bar}     \end{document}      I want to keep the `scrbook` template if possible.


title: Forcing new chapter not to start on an odd page

text: > **Possible Duplicate:**   >  Chapter on the right side - How to turn it off? I am using a document class `amsbook` which I like very much, except for one thing: each new chapter starts on an odd-numbered page. Therefore, it happens that I get a whole blank page in the text, which I dislike. Is it possible (and easy?) to force the new chapter to start immediately on the next page after the preceding chapter? Can it be made automatically?


title: Adjusting a converted OTF font for LaTeX

text: I have bought OTF Adobe Garamond Pro and successfully converted it to use with LaTeX (using `otfinst.py`). It works well including ligatures, old-style numerals, small caps, etc., but the problem is again with Latin characters, specifically _ď_ , _ľ_ and _ť_ (`\v{d}`, `\v{l}`, `\v{t}`). Normally, the caron changes its shape so it looks like a comma rather than a wedge, but in this case, it is not working. I have spent a considerable amount of time by researching the possibilities, yet came to no acceptable conclusion. Could you please suggest how to fine-tune it while preserving proper kerning? ![Improper placement of carons.](http://i.stack.imgur.com/dN8jL.png) Fig. 1: The problematic characters. * * * **Edit (20. July 2011):** Thanks to Ulrike's answer, I have realised that I forgot to change the encoding and the encoding file. After editing the script and another run, it works perfectly and I can finally typeset my documents using Garamond typeface. I shall accept the answer as it led me to the solution. ![Proper placement of carons.](http://i.stack.imgur.com/8HS9G.png) Fig. 2: Victory! :-)


title: Why does my page number reset to 1 after the table of contents, and how can I avoid this?

text: For the table of contents, I change the page number in the footer from roman numerals to arabic numerals. But the problem is that the page number will be reset to 1 after the table of contents. I want to make it continue following the page number of table of contents. Could anyone tell me how to do that? The following is my code for setup header-footer and chapter page:               % Setup fancy headings     \pagestyle{fancyplain}     \newcommand{\clearemptydoublepage}{%       \newpage{\pagestyle{empty}\cleardoublepage}%     }     \renewcommand{\chaptermark}[1]{%       \markboth{#1}{}%     }     \renewcommand{\sectionmark}[1]{%       \markright{\thesection\ #1}%     }          \fancyhead[LE]{\fancyplain{}{\includegraphics[height=0.56in, width=1.5in]{logo.jpg}}}     \fancyhead[CE]{\fancyplain{}{}}     \fancyhead[RE]{\fancyplain{}{}}     \fancyhead[LO]{\fancyplain{}{}}     \fancyhead[CO]{\fancyplain{}{}}     \fancyhead[RO]{\fancyplain{}{\includegraphics[height=0.56in, width=1.5in]{logo.jpg}}}     \fancyfoot[LE]{\fancyplain{}{\bfseries\ page \arabic{page}\ of \pageref{LastPage}}}     \fancyfoot[CE]{\fancyplain{}{}}     \fancyfoot[RE]{\fancyplain{}{}}     \fancyfoot[LO]{\fancyplain{}{}}     \fancyfoot[CO]{\fancyplain{}{}}     \fancyfoot[RO]{\fancyplain{}{\bfseries\ page \arabic{page}\ of \pageref{LastPage}}}            %---------- Set up chapter style -------------------------------------     \makeatletter     \def\thickhrulefill{\leavevmode \leaders \hrule height 2pt \hfill \kern \z@}     \def\@makechapterhead#1{%       \thispagestyle {fancyplain}       \vspace*{10\p@}%       {\parindent \z@          {\raggedleft \reset@font%           \fontencoding{OT1}\fontfamily{cmr}\fontseries{b}\fontshape{n}\fontsize{22pt}{12}\selectfont%          \bfseries\thechapter\nobreak\hspace{1ex}}%         {\raggedright \reset@font%           \fontencoding{OT1}\fontfamily{cmr}\fontseries{b}\fontshape{n}\fontsize{22pt}{12}\selectfont%           \bfseries #1}%         \interlinepenalty\@M         \par\nobreak         \textcolor{orange}{\thickhrulefill}         \vspace{26pt}         \par\nobreak            }}          \def\@makeschapterhead#1{%       \thispagestyle {fancyplain}       \vspace*{10\p@}%       {\parindent \z@          {\raggedright \reset@font%           \fontencoding{OT1}\fontfamily{cmr}\fontseries{b}\fontshape{n}\fontsize{22pt}{12}\selectfont%           \bfseries #1}%         \interlinepenalty\@M         \par\nobreak         \textcolor{orange}{\thickhrulefill}         \vspace{26pt}         \par\nobreak            }}          \makeatother


title: Why is the size of my converted EPS files zero?

text: When I use `auto-pst-pdf` to convert an EPS (using `\includegraphics`) inside a TikZ picture, I get a picture with zero size (as near as I can tell) and no picture at all of I try to draw a bounding box around it. How can I determine the dimensions of my converted EPS files? If I try to draw the bounding box, the resulting imported PDF seems not to be included at all.               \documentclass{article}          \usepackage{auto-pst-pdf}     \usepackage{psfrag}     \usepackage{tikz}          \begin{document}          Some text.\bigskip{}\bigskip{}\bigskip{}          \begin{tikzpicture}     \draw[opacity=0](0,0)rectangle(1,1); % This ends up being the full extent of the figure     % The following makes the figure vanish altogether if used without the above line     \draw[green,dotted] (current bounding box.south west) rectangle (current bounding box.north east);     \psfrag{Z}{$G^\beta\leq\Sigma_\zeta$}     \includegraphics{GraphA} % GraphA is an EPS file being processed by `auto-pst-pdf`     %\psfragfig{GraphA}; % Has same effect when above is replaced with this     \end{tikzpicture}           \end{document}      produces ![enter image description here](http://i.stack.imgur.com/02ych.png)


title: Comma between large functions parameters

text: My problem is actually quite simple. I have fractions as function parameters, but the delimiting comma doesn't behave properly (i.e. not as I want it to behave). I want the comma to be placed as if the fraction was sitting on the baseline, meaning the comma should be lowered down. The code looks like this:               B\!\left(\tfrac{n+1}{2}, 2\right)      Actually               B\!\left(\tfrac{n+1}{2}_, 2\right)      looks pretty much how I want it to look like, but then the comma gets too small. Is there some "proper" way to accomplish this?


title: Wrapping text around a displayed equation

text: I have something like the following in a tex document:               some text ...          \[ T_y = \left\{ \begin{array}{ll}               x + \alpha & \mbox{if $\alpha = \beta$}\\               x^2 + \beta & \mbox{else} \end{array} \right. \]          some text again ...      **Question:** is it possible that the formula is adjusted at left and the second test comes in front of the formula (at right), and not immediately under it ?


title: Beamer customizing headline

text: I'm trying to create my own Beamer theme and I have a problem in handling the headline. I would like to create a headline with a coloured line for the frame title, while for other frames I want a classical headline with sections and possibly subsections. Here is the part of the code I use:               \defbeamertemplate*{headline}     {  \ifnum\c@framenumber>1         \leavevmode%         \hbox{%         \begin{beamercolorbox}[wd=\paperwidth,ht=\headerheight,dp=0pt]{}%            \ifx\insertsection\@empty            \else            {            {\usebeamerfont{headsection}\hspace{1em} \color{LightBlue}\insertsection}               \ifx\insertsubsection\@empty               \else               {\hspace{0.5em}$\vert$ \hspace{0.5em}{\usebeamerfont{headsubsection}\color{DarkGray}\insertsubsection}}%             \fi            }            \fi         \end{beamercolorbox}%         } %       \vskip0pt%       \else         \hbox{%         \begin{beamercolorbox}[wd=\paperwidth,ht=20pt,dp=0pt]{linemid}         \end{beamercolorbox}%         }       \fi     }      In such a way I obtain a result which is not satisfactory because the coloured line in title frame is OK, but sections and subsection of the following frames (and so the title and the body of the frame) are shifted down. It seems that beamer keeps the space reserved for the first headline, but I don't want that. Is there a way to fix the problem?


title: Variable itemize indentation on Beamer slides

text: I'm not sure if what I want is possible at all, but asking doesn't hurt... I've adjusted the `itemize` environment so that the item text is aligned with the text outside the environment. This might look strange, but since I never use itemized and non-itemized text on the same slide, it's not a problem. A problem arises if I use `itemize` inside a `block` environment. In this case, the bullets are positioned outside of the box -- which is definitely not what I want. Can I somehow distinguish between `itemize` environments inside a block and the ones outside a block and set the `\leftmargini` accordingly?               \documentclass{beamer}     \usetheme{default}     \usecolortheme{crane}     \setbeamertemplate{itemize/enumerate body begin}{\setlength{\leftmargini}{0pt}}     \begin{document}       \begin{frame}         This is a text.         \begin{itemize}           \item This is an item.           \item This is another item           \begin{itemize}             \item with a subitem             \item and another subitem           \end{itemize}         \end{itemize}          \begin{alertblock}{Just A Block}           This is a text in a block.           \begin{itemize}             \item This is an item in a block.             \item Another item.           \end{itemize}         \end{alertblock}       \end{frame}     \end{document}      ![example](http://i.stack.imgur.com/s0ulE.png)


title: biblatex hack -- how to remove parenthesis made by footcite in a footnote?

text: Although the biblatex-dw package should be more appropriate for citing in footnotes, I prefer the verbose-* styles built-in Biblatex because those do not use a `See note n°` system, which I do not like. Besides, I am using LyX which citation button simply makes `\cite` and I don't think it is possible to change that. So I am using a trick to convert all citations to footnode citations (`\let\cite=\footcite`). So here's my problem: when using \footcite (automaticly converted by the `\let` trick) in a footnote, parenthesis are added, which cripples my layout. Could someone point me out some tricky command or some place in the source of biblatex (if relevant) where I could disable this adding of parenthesis?               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage[english,ngerman,frenchb]{babel}     \usepackage{csquotes}          \usepackage{filecontents}     \begin{filecontents}{file.bib}     @BOOK{fujimotouk,       author = {Takahiro Fujimoto and Joe Tidd},       title = {The UK and Japanese Auto Industry: Adoption and Adaptation of Fordism},       year = {1993},       series = {Imperial College working paper},       langid = {english}     }     @UNPUBLISHED{entretiengerant,       title = {Entretien avec le gérant de Destock Pièces Auto à Aulnay-sous-bois         qui travaillait à l'époque chez Mercedes avenue de la grande armée},       year = {2012},     }     \end{filecontents}          \usepackage[style=verbose-trad3,backend=bibtex8,autolang=hyphen,     language=auto]{biblatex}     \renewcommand*{\newunitpunct}{\addcomma\space}     \renewcommand*{\mkibid}{\emph}     \let\cite=\footcite     % first name first in bib     \DeclareNameAlias{sortname}{first-last}     \addbibresource{file.bib}     \begin{document}     \footnote{Some text \cite{fujimotouk}.}     \footnote{\cite{entretiengerant} Some text.}     \end{document}      gives, ![result](http://i.stack.imgur.com/z7NRX.jpg) Thanks


title: Margins in \framebox

text: I have the following code:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \framebox{\begin{tikzpicture}[color=black, line width=0.4mm]         \draw (0,0) rectangle (5mm,5mm);     \end{tikzpicture}}     \end{document}      Result is ![enter image description here](http://i.stack.imgur.com/vmpJO.png) **The question is:** How to remove margins around the box in tikzpicture environment?


title: no \bibdata and no \bibstyle found in main.aux

text: Simply I can not compile my bibliography file. How can I fix this issue?               The top-level auxiliary file: main.aux     I found no \citation commands---while reading file main.aux     I found no \bibdata command---while reading file main.aux     I found no \bibstyle command-      My operating system is Ubuntu 14.04. This is the first time I am trying to use texmaker on Ubuntu. I did not face this issue with Windows 7. This template is taken from somewhere else.                   %\documentclass{acm_proc_article-sp}     %\documentclass{sig-alternate}          \documentclass{IEEEtran}               %\usepackage[nocompress]{cite}          \usepackage{biblatex}     \addbibresource{main.bib}               \usepackage{listings}     \usepackage{lscape}     \hyphenation{de-pen-dent}          \newtheorem{definition}{Definition}               % WORKS     %\DeclareFontShape{OT1}{cmtt}{bx}{n}{<5><6><7><8><9><10><10.95><12><14.4><17.28><20.74><24.88>cmttb10}{}          \renewcommand{\ttdefault}{lmtt}          \makeatletter       \renewcommand{\verbatim@font}{       \small\ttfamily\bfseries\catcode`\<=\active\catcode`\>=\active     }     \makeatother                 \begin{document}          \title{title here}               \IEEEcompsoctitleabstractindextext{          \begin{abstract}     ABSTRACT HERE     \end{abstract}          \begin{keywords}     [TODO]     \end{keywords}}          \maketitle          \IEEEdisplaynotcompsoctitleabstractindextext          \IEEEpeerreviewmaketitle          %\input{intro}     %\input{background}     %\input{methodology}     %\input{experiments}     %\input{threats}     %\input{related}     %\input{conclusion}               %\section{Acknowledgments}           \small     %\bibliographystyle{plainnat}               \nocite{*}     \printbibliography          \normalsize          \appendices     %\input{appendices}          \end{document}      You may think that there are lots of duplicates but believe me I am searching google and stackowerflow for hours. Nothing worked.


title: Using a custom TrueType font in spans of text

text: I am putting together a book using pdfTeX (from the TeX Live distribution on OSX), and part of the book involves a fictional dictionary for a constructed language. What I would like to do is define a command called, say, `\conlang` which switches to what is essentially a symbol font for the duration of that command. The .ttf also needs to be embedded in the .pdf. I have found a number of tutorials on how to change the font family for the entire book, and I have found tutorials on how to change the font when using a package-specified font, but nothing for how to build the commands that actually load the fontfamily and make it available without building an entire package.


title: adding doi-hyperlinks to journal, volume, issue, year, pages in the bibliography

text: I am trying to make a hyperlink in my bibliography referring the doi-url. The url begins with journal name and ends with the pages. Do to this I am using the code provided by Mateus Araújo in hyperlinks in biblatex. Unfortunately this also changes the style. For example, a normal reference looks likes this ![enter image description here](http://i.stack.imgur.com/twjdq.jpg) But after adding the code do make the doi-hyperlink, it adds a dot after year and starts with a an uppercase letter. ![enter image description here](http://i.stack.imgur.com/du6qw.jpg) I would like to remove the dot and start with a lowercase letter, but don't know how do that. Here is a the code:               \documentclass{article}     \usepackage[backref=true]{biblatex}     \usepackage[colorlinks]{hyperref}     \bibliography{biblatex-examples}          \ExecuteBibliographyOptions{doi=false}     \DeclareFieldFormat{doilink}{     \iffieldundef{doi}{#1}     {\href{http://dx.doi.org/\thefield{doi}}{#1}}}          \DeclareBibliographyDriver{article}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{title}%       \newunit       \printlist{language}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{bytranslator+others}%       \newunit\newblock       \printfield{version}%       \newunit\newblock       \usebibmacro{in:}%       \href{http://dx.doi.org/\thefield{doi}}{%       \usebibmacro{journal+issuetitle}%       \newunit\newblock       \usebibmacro{byeditor+others}%       \newunit\newblock       \usebibmacro{note+pages}}%       \newunit\newblock       \iftoggle{bbx:isbn}        {\printfield{issn}}        {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \newunit\newblock       \usebibmacro{pageref}%       \usebibmacro{finentry}       }          \begin{document}     \cite{kastenholz}     \printbibliography     \end{document}


title: unknown cbyeditor in biblatex-chicago

text: The `biblatex-chicago` extension yields unknown **cbyeditor** and **cbytranslator** terms when `footcite` is used and probably the `french` option in `babel`. The main file is:               \documentclass[12pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{kpfonts}     \usepackage[frenchb]{babel}     \usepackage{csquotes}     \usepackage[backend=biber]{biblatex-chicago}     \bibliography{Bibliography.bib}      \defbibheading{bibempty}{}           \begin{document}     \section{Text}     Text\footcite{Brisson}     \section{Bibliography}     \printbibliography[keyword=TradPlat,heading=bibempty]     \end{document}      and the `Bibliography.bib` file is:               @inbook{Brisson,       author = {Luc Brisson},       title = {Les traditions platonicienne et aristotélicienne},       address = {Paris},       publisher = {Presses Universitaires de France},       year = {1998},       editor = {Monique Canto-Sperber},       pages = {595-671},       keywords = {TradPlat},       series = {Premier cycle},       booktitle = {Philosophie grecque}     }      The result with this **cbyeditor** term is given below. This has already been reported on the net with no clear solution to my knowledge. I would say that this related to the `french.lbx` file. ![enter image description here](http://i.stack.imgur.com/g6VcS.png)


title: Getting BibTex to work in the first place

text: I've been writing my thesis for a month now, and haven't gotten any further than fighting with bibliography-related issues. I've boiled down all the problems I'm having into something very simple with BibTex. It seems I can't get BibTex to work at all. To test, I've done a very basic LaTeX document, a very basic bibliography file. Please find attached screenshots of them. I'm using TeXworks (what else is there for Mac?). In the screenshots you can see that the PDF I get is unable to connect my citations from the .tex file to the .bib file. Why is this? ![.bib](http://i.stack.imgur.com/Xombf.png) ![.tex](http://i.stack.imgur.com/KNtau.png) ![Compiled document](http://i.stack.imgur.com/FsK3H.png)


title: Power indices on the left side

text: I'm using `{^2K}` to write the indices on the left side, but when I do so I get an unwanted space between `2` en `K`. Is there another way to write the "power" indices on the left side?               \section*{text}     \fbox{\parbox{38em}{     \textbf{text}      \textit{text}     \begin{eqnarray}     f^{(M)}(z)\underbrace{(K_1,K_2,\ldots,K_M)}_\text{operandi}= \sum\limits_{i=1}^m \sum\limits_{j_1=1}^m \sum\limits_{j_2=1}^m \ldots \sum\limits_{j_M=1}^m {^if_{j_1 j_2\ldots j_M}}{^{j_1}K_1}{^{j_2}K_2}\ldots{^{j_M}K_Me_i},     \end{eqnarray}     waarbij $z$ het argument is en     \begin{eqnarray}     K_t &=& [{^1K_t, ^2K_t,\ldots, ^mK_t}]^T \in \mathbb{R}^m, \qquad t = 1,2,\ldots,M, \nonumber \\     {^if_{j_1 j_2\ldots j_M}} &=& \frac{\partial^M{^if(z)}}{\partial^{j1}z\partial^{j2}z\ldots\partial^{jM}z},     \end{eqnarray}     }      The result that I get is this I'd like to make the sapce there smaller, or to write {^2K_t} in another away. PS how can I remove the unwanted space here


title: aligning vector column

text: I have the next latex code:               $$\begin{align*}\pi(X)f(x) = \frac{d}{dt}\Pi(e^{tX})\vert_{t=0} f(x) &= \frac{d}{dt}          (\Pi(e^{tX})f(x))\vert_{t=0})= \\          &=\frac{d}{dt}(f(e^{-tX}x))\vert_{t=0} & \\            &= \nabla_{\xi} f \l`enter code here`eft(-\[ \left( \begin{array}{ccc}          X_{11} & \cdots & X_{1n} \\          \vdots & \cdots & \vdots \\               X_{n1} & \cdots & X_{nn} \end{array} \right)\] \right) \[ \left( \begin{array}{ccc} \xi_1           \\ \vdots \\ \xi_n \end{array} \right) \] &\\           &= -\sum_{i,j}X_{ij}\xi_j \frac{\partial f}{\partial \xi_i} &\end{align*}$$      and the attached pic of what is shown: ![enter image description here](http://i.stack.imgur.com/RlcaS.png) My problems are:   1. there's a missing right bracket for the matrix with the minus sign symbol, how do I fix this?   2. the \xi's column vector is not placed at the right place it should be to right after the second right bracket which is missing from the output, and not placed above there, how to fix this?   3. the last equality should be aligned with the rest of the equalities i.e the equality should be placed beneath the rest of the equalities and not as it's displayed. Any ideas as to how to fix this? Thanks in advance, your help is much appreciated.


title: Resetting a macro counter to 0

text: I have a macro that is disabled after one use. The worksheet works fine until I need to clean the entire sheet and reuse it the next week. How do I reset the macro counter to zero so that I can use the macro again?


title: Help to draw an arrow in TikZ

text: How to draw a red arrow to make it look like the rest of the arrows in the picture? How to define the parameters for the red arrow: line thickness, width, start and end? ![enter image description here](http://i.stack.imgur.com/WF33D.jpg)               \documentclass[12pt,landscape]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{calc, trees, positioning, arrows, shapes, shapes.multipart, shadows, matrix, decorations.pathreplacing, decorations.pathmorphing}     \begin{document}     \centering     \begin{tikzpicture}[scale=1.0, transform shape, >=stealth', on grid, node distance=5.2em, ultra thick,     cyl1/.style={color=black, cylinder, draw, shape border rotate=90, aspect=0.15, text width=5.5em, minimum height=6.5em, minimum width=2em, align=center}]     \node[rectangle, draw, minimum height=14em, minimum width=7em, align=center](obj_u){\textbf{Xxxxxx}\\\textbf{xxxxxxxxxx}};     %     \node[cyl1, xshift=16.9em, yshift=4em, right=of obj_u](xfd){xxxx xxxx xxxx};     \node[cyl1, xshift=16.9em, yshift=-4em, right=of obj_u](xed){xxxx xxxx xxxx};     %     \node[single arrow, draw, align=center, xshift=10.5em, yshift=4em, rotate=0, minimum height=14em](potok1){xxxx xxxx\\xxxx xxxx};     \node[single arrow, draw, align=center, xshift=10.5em, yshift=-4em, rotate=0, minimum height=14em](potok2){xxxx xxxx\\xxxx xxxx};     %     \node[rectangle, draw, minimum height=14em, minimum width=4em, align=center, xshift=30em, right=of obj_u](glpr){\textbf{XXXX}};     %     \node[double arrow, draw, align=center, xshift=1.9em, rotate=0, minimum width=2.5em, right=of xfd](inf1){Xxxxxxxxxx};     \node[double arrow, draw, align=center, xshift=1.9em, rotate=0, minimum width=2.5em, right=of xed](inf2){Xxxxxxxxxx};     %     \draw[line width=2ex, -triangle 60, red,              postaction={draw, color=white,line width=1.5ex,shorten >=.25ex,shorten <=.5ex}]             (glpr.north) -- ($(glpr.north) + (0,3em)$) -| (obj_u.north);     \end{tikzpicture}          \end{document}


title: Koma Script and real 13pt

text: I read about these several questions, how to use a font size other than 10, 11 oder 12 (see e.g. this one) using KomaScript, but somehow, that won't work for me. I use XeLaTeX to compile my document (in order to change the font also, but the problem already occurs without that). Then using the MWE               \documentclass[fontsize=13,DIV=12]{scrbook}     \usepackage[no-math]{fontspec}     \usepackage{xunicode,xltxtra}           \begin{document}         Dieser Text sollte in Schrift 13pt sein, ist aber 12pt     \end{document}      The warning then is > LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <13> not available > > (Font) size <12> substituted on input line 1366. Which i suspect is due to `OT1` but how do I tell XeLaTeX to use `T1` (also because it's a german text, as the MWE might already suggest)?


title: does the doc folder contain only documentation?

text: I'm trying to get rid of some junk on my hard drive and want to make sure I don't delete anything vital, so it's probably a dumb question. In my latex tree there is the texmf-dist/doc folder which is over 2GB in size. Does that contain only documentation? I presume so, and given the fact that I usually look up documentation online I'd like to delete it.


title: How to zoom a portion of TiKZ picture?

text: I want to draw a small rectangle within a tikz picture, then zoom it out somewhere. I skim through the PGF manual but I couldn't find a way to put the logic together. So far I've just drawn the automaton diagram, I had to hack the blue rectangle with "paint" though :(. Anyone could help me out with this? Thank you. ![enter image description here](http://i.stack.imgur.com/9Pg0u.png) **Minimal Working Example**               \documentclass[10pt,letterpaper]{article}     \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}          \usepackage[version=0.96]{pgf}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes,automata,backgrounds,petri,positioning}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{decorations.shapes}     \usetikzlibrary{decorations.text}     \usetikzlibrary{decorations.fractals}     \usetikzlibrary{decorations.footprints}     \usetikzlibrary{shadows}          \begin{document}         \begin{center}             \begin{tikzpicture}[shorten >=1pt, node distance=3cm, auto, on grid, initial text=,font=\small,>=stealth',                 every state/.style={minimum size=7mm,draw=black!50,very thick,fill=red!50}]             \node[state,initial]        (S)                 {S};             \node[state]                (A) [right=of S]    {A};             \node[state]                (B) [below=of S]    {B};             \node[state,accepting]      (C) [right=of B]    {C};             \path[->]             (S) edge[bend right]    node{a} (A)             (S) edge[bend right]    node[xshift=-4mm]{$\lambda$} (B)             (A) edge[bend right]    node[yshift=5mm]{a,b} (S)             (A) edge[]              node{$\lambda$} (C)             (A) edge[]              node[yshift=7mm]{b} (B)             (B) edge[bend left]     node{b, $\lambda$} (C)             (B) edge[bend right]    node[xshift=4mm]{a} (S)             (C) edge[bend left]     node{a,b} (B)                  ;              \end{tikzpicture}         \end{center}     \end{document}


title: How to line-break cites correctly (hanging-over problem)?

text: while using Bibtex, I experienced an frustrating issue with line-breaks on cites in my block text. I have chosen to use the following bibtex implementation:               \bibliographystyle{plain}     \bibliography{library}      No voodoo here. Nevertheless, this leads to the following composition: ![](http://i.imgur.com/OvOOHd8.png) The cite is not line-broken correctly. I assume many other users have already experienced that hanging-over problem either. Can someone help me how to fix that LaTeX is compiling the cite correctly in a way that it nicely integrates itself into block structure? EDIT: Rephrasing makes it hard to monitor the whole 300 pages every time I recompile the document due to some minor modifications. I know that many use suggest to rephrase the text but I would like to ask for a more professional solution here.


title: tufte-handout font problem

text: I am trying to use tufte-handout class for a document. I have the required packages installed. I am trying to compile the sample tex (sample-handout.tex) file from the project site http://code.google.com/p/tufte- latex/downloads/detail?name=tufte-latex-3.5.0.zip. But I am getting problems with font generation. The log file is appended below. It seems to not being able to generate some fonts:               kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+408/600 --dpi 408 fvmr8r     mktexpk: don't know how to create bitmap font for fvmr8r.      mktexpk: perhaps fvmr8r is missing from the map file.     kpathsea: Appending font creation commands to missfont.log.     !pdfTeX error: pdflatex (file fvmr8r): Font fvmr8r at 408 not found     ==> Fatal error occurred, no output PDF file produced!      I have tried `udpmap-sys` and also `updmap --enable Map=pazo.map` `updmap --enable Map=fpls.map`. But the error persists. Any ideas?


title: Citations in footnotes appear on a wrong page with the "twoside" option of scrreprt

text: For my work I'm using `scrreprt` and `biblatex` with the custom citation command from this answer. With the one-sided layout everything works fine but if I use `twoside` option then sometimes references in footnotes appear not on the same page as the footnote mark but move to the next page or further. Here is an MWE which shows the problem:               \documentclass[b5paper,headinclude=true,DIV=12,toc=bibliographynumbered,     %twoside%<- uncomment this     ]{scrreprt}     \usepackage{lipsum,hyperref}     \hypersetup{pdfborder={0 0 0},colorlinks=true,unicode}     \usepackage[style=chem-acs,sorting=none,citetracker,pagetracker,backend=biber]{biblatex}     \addbibresource{biblatex-chem.bib}          \makeatletter          % user-level citation command     \DeclareCiteCommand{\sfcite}[\cbx@superscript]         {\usebibmacro{cite:init}%             \let\multicitedelim\supercitedelim             \iffieldundef{prenote}{}{\BibliographyWarning{Ignoring prenote}}%             \iffieldundef{postnote}{}{\BibliographyWarning{Ignoring postnote}}}         {\usebibmacro{citeindex}%             \usebibmacro{cite:super:foot}%             \usebibmacro{cite:comp}}         {}         {\usebibmacro{cite:dump}}          % initialize or save last instcount, save key if seen first on page     \newbibmacro*{cite:super:foot}{%         \xdef\cbx@key{\thefield{entrykey}}%         \ifciteseen{}{\csnumgdef{cbx@instcount@\cbx@key}{-100}}%         \ifsamepage{\value{instcount}}{\csuse{cbx@instcount@\cbx@key}}             {}{\listxadd{\cbx@savelist}{\cbx@key}}%         \csnumgdef{cbx@instcount@\cbx@key}{\value{instcount}}}          % citation output     \newrobustcmd*{\cbx@superscript}[1]{%         \global\toggletrue{cbx@sfcite}         \mkbibsuperscript{#1}% Footnote's superscript in lining figures         \cbx@footnote%         \global\togglefalse{cbx@sfcite}}     \let\cbx@savelist\@empty     \newtoggle{cbx@sfcite}          \AtEveryCitekey{\iftoggle{cbx@sfcite}{}{\cbx@footnote}}          % prints footnotes if last reference on page     \newrobustcmd*{\cbx@footnote}{%         \ifboolexpr{ test {\ifsamepage{\value{instcount}}{\value{instcount}+1}}                   or test {\ifdefempty{\cbx@savelist}} }         {}         {\cbx@sortlist@init%         \let\do\cbx@do         \dolistloop{\cbx@sortlist}%         \global\let\cbx@savelist\@empty}}          % list handler that prints footnotes in order     \def\cbx@do#1{%         \ifinlist{#1}{\cbx@savelist}             {\begingroup                 \blx@getdata@cite{#1}%                 \blx@setoptions@type\abx@field@entrytype                 \blx@setoptions@entry                 \footnotetext[\thefield{labelnumber}]{%                 \blx@driver\abx@field@entrytype}%             \endgroup}             {}}          % internal list of sorted entry keys     \def\cbx@sortlist@init{%         \ifcsundef{blx@sort@\the\c@refsection}             {\global\letcs{\cbx@sortlist}                 {blx@slists@\the\c@refsection @entry@\blx@sorting}}% Biber             {\global\letcs{\cbx@sortlist}{blx@sort@\the\c@refsection}}}% BibTeX     \let\cbx@sortlist\@empty          \makeatother     \begin{document}     \chapter{First Chapter}     \section{Section}     \subsection{Subsection}     \lipsum*[1]%     \sfcite{Arduengo1991,Booth1962,Augustine1995,Coghill2006}          \lipsum*[2]%     \sfcite{Danopoulos2008}          \lipsum*[3-5]%     \sfcite{Dehnicke1981,Smidt1959}          \lipsum*[5-6]%     \sfcite{Rees2000}          \lipsum*[1-2]          \printbibliography     \end{document}      If I uncomment `twoside` in the MWE and run `pdflatex`, `biber`, `pdflatex` then all footnote references appear in the right place but I need to run `pdflatex` one more time to get Bibliography in the Table of Contents of the pdf file. And after this run references 6 and 7 move to the next page. The question is why it happens and how to fix this.


title: Need help with making Logic Trees in qtree/tikz-qtree (i.e. aligning, numbering lines)

text: I would like to make something similar to the logic tree below. I've tried using tikz-qtree, but I can't figure out how to number every line in the tree. I did however find something else doable in qtree. Here's a sample of my code (note that it's not the same tree as below)                   \documentclass[a4paper, english, 12pt, reqno]{article}\usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[norsk]{babel}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{mathtools}     \usepackage[shortlabels]{enumitem}     \usepackage{bm}     \usepackage{qtree}          \begin{document}     \maketitle{}          \section{}     \begin{center}     \begin{tabular}{c  c  c}     \Tree[.{1\\2\\ 3\\4} [.5  [.6 ] ] ] &     \Tree[.$A\supset B$\\$C\vee A$\\$\sim\sim C$\,\checkmark\\$C$ [.$C$ $s$ $s$ ][.$A$ $c$ $c$ ] ] &     \Tree[.SM\\SM\\SM\\3$\sim\sim$D [.3$\vee$D [.1$\supset$D ] ] ]     \end{tabular}     \end{center}          \end{document}      So I have some questions, which I hope will be able to help me get closer to a similar tree as in the picture. 1) My lines are not aligned horizontally, any ideas on how to fix that? 2) How can I remove the lines that connects the numbers, and the notation on the right side of the tabular enviroment? 3) This question is not about my code, but I will have this problem later. As you see on line 9 in the picture, there is a node all the way down to the 12th line, skipping the lines in between. How do I do this? I'm open for using tikz-qtree too, and I probably missed something in the manual, so I will try to read more, as I'm quite new to using qtree in LaTeX. Thanks in advance! ![Logic tree example](http://i.stack.imgur.com/9jyIr.png)


title: Defining a command that distinguishes between greek and roman letters?

text: I'm using pdftex and I want to define a command for the typesetting of quantum mechanical operators that produces upright letters with a `\hat` accent. The problem is that the obvious solution               \newcommand*{\op}[1]{{\hat{\mathrm{#1}}}}      does only work for roman letters but I also use at least one operator that should be represented by a greek letter for which the \mathrm command produces rubbish output. So it would be nice to define a command that distinguishes between greek and roman letters via an if statement. Since I have very little experience with TeX I don't really know how to tackle this problem.


title: How to concatenate strings into a single command?

text: I'd like to concatenate several parts of math text into a single command, and i read a great solution here on this site, allowing me to create this working example of what i mean :               \documentclass[a4paper,10pt]{report}     \usepackage[francais]{babel}          \def\reptemp{I love rain}     \global\edef\reptemp{\reptemp, but not too much.}          \begin{document}     \reptemp     \end{document}       Unfortunately for some reason it refuses to work with more complex things in it, for example               \documentclass[a4paper,10pt]{report}     \usepackage[francais]{babel}          \def\reptemp{I {\it love} rain}     \global\edef\reptemp{\reptemp, but \bf{not} too much.}          \begin{document}     \reptemp     \end{document}       produce the following error message               ! Missing control sequence inserted.     <inserted text>                      \inaccessible      l.16 \reptemp     ?      Of course i'd like to concatenate complex things by this method (environment, enumerate, etc) and i wonder if its possible.


title: Algorithm2e - Permanent fix for no italics if-clause

text: I am using algorithm2e to create pseudocode for my document. However, it has it so that the conditions in `if` clauses are italicised. This solution suggests putting an `\upshape` in each if condition. Is there a permanent fix to set the `if` condition to never be italics? For example               \documentclass{article}     \usepackage{algorithm2e}     \begin{document}          \begin{algorithm}     \Begin{         Flag $\leftarrow$ True\;         \If{Flag}{             DoSomething()\;         }     }     \end{algorithm}     \end{document}      I don't want `Flag` to be italicised without having to put an `\upshape` in the condition, or have to do multiple fixes for each condition in an algorithm.


Trying to compile this example:               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}[remember picture,overlay]          % A path that follows the edges of the current page     \tikzstyle{reverseclip}=[insert path={(current page.north east) --     (current page.south east) --     (current page.south west) --       (current page.north west) --       (current page.north east)}     ]          \coordinate (A) at (0,0);     \coordinate (B) at (1,0);     \coordinate (C) at (1,1);          \begin{pgfinterruptboundingbox} % To make sure our clipping path does not mess up the         placement of the picture     \path [clip] (A) -- (B) -- (C) -- cycle [reverseclip];     \end{pgfinterruptboundingbox}          \draw[thick] (A) circle (2mm);     \draw[thick] (B) circle (2mm);         \draw[thick] (C) circle (2mm);             \end{tikzpicture}     \end{document}      But I got the error: I do not know the key '/tikz/insert path' My Tikz version is tikz.code.tex,v 1.76 2010/10/13 09:20:31 Could you help me?


title: Irregular position of page number in ToC

text: I have a problem with position of a page number in ToC, they are on the left instead of being on the right: ![example](http://i.stack.imgur.com/JtO1f.png) The MWE for such behaviour (don't mind the last word, I had to play with the length of the title):               \documentclass[a4paper, 12pt]{book}     \begin{document}     \tableofcontents     \part{Regulating two-sided markets of electronic commu}     Lorem ipsum     \end{document}      Is there any way to correct this?


title: Problem with external graphics and 3D pgfplots

text: I want to include an external graphics with pgfplots. I tried to follow the instructions of the manual (p45 et seq.) as carefully as possible. But the result is hoorible as hell. Here is the code I am using:               \documentclass[12pt,twoside,a4paper]{report}     \usepackage{tikz}      \usepackage{pgfplots}     \pgfplotsset{compat=1.6}     \begin{document}     \begin{tikzpicture}     \begin{axis}[     axis on top=true,     grid=both,minor tick num=1,     xlabel=$x$,ylabel=$y$,zlabel=$z$]     \addplot3 graphics[     points={%difference of canvas y coord. because pgfplots counts from the lower left.     (353,754.7,196) => (2,1192-944)     (356,757,198) => (476,1192-153)     (353,758.5,198) => (188,1192-1)     (356,753.3,196) => (242,1192-1192)      }] {Example.png};     \end{axis}     \end{tikzpicture}     \end{document}      And here is the graphics I try to include: ![graphics to be included](http://i.stack.imgur.com/L0vya.png) Here is the same graphics in which I marked in orange the 3D-coordinates and below in black the canvas coordinates (which I read out via paint). ![graphics with marked coordinates](http://i.stack.imgur.com/kbQJN.png) And here is the same graphics in a box (made with Mathematica) to show that I read out the coordinates correctly and to give an impression of the dimensions and the orientation: ![Graphics with coordinate system](http://i.stack.imgur.com/hZM0t.png) And here is the screenshot of the odd result: ![result ](http://i.stack.imgur.com/dstBJ.png) I guess I am doing something wrong. But I cannot find my mistake. Can somebody of you give me a hint?


title: Obfuscation of @ and . in e-mail addresses

text: I manage style files for an academic journal. A typical article will contain authors' email addresses, which we attempt to obfuscate in order to give some measure of protection against e-mail harvesters. _Our current strategy:_ We replace the `@` and `.` in e-mail addresses with bitmapped images of these symbols. (Specifically, we define new commands `\imageat` and `\imagedot` which print .pdf images of their respective characters; then an email address like me@place.com is typeset as `me{\imageat}place{\imagedot}com`.) This has some problems:   1. The images don't reflect the font or size of the surrounding text.   2. With this solution, our LaTeX distribution must include the .pdf of these images, which can lead to errors and confusion. _What I would like:_ I would like (you to tell me how) to define two commands `\crazyat` and `\crazydot` which have the effect of typesetting `@` and `.` in the current typeface, but appear as non-standard characters in the generated .pdf file. Specifically, I would like to _temporarily_ populate a little used part of the current font with the `@` and `.` so that they appear correctly, but make no sense to anyone else. (Other suggestions very welcome.) A few notes about other postings on this (and closely related topics):   1. I am aware of the `AccSup` package. It seems very appealing, but only Adobe Acrobat seems to play along. Specifically, the LaTeX line `My email address is \BeginAccSupp{ActualText={email address}}me@place.com\EndAccSupp{}` produces output that copies and pastes (in)correctly with Adobe Acrobat (giving the intended behavior) but misbehaves (so that copy/paste gives the e-mail address) on other .pdf readers. Anyway, I guess this will not fool an e-mail harvester. (See What can cause generated PDF document whose text are not correctly copyable?.)   2. I do not want to, e.g., simply replace the @ symbol with the text `[AT]`. I am dead set on this symbol actually appearing correctly in the .pdf document. (See How to redefine @ and . to obfuscate email addresses?.)   3. There seems to be a way to blow away the "cmap," which I do not understand. However, I would only like to be "locally" destructive--I would like the rest of the document to be well-formed. (See Is it possible to produce a PDF with un-copyable text?.)


title: Tex4ht, biblatex and biber: what is proper processing?

text:
How to run `htlatex` with biblatex bibliography included? That's the simplest example:               \documentclass{article}          \usepackage{biblatex}     \addbibresource{libr.bib}     \begin{document}          Text.\cite{dickens1881great}          \printbibliography     \end{document}      I run in that way:               latex main     biber main     htlatex main      At the last stage `htlatex` asks about "Undefined control sequence":               \blx@begunit ...penalty \@M \hskip -\blx@unitmark                                                    \relax \hskip \blx@unitmar...     l.7 Text.\cite{dickens1881great}      And there's a lot of such errors in log file, but htlatex allows to skip them. Also, the html are not so good. Lack of punctuation, formatting:
C.  DickensGreat ExpectationsPenguin  English  librarypt.  1Dent1881url:         http://books.google.com/books?id=fhUXAAAAYAAJ.      Is it the best result possible or I did something wrong?


title: Best Drawing software for engineering/scientific illustrations with LaTeX?

text: I will be writing my Master's thesis in Aeronautical Engineering and was wondering about the following: I will have lots of illustrations such as parts of aircraft, mechanical components, mathematical graphs and diagrams. I am sure you get the idea. I found info on Metapost, TikZ, Inkscape, xypic, xfig, graphviz although I am not sure which is best at which. I think TikZ is very good for mathematical/geometric illustrations. But, what would you suggest for drawing the rest? Probably we are talking about vector graphic editor such as Adobe Illustrator, Inkscape etc. But which is the best for LaTeX? Sorry if my question seems about confusing, but it really represents the state I am in now.


title: Using epsfig - gives errors in Kile but compiles fine using pdflatex in terminal

text: \documentclass{article}     \usepackage{epsfig}          \begin{document}          \begin{figure}[ht!]         \centering         \epsfig{file=example.eps}     \end{figure}          \end{document}      When I compile with PDFLaTeX in Kile (I compile three times at least), I get an error each time that says "finished with exit code 1" and absolutely nothing else in the log. If I go to the terminal (I'm on Mac OS) and do `pdflatex example.tex`, then it compiles. And if I go back to the Kile editor and try to compile it again, it works after this! Any have some insight here? It's a bit bizarre but not a huge deal since I'm getting it to compile in the end anyway...


title: Examples of "styles" for section headings with memoir

text: The `memoir` class is a popular choice for writing nice looking documents. Memoir gives you a lot of control over how section headings and so on look. Memoir doesn't, however have the nice shortcuts that change all the commands at once, so you have to have, for example:               \setsecheadstyle{\LARGE\scshape\raggedright}     \setsubsecheadstyle{\large\scshape\raggedright}     \setsubsubsecheadstyle{\normalsize\scshape\raggedright}     \setbeforesecskip{-1.5ex plus -.5ex minus -.2ex}     \setaftersecskip{1.3ex plus .2ex}     \setbeforesubsecskip{-1.25ex plus -.5ex minus -.2ex}     \setaftersubsecskip{1ex plus .2ex}      That is, you need a styling command for each level, plus two spacing commands for each level (note even this doesn't change paragraph styling or, in fact, spacing for subsubsec). So what I'd like, as answers to this question are collections of memoir section styling commands that look nice and are consistent. The idea would then be to collect them, give them names, and offer them as a package, or suggest they be included in a future version of memoir. How exactly the restylings would be called in the document is as yet undetermined (simplest would be just to have each one a macro: `\def\makesectionssc{\setsecheadstyle{etc...` For chapter headings, memoir _does_ contain nice quick commands for globally modifying the chapter headings, but it doesn't extend to lower levels. So ideally, I'd like the suggestions below to also have a "serving suggestion" of which chapter styles they fit with. The `titlesec` package provides nice package options for a quick way to modify all section commands consistently. So `\usepackage[small,compact]{titlesec}` makes all the sectioning commands smaller, and shrinks the spacing. Titlesec is sort of compatible with memoir. If you use titlesec, it overwrites all your memoir commands, however. So a memoir only solution is preferred.


title: pgfplots- Adding a mark at the origin

text: I'm trying to show the beginning of a sketch of the graph y=xe^x, and this is what I have:                   \documentclass[10pt]{article}         \usepackage{tikz}         \usepackage{pgfplots}         \usetikzlibrary{arrows}              \begin{document}              \begin{figure}            \begin{tikzpicture}            %draw and label axis         \draw[->] (-4.3,0) -- (4.3,0) node[right] {$x$};         \draw[->] (0,-4.3) -- (0,4.3) node[above] {$y$};            \draw[smooth,samples=100,domain=-4:-2.5] plot(\x,{\x*exp(\x)}) ;            \draw[smooth,samples=100,domain=0.8:1] plot(\x,{\x*exp(\x)}) ;                  \end{tikzpicture}            \label{figure 1:} \caption{\label{fig:I1f010}Beginning a sketch of $y=xe^x$.}             \end{figure}       \end{document}      This gives me the plot I want, but I would like to add an unlabelled point (black, and filled in) at the origin. How could I do this?


title: How to document a expl3 macro using dtx

text: I am writing the documentation to a package implemented in `expl3` using `ltxdoc`, and the relevant part would look like               % \begin{macro}{\conteq_args_once}     % Some explanation     %     %    \begin{macrocode}     \cs_new:Npn \conteq_args_once:Nn #1#2 {        \exp_not:o {#1 {#2}}     }     \cs_generate_variant:Nn \conteq_args_once:Nn {NV}     %    \end{macrocode}     % \end{macro}      Unfortunately, this give me               ! Missing $ inserted.     <inserted text>                      $     l.385 % \begin{macro}{\conteq_args_once}      but `\conteq\_args\_once:Nnn` does not work either. How do I correctly annotate the documentation for such a function?


title: XeLaTeX does not find fontspec any longer after TeXLive update

text: I am using XeLaTeX in TeX Live suites 2010 and everything was going well before I did an upgrade via TeX Live Manager minutes ago. Now every document I compile gets a "File not found" error as the title suggests. But actually `fontspec.sty` is lying well under `texlive\2010\tex\latex\fontspec` so I don't understand why it complains about that. Does anyone have the same situation?


title: A frame option in beamer that I can't figure out [h]

text: Does anyone know what               \begin{frame}[h]       Content     \end{frame}      does? I can't seem to find it in the beamer user manual.


title: key [turn] doesn't

text: According to the manual (http://www.ctan.org/pkg/pgf p. 142) the following code is sound               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}       \draw (0,0) -- (1,1) -- ([turn]-45:1cm) -- ([turn]-30:1cm);     \end{tikzpicture}     \end{document}      (actually, this is just an example from the manual). Unfortunately, I get the error that "tikz/turn" is unknown. What's wrong? Perhaps this key is part of some library (in contradiction to the manual)?


title: Column width table in tabularx environment

text: ![enter image description here](http://i.stack.imgur.com/R6ldZ.png) This stuff is probably a bit cluttred, but anyways: The problem I am experiencing is that I would like to make a correlation matrix as the one depicted above, but the width of the maturity column should be smaller, such that all the columns are almost equally spaced. That is, the "maturity column should have a small gap before we get to the numbers (probably achieved through specifiying left (as all the other are centred). Everything else should stay the same...Please let me know how you change the column width in this modified table..               \documentclass[12pt]{article}     \pagestyle{plain}     \usepackage[english]{babel}       %%%%%%%%%%%%%%%SUPER TABLE%%%%%%%%%%%%%%%%%%%%     %the float environment is necessary for the table setup.     \usepackage{float}     \makeatletter     \newcommand\fs@topruled{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@ruled       \def\@fs@pre{\hrule height.8pt depth0pt \kern2pt}%       \def\@fs@post{}%       \def\@fs@mid{}%       \let\@fs@iftopcapt\iftrue}     \makeatletter     \floatstyle{topruled}     \restylefloat{table}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %TABLE type 2     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{tabularx,booktabs,caption}% http://ctan.org/pkg/     \captionsetup[table]{%       labelsep = newline,       textfont = sc,        name = TABLE,        skip = \medskipamount}     %\newcolumntype{d}[1]{D{.}{.}{#1}} % "decimal" column type     %%%%%%%%%%%%%%%New Commands%%%%%%%%%%%%%%%%     %%%      \usepackage{xpatch} %THE FOLLOWING IS RELATED TO FANCYHDR PACKAGE     \makeatletter     \xapptocmd{\@sect}{\csname #1mark\endcsname{#7}}{}{}     \makeatother                \begin{document}                     \begin{table}[h]       \caption{Correlation matrix}       \label{tab:Correlation matrix}       \begin{tabularx}{\linewidth}{@{} X r r r r r@{}}         \toprule[0.5pt]         \toprule[0.5pt]        \multicolumn{1}{l}{\small Maturity} & \multicolumn{1}{c}{\small 1} & \multicolumn{1}{c}{\small 3} & \multicolumn{1}{c}{\small 12} & \multicolumn{1}{c}{\small 36} & \multicolumn{1}{c}{\small 60}  \\           \midrule[0.5pt]           %        \multicolumn{1}{l}{1} & \multicolumn{1}{c}{1} & \multicolumn{1}{c}{} &  \multicolumn{1}{c}{} & \multicolumn{1}{c}{}\\     %     %          \multicolumn{1}{l}{3} &  \multicolumn{1}{c}{0.997} & \multicolumn{1}{c}{1} &  \multicolumn{1}{c}{} & \multicolumn{1}{c}{} \\       %       %           12 & \multicolumn{1}{c}{0.978} & \multicolumn{1}{c}{0.983} &  \multicolumn{1}{c}{1} & \multicolumn{1}{c}{}  \\         36 &  \multicolumn{1}{c}{0.937} & \multicolumn{1}{c}{0.940} &  \multicolumn{1}{c}{0.976} & \multicolumn{1}{c}{1} \\         60 & \multicolumn{1}{c}{0.915} & \multicolumn{1}{c}{0.914} &  \multicolumn{1}{c}{0.949} & \multicolumn{1}{c}{0.993}  & \multicolumn{1}{c}{1}\\            \bottomrule       \end{tabularx}            \medskip            \parbox{\linewidth}{\scriptsize%       \textsc{Note}:       We present the correlation matrix for five (5) different maturities. The sample period is from 2000:01 to 2014:02.}     \end{table}      Thank you guys! \end{document}


title: How to create minimum capacity .ps file

text: I have some images in my tex file. I had those images in .ps extension. When I create .ps file its capacity is more that 5mb. But I had to upload less that 1mb .ps file. So how can I do that ?


title: Forcing roman font in LaTeX

text: I am using a LaTeX template from my university to typeset my thesis. I am making references to R and I have defined a new command with:               \newcommand{\R}{R}      in order to get the roman "R". The formatting of the thesis means that chapter titles are written in a sans serif font. When I type a chapter title e.g. "\R{} source code" it does not appear in serif, rather in the same sans serif font at the rest of the title. Is there a way to force the "base" font to be used, regardless of which font is in use at that time? Sorry for no minimal working example - I'm just not sure which part of the preamble causes the chapter titles to be sans serif!


title: Building a 2D histogram with PGFPlots

text: # What I want to achieve The framework ROOT can create 2D histogram plots with colored boxes indicating count rate that looks something like: ![ROOT output of TH2F-style histogram.](http://i.stack.imgur.com/7KpK4.png) My question is really only: **can I produce this kind of 2D histogram through PGFPlots?** The rest of this post describes my current findings and attempts. * * * As of writing quite recently, ROOT got a TikZ output engine called `TTeXDump`, that in turn would generate: ![ROOT output of the above TH2F-histogram via the TTeXDump class.](http://i.stack.imgur.com/Ni3ZK.png) This is closing in on good graphical quality. The axis label texts are easily manually modified to TeX syntax (or it could be done in ROOT before the export), but there are other issues:   * Placement of labels, ticks, etc., are all done by raw coordinates (sample TikZ code output from `TTeXDump` describing the above image). To e.g. center the `x` label below the axis is thus not trivial, which makes it tricky to conform to a graphical layout that coincides with other plots made directly with PGFPlots.   * Since all graphical entities are statically defined, scaling will not yield transparent results. and probably other things. * * * # Own attempts I have made some attempts at generating the plot with PGFPlots from exported ROOT data. There are, however, several details that I do not get right, and perhaps there is a more obvious solution. By dumping the histogram bin data in the form               xcenter ycenter weight      in the file `scatter.csv` (Pastebin link of data), the following code gives the below result:               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usepackage{siunitx}          \begin{document}          \begin{tikzpicture}       \begin{axis}[         xlabel={$\theta$ /($\pi$ rad)},         ylabel={Energy /\si{\MeV}},         enlarge x limits=.02,         enlarge y limits=.02,         minor tick num=4,         xticklabel style={/pgf/number format/fixed},% exponential axis notation looks bad in this case         colorbar,         scatter/use mapped color={%           draw=mapped color,           fill=mapped color         }]         \addplot[           scatter,           scatter src=explicit,           only marks,           mark=square*,         ] file{scatter.csv};       \end{axis}     \end{tikzpicture}          \end{document}      ![Current PGFPlots rendering of the data.](http://i.stack.imgur.com/NLMoS.png) Fine-tuning of text, tick marks, colormap, etc., is easily done after this, but there are some issues with the data rendering:   1. The "bin" dimensions are emulated by the marker size, but it would be nice to input the bin numbers directly to set the marker sizes. This would also need to be done asymmetrically, since there will be a different amount of bins in the `x` and `y` direction. I have looked at `mark=cube*` with `cube/size x` and `cube/size y`, but have not successfully been able to change the mark dimensions. Currently, the marks are symmetric, which might look alright at a quick glance, but actually marks overlap in non-trivial ways and it is a deal breaker in itself.   2. The `enlarge x axis` and `enlarge y axis` values are inserted after inspection, to avoid the marks from protruding outside the axis. Rather, the axis distance should be automatically calculated from the marker size.   3. The data point markers are on top of the axis and tick marks, which is not optimal here. Force “axis on top” for plotmarks in pgfplots has some info on this, with somewhat convoluted solutions. Is there an even better way to be found here? Is the scatter plot approach taken above perhaps the wrong one? Some other thoughts have been:   * Perhaps I could use the scatter plot data directly and perform the binning with PGFPlots instead of exporting calculated bins. I can not find a way to do this though, and there is a potential risk of running into the memory limit.   * The initial ROOT output PDF could be stripped of axis, tick marks and titles, keeping only the graph surface. Then I could use `\addplot figure` to include this and paint the axis back on with PGFPlots. Numerical axis limits could be extracted from ROOT, so the scale should be able to be correctly reproduced. I have not looked into calibrating the colormap scale in PGFPlots from max/min values, but that should also be possible. There would perhaps be some alignment issues to solve. It would help automation if I could use the `TTeXDump` output, strip the statically defined axis, ticks, etc., and just use the generated TikZ commands for painting the graph body. I can not see a trivial way to combine this with `\addplot` though.   * The data output could have been defined in bin numbers instead of explicit coordinates, i.e.              1 10 11.0      for `x` bin 1, `y` bin 10 with value 11, instead of the current:              0.04580479262184749 0.0755985979686503 11.0      Since we also have the axis limits and bin amounts defined, this should really be all the info we need to build the histogram, but I do not find it to be trivial to perform. * * * # Conclusion That might seem like a lot of questions, but as mentioned initially, the kernel is really only a single one: **can I produce this kind of 2D histogram through PGFPlots?**