title: Tufte LaTeX not recognizing subequations and \usepackage[table]{xcolor}

text: I have a LaTeX document that I want to put in `tufte` format. However, when I compile it is not reconizing the `\begin{subequations}` (I used `\usepackage` and not accepting the `\usepackage[table]{xcolor}` that I used so my matrices have columns painted gray. Does anyone knows why this is happening? A minimal working example where I show the packages I used and the type of things I want to do:               \documentclass{tufte-book}          \hypersetup{colorlinks}     \usepackage{lipsum}     \usepackage{booktabs}     \usepackage{graphicx}     \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}     \graphicspath{{graphics/}}     \usepackage{fancyvrb}     \fvset{fontsize=\normalsize}     \usepackage{xspace}     \usepackage{units}          %Packages I included     \usepackage{transparent}     \usepackage[table]{xcolor}     \usepackage{listings}     \usepackage{amsthm}     \usepackage{bbm}          \begin{document}          \begin{align*}       \begin{array}{cc}           \cellcolor{gray!25} 2 & \cellcolor{gray!25} 3 \\           1 & 4         \end{array}         \right)}_{A}                 \left(         \begin{array}{c}           \cellcolor{gray!25} v_{1}  \\            \cellcolor{gray!25} v_{2}         \end{array}         \end{align*}           $A^{-1}$ is a matrix such that:      \begin{subequations}     \begin{align}     A \cdot A^{-1}&=A^{-1} \cdot A=I\,, \\     \left(A^{-1} \right) ^{-1}&=A\,, \\     \left( A^{t} \right) ^{-1}&=\left( A^{-1} \right)^{t}\,, \\     \left( A \cdot B \right)^{-1}&=B^{-1} \cdot A^{-1}\,.     \end{align}     \end{subequations}         \end{document}      Some of the errors:               ! LaTeX Error: Option clash for package xcolor.     ! LaTeX Error: Environment subequations undefined.      I use TexMaker and TeX Live 2012 (Mac OS 10.7.5) Thank you!


title: Is color undefined

text: I want to check whether a color has been previously defined, consider the below code which doesn't execute.               \documentclass{article}          \usepackage{xcolor}     \newcommand{\colorprovide}[2]{\ifx\undefined{#1}\colorlet{#1}{#2}\fi}          \begin{document}         %Initial Definition         \colorprovide{mycolor}{red}         \textcolor{mycolor}{Test 1}              %Will overwrite         \colorlet{mycolor}{green}         \textcolor{mycolor}{Test 2}              %Should NOT overwrite as it exists         \colorprovide{mycolor}{red}         \textcolor{mycolor}{Test 3}     \end{document}      In other words and analogous to `\providecommand{...}` not renewing an existing command if it exists, I need a macro which will will **NOT** redefine a color if the color has already been defined. The above code throws an error as the logical checking part `\ifx\undefined...` is incorrect.


title: Properly render unnumbered sections

text: I have added an `\ast` before every numbered section by adding `\titleformat{\section}{\Large\scshape\bf}{$\ast$}{.5em}{\thesection ~}`. However, it produces improper rendering for unnumbered sections. For this MWE,               \documentclass{article}     \usepackage{titlesec}          \titleformat{\section}{\Large\scshape\bf}{$\ast$}{.5em}{\thesection ~}          \begin{document}          \section{something}          %\titleformat{\section}{\Large\scshape\bf}{}{}{~}     \section*{somethig again}     %\titleformat{\section}{\Large\scshape\bf}{$\ast$}{.5em}{\thesection ~}          \section{something once again}          \end{document}      I am getting: ![](http://i.stack.imgur.com/yDh8X.png) I have also fixed this (remove the `%`'s from the code), but this process is cumbersome. For every non-real section, I need to add these two lines. What is a better way?


title: Insert bibtex file B in bibtex file A

text: Scenario: I manage citations with JabRef (inside Docear which sadly currently does not support the import of `.bib` files) and want to easily import citations from Zotero into the Jabref library. I'm thinking of automatically exporting Zotero citations to a `.bib` file and linking this from the Jabref `.bib` file (it seems not possible to append exports to an existing `.bib` file). Thus the question is, is there any command like input or subimport for LaTeX to import `.bib` files into other `.bib` files?


title: Justification of captions

text: I know there a few similar questions about this but the option `justification=justified` is not working properly on my figures. I'm getting everything but "Figure n:" justified, so the numbering labels are off justification. The same happens with `justification=centering`. I'm using option `\captionof{figure}`, can this be the problem?               \documentclass[12pt,twoside,titlepage,headinclude]{scrreprt}     \usepackage{graphicx}      \usepackage[font=small,labelfont=bf,justification=justified]{caption}     \begin{document}          \begin{center}\vspace{1cm}     \includegraphics[width=0.7\linewidth]{Image}     \captionof{figure}[Solar atmosphere temperature-height distribution.]{Solar atmosphere temperature-height distribution as determined by \cite{15}. Height is given in kilometers measured above zero point where $\tau=1$. Regions of line formation are also indicated. From right to left: photosphere, temperature minimum (4,000K), chromosphere, transition region (8,500K) and Lyman valley (20,000K).}     \label{fig:vernazza}     \end{center}\vspace{1cm}          \end{document}


title: Attempting to mimic the spacing from another line using \phantom and \mathrel doesn't work

text: Here is an example document.               \documentclass{amsart}          \begin{document}          We define two more $B$--symbols, $\zeta_1$ and $\zeta_2$, as follows: for each $x_J \in M(B)$ and each $j \in J$, $\zeta_1(B, J, j)$ and $\zeta_2(B, J, j)$ are integers given by:         \begin{align*}                \zeta_1(B, J, j) \; &:= \phantom{2} \mathrel{\phantom{\times}} |\{b \in B : b > j\}|             \\ \zeta_2(B, J, j) \; &:= 2 \times |\{b \in J : b > j\}|.         \end{align*}     We define the $B$--symbol $\zeta$ as follows: for each $x_J \in M(B)$ and each $j \in J$, $\zeta(B, J, j)$ is given by $\zeta_1(B, J, j) - \zeta_2(B, J, j)$.          \end{document}       Here is a close-up of the output: ![](http://i.stack.imgur.com/PXMy9.png) The relevant code used to attempt to add the correct amount of extra spacing is this bit:               \phantom{2} \mathrel{\phantom{\times}}      But this isn't spaced correctly. It produces slightly too much spacing, as you can see from the picture. How come?


title: Combining lmodern, charter and sourcecodepro fonts

text: I know, usually you should avoid many different fonts but I'd be happy with the following configuration:   * Title, Chapter, Section, ... and Description labels should use **bold Latin Modern Sans Serif**   * Text should use font from `charter` package   * and for teletype fonts I'd like to use Source Code Pro. (at least for listings in `lstlisting` environment) Currently I use the following configuration:               \documentclass[%         paper=A4,                   % paper size --> A4 is default in Germany         twoside=semi,               % onesite or twoside printing         openright,                  % doublepage cleaning ends up right side         parskip=half-,              % spacing value / method for paragraphs     %   chapterprefix=true,         % prefix for chapter marks         11pt,                       % font size         headings=normal,            % size of headings         bibliography=totoc,         % include bib in toc         listof=totoc,               % include listof entries in toc         titlepage=on,               % own page for each title page         captions=tableabove,        % display table captions above the float env         draft=true,             % value for draft version         dvipsnames     ]{scrbook}%          \usepackage[ngerman]{babel}     \usepackage{xcolor}     % Fonts     \usepackage{lmodern}     \usepackage{charter}     %\usepackage[semibold, extralight]{sourcecodepro}     % headings          \setkomafont{chapter}{\color{black}\huge\fontfamily{lmss}\selectfont} % for chapter entries     \setkomafont{section}{\color{black}\LARGE\bfseries\fontfamily{lmss}\selectfont} % for section entries     \setkomafont{subsection}{\color{black}\Large\fontfamily{lmss}\selectfont} % for section entries     \addtokomafont{subsubsection}{\fontfamily{lmss}\selectfont}     \setkomafont{paragraph}{\color{black}\fontfamily{lmss}\selectfont\small\bfseries}          \usepackage{setspace}     \onehalfspacing     \setlength{\parindent}{0em}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{listings}     \usepackage{blindtext}          \definecolor{background}{HTML}{EEEEEE}     \lstset{    tabsize=2,         basicstyle=\normalfont\ttfamily,         numbers=left,         numberstyle=\scriptsize,         stepnumber=1,         numbersep=8pt,         showstringspaces=false,         breaklines=true,         frame=lines,         backgroundcolor=\color{background},     %   commentstyle=\slshape,     %   identifierstyle=\mdseries,     }               \title{Title}     \author{Author}          \begin{document}          \frontmatter     \maketitle     \tableofcontents          \mainmatter          \chapter{First Chapter}     \blindtext     \section{First Section}     \blindtext     \subsection{First Subsection}     \blindtext     \subsubsection{First Subsubsection}     \blindtext     \paragraph{First Paragraph}     \Blindtext          \begin{lstlisting}     And here I'd like to see Source Code Pro     \end{lstlisting}               \end{document}      When I disable `sourcecodepro` then everything looks as expected except the teletype fonts but when I include `sourcecodepro` then headlines and description labels aren't bold anymore, they are very thin. ![No Source Code Pro but bold headlines](http://i.stack.imgur.com/0w6MG.png) ![Source Code Pro but thin headlines](http://i.stack.imgur.com/BiW9i.png) I want to have both, **bold headlines** and `source code pro`.


title: Figure position at bottom, when there is already one on top

text: I am working on a LaTeX paper, using `RevTex 4.1` and the package `graphicx` and compiling with `pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)`. When I include figures in my document, they will automatically be placed on top of the page, which is in principle desired behavior. However, what I want to achieve now, is that a second figure on the same page appears on the bottom, instead of on top, automatically. I am looking for a compact solution which requires as little modifications as possible. I am defining my figures using the `figure` environment and I am compiling with `latex`, which in my release is linked to `pdftex` if that matters. I know that I can use `\begin{figure}[b]` for the figures, but I am specifically looking for an approach that handles this for me automatically when needed. An minimal reproductive example would be as follows (note that this working example uses `article` instead `revtex-4.1`, but I would think that a solution that works for this example, would also work for my main document)               \documentclass{article}     \usepackage{graphicx}     \usepackage{lipsum}     \begin{document}          \lipsum[1-3]          \begin{figure}      \caption{Figure 1}     \end{figure}          \begin{figure}      \caption{Figure 2}     \end{figure}          \lipsum[4-6]          \end{document}      The document puts both figures on top of page 1.


title: Error: Command \" invalid in math mode on input line x

text: I'm receiving the following error               Command \" invalid in math mode on input line 60.       where my input lines 58-61 are               \begin{equation}     \label{1}     \Delta x=x_{efter}-x_{före}     \end{equation}      The problem doesn't to be the `\Delta`. The problem seem to come from `x_{efter}-x_{före}`. I have tried to use `$....$` but it doesn't work. I'm new to LaTeX but I think I have imported the correct packages.


title: title page in the same page with other elements

text: I created a title page with command:               \title     \author      but when I add in the page of the title some elements another page is created and the title is in that new page created. How can I join title and other element such as figures in only one page?               \begin{titlepage}          \includegraphics[width=0.25\textwidth]{Immagini/unict}          \title{Scelta di un progetto di investimento}     \author{Vincenzo Pomona \\  Salvatore Mazzarino}     \maketitle          \end{titlepage}      **Edit** My document class is `book`


title: TeXnicCenter warnings bringing up additional files

text: This is a small, niggling kind of problem, but I thought I'd put it up in case anyone smarter than me has a simple solution. In TeXnicCenter (I'm running the latest version, currently 2.02 stable), when you are browsing the list of warnings and errors in a compiled document, sometimes an error will call up a different file that has been included somehow. This is very useful when there's an error coming from your bbl file, much less so when there's a persistent warning in a cls file that I have to use from my employer, which I can't edit. Then it's annoying to have to close the new file every time. So I'm wondering if there's a good way to prevent TeXnicCenter from pulling up additional files than the one open. I imagine I might need some sort of workaround that cripples its ability to open files. I played around with the commands it uses to call up Windows Explorer (in Tools -> Customize -> Tools) but couldn't figure anything out.


title: Dealing with overhanging text

text: I have a document with many long, unbreakable words. On A5, there are about 8 words per line. This creates a problem as on many lines, some words trail off the edge and well into the margins. I have found some words for which very far into the margins, nearly touching the edge of the page. On some pages, the problem is so frequent, that the right margin is not even visible. What options do I have for solving this? Update: Here is a simplified sample of my code, so you can see what is happening:               \documentclass[crown,twoside]{octavo}     \pdfpagewidth=127mm     \pdfpageheight=191mm     \usepackage{xeCJK}     \usepackage{fontspec}     \usepackage{stackrel}     \setmainfont{Gentium Plus}     \setCJKmainfont{Adobe Song Std}     \newcommand{\stacked}[2]{%         $\stackrel{\textrm{#1}}{\textrm{#2}}$%     }     \begin{document}         This text should show you where the proper margins are, but as you can see, the text below is goes too far over the edge, which isn't too pleasant.         \stacked{床}{chuáng}\hskip0pt\stacked{前}{qián}\hskip0pt\stacked{明}{míng}\hskip0pt\stacked{月光}{yuèguāng}，         \stacked{疑}{yí}\hskip0pt\stacked{是}{shì}\hskip0pt\stacked{地上}{dìshang}\hskip0pt\stacked{霜}{shuāng}。         \stacked{举}{jǔ}\hskip0pt\stacked{头}{tóu}\hskip0pt\stacked{望}{wàng}\hskip0pt\stacked{明月}{míngyuè}，         \stacked{低头}{dītóu}\hskip0pt\stacked{思}{sī}\hskip0pt\stacked{故乡}{gùxiāng}。     \end{document}      This compiles with `xelatex`. Update: I found, my example (above) used too many short words, so when others compile it, it did not show the overhang very much. Here, I've modified the code a bit to simulate the results of having longer words. You should see that some words overhang completely off the page.               \documentclass[crown,twoside]{octavo}     \pdfpagewidth=127mm     \pdfpageheight=191mm     \usepackage{xeCJK}     \usepackage{fontspec}     \usepackage{stackrel}     \setmainfont{Georgia}     \setCJKmainfont{Adobe Song Std L}     \newcommand{\stacked}[2]{%         $\stackrel{\textrm{#1#1}}{\textrm{#2#2}}$%     }     \begin{document}         This text should show you where the proper margins are, but as you can see, the text below is goes too far over the edge, which isn't too pleasant. \par         \stacked{床}{chuáng}\hskip0pt\stacked{前}{qián}\hskip0pt\stacked{明}{míng}\hskip0pt\stacked{月光}{yuèguāng}，         \stacked{疑}{yí}\hskip0pt\stacked{是}{shì}\hskip0pt\stacked{地上}{dìshang}\hskip0pt\stacked{霜}{shuāng}。         \stacked{举}{jǔ}\hskip0pt\stacked{头}{tóu}\hskip0pt\stacked{望}{wàng}\hskip0pt\stacked{明月}{míngyuè}，         \stacked{低头}{dītóu}\hskip0pt\stacked{思}{sī}\hskip0pt\stacked{故乡}{gùxiāng}。          \end{document}      The `\hskip0pt` serves to allow line breaks, without making spaces and because hyphens are not suitable.


title: Printing character number i

text: I have a counter 1 ≤ _i_ ≤ 26 and I want to print a character between _a_ and _z_ depending on value of _i_. How can I do this in LaTeX?


title: MikTex Download Failure - toptesi.tar.lzma

text: I try to install Complete MiKTeX 2.9 But there is this: Error: The operation could not be completed because the following file failed verification: C:...\mikTex\toptesi.tar.lzma There is the same with the basic version. How can I solve my problem?


title: Reuse of soft path in fading declaration? Transformation of fadings?

text: > **This question led to a new package:**   >  `pgf-blur` I have an idea for a fairly realistic-looking fading drop shadow, that works with almost arbitrary node shapes. This would also give a generic solution to at least one old question. It's the same idea I used for pst-blur that comes with PSTricks, if anyone remembers that. The idea is to get the fading by drawing the (shifted) border of the node several times with varying line width, round line joins, and different shades of gray, plus some clipping applied. I got it to work with TikZ without transparency, but that's half the fun. To do it with transparency, I want to draw my lines of varying shades of gray into a fading and then apply that fading to a sufficiently large black rectangle. So the fading picture depends on the path of the node. I try to do this by saving the current soft path and using Andrew Stacey's `spath` library (Go to the TeX-SX Package, download the file `spath.dtx`, run `pdflatex spath.dtx`) to transform it.               \documentclass{article}     \usepackage{tikz}     \usepackage{spath}          %\usetikzlibrary{calc}          \definecolor{shadowOpacity}{gray}{0.5}          \makeatletter          \tikzset{       /tikz/render fuzz shadow/.code={         \pgfsyssoftpath@getcurrentpath{\savepath}         \pgfoonew \savespath =new spath(\savepath)         \savespath.translate path(\shiftpath,5pt,-5pt)         \pgfdeclarefading{shadowfading}{           \begin{pgfpicture}           \pgfsetroundjoin           \pgfsetlinewidth{3pt}           \pgfsetstrokecolor{black!86!shadowOpacity}           \shiftpath.use path(stroke)           \pgfsetlinewidth{2pt}           \pgfsetstrokecolor{black!72!shadowOpacity}           \shiftpath.use path(stroke)           \pgfsetlinewidth{1pt}           \pgfsetstrokecolor{black!58!shadowOpacity}           \shiftpath.use path(stroke)           \shiftpath.use path(clip)           \pgfsetfillcolor{shadowOpacity}           \shiftpath.use path(fill)           \pgfsetlinewidth{3pt}           \pgfsetstrokecolor{black!14!shadowOpacity}           \shiftpath.use path(stroke)           \pgfsetlinewidth{2pt}           \pgfsetstrokecolor{black!28!shadowOpacity}           \shiftpath.use path(stroke)           \pgfsetlinewidth{1pt}           \pgfsetstrokecolor{black!42!shadowOpacity}           \shiftpath.use path(stroke)           \end{pgfpicture}         }         \pgfsetroundjoin         \pgfsetlinewidth{3pt}         \pgfsetstrokecolor{black}         \pgfsetfillcolor{black}         \pgfsetfading{shadowfading}{}         \shiftpath.use path(stroke,fill)       },       /tikz/fuzz shadow/.style={         preaction={           render fuzz shadow,         }       }     }          \makeatother               \begin{document}            \begin{tikzpicture}              \draw[help lines,step=0.5] (0,0) grid (10,10);              \draw[thick,draw=red,fill=none,fuzz shadow] (2,3) rectangle (8,7);            \end{tikzpicture}          \end{document}      Unfortunately, the shadow doesn't appear. I have two theories why not:   1. the soft path can't be used in a different picture (namely the pgfpicture I create for the fading)   2. I need to apply some transformation in `\pgfsetfading` to align the fading and the surrounding picture **Edit:** concerning theory 1, removing the `\pgfdeclarefading`, but keeping the `{pgfpicture}`, paints the fading mask exactly where I want it, so that doesn't seem to be the issue. So the questions is: how do I create and use a fading that depends on a path in the current picture, and use it without any further transformations applied? **Edit** As a teaser: the following are created with TikZ, but using a way too slow way to achieve the transparency. ![cloud with a fuzzy shadow](http://i.stack.imgur.com/6Ax4w.png) The letters in the following were imported as path from inkscape, but the shadow is TikZ. ![letters with a fuzzy shadow](http://i.stack.imgur.com/Uaddr.png) **Edit** This is to answer a question in the comments: Why do I want to use a fading instead of just drawing the lines? The following code was used to produce the shadows in the images above. It has a number of shortcomings as discussed below, which led to asking the original question.               \documentclass{article}     \usepackage{tikz}     \usepackage{spath}          \usetikzlibrary{shadows}               \tikzset{       /tikz/slow fuzz shadow/.style={          shadow scale=1,         shadow xshift=.5ex,         shadow yshift=-.5ex,         general shadow={%           opacity=0.1,           draw=black!75,fill=black!75,           line join=round,           line width=3pt,           #1,         },         general shadow={%           opacity=0.1,           draw=black!75,fill=black!75,           line join=round,           line width=2pt,           #1,         },         general shadow={%           opacity=0.1,           draw=black!75,fill=black!75,           line join=round,           line width=1pt,           #1,         },         general shadow={%           opacity=0.1,           fill=black!75,           #1,         },         general shadow={%           draw opacity=0,           fill opacity=0.1,           line width=1pt,           draw=black!75,fill=black!75,           #1,         },         general shadow={%           draw opacity=0,           fill opacity=0.1,           line width=2pt,           draw=black!75,fill=black!75,           #1,         },         general shadow={%           draw opacity=0,           fill opacity=0.1,           line width=3pt,           draw=black!75,fill=black!75,           #1,         }       }     }          \begin{document}            \begin{tikzpicture}              \draw[help lines,step=0.5] (0,0) grid (10,10);              \draw[thick,draw=black,fill=white,slow fuzz shadow] (2,3) rectangle (8,7);            \end{tikzpicture}          \end{document}      The "outer" part of the shadow is rendered by repeatedly drawing and filling the shape with 10% opacity, with round line joins and decreasing line width. For the "inner" part of the shadow (where the code in the question uses clipping) the shape is drawn and filled a few more times, but now using opacity 0% for the drawing and 10% for the filling. I'm not sure what this _should_ do according to the specs. On Acrobat Reader, the effect is to fill the shapes with 10% opacity to within 0.5*linewidth of the border, which is exactly what is needed for the shadow. On any other PDF viewer I tried, it's rendered differently. The disadvantages of this code are:   1. It's slow, since it requires 7 draw/fill operations with transparency. Using a fading, only one operation with transparency is needed, and I _hope_ this will be faster.   2. It's supported only by Acrobat Reader. Using a fading would at least avoid using the trick with the 0% opacity border, so I _hope_ it would be more portable.


title: barchart with pgfplot - missing bar

text: I am using PGFplot to make a barchart. There are 4 entries in my csv file and unfortunately I have only 3 bars in my figure. my LaTeX code:               \begin{figure}         \centering         \begin{tikzpicture}              \begin{axis}[                 x tick label style={/pgf/number format/1000 sep=},                     xlabel=Sequence,                 ylabel=Heigth,                     ymin=0.7,                 enlargelimits=0.05,                 legend style={at={(0.5,-0.15)},                     anchor=north,legend columns=-1},                 ybar interval=0.7,                 width=\textwidth,                 ]                 \addplot table [col sep=comma,trim cells=true,y=height] {numericaltests/data/test.csv};                      \addplot[red,sharp plot,update limits=false]                     coordinates {(-1,1.00) (34,1.00)}                     node[above] at (axis cs:15,1.00) {};                 \legend{Ca2Fe2As2}             \end{axis}         \end{tikzpicture}         \caption{Sequence}         \label{fig:sequenceHeight}     \end{figure}      my test.csv file:               sequence,height     1,2.0     2,1.5     3,1.8     4,2.4      Barchart: https://www.dropbox.com/s/j6rs7gtn5dyh6ia/Screenshot%202013-11-09%2011.14.14.png


title: Minimal Requirements for Creating Math PDFs

text: I downloaded WinEdt, MiKTeX with TeXworks, and SumatraPDF for viewing. I was alerted that WinEdt is shareware and I will have to pay in one month to keep it. Is this the case with the other two programs as well? I am not going to need anything fancy, _I want the absolute minimal requirements_ that optimally won't involve buying anything to create math PDFs written in LaTeX. Can I just write directly in TeXworks and avoid using an editor at all? That would be fine. I just want to be able to make PDFs on my home computer if I don't have internet, so I don't have to use online resources such as writelatex.com (and I don't feel that's an appropriate use of those websites anyway, if I'm not collaborating).


title: In beamer, how to strike through an item after displaying

text: In a beamer frame I have a item list               \begin{itemize}     \item<1-> World peace     \item<2-> Peace in our neighbourhood     \end{itemize}      How can I strike through the first ~~item~~ on the second (overlay) slide? Slide 1: >   * World Peace > Slide 2: >   * ~~World Peace~~ >   * Peace in our neighbourhood >


title: Using the glossaries package, how can I have a different description in the glossaries list to how it appears in the document?

text: The main reason for this is that in text I would like QUT to appear as "the Queensland University of Technology" but I would like this to appear in the acronym list with out the leading "the". Is this possible? If not, what is a good way to deal with acronyms where you need "the" in the long form, but not the short?


title: Changing the default layout produced by algorithm and algorithmic packages

text: If the default output of the `algorithm` and `algorithmic` packages for the following code:               \begin{algorithm}     \begin{algorithmic}[1]     \PRINT \texttt{‘‘Hello, World!’’}         \end{algorithmic}     \caption{Pseudocode of visualRSS's polling algorithm.}     \label{PseudocodevRSSPollingAlgorithm.}     \end{algorithm}      Is: ![enter image description here](http://i.stack.imgur.com/zlIWD.png) Can this be changed so that the lines are removed and a caption be centrally displayed under the pseudocode such as: `Algorithm 4.3: Printing HelloWorld.` So that an algorithm is referenced by chapter number and then its number within that chapter, and that this format is also present in a `List of Algorithms` at the beginning of a document? Thanks to the answer given below, I have been able to largely achieve what I want. But I notice that I can use the \print and \State instructions but if I try to use a \FOR like this:               \setcounter{algorithm}{0}     \begin{algorithm}     \begin{algorithmic}[1]                 \State $pollingDateTime \leftarrow now - 1 hour$     \FOR{\texttt{each} $rssFeed$}     \print \texttt{‘‘Hello, World!’’}     \ENDFOR        \end{algorithmic}         \caption{Algorithm 1.}             \end{algorithm}      That this ends in a LaTeX `Undefined control sequence.` error. What can be done about this? Thanks Mr Morgan.


title: Centering a xy matrix inside beamer frame and figure

text: In the following beamer frame, I want the description text to stay top-left, while the xymatrix-figure should be centered. However, whatever I tried with \centering, \begin{center} and other online found solution, I've always gotten the diagram aligned left.               \begin{frame}       \frametitle{Butterfly network}            Some text            \begin{figure}[b]         \begin{center}           \begin{displaymath}               \xymatrix@R=0.9pc@C=3.5pc{                 S_1 \ar@{.>}[rd] \ar@{.>}[ddd] & & S_2 \ar@{.>}[ld] \ar@{.>}[ddd] \\                 & A_1 \ar@{.>}[d] & \\                 & A_2 \ar@{.>}[ld] \ar@{.>}[rd] & \\                 R_2 &  & R_1 \\               }           \end{displaymath}         \end{center}       \end{figure}     \end{frame}      PS I'm quite new to LaTeX, explanation why this solution doesn't work would be very welcome. **EDIT:** Wrapping \xymatrix inside **\centerline** has made the diagram appear almost in the middle, a little to far right... PSS Running TexLive 2013 on OpenSuSe 13.1


title: Visual debugging of lengths in paragraphs and environments?

text: During my searches, I found a couple of online images, which I doubt are produced with Latex - however, I found them immensely useful in understanding what is going on. I'm pretty sure the images below were not produced automatically by latex - so I was wandering if there is a Latex package (or a method) - that would visualize demanded lengths with arrows ( _and possibly even length values?_ ), like on the images below ( _apparently, adding them from web adds a copy on imgur; I've added the original links as well_ ). In the cases below, they are related to lists (enumerate/itemize) parameters - but I'd be interested in visualizing `\parindent` or `\parskip` in context of paragraphs as well.   * Fig_enumerateS.jpg ![Fig_enumerateS.jpg](http://i.stack.imgur.com/Ik0Cx.jpg)   * listaparametrit.gif: ![listaparametrit.gif](http://i.stack.imgur.com/m5if6.gif)   * listparams.png ![listparams.png](http://i.stack.imgur.com/FLia9.png) Would there be anything out there that allows for similar visualization ( _possibly one that would work on a 'per page request' basis too; wouldn't want a 100 pg .pdf choke full with arrow vectors on every paragraph`:)`_)


title: Wrapping text around figures in poster headerboxes

text: I am working on a poster with headerbox elements. In one of the boxes I try to have an image on the right side and have the text left of it. I tried different minipage and wrapfigure examples but the image ended up beeing all over the poster and not in the headerbox at the right position. :/               \headerbox{dataset}{name=dataset,column=1,span=2,row=0}{     \begin{wrapfigure}{l}{1in}      \includegraphics[width=1in]{dataset}       \noindent       \hrulefill       \end{wrapfigure}       Lore ipsum      \vspace{0.5em}     }


title: Update / Install the newest version of LaTeX3

text: The developing of LaTeX3 goes on. However some feature will be improved or added. The LaTeX3 team can't upload every day a new version to CTAN. How can I install the newest version LaTeX3?


title: Visualize index entries in the text?

text: When I ad an index entry using `\index` with all the options available for the "format" and "see", and cross-reference, I'd like to see **at the place where I make the index entry** how this specific entry will/would appear in the index, i.e.   * Is it bold here?   * How is it sorted?   * Will the number be bold?   * Does it point elsewhere with "see"? Currently I write the text in the margin with `\marginpar` but I am not quite satisfied with this. Maybe there is a better way that someone else already uses?


title: LyX 2.0.3 Mac Version unavailable article document class

text: I am trying to use LyX 2.0.3 but for some reason it does not have the Document class article. Is there something else I need to install? I have installed TeXworks as well but for some reason it still can't find most of the document classes. An example of the error I get is               The module enumitem requires a package that is not available      in your laTex installation, or a converter that you have not installed.      LaTex output may not be possible. Missing Prerequisites:          enumitem.sty      So when I navigate to Document -> Settings, in the document class box most things are unavailable. Any advice would be great!


title: How to make a plain TeX conditional which checks if some specific numbers are present?

text: I need to make a simple conditional in a macro. If `#1` is "1", "2", "3", "4", "5", or "6", then print `Text: #1`, otherwise, do nothing, even if it is empty. I tried this code:               \ifnum#1=1         Text:~#1     \if      I cannot even get make it able to check if `1` is present. How can I check `#1` is equal to "1", "2", "3", "4", "5", or "6"?


title: In a multicol with a separating border, set a margin between the border and the content

text: I have a minted code listing, displayed in a multicol environment with a separating border between the columns: ![A minted code listing, displayed in a multicol environment with a separating border. The border is too close to some of the content.](http://i.stack.imgur.com/EZC1A.png) The border is too close to some of the content, like `stracka(1,sg,ka).` and `stracka(3,sg,ka).`. **What's a good way to fix it?** _test.tex_ :               RequirePackage[l2tabu, orthodox]{nag}     \documentclass[a4paper,12pt,oneside]{scrartcl}     \usepackage{multicol}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[swedish]{babel}          \usepackage{lmodern}     \usepackage[a4paper]{geometry}     \usepackage{microtype}     \usepackage{color}     \usepackage[all]{xy}     \usepackage{minted}     \usepackage{caption}               \setkomafont{disposition}{\normalfont\bfseries}     \renewcommand\listingscaption{Kodlistning}          \begin{document}          \setlength{\columnseprule}{0.5pt}     \begin{multicols}{4}     \inputminted[]{prolog}{someprolog.pl}     \end{multicols}     \label{Blah}     \captionof{listing}{Beskrivande text}          \end{document}      _someprolog.pl_ :               stracka(1,c,sg).     stracka(1,sg,ka).     stracka(1,ka,o).     stracka(1,o,t).          stracka(2,c,sg).     stracka(2,sg,sm).     stracka(2,sm,r).     stracka(2,r,h).          stracka(3,c,sg).     stracka(3,sg,ka).     stracka(3,ka,o).     stracka(3,o,kr).          stracka(4,c,sg).     stracka(4,sg,ka).     stracka(4,ka,o).     stracka(4,o,j).          stracka(5,c,sg).     stracka(5,sg,sm).     stracka(5,sm,r).     stracka(5,r,n).          stracka(6,c,sg).     stracka(6,sg,sm).     stracka(6,sm,r).     stracka(6,r,h).          stracka(7,c,st).


title: BibLaTeX: sorting alphabetically with non-latin characters (Ś)

text: Biblatex indexing works very well with latin names. But when an author has foreign name (Łukasiewicz) the Ł letter is changed to `\IeC {\L}` and `makeindex` is not able to sort it well. In Polish it should be placed after L and before M (AĄ...CĆ...EĘ...LŁ...NŃ...OÓ...SŚ...ZŹŻ). The problem does not exist with titles indexing using:                  \DeclareIndexFieldFormat{indextitle}{\index[tit]{#1}}      (As far as I understand the problem is related with `\protected@edef` in `\newbibmacro*`). Probably in other languages someone can have similar problem and knows the solution how to put in the `idx` file               \indexentry {Łukasiewicz|hyperpage}{123}      Here is a small example of `a.tex` source:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[OT4]{fontenc}     \usepackage{filecontents}     \usepackage[style=authortitle-icomp,indexing=true,,backend=biber]{biblatex}     \DeclareIndexFieldFormat{indextitle}{\index[tit]{#1}}     \bibliography{a}     \usepackage{index}     \newindex{default}{idx}{ind}{Index}     \newindex{tit}{tdx}{tnd}{Titles}     \begin{document}     \begin{filecontents}{\jobname.bib}     @Book{Xauthor,       author = {Śauthor},       title = {Śauthor's Book}     }     @Book{Sauthor,       author = {Sauthor},       title = {Sauthor's Book}     }     @Book{Tauthor,       author = {Tauthor},       title = {Tauthor's Book}     }     \end{filecontents}     \section*{Polish sort order ...SŚT...}     \nocite{*}     \printbibliography     \printindex[default]     \printindex[tit]     \end{document}      and the small script               export LANG=pl_PL.utf8     latex a     biber a     latex a     makeindex -L a.idx -o a.ind     makeindex -L a.tdx -o a.tnd     latex a     xdvi a.dvi      In the `a.idx` we have problematic: \indexentry {\IeC {\'S}author}{1} in `a.tdx` we have correct: \indexentry {Śauthor's Book}{1} so we get correct order in `biber` (References) and Titles but wrong in Index (Śauthor is before Sauthor).


title: What is the plain TeX equivalent of \settowidth?

text: The `\settowidth` command, which sets a width equal to the width of some text, is described at Get width of a given text as length and How to set the width of the label of a description to the width of a string of text in ConTeXt?. What is the plain TeX equivalent of this command?


title: Font not found by XeLaTeX

text: Hi LaTeX gurus out there. I understand that you could use XeLaTeX to use any system font. Well, recently I downloaded a LaTeX template for a CV from http://www.latextemplates.com The template uses the Fontin font found here: http://www.exljbris.com/fontin.html Yet, when I try to compile the document using XeLaTeX, and something goes wrong as I get the following error and no pdf file is produced:               .................................................     . fontspec info: "no-scripts"     .      . Font Fontin does not contain any OpenType `Script' information.     .................................................     \g_fontspec_family_Fontin_int=\count167     .................................................     . fontspec info: "no-font-shape"     .      . Could not resolve font Fontin/B (it probably doesn't exist).     .................................................     .................................................     . fontspec info: "no-font-shape"     .      . Could not resolve font Fontin/I (it probably doesn't exist).     .................................................     .................................................     . fontspec info: "no-font-shape"     .      . Could not resolve font Fontin/BI (it probably doesn't exist).     .................................................     .................................................     . fontspec info: "defining-font"     .      . Font family 'Fontin(0)' created for font 'Fontin' with options     . [Mapping=tex-text,SmallCapsFont = Fontin SmallCaps].     .      . This font family consists of the following shapes:     .      . * 'normal' with NFSS spec.:     . <->"Fontin/AAT:mapping=tex-text;"     .      . * 'small caps' with NFSS spec.:     . <->"Fontin SmallCaps/AAT:mapping=tex-text;"     .................................................      so I have no idea what the problem is. I installed the fonts, as I can see them on `/Library/Fonts/` and I can use them in text editors. This is a small working example:               \documentclass[a4paper,10pt]{article} % Default font size and paper size          \usepackage{fontspec} % For loading fonts     \defaultfontfeatures{Mapping=tex-text}     \setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font          \usepackage{xunicode,xltxtra,url,parskip} % Formatting packages          \usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors          \usepackage[big]{layaureo} % Margin formatting of the A4 page, an alternative to layaureo can be \usepackage{fullpage}     % To reduce the height of the top margin uncomment: \addtolength{\voffset}{-1.3cm}          \usepackage{hyperref} % Required for adding links   and customizing them     \definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color     \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document          \usepackage{titlesec} % Used to customize the \section command     \titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections     \titlespacing{\section}{0pt}{3pt}{3pt} % Spacing around sections          \begin{document}               testing Fontin fonts.     \end{document}      Can someone tell me what's wrong here?


title: How to use text figures (numerals) for the footnote numbers in memoir?

text: I am using the memoir class with Xetex and have the option for text figures on. Every thing works as expected, but the numbers of the footnotes are capital number while all other are (as wished) lowercase (old style). How to set the footnote numbers old style too? This is a working example:               \documentclass[10pt,twoside]{memoir}     \usepackage{fontspec}     \usepackage{xltxtra}     %\setmainfont[Numbers={OldStyle},Ligatures={Common, Rare, Historic}]{Minion Pro}     \setmainfont[Numbers={OldStyle},Ligatures={Common, Historic}]{Adobe Garamond Pro}          \begin{document}     This is some text.\footnote{A footnote} Some more text.          All Numbers are OldStyle Numbers: 1234567, but not the footnote!     \end{document}


title: Forms are not displayed in evince viewer

text: I'm using eforms package to make form. I have read the documentation and copied the same as in the doc but the form are not displayed in `evince` or in `okular`. The form are displayed in adobe reader but I can't save them (I must print them). The strange thing is that the form examples in eforms doc are displayed in `evince`. Do I missing something? How to do to get the form displayed in evince. **MWE**               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{eforms}          \begin{document}      \begin{Form}       \textField           [\Ff{\FfMultiline}\BC{0 0 1}\BG{1 1 1}            \textColor{0 0 0}\textSize{12}           ]{name}{11cm}{5cm}      \end{Form}     \end{document}      **Note** I can't use Adobe Reader.


title: graphical tools for tabular construction?

text: I often use `R`'s `xtable` library or `emacs` `org-mode` to create tables in `LaTeX` (they are wonderful, by the way). I wonder if there are other tools people use which facilitate construction of large tables containing more text than data. I think I might have at one point also used OpenOffice/LibreOffice Calc's export tool designating delimiter (`&`) and eol (`\\\`). One remaining issue with most of these tools is that the generated tables by default do not wrap longer lines of text so I have to post-process with a tool like `Python` to insert the contents of each cell in a `minipage` environment. I wonder if anyone here has better workarounds for this type of application, particularly graphical tools which do not require the user to keep track of `&`s and `\\\`s spanning multiple lines in a `.tex` file?


title: How to make a single GhostScript call to do conversion, compression, and cropping?

text: I am using TeXLive 2010 and do my job using the following workflow with 6 steps. I want to reduce the number of steps as minimal as possible because I will apply the workflow to the web based system.   1. `latex %1`   2. `dvips %1`   3. `ps2pdf -dPDFSETTINGS#/prepress %1.ps`   4. `gswin32c -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dSAFER -dNOPAUSE -dQUIET -dBATCH -sOutputFile=%1-temp.pdf %1.pdf`   5. `pdfcrop --hires %1-temp.pdf %1.pdf`   6. `pdftops -eps %1.pdf` I know that the steps 3, 4 and 5 internally invoke GhostScript. Shortly speaking, how to combine them into a single GhostScript call? ## My current effort I have tried to combine the step 3 and 4 as follows and it works.   1. `latex %1`   2. `dvips %1`   3. `ps2pdf -dCompatibilityLevel=1.5 -dPDFSETTINGS#/prepress %1.ps`   4. `rename %1.pdf %1-temp.pdf`   5. `pdfcrop --hires %1-temp.pdf %1.pdf`   6. `pdftops -eps %1.pdf` And I am still interested in combining steps 3 and 5 above.


title: How to fix set the environment variable Asymptote Ghostscript?

text: I have problem about install Asymptote and I fail to running file .asy like this error: ![Ghostscript dont install my computer](http://i.stack.imgur.com/ET9vk.png) How to fix location specifies the of Ghostscript and there are simple way to fix it ?


title: How to print ticks and backticks in mathmode

text: How can I print ticks and backticks in math mode? I want to get something like `` x+1 ´´ However everything I tried so far does not compile or produces other characters like " or '


title: remove number from appendix

text: I used this code to produce appendix               \documentclass [a4paper,12pt,oneside,final]{book}     \usepackage[titletoc,title]{appendix}     \begin{document}     .     .     .     .     \clearpage     \appendix     \newpage           \section{Appendix A}       Stuff here        \section{Second Appendix}       Stuff here        \section{Third Appendix}       Stuff here      \end{document}      and it appear in the follwoing format `.1 Appendix A` as shown in the picture![that](http://i.stack.imgur.com/04iMg.png) how to get ride from `.1` so i will have only `Appendix A` Also, how to make header tile for appendix take the section title on the left and page number on the right of the header any suggestion?


title: in a text and figure side by side how to add "caption" and "label"

text: > **Possible Duplicate:**   >  Create caption without float AND without caption-package? i have this:               \begin{minipage}[b]{0.35\linewidth}            Here is the text          \end{minipage}          \hfill     \begin{minipage}[b]{0.55\linewidth}     \centering     \includegraphics[scale=0.8]{imag9}     \caption{TEXT}     \label{fig3.5}     \end{minipage}      When i try to add `\caption` and `\label` (as in the figure) it shows me errors but the pdf i am taking is ok! Is there another way to do that?


title: How to make table with caption appearing on \listoftables without \begin{table} environment?

text: > **Possible Duplicate:**   >  Label and caption without float   >  Create caption without float AND without caption-package? Here is an example of LaTeX document being compiled with `pdflatex` having   * table with caption   * hyperlinked list of tables :               \documentclass[a5paper,12pt,twoside,openany]{report}     \usepackage[a5paper]{geometry}     \usepackage{fullpage}     \usepackage[colorlinks]{hyperref}     \begin{document}          \begin{table}[htbp]     \begin{center}     \label{mytable}     \caption{mytable}     \begin{tabular}{ll}     \hline     A & B \\     C & D \\     \hline     \end{tabular}     \end{center}     \end{table}          \listoftables     \end{document}      How to make a table, without `\begin{table}...\end{table}` float, preserving style of table (table having caption, label), and appearing in hyperlinked `\listoftables` ? (Situation: Currently I work on document where I have such tables, and I would like to put some of them without floats to force placement or tables and footnotes relating to them.)


title: Label and caption without float

text: I’d like to have an environment that works much like a float, except that it doesn’t float. That is, in fact, I’d like to be able to define an environment that has a label and a caption. I explicitly do **not** want to use a floating environment, though. For one thing, floats do many things fancy which I just don’t need, nor want (such as spacing) and for another, floats have their share of problems (for example consider the problem of splitting a float between pages). Is there a ready-made way to achieve this? Of course, I could always write my own based on the result of the other answer, i.e. harnessing `\refstepcounter`. But I’m not sure how to use that, documentation is scarce, and I’d prefer an existing solution.


title: lualatex and lilypond/music notation

text: Is there any easy way to embed musical notation into lualatex projects without too much hassle? (hopefully complete transparency) I was thinking something like lilypond without having to do multiple compilations/etc. I simply want to seemlessly add nice looking musical notation to some pre- existing lualatex code without too much trouble. I've quickly did a search and it seems abc allows direct integration(used as a latex package) but does not have the look I'm after. lilypond requires external compilation and I have no ideas how it will interact with lualatex. Is there anything else out there, some lua like wrapper to directly integrate lilypond into lualatex?


title: How can I change the margins for only part of the text?

text: Sometimes the margins need to be changed for a particular page, paragraph, or other section of text. For example, if I'm writing a letter and want the left margin to be almost at the right side of the page for the four lines of my address, or if I am combining prose with poetry and want the poems to be indented relative to the rest of the work. What is the best way to change both left and right margins on the fly?


title: Changing the textwidth

text: Is it possible to change your text's width couple of times in one page? I would like to start the document with couple of lines that have been placed closer to the paper's edge and then return back to original textwidth after the headline. I have tried placing               \addtolength{\hoffset}{-0.75cm}      at the start of the document and after it "corrected" the width with               \addtolength{\hoffset}{0.75cm}      but the document counts these two together and every line starts at the document's original textwidth. This is what I have tried:               \begin{document}     \addtolength{\hoffset}{-0.75cm}     This should be\\     closer to the edge\\     but it isn't\\     \addtolength{\hoffset}{0.75cm}     \begin{center}     Topic     \end{center}     And this should be at the document's original textwidth where it really is.     \end{document}      I tried to use `\setlength` but this time it only reacted to last command, which returns the width to original. Using \newenvironment might be the solution but I couldn't get it to work. I used               \newenvironment{headline}{\setlength{\hoffset}{-1cm}}{\setlength{\hoffset}{-1cm}}      with no success. Don't know if I did something wrong there or why it doesn't work. I would be happy if someone could solve this problem or tell me that going back and forward with widths isn't possible in one page.


title: How to remove horizontal lines around figures for htlatex output

text:
htlatex adds horizontal lines around figures floats. For instance, the HTML output for the following tex:               \begin{figure}     \begin{centering}     \includegraphics{photo.png}     \end{centering}     \end{figure}      is as follows:

      I want to prevent automatic insertion of `<hr>`s around my figure. Is there any way to do so?


title: How can I use LaTeX-commands inside of a listing?

text: I'm using the listings package in a LaTeX document. It works great, but it doesn't allow me to put LaTeX commands inside of the listing. I would like to use a counter to enumerate some of the interesting parts in the source code. Is there a way to enable LaTeX commands in source listings?


title: Combining progress bars for latex-beamer

text: @GonzaloMedina has posted a nice example (see Progress bar for latex-beamer) on how to put a progress bar in a beamer presentation. I would like to have the bar from the first example (the blue and shaded), but with the numbering from the third example (the `fraction'-like). I would really appreciate it, if someone will create a MWE for me where this is implemented. Thank you in advance! P.S. I hope that this is a okay way of asking questions---I had my first try on Progress bar for latex-beamer. Am I still wrong, let me know and I will try to improve my question technique.


title: Overlapping lines get thicker in TikZ

text: In the following example, I have drawn a couple of arrows in TikZ that are overlapping at one end.               \documentclass[12pt]{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}       \foreach \x in {1,...,10}         \draw[->] (0,0) -- (\x,0);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/10Vxy.png) Since the arrows are drawn separately, TikZ lays them on top of each other making them look thicker than normal. Is there any way to tell TikZ to not thicken lines/borders that are superimposed? Of course, I am looking for a general solution to this problem, not a quick fix for the simple example above.


title: Limiting the number of authors that appear in the bibliography

text: I am using `natbib` bibliography style. Some references have multiple authors that take over a page to list in the bibliography. Is there a way to limit the number of authors?


title: How do I change the number of authors listed in the References section?

text: I'm using `bibtex` and `apj.bst`. I'm citing a paper that has about 40 authors. In the text, it's cited properly as `Author1 et al.` but in the references section, all 40 are listed. Is there an easy way to change the default for that (e.g., tell it to only list at most 3 authors in the References section) ? I don't want to have to manually edit the `.bib` file for each paper that has a large author list.


title: How to scale and then trim an image?

text: I am trying to create a document that requires the inclusion of images at a precise size (h x w inches). I would like to reuse the document template, so I would like to create a command that would resize and clip any image (sized H x W inches) to the right size (h x w in), provided that the full width (W) is **first scaled down** to the new width (w), and then the new H is **trimmed** to the height h. How do I do this in LaTeX?               +---------------------+---+     |       w             |   |     |                     |   |     |                     |   |     |h                    |   |     |                     |   |     |                     |  H|     |                     |   |     +---------------------+   |     |                         |     |                         |     |             W           |     +-------------------------+      [EDIT] Reading some posts here, I have tried to solve this using the following:               \documentclass[11pt,article]{memoir}     \usepackage{graphicx}     \usepackage{adjustbox}          \newlength{\oH}     \newlength{\nH}          \newcommand{\PrintImage}[3]{%     % #1 : desired width     % #2 : desired height     % #3 : image     \settoheight{\oH}{\includegraphics{#3}}     \settoheight{\nH}{\includegraphics[width=#1]{#3}}          \adjincludegraphics[width=#1,trim={0 {\oH - #2} 0 0},clip=true]{#3}%     }          \begin{document}     \centering          \PrintImage{2in}{2in}{myimage}          \end{document}      But it doesn't work. Thinking that the problem was that I was using the original height **oH** , I changed the `\adjincludegraphics` line to:               \adjincludegraphics[width=#1,trim={0 {\nH - #2} 0 0},clip=true]{#3}%      But it doesn't work either. Why?


title: How do I install and use nlatexdb? (or latexdb, ratexdb)?

text: This question is related to this question regarding typesetting a MySQL database using UTF-8 encoding with Xelatex. I ask this in desperation as it involved printing 552 rows for my thesis! I need to get this information to my adviser this week and he is a bit old- fashion (meaning he would rather have everything on paper, not on a computer and certainly not in computer code). System Details:   * Mac OS X Lion 10.7.4   * Tex Live 2012 installed with Macports   * MySQL 5.5 Server (installed via DMG) How can I get any of the three latexdb systems installed? (the related question above involved making it work with xelatex). Server is running fine. I can log in and make queries. I have a simple document:               \documentclass[a4]{article}     \usepackage{fontspec}     \texdbconnection{MySQL,localhost,root,password,mydatabase}     \texdbdef{##query1}{select hd,md from mytable}{##hd,##md}          \begin{document}     This is a header for the page.          \begin{tabular}{|l|l|}     \hline     Hochdeutsch & Mantakisch \\     \texdbfor{##query1}{\hline \textit{##hd} & \textbf{##md}\\}     \hline     \end{tabular}\\          \end{document}      I keep getting errors like: > latexdb database.tex Pre-Compiling database.tex (loop 1) This is XeTeX, > Version 3.1415926-2.4-0.9998 (TeX Live 2012/MacPorts 2012_7) restricted > \write18 enabled. entering extended mode (./database.tex LaTeX2e > <2011/06/27> Babel and hyphenation patterns for english, dumylang, > nohyphenation, lo aded. (/opt/local/share/texmf-texlive- > dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h > Standard LaTeX document class (/opt/local/share/texmf-texlive- > dist/tex/latex/base/size10.clo)) (./database.aux)) * Or it just hangs like this:               latexdb database.tex     Pre-Compiling database.tex (loop 1)     Traceback (most recent call last):       File "/opt/local/bin/latexdb.py", line 274, in <module>         _main_()       File "/opt/local/bin/latexdb.py", line 262, in _main_         texDBparseForLoop(l)       File "/opt/local/bin/latexdb.py", line 151, in texDBparseForLoop         for qR in texDBresult(queryString):       File "/opt/local/bin/latexdb.py", line 68, in texDBresult         cursor=db.cursor()     NameError: global name 'db' is not defined     This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/MacPorts 2012_7)      restricted \write18 enabled.     entering extended mode     (./database.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo     aded.     (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/opt/local/share/texmf-texlive-dist/tex/latex/base/size10.clo))     (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/expl3.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3names.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3bootstrap.sty))     (/opt/local/share/texmf-texlive-dist/tex/latex/etex-pkg/etex.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/color.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/color.cfg)     (/opt/local/share/texmf-texlive-dist/tex/xelatex/xetex-def/xetex.def))     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphics.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/trig.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/graphics.cfg))     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3basics.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3expan.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3tl.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3seq.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3int.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3quark.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3prg.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3clist.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3token.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3prop.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3msg.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3file.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3skip.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3keys.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3fp.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3box.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3coffins.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3color.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3luatex.sty))     (/opt/local/share/texmf-texlive-dist/tex/latex/l3packages/xparse/xparse.sty)     (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec-patches.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/base/fixltx2e.sty)     *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \oldstylenums with arg. spec. 'm' on line 107.     *************************************************     ) (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec-xetex.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/base/fontenc.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1enc.def)     (/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1lmr.fd))     (/opt/local/share/texmf-texlive-dist/tex/xelatex/xunicode/xunicode.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/tipa/t3enc.def     (/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1lmss.fd))     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphicx.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/keyval.sty)))     (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec.cfg)))          LaTeX Warning: Unused global option(s):         [a4].          (./database.aux) (/opt/local/share/texmf-texlive-dist/tex/latex/tipa/t3cmr.fd))          *      It seems like I am really close to getting this working.


title: Tikz Scaling and Positioning

text: I cannot scale the first picture. scale=0.6 does not work. Also I cannot vertically align the picture. I want top of text and top of figure are same. See figures in the following examples.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[margin=6.0em]{geometry}     \usepackage[nomessages]{fp}     \usepackage{mathtools}     \usepackage{amssymb}     \usepackage{stmaryrd }          \usepackage{tikz}     \usetikzlibrary{arrows}          \usepackage{wrapfig}     \usepackage{enumerate}     \usepackage[turkish]{babel}          \usepackage[hidelinks]{hyperref}     \usepackage[stable]{footmisc}     \usepackage{perpage} %the perpage package     \MakePerPage{footnote} %the perpage package command          \setcounter{secnumdepth}{-1}                     \begin{document}     \shorthandoff{=}               \begin{enumerate}     \item      Ardışık üç pozitif tamsayının çarpımının hiçbir zaman bir tamsayının birden      büyük bir kuvvetine eşit olamayacağını gösteriniz.          \item     \begin{tabular}[t]{p{4.5cm}r}     $ABCD$ kirişler dörtgeni ve $|AE|=|AD|$, $|BC|=|BE|$ dir.      Buna göre, $EF\parallel AB$ olduğunu gösteriniz.          &          \begin{tikzpicture}[baseline=(current bounding box.north),line cap=round,line join=round,>=triangle 45,x=0.24698133918770565cm,y=0.24577572964669714cm]     \clip(-0.5,-2.72) rectangle (11.5,3.6);     \draw [line width=1.2pt] (0.06,-2.01)-- (4.43,3.26);     \draw [line width=1.2pt] (9.33,1.94)-- (4.43,3.26);     \draw [line width=1.2pt] (9.33,1.94)-- (11.14,-2.13);     \draw [line width=1.2pt] (11.14,-2.13)-- (0.06,-2.01);     \draw [line width=1.2pt] (11.14,-2.13)-- (4.43,3.26);     \draw [line width=1.2pt] (9.33,1.94)-- (0.06,-2.01);     \draw (-0.38,-2.0) node[anchor=north west] {$A$};     \draw (11.4,-2.00) node[anchor=north west] {$B$};     \draw (9.56,2.14) node[anchor=north west] {$C$};     \draw (3.96,3.48) node[anchor=north west] {$D$};     \draw (6,0.92) node[anchor=north west] {$E$};     \draw (7.90,0.87) node[anchor=north west] {$F$};     \begin{scriptsize}     \fill [white] (0.06,-2.01) circle (2.0pt);     \fill [white] (4.43,3.26) circle (2.0pt);     \fill [white] (9.33,1.94) circle (2.0pt);     \fill [white] (11.14,-2.13) circle (2.0pt);     \fill [white] (6.36,0.67) circle (2.0pt);     \fill [white] (7.67,0.66) circle (2.0pt);     \end{scriptsize}     \end{tikzpicture}     \end{tabular}               \item     $0<q<200$ ve $\dfrac{59}{80} < \dfrac{p}{q} <\dfrac{45}{61}$ koşullarını sağlayan bir      $(p,q)$ tamsayı çifti bulunuz ve böyle tek bir $(p,q)$ tamsayı çifti olduğunu gösteriniz.          \item     $7$ arkadaşı olan bir kimse, bir hafta boyunca her akşam $3$ arkadaşını yemeğe çağırır.      Farklı iki akşam yemeğe çağrılan gruplar birbirlerinden farklı olup; $7$ arkadaştan her biri      en az bir akşam yemeğe çağrılmaktadır. Bu koşulları sağlayan kaç değişik çağrı programı      yapılabileceğini bulunuz.          \item     \begin{tabular}[t]{p{7cm}r}          $O$ merkezli çemberin yarıçapı $R$'dir. $A$ merkezli $|AB|$ yarıçaplı çember ile $B$ merkezli      $|BA|$ yarıçaplı çemberin $D$ kesim noktası alınıyor. $CD$ doğrusu, $O$ merkezli çemberi $E$      noktasında kestiğine göre $|ED|$ uzunluğunu $R$ cinsinden hesaplayınız.           &     \begin{tikzpicture}[baseline=(current bounding box.north),line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]     \clip(-0.16,-1.88) rectangle (6.4,3.52);     \draw [line width=1.2pt] (4.02,0.3) circle (2.16cm);     \draw [line width=1.2pt] (4.55,2.4) circle (1.08cm);     \draw [line width=1.2pt] (3.47,2.39) circle (1.08cm);     \draw [line width=1.2pt] (1.93,0.87)-- (5.5,1.88);     \draw [line width=1.2pt] (1.93,0.87)-- (1.04,0.62);     \draw (4.04,0.04) node[anchor=north west] {$O$};     \draw (5.74,1.94) node[anchor=north west] {$C$};     \draw (4.78,2.58) node[anchor=north west] {$A$};     \draw (3.1,2.62) node[anchor=north west] {$B$};     \draw (1.56,1.12) node[anchor=north west] {$E$};     \draw (4.10,1.25) node[anchor=south east] {$D$};     \fill [white] (4.02,0.3) circle (2.0pt);     \fill [white] (5.5,1.88) circle (2.0pt);     \fill [white] (4.55,2.4) circle (2.0pt);     \fill [white] (3.47,2.39) circle (2.0pt);     \fill [white] (4.01,1.46) circle (2.0pt);     \fill [white] (1.93,0.87) circle (2.0pt);     \end{tikzpicture}          \end{tabular}          \item     $$\sqrt{x - \dfrac{1987}{14}} + \sqrt{x - \dfrac{1988}{13}} +      \sqrt{x - \dfrac{1989}{12}} = \sqrt{x - \dfrac{14}{1987}} +      \sqrt{x - \dfrac{13}{1988}} + \sqrt{x - \dfrac{12}{1989}}$$     denkleminin tüm reel çözümlerini bulunuz.          \item     İki kişinin bir keki paylaşmasının her iki tarafı da hoşnut eden ve adil bir yöntemi şudur: Biri      keki iki parçaya ayırır, diğeri parçalardan birini kendine seçer. Diğer bir deyişle keki $[0,1]$      aralığı gibi düşünürsek, birinci kişi $x_1\in [0,1]$ seçer; ikinci kişi ise $x_1$ ve $1-x_1$      sayılarından birini seçer. (Burada her iki tarafın da ``keksever'' olduğu varsayıldığından, ikinci      kişinin $x_1$ ve $1-x_1$ sayılarından daha büyük olanını seçeceği ve dolayısıyla birincinin de      $x_1 = \dfrac 12$ seçimini yapacağı kolaylıkla görülür.) Üç keksever kişi için benzer bir paylaşma      yöntemi bulabilir misiniz?           \end{enumerate}          \end{document}


title: How to move first line of paragraph into block created by wrapfigure?

text: I have the following code:               \begin{wrapfigure}[7]{l}[3mm]{2.5cm}     \vspace{-12pt}     \includegraphics[scale=0.134]{pismena/n.png}     \end{wrapfigure}     ajskôr prišli slová, vzápätí tma.     Kračúň ubehol rýchlejšie, než sa predpokladalo. Najkratší deň v obehu     strávila     Bystrina v príprave na príchod nového obdobia. Chlapci vyrezávali drevené     dieťatko, ktoré znázorňovalo nanovo zrodené slnko, zatiaľ čo vedomci plnili     hodostoly bravčovým. Noc naplnilo veselie. Krátko po odchode kračúňa obsypali     vedomci svojich žiakov zrnom, aby podľa rodných zvykov znásobili bohatosť úrody.     Zvyšok noci Bystrinu obchádzali koledníci s piesňami a zariekadlami. Vyrezaný     symbol nového slnka niesli hrdo v~čele sprievodu. Neobišli žiaden domec,     Zimnicu, maštaľ či bydelce. Každý kút, každý tvor potreboval nádej, že Svarog     znova vyhreje matku Zem a prevezme vládu od Morany.      I need to move this line               ajskôr prišli slová, vzápätí tma.      to the left, into the space that is reserved by wrapfigure


title: Xetex, how to fix/change "kpathsea" fontnames?

text: When running `xelatex` on our latex sources, we get the following error > kpathsea: Invalid fontname `<dictsym.pfb', contains '<' > > ** WARNING ** Could not locate a virtual/physical font for TFM "dictsym".   >  ** WARNING ** >> This font is mapped to a physical font "<dictsym.pfb".   >  ** WARNING ** >> Please check if kpathsea library can find this font: > <dictsym.pfb   >  ** ERROR ** Cannot proceed without .vf or "physical" font for PDF output... > > Output file removed. So the font file called `<dictsym.pfb` does not exist. Where does the less- than character come into there? At kpathsea/fontspec does not recognize a font whose name has a space in it, we have a question about a valid font name not being recognized, but the file name above appears to be corrupted. Any help is appreciated.


title: Macro to calculate \baselineskip for given font

text: I want to write a macro that returns the `\baselineskip` multiplied with a fixed value for a given font spec. That seems to be harder than I would imagine... after some fiddling I came up with this:               \ExplSyntaxOn     \box_new:N   \baseline_box     \newcommand{\threeLineSkip}[1]{         %\box_new:N   \baseline_box         \hbox_set:Nn \baseline_box { #1 \rule{1pt}{\baselineskip} g }              3\box_ht:N \baseline_box     }     \ExplSyntaxOff          \newlength{\test}     \setlength{\test}{\threeLineSkip{\Huge}}          \typeout{\the\test}      Obviously, this doesn't work yet, otherwise I wouldn't be asking the question. The error is on the `\setlength` line:               ! Illegal unit of measure (pt inserted).      But I don't understand why. I would even love to have a LuaTeX solution, but I don't even know how to begin with that one.


title: Which one to choose? Update (Admin) or Update, Settings (Admin) or Settings?

text: I am green on **MikteX** , and would like to have a try on this suprior tool. Environment: **Windows 8.1** , **ProteXt\MikteX 2.9.4533**. My Windows 8.1 has two accounts, namely the **administrator account** and the normal **restricted account**. I usually login into the restricted account as most of you for the sake of malware isolation. When install MikteX (an option in ProteXt) **fully** (not the small basic version), I need to input the administrator passowrd. And then everything goes fine until I choose to update my Miktex as noted from the official site. I am now in my normal restricted account. The problem is that when I switch to my Windows 8.1 metro, I found many **duplicated menu items** strucutured like this: > Maintenance (Admin)   >  |--Package Manager (Admin)   >  |--Settings (Admin)   >  |--Update (Admin) > > Maintenance   >  |--Package Manager   >  |--Settings   >  |--Update I insert the screenshot as reference for you: ![Menu items screenshot](http://i.stack.imgur.com/zSKGM.png) I hope to maintain the two accounts' MikteX maintain **_consistent_** (especially the package upate or some core settings).   1. Which update or settings or package manager wizard should I use?    2. How can I smartly maintain the MikteX installed on my two Windows accounts?


title: Acronym package: Full name after each section / chapter

text: I'm using the acronym package to produce a list of abbreviations and acronyms. Now, I want that the full name is printed after every new section and/or chapter. For example:               \acro{PC}{Personal Computer}      The usage would be:               Chapter 1:     \ac{PC} with puts out "Personal Computer (PC)" since its the first usage. For every further usage within this chapter it puts out only "PC".     Chapter 2:     Now \ac{PC} should again print "Personal Computer (PC)" for the first usage and only "PC" for all following. Currently it prints in both cases only "PC".      It would also be nice if there is an option to enable this also for each section.


title: Fontspec: Select minionpro font from local folder

text: I have the Minionpro Font files in the same directory as the master LaTeX file. When compiling, the path to the MinionPro fonts folder would be `../minion/` containing:               ./MinionPro-Bold.otf     ./MinionPro-BoldCapt.otf     ./MinionPro-BoldCn.otf     ./MinionPro-BoldCnCapt.otf     ./MinionPro-BoldCnDisp.otf     ./MinionPro-BoldCnIt.otf     ./MinionPro-BoldCnItCapt.otf     ./MinionPro-BoldCnItDisp.otf     ./MinionPro-BoldCnItSubh.otf     ./MinionPro-BoldCnSubh.otf     ./MinionPro-BoldDisp.otf     ./MinionPro-BoldIt.otf     ./MinionPro-BoldItCapt.otf     ./MinionPro-BoldItDisp.otf     ./MinionPro-BoldItSubh.otf     ./MinionPro-BoldSubh.otf     ./MinionPro-Capt.otf     ./MinionPro-Cn.otf     ./MinionPro-CnCapt.otf     ./MinionPro-CnDisp.otf     ./MinionPro-CnIt.otf     ./MinionPro-CnItCapt.otf     ./MinionPro-CnItDisp.otf     ./MinionPro-CnItSubh.otf     ./MinionPro-CnSubh.otf     ./MinionPro-Disp.otf     ./MinionPro-It.otf     ./MinionPro-ItCapt.otf     ./MinionPro-ItDisp.otf     ./MinionPro-ItSubh.otf     ./MinionPro-Medium.otf     ./MinionPro-MediumCapt.otf     ./MinionPro-MediumCn.otf     ./MinionPro-MediumCnCapt.otf     ./MinionPro-MediumCnDisp.otf     ./MinionPro-MediumCnIt.otf     ./MinionPro-MediumCnItCapt.otf     ./MinionPro-MediumCnItDisp.otf     ./MinionPro-MediumCnItSubh.otf     ./MinionPro-MediumCnSubh.otf     ./MinionPro-MediumDisp.otf     ./MinionPro-MediumIt.otf     ./MinionPro-MediumItCapt.otf     ./MinionPro-MediumItDisp.otf     ./MinionPro-MediumItSubh.otf     ./MinionPro-MediumSubh.otf     ./MinionPro-Regular.otf     ./MinionPro-Semibold.otf     ./MinionPro-SemiboldCapt.otf     ./MinionPro-SemiboldCn.otf     ./MinionPro-SemiboldCnCapt.otf     ./MinionPro-SemiboldCnDisp.otf     ./MinionPro-SemiboldCnIt.otf     ./MinionPro-SemiboldCnItCapt.otf     ./MinionPro-SemiboldCnItDisp.otf     ./MinionPro-SemiboldCnItSubh.otf     ./MinionPro-SemiboldCnSubh.otf     ./MinionPro-SemiboldDisp.otf     ./MinionPro-SemiboldIt.otf     ./MinionPro-SemiboldItCapt.otf     ./MinionPro-SemiboldItDisp.otf     ./MinionPro-SemiboldItSubh.otf     ./MinionPro-SemiboldSubh.otf     ./MinionPro-Subh.otf      Now I am asking myself, how to use the MinionPro font in a LaTeX document compiled with `lualatex`? I have tried the following:               \setmainfont[ Path = ../minion/,Mapping=tex-text]{MinionPro-Medium}     \usepackage{unicode-math}     \setmathfont[Path = ../minion/]{MinionPro-Medium}      but the Math parts look horrible and contain characters not from minion pro. The big integral sign is not used etc.. I have been able to use the local fonts folder successfully with pdflatex (How can I distribute a non-CTAN font with my source files?). Now to the central question: Are all the above listed `.otf` files complementary? How to use this font? I want to use it for math mode as well as for text mode. I prefer the medium version of the font, as the thickness is perfectly for my taste. Which file contains the math bits? Please note: I don't want to install the `.otf` in the system as I want to have them in the directory where I have them right now. I know that are many beginner questions but I am really stuck on this task. I would be happy if someone could guide me on how to use MinionPro, having it in my local folder.


title: I just downloaded MacTeX and TeXmaker and I am trying to quickbuild my first document in TeXmaker but it says cannot find log file?

text: I just downloaded MacTeX and TeXmaker and I am trying to quickbuild my first document in TeXmaker but It says cannot find log file? All of my settings are defaults. I am wondering how I need to setup everything to get MacTeX and TeXmaker to play nice together.


title: Fill the blank type of text in non exam document

text: I want to make a fill the blank type of text in a non-exam document. Here the desired result that I want:               Let A be a subset of R, A called measurable set if m*(...) = ........, for all .... in R      I know that it can be accomplished by using examdesign class. But I don't want to use another class just for this task. Here my attempt to create the example above.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     Let $A$ be a subset of $\mathbf{R}$, $A$ called measurable set     if $m^*(\ldots) = \ldots \ldots \ldots,      \text{ for all } \ldots \ldots \text{ in } \mathbf{R}$.     \end{document}      But the solution that I want is using something like `\blank{some text}` that will be substituted with dots. Extra: the dots must longer than the substituted text. Hence, I can write:               if $m^*(\blank{B}) = \blank{m^*(A \cap B) + m^*(A \cap B^c)}     \text{ for all } \blank{B} \text{ in } \mathbf{R}$.      How do I accomplish this?


title: Box or [ around multiple lines inside align

text: I have the following code               \documentclass{article}     \usepackage{amsmath}          \begin{document}     \begin{alignat*}{4}             \begin{minipage}[h!]{0\linewidth}                 \text{Let:} \end{minipage}             && G_{\delta_r}^{\beta} &= \frac{n_1 s + n_0}{s^2 + d_1 s + d_0} = \frac{0.01956 s + 7.01}{s^2 + 0.802 s + 6.489} \\             && step \left(G_{\delta_r}^{\beta}(s) \right) = \frac{G_{\delta_r}^{\beta}(s)}{s} &= \frac{1}{s} \cdot \frac{n_1 s + n_0}{s^2 + d_1 s + d_0} \\              \\              % \left[              % \makebox[0\linewidth][s] {             %   \begin{dcases}                     \makebox[0\linewidth][s]{Expanding with partial fractions:} \\                     && \frac{x_1}{s} + \frac{x_{21}s + x_{20}}{s^2 + d_1 s + d_0} &= \frac{1}{s} \cdot \frac{n_1 s + n_0}{s^2 + d_1 s + d_0} \\                     \\                     \makebox[0\linewidth][s]{Removing denominator:} \\                     && x_1(s^2 + d_1 s + d_0) + s(x_{21} s + x_{20}) &= n_1 s + n_0 \\                     \\                     \makebox[0\linewidth][s]{Has solutions:} \\                     \makebox[0\linewidth][s]{                     \begin{minipage}[h!]{0.3\linewidth} \centering                         $x_{21} = \frac{-n_0}{d_0} = -1.08$ \end{minipage}                     \begin{minipage}[h!]{0.3\linewidth} \centering                         $x_1 = \frac{n_0}{d_0} = 1.08$ \end{minipage}                      \begin{minipage}[h!]{0.3\linewidth} \centering                         $x_{20} = n_1 - \frac{n_0 d_1}{d_0} = -0.847$ \end{minipage} }                 % \end{dcases}                 % }             \\             \begin{minipage}[h!]{0\linewidth}                 \text{Hence:} \end{minipage}              && \frac{G_{\delta_r}^{\beta}(s)}{s} &= \frac{1.08}{s} - \frac{1.08s + 0.847}{s^2 + 0.8-2s + 6.489} \\             \\             \makebox[0\linewidth][s]{Completing the square:} \\             && \frac{G_{\delta_r}^{\beta}(s)}{s} &= \frac{1.08}{s} - \frac{1.08s + 0.847}{(s + 0.401)^2 + 6.328} \\             \makebox[0\linewidth][s]{Inverse Laplace:} \\             && \mathcal{L}^{-1}\left\{ \frac{G_{\delta_r}^{\beta}(s)}{s} \right\} &=  1.08 - e^{-.401t} \left(1.08 \cos(t\sqrt{6.328}) + \frac{0.847}{\sqrt{6.328}} \sin(t\sqrt{6.328}) \right)          \end{alignat*}     \end{document}      Which produces: ![](http://i.stack.imgur.com/107m4.png) I would like to put a box (or some kind of a bracket) like the one shown in the picture to denote "sub working out". The complications are that the box will need to span many lines of equations and many columns of the alignat environment. I have tried many things including `\makebox`, `\minipage`, `\bcases,` `\matrix` Any suggestions?


title: Equal (=) sign within TikZ label

text: I was trying to use an equal sign within a TikZ picture as a subcaption of an inner TikZ picture for comparing two images. Here is my code:               \documentclass{report}          \usepackage{amsmath}      \usepackage{mathtools}          \usepackage{tikz}     \usetikzlibrary{backgrounds}     \usetikzlibrary{positioning}          \begin{document}              \begin{tikzpicture}             \coordinate (p1) at (0,0);             \coordinate (p2) at (-3,0);                  \node[label=below:$\mathcal{L}(B)$] (left)              {                 \begin{tikzpicture}[framed,scale=0.56]                     \draw (p1) -- (p2);                 \end{tikzpicture}                };             \node[label=below:$\mathcal{L}^*(B)\text{$=$}\mathcal{L}(D)$,right=of left]             {                 \begin{tikzpicture}[framed,scale=0.56]                     \draw (p2) -- (p1);                 \end{tikzpicture}             };         \end{tikzpicture}          \end{document}      My workaround was to use `\text{$=$}`. A plain equal sign instead of this will produce and error. I think TikZ recognizes this equal sign a separator of a key-value-pair of an attribute. Is there a right way to produce a plain equal- sign without this workaround?


title: Where/how is kerning data stored in actual font files?

text: Where in most font files do they store information such as "If character %1 is followed by character %2, decrease the spacing by x points"? Are all the (%1,%2, resulting_kerning) tuples in a central location by themselves, or would the section of the font file describing %2 have a section identifying %1 as a kerning pair (or a table of (%1, resulting_kerning) tuples if %2 had multiple possible kerning results for different preceding characters)? Or something different? How is it actually architected in most font file formats? %1 and %2 were just used as symbol placeholders in my question here.


title: How to make a block scheme with arrows in LaTeX?

text: I am new to LaTeX, I have searched in many forums, but can not find, how to depict block scheme like on the picture. Could you please give me hints or commands, which i can use in this case? And my LaTeX doesn't run tikzpicture package.... Thank you very much in advance. ![I wish to depict scheme like this](http://i.stack.imgur.com/mYy42.png)


title: natbib: how to display partial authors in reference

text: I am using `natbib` to manage my references, now I have a problem: my reference list always displays all author names of an article:               Marcel H. Schulz, Daniel R. Zerbino, Martin Vingron, and Ewan Birney. Oases: robust     de novo RNA-seq assembly across the dynamic range of expression levels. Bioinformatics     (Oxford, England), 28(8):1086–1092, April 2012. 7, 9, 10, 40      I set the options to be:               \usepackage[round, sort, numbers]{natbib}          \bibliographystyle{Latex/Classes/PhDbiblio-url2}      \renewcommand{\bibname}{References}      \bibliography{9_backmatter/references}       And use `cite{}` to cite the references. I tried to used `biblatex`, but seems it is not compatible with `natbib`:               \usepackage[maxnames=3]{biblatex}      I want to display at most 3 authors in full name, otherwise display as `et al.` How to set it? ================ Edit: The file PhDbiblio-url2.bst can be found here: https://bitbucket.org/dekz/thesis/src/3f8d8507cddc/Latex/Classes/PhDbiblio- url2.bst It seems like the lines here define the display of authors:               INTEGERS { nameptr namesleft numnames }          FUNCTION {format.names}     { 's :=       #1 'nameptr :=       s num.names$ 'numnames :=       numnames 'namesleft :=         { namesleft #0 > }         { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=           nameptr #1 >         { namesleft #1 >             { ", " * t * }             { numnames #2 >             { "," * }             'skip$               if$               t "others" =             { " et~al." * }             { " and " * t * }               if$             }           if$         }         't           if$           nameptr #1 + 'nameptr :=           namesleft #1 - 'namesleft :=         }       while$     }      But how to set the `numnames` from the `tex` file?


title: Replacing "a" in latin modern

text: I would like to replace the "a" (double-story minuscule) for the single-story minuscule in Latin Modern. I really hate that the printed "a" is not the same as the handwritten "a", and would like to uniformly replace it in LaTeX. Is that possible, if so how? Is there an alternative version for the glyph "a" in Latin Modern? If so, how do I access it? If not, are there other fonts where such a replacement is possible, and which contains the appropriate symbols to create mathematics?


title: Displaying the binomial coefficient symbol in math mode

text: The problem is caused by the symbol of binomial coefficient (symbol of Newton), often used in math:               {N}\choose{k}      In my document I have formula:               $$ P(A) = \sum P(\{ (e_1,...,e_N) \})  =  {N}\choose{k} \cdot p^kq^{N-k}$$      which is rendered as: ![enter image description here](http://i.stack.imgur.com/f3Gkh.png) but should be: ![enter image description here](http://i.stack.imgur.com/zJJ41.png)


title: Using TikZ to create a tree with root node at the bottom

text: Is it possible to draw a tree with the root node at the bottom? The image below demonstrates what I'd like, but is upside down. ![Tree diagram](http://i.stack.imgur.com/ULb2q.png) I've looked into similar questions, most notably How do I draw a B+ tree in latex? But they haven't been entirely helpful.


title: problem with plot

text: I am having a problem with the following code for generating a plot. I don't know why the first group (Yago) does not include the first entry (the blue one for Sys1) and the second group does not include the last entry (the green one for Sys6). Any suggestions would be appreciated.               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}         \begin{tikzpicture}              \begin{axis}[                     major x tick style = transparent,                 xtick=data,                     ybar,                     ymin = 0,                     ymax = 100,                 ymajorgrids = true,                 ylabel = {Offline Time (in min.)},                     xlabel = {Data Set},                     symbolic x coords = {Yago,DBLP},                     ytick = {0,20,40,60,80,100},                     scaled y ticks = false,                 bar width=10pt,                 ]                 \addplot coordinates {(Yago,20) (DBLP,12)};                 \addplot coordinates {(Yago,45) (DBLP,30)};                 \addplot coordinates {(Yago,30) (DBLP,15)};                 \addplot coordinates {(Yago,65) (DBLP,45)};                 \addplot coordinates {(Yago,25) (DBLP,14)};                 \addplot coordinates {(Yago,35) (DBLP,25)};                      \legend{Sys1,Sys2,Sys3,Sys4,Sys5,Sys6}                  \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/lSLph.png)


title: How to put a letter above another?

text: How do I "stack" a letter above (not in front) another (in math mode)? It should look the same as binomial coefficients, just without the parentheses (which rules out `\stackrel` and `\overset`, since it makes the symbol on top smaller, as if it's tweaked superscript).


title: Installing mincho font for MikTeX 2.9 on Windows 7

text: I want to use Japanese Writing in my LateX document and for that I (think that) need to install the Mincho font, which is currently not fully available from mixTeX. My Problem is that I need to be able to write some old japanese Characters which are not displayed when I use the following piece of code to write japanese:               \newcommand{\jap}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}      What I did till now:   * I downloaded mincho-1-8-20080306.tar.gz from   http://ctan.org/tex-archive/fonts/wadalab   * I installed the files in my MikTeX installation   * I changed the line of code from `\newcommand{\jap}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}` to `\newcommand{\jap}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}` I get the following error:               LaTeX Font Warning: Font shape `C70/mincho/m/n' undefined     (Font)              using `C70/song/m/n' instead on input line 146.              ("E:\Program Files (x86)\MikTeX\tex\latex\cjk\UTF8\c70song.fd")         ! Undefined control sequence.         try@size@range ...extract@rangefontinfo font@info                                                            <-*>@nil <@nnil       I'd appreciate any help on that matter. Especially I'd like to know where i can check if I installed the font correctly, or if there is any other way to get the characters showing that don't show with the "gbsn" font.


title: Hanging indent inside list

text: I would like items in a list to have a hanging indent (that is, for all lines after the first to be indented by a space or more), but the traditional `\hangindent` command doesn't work for this.               \documentclass{article}          \begin{document}     \hangindent=1cm This line of text has a hanging indent that looks fine, as long as it is outside a list environment.     \begin{enumerate}     \item \hangindent=1cm This line is inside a list environment and doesn't have a hanging indent- how can I add one?     \end{enumerate}     \end{document}      ![enter image description here](http://i.stack.imgur.com/QOhyN.png) How can I add a hanging indent within a list?


title: insert author name in table of content

text: I am using latex editor **LyX**. I write a book with many authors. I want to list each author name in each chapter in table of content. How can I list author name in table of content?


title: citation with APA not working

text: I try to use the following code for citation but it is not working .               \documentclass[10pt,a4paper]{article}     \usepackage{apacite}          \usepackage{cite}     \begin{document}     ~\cite{Abuelyaman2008} ~\cite{Abuelyaman2008}          ssssssssss\citep{Agrawal2002}               \bibliographystyle{apacite}     \bibliography{VSM_references}          \end{document}      I want to show author name and year if there is just one author but if there are three authors just show the first author and et al. This is one of the `.bib` entries:               @ARTICLE{Abuelyaman2008,       author = {Eltayeb Salih Abuelyaman},       title = {An Optimized Scheme for Vertical Partitioning of a Distributed Database},       journal = {IJCSNS International Journal of Computer Science and Network Security},       year = {2008},       volume = {VOL.8 No.1},       pages = {310-316},       owner = {DELL2},       timestamp = {2013.03.31}     }      And this is the other one:               @ARTICLE{Agrawal2002,       author = {Sanjay Agrawal, Surajit Chaudhuri, Gautam Das},       title = {DBXplorer: A System for Keyword-Based Search over Relational Databases},       journal = {Data Engineering, 2002. Proceedings. 18th International Conference         on. IEEE},       year = {2002},       owner = {Dell2},       timestamp = {2013.03.30}     }      many thanks in advance Ayham


title: Disabling selected ligatures with microtype

text: With a font in `T1` encoding, using `pdfTeX` and the package `microtype`, I'd like to disable the ligatures for "ff" and "ffi", but keep the ligature for "fi". If I type in the preamble               \DisableLigatures[f]{encoding=T1}      `microtype` will disable all the ligatures above. How could I keep the ligature for "fi"? I have tried               \DisableLigatures[ff]{encoding=T1}      and               \DisableLigatures[f_f]{encoding=T1}       but none works (as expected, though).


title: Hacking Animate

text: While babysitting my kids yesterday I played little bit with one of my favorite LaTeX package `PSTricks`. Naturally I started toying with something more "advanced" so a toyed a bit with animations. On `PSTricks` website I learned about animate package. To expend further on the topic I also read a PracTEX Journal, 2010, No. 1. article, _Tools for creating LATEX-integrated graphics and animations under GNU/Linux_. Long story short 2 hours latter I came up with the following conclusions.   1. Including animations into `pdf` files as oppose to using external files and external media players should be preferable approach in handling animations in presentations at least when it comes to portability.   2. I like the idea of using external scripting language to do actual animations in `pdf` files instead of generating `pdf` files of enormous size.    3. Animate takes the right approach but it fails short to deliver for two reasons. It requires Adobe Reader which is essentially Windows specific application. I am an `OpenBSD` user and the obsolete 7.0 version of Linux `AcroRead` which I can get to work via Linux emulation layer is compiled without required JavaScript. Why JavaScript? Since I do not actually use `AcroRead` my guess is that that is probably the only language it is supported. Here is my question. Does anybody knows enough about internals of animate package to tell me how easily would be to replace JavaScript with `Lua` :) Second question for `xpdf` (or other `pdf` viewers based on different `pdf` rendering libraries like `mupdf` or `epdfview`) hackers is how easily would be to add `Lua` support in `xpdf`. Advantage of "my" approach should be obvious. I would like to thank Dr. Herber Voss for doing a great job with `PSTricks`. The only really useful thing for humanity which came out of my goofing of with `PSTricks` yesterday and animate package is that I ordered his book PSTricks: Graphics and PostScript for TeX and LaTeX for our university library.


title: Editor that replaces only text inside math environments

text: I'm writing a document where I had to change all instances of the variable `i` to `x` and the document is already considerably long. Is there a editor that will allow me to do this, or in general, replace text inside math environments?


title: Switching first paragraph indentation rules with babel

text: I am aware that many questions have already appeared here regarding the indentation of the first paragraph, but I did not find any on this precise problem. I am writing a document with some portions in French and others in English. My understanding of typographic rules is that in English the first paragraph of a chapter should not be indented, but it should be in French. Now this is usually well taken care of by babel, which changes the rule accordingly depending on whether I load french or english. But when I load both, it uses the rules of the second one throughout the whole document, even in the parts where I input               \selectlanguage{french} or \begin{otherlanguage}{french} Lorem Ipsum  \end{otherlanguage}.      Of course I could correct it by hand, but it is slightly disappointing. Is there someway to tell babel to apply the correct indentation settings when I switch the language ?


title: openany for hepthesis

text: Hi I'm using the hepthesis template and I creates a empty page before any new chapter. Since it is build upon `scrbook`, is there anyway to use something like `openany`               \documentclass[openany]{hepthesis}      doesn't work...


title: How to change the color and separation of fillstyle=vlines and \fillstyle=hlines PSTricks?

text: I am doing a figure and I want to fill a polygon with `fillstyle=vlines` or `fillstyle=hlines` but I want this filling in a different color to the black which is what throws by default. Besides this, I also want to change the separation between the lines. How can I do this? Example:               \documentclass{article}     \usepackage{pst-poly}     \usepackage{pst-fill}     \begin{document}     \begin{center}     \begin{pspicture}(0,0)(6,6)     \pspolygon[fillstyle=vlines](1,1)(1,4)(4,4)(4,1)     \end{pspicture}     \end{center}     \end{document}      ![enter image description here](http://i.stack.imgur.com/A6M9z.jpg) The idea is to change the color of the command `vlines`. ![enter image description here](http://i.stack.imgur.com/09MDi.jpg)


title: AucTeX PDF syncing in Emacs, multiple windows problem

text: I have enabled `Tex-source-correlate-mode` with `synctex` as the syncing method. When I have a single Emacs window open, it works fine. But if I have multiple Emacs windows open, whenever I press Ctrl-left clik on the PDF document, the source file is opened in the most recent Emacs window (apparently). Is there a way to force the sync to occur to the original .tex file?


title: How to simply center equations using eqnarray*?

text: So I have this code here:               \begin{eqnarray*}         x + (y - 2)^4 = w^2 \\        (x  - 9)^2 + y_2^2 = w^2 \\         x + (y - 2)^4 = w^2 = (x  - 9)^2 + y_2^2 \\     \end{eqnarray*}      As you can see, I get the following result: ![enter image description here](http://i.stack.imgur.com/jYaI9.png) My problem is that I want to 'center' all those equations, so that they 'look nice'. What that means is that I dont necessarily want the equal signs to be alligned. I want the entire thing to be centered, evenly, so that it looks pleasing to the eye. Basically, if the top two equations were moved to the left somehow, then that would be 'centered'. How can I go about doing this?


title: Bibtex-like macros organising software

text: From what I gather (I don't use them, and have never actually managed to get it to work - though this is not my issue), bibtex/biber uses a database of references, alongside an ancillary file created by TeX, to produce a bibliography, creating a file which only has references to the citations used in the core `myfile.tex` document. Correct or not in my understanding of bibtex itself, I'd like to do something similar, but with a database of macros; I have rather a large file full of miscellaneous macros that I've used in various projects over the years. I'm about to submit a paper to the arXiv (my first, yay!), and it occurred to me that I don't really want to send them my whole massive, redundant macros list, nor do I want to go through it looking for the ones I've used in this document. I'd prefer if there were a package that generated a `myfile.macro` or something similar, that contains the macros out of the database I've called - preferably with dependencies, that I could plug-in to `myfile.tex` on a second run. My question is whether someone has written a package or piece of additional software to do this? A cursory google search hasn't turned up anything, although of course I really don't know what I'm looking for, and "latex macros" is a pretty large topic. I'll be happy to do it myself, as it seems like a noble cause and a useful piece of software to have, but figured it's better to ask around than duplicate someone else's efforts and probably do a worse job at solving the problem.