title: XeLaTeX font choice for separable ligatures in PDF, redux

text: I've read previous question/answers on this topic (e.g. this), but am still in the dark. The problem I'm trying to solve: Which font combination for XeLaTeX will at the same time provide a legible and attractive visual aspect of the final document and the ability to copy/paste out of and search inside the PDF file. The issue is the separation of ligatures. Here's a small example of my .TEX file:               \documentclass[12pt,letter]{article}     \usepackage[margin=1in]{geometry}     \usepackage[sf,bf]{titlesec}     \usepackage{parskip}          % Font settings     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \setmainfont{Minion Pro}     \setsansfont{Myriad Pro}          %% The document     \begin{document}          \section{Introduction/Question iffy fig there office baffle}     This reports continues from the initial report. It contains answers to questions, follow-up work etc  iffy fig flat office baffle          \subsection{Slope and aspect map generation iffy fig there office baffle}     There were some pitfalls discovered when generating slope gradient and aspect maps from the ASTER DEM using the GDAL command line utilities. Ähnlich Schoß. μ δικαιώματα in Greek. $\mu$ in math.          \textbf { Questions on Slope/Aspect Maps iffy fig there office baffle}          Should the cut-off for ``flat" be selected in a more scientifically founded way?           The three sub-regions are not very homogeneous: there is "noise", that is, isolated pixels or small structures within one region (say, ``north") that are classified as a different region (say, ``south"). Should these be smoothed (via a median filter, for example, or a morphological filter)?      \end{document}      I have tried this with the combinations   * Minion Pro/Myriad Pro   * Linux Libertine O/Linux Biolinum O   * Cambria/Calibri Any of the three would be acceptable for my purposes, though I like the Minion/Myriad combination most. But each of them fails to separate different sets of ligatures. Cambria is overall worst. Libertine/Biolinum is good for he fl/fi/ffl/ffi ligatures, but the (beautiful) capital Q in Libertine, and capitalized Th are an issue. Below is a screenshot of the result of copy/pasting from the PDF output. Are there any settings in `fontspec` or `\defaultfontfeatures` that I could change? ![enter image description here](http://i.stack.imgur.com/PNHtO.png)


title: how to use conditional to define different \begin and \end environment at compile time

text: I just need little help on the syntax for this. I am using tex4ht, and I get an error when I use `empheq` for the `align` environment. I want to build this TeX file both in pdflatex and htlatex. I normally use `\ifdefined\HCode` to conditionally compile things. But in this case, it is not working. I need to conditionally use `empheq` or not depending if compiling with tex4ht or not. Here is MWE               \documentclass{article}     \usepackage{empheq}     \begin{document}          \ifdefined\HCode     \begin{align*}     \else     \begin{empheq}[box=\fbox]{align*}     \fi     %     \lambda_{spiral}  &  =-0.0551\\     \lambda_{rolling}  &  =-56.5025     %     \ifdefined\HCode     \end{align*}     \else     \end{empheq}     \fi          \end{document}      I am trying to avoid duplicating all the equations in both environments. This below would works               \documentclass{article}     \usepackage{empheq}     \begin{document}          \ifdefined\HCode     %     \begin{align*}     \lambda_{spiral}  &  =-0.0551\\     \lambda_{rolling}  &  =-56.5025     \end{align*}     %     \else     %     \begin{empheq}[box=\fbox]{align*}     \lambda_{spiral}  &  =-0.0551\\     \lambda_{rolling}  &  =-56.5025     \end{empheq}     %     \fi          \end{document}      I think one is not supposed to break the environment with conditional like the first case above? May be due to how LaTeX parses the code? I'm using TeX Live 2013.


title: Acquiring YAP without MiKTeX

text: It's a very trivial question, but where I can to download `YAP` without MiKTeX? I have begun to use TeX Live instead if MiKTeX, however, I want to keep `YAP`. In TeX Live, there is only `DVIOUT` application. I didn't find a separate installer for `YAP`. Do you know where it's possible to get installer just for `YAP`?


title: addplot data frame

text: Square one: I have about 8 hours of experience. I want to make a barplot in `pgfplots` and see many great, creative solutions on this blog. All I want at this stage is not to specify coordinates and not to read in a `txt` file of some kind: I want to use a data frame created in R as my data set. I am not sure whether my question makes sense, perhaps too elementary. The code below results in a very nice barplot.               \begin{tikzpicture}     \begin{axis}[ybar interval,         xtick=data,         xticklabel interval boundaries,         x tick label style=             {rotate=90,anchor=east}         ]     \addplot coordinates         {(0,2) (0.1,1) (0.3,0.5) (0.35,4) (0.5,3)          (0.6,2) (0.7,1.5) (1,1.5)};     \end{axis}     \end{tikzpicture}      All I want is to use this data frame (data) in the code above               av<-c(3,4,5,6,7,8)     best<-c(11,14,15,16,21,9)     data<-rbind(av,best)


title: Help creating quite complex Tikz figure

text: I would like to creat the attached figure in Tikz. As i am quite new to tikz i do not know what to use and how to start.![enter image description here](http://i.stack.imgur.com/QBQaG.png) As it has some intricate lines and arrows. Any suggestion is welcome


title: Should I use the font encoding LY1 with the package libertine?

text: I normally use `\usepackage[T1]{fontenc}` without giving it any thought. The package `libertine` seems to provide more ligatures with the `LY1` encoding.               \documentclass{article}     \usepackage{libertine}     \usepackage[LY1,T1]{fontenc}     \newcommand{\f}{fb ff fh fi fj fk fl ft}     \begin{document}     \fontencoding{T1}\selectfont\f          \fontencoding{LY1}\selectfont\f     \end{document}      ![fb ff fh fi fj fk fl ft](http://i.stack.imgur.com/qEiTQ.png) Are there any drawbacks to using `LY1`?


title: Cross reference the equation: number are not consistent

text: I have a very weird problem in Latex. I have an equation:               \begin{equation}     \label{eq:eq1}     \end{equation}      This equation has the number (1) at the end of it. This is correct and what I want. However, when I cross reference it later in the document, using the command:               \eqref{eq:eq1}      It shows _Eq. 3.1_ where 3 is the number of the section where the equation is defined. HOwever, I want it be _Eq. (1)_ I have never encountered this before. Could anyone point me out how I can fix it? Thank you so much for your help! The package used in the latex is:               \documentclass[11pt]{svjour3}                         \usepackage[letterpaper,margin=1.5in]{geometry}     \usepackage[protrusion=true,expansion=true]{microtype}     \usepackage{times, amssymb, amsfonts, latexsym, amsmath,algorithm, algorithmic}     \usepackage{subfigure, graphicx, url, color, xspace, multirow, cite, floatflt}     \usepackage[semicolon, square]{natbib}     \usepackage[normalem]{ulem}     \smartqed


title: Get a black \mathring symbol

text: How can I get a black `\mathring` circle above variable, same as `\mathring` except the circle is "filled"?


title: centering block body with respect to block title in beamer

text: I'm trying to write a poster using beamerposter package. I would want to structure it using 3/4 columns, and each column should have a certain number of blocks. I would want to define my own theme and i desire a rounded beamercolourbox for the block title, while the block body beamercolourbox should be a little narrower than the title one, even if centered with respect to it. The following code produces the block body beamercolourbox ragged left.               \setbeamertemplate{block begin}{     \vskip.75ex %     \begin{beamercolorbox}[rounded=true,leftskip=1cm,colsep*=.75ex]{block title}%     \usebeamerfont*{block title}\insertblocktitle     \end{beamercolorbox}%     \vskip.5ex %     \usebeamerfont{block body}%     \begin{beamercolorbox}[wd=.95\linewidth,colsep*=.75ex,sep=.75ex,vmode]{block body}%     } %     \setbeamertemplate{block end}{ %     \end{beamercolorbox} %     }      I tried enclosing all into a center environment as follows, but nothing has changed:               \setbeamertemplate{block begin}{     \vskip.75ex %     \begin{center}%     \begin{beamercolorbox}[rounded=true,leftskip=1cm,colsep*=.75ex]{block title}%     \usebeamerfont*{block title}\insertblocktitle     \end{beamercolorbox}%     \vskip.5ex %     \usebeamerfont{block body}%     \begin{beamercolorbox}[wd=.95\linewidth,colsep*=.75ex,sep=.75ex,vmode]{block body}%     } %     \setbeamertemplate{block end}{ %     \end{beamercolorbox} %     \end{center}%     }      Then i tried by using \hfill (as follows), but now the position is "better" but not yet centered, as it is slightly down left-positioned with respect to the title beamercolorbox.               \setbeamertemplate{block begin}{     \vskip.75ex %     \begin{beamercolorbox}[rounded=true,leftskip=1cm,colsep*=.75ex]{block title}%     \usebeamerfont*{block title}\insertblocktitle     \end{beamercolorbox}%     \vskip.5ex %     \usebeamerfont{block body}%     \hfill%     \begin{beamercolorbox}[wd=.95\linewidth,colsep*=.75ex,sep=.75ex,vmode]{block body}%     } %     \setbeamertemplate{block end}{ %     \end{beamercolorbox} %     \hfill%     }      Any idea on how to solve this issue? Thank you in advance for your attention. Regards.


title: Beamer and JavaScript in a web browser

text: I have written a talk in Beamer and to illustrate one of my points I've written a program in JavaScript (well actually Processing). You can view it here (it seems to run ok in Chrome and Firefox, and indeed on my phone). At the moment I `Alt`+`Tab` out of my presentation into Google Chrome when it comes to the relevant slide in my talk. This isn't such a bad solution, but it's not a _nice_ solution. I would like to be able to export my slides into html/svg and then use some combination of JavaScript and HTML5 to view my slides in the browser. Googling I wasn't able to find a well-documented approach to this, although there are a lot of snippets, mainly on this site. Has anyone had success in doing this? And if so what tools/path did you use? Such an approach loses the _absolute_ portability of the PDF format, but gains _practical_ portability in the sense that I could show someone my slides on a tablet with all features intact.


title: Flexible/automatic alternative to multienum?

text: I'd like to typeset the items in an `enumerate` environment side-by-side. Preferably, each item would take up only as much space as necessary, perhaps plus some extra padding, and the next item would be immediately after it (unless, of course, the items ran off the end of the page, in which case it should wrap to the next line, but in my situation this won't be happening). I found the `multienum` package, but it only has a certain number of positioning options, rather than automatically laying out items like would normally be done with text. Its syntax may also be slightly horrifying. Any suggestions for alternatives? * * * Edit: this is what I'm eventually going for (multiple sub-items on their own line):               (a) Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do         eiusmod tempor incididunt ut labore et dolore magna aliqua.              [ 1 2 ]          [ x 0 ]         (i)  [ 3 4 ]    (ii)  [ 0 3 ]    (iii) etc.              [ 5 6 ]          [-2 4 ]          (b) ...      with a reasonable amount of horizontal space between items.


title: Warning: No -m.map found for TS1

text: I'm using the `cmap` package, the `mmap` package and the `textcomp` package along with them and I'm getting the following error when trying to include the `\copyright` symbol:               Package mmap Warning: !!! No -m.cmap file found for TS1 !!!      I have a pretty basic understanding of how `cmap` and `mmap` work... can anyone explain this warning to me and tell me how to get rid of it? (I know it's just an innocent warning, but I like to brag about my TeX files compiling with none :P) MWE:               \RequirePackage[resetfonts]{cmap}     \RequirePackage[useTeX]{mmap}          \documentclass{article}          \usepackage{textcomp}               \begin{document}            \copyright          \end{document}      PS: I read that the `\RequirePackage` method was preferred for `cmap` and `mmap`, can't remember where though... can anyone elaborate on this matter please?


title: Can a shape be composed out of "subshapes" in TikZ?

text: Suppose one were to make a simple "dumbbell" shape in TikZ. (My actual example is more complicated, but let's stick to this simple one). That is, we want a shape constructed out of two circles, and a line segment between them. You'd like to define this via `\pgfdeclareshape`, and then in your TikZ code, you want to be able to "inherit the anchors" from the subshapes, i.e. you'd like to be able to say something like:               \node[dumbbell] (A) at (0,0) {};     \draw (A.left circle.north east) to (1,3);      As I understand it, this is currently impossible. Or is there a clever way to do it? The point is you don't want to have to manually code in all those anchors on each circle. Even if that's okay in this example, imagine if your shape was complicated and contained dozens of circles, ellipses, trapeziums, etc... you really want to be able to construct a shape made out of "subshapes", and then have a "directory structure" to the anchors. One way of doing it would be for `dumbbell`to have a `\savedmacro`which actually constructs two more nodes of type circle, something like this:               \pgfdeclareshape{dumbbell}     ...     \savedmacro{}{\pgfnode{circle}{my line.left anchor}{}{[?name of dumbbell node?].left circle}{.code to create circle..}}      The trouble is that _we'll need to know the name of the dumbbell node when we create its offspring circles_. Because we'll want to actually use it in practice as above, i.e.               \node[dumbbell] (A) at (0,0) {};     \draw (A.left circle.north east) to (1,3);      Is this possible? Can you ask pgf to give you the name of a node? **Update** : 17-05-2011. I've tried Martin's second suggestion below of using the key `\tikz@fig@name` to access the name of the node inside of the `\pgfdeclareshape` environment, and then creating a new node using `\pgfnode` based on this name, inside the `\backgroundpath`. I can't get it to work, I get an error `No shape named ... is known`. Perhaps the new node I create is somehow only local to the `\backgroundpath` environment where it is created?


title: Cite without author's name

text: The `\cite` command places the author's name and date in the document. If I have already mentioned an author's name, though, I only need the date and maybe a letter: "Lewis (1998b) claimed that ..." How do I do this?


title: Customizing the algorithm/algpseudocode package

text: After asking this question: Change FORALL to FOREACH in algorithms package, some issues arose in the comments. I have created the following sample document, and have three questions.               \documentclass{article}          \usepackage{algorithm}     % Need it for floating environment     \usepackage[noend]{algpseudocode}      % Hide endif .etc     \usepackage{caption}     % Need it for \caption*          \algrenewcommand{\algorithmicrequire}{\textbf{Input:}}     \algrenewcommand{\algorithmicensure}{\textbf{Output:}}     \algrenewcommand{\algorithmicforall}{\textbf{for each}}     % \algrenewcommand instead of \renewcommand according to manual     \newcommand{\To}{\textbf{to}}     % Not stated in manual, \Return and \algorithmicreturn are defined, but no \algorithmicstate, why?     \newcommand{\Dosth}{\textbf{Do Something }}     % Need space here, why?     \def\ForEach{\ForAll}     % Define new macro. Fail to use \algorithmicforall, why?     \begin{document}          \begin{algorithm}         \caption*{\textbf{Algorithm:} \textsc{Depth First Search}} \label{alg:dfs1}              \begin{algorithmic}[1]             \Require Graph $\mathcal{G = (V,E)}$             \Ensure Graph $\mathcal{G}$ with its vertices marked with consecutive integers in the order they have been visited by the DFS traversal             \Statex             \State Mark each vertex in $\mathcal{V}$ with $0$ \Comment As ``unvisited''             \State $count \gets 0$             \ForEach{vertex $v \in \mathcal{V}$}                 \If{$v$ is marked with $0$}                     \State \Call{DFS}{$v$}                 \EndIf             \EndFor             \State \Return             \Statex             \Function{DFS}{$v$}                 \State $count \gets count + 1$                 \State mark $v$ with $count$                 \State \Dosth with $v$                 \ForEach{vertex $w \in \mathcal{V}$ adjacent to $v$}                     \If{$w$ is marked with $0$}                         \State \Call{DFS}{$w$}                     \EndIf                 \EndFor                 \State \Return             \EndFunction              \end{algorithmic}     \end{algorithm}          \end{document}        1. Why is there no `\algorithmicstate` defined?   2. Why, when I define a new command do I need to add a space after it?   3. Why does `\def\ForEach{\ForAll}` work but `\def\ForEach{\algorithmicforall}` not work


title: How to typeset my research publication?

text: I have the content for a small research publication ready. I have noticed that the formatting of most of the research papers looks the same. How can I quickly convert my text to a research formatting? Though I would like to learn the internals of tex, I might not have sufficient time for it currently. I am looking for a quick solution :)


title: Reliable code for automatic \noindent after specific environments?

text: > **This question led to a new package:**   >  `noindentafter` There are a number of environments which I never want to follow up with an indented paragraph. `itemize`, `enumerate`, `theorem`, `definition`, etc. I know there are people who think this is bad style. But it's a personal preference. Those environments basically always end a paragraph for me, so the visual clue is not needed in my case. I've found several similar questions, but none of them do what I need:   * Automatic \noindent on the first paragraph of each theorem environment   * Automatically adding \noindent after \section{*}   * Automatic noindent after quote environment That third one was actually most useful, but appears to be unreliable for patching existing environments with. It doesn't seem to be working in my `memoir` document. To be clear, I don't want to remove the actual paragraph break. That's a semantic concept. I just want to patch the document style so that paragraphs following certain environments remain unindented. I've tried the following two 'solutions' (which use `etoolbox` for patching):               \newcommand*{\noindentnext}{\everypar{{\setbox\z@\lastbox}\everypar{}}}     \newcommand*{\NoIndentAfterEnv}[1]{\AfterEndEnvironment{#1}{\noindentnext}}     \newcommand*{\NoIndentAfterCmd}[1]{\apptocmd{#1}{\noindentnext}{}{}}          \NoIndentAfterEnv{itemize}     \NoIndentAfterEnv{theorem}     ...      This one is loosely based on the third post from the list above. It sometimes works. It sometimes does nothing. I'm unable to predict when it will fail. The second:               \let\old@par\par     \newcommand*{\noindentnextpar}{\def\par{\let\par\old@par\par\noindent}}     \newcommand*{\NoParIndentAfterEnv}[1]{\AfterEndEnvironment{#1}{\noindentnextpar}}     \newcommand*{\NoParIndentAfterCmd}[1]{\apptocmd{#1}{\noindentnextpar}{}{}}      I invented this one myself. It breaks when the patched environment is _not_ followed by a paragraph. It has also shown itself to inexplicably fail in other situations. Once and for all, I'd like to have a reliable way to do this. Let me give an example of what I need, just to be clear:               \NoIndentAfterEnv{itemize}          \begin{itemize}         \item ...     \end{itemize}          This starts a new paragraph. Note the empty line. But it should not be indented.          But this paragraph \emph{should} be indented.


title: A version of colorbox that works inside math environments

text: I'd like to highlight particular parts of an amsmath environment. Here's a minimal working example:               \documentclass{article}     \usepackage{amsmath,color}     \newcommand{\abs}[1]{\lvert#1\rvert}     \newcommand{\Abs}[1]{\left\lvert#1\right\rvert}          %\newcommand{\highlight}[1]{\colorbox{yellow}{#1}}     \newcommand{\highlight}[1]{\boxed{#1}}          \begin{document}     \begin{alignat*}{2}     &\lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x} = \ell \\     \iff& \forall \epsilon > 0, \, \exists \delta > 0 \text{ s.t. if }     0 < \abs{\Delta x - 0} < \delta,     \text{ then } \Abs{\frac{\Delta y}{\Delta x} - \ell} < \epsilon \\     \iff& \forall \epsilon > 0, \, \exists \delta > 0 \text{ s.t. if }     0 < \highlight{\abs{x - x_0}} < \delta, \text{ then }     \highlight{\Abs{\frac{f(x) - f(x_0)}{x-x_0} - \ell}} < \epsilon     \end{alignat*}          \end{document}      If I change which version of the `\highlight` command is commented out, the compiler starts complaining about `Missing $ inserted`.


title: Two Unicode fonts Mapping

text: I have certain text that I typed using Unicode (Devanagri input) I want to get output to a different unicode (Telugu) output. I created a ".map" file and complied it with "teckit_compile". I created the .map file as shown below. Is there anything wrong in this.               LHSName "Devanagari"     RHSName "Telugu"     LHSDescription "Devanagari script"     RHSDescription "Telugu script"          pass(Unicode)          U+0901 <> U+0C01     U+0902 <> U+0C02      etc. etc. I got the mapping information from this site http://www.ssec.wisc.edu/~tomw/java/unicode.html


title: How to use \textbackslash

text: Been looking around and everywhere it tells me to use `\textbackslash` in LaTeX. However if I write a text "yadayadayada in `\textbackslash` c `\textbackslash` f we have...." A demonstration or so would be highly apprectiated. Thanks for helping a noob.


title: Small indentation appears when adding custom header

text: A small indentation appears on the first line of the paragraph when I add \pagestyle{myheader} to the MWE. I don't want it there. Thanks to Gonzalo Medina's answer I did the part described in Section format. MWE:               \documentclass[11pt,oneside,article]{memoir}     \usepackage{lipsum}          % Begin Section format      \newcommand{\marginbox}[1]{%       \parbox[t][0pt]{10em}{%       \upshape\sffamily\raggedright\mbox{}#1}%     }     \newcommand{\marginhead}[1]{%       \bfseries\smash{\raisebox{\baselineskip}{\llap{\marginbox{#1}\kern3em}}}%     }          \setsecindent{0em}     \setsecheadstyle{\marginhead}     \setbeforesecskip{1em}     \setaftersecskip{0em}     \setsechook{%       \setsecnumformat{\csname   the##1\endcsname\enspace\par\nobreak}%     }     % End Section format          \copypagestyle{myheader}{ruled}     \makeevenhead{myheader}{}{}{My-Name}     \makeoddhead{myheader}{}{}{Other-Name}     \pagestyle{myheader}          \begin{document}          % Layout     \settrims{0pt}{0pt}     \settypeblocksize{562pt}{300pt}{*}     \setulmargins{114pt}{*}{*}     \setheadfoot{28pt}{24pt}     \setheaderspaces{*}{*}{*}     \setmarginnotes{1pt}{1pt}{1pt}     \setlrmargins{210pt}{*}{*}     \checkandfixthelayout          \section{Introduction}     \lipsum[4]           \end{document}


title: How can I add text in the top right corner of a page _without_ using fancyhdr

text: I want to put a block of text into the top right corner of my document (which uses the article class). The specifications of the document's formatting are **very** detailed, and it has taken me about 2 days to get them right. I do not want to put a line across the top, or to do anything which will change the margin. In fact, I would prefer to avoid using any additional packages at all. Any suggestions?


title: Caption will not go above table with chemstyle

text: Caption refuses to go above the table, even when it is called before `tabular` environment. A similar issue is mentioned in threads elsewhere, and it has been mentioned in the `chemstyle` documentation that the package makes the positioning of the caption itself irrelevant. It offers two fixes, depending on whether one uses `float` or `floatrow`. Neither work, and in any event my caption is stuck below the table, whereas the examples in the chemstyle documentation indicate that the caption should be stuck above the table, and offer solutions to move it below: > **9.2 Captions above floats** > > The scheme float type is generated using either the float or floatrow > package. This has the side-effect that the placement of captions for floats > does not depended on where the `\caption` command comes inside the floating > environment. If you wish to alter the placement of captions, the mechanism > of the underlying package will be needed. There are some subtle differences > between the two: although floatrow provides the float macros, they are not > all 100 % compatible. This document is compiled using floatrow, and so to > fix the position of captions the following code is appropriate. >   >   >     \begin{table}[ht] >       \fbox{First float contents} >       \caption{A caption below the float contents in the source.} >     \end{table} >     \floatsetup[table]{style=plain} >     \begin{table}[ht] >       \fbox{Second floatcontents} >       \caption{A second caption below the float contents in the source.} >     \end{table} >   > > Using the float package, the same effect is achieved using: >   >   >     \begin{table}[ht] >       \fbox{First float contents} >       \caption{A caption below the float contents in the source.} >     \end{table} >     \floatstyle{plain} >     \restylefloat{table} >     \begin{table}[ht] >       \fbox{Second float contents} >       \caption{A second caption below the float contents in the source.} >     \end{table} >   My document:               \documentclass{book}          \usepackage{floatrow}     \usepackage{caption}     \usepackage{chemstyle}          \begin{document}          \chapter{Introduction}          \begin{table}[ht]         \caption{Blah.}         \begin{tabular}{c}         \hline\noalign{\smallskip}         \hline\noalign{\smallskip}         Heading\\[1ex]           \hline\noalign{\smallskip}         Stuff\\         \hline         \end{tabular}          \label{meh}     \end{table}               \end{document}      Removing the chemstyle package fixes the problem... but obviously I'm using it for other things.


title: Use of pdflatex with powerdot

text: I know that a document with `pstricks` code can be compiled with `pdflatex -shell-escape` using `auto-pst-pdf` so that one may enjoy the power of `pstricks` while using `microtype` at the same time. Can a `powerdot` presentation (which uses `pstricks`) be compiled in the same way, or must one resort to using `latex+dvips+ps2pdf` in this case?


title: running biblatex-biber with xelatex (editor:notepad++; distro: miktex)

text: i would like to set up a workflow that uses biblatex-biber with `xelatex`, on `notepad++`. the `backend=biber` in the `biblatex` environment. can someone explain the command line sequence to me? as i understand it, you run `xelatex`, `biber`, `xelatex`, `xelatex`. what files are the arguments for each of those commands? so, assuming i'm trying to compile and then output to PDF a file foo.tex, the sequence would be               xelatex foo.tex     biber ?     xelatex ?     xelatex ?


title: How can I set the node size for a TikZ image to be the same for all nodes?

text: I'm attempting to draw a Kripke structure in TikZ and while I'm successful for the most part, I'm not quite satisfied with the result. Here is my preamble:               \documentclass[10pt,letterpaper]{amsart}          % Personal Packages          \usepackage{notation}          % TikZ Drawing packages          \usepackage{tikz}     \usetikzlibrary{arrows}          % Font and Typography Settings          \usepackage{concrete}     \usepackage{euler}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[babel=true]{microtype}      follow by my MWE:               \begin{figure}     \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,         thick,base node/.style={circle,draw}, real node/.style={double,circle,draw}]              \node[real node] (1) {$s(C)$};         \node[base node] (2) [below left of=1] {$s(\alpha)$};         \node[base node] (3) [below right of=1] {$\neg{s(\alpha)}$};         \path[]             (1) edge node[left] {$L,J$} (2)                 edge node[right] {$L,J$} (3)                 edge [loop above] node {$C$} (1)             (2) edge [bend left] node {$C,L,J$} (3)                 edge [loop left] node {$C,L,J$} (2)             (3) edge [bend left] node {$C,L,J$} (2)                 edge [loop right] node {$C,L,J$} (3);     \end{tikzpicture}     \caption{The initial state of the domain in Ex.~\ref{ex:whisper}.}     \end{figure}      The difficulty that I'm having is that node `3` is larger than node `2` (presumably because it's resizing itself to accommodate the label text). Is there any way that I can have the nodes all have the same size? Also, any suggestions on how to make the diagram more aesthetically pleasing would be much appreciated (I'm coming from OmniGraffle and the transition is bit difficult).


title: amsthm in clean

text: I am looking for a good latex template for my phd. I did not like the classicthesis because of the huge margin and the collapsed table of contents. I found the cleanthesis to be just what I was looking for (http://cleanthesis.der-ric.de/) but unfortunately I have problems with the package amsthm. If I use it like that               \begin{lemma}     This is my Lemma     \end{lemma}     \begin{proof}     Thats my proof     \end{proof}      than I get a huge gap between my lemma and the according proof. Anyone a Idea how I can prevent the gap?


title: \caption outside float. Algorithms

text: I'm sorry if this is repeated but I'm not able to find my answer. I am using the following code. But I receive the error: `! LaTeX Error: \caption outside float.`               \usepackage[algo2e]{algorithm2e}     \usepackage{algpseudocode}     \begin{document}     \begin{algorithm}     \caption{Euclid's algorithm}\label{euclid}     \begin{algorithmic}[1]     \Procedure{Euclid}{$a,b$}\Comment{The g.c.d. of a and b}     \State $r\gets a\bmod b$     \While{$r\not=0$}\Comment{We have the answer if r is 0}     \State $a\gets b$     \State $b\gets r$     \State $r\gets a\bmod b$     \EndWhile\label{euclidendwhile}     \State \textbf{return} $b$\Comment{The gcd is b}     \EndProcedure     \end{algorithmic}     \end{algorithm}     \end{document}


title: How does one make a double widehat?

text: To depict the Fourier transform of the Fourier transform of a function f, I want to make two widehats over each other as in `\widehat{\widehat{f}}`, however, this makes the widehats not immediately over each other. How would one make the widehats immediately above each other?


title: Simulate the % in a \newcommand

text: I want to automate quotation marks (not quotes) using a macro. Consider the following code:               \newcommand{\mytext}[1]{``#1''}      This one works fine:               \mytext{This is a very long quote. Lorem ipsum dolor sit amet.}      But I want to make my source more readable by placing the text in a new line. The following code produces a space between the opening quotes and the first letter:               \mytext{       This is a very long quote. Lorem ipsum dolor sit amet.}      Yes, this one will work:               \mytext       {This is a very long quote. Lorem ipsum dolor sit amet.}      But I would prefer that `\mytext` would expand to something like this:               \mytext{%       This is a very long quote. Lorem ipsum dolor sit amet.}      How do I create a `%` within a `\newcommand`?


title: titleformat has no effect!

text: I have tried to specify the color for my section as shown here, but it has no effect. What am I doing wrong? MWE:               \documentclass[10pt,letterpaper]{article}     \usepackage{lipsum}          \usepackage{multirow}     \usepackage{textcomp}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{url}     \usepackage{hyperref}     \usepackage{geometry}     \usepackage{enumitem}     \usepackage[T1]{fontenc}     \usepackage{array}     \usepackage[osf,sc]{mathpazo}          \usepackage{titlesec}          \def\name{John Doe}          \def\footerlink{http://www.org.edu}     \hypersetup{       colorlinks = true,       urlcolor = black,       pdfauthor = {\name},       pdfkeywords = {John Doe},       pdftitle = {\name: Curriculum Vitae},       pdfsubject = {Curriculum Vitae},       pdfpagemode = UseNone     }          \geometry{       body={6.8in, 10.0in},       left=0.8in,       top=0.5in     }          % Customize page headers     \pagestyle{myheadings}     \markright{\name}     \thispagestyle{empty}          % Custom section fonts     \usepackage{sectsty}     \usepackage{xspace}     \sectionfont{\rmfamily\mdseries\Large}     \subsectionfont{\rmfamily\mdseries\itshape\large}          \setlength\parindent{0em}          \newenvironment{noBullets}{       \begin{list}{}{         \setlength{\leftmargin}{1.0em}       }     }{       \end{list}     }               \titleformat{\section}     {\color{red}\normalfont\Large\bfseries}     {\color{red}\thesection}{1em}{}               \begin{document}                    {\Large \name}          \section*{Test section}     \lipsum[1]               \end{document}


title: Related field in biblatex : page

text: I would like to use the "related" field provided by the `biblatex` package. But as I read the documentation, it implies to use only a entry key, and I would like a part of a book, not all the book. So I would like to precise page (because I could use the book with different pages related to different entries). What I expect to have as output will be : Author 1, Title 1, (meta datas)... see Author 2, Title 2, (meta datas), p. xxx ; Author 3, Title 3 (meta datas) ... p. yyy etc. (In fact, it will quite more complexe, but the idea is the same : link to precise page of other book) I was thinking to do something like this :               @book{key,          ...}     @book{key2,          crossref={key},          pages={xxx}     }     @book{key3,          ...}     @book{key4,          crossref={key2},          pages={yyyy}     }     @book{key5,          related={key2, key5}     ...     }      But I would like to avoid "false" subentry. Do you have any idea ?


title: Switch firstname and familyname colors in moderncv

text: In the moderncv casual theme, in the header, the family name has a darker color than the first name. How can I make it the other way around, and more generally, set each name to a color of my choosing?


title: Twosided book with same page setup for every page (I want to use fancyhdr)

text: Here is my problem: Im writing my thesis using the book class. I want my thesis to be onesided (left and right margins of same size), but I would also like to use the fancyhdr package to give me chapter names in the pagehead of even pages and section names in the pagehead of odd pages. Trying to do so together with the "oneside" option gives me a warning when compiling saying that the [E] option is useless when the book is "onesided". Example code:               \documentclass[11pt,a4paper, oneside]{book}     ...     \fancyhf{}      \pagestyle{fancy}     \headheight 20pt     \fancyhead[LE]{\rightmark}      Any good ideas would be much appreciated! I already tried the geometry package, and it messes up a lot of the formatting in the book class. I guess what I'm basically looking for is how to use the "twosided" option without LaTeX shifting every other page to a side.


title: How to make my unusual environment accept one argument?

text: I cannot find a good title to express my question. Therefore, please parse the following code first. # Minimal Code               \documentclass[dvips,dvipsnames,cmyk,table]{book}     \usepackage[a5paper,margin=20mm]{geometry}     \usepackage{longtable,array,calc}          \usepackage{listings}     \lstset{basicstyle=\scriptsize,tabsize=3}          \usepackage{fancyvrb}     \fvset{tabsize=3}     \newcommand\gtemp[1]{&&#1\tabularnewline\hline}     \newcommand{\args}{}     \newenvironment{Row}[1]         {\renewcommand{\args}{#1}\VerbatimEnvironment\begin{VerbatimOut}{\jobname.tmp}}         {\end{VerbatimOut}\aftergroup\gtemp{\args}}          \newcolumntype{A}     {       >{\begin{minipage}{0.3333\linewidth-2\tabcolsep-2\arrayrulewidth}\vspace{\tabcolsep}}%       c%       <{\vspace{\tabcolsep}\end{minipage}}%        }          \newenvironment{ComparisonTable}%     {%          \begin{longtable}%         {%          |A<{\lstinputlisting{\jobname.tmp}}%          |A<{\input{\jobname.tmp}}%          |A%          |%         }%         \hline\ignorespaces%     }%     {\end{longtable}}          \begin{document}     \begin{ComparisonTable}     %     % Row 1     \begin{Row}%     {      This is a quadratic function.     }     \begin{equation}      y=ax^2+bx+c     \end{equation}     \end{Row}     %     % Row 2     \begin{Row}{LaTeX in action}     \Huge\LaTeXe     \end{Row}     \end{ComparisonTable}     \end{document}      # Objective I want `\Row` to accept an argument such that I can change               \begin{Row}     \begin{equation}      y=ax^2+bx+c     \end{equation}     \end{Row}      to               \begin{Row}{Some description...}     \begin{equation}      y=ax^2+bx+c     \end{equation}     \end{Row}      How to do this?


title: Allow line breaks in highlighted text

text: When I highlight a bit of text using \colorbox, it prevents line breaking. How does one give tex permission to break lines? Example:               \documentclass{article}     \usepackage{color}     \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisicing elit,     \colorbox{yellow}{Stop playing with latex and start writing your article!}     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat.     \end{document}      ![enter image description here](http://i.stack.imgur.com/utTXf.png) I'm sure the gut reaction will be to tell me to use such-and-such other method which already permits line-breaking. By all means! But resist the urge to do so while _not_ answering my question :)


title: How to enter symbol for inexact differential in xelatex?

text: The LaTeX symbol list document recommends this:               \def\dbar{{\mathchar’26\mkern-12mu d}}      Compiling this gives an error about mathcar being undefined. A minimal example follows:               \documentclass[a4paper,11pt]{scrbook}     \def\dbar{{\mathchar’26\mkern-12mu d}}          \author{asd}     \title{asd}     \begin{document}     \maketitle          $\dbar Q = d U + \dbar W$          \end{document}


title: When I use [shrink], I lose vertical centering. How do I get my stuff shrunk and centered?

text: I am creating a `beamer` slide with a table on it. This table is too big with the normal font size, so I am using the `shrink` command to try to make it smaller. `shrink` is working, however it is completely throwing off vertical centering. Rather than being vertically centered, my text is now all crammed up at the top of the slide. Could you please suggest a way to force it lower down the slide? Here is the code for the frame:               \begin{frame}[shrink=35]{Correlations between Harm, Unfairness and Disgust}      \begin{center}        \begin{tabular}{lllllllll}          \multicolumn{8}{l}{\textbf{Table 3.} All possible regressions of harm, unfairness, and disgust predicting punishment} \\          \toprule          & M1 & M2 & M3 & M4 & M5 & M6 & M7 \\          \midrule                  Harm & .35 (.01) & & & .20 (.15) & & .24 (.07) & .14 (.31) \\                  Unfairness & & .41 (.01) & & .31 (.02) & .34 (.01) & & .28 (.04) \\                  Disgust & & &.34 (.01) & & .23 (.07) & .25 (.05) & .19 (.13) \\                  R^2 & .12 & .11 & .11 & .20 & .17 & .17 & .22 \\          \bottomrule          \multicolumn{8}{l}{Note: Standardized beta coefficients, with p value in parenthesis} \\       \end{tabular}      \end{center}      \end{frame}


title: Typeset mathematical symbols also in sans serif font?

text: For creating the graphics for my thesis (function graphs, flow charts, line art sketches) I've chosen to use the sans serif font by               \renewcommand\familydefault{\sfdefault}       However when I use mathematical symbols like $p_{s}$, they are still typeset in roman font and that looks weird: ![screenshot of example](http://i.stack.imgur.com/c69qh.png) So I wonder:   * how could I force mathematical expressions also be typeset in `\sfdefault`   * if I do, are there any negative sideeffects to expect (with greek signs or other special symbols?)   * OR should I typeset all "mathematical" graphs (axis labels etc.) in roman font, and only make the other graphics like flow charts and sketches with sans serif font?


title: Image from \includegraphics showing in wrong image size

text: When I use the following to embed an image:               \begin{figure}[htb]     \centering     \includegraphics{my_image}      \caption{blaaa}      \label{fig:blaaa}                \end{figure}      whereas `my_image` is a JPG file, the image doesn't show in the correct format. It gets displayed bigger than the original `my_image.jpg` itself is and thus the quality is quite bad. Even when I do               \includegraphics[width=300px,height=100px]{my_image}       for a picture `my_image.jpg` which is exactly 300px*100px in size, it gets displayed in greater size and stretched :( I have no header declaration which change `\includegraphics` settings. I would like images with plain `\includegraphics{my_image}` to be displayed in their REAL size.


title: add table of contents in table of contents

text: I don't know why my table of contents doesn't appear in my table of contents!. I am writing:               \documentclass[10pt,a5paper,landscape]{report}     \usepackage{graphicx}     \usepackage[a5paper,vmargin={5mm,2mm},hmargin={5mm,5mm}]{geometry}     \usepackage[linktocpage]{hyperref}     \hypersetup{backref, colorlinks=true}     \title{ Questions }     \author{Alejandro}     \date{\today}     \begin{document}     \maketitle     \tableofcontents      What I am doing wrong?, or how could the numbering starts in chapter 1. Because now, my chapter 1 seems in page 2 in toc but actually it is the page 6. ![This is how it looks](http://i.stack.imgur.com/WRzh5.png) But my chapter 1 is on page 6 not page 2


title: Figure reference \ref{fig:result} renders as ?? in PDF

text: I have an article with the following figure (there are 2 small charts near each other, horizontally):               \begin{figure}[h]       \centering       \includegraphics{left-graph}       \includegraphics{right-graph}       \caption{My caption}\label{mylabel}     \end{figure}      I reference the figure with:               Figure~\ref{fig:result} shows bla-bla-bla.      The rendered PDF shows **??** instead of the figure number. I tried with the reference occurring both before and after the figure (in the LaTeX source), but it didn't make a difference. The relevant packages I'm using are below (those removed are for titling).               \usepackage[english]{babel}     \usepackage{graphicx}     \usepackage[letterpaper]{geometry}     \geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in}     \usepackage{flafter} % make sure figures do not appear before their text     \usepackage{sidecap} % use side captions for floats     \usepackage{subfig} % subfloats      I'm not sure what's wrong here, advice is appreciated. I'm using MiKTeX 2.8. Thank you!


title: How to define acronyms in ConTeXt?

text: The `acronym` packages allows one to easily create and display acronyms, with a simple syntax, like `\ac{usb}`. The first time this is called, is will say “Universal Serial Bus (USB)”, but after that, just “USB”. I found nothing about this in the documentation, but this article on PDF-strings seems to offer similar functionality, but the example seems incomplete. How can I define and display acronyms in ConTeXt?


title: \renewcommand not working for subsection

text: I wanted to number sections with alphabets and subsections with roman numbers I have added these two lines above `\begin{document}`:               \renewcommand \thesection {\Alph{section}}      \renewcommand \thesubsection {\thesection.\Roman{subsection}}      It changes the section numbering to A, B, C, ... from the default I, II, III, ..., but the subsection numbering is still the default A, B, C, ... ![enter image description here](http://i.stack.imgur.com/HmeGa.png) I have also tried this and it did not work either.               \renewcommand \thesubsection {\Roman{subsection}}      I have also tried to change the numbering of paragraphs, but there was no change from the default. Can anyone please help me with this?


title: \addcontentsline adds an unwanted indent

text: # Prologue I'm using the `exercise` package and trying to harmonize its layout with `memoir`. This question is quite involved to illustrate, so I'll break it up into several Acts. I'll present the relevant source and then screenshot of the output. * * * # Act I Having everything at default, I create an `Exercise` environment.               \begin{Exercise}[title=Theory of Relativity]         The theory of relativity was not a eureka moment. It was the result of steady work over a period of 10~years.         \begin{align}             E &= mc^2         \end{align}         \Question Why does \(E = mc^2\)?     \end{Exercise}      ![enter image description here](http://i.stack.imgur.com/pnqAT.png) * * * # Act II I want to customize the header a bit, so I issued the following `\renewcommand` in the preamble. The indent before "The theory of..." doesn't look right. My desired layout wants to make the indent disappear.               \renewcommand{\ExerciseHeader}{%         \hrule\medskip\noindent%         \textbf{%             \large%             \ExerciseName\quad\ExerciseHeaderNB\ExerciseHeaderTitle %             \ExerciseHeaderOrigin\medskip\\}%         }      ![enter image description here](http://i.stack.imgur.com/YdW1x.png) * * * # Act III I looked around in `texdoc exercise` and it doesn't document anything about the layout of the `Exercise` body. Yes, there is documentation about `Questions`, `subQuestions`, and `subsubQuestions`, but those do not apply to the `Exercise` body. So I looked around and I came to the definition of `\@@@ExeEnv`, which looks like this               \newcommand{\@@@ExeEnv}{%         \vskip\ExerciseSkipBefore %         \@QuestionLevel1 %         \refstepExecounter %         \begingroup%             \@getExerciseInfo\ExerciseHeader %             \addcontentsline{%                 \ext@exercise}{\toc@exercise}{%                     \ExerciseName\ %                     \theExercise\ %                     \expandafter{\itshape \ExerciseTitle}%                         \hspace{.66em}%             } %         \endgroup%     }      * * * # Act IV So I try to dissect `\@@@ExeEnv`, adding and removing control sequences to see how they affect the output. With the following code in the preamble, I get what I want: the ugly indent disappears!               \makeatletter     \renewcommand{\@@@ExeEnv}{%         \vskip\ExerciseSkipBefore \@QuestionLevel1 \refstepExecounter%         \begingroup%             \@getExerciseInfo\ExerciseHeader%         \endgroup%     }     \makeatother      ![enter image description here](http://i.stack.imgur.com/7jUTy.png) * * * # Act V But alas! I have removed the `\addcontentsline` command, which I suppose is important to maintaining a Table of Contents. So I try to add back the `\addcontentsline` from the original definition, but the ugly indent is back! Even a dummy `\addcontentsline` brings back the hideous indent, this time much more sneakier than the original.               \renewcommand{\@@@ExeEnv}{%         \vskip\ExerciseSkipBefore \@QuestionLevel1 \refstepExecounter%         \begingroup%             \@getExerciseInfo\ExerciseHeader%         \endgroup%         \addcontentsline{}{}{}%     }      ![enter image description here](http://i.stack.imgur.com/rCabH.png) * * * # Epilogue Why does `\addcontentsline` add an unwanted indent? Where can I fix this? I'd also appreciate suggestions on better exercise packages which work better with `memoir`. Adding a `\noindent` before the exercise body: (`\noindent The theory of...`) doesn't make the indent go away either. It's an inelegant solution as well.


title: Changing output font style of a referred label

text: In of the bulleted list of my MWE below, I'd like   * the label ("Item a") to be of bold font weight,   * the output of `\ref{itm:one}` to be in normal font weight. Unfortunately, neither the placement of `\normalfont` nor `\mdfont` in front of the command will change the font weight of the output of `\ref`; it remains in bold font weigth. Any hints to solve this? I'd prefer a solution that doesn't require the `enumitem` package.               \documentclass[a4paper,10pt]{article}     \usepackage{lipsum}          \begin{document}     \begin{enumerate}[label=\bfseries{Item \alph*}]      \item Item one\label{itm:one}      \item Item two     \end{enumerate}          \ref{itm:one}          \end{document}


title: Show chapter in main toc but not in parttoc

text: Is it possible not to display the last chapter in the second parttoc ?               \documentclass[a4paper,oneside]{scrbook}     \usepackage{minitoc}     \setcounter{tocdepth}{0}           \begin{document}     \doparttoc     \tableofcontents          \part{Part 1}     \parttoc     \chapter{Chapter 1}     \chapter{Chapter 2}          \part{Part 2}     \parttoc     \chapter{Chapter 3}     \chapter{Chapter 4}          \end{document}


title: header and footer in all pages of letter class newlfm

text: Following this other question, I would just want to have the footer in every page of the document, but I don't find a way... besides, could I put it a little bit up, without changing the bottom margin? Thanks! Would it be possible as well to remove the ":" after Telephone and E-mail?? Here a MWE               \documentclass[10pt,stdletter,dateno,sigleft]{newlfm}                    %%%HORIZONTAL LINES     %http://tex.stackexchange.com/questions/91052/remove-header-and-footer-lines-in-newlfm     \makeatletter     \g@addto@macro{\ps@ltrhead}{%       \renewcommand{\headrulewidth}{0pt}%       \renewcommand{\footrulewidth}{0pt}%     }     \g@addto@macro{\ps@othhead}{%       \renewcommand{\headrulewidth}{0pt}%       \renewcommand{\footrulewidth}{0pt}%     }     \makeatother     %%%%%%%%%%%%%%%%%%%          \usepackage{lipsum}               \usepackage{lastpage}          \Lfooter{John Smith\hspace{1em}-\hspace{1em}{\small john@smith.com}\hspace{5em}\textit{Cover Letter}}     \Rfooter{\thepage\ of \pageref{LastPage}}                    \newsavebox{\Luiuc}\sbox{\Luiuc}{\parbox[b]{1.75in}{\vspace{0.5in}     \includegraphics[width=1.2\linewidth]{logo.png}}} % Company/institution logo at the top left of the page     \makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}          \newlfmP{sigsize=50pt}     \newlfmP{addrfromphone}     \newlfmP{addrfromemail}          \lthUiuc     \namefrom{John Smith}          \addrfrom{     \today\\[12pt]     123 Broadway \\     City, State 12345     }          \phonefrom{(000) 111-1111}          \emailfrom{john@smith.com}          \greetto{Dear Mrs. Smith,}     \closeline{Sincerely yours,}          \nameto{Mrs. Jane Smith}          \addrto{     Recruitment Officer \\     The Corporation \\     123 Pleasant Lane \\     City, State 12345     }          %----------------------------------------------------------------------------------------          \begin{document}     \begin{newlfm}          \lipsum     \lipsum     %----------------------------------------------------------------------------------------          \end{newlfm}     \end{document}


title: How do I change the \mathtt font with mathspec?

text: I have a document where the main font is Gotham Narrow Book but the numbers are set in Gotham Narrow Light, and this is set with commands provided by the `mathspec` package. I'd like to typeset a table where the digits come from a monospace font so that they'll line up better. But my invocation of `\setmathtt` has no effect. Here is my sample document:               \documentclass{article}     \usepackage{mathspec}     \setmainfont[BoldFont=Gotham Narrow Medium]{Gotham Narrow Book}     \setmathrm{Gotham Book}     \setmathfont(Latin){Gotham Narrow Book}     \setmathfont(Digits){Gotham Narrow Light}     %:FIXME seems to have no effect     \setmathtt{Courier}      \begin{document}     \begin{tabular}{cc}      Normal         & TT \\      $123456789$ & $\mathtt{123456789}$ \\      $111111111$ & $\mathtt{111111111}$     \end{tabular}     \end{document}      Does `\setmathfont(Digits){Gotham Narrow Light}` preclude `\setmathtt{Courier}`?


title: Restore the original array code

text: The `array`package redefines `array` in various ways. I was woundering if anyone had made a package containing a localized (prefixed) version of the kernel `array`? I have a document were we have a simple construction that make use of `array` some of the configurations we use does not work as soon as one load the `array` package (which can be nice for other things), so I wanted to create a copy prefix with say `\my@` such that I could use both. So far unsuccessfull. Basically the only problem is the restrictions that `array` puts on the format parser, so I would also be enough to locally restore the format parser. Any ideas? as for an MWE:               \documentclass{article}     %\usepackage{array}     \def\test{cc}     \begin{document}      \[       \begin{array}{\test}         a & b \\ c & d       \end{array}     \]     \end{document}      without the `array` package the code compiles just fine EDIT: Some more back ground. In a book we have a lot of linear equations and such that traditionally in this field is typeset via `array` in order to line up variables etc. We call this a system. Now instead of having to remember all those differnt `array` preambles we are creating a new environment what can be controlled via a `key-val` interface. This way we can for example make sure that all systems have a different `\arraycolsep` than the rest of the document. We can scale a system etc. Usually all columns have the same alignment (`r`), but for some systems it is preferable to be able to specify a specific format, or even just specify the number of columns and then the format of just the last column. As already mentioned, this is _easy_ with the kernel `array`, but does not work because of the restrictions when the `array` package is loaded. For the systems we (currently) do not need any of the extra `array` features. Hope this clearify things a bit


title: tocloft package adds page number to first side of table of contents

text: I have a problem with the `tocloft` package. Whenever I try to include it in my document, the first page (only) of the table of contents contains a page number, even so I don´t want any page numbers at all for the toc. When I remove the `\usepackage{tocloft}` call, the toc is displayed without a page number, so somehow it must be messing up the layout... Is there a way to tell `tocloft` to not adjust anything in the table of contents? `\pagestyle{empty}` and `\thispagestyle{empty}` don´t solve the problem. Note: I am using the `tocloft` package only so I can create a list of equations (via `\newlistof` command from `tocloft`). So I would also be glad about way to get the `\newlistof` command without the `tocloft` package. EDIT: Example: Thank you for considering my problem: Here is a code example:               \documentclass[12pt,a4paper]{article}     \usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox     \usepackage{tocloft}     \usepackage{amsmath,amsthm,amssymb}     \usepackage[T1]{fontenc}     ...     //the part responsible for creating creating the listofequations     \newcommand{\listequationsname}{}      \newlistof{myequations}{equ}{\listequationsname}      \newcommand{\myequations}[1]{%      \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\hfill}      ...     //sample equation     \begin{equation}\label{eq:Eq1}     a^{2}+b^{2}=c^{2}     \end{equation}     \myequations{Satz des Pythagoras \ref{eq:Eq1}}     ...     //displaying the list of equations     \subsection{Equations}     \renewcommand{\listequationsname}{}     \listofmyequations       Thanks in advance! ## SOLUTION: The command posted by Andrew Swann as a comment solved the issue for me. I only had to add `\renewcommand{\cftaftertoctitle}{\thispagestyle{empty}}` before `\tableofcontents` Thank you alot!


title: tikzmark and position issue

text: Can you help me to place the arrow right on the top of "a" ? ![enter image description here](http://i.stack.imgur.com/HDa7p.png)               \documentclass[12pt,oneside]{book}          \usepackage{tikz}     \usetikzlibrary{arrows,positioning}     \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}          \begin{document}     \[     y = a\tikzmark{a}x + b     \tikz[overlay,remember picture]{         \node[above right=of a] (text) {\scriptsize slope};         \draw[->,thin] (a.north) |- (text.west);        }     \]     \end{document}


title: .jpg image inserted in a column is shrinked or squeezed

text: When I am trying to insert a `.jpg` image in one column of a table in latex. it is getting shrunk and not able to stretch or fit into the whole column. it is getting shrunk or squeezed & when I am trying to increase the length of the logo, parallel the width is also increasing creating a large unnecessary space in second column. Please tell me the solution for this. The following is the code which I have used to print the table with one of the logo inserted in first column, but which is getting squeezed:               \documentclass{article}     \usepackage{graphicx}     \usepackage{float}     \usepackage{color}     \usepackage{hyperref}     \usepackage{lscape}     \usepackage{multirow}     \usepackage{longtable}     \usepackage{array}     \usepackage{fancyhdr}     \usepackage[letterpaper ,vmargin ={5mm,15mm},hmargin ={20mm,20mm},includehead, includefoot]{geometry}     \begin{document}     %\fancyhf{}     %\begin{table}[ht]     %\centering     \begin {tabular}{|l|c|l|}     \hline     \includegraphics[width =0.20\columnwidth]{./ieslogo.jpg} & xxxxxxx & xxxxxx\\     \hspace{0.125in} xxxxxxxx & xxxxxT  & xxx \\     \hspace{0.125in} xxxxxx & xxxxxxxx & Page 1\\     \hspace{0.125in} xxxxxx  &\\     \hline     \end{tabular}     %\end{table}     \end{document}      If I increase the length of the logo, the width also is increasing causing unnecessary space in second column. Kindly provide me the solution for this.


title: Embedding a LaTeX document inside another, with some border or other stylising

text: I'm writing a fairly lengthy report, which should include several papers I have worked on. Each paper is more-or-less self contained, with their own title, date, sections, etc. I have each of these papers as both .tex and .pdf files. In my report, I would like to somehow embed the papers but I want it to be very obvious that there is an embedded document. For example, when I do a quote, the margins are brought in and the text is smaller. I would like there to maybe be a border, or very slightly darker background, or something so that the reader can clearly see that they are reading a paper I have worked on in the past, within the report that mentions it. I know about \usepackage{pdfpages}, however this simply put the pdf inside the document as is. The sectioning numbers suddenly revert to 1, and they return to where they were once the embedded pdf ends. What's the best way to do what I need? Should I just copy the contents of the .tex files and change the sections to subsections and so on, and just put that LaTeX code inside my report? Or is there a better way?


title: How to convert HTML markup into LaTeX markup?

text:
I have one input file which will be used for LaTeX and HTML (Java program). Input file has HTML markups like                for bold.

 for list.      How can I convert above markup into LaTeX markup while generating pdf?


title: Making aliases for variables

text: I'm trying to figure out how best to define an alias. I have some moderately complicated variable names, such as `$p^{i,j}_{t}$`, and having to type them over and over again is a pain. More importantly, if I decide later to change my naming convention, I'd have to go back and search replace in my whole document, which seems ridiculous. I've tried to use this method: `\newcommand{\varn}{$p^{i,j}_{t}$}` but this method is not powerful enough. First of all, I cannot use it in Math mode, and would have to define another command `\newcommand{\mathvarn}{p^{i,j}_{t}}` which seems redundant. Second of all, latex doesn't know that it's supposed to insert a whitespace after I use the command in a text environment. If I force a whitespace in the command, I cannot use the command just before punctuation like full stop, or comma. Any suggestions? Thank you!


title: Table cannot locate itself properly inside the document

text: Sometimes, table cannot locate itself properly inside my document and I don't know how to fix this. Here is an example: The current page which the table cannot locate itself properly in looks like as follows: ![enter image description here](http://i.stack.imgur.com/QfWT1.png) As you can see, there is too much space in between. The previous and next pages look like this (left one is previous and the right one is the next page): ![enter image description here](http://i.stack.imgur.com/bsH7f.png) ![enter image description here](http://i.stack.imgur.com/9hQM6.png) The `documentclass` is book and the table code is as follows:               \begin{center}     \begin{tabular}{ p{4cm} p{5cm}  p{6cm} }     %\hline     \cellcolor[gray]{0.9} Foo1 Title & \cellcolor[gray]{0.9}Foo2 Title & \cellcolor[gray]{0.9} Foo3 Title \\ \hline     Foo & Foo & Foo Bar bla bla bla...\\     Foo & Foo & Foo Bar bla bla bla...\\[5pt]          \hline     \end{tabular}          Table xxx: Foo Caption      \end{center}      Figures can do this very properly. If the space is not enough inside the page, then the image puts itself in the next page but the space in the current page filled with text or something else. Any idea how can I can fix this problem so that tables can locate themselves properly?


title: Indexing in ltxdoc dtx using doc package

text: I've combed the documentation for a solution to this, and Googled like crazy, but haven't been able to come up with anything. I'm working on a fairly complex dtx file and have gotten the index working just fine; however, when I tried to create subentries, I instead get normal entries with an opening interrogatory mark replacing `\levelchar`. MWE:               \documentclass{ltxdoc}          \usepackage{doc}     \usepackage{makeidx}     \makeindex          \begin{document}          Testing some subentries!     \index{small caps}\index{small caps\levelchar petite small caps}     \index{small caps\levelchar and titling caps, difference between}          \PrintIndex          \end{document}      I'm compiling this with what as far I can tell are the correct commands:               pdflatex indtest.tex;     makeindex -s gind.ist indtest.idx;     pdflatex indtest.tex;      I've also tried replacing `\levelchar` with the more mundane `!` that I know and love from `makeindex`, but all this does is remove the opening interrogatory mark. My first thought was that `gind.ist` doesn't support subentries, but the `doc` documentation discusses them, so it seems that it does. What glaringly obvious issue am I missing here?


title: Color in Url list

text: I find this code I 've done few changes but I have some troubles with color. I would like to have in my List of urls (liste de liens) "lien 1 : " in black with spaces and the links in blue.               \documentclass{article}        \usepackage[colorlinks=true, urlcolor=blue]{hyperref}     \usepackage{pdfescape}     \usepackage{filecontents}     \begin{filecontents*}{\jobname.mst}     % Input style specifiers     keyword "\\urlentry"     % Output style specifiers     preamble "\\begin{theurls}"     postamble "\n\\end{theurls}\n"     group_skip ""     headings_flag 0       item_0 "\n\\urlitem{"     delim_0 "}{"     delim_t "}"     line_max 500     \end{filecontents*}     \newcounter{compteururl}     \setcounter{compteururl}{0}     \makeatletter     \newwrite\file@url     \openout\file@url=\jobname.idx\relax          \newcommand*{\write@url}[1]{\addtocounter{compteururl}{1}%       \begingroup         \EdefEscapeHex\@tmp{\lien : #1}%         \protected@write\file@url{}{%           \protect\urlentry{\@tmp}{\thepage}%         }%       \endgroup     }     \let\saved@hyper@linkurl\hyper@linkurl     \renewcommand*{\hyper@linkurl}[2]{%       \write@url{#2}%       \saved@hyper@linkurl{#1}{#2}%     }     \newcommand*{\listurlname}{Liste des liens}     \newcommand*{\printurls}{%       \InputIfFileExists{\jobname.ind}{}{}%     }     \newenvironment{theurls}{%       \section*{\listurlname}%       \@mkboth{\listurlname}{\listurlname}%       \let\write@url\@gobble         \ttfamily       \raggedright       \setlength{\parfillskip}{0pt}%     }{%       \par     }     \newcommand*{\urlitem}[2]{%       \hangindent=1em       \hangafter=1          \begingroup             \EdefUnescapeHex\@tmp{#1}%         \expandafter\url\expandafter{\@tmp}%       \endgroup       \urlindex@pfill       p.\@\space\ignorespaces       #2%       \par     }     \newcommand*{\urlindex@pfill}{%       \unskip~\urlindex@dotfill       \penalty500\strut\nobreak       \urlindex@dotfil~\ignorespaces     }     \newcommand*{\urlindex@dotfill}{%       \leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus  1fill\relax     }     \newcommand*{\urlindex@dotfil}{% from \dotfil of package `doc'       \leaders\hbox to.6em{\hss .\hss}\hfil     }                    \newcommand\lien{lien \thecompteururl}     \makeatother          \usepackage[T1]{fontenc}     \usepackage[variablett]{lmodern}          \begin{document}     some texte with reference     \href{http://abc.com}{\lien}     and \href{http://zwy.com/}{\lien}.          \clearpage     some texte with reference     \href{http://koyc.com}{\lien}     and \href{http://pft.com/}{\lien}.     \clearpage     some texte with reference     \href{http://lyc.com}{\lien}     and \href{http://at.com/}{\lien}.          some texte with reference     \href{http://abc.com}{\lien}     and \href{http://abb.com/}{\lien}.          \newpage     \printurls          \end{document}      Thanks for your answers.


title: circuit tikz library with relative paths breaks LED

text: Using circuits library with relative paths breaks the LED for me. Here a MWE:               \documentclass{article}     \usepackage{tikz}          \usetikzlibrary{circuits.ee.IEC}          \begin{document}         \begin{tikzpicture}[circuit ee IEC]             %broken             \draw (-2,0) to [diode={light emitting}] +(0,4);             %ok             \draw (0,0) to [diode={light emitting}] (0,4);         \end{tikzpicture}     \end{document}      unexpected result: ![result](http://i.stack.imgur.com/PB9jJ.png) Is there any way to use relative paths with circuit library in tikz?


title: Using \toptitlemarks and \bottitlemarks with any counters

text: `\toptitlemarks` and `\bottitlemarks` don't seem to work with random counters:               \documentclass[paper=a4,pagesize=pdftex]{scrbook}     \usepackage[pagestyles]{titlesec}     \usepackage{lipsum}          \newcounter{mycounter}          \newpagestyle{mystyle}{       \setheadrule{.009pt}       \sethead[\thepage][]         [\toptitlemarks\themycounter---%           \bottitlemarks\themycounter]%         {\toptitlemarks\themycounter---%           \bottitlemarks\themycounter}{}{\thepage}     }     \pagestyle{mystyle}          \begin{document}          \stepcounter{mycounter}     \markboth{\themycounter}{\themycounter}     \Huge\themycounter          \lipsum[2]          \stepcounter{mycounter}     \markboth{\themycounter}{\themycounter}     \Huge\themycounter          \lipsum[2]          \end{document}      produces: ![toptitlemarks](http://i.stack.imgur.com/aDiSY.png) Is there a way to get this to work?


title: Extending Text Outside Table Cell

text: I have a simple graphic I'm trying to make with a table, but for it to work I need to extend the text beyond the table cell - through something like a negative margin - is this possible? Specifically, the bottom row of the table (0,c,r) should line up with the vertical borders above - currently also slightly to the right of each. The graphic represents a number line. ![enter image description here](http://i.stack.imgur.com/U2QSc.png)               \documentclass[11pt]{article}     \usepackage{array}     \usepackage[math]{cellspace}     \begin{document}          \begin{table}[!htdp]     \begin{center}     \begin{tabular}{Sc m{5cm} m{5cm}}     \cline{2-3}      $\dfrac{1}{x}$ & \multicolumn{1}{|c}{F} & \multicolumn{1}{|c|}{O} \\     \cline{2-3}      0 & \flushright{c} & \flushright{r} \\     \end{tabular}     \end{center}     \end{table}               \end{document}


title: Section gets included in header

text: I wrote a header for my notes in class.For the header i just wanted "My notes" in the center.So i used "My notes" in the \chead.After quick build i get the name of a section on every page included in the header.                \documentclass[10pt]{article}      \usepackage{fancyhdr}      \pagestyle{fancy}      \chead{My Notes\\}      \rfoot{\thepage}      So it should show just "My Notes" but instead it shows "My Notes" and "Section 2" in the header.I am currently using Texmaker.


title: Changing the Ruby Font (for Pīnyīn)

text: Using `ruby` package to generate both furigana for Japanese and Pīnyīn for Chinese. I use individual `\sf` calls to individually switch each Pīnyīn from the Japanese font back to the default sans font. Is there an easier way? (I should clarify that I understand each CJK font has roman glyphs for Pīnyīn, but I _prefer_ the Biolinum.) Please see MWE...its output makes my question more clear, I think:               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass[12pt]{article}          % PACKAGES          \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{xunicode}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont[Mapping=tex-text]{Linux Libertine O}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Linux Biolinum O}     \setmonofont[Scale=MatchLowercase]{Linux Libertine Mono O}     \usepackage{ruby}     \usepackage{setspace}          \begin{document} % ==============================================================          \newfontfamily{\J}[Scale=0.85]{Hiragino Kaku Gothic Pro}     \newfontfamily{\C}{STKaiti}          \doublespace     \Large          I'd like to include both Chinese (e.g. {\C\renewcommand\rubysep{-4.9ex}\ruby{内}{\sf nèi}\ruby{忧}{\sf yōu}\ruby{外}{\sf wǎi}\ruby{患}{\sf huàn}}) and Japanese (e.g. {\J\renewcommand\rubysep{-1.9ex}\ruby{内}{ない}\ruby{憂}{ゆう}\ruby{外}{がい}\ruby{患}{かん}}) text, \textit{inline} with English text, and with ruby text (pronunciation), as shown here.  Does there exist a convenient method for distributing the \texttt{\textbackslash sf} (or preferably \texttt{\textbackslash textsf\{\}}), across all the \texttt{\textbackslash ruby} calls to generate the Pīnyīn (the text below the Chinese)?          \end{document}


title: tikz-timing package gives up on path after 25 clock cycles

text: I'm using the `tikz-timing` package to do some timing diagrams, but it seems that it has an upper limit of 25 clock cycles. While               \documentclass[a4paper]{article}     \usepackage{tikz-timing}     \begin{document}          \begin{tikztimingtable}      clk          &  50{C} \\      temp &   25{HL}  \\     \end{tikztimingtable}%     \end{document}      works just fine, but if I change to               \documentclass[a4paper]{article}     \usepackage{tikz-timing}     \begin{document}          \begin{tikztimingtable}      clk          &  51{C} \\      temp &   25{HL}  \\     \end{tikztimingtable}%     \end{document}      I get a "giving up on this path. did you forget a semicolon?" error. Anybody know how to do longer timing diagrams?


title: Conditional spacing based on length of chapter title

text: In LaTeX, (or possibly XeLaTeX), how can one achieve the following:   * A double spacing a 1- or 2-line chapter title, and single spacing under a 3- or more-line chapter title.    * A triple space underneath titles, unless immediately followed by a `\section` command, in which case it takes a double space I am using the report document class. What is the best strategy to achieve flexibility for the following scenarios:   1. Line spacing: single space for `\chapter` that have three lines   2. Line spacing: double space for `\chapter` that have two lines   3. Paragraph spacing: triple space between `\chapter` or `\section` and body text   4. Paragraph spacing: double space between `\chapter` and `\section`


title: thmtools with thmbox split in two pages

text: I am trying to use the `thmbox=M`option from the `thmtools` package. But sometimes in the text when there isn't enough space for the theorem to fit in the bottom of the first page, it moves it to the next page and still splits it further to a third page. I have a minimal example here. I really like the box shape, so if you can give me a solution using the same package, or tell me how to make a boxed theorem like this, I would really appreciate it!               \documentclass{report}     \usepackage{amsthm, amsmath}     \usepackage{blindtext}     \usepackage{thmtools}     \declaretheorem[style=remark, thmbox=M, name=Theorem]{theorem}     \begin{document}          \begin{theorem}     \blindtext[4]     \end{theorem}          \begin{theorem}     Assuming this is true,      \begin{equation}     \label{eq:zeroconf}     \sum_{i,j} d_{i,j}^2\|X_i- X_j\|^2=0     \end{equation}     Then this happens.     \end{theorem}          \end{document}      ![p1](http://i.stack.imgur.com/znV4G.png) ![p2](http://i.stack.imgur.com/ZT7Ly.png) ![p3](http://i.stack.imgur.com/mejLP.png)


title: TeX Live 2011: Can I still update it to its final (frozen) state?

text: I wish to know that if I download TeX Live 2011 from TUG today in April 2013 and then try to update the packages from CTAN, will I get the last packages that were frozen for the 2011 year for TeX Live? I have the final (frozen) state of TeX Live 2011 on a computer and this version has served me well. Now I wish to have the same installation (with the same versions of the packages) on a different computer.


title: How to add a transparent shadow to a block in beamer?

text: Here my attempt to add a shadow to a block:               \documentclass{beamer}          % add a background image     \setbeamertemplate{background canvas}{\includegraphics[height=\paperheight]{example-image}}          % use rounded blocks with shadow     \setbeamertemplate{blocks}[rounded][shadow=true]          \begin{document}     \begin{frame}       \frametitle{Block with shadow and with background image}            \begin{block}{Block with shadow}         Content...       \end{block}     \end{frame}     \end{document}      The (poor) result: ![enter image description here](http://i.stack.imgur.com/072Lk.png) _**The shadow hides my background!_** **Edit:** `beamer` offered this feature for some time, but it is incompatible with the latex-dvips-ps2pdf route. I suppose this feature could be optional...


title: Problems with glossaries in Texmaker?

text: I'm kind of new to LaTeX and I'm struggling a lot to make a glossary. I'm using Texmaker under Windows, but I'm not very good at programing. I'm using `\usepackage[toc]{glossaries}` because I read that there is no version of `xindy` (somehow better for spanish users as myself) for Windows, or the solutions I found where rather hard for me to understand. I wrote the `\makeglossaries` and `\printglossaries` commands, and I made the user command `makeglossaries`. On of my entries looks like this:               \newglossaryentry{inconel}     {name = inconel,     description = {Familia ... Special Metals Corporation.} }      There seems to be no errors in the documents as I can compile the document, but when I hit the makeglossaries user command, I get this error: > **_Call to makeindex failed_** Possible cause of problem: Style name > indicates makeindex, but may be in xindy format. Remember to use > `\setStyleFile` to specify the name of the style file rather than redefining > \istfilename explicitly. Check 'Documento maestro.glg' for details (`Documento maestro` is the name of my main file.) What am I doing wrong? I know that the question may be very basic but I need to do this for my graduate thesis and I'm finding a big wall with this.


title: Inline equation doesn't fit in page

text: I have an inline equation that I don't want to split in lines. If I use               foo bar foo bar foo bar foo bar foo bar foo bar foo bar ${ B = A \cap \{ T \leq n \} }$      It doesn't fit in the page's width and there's a part of the equation that can't be seen. If I use               foo bar foo bar foo bar foo bar foo bar foo bar foo bar $B = A \cap \{ T \leq n \}$      it is split like: ![output](http://i.stack.imgur.com/ZDaDL.png) I could do something like:               foo bar foo bar foo bar foo bar foo bar foo bar foo bar \\     $B = A \cap \{ T \leq n \}$      To keep it in only one line, but I wonder if there is an standard way to tell latex: "Keep it in only one line and if it doesn't fit in the page's width then start in a new line". This headers are important in order to reproduce the issue:               \documentclass[a5paper,oneside]{amsart}     \usepackage[scale={.8,.85}]{geometry}


title: Is verbatimbox.sty missing in frozen TeX Live 2012?

text: I found that `verbatimbox.sty` is not directly available in the now frozen `TeX Live 2012`. Having a `\usepackage{verbatimbox}` generates a **`verbatimbox.sty` not found** message on compilation. I can see that there is only a `verbatimbox-r15878.tar.xz` in the location `c:\texlive\2012\tlpkg\backups` on a Windows machine. In contrast, the package `verbatimbox` is in its decompressed form and `verbatimbox.sty` is available in the fresh distribution from a TeX Live 2012 ISO from TUG (from last year). Anyone else who has noticed this? Any work around? It doesn't seem that the package maintainer `Steven B. Segletes` has a contact email address.


title: Wrong page numbers in the table of contents of a LaTeX document

text: I am writing my thesis in LaTeX. Everything was going fine until I decided to insert some of my publications into the LaTeX thesis document. The error is in the table of contents, which is showing wrong page numbers just in the chapter where I present my papers as PDF documents, LaTeX is considering the PDFs as if they are only one page (the PDF files are more than 6 pages). For example, paper X starts at page 20 and it is 6 pages long, the next paper should start at page 27, but in the table of contents, it is shown as 21 !. I should note that the page numbering throughout the document is correct, the error is just in the table of contents. This is the code of my main tex document:               \documentclass[a4paper,11pt,twoside]{ThesisStyle}     \usepackage{pdfpages}     \include{formatAndDefs}     \begin{document}     \include{TitlePage}     \dominitoc     \pagenumbering{roman}     \section*{Acknowledgments}     \cleardoublepage     \tableofcontents     \mainmatter     \include{Chapter1}     \include{chapter2}     \include{Chapter3}     \include{Chapter4}     \appendix     \include{Appendix1}     \bibliographystyle{ThesisStyle}     \bibliography{Thesis}     \printnomenclature     \cleardoublepage     \begin{vcenterpage}     \noindent\rule[2pt]{\textwidth}{0.5pt}     {\large\textbf{Abstract:}}     {\large\textbf{Keywords:}}     \noindent\rule[2pt]{\textwidth}{0.5pt}     \end{vcenterpage}     \end{document}      In chapter 3, I added the pdf documents:               \chapter{List of Publications}     \label{chap:intro}     \minitoc     \newpage     \section{paper 1 title}     \newpage     \includepdf[pages={-}]{paper1.pdf}     \section{paper 2 title}     \newpage     \includepdf[pages={-}]{paper2.pdf}     ... etc      Where could the error possibly be? (Note: I am new to LaTeX.)


title: ELSE IF in algoritmic package

text: Is there a command in `algorithmic` package which is similar to `\ElsIf` in `algorithmicx`? ( I do not want each nested **if** to be indented).


title: Text running through table cell after forced linebreak

text: I’m trying to fit some text in a table, but the text keeps running through the table cells. I’ve already specified a fixed column width for the text using the `p{}` command. Initially, this worked, but then I also needed some forced linebreaks and once I implemented that using a new command, the `p{}` was overruled somehow, and the text runs through the cells again. Can someone help me fix this problem? The code I used looks something like this:                   \begin{landscape}              \newcommand{\cellenter}[2][l]{%              \begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}         \begin{table}[t]\footnotesize          \caption{Caption}\label{table:table_cable_lay_2}           \begin{tabular*}{1.4\textwidth}{| p{0.32\textwidth} | p{0.32\textwidth} | p{0.32\textwidth} | p{0.32\textwidth} |}               \hline\hline               \textbf{Scenarios} &\textbf{Advantages} &\textbf{Disadvantages} &\textbf{Remarks} \\ [0.5ex]               \hline                    \textit{Title of the cell} This text remains within the cell width because there are no forced linebreaks in this cell.                    &\cellenter[t]{+ Advantage 1 \\ + Advantage 2}                    &\cellenter[t]{- Disadvantage 1 \\ - Disadvantage 2}                    &\cellenter[t]{ There is some text here that runs through the cell width. \\ There is some text here that runs through the cell width.} \\[1ex]               \hline           \end{tabular*}         \end{table}         \end{landscape}      The pdf output that I get looks like this: ![table 1](http://i.stack.imgur.com/YRqBe.jpg)


title: ifx and pdflastypos

text: I'm not fully grasping how the `\ifx` command handles types. How should the following def's read to make the `\ifx` statement true when `pdflastypos` is at the zero coordinate?               \def\nothingness{0}     \def\lastypos{\pdflastypos}          \ifx\lastypos\nothingness       TRUE \newline     \else       FALSE \newline     \fi


title: Escaped characters in typewriter font

text: I know a number of ways to fix this (e.g. `\usepackage[T1]{fontenc}`), but I want to understand what's happening in the following example.               \documentclass{article}     \begin{document}     \noindent     \$ \% \& \{ \} \_ \# \textbackslash \\     \ttfamily \$ \% \& \{ \} \_ \# \textbackslash \\     \verb+$ % & { } _ # \ +     \end{document}      ![escaped characters](http://i.stack.imgur.com/BMqcc.png)   * Why does attempting to obtain a `\ttfamily` brace, underscore or backslash result in the substitution of the ordinary roman symbol? The glyphs are clearly not missing, because verbatim mode can access them.    * How exactly is verbatim mode accessing these glyphs?    * Deleting the braces and the backslash, so that the underscore is the only remaining 'problem' character eliminates the font warnings, despite the fact that a substitution is still taking place. Why is this?


title: Can't manage to use algorithm packages

text: I'm trying to write some simple pseudocode but I just can't get it to work. It's pseudocode from another paper and I want to change it a little and put it in my paper. ![enter image description here](http://i.stack.imgur.com/9MXvx.jpg) This is the pseudocode I want to write. I tried `algorithmicx`, `algorithm2e` and `pseudocode` but I can't manage to do it with any of them. Are there easier packages for writing pseudocode? I spent the whole morning trying to write an other piece of pseudocode using `algorithm2e` and it took way too long and the result still looks bad. And now I get an error that is just ridiculous.                   ! Argument of \algocf@If has an extra }.         <inserted text>                          \par          l.98            \If                      {all variables assigned}      This is my code (it should be the same as the image):                   \begin{algorithm}         \begin{algorithmic}             \Loop                  propagate() - propagate unit clauses                 \If {not conflict}                      \If {all variables assigned}                          \return SATISFIABLE                     \Else                         decide() - pick a new variable and assign it                     \EndIf                 \Else                     analyse() - analyze comflict and add a conflict clause                     \If{top-level conflict found}                          \return UNSATISFIABLE                     \Else                         backtrack() - undo assignments until conflict clause is unit                     \EndIf                 \EndIf             \EndLoop         \end{algorithmic}         \caption{miniSAT\label{lss}}         \end{algorithm}      sigh, so frustrating, I hate latex so much why isn't there an alternative. Anyway, if you can help me, thanks a lot, I'm really desperate at this point.


title: Cross out the selected text using macro script in TexStudio

text: I have a Tex file that I need to edit while somehow keeping the original words and sentences highlighted. To do this, I am going to cross out the part of the original text that I replace with my own words. The command `\st{TEXT}` in the package `soul` seems to do the job. I'm looking for a way to define a macro in TeXstudio such that by selecting the text, the cross out command encapsulate the text, i.e. `\st{THE_SELECTED_TEXT}`. I am not familiar with macro programming in TeXstudio.


title: beamer color settings for section names in the header

text: This guide explains how to produce dynamic headers, where the current section is highlighted. But how can I control the color used for highlighting? (to save space I've set the header's font size to a small value, so I would like to add some contrast to make it more clear in what section of the talk we are).


title: How to only output dependencies from latexmk?

text: I'd like to use `latexmk` in a Makefile, so I've read the manual section on that. However, the dependency generation step seems less than ideal. Specifically, it seems that `latexmk` can only show dependencies after fully building an output file (which can take a long time in my case). Is there a way to have `latexmk` only output dependencies to a file and not mark the actual output file as up-to-date? I've tried the following rule in my Makefile, but it seems to mark the output file as up-to-date. I'd also think it could run multiple times (or think it has failed) depending on what's in the log file.               %.d: %.tex         @echo "Generating $@ from $<"         @set -e; \          $(LATEXMK) -M -MF $@ -quiet -pdf \           -pdflatex="echo Generating dependencies from %T" $<


title: Left align title with blue background, matching a style

text: I'm trying to replicate a journal's titling style in LaTeX specifically one that looks like this: ![enter image description here](http://i.stack.imgur.com/4K8w9.png) So far I've got this:               \documentclass[11pt,a4paper,twoside, twocolumn]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[UKenglish]{babel}     \usepackage[UKenglish]{isodate}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{lmodern}     \usepackage{bm}     \usepackage[usenames,dvipsnames]{color}     \definecolor{docblue}{RGB}{0,116,178}        \definecolor{docgrey}{RGB}{166,168,170}           \usepackage{titling}     \setlength{\droptitle}{-9em}           \title{\colorbox{docblue}{\LARGE \textbf{\color{white}{Detection and diagnosis of H7N9 \& MERS-CoV by RT-PCR}}}}     \author{ \textbf{\textsf{J Smith}$\bm{^{1}}$} \\ \color{docgrey}{\textbf{1. Institute, City, Country}}}     \date{}     \usepackage{microtype}          \begin{document}          \maketitle          \end{document}      Which looks like this: ![enter image description here](http://i.stack.imgur.com/9ppts.png) I have a few issues:   * None of the title elements are aligned left, I tried using the `flushleft` environment however it caused compile errors.   * `colorbox` causes the title to not wrap correctly and extend over the right margin, it also appears to have slightly less padding too. How can the above be solved?


title: getting unicode lower block series to appear

text: In contexts outside of LaTeX, I've found rectangles of increasing size very useful. I can enter these in UTF-8 in my text editor, but despite trying every font related fix I can find, I can't seem to get these glyphs to show up (I'm using xelatex). Can anyone provide a MWE in which these will appear?   * ' ' U+2002 En Space Nut   * '▁' U+2581 lower 1/8    * '▂' U+2582 lower 1/4   * '▃' U+2583 lower 3/8    * '▄' U+2584 lower 1/2   * '▅' U+2585 lower 5/8    * '▆' U+2586 lower 3/4   * '▇' U+2587 lower 7/8   * '█' U+2588 full block I can get the ding symbols for horizontally increasing rectangles working ( \ding{120} ❘, \ding{121} ❙, and \ding{122} ❚ ), but I really want vertically increasing blocks.


title: Plots with "no marks" have marks in references

text: I want to plot some functions without marks and reference them in my text - the problem is that in the text there are some random marks and i can't turn them off somehow.               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{     plotl/.style={blue,no marks,ultra thick,domain=-2:2,samples=50},     plotd/.style={red,no marks,ultra thick,domain=-2:2,samples=50}     }     \begin{document}     Text blablbalbal \ref{plot:probH} blablalbalba \ref{plot:probL}\\     \begin{tikzpicture}         \begin{axis}[width=\textwidth,height= 200pt,legend pos=north east,xlabel = $E_x$, ylabel=$p_x$]     \addplot+[plotl]{0.15*exp(-x/0.5)/(0.5*sinh(4)};\addlegendentry{$T = 0.5$}\label{plot:probL}     \addplot+[plotd]{0.15*exp(-x/4)/(4*sinh(0.5)};\addlegendentry{$T = 4.0$}\label{plot:probH}         \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/x9oFq.png)


title: Connecting text in a table with text outside the table, using lines and circles

text: I have a table similar to this one               \begin{center}     \begin{tabular}{llcc|}       &   & \multicolumn{2}{c}{Blah}\\ \cline{3-4}       & \multicolumn{1}{l|}{} & A & B\\ \cline{2-4}     Bleh1 & \multicolumn{1}{|l|}{C} & \begin{tabular}{l}E\\F\end{tabular}& \begin{tabular}{l}I\\J\end{tabular} \\ \cline{2-4}     Bleh2 & \multicolumn{1}{|l|}{D} & × & \begin{tabular}{l}G\\H\end{tabular}\\ \cline{2-4}     \end{tabular}     \end{center}      and I would like to add some circles or ellipses to highlight particular entries and add some text, outside the table. For example, I would like to add a red circle or ellipsis around E and F (having them inside the same circle) and draw a line, maybe also red, from the ellipsis to some text outside the table, say "Hello", linking this text to the entry in the table. Any ideas? Thanks,


title: How to put a figure on the facing page of a chapter page with correct numbering?

text: What's the best way to place a page-sized figure including the correct caption numbering on the facing page of a chapter opening page? Correct numbering means: if I put the figure before the chapter, the numbering of the previous chapter is continued and the list of figures shows it belonging to the previous chapter. But I want to have it labeled 6.1 if the new chapter will be chapter 6. Now I was thinking: Is there a way to use a caption(command) that will only be defined later? Is there a package that does something like this already? In essence, something like this:               \cleartoevenpage{\thispagestyle{empty}}     \begin{figure}[p]         \begin{sidecaption}{\theCaption}  % TODO: how?             \includegraphics{image.jpg}         \end{sidecaption}     \end{figure}          \chapter{Chapter Title}          \defineTheCaption      Or, if that is not possible, how can I manually label the figure as if belonging to the next chapter, with the correct entry in the lof file? PS: I am using memoir. The kind of opposite thing seems possible with \newfixedcaption: it allows to place a caption on a page preceding a figure.


title: Distance between array rows

text: I am using the `array` environment to create a multiple row bracket expression, as folows:               \documentclass{article}          \begin{document}          \begin{equation}     \left\{ \begin{array}{lll}     C(\tau_{k,i})=0.5Q_e\ddot{q}_t^T\ddot{q}_t + 0.5R_e \theta^T \theta & when & t\neq t_v\\     \\     C(\tau_{k,i})=0.5Q_e\ddot{q}_t^T\ddot{q}_t + 0.5R_e \theta^T \theta +    P_{viapoint} & when & t=t_v\\     \\     \quad\quad P_{viapoint}=10^{10}(q_{t}-q_{viapoint})^T(q_{t}-q_{viapoint})          \end{array}\right.       \label{cost2}     \end{equation}          \end{document}      which results in something like this: ![enter image description here](http://i.stack.imgur.com/719cK.png) However, the vertical spacing between the equations is much greater that the line spacing in the text, and is eating too much space on the paper. Is there a way to reduce the vertical spacing?


title: Literature in ModernCV

text: I currently write my CV and I want to include a Bibliography. The following is my header:               \documentclass[11pt,a4paper,sans]{moderncv}          \usepackage[latin1]{inputenc}          \usepackage[ngerman]{babel}          \usepackage[T1]{fontenc}          \usepackage{lmodern}          \usepackage{amsmath, amssymb}          \usepackage{enumerate}          \usepackage{dsfont}          \usepackage{multibib,chapterbib, babelbib}          \moderncvtheme[red]{classic}          \usepackage[left=25mm,right=25mm, top=30mm, bottom=30mm]{geometry}          \renewcommand{\baselinestretch}{1.25}          \AtBeginDocument{\recomputelengths}      So now I want to include a Bibliography, but I have the following problems with it:   1. The bibliography itself is indented nearly half the page. How to force Latex to start at a "normal" left margin?   2. The numbers for the different sources are not shown in the bibliography, even though in the CV the numbers appear if I \cite{} them, and if you want to look the source up, you have to count through. What to do to make the numbers appear in the bibliography too? Maybe something is missing in my header.\ Thank you.


title: wraptable generates table overlying text in XeLaTeX

text: I am using XeLaTex on OS/X. `wrapfig` appears to work perfectly. When I try the following:               {\bf This closing line of a paragraph emphasized}          \begin{wraptable}{r}{0.8\textwidth}     \begin{tabular}{|c|c|c|c|}\hline\hline     table contents, which is all text and numbers     \end{tabular}     \label{exposure}     \end{wraptable}          {\bf This opening line of the next paragraph emphasized}      The table is printed overlying the surrounding text. If I remove the {\bf text} at the beginning and end of the surrounding paragraphs, it works correctly.


title: PGFPlot/Tikz Legend Error

text: I wish to add a legend to my two plots - red and black, but the legend seems to have some scaling issues. I think it may be due to the changes made in shifting and domains, but I am not sure!               \newcommand{\vasymptote}[2][]{     \draw [color=gray,densely dashed,#1] ({rel axis cs:0,0} -| {axis cs:#2,0}) -- ({rel axis cs:0,1} -| {axis cs:#2,0});     }          \begin{tikzpicture}         \begin{axis}[             xlabel={Distance (m)},             ylabel={Moment (kNm)}, xmin=0,xmax=60,width=29.7cm,height=21cm, title={Moment Envelopes}, grid=both, y dir=reverse, ytick={-5500,-5000,...,1500},]            % Axis         \addplot[gray,thick,domain=0:60,shift={(0,0)},forget plot] {0}; %x axis        \vasymptote {7.5};        \vasymptote {22.5};        \vasymptote {37.5};        \vasymptote {52.5};              % 1.2G + 1.5 Q       \addplot[black,smooth,domain=0:7.5,shift={(0,0)}, line legend] {-46.61*x^2 - 349.6*x}; % A         \addplot[black,smooth,domain=0:15,shift={(75,0)}, forget plot] {-54.22*x^2 + 829.29*x - 2206}; % B       \addplot[black,smooth,domain=0:15,shift={(225,0)}, forget plot] {-54.22*x^2 + 813.22*x - 2020}; % C       \addplot[black,smooth,domain=0:15,shift={(375,0)}, forget plot] {-54.22*x^2 + 797.16*x - 1965}; % D       \addplot[black,smooth,domain=0:7.5,shift={(525,0)}, forget plot] {-46.61*(7.5-x)^2 - 349.6*(7.5-x)}; % E              \addlegendentry{Black Line}              % G + 0.3 Q         \addplot[red,smooth,domain=0:7.5,shift={(0,0)}, line legend] {-29.36*x^2 - 220.25*x}; % A         \addplot[red,smooth,domain=0:15,shift={(75,0)}, forget plot] {-36.6*x^2 + 559.77*x - 1489.05}; % B         \addplot[red,smooth,domain=0:15,shift={(225,0)}, forget plot] {-36.6*x^2 + 548.92*x - 1363.5}; % C         \addplot[red,smooth,domain=0:15,shift={(375,0)}, forget plot] {-36.6*x^2 + 538.68*x - 1326.38}; % D         \addplot[red,smooth,domain=0:7.5,shift={(525,0)}, forget plot] {-29.36*(7.5-x)^2 - 220.25*(7.5-x)}; % E               \addlegendentry{Red Line}          \end{axis}     \end{tikzpicture}      Uninverting the y-axis leads to a reduction in the size of the legend, but does not fix the problem. Any help would be great, thanks!