title: Adding a line to a heading

text: Here is the skeleton of my LaTeX markup:               \documentclass[11pt]{article}     \usepackage{amsmath,amssymb,amsthm}     \usepackage[margin=1.25cm, bottom=2cm]{geometry}     \newcommand{\name}{Name}     \newcommand{\hw}{1}          \title{\vspace{-50pt}     \Huge \name     \\\vspace{20pt}     \huge Class name\hfill Assignment \hw}     \author{}     \date{}     \pagestyle{myheadings}     \markright{\textnormal{\name\hfill Assignment \hw\qquad\hfill}}          \begin{document}     \maketitle          blah blah          \end{document}      which looks like this: ![pdf](http://i.imgur.com/XUyR8Hr.png) I want to add the due date right under "Assignment 1", in the indicated location.


title: padded boundary of convex hull

text: I'm trying to draw a boundary around a convex set of circular nodes in TikZ. The aim is to have it padded by 1cm, with an arc at the corners between segments, like this: ![convex set of nodes](http://i.stack.imgur.com/AykAY.png) I currently have the following code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}     \begin{tikzpicture}[every node/.style={circle,draw=blue}]            \node at (0,0) (a) {};       \node at (1,3) (b) {};       \node at (2,2) (c) {};            \draw[red]       ($(a)!1cm!-90:(c)$)       let \p1 = ($(a)!1cm!-90:(c) - (a)$),         \n1 = {atan2(\x1,\y1)},         \p2 = ($(a)!1cm!90:(b) - (a)$),         \n2 = {atan2(\x2,\y2)},         \n{delta} = {-Mod(\n1-\n2,360)}       in          arc [start angle=\n1, delta angle=\n{delta}, radius=1cm]       --       ($(b)!1cm!-90:(a)$)       let \p1 = ($(b)!1cm!-90:(a) - (b)$),         \n1 = {atan2(\x1,\y1)},         \p2 = ($(b)!1cm!90:(c) - (b)$),         \n2 = {atan2(\x2,\y2)},         \n{delta} = {-Mod(\n1-\n2,360)}       in          arc [start angle=\n1, delta angle=\n{delta}, radius=1cm]       --       ($(c)!1cm!-90:(b)$)       let \p1 = ($(c)!1cm!-90:(b) - (c)$),         \n1 = {atan2(\x1,\y1)},         \p2 = ($(c)!1cm!90:(a) - (c)$),         \n2 = {atan2(\x2,\y2)},         \n{delta} = {-Mod(\n1-\n2,360)}       in          arc [start angle=\n1, delta angle=\n{delta}, radius=1cm]       -- cycle;          \end{tikzpicture}     \end{document}      I'm going to have to draw a lot of these, so it would useful if I could replace the `\draw` statement by something like:               \draw[red] \convexpath{(a) (b) (c)}{1cm};      where `(a) (b) (c)` are the nodes in the corners of the convex set in a clockwise direction. In the case of one node I would like it to draw a circle of the specified radius around the node in question. Does anyone have any suggestions for how to go about writing such a macro?


title: Creating figures to show binary values

text: I'm working on a paper that deals heavily with floating point values, and I need to make figures to represent 32 bit binary values. The code below is what I came up with, and visually it is basically what I want. However at the least I'd like to wrap it in a function since it will need to be used fairly often, but I haven't been able to make that work. I tried putting the picture portion in the function, but kept getting errors about how \begin{figure} was being terminated by a \end{document}. Also, if you zoom in on the figure you can see that the boxes don't always line up correctly, and I'm not quite sure how to fix that.               \begin{figure}     \setlength{\unitlength}{1mm}     \setlength{\fboxsep}{0mm}     \centering     \begin{picture}(130,16)         % sign bit       \put(2,4){\framebox(4,8){0}}       % exponent       \put(6,4){\framebox(4,8){1}}       \put(10,4){\framebox(4,8){0}}       \put(14,4){\framebox(4,8){0}}       \put(18,4){\framebox(4,8){0}}       \put(22,4){\framebox(4,8){0}}       \put(26,4){\framebox(4,8){0}}       \put(30,4){\framebox(4,8){0}}       \put(34,4){\framebox(4,8){0}}       % fraction       \put(38,4){\framebox(4,8){1}}       \put(42,4){\framebox(4,8){0}}       \put(46,4){\framebox(4,8){0}}       \put(50,4){\framebox(4,8){1}}       \put(54,4){\framebox(4,8){0}}       \put(58,4){\framebox(4,8){0}}       \put(62,4){\framebox(4,8){1}}       \put(66,4){\framebox(4,8){0}}       \put(70,4){\framebox(4,8){0}}       \put(74,4){\framebox(4,8){0}}       \put(78,4){\framebox(4,8){0}}       \put(82,4){\framebox(4,8){1}}       \put(86,4){\framebox(4,8){1}}       \put(90,4){\framebox(4,8){1}}       \put(94,4){\framebox(4,8){1}}       \put(98,4){\framebox(4,8){1}}       \put(102,4){\framebox(4,8){1}}       \put(106,4){\framebox(4,8){0}}       \put(110,4){\framebox(4,8){1}}       \put(114,4){\framebox(4,8){0}}       \put(118,4){\framebox(4,8){0}}       \put(122,4){\framebox(4,8){0}}       \put(126,4){\framebox(4,8){0}}       % upper labels       \put(0,14){\scriptsize{MSB}}       \put(126,14){\scriptsize{LSB}}       %lower labels       \put(3,0){\scriptsize{S}}       \put(7,0){\line(0,1){2}}       \put(7,1){\vector(1,0){8}}       \put(16,0){\scriptsize{Exponent}}       \put(37,1){\vector(-1,0){8}}       \put(37,0){\line(0,1){2}}       \put(39,0){\line(0,1){2}}       \put(39,1){\vector(1,0){38}}       \put(79,0){\scriptsize{Fraction}}       \put(130,1){\vector(-1,0){38}}       \put(130,0){\line(0,1){2}}     \end{picture}     \caption{The value 3.14159 stored as a \code{float}.}     \label{figure:pi_example}     \end{figure}


title: Sort bibliography with same author and same year (biblatex)

text: When I cite two works by an author published in the same year, `biblatex` will sort them in the bibliography according to their title. In some cases, however, I know that the work sorted in the second place in fact was published first. How can I reorder them?               \documentclass{article}     \usepackage{filecontents}     \usepackage[style=authoryear,sorting=nyt]{biblatex}     \begin{filecontents}{\jobname.bib}     @BOOK{lennon1972a,         AUTHOR = "John Lennon",         TITLE = "My music",         YEAR = "1972"}     @BOOK{lennon1972b,         AUTHOR = "John Lennon",         TITLE = "More of my music",         YEAR = "1972"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \cites{lennon1972a}{lennon1972b}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/8jufZ.png)


title: minitoc package adds extra page when used with float and lastpage packages

text: The `minitoc` package adds extra page when used with `float` and `lastpage` packages. I figured out that this problem can be resolved by loading `minitoc` package before `float` and `lastpage` packages. In `LyX` the `float` package is loaded automatically and could not figure out how to force `LyX` use `minitoc` package before loading `float` and `lastpage` packages. Thanks in advance for your help.               \documentclass[a4paper,12pt]{book}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{lastpage}     \usepackage{fancyhdr}     \usepackage{float}     \usepackage{minitoc}     \begin{document}     \dominitoc     \tableofcontents     \mainmatter     \chapter{First Chapter}     \minitoc     \section{Introduction}     \blindtext[1]     \section{Material \& Method}     \blindmathpaper     \chapter{Second Chapter}     \minitoc     \section{Introduction}     \blindtext[1]     \section{Material \& Method}     \blindmathpaper     \end{document}      **Edited** It is also working in `LyX 2.1.1` if I remove `\includepdf[pages={1},scale=1]{Back.pdf}` at the end of the document. However if I include `\includepdf[pages={1},scale=1]{Back.pdf}` at the end of the document it adds extra page. Any thoughts. **Updated** I've narrow downed the problem. My following MWE in `.Rnw` format adds extra page at the end of document when using `minitoc` package. Thanks again for your help.               \documentclass[a4paper,12pt]{book}     \usepackage{minitoc}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{lastpage}     \usepackage{fancyhdr}     \usepackage{float}     \usepackage{pdfpages}     \begin{document}     \dominitoc     \tableofcontents     \mainmatter          \chapter{First Chapter}     \minitoc     \section{Introduction}     << Test >>=     1:50     @      \blindtext[1]     \section{Material \& Method}     \blindmathpaper     \includepdf[pages={1},scale=1]{Back.pdf}     \end{document}


title: Drawing knots with 8 crossings and labels

text: So for a project, I have to draw the knot diagrams of all alternating knots with up to 8 crossings and label the regions bounded by the knots. For knots with up to 7 crossings, I used PSTricks, pst-knots package, but unfortunately, it doesn't include ones with 8 crossings. I did draw out the 8 crossing knots myself using beziers, but the change in style and neatness is noticeable. Is there an alternative package/method that wouldn't require redrawing all the knots? Alternatively, since someone will suggest importing the knots as images, is there a way to place labels over images in LaTex? Thank you.


title: Superimpose letter on integral symbol

text: Good Afternoon all, I am trying to typeset a symbol that I have been using to represent the integral of a regulated function. This symbol is the standard integral symbol, with the letter "R" superimposed on it. I have tried using `\mathllap`, `\mathclap` and `\mathrlap` (as suggested here), however none of these have managed to give the desired effect. When I tried doing it without the limits of integration, it got close to working, however then I was unable to have the limits to the right hand side of the symbol:               \mathop{\mathrlap{\int}R}_a^b f      Any help would be greatly appreciated, thank you in advance! Minimal Example:               \documentclass{article}          \usepackage{amsmath,mathtools}          \begin{document}          Take the regulated function $f$, we want to compare the Riemann integral, $\int_a^b f$     to the regulated integral $\mathop{\mathrlap{\int}R}_a^b f$ by taking sequences of step     functions.          We will prove that     $$     \mathop{\mathrlap{\int}R}_a^b f = \int_a^b f     $$          \end{document}


title: Test for a character, no matter if active or not (futurelet token)

text: I'd like to test for a character, irrespective its current catcode (i.e. active or not). This is very similar to How do I test for a character, irrespective of catcode?, however I cannot use `\pdf@strcmp` because I might have "half" macros (e.g. `\emph` without a parameter yet).               \documentclass{minimal}     \usepackage[czech]{babel}% makes - active     \begin{document}       \def\aaa{%         \if a\noexpand\lookahead%           (the letter a)%         \else\if -\noexpand\lookahead%           (a minus)%         \else%           (special treatment)         \fi\fi%       }       \futurelet\lookahead\aaa -       \futurelet\lookahead\aaa a       \futurelet\lookahead\aaa \emph{c}     \end{document}      Changing catcodes before and after is not really a solution in my case, because the original meaning would get lost just by futurelet-looking at things.


title: Generate comma separated list with some non-empty strings

text: I'm trying to generate a comma separated list that uses strings that may or may not be empty. For example `\mylist{\stringA,\stringB,\stringC}` would expand to `A, C` if `B` is empty or `B, C` if `A` is empty, etc. In case it matters, the strings are generated with `xstring`, for example something like `\StrBetween[3,4]{\longstring}{text:}{,}[\stringC]` which may or may not be empty depending on whether the condition is met. I'm pretty sure that I saw something similar somewhere, some time, but I just can't find it.


title: typing errors in latex draw

text: When i use latex draw i could encounter this problem.That is if I type the mathematical symbols i could not get the symbols rather the latex command only. help me to rectify this. I have tried to upgrade the latex draw using internet. But after that also i am getting the same problem. ![See the upper corner i need to have $\\alpha$](http://i.stack.imgur.com/3rHo9.jpg) here i enclose the command also which was generated by latex draw.               % Generated with LaTeXDraw 2.0.8     % Fri Jun 20 12:40:18 IST 2014     % \usepackage[usenames,dvipsnames]{pstricks}     % \usepackage{epsfig}     % \usepackage{pst-grad} % For gradients     % \usepackage{pst-plot} % For axes     \scalebox{1} % Change this value to rescale the drawing.     {     \begin{pspicture}(0,-3.1792188)(6.561875,3.1792188)     \psframe[linewidth=0.04,dimen=outer](5.08,2.3807812)(0.0,-2.6992188)     \usefont{T1}{ptm}{m}{n}     \rput(0.83140624,2.9857812){$\alpha$}     \usefont{T1}{ptm}{m}{n}     \rput(5.9914064,2.7257812){$\beta$}     \usefont{T1}{ptm}{m}{n}     \rput(0.1265625,-3.0342188){A}     \usefont{T1}{ptm}{m}{n}     \rput(5.4271874,-2.8942187){B}     \end{pspicture}      }


title: Crashes when using \tikzsetnextfilename?

text: I just stumbled on this, so I'll post about it in Q&A format: I decided to try tikz-external, and all I have is this in preamble:               \usetikzlibrary{external}     \tikzexternalize[prefix=img/] %activate      ... and the initial tests I ran were fine. But, I didn't like the `test- figure0` default names given by the package; and I wanted to use something like this for the images:               \tikzsetnextfilename{\jobname-mypic}      However, as soon as I put this in; latex would start generating the file, and then would crash at the end? It even seemed to me - as if that second latex run, ends prematurely -- however, Timing response of externally called commands via write18: blocking or not? confirms that the shell escape call should be blocking (and so it should wait until the spawned "externalization" call to latex completes, succesful or not). So I debugged a bit, by changing some stuff in the shell command (increasing verbosity by removing `batchmode`, and adding some sleeps):               \tikzset{external/system call={pdflatex \tikzexternalcheckshellescape -halt-on-error     % -interaction=batchmode -jobname "\image" "\texsource"} % default; batchmode=quiet!     -jobname "\image" "\texsource" ; echo "After pdflatex!" ; sleep 2 ; echo "After sleep!"},     external/optimize=false, % because of http://tex.stackexchange.com/questions/170291/tikz-wont-let-me-externalize-and-halts-on-error/172017#172017     }      ... eventually this produces a log like this:               ...     (./img/mypic.tikz     % ... runs here...     % (then this - from img/test-mypic.log):     ! Package tikz Error: Sorry, image externalization failed: the resulting image     was EMPTY. I tried to externalize 'img/test-mypic', but it seems there is no such image in the document!?     l.526 \end{document}     !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on img/test-mypic.log.     After pdflatex!     After sleep!     % (then this from test.log):     ! Package tikz Error: Sorry, the system call ... did NOT result in a usable output file ...     ...      ... meaning it is spefically the "inner" externalization call to pdflatex that fails - but there are no apparent errors in that file at all? (and the same one externalizes well without a custom name). So what could be the problem?


title: Alter font used for every pin in a plot

text: In some scatter plots I'm producing, I want to label each point using a pin. I achieve that by adding `\node` elements after the `\addplot` but within the `axis` environment, and using the `pin` property:               \documentclass{article}     \usepackage{pgfplots}      \pgfplotsset{compat=newest}     \begin{document}     \begin{tikzpicture}       \begin{axis}         \addplot coordinates           {             (1,1)             (2,2.5)             (3,2.9)             (4,4.1)           };         \node[pin = texta] at (axis cs:1,1) {};         \node[pin = \small textb] at (axis cs:2,2.5) {};       \end{axis}     \end{tikzpicture}     \end{document}      To adjust the font of a single pin, I can simply put in the appropriate command, as shown in the demo. However, I'd ideally like to set the style for all 'pin text' in one go. However, my attempts using `every pin`, `every pin edge` and so on have failed entirely. Simply doing               \tikzset{font = \small}      fails as all of the text is now drawn until the end of the axis, meaning this 'escapes' and affects the axis labels, too. So far, the best I can come up with is               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \tikzset{Pin/.style = {font = \small}}     \begin{document}     \begin{tikzpicture}       \begin{axis}         \addplot coordinates           {             (1,1)             (2,2.5)             (3,2.9)             (4,4.1)           };         \node[pin = {[Pin]texta}] at (axis cs:1,1) {};         \node[pin = {[Pin]textb}] at (axis cs:2,2.5) {};       \end{axis}     \end{tikzpicture}     \end{document}      which does move the detail into one place but still requires repetitive use of the style for each pin. Is there a 'cleaner' way to do what I want? (If not, that would also be a valid answer.)


title: Minimal installation of Latex with Tikz for a web server

text: What can you recommend for installing bare minimum in order to compile latex files on the fly in a web server running on Windows 2003 server in a VM? **The only 2 required packages will be Geometry and Tikz**. Potentially there could be other packages used, but not immediately. There is only 2 GB free space and keeping this to a bare minimum is a requirement. Ideally installation should reside in the VM for it to be self- contained and snapshottable. I am only experienced with doing full installs of texlive. What other methods of installing Latex on Windows would be suitable for the above scenario?


title: How can I add linked text in front of \ref{myRef}?

text: I am currently making references like this:               \section{BliBlaBlup} \label{sec:BliBlaBlup}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi pharetra     pharetra viverra. Vestibulum ante ipsum primis in faucibus orci luctus et      ultrices posuere cubilia Curae; Suspendisse potenti. Curabitur mollis cursus      libero, sed tempus ligula accumsan in. Nulla commodo metus quis nulla luctus      quis euismod diam tincidunt.     [...]     As you can read in section~\ref{sec:BliBlaBlup} ...      Now, only the number that gets generated by `\ref{sec:BliBlaBlup}` is linked. But I would like to have `Section~\ref{sec:BliBlaBlup}` being linked. How can I do so?


title: How to add a new command in moderncv template for cventry?

text: I want to add new moderncv command to act like the command cventry but in double, I mean that I have the same job from a period in two differnet companies and I need the command to show it, here is the original commands               \cventry[spacing]{years}{degree/job title}{institution/employer}{localization}{optionnal: grade/...}{optional: comment/job description}      what I want is something like this               \cventrydouble[spacing]{years}{degree/job title}       {institution1/employer1}{localization1}{optionnal1: grade/...}{optional1: comment/job description}       {institution2/employer2}{localization2}{optionnal2: grade/...}{optional2: comment/job description}      and this will give final result like the original one but with `\cventrydouble` you will be able for the same period and same job to put two employers.   I need something close this but with better style :   \section{Experiences Professionnelles} \cventry{2008\à 2012}{Responsable...}{}{}{}{} \cventry{}{}{Company1}{Paris}{France}{Description company1.} \cventry{}{}{Company2}{Paris}{France.}{Description company2\newline{}} Sorry but I'm not allowed to show a picture, I get this message "We're sorry, but as a spam prevention mechanism, new users aren't allowed to post images. Earn more than 10 reputation to post images."


title: Emacs hint that: Cannot have two processes for the same document

text: I have installed emacs 24.2, okular 0.14(with KDE 4.8) and Texlive 2011 in windows7. I want to use okular to view pdf file generated by latex in emacs. Hence I have configured okular in my `.emacs` as following:               (setq TeX-command-list              '(("TeX" "tex --src \"\\nonstopmode\\input %t\""                 TeX-run-TeX nil t)                ("LaTeX" "%l --src \"\\nonstopmode\\input{%t}\""                 TeX-run-LaTeX nil t)                ("View" "yap -1  -s %n%b %d"                 TeX-run-discard nil nil)                ("SView" "F:/KDE/bin/okular.exe --unique %o" TeX-run-command t t)                ("PLaTex" "pdflatex -synctex=-1 \\nonstopmode\\input{%t}"                 TeX-run-LaTeX nil t)                ("PView" "start \"\" %s.pdf" TeX-run-command nil t)                ("BibTeX" "bibtex %s" TeX-run-BibTeX nil nil)                ("Index" "makeindex %s" TeX-run-command nil t)                ))      As you can see, I want to view pdf file via okular when I using `SView` command. However, there have some problems with okular: I opened a tex file named `answer.tex` emacs. Firstly, I use `c-c c-c` and `PLatex` to compile the file to pdf. Then I use `c-c c-c` and `SView` to open it via okular. Everything works fine until now. And then, after I changed some content of answer.tex, I want to re-compile the file. Hence I press `c-c c-c` in emacs and choose `PLatex` to compile the file. But the emacs show a message in the minbuffer: **Process`SView' for document`answer' running, kill it? (yes or no)** If I input `no` and Enter, then I get a error message in the minbuf: **Cannot have two processes for the same document** My questions is: how to avoid this error message as I view dvi file via yap? Any help would be appreciated!


title: Minor ticks not showing when using matlab2tikz

text: I am using `matlab2tikz` to import MATLAB figures into TeX. However I can't seem to get the x or y minor ticks to show in the document compiled by TeX. The MATLAB figure I have converted to `.tikz` have the minor ticks on both axes. The plot in the figure is linear. In the `.tikz` file the `xminorticks=true` and `yminorticks=true` options are present. Why won't the minor ticks appear in the compiled document? EDIT: Code generated by `matlab2tikz` which reproduce the problem for me, all point are spaced evenly:               \begin{tikzpicture}          \begin{axis}[%     view={0}{90},     width=14cm,     height=6cm,     scale only axis,     xmin=1, xmax=10,     xminorticks=true,     ymin=2, ymax=20,     yminorticks=true]     \addplot [     color=blue,     solid,     forget plot     ]     coordinates{      (1,2)(2,4)(3,6)(4,8)(5,10)(6,12)(7,14)(8,16)(9,18)(10,20)      };     \end{axis}     \end{tikzpicture}%


title: subfigure.sty and acronym.sty not found

text: After my old computer broke down, i have installed latex again on my new computer with 64-bit windows 7. However, when I try to compile a simple example that alaways worked before, i always get the error 'subfigure.sty' not found. When I remove the subfigure package, the compiler instead complains on the acronym.sty. I have updated the MIkTex but it didn't help. Does anybody know why this error appears?


title: jurabib: how to delete comma between "lastname" and "firstname" in bibliography

text: I use the `jurabib` package and everything works fine. Entries in bibliography look like this: > **Doe** , **John** : How to vote for a Democrat, Kluwer 2012. Does anyone know how I can delete the comma between "Doe" and "John"? I found that for the `biblatex` package there is this command:               \renewcommand*{\revsdnamepunct}{}      However, this does not work for `jurabib`.


title: Display colored text in Adobe Acrobat Reader

text: Hello everybody out there using TeX, Sorry for molesting you with a question involving closed-source software, but Adobe's Acrobat Reader on Ubuntu 12.04 doesn't display colored text within my document, whereas evince for example does. Can anyone of you reproduce this minimal example?               \documentclass{article}     \usepackage{color}     \begin{document}     Hello, \color{blue}{world}!     \end{document}


title: Add "tangential nodes" to a hobby curve

text: Is it possible to place nodes along a hobby curve such that the orientation is tangential to the curve. I should add what I mean with tangential: The curved hobby path should represent a curvy street and then I would add an image of a car at a given position on the path such that the car points tangential to the curve. I tried to make it more clear with the following pseudo-code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{hobby}     \usepackage{graphicx}          \begin{document}     \begin{tikzpicture}     \draw     (0,0) to[out angle=0,in angle=180,curve through={(1,.9) ..node[rotation=tangential,pos=0.4]{\includegraphics[width=0.5cm]{car}} (2,0) .. (3,.5)}] (4,0);     \end{tikzpicture}     \end{document}      Take for example this car picture: ![](http://i.stack.imgur.com/ZS04i.png)


title: Change margin for particular environment (parallel)

text: I posted a too general question (Change margins locally (for text)), but my need is to solve about a particular environment, for I have to obtain some verses (original and translation) in parallel lines. Please, consider this code:               \documentclass[a4paper,11pt]{article}     \usepackage{fontspec}     \usepackage{polyglossia}     \setmainlanguage[babelshorthands=true]{italian}     \setotherlanguage[variant=polytonic]{greek}     \newfontfamily\greekfont[Scale=MatchLowercase]{GFS Didot}     \usepackage[a4paper]{geometry}     \usepackage{changepage}          \usepackage{parallel}     \newenvironment{verseparallel}[2]     {\begin{Parallel}{}{}\footnotesize\parindent=0pt     \ParallelLText{\leavevmode#1}\ParallelRText{#2}}     {\end{Parallel}}          \begin{document}          \begin{adjustwidth}{-1cm}{-1cm}     \begin{verseparallel}     {\begin{greek}%     τὸν δ᾽ Ἄργος προσέειπεν ἀμηχανέων κακότητι:\\     ‘Αἰολίδην Φρίξον τιν᾽ ἀφ᾽ Ἑλλάδος Αἶαν ἱκέσθαι\\     ἀτρεκέως δοκέω που ἀκούετε καὶ πάρος αὐτοί,\\     Φρίξον, ὅτις πτολίεθρον ἀνήλυθεν Αἰήταο,\\     κριοῦ ἐπεμβεβαώς, τόν ῥα χρύσειον ἔθηκεν\\     Ἑρμείας: κῶας δὲ καὶ εἰσέτι νῦν κεν ἴδοισθε.\\     τὸν μὲν ἔπειτ᾽ ἔρρεξεν ἑῇς ὑποθημοσύνῃσιν\\     Φυξίῳ ἐκ πάντων Κρονίδῃ Διί. καί μιν ἔδεκτο\end{greek}     }     {%     Vi era già prima noto, credo, che Frisso, nipote di Eolo,\\     venne ad Eete della Grecia; Frisso che giunse alla città di Eete,\\     cavalcando un montone che fu mutato da Ermes in oro,\\     e il vello potete ancora oggi vederlo\\     disteso sui folti rami di una quercia; poi,\\     come il montone stesso chiese,\\     lo sacrificò a Zeus, il figlio di Cronos,\\     nella sua veste di protettore di esuli.}     \end{verseparallel}     \end{adjustwidth}          \end{document}      For `changepage` uses a list environment, I don't know how to fix my code. Infact I receive the following error:               ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.40 \end{adjustwidth}          ? ^[[A      **ADDENDUM** Yes (here it's not relevant the columns width), but consider this code:               \documentclass[a4paper,11pt]{article}     \usepackage{fontspec}     \usepackage{polyglossia}     \setmainlanguage[babelshorthands=true]{italian}     \setotherlanguage[variant=polytonic]{greek}     \newfontfamily\greekfont[Scale=MatchLowercase]{GFS Didot}     \usepackage[a4paper]{geometry}     \usepackage{lipsum}     \usepackage{parallel}     \newenvironment{verseparallel}[2]     {\begin{Parallel}{0.45\textwidth}{0.51\textwidth}\footnotesize\parindent=0pt     \ParallelLText{\leavevmode#1}\ParallelRText{#2}}     {\end{Parallel}}          \begin{document}     \lipsum[1]          \newgeometry{lmargin=1.2cm,rmargin=1.2cm}     \begin{verseparallel}     {\begin{greek}%     τὸν δ᾽ Ἄργος προσέειπεν ἀμηχανέων κακότητι:\\     ‘Αἰολίδην Φρίξον τιν᾽ ἀφ᾽ Ἑλλάδος Αἶαν ἱκέσθαι\\     ἀτρεκέως δοκέω που ἀκούετε καὶ πάρος αὐτοί,\\     Φρίξον, ὅτις πτολίεθρον ἀνήλυθεν Αἰήταο,\\     κριοῦ ἐπεμβεβαώς, τόν ῥα χρύσειον ἔθηκεν\\     Ἑρμείας: κῶας δὲ καὶ εἰσέτι νῦν κεν ἴδοισθε.\\     τὸν μὲν ἔπειτ᾽ ἔρρεξεν ἑῇς ὑποθημοσύνῃσιν\\     Φυξίῳ ἐκ πάντων Κρονίδῃ Διί. καί μιν ἔδεκτο\end{greek}     }     {%     Vi era già prima noto, credo, che Frisso, nipote di Eolo,\\     venne ad Eete della Grecia; Frisso che giunse alla città di Eete,\\     cavalcando un montone che fu mutato da Ermes in oro,\\     e il vello potete ancora oggi vederlo\\     disteso sui folti rami di una quercia; poi,\\     come il montone stesso chiese,\\     lo sacrificò a Zeus, il figlio di Cronos,\\     nella sua veste di protettore di esuli.}     \end{verseparallel}     \restoregeometry          \lipsum[2]     \end{document}      You'll realize that `\newgeometry` breaks the page. Maybe, with `changepage` is possible to produce an enlargement of a single part of page without breaking it in two different pages. I've a lot of bilingual quotations, some very small, and they have to stay in the same page, with the "normal" italian text


title: broken hyperlink to items in etaremune or revnum environment

text: I want to create hyperlinks to the items of a `etaremune` or `revnum` environment. It works with the enumerate environment, but how can I do the same with a list with reverse numbering? Here is an example in which only the hyperlinks to the `enumerate` environment work.               \documentclass[a4paper,10pt]{article}     \usepackage{etaremune}                           \usepackage{revnum}     \usepackage{hyperref}          \begin{document}      \begin{enumerate}        \item aaa \label{1}         \item bbb \label{2}      \end{enumerate}           \begin{etaremune}[start=4]        \item ccc \label{4}        \item ddd \label{3}      \end{etaremune}           \begin{revnumerate}[6]        \item eee \label{6}          \item fff \label{5}      \end{revnumerate}           \ref{1}, \ref{2}, \ref{3}, \ref{4}, \ref{5}, \ref{6}     \end{document}      In the correspondig pdf, the \ref{3} and \ref{4} do not link to the line 3. ddd and 4. ccc as they should but to the last item of the enumerate environment, that is the line 2. bbb.


title: LuaTeX: \luaexec leads to 'Missing number, treated as zero.'

text: I can't handle Lua <--> LaTeX interaction in LuaTeX. I'm getting type errors anytime luacode is suppose to output non-string token. For example in this case:               \documentclass{report}     \usepackage[export]{adjustbox}     \usepackage{fontspec}     \usepackage{luacode}          \begin{luacode*}     function params()         tex.print(0.12)     end     \end{luacode*}          \begin{document}          {\adjustbox{trim={\luaexec{params()}\width} {.2\height} {0.1\width} {.15\height},clip}           {\includegraphics[keepaspectratio,width=5cm]{pic.jpg}}}     \end{document}      I'll get: 'Missing number, treated as zero.'


title: Algorithmic: Put If and EndIf into same line

text: I use the algorithmic package to create a pseudo-code-source in latex. I have a source with many short if-statements. The fact that the END (from EndIf) is put in a new line every time leads to a lengthy layout:               \documentclass[11pt,a4paper,leqno,fleqn]{article}     \usepackage{algpseudocode}     \usepackage[Algorithmus]{algorithm}     \begin{document}     \begin{algorithm}     \caption{WHILE-Modulo}     \begin{algorithmic}[1]     \Require f($x_1,x_2$)     \State $x_z := 1$     \While{$x_z \not = 0$}         \If{$x_z = 1$} \If{$x_1 = 0$} $x_z = 10$ \EndIf \EndIf         \If{$x_z = 2$} $x_3 := x_1 \dot{-}x_2$\EndIf         \If{$x_z = 3$} $x_4 := x_2 \dot{-}x_1$\EndIf         \If{$x_z = 4$} \If{$x_3 = 0$} $x_z = 7$\EndIf \EndIf         \If{$x_z = 5$} $x_1 := x_3$\EndIf         \If{$x_z = 6$} $x_z = 2$\EndIf         \If{$x_z = 7$} \If{$x_4 = 0$} $x_z = 9$\EndIf \EndIf         \If{$x_z = 8$} $x_z = 10$\EndIf         \If{$x_z = 9$} $x_1 := x_1 \dot{-} x_2$\EndIf         \If{$x_z = 10$} $x_z = 0$\EndIf         \If{$x_z = 11$} $x_z = 0$\EndIf     \EndWhile     \end{algorithmic}     \end{algorithm}     \end{document}      leads to this output: ![enter image description here](http://i.stack.imgur.com/NPUxo.png) However, I want single If-Statements to be in one line, similar to this: ![enter image description here](http://i.stack.imgur.com/ZN0Y1.png) Do you have ideas? I am grateful for all input


title: margins and text position

text: When answering this question: Using fancyhdr to create an image based header and footer I needed to get the distance from the left edge of the paper to the beginning of `\textwidth` and the distance from the end of `\textwidth` to the right edge of the paper. For the distance from the left edge I used `\oddsidemargin + \hoffset + 1in` to adjust `\headwidth` via `\fancyhfoffset` and it put the start of the header on the left edge of the paper. For the distance from the right edge, I thought it was `\evensidemargin + \marginparwidth + \marginparsep`, but this resulted in the header overshooting the right edge of the page. It appears the correct distance is `\evensidemargin + \marginparwidth - \marginparsep`. I think I am missing something about how `\marginparsep` (or some other page "margin") works.               \documentclass{article}     \usepackage{fancyhdr}     \usepackage{calc}          \fancypagestyle{plain}{%         \renewcommand{\headrulewidth}{0pt}         \renewcommand{\footrulewidth}{0pt}         \fancyhf{}         \fancyhead[L]{\hrulefill{}}%         \fancyhead[R]{\hrulefill{}}%         \fancyfoot[L]{\hrulefill{}}%         \fancyfoot[R]{\thepage}%     }          \fancyhfoffset[L]{\oddsidemargin + \hoffset + 1in}     \fancyhfoffset[R]{\evensidemargin + \marginparwidth - \marginparsep}          \pagestyle{plain}     \begin{document}     First page          \clearpage          Second page     \end{document}


title: How could a verbatimtab environment in a figure environment be resized (perhaps using the package adjustbox)?

text: How could a verbatimtab environment in a figure environment be resized (perhaps using the package `adjustbox`)? I have some code something like the following:               \begin{figure}[htb]         \centering         \begin{verbatimtab}                     2012-12-03                     - thesis                     + relationship                     / - go to space                     / - #shopping notebook                     \ - jazz in The 78                     X - sleep at a reasonable time         \end{verbatimtab}         \caption{illustration of simple list}         \label{fig:list_1}     \end{figure}      The verbatimtab environment is provided by the package `moreverb`. In the case of tabular environments, the package `adjustbox` can be used; the tabular environment can be contained in an adjustbox environment in a way such as the following:               \begin{table}[H]         \centering         \begin{adjustbox}{width=\hsize, totalheight=\textheight, keepaspectratio}         \begin{tabular}{lll}             % table content         \end{tabular}         \end{adjustbox}     \end{table}      How could something like that rescaling for the tabular environment in the table environment be done for the verbatimtab environment in the figure environment? Below is a minimal working example which should be modified such that the verbatim text is rescaled to fit within the usable text area of the page (\hsize):               \documentclass{article}     % page margins         \usepackage[             left=5cm,             right=5cm,             top=5cm,             bottom=5cm         ]{geometry}     % rescaling         \usepackage{adjustbox}     % verbatim         \usepackage{moreverb}     % table handling         \usepackage{float}         \restylefloat{table}     % custom figure and table caption prefixes         \renewcommand{\figurename}{figure}         \renewcommand{\tablename}{table}          \begin{document}          \begin{table}[H]         \centering         \begin{adjustbox}{width=\hsize, totalheight=\textheight, keepaspectratio}         \begin{tabular}{lll}             \hline             \hline             a&b&c\\             \hline             \hline         \end{tabular}         \end{adjustbox}     \end{table}          \begin{figure}[htb]         \centering         \begin{verbatimtab}             2012-12-03             - thesis             + relationship             / - go to space             / - #shopping notebook             \ - jazz in The 78             X - sleep at a reasonable time             2013-10-24T1629             - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 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{verbatimtab}     \caption{illustration of simple list}     \label{fig:list_1}     \end{figure}          \end{document}


title: LaTeX on IBM AIX 5.3

text: I want to use LaTeX on IBM AIX 5.3, has support for UNIX on IBM AIX 5.3 stopped? If so should I use an old version, say from 2009.


title: ledpar: How to force a pagebreak in {pages}-environment/stanzas?

text: How can I force a pagebreak in `ledpar`’s `{pages}`-environment between to `\stanza`s or even between two lines of a single `\stanza`? The reason for my question is that `ledpar` sometimes breaks the page between a verse an it’s continuation in the next line, e.g. **This is a verse is to long to fit in**   — `ledpar` inserts a pagebreak here —   (indent) **a single line** That’s not good to read an I want to force a pagebreak before “This is …” In a comment at “ledmac/-par: No versesyncing but pagesyncing” diabonas suggests to stop the `left`-/`rightpage`/`\Pages`-construc manually to force a pagebreak but I hope there’s a more elegant way …? This is a minimal example for testing. I’ve tried three versions; related code is marked with [ _n_ ].               \documentclass{scrartcl}     \usepackage{geometry}% very small pages to see an effect     \geometry{paperheight=4cm,paperwidth=6cm,vmargin=1cm}     \usepackage{ledmac,ledpar}          \begin{document}     \begin{pages}         \begin{Leftside}         \beginnumbering         \setstanzaindents{2,0,0,0}         \stanza 1 & 2 & 3 \&         \stanza 4 & 5 & 6 \&     %   \stanza\pagebreak\&% [1] doesn't work     %   \pagebreak% [2,3] doesn't work too         \stanza 7 & 8 & 9 \&         \endnumbering         \end{Leftside}         \begin{Rightside}         \beginnumbering         \setstanzaindents{2,0,0,0}         \stanza one & two & three \&         \stanza four & five & six \&     %   \stanza\pagebreak\&% [1] doesn't work     %   \pagebreak% [3] doesn't work too         \stanza seven & eight & nine \&         \endnumbering         \end{Rightside}         \Pages     \end{pages}     \end{document}


title: How to split subtables across multi pages?

text: \begin{table}[H]     \centering               \begin{subtable}{\textwidth}     \centering     table materials     \caption{sub table 1 }     \end{subtable}          \begin{subtable}{\textwidth}     \centering     table materials     \caption{sub table 2 }     \end{subtable}               \begin{subtable}{\textwidth}     \centering     table materials     \caption{sub table 3 }     \end{subtable}          \caption{Overall caption}     \end{table}      It always takes one whole page for a table with its subtables. So the previous page has a lot empty. So does the later page. Thank you in advance.


title: Wrapfigure apparently creating dummy space on a following page

text: ![enter image description here](http://i.stack.imgur.com/5LxKy.png)The example below is a newsletter with two news items. The first item has a wrapfigure to include a graphic. The second does not But the resulting PDF (made with PDFLaTeX) has a blank area close to the as if the second item had a graphic too. Any suggestions would be helpful. Sorry about the extensive preamble - that's direct from the full document (which has dozens of news items).               \documentclass[a4paper,10pt]{book}     \usepackage{color}     \usepackage{pdfcolmk}     \usepackage{alltt}     \usepackage{graphicx}![enter image description here][2]     \usepackage{wrapfig}     \usepackage{textcomp}     \usepackage[labelformat=empty]{caption}     \usepackage{placeins}     \usepackage{needspace}     \usepackage{makeidx}     \makeindex     \usepackage{boxedminipage}     \definecolor{gray}{RGB}{200,200,200}     \usepackage{multicol}     \usepackage{pdfpages}     \setlength{\parindent}{0pt}     \usepackage{fancyhdr}     \widowpenalty=10000     \clubpenalty=10000     \pagenumbering{roman}     \usepackage{scalefnt}     \usepackage[top=2cm, bottom=1cm, left=1.5cm, right=1.5cm]{geometry}     \pdfminorversion=5     \usepackage{hyperref}     \hypersetup{pdfpagemode=FullView, colorlinks=true,      pdfhighlight=/P,linkbordercolor=.9 1 1, linkcolor=blue, citecolor=black,pdftex}     \setlength{\parskip}{2ex}     % Different font in captions     \newcommand{\captionfonts}{\Large}     \makeatletter % Allow the use of @ in command names     \long\def\@makecaption#1#2{%     \vskip\abovecaptionskip     \sbox\@tempboxa{{\captionfonts #2}}%     \ifdim \wd\@tempboxa >\hsize     {\captionfonts #2\par}     \else     \hbox to\hsize{\hfil\box\@tempboxa\hfil}%     \fi     \vskip\belowcaptionskip}     \makeatother % Cancel the effect of \makeatletter          \usepackage[english]{babel}     \usepackage{blindtext}               \begin{document}     \pagestyle{fancy}     \fancyhead[co, ce]{\thepage{}}     \fancyhead[le ro]{Demo newsleter pages}     \fancyfoot{}     \scalefont{1.5}                                                  % Item 01     % =========================               \begingroup     \color{blue}     \subsection*{news item 1 heading}     \endgroup          \begin{wrapfigure}     {R}{0.25\textwidth}     \begin{center}         \includegraphics*[width=0.24\textwidth]{public-domain-image-01.jpg}     \caption{caption for item-01}     \end{center}     \end{wrapfigure}     \href{http://www.publicdomainpictures.net/view-image.php?image=9353&picture=sunset-on-a-california-beach&large=1}{[source of public domain image]}               \blindtext     \blindtext     \blindtext     \blindtext     \blindtext     \blindtext                                   % Item 02     % =========================          \begingroup     \color{blue}     \subsection*{news item 2}     \endgroup          \blindtext     \blindtext     \blindtext     \blindtext     \blindtext     \blindtext               \end{document}


title: Align equations inside tabular

text: How can I align equations inside tabular? I want to place few lines of equation by side of the picture. But it turns out that I cannot use \& in order to shift equals signs to be one under another.               \documentclass{article}      % Specifies the document class          \usepackage{amsmath, amsfonts, mathtools, xfrac, empheq}     \usepackage{caption}               \begin{document}       % End of preamble and beginning of text.     \begin{tabular}{l r}     \begin{minipage}{0.6\textwidth}     \begin{align}         V^\pi = E_\pi \{ R_t \mid s_t = s \} \\         = E_\pi \left \{ \sum\limits_{k=0}^\infty \gamma^k r_{t+k+1} \mid s_t = s \right \}  \notag \\         = E_\pi \left \{ r_{t+1} + \gamma \sum_{k=0}^\infty \gamma^k r_{t+k+2} \mid s_t =s \right\} \notag     \end{align}     \end{minipage}     &     \begin{minipage}{0.4\textwidth}     %\includegraphics[width=\textwidth]{olcar_L11-8}     \captionof{figure}{Backup diagram}     \end{minipage}     \end{tabular}          \end{document}      I would like it to like this: ![enter image description here](http://i.stack.imgur.com/ats7o.png)


title: Two columns of equations, aligned and just one number per column

text: I'm writing a two-column document, and I want to display two sets of large equations floating at the top. Each equation set should be aligned within the same column, and only the two top equations should be numbered. Something like this:               a = (b,c) , where        (1)    a = (b,c) , where        (2)     b = B                           b = B     c = C                           c = C      This is the best I could get:               \begin{figure*}     \begin{tabularx}{\textwidth}{@{}XX@{}}         \begin{align}             a\in(b,c) \label{eq1}, \text{where}\\             b=B \nonumber \\             c=C \nonumber         \end{align} &         \begin{align}             a\in(b,c) \label{eq1}, \text{where}\\             b=B \nonumber \\             c=C \nonumber         \end{align}      \end{tabularx}     \end{figure*}      That should have worked fine, but as you see, the two top equations have `\in` instead of `=`, so the alignment is messed up. I could just write `&\in` and `&=` below, but for some reason it seems to take that as the column separator of `tabularx`, and it won't compile. How can I make this work?


title: Fine-tuning bibliography

text: This question concerns fine-tuning a bibliography. I collected bib files (that are available for download from the source of a journal article) and put them all in a single **biblio.bib** file. Here are the files with a snippet of the biblio.bib file. **Preamble.tex**               \usepackage[natbib=true,style=authoryear,backend=bibtex8]{biblatex}     \usepackage[margin=2.54cm,top=2.54cm]{geometry}     \usepackage{amscd, amsfonts, amsmath, amssymb, amstext}     \usepackage{accents}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{epstopdf}          \addbibresource{biblio.bib}          % Used by included files to know they     % are NOT standalone     \usepackage{ifthen}     \newboolean{standaloneFlag}     \setboolean{standaloneFlag}{true}          %% Command to conditionally typeset a bibliography.     \newcommand{\standaloneBib}{%%       \ifthenelse{\boolean{standaloneFlag}}%%                  {\printbibliography}{}}       **Master.tex**               \documentclass[12pt]{report}     \usepackage{standalone}     \input{preamble}     \begin{document}          \setboolean{standaloneFlag}{false}          \input{indiv1}     \input{indiv2}          \printbibliography     \end{document}      **Indiv1.tex**                   \documentclass[12pt]{report}         \usepackage{standalone}         \input{preamble}              \begin{document}                   \chapter{Solving \citeauthor{GreenwoodAER1988}\citeyearpar{GreenwoodAER1988} using Linear Quadratic Approximation}              \end{document}      **Indiv2.tex**               \documentclass[12pt]{report}     \usepackage{standalone}     \input{preamble}     \begin{document}     \chapter{Solving \citeauthor{KKR2008}\citeyearpar{KKR2008}}          \standaloneBib     \end{document}       **biblio.bib**               @article{Azzimonti20091662,         title = "Distortionary taxes and public investment when government promises are not enforceable",         journal = "Journal of Economic Dynamics and Control",         volume = "33",         number = "9",         pages = "1662 - 1681",         year = "2009",         note = "",         issn = "0165-1889",         doi = "10.1016/j.jedc.2009.03.003",         url = "http://www.sciencedirect.com/science/article/pii/S0165188909000633",         author = "Marina Azzimonti and Pierre-Daniel Sarte and Jorge Soares",         keywords = "Public investment",         keywords = "Commitment",         keywords = "Time consistency",         keywords = "Discretion",         keywords = "Ramsey",         keywords = "Markov-perfect"         }                   @book{Bellman1957,                  author = "Bellman, Richard E.",             title = "Dynamic Programming",             url = "http://press.princeton.edu/titles/9234.html",             publisher = "Princeton University Press",             address = "Princeton, N.J.",             year = "1957",             ISBN = "9780691146683",             keyword = "Dynamic programming"             }                        @book{Diaz-GimenezOUP99,             author = "Javier Díaz-Giménez",             title = "Linear Quadratic Approximations: An Introduction",             chapter = "2",             pages = "13 - 29",             year = "1999",             publisher = "Oxford University Press",             address = "Oxford",             url = "http://www.oxfordscholarship.com/10.1093/0199248273.001.0001/acprof-9780199248278-chapter-2"             keyword=""             }                       @article{GreenwoodAER1988,                  jstor_articletype = {research-article},                  title = {Investment, Capacity Utilization, and the Real Business Cycle},                  author = {Greenwood, Jeremy and Hercowitz, Zvi and Huffman, Gregory W.},                  journal = {The American Economic Review},                  jstor_issuetitle = {},                  volume = {78},                  number = {3},                  jstor_formatteddate = {Jun., 1988},                  pages = {pp. 402-417},                  url = {http://www.jstor.org/stable/1809141},                  ISSN = {00028282},                  year = {1988},                  publisher = {American Economic Association},                  copyright = {Copyright © 1988 American Economic Association},                 }                       @article{HansenPrescott92,             title = "Recursive Methods for Computing Equilibria of Business Cycle Models",             journal = "FRB Minneapolis Discussion Paper",             volume = "",             number = "36",             pages = "",             year = "1992",             note = "",             issn = "",             doi = "",             url = "http://www.minneapolisfed.org/publications_papers/pub_display.cfm?id=35",             author = "Gary D. Hansen and Edward C. Prescott",             keywords = "",             keywords = ""             }              @ARTICLE{KKR2008,           author = {Klein, Paul and Krusell, Per and Rios-Rull, Jose-Victor},           title = {Time-Consistent Public Policy},           journal = {Review of Economic Studies},           year = {2008},           volume = {75},           pages = {789--808},           number = {3},           doi = {10.1111/j.1467-937X.2008.00491.x},           issn = {1467-937X},           publisher = {Blackwell Publishing Ltd},           url = {http://dx.doi.org/10.1111/j.1467-937X.2008.00491.x}         }              @article{Prescott98,             title = "Business Cycle Research: Methods and Problems",             journal = "FRB Minneapolis Discussion Paper",             volume = "",             number = "590",             pages = "",             year = "1998",             note = "",             issn = "",             doi = "",             url = "http://www.minneapolisfed.org/publications_papers/pub_display.cfm?id=761",             author = "Edward C. Prescott"             }      However, as you can see, the information provided in bib file by various journals are different from each other. The style also varies - {} and "" are used. I want to know whether "I can specify what information to be included in the appendix (after typesetting). I don't want to edit the bib files that I get from sources, if possible."


title: Line numbering in algorithmic

text: I want to change the first number of the line numbering in my algorithm, but how is it done? This is my example:               \documentclass[12pt]{beamer}     \usepackage{amsmath, amsfonts, amssymb, amsthm}     \usepackage{algorithmic, algorithm}     \usepackage{float}     \renewcommand\thealgorithm{}              \begin{document}         \begin{frame}[t, fragile]         \frametitle{...}            \begin{algorithm}[H]            \caption{...}            \begin{algorithmic}[1]               \STATE ...            \end{algorithmic}            \end{algorithm}         \end{frame}         \end{document}      The first state should be numbered with 2 for example.


title: Using a command defined with \newcommand prevents subsequent characters from being printed

text: I have the following command defined in a LaTeX document:               \newcommand{\citeme}[1]{\hl{[citation]}}      where `\hl` is a command that highlights the text in its arguments from the `soul` package. The purpose of using the command I defined above is to render a text that reminds me that I need to add a citation to the text. E.g.               Hello world \citeme Hello again \citeme       results in the following: ![enter image description here](http://i.stack.imgur.com/GE2ie.png) The problem is that, as you can see, the letter `H` from the second `Hello` is missing. Why does that happen? How can I make sure I get the characters following my command printed?


title: What style is this thesis?

text: Does anyone know how to reproduce the headers and the chapter/section styles of this thesis? http://www.stat.washington.edu/~ebfox/publications/ebfox_thesis.pdf To be more specific, how does one achieve the following. a) The double line horizontal line below Chapter 1 (for example), followed by the thicker horizontal in the header with the chapter or section name above it in the following pages. b) The nice squares before (sub)section names such as "1.1.1 Chapter Background". c) The enlarged first letter of each chapter. Below is an image from a page taken from the thesis that shows b) and the second part of a). ![enter image description here](http://i.stack.imgur.com/Saw1h.png)


title: How to display every 4th row in a large data file using pgfplotstable?

text: **Question:** I am trying to select certain rows, similar to this question Selecting rows to be displayed with pgfplotstable, however I am not sure how I would go about doing it. I want to display only every 4th row. Something like `skip rows between index` but more automated than that (the file is fairly long). I have attempted to use the code below code, but I am at a loss as to how I would output only every 4th row (starting from 1 (ie: 1, 5, 9, etc). I assume some type of math operator would work, but how?               \documentclass{standalone}     \usepackage{pgfplotstable}     \begin{document}     \pgfplotstableread{      obs      number       1         2       2         5       3         3       4         2       5         4       6         1       7         2       8         5       9         3       10        2       11        4       12        1     }\loadedtable     \pgfplotstabletypeset[       row predicate/.code={%         \pgfplotstablegetelem{#1}{obs}\of{\loadedtable}         \ifnum\pgfplotsretval=??\relax %Use some seq operator?           \else\pgfplotstableuserowfalse         \fi}     ]{\loadedtable}     \end{document}


title: Section name on the right hand sides (odd numbered)

text: Here are the command lines that appear in the preamble of a book manuscript:               \pagestyle{fancy}     \lhead{\nouppercase{\rightmark}}     \rhead{\nouppercase{\leftmark}}     \renewcommand{\chaptermark}[1]{%     \markboth{\chaptername     \ \thechapter.\ \  #1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \fancyhead[LE,RO]{\rm\thepage}     \fancyhead[LO]{\bfseries\rightmark}     \fancyhead[RE]{\bfseries\leftmark}      It is supposed to give me section on the right-hand sides and the chapter on the left hand sides. I get the chapter on both sides. Can anyone help? I tried to play around with the last two lines; no matter what I do (`\fancyhead[LO]{\bfseries\leftmark}` or `\fancyhead[RE]{\bfseries\rightmark}`) I get the same. Can anyone help? June 3: I am sorry to have bothered anyone. The problem was hidden in a file included further on. It works fine now.


title: Getting the filename of the current input from within "show_error_hook"

text: In the luatex reference guide, `status.filename` is described to return "the name of the current input file". The luatex wiki describes how to use this along with `show_error_hook` to produce better error messages that include the correct filename. However, I have found that `status.filename` always states the name of the main input file. For example, given the file `main.tex`:               \documentclass{article}          \usepackage{luacode}          % Better error output.     \begin{luacode}         luatexbase.add_to_callback("show_error_hook",           function ()             texio.write_nl("Previous error location: " .. status.filename .. ":" .. status.linenumber)           end,           "Machine-readable error message", 1)     \end{luacode}          \begin{document}          \input{apple.tex}          \end{document}      And a second file `apple.tex`:               \par Misplaced item: \item \par      Running with `lualatex main.tex`, I receive the following error:               ! LaTeX Error: Lonely \item--perhaps a missing list environment.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.     Previous error location: ./main.tex:1      That is, the line number is correct for the error, but the filename states `main.tex` and not `apple.tex`, as I would expect. How do I correctly get the name of the current input file from within `show_error_hook`?


title: Long twoheadrightarrow

text: Is it possible to have a **LONG** twoheadrightarrow? There exists `\longrightarrow` and `\longmapsto`, but is there also a long version of the `\twoheadrightarrow`?


title: Suppressing the retrieval date in biblatex-apa

text: I was wondering why `biblatex-apa` was not suppressing the `urldate` from being printed. So I looked around and I found the question Odd date output from biblatex-apa, but found out that it was more about the format of the date. The American Psychological Association style manual states that > "Do not include retrieval dates unless the source material may change over > time (e.g., Wikis)" (American Psychological Association, 2010, p. 192) **Question:** How do I suppress the retrieval date from being printed (unless perhaps I am citing a wiki)? `bibliography.bib`:               @article{myers,     author = {Scott W. Myers and Michael Ballweg and John L. Wedberg},     title = {Assessing the impact of {European} corn borer on corn grown for silage},     url = {http://www.uwex.edu/ces/crops/uwforage/ECB.htm},     urldate = {2013-07-09},     journaltitle = {Focus on Forage},     volume = {3},     issue = {4},     organization = {University of Wisconsin Wisconsin Team Forage},     keywords = {jared},     }      `sample.tex`:               \documentclass[preview,border=5]{standalone}          \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa, backend=biber]{biblatex}     \DeclareLanguageMapping{american}{american-apa}     \addbibresource{bibliography.bib}          \begin{document}          \nocite{*}     \printbibliography          \section*{Desired output:}          \begin{minipage}{\linewidth}     \hangindent=24pt     Myers, S. W., Ballweg, M., \& Wedberg, J. L. (n.d.).      Assessing the impact of European corn borer on corn grown for silage.      \emph{Focus on Forage, 3}.      Retrieved from \url{http://www.uwex.edu/ces/crops/uwforage/ECB.htm}     \end{minipage}          \end{document}      ![enter image description here](http://i.stack.imgur.com/puUUU.png) I know that I can manually delete `urldate` from my entry in the `bib` file but I would rather not do that as I use the same file when working with other citation styles.


title: Error in align environment - runaway argument?

text: > **Possible Duplicate:**   >  Blank lines in align environment               \documentclass[12pt,a4paper]{article}     \usepackage[version=3]{mhchem}     \usepackage{siunitx}          \begin{document}     \begin{align*}      \ce{K_a} & = \frac{\ce{[H3O+][A^-]}}{\ce{[HA]}} \\          \end{align*}     \end{document}      gives                Runaway argument?      \ce {K_a} & = \frac {\ce {[H3O+][A^-]}}{\ce {[HA]}} \\      ! Paragraph ended before \align* was complete.     <to be read again>                         \par      l.8       ?


title: Align Environment and Spacing

text: > **Possible Duplicate:**   >  Blank lines in align environment When I put a blank line between a line of text and the `align` environment, it will add two blank lines instead. It seems that the `align` environment automatically adds a set of blank lines. I don't want two sets of blank lines, but this makes my code very hard to read. Compare (the 'correct way')               \begin{align*}     L\frac{di}{dt} + Ri = EU(t) \\     i(0) = 0     \end{align*}     In Heaviside's operator notation, this is      \begin{align*}     pLi + Ri &= EU(t)\\     i &= \frac{E}{pL + R}U(t)     \end{align*}      and               \begin{align*}     L\frac{di}{dt} + Ri = EU(t) \\     i(0) = 0     \end{align*}          In Heaviside's operator notation, this is           \begin{align*}     pLi + Ri &= EU(t)\\     i &= \frac{E}{pL + R}U(t)     \end{align*}      This may seem trivial but in a large document it's really hard to read the first example and relatively easy to read the second. Is there a way to change this, e.g. with a `\renewcommand`? By the way, is there an easier way of putting code on this site besides hitting space bar 4 times for each line? I tried HTML tags but they don't work.


title: Why does an extra line of space before \end{align} throw up an error?

text: I often add extra spaces in my TeX file for readability, and I find this error cropping up whenever there is an empty line before `\end{align}`. What is the reason for the error and is there a way to alleviate this?


title: Why is my macro not expanded inside of \special{...}?

text: I am writing my first LaTeX/TeX macro and not going anywhere with it. Could you please tell me what I am doing wrong in the code below. I have the following definitions.               \def\defcolor#1#2{%        \expandafter\def\csname #1\endcsname{#2}}          \def\colortext#1#2{%        \special{ts: text fillcolor \csname#1\endcsname}{#2}%     }      I use them in my LaTeX file as follows:               \defcolor{red}{1.0,0.0,0.0}      Now when I use `\red` I see 1.0,0.0,0.0 in the text. Which is what I am expecting and happy to see! The problem is the `\colortext` command. When I call the `\colortext` command like the following               \colortext{red}{sometext}      I see the following output in my .dvi file               ts: text fillcolor \red      Instead of what I want               ts: text fillcolor 1.0,0.0,0.0      The `\red` macro is not getting expanded inside the replacement text of the `\colortext` macro. How do I fix this problem?


title: How can I shift an {itemize} list to the right?

text: I am making an `{itemize}` list whose labels are so wide that they stick into the left margin:               \begin{itemize}       \item[(MPT1)]...       \item[(MPT2)]...       \item[(MPT3)]...       \end{itemize}      How can I shift the entire list to the right to prevent this from happening?


title: How to get more information to the y-axis, and a grid to the background

text: I need a grid in the background and more values on the y-axis. Can you help me out?               \begin{tikzpicture}     \begin{axis}[width=14cm,height=6cm,title={Entwicklung},ylabel={Wachstum in Prozent},         symbolic x coords={a,b,c,d,e},         xtick=data]         \addplot[ybar,fill=blue] coordinates {             (a,61.5)             (b,-9.8)             (c,-27.6)                   (d,-14.7)                   (e,3.2)                         };     \end{axis}     \end{tikzpicture}


title: want to make table in latex command

text: to make my cv, to give educational information in a table with box box, I have used this               \begin{document}       \begin{tikzpicture}         \draw[help lines] (-5,0) grid (4,4);                           \end{tikzpicture}      and got ![nnnn](http://i.stack.imgur.com/6pEQc.png) but I want to write my university name marks etc etc inside those boxes and I want to make bit wider boxes, I want proper latex commands for such table .. thank you for helping.


title: Referring to dates other than \today

text: Is there a package that allows one to work with dates in the following way: just as `\date` shows today's date, I would like to have a command that dates the document 7 days from today. Also, since I would like to use this as a template, I do not want to manually enter the dates myself. Is this possible?


title: Error from IJCA journal Referencing

text: please am writing a conference paper for IJCA. But I notice i can reference successfully using BibTeX, am getting some errors. And the line of bibliography isn't coming. Please can any body help with that BIBTEX, which is easily invoked via \begin{verbatim} \bibliographystyle{ijcaArticle} \bibliography{damiTex} \end{verbatim} where the damiTex is a jab-ref folder containing a list of my references. cant invoke or call it.


title: Background image used for a whole section/chapter at once

text: I've seen a few examples with `\BgThisPage` being used to specify a background image for 1 single page (or another command to set one for ALL pages at once). Those two extremes are the only options I have found. In total it means that you set the background image only when you have written the document as else it can change where each page is (if you don't want the background image on EVERY page that is). Is there any way to make it so that the background image is displayed for all pages that belong to a specific section (or chapter) without having to wait for defining it till the document is finished (thus not defining it on a per page base that the specific page has a background image)?               \documentclass{article}     \usepackage{graphicx}     \usepackage[pages=some]{background}          \backgroundsetup{       scale=1,       angle=0,       opacity=0.7,       contents={         \includegraphics[width=\textwidth,height=4cm]{example-image-a}}     }          \begin{document}     \section{mysection}     \BgThispage     Mypage      \end{document}


title: Remove Marginpar from Classicthesis 4.1

text: I am searching for a safe method to remove the `\marginpar` feature in classicthesis. My corrector would rather have the text use the whole page. I am not that firm in LaTeX, so I tried to simply remove all occurrences/command references, but this only messes with the layout of the margin-notes. I found this answer, which moves the chapter number into the title. I would appreciate the help


title: How to change the font size in modified class

text: I have made a new class(called 'newclass') by loading class article using               \LoadClass{article}       However, the font size is very small (perhaps 10pt). How can I change it to at least `12pt`. I have tried using               \LoadClassWithOptions[12pt]{article}      but it does not work. I also used               \documentclass[12pt]{newclass}       in my document but it does not work. Any solutions?


title: LaTexTools stops compiling in Sublime Text

text: I have been using LaTexTools for a while, and it works fine. After installing the public beta of Yosemite, Sublime Text + LatexTools stops working: the `build` command brings up output window showing NO errors:               [Compiling /Users/.../sometexfile.tex]          TraditionalBuilder: Invoking latexmk... done.          No errors. Warnings:      It generates `.aux` and `fdb_latexmk` files, but not others, including PDF. TexShop works fine, and if I compile with TexShop to generate a PDF, the forward/backward sync works in Sublime Text + Skim. I wonder is there any fix?


title: Replace tag inbetween parentheses in eps with psfrag/chemnum

text: ## Question Is it possible to replace the `TMP1` inbetween some parentheses (or other symbols and text) with chemnum? ## Examples The following shows the input ( _eps_ ; left), and the output ( _compiled file_ ; right): ![enter image description here](http://i.stack.imgur.com/uZ4TV.png) Maybe also used like this, as often seen in journals: ![enter image description here](http://i.stack.imgur.com/7l4Ee.png)


title: \printglossaries is not generating anything for me

text: I'm using the `glossaries` package with MikTeX 2.9 (using TeXnicCenter as my editor) and my document is setup as follows:               \documentclass[ebook,11pt,openany]{memoir}     \usepackage{color}     \usepackage{graphicx}      \usepackage[toc]{glossaries}     \usepackage{float}     \usepackage[scaled]{berasans}     \usepackage[T1]{fontenc}     \usepackage{type1cm}     \usepackage{eso-pic}     \usepackage{mystyle}          \author{...}      \title{...}          \makeatletter       \AddToShipoutPicture{         \setlength{\@tempdimb}{.5\paperwidth}         \setlength{\@tempdimc}{.5\paperheight}         \setlength{\unitlength}{1pt}         \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){           \makebox(0,0){\rotatebox{55}{\textcolor[gray]{0.85}             {\fontsize{5cm}{5cm}\selectfont{DRAFT}}}}         }       }     \makeatother          \setcounter{tocdepth}{2}     \makeglossaries     \include{glossary}          \begin{document}     \maketitle          \frontmatter     \include{dedication}     \tableofcontents          \mainmatter     \include{introduction}     \include{chaptr1}     ...     \backmatter      \printglossaries          \end{document}      Unfortunately, when I generate my document my PDF doesn't contain a glossary at all. Here's a quick snippet from my glossary file:               \newglossaryentry{entry}     {       name={entry},       description={my entry description.}     }      I'm also referencing the glossary entry from my `chaptr1.tex` file, which is included above, using the `\gls{entry}` command. I'm not seeing any errors in my build output, so I'm not sure what's going on. Any help would be appreciated.


title: Custom bibliography and footcite styles

text: I use the following packages with the document class `article`:               \usepackage[utf8]{inputenc}     \usepackage{tocloft}     \usepackage[citestyle=authortitle,bibstyle=numeric,url=true,isbn=false,backend=biber,sorting=nyt]{biblatex}     \usepackage[hang]{footmisc}      I have very strict rules for my project thesis, especially about the bibliography and footnotes. I read I can adapt the `.bbx` files to achieve custom styles, however, I don't understand those. These are my requirements:   * **Bibliography (sorted by last name)** :      * Books: Last, First. Year. Title. Subtitle (edition). Publisher.     * Online: Last, First. Year/Date. Title. Subtitle. Accessed on Date at URL.     * Incollection: Last, First. Year. Title. Subtitle. In Editor (some static text here), Booktitle (S. Page numbers). Publisher.   * **Footnotes (and`\cite` in footnotes?)**:      * First reference to book on page: Last name, Year, Title(, S. Page)     * Additional references to the same item on the same page: Last, Year(, S. Page) **A numbered bibliography is not required.** How could I achieve this? The `numeric` bibstyle comes close to what I want, except from details such as the order of information and the separating dots. **Update** : Here is a MWE (not too small to cover all requirements):               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage{tocloft}     \usepackage[citestyle=authortitle,bibstyle=numeric,url=true,isbn=false,backend=biber,sorting=nyt]{biblatex}     \usepackage[hang]{footmisc}          % ===============================     % JUST AN EXAMPLE BIBLIOGRAPHY DB     % ===============================     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @book{book2009,       author = "John Doe",       title = "A friendly word to the world",       subtitle = "A book with a subtitle",       year = 2009,       publisher = "Great Publisher"     }     @book{book2011,       author = "Jane Foo",       title = "A great book with a terrible title",       % No subtitle       year = 2011,       publisher = "Awesome Inc."     }     @online{online2012,       author = "Bar Baz",       title = "Hang on, I'll get you",       % No subtitle       year = 2012,       url = "http://example.com",       urldate = "2014-04-21"     }     @online{online2014,       author = "Michael Smith",       title = "Wait for Smith",       subtitle = "It's okay",       year = 2014,       url = "http://foo.example.com",       urldate = "2014-04-21"     }     \end{filecontents}     % ===============================          \bibliography{\jobname.bib}          \begin{document}     % TOC etc.          % CONTENTS     \section{First chapter}          It\footcite[38]{book2009} was\footcite{online2014} a\footcite[234]{book2009} sunny\footcite{online2012} day\footcite{book2009} when I noticed\footcite{book2011} it.          % BIBLIOGRAPHY     \clearpage     \section{Bibliography}     \printbibliography[heading=none]          % LOF etc.     \end{document}


title: Block matrix equation with dimensioning

text: I need to write following matrix equation in LaTex![enter image description here](http://i.stack.imgur.com/Iql2b.png). The dotted lines shown need to be present in the structure but need not have colors (could as well be black). I have used it here only to show the alignment needed. I also need to have the dimensions specified for various blocks as shown. What's the best way to do it?


title: Placing a figure that occupies 2 columns

text: Thanks for reading my thread. I have a two-columned IEEE format journal latex, and I want to insert a wide figure. Here is my code               \begin{figure*}[ht!]       \centering          \begin{overpic}{profiles.eps}          \put(40,35){\includegraphics[scale=0.12]{pline.png}}         \end{overpic}     \caption{MyCaption}     \label{fig_index}     \end{figure*}      The simplied version is not working either:               \begin{figure*}[ht!]       \centering        \includegraphics[scale=0.35]{profiles.eps}     \caption{MyCaption}     \label{fig_index}     \end{figure*}      Here is the packages I am using:               \documentclass[journal,transmag]{IEEEtran}     \usepackage[cmex10]{amsmath}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{caption}     \usepackage{amssymb,amsmath}     \usepackage{siunitx}     \usepackage{rotating}     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage{array}     \usepackage{eqparbox}     \usepackage[percent]{overpic}     \usepackage{lipsum}     \usepackage{multicol}     \usepackage{etoolbox}     \sisetup{output-exponent-marker=\textsc{e}}      The problem I have is the figure does grow to two-column wide, but it moves all the way down to the end of the document. I tried removing the overlayed image, but it does not work at all. Anyone have any idea how I can make it work? This my first latex work, so I appreciate if you can paste some code I can read. Thanks!


title: Duplicate typeset index entries

text: I want to have an index entry typeset as `$a_\text{T}$`, so I issue the command `\index{at@$a_\text{T}$}`. Each use of this index command creates a separate line in the index. How can I get `\makeindex` to recognize they all reference the same topic? My index entries look like this: ![enter image description here](http://i.stack.imgur.com/j0v7l.png)


title: Beamer: uncover, overlay, pause not working

text: I am trying to do a Beamer presentation with some `uncover` features, but it turns out that `uncover`, `overlay` and `pause` are not working. Just the `only` command works. If I compile the following example, just the `only` command will produce different output slides, the other commands produce 3 slides with exactly the same content: all the text, not uncovered at all.               \documentclass{beamer}          \begin{document}     \begin{frame}     \frametitle{onslide}     \begin{overprint}     \onslide<+->{\begin{block}{block 1}        block 1     \end{block}}     \onslide<+->{\begin{block}{block 2}        block 2      \end{block}}     \onslide<+->{\begin{block}{block 3}        block 3      \end{block}}      \end{overprint}      \end{frame}           \begin{frame}      \frametitle{only}      \only<1>{\begin{block}{block 1}        block 1      \end{block}}      \only<2>{\begin{block}{block 2}        block 2      \end{block}}      \only<3>{\begin{block}{block 3}        block 3      \end{block}}      \end{frame}           \begin{frame}      \frametitle{pause}      \begin{block}{block 1}        block 1      \end{block}\pause      \begin{block}{block 2}        block 2      \end{block}\pause      \begin{block}{block 3}        block 3      \end{block}      \end{frame}           \begin{frame}      \frametitle{uncover}            \uncover<+->{\begin{block}{block 1}        block 1      \end{block}}      \uncover<+->{\begin{block}{block 2}        block 2      \end{block}}      \uncover<+->{\begin{block}{block 3}        block 3      \end{block}}           \end{frame}      \end{document}      Do you know what I am doing wrong? Can it be my Beamer version?


title: Position of figure in a new page

text: Writing my thesis, I have to put an image in a new page, but it is always in the middle of the page, and I want it on the top. To insert the image I use               \begin{figure}[t]     \centering     \hspace*{-2.0cm} \includegraphics[scale=0.5] {img.png}     \caption{text}     \label{fig:text}     \end{figure}      using the `graphicx` package and `book` as `\documentclass`.


title: How to prevent a list being split (at the page break) by a figure

text: I have a series of lists in my document, which sometimes go over page (which I want). How can I prevent a figure to appear at the top of the page of a continues list? This makes the list quite hard to read afterwards. I tried the solution provided here. However there is not much space between figure placement and the next list, and thus putting `\FloatBarrier` will essentially place the figure on the place where I included the figure and thus leave on the previous page empty space below the text as the remaining space is too small for the figure. Is there and option to prevent the figure to be places within the list, but anywhere before or after is fine? The example below give the mentioned interrupted list.               \documentclass[a4paper,11pt,twoside]{book}     \usepackage{graphicx}          \newenvironment{plist}[1][1.5cm]{%     \list{}{     \def\makelabel##1{##1\hfill}%     \parsep 0pt     \itemsep 0pt     \labelsep0pt     \labelwidth#1\relax     \leftmargin\labelwidth     \itemindent0pt      }} {\endlist}          \begin{document}          text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text texttext text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text          \begin{equation}     x=y     \end{equation}     \begin{plist}       \item[where:] $x$ -- xxxx,       \item $y$ -- yyyy     \end{plist}     text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text     \begin{figure}[htp]     \centering     \includegraphics[width=0.9\textwidth]{figure.eps}     \caption{text text text text text text text text text text text text     text text text text text text text text text text text text}     \end{figure}     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text          text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text text text text text text text text text text text text     text text     \begin{equation}     a=b+c+d     \end{equation}     \begin{plist}       \item[where:] $a$ -- aaaaaaaaaaaaaaaa,        \item $b$ -- bbbbbb,        \item $c$ -- cccccccccc, and        \item $d$ -- dddddddddddd     \end{plist}     text text text text text text text text text text text text     text text text text text text text text text text text text          \end{document}


title: How to scale/resize a box in plain TeX?

text: How can I resize (anamorphically) the contents of a box in plain TeX, that is, give it new width, height and depth?               \setbox0=\hbox{Hello!}     \copy0 % output at orig. size          %     % code which resizes box 0     % ...      %          \box0  % output with altered dimensions     \bye


title: ┓- shaped figure and caption

text: I have a (float) figure that has a ┓-shape, that is there is a huge blank square at the bottom left. ![enter image description here](http://i.stack.imgur.com/k7HvN.png) I'd like to put in this blank the caption of the figure. Is there a way? My class loads `caption` and `floatrow` packages, so I need something that works with `floatrow`.


title: Verbatim Linebreaks

text: I would like to enable automatic line breaking in `Verbatim` environment; besides I do not want to use `lstlisting` as it will not have exactly the same font shapes as `Verbatim` and some other special characters used in Logic Programming like `\\+` does not show the same. I should only use `Verbatim` environment but it seems that the option of line breaking is not available. `fancyvrb` also doesn't work as we need to know when we want the line to break. I need this to be automatic.


title: arrow style with arrows.meta library

text: I'm ready to style arrows using `arrows.meta` library, though I haven't found any documentation with predefined arrow styles syntax. The only one I know is `Stealth`:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows.meta}     \begin{document}          \begin{tikzpicture}     \draw[black,step=1cm,thin] (0,0) grid (6,6);     \draw[-{>[scale=1.3,red,length=5mm,width=2mm]]},semithick] (0,1) -- (6,1);     \draw[-{Stealth[scale=1.3]},semithick] (0,1) -- (6,1);     \end{tikzpicture}      I'm seeking for `angle 45` or `angle 60` arrow tips used in `arrows.meta`.


title: How to automatically draw a graph in LaTeX

text: clarification: when I say "graph", I mean the computer science term. I want to draw a full binary tree of `h` height. It means that there's one root with two sons, each son has two sons and so forth. Is there a way to make LaTeX (with tikZ for example, but any other way will do) draw a full binary tree of a given `h` height without manually drawing each node? This should also allow me to write on the edges and on the leaves. Thanks.


title: How to add a picture to fancyhdr *header* (and align in the top right)?

text: In the MWE below, the blue square aligns according to plan, whereas the dummy- image doesn't, see screenshots below. How to re-code so that the dummy-image "A" is aligned like the blue square?               \documentclass[a4paper]{article}          \usepackage{graphicx}          \usepackage{fancyhdr}     \pagestyle{fancy}          \usepackage{xcolor}          \usepackage{lipsum}          % \rhead{{\color{blue}\rule{1cm}{1cm}}}          \rhead{\begin{picture}(0,0) \put(0,0){\includegraphics[width=1cm]{example-image-a}} \end{picture}}          % \rhead{\begin{picture}(3,3) \put(3,3){\includegraphics[width=1cm]{example-image-a}} \end{picture}}          \begin{document}          \lipsum          \end{document}      !["A" outside](http://i.stack.imgur.com/YT2tt.png) ![blue square inside](http://i.stack.imgur.com/sIlat.png)


title: How do I get multiple ToC entries in the same line?

text: I need that, in the ToC, all the `\paragraph` references appear in the same line, like.               1 First Chapter................................................1      1.1 First Section.............................................1        One paragraph 1, Another § 3, One more § 4      1.2 Second Section.......................................7        § in sec. two 7, Another § in sec. two 11      And so on… I'm using the `memoir` class, which, in its manual, actually uses this for its subsections, but don't explain how to do it.


title: Why does bibtex not compile?

text: I have added the bib file refs.bib to the directory but I get errors indicating that the references are undefined. foo.tex:               \documentclass[10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{natbib}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{fullpage}     \setcounter{secnumdepth}{2}     \date{}     \title{The Database Users Guide}     \author{Me}     \begin{document}     \maketitle      %...document body     \ref{author2000}          \bibliographystyle{plainnat}     \bibliography{refs}          %... some figures and tables     \end{document}      refs.bib:               @article{author2000,     author = {someone},     journal = {Journal},     number = {1},     pages = {1--2},     title = {{Title}},     volume = {4},     year = {2000}     }


Can I compile .tex to .html from within AUCTeX? What are the keybindings? Thanks!


title: How can I get the chapter number like a prefix of all references

text: This was the problem I posted: "I need to output "see section 2.3" where the referenced section is the third on the second chapter." You all are right. I've to redefine the problem. Sections are referenced in a lot of distinct places:   * In table of contents. Managed by `\tableofcontents`   * In minitocs. Managed by `minitoc` package   * In headers. Managed by `fancyhdr` package   * Like a leader section. Managed by `\section`   * In text. Managed by `\ref` In tocs and minitocs, because each section appears below its chapter (with some indentation) it's not necessary to prefix the section number with the chapter number. The label scope is local; so I need a local renderization. Example:                                 1. Chapter One ------------------1                            1. First section -----------1                            2. Second section ----------3                        2. Chapter Two -----------------5                            1. First section ...........5      This means that sections 1.1 and 2.1 must be rendered as section 1. When we use the `\section` command we know what chapter we are in: it's shown in the headers of the page. So I want also local scope:                            1. First section                            bla bla                  2. Second section                            bla bla      In headers I want global scope:                            1. Chapter One                      1.1. First section      In text we can make a crossreference to whatever point of text. So we need global scope:                               See section 1.1 (first section in first chapter)      This is the problem: The default behavoir give as global scope every where. But if I redefine `\thesection` to local scope, then I redefine everywhere. This is my code:               \documentclass[catalan]{book}     \usepackage{fancyhdr}     \usepackage{nameref}     \usepackage{minitoc}     \usepackage{hyperref}          \makeindex     \dominitoc          %\renewcommand{\thesection}{\arabic{section}}          \renewcommand{\chaptermark}[1]{\markboth{\thechapter\ #1}{}}     \renewcommand{\sectionmark}[1]{\markboth{\thechapter.\thesection\ \ #1}}          \fancyhead{}     \fancyhead[LO]{\leftmark}     \fancyhead[RE]{\thechapter.\rightmark}          \pagestyle{fancy}          \begin{document}     \tableofcontents          \chapter{One}          \minitoc[e]          \section{First section}\label{sec:A}          aaaaaa \newpage bbbbbbbb \newpage ccccccccccc          \chapter{Two}          \minitoc[e]          \section{Second section}\label{sec:B}          See sections \ref{sec:A} and  \ref{sec:B}          \end{document}


title: Set biblatex aux file name

text: I am using `biblatex` with `refsection=chapter`. That results in aux files named according to this pattern, assuming a source file called `book.tex` for a book of `n` chapters:               book1-blx.aux     book2-blx.aux     ...     bookn-blx.aux      Is there a hook to change that name? I need to associate the aux file to its corresponding chapter (these files are used in other processes) For example:               book_chaplabel-blx.aux      I think I can add a hook inside the `include` command so I can grab the chapter file name, but I don't know where to hook it up to the generated aux file name. EDITING for clarity: It may be that trying to substitute the chaptername in for the integer isn't the right way to solve the problem. The main thing is that I need a way to associate the aux file with the chapter it came from. I must post-process the bbl files and aux files for each chapter. The post-processed files are used in a different workflow (epub/docbook generation).


title: Optical weight selection with fontspec

text: I'm using LuaTeX version 0.76 and fontspec version 2.3c. I have the full family of MinionPro, but fontspec seems not to choose the appropriate optical weight. While it works for the roman font of Latin Modern, it even seems not to work with e.g. small capitals (but then, I don't know for sure if this is available with Latin Modern). The SizeFeatures feature of fontspec seems not to work either. MWE:               \documentclass{scrreprt}          \usepackage{fontspec}%          %\setmainfont[%     %%SizeFeatures = {%     %%{Size =     -8.41, OpticalSize = 8},%     %%{Size = 8.41-13.1, OpticalSize = 11},%     %%{Size = 13.1-20.0, OpticalSize = 19},%     %%{Size = 20.0-,     OpticalSize = 72,  Font = Minion Pro Disp}},% -- Doesn't work either     %Numbers={OldStyle,Proportional},%     %Ligatures={Common, TeX, Contextual},%     %SmallCapsFeatures={Renderer=Basic}%     %]{Minion Pro}          \begin{document}     \noindent\textsc{Optical weight}\\     \scalebox{0.44}{\Huge\textsc{Optical weight}}     \end{document}      Is there a workaround to get the correct optical weights? Thanks in advance! **EDIT:** More information: https://www.dropbox.com/s/54efhdo6nl56lcv/ltx- fontspec-optical-size-3.pdf


title: Formula reproduction in latex

text: This is the formula I'd like to reproduce: ![To be reproduced](http://i.stack.imgur.com/z26bl.jpg) And here is my poorly working MWE:               \documentclass{book}     \usepackage{amsmath}     \usepackage{fixltx2e}     \usepackage[english]{babel}     \usepackage[bitstream-charter]{mathdesign}     \usepackage[T1]{fontenc}           \begin{document}          \begin{equation}     G_i(d) = \displaystyle\frac{\displaystyle\sum_j w_{ij} (d) x_j - W_i\bar{x}(i)}      {s(i)\{[(n - 1) S_{1i} - W_i^2]}}/{{(n - 2)}^{1/2}}, j\neq i.     \end{equation}          \end{document}      Any help is appreciated.


title: Plot marks filled and drawn, but not the path

text: Is it possible to have it so that the plot marks would be filled and drawn, but the actual path wouldn't be drawn? Here is example where it is otherwise the way I'd like, except those dots' should be filled with white:               \input tikz     \usetikzlibrary{shapes.geometric,plotmarks,scopes}     \tikzpicture[bend right, out=60, in=120, max distance=1.5cm]       \foreach \x in {1,...,8} {         \coordinate (n\x) at (\x,0);       }       \draw (n1) to (n3) to (n5) to (n7) to (n1);       \draw (n8) to (n6) to (n4) to (n2) to (n8);       \path plot[fill=white,draw=black,mark=*]         coordinates{(1,0) (2,0) (3,0) (4,0) (5,0) (6,0) (7,0) (8,0)};     \endtikzpicture      ![enter image description here](http://i.stack.imgur.com/oW8Qy.png) And here the dots are the way I would like, but the path is (of course) drawn:               \input tikz     \usetikzlibrary{shapes.geometric,plotmarks,scopes}     \tikzpicture[bend right, out=60, in=120, max distance=1.5cm]       \foreach \x in {1,...,8} {         \coordinate (n\x) at (\x,0);       }       \draw (n1) to (n3) to (n5) to (n7) to (n1);       \draw (n8) to (n6) to (n4) to (n2) to (n8);       \filldraw[fill=white,draw=black] plot[mark=*]         coordinates{(1,0) (2,0) (3,0) (4,0) (5,0) (6,0) (7,0) (8,0)};     \endtikzpicture      ![enter image description here](http://i.stack.imgur.com/xhgkw.png) Is there a way to combine the two so that the dots look like in the latter, and the paths like in the former?


title: An indentation problem with TikZ nodes and foreign document classes (babel)

text: I'm new to LaTeX and i'm struggling with TikZ, especially flowcharts. I'm dutch and therefor I'm using the documentclass 'rapport1':               \documentclass[11pt]{rapport1}       \usepackage[dutch]{babel}      This documentclass has a default parindent which I managed to erase with the following line:               \setlength{\parindent}{0pt}      This line however seems not to affect the indentation within tikz nodes: ![problem](http://i.stack.imgur.com/qdaob.png)               \documentclass[11pt]{rapport1}       \usepackage[dutch]{babel}          \setlength{\parindent}{0pt}          \usepackage{tikz}     \usetikzlibrary{shapes, arrows}     \tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em,                          text centered, rounded corners, minimum height=4em]           \begin{document}         \begin{tikzpicture}[node distance = 2cm, auto]             \node [block] (test) {This is a test!};         \end{tikzpicture}     \end{document}      Is there a way to solve this issue and get the node block rendered just as it would when using `\documentclass{article}`?


title: Determine full list of installed LaTeX packages in Ubuntu

text: Newbie here, just inherited a large (250+ page) doc written in LaTeX after the previous author left the company. Is there an easy way to determine _all_ the LaTeX packages installed on my system? I'm using Ubuntu 12.10 as a workstation and I installed texlive-full and a couple other packages when I was initially trying out LaTeX. I got a list of the packages that the project uses from the .tex file, so I know _which_ packages I need. But it seems like there are multiple places on my system where packages were installed, so I'm having problems figuring out if the necessary packages are all there. Is it possible to get a full list of _all_ LaTeX packages installed? Or even a list of all locations where the packages are stored would be enough. It seems like there are packages installed in multiple locations across my system, so I can't just simply look under the texmf folder. Before I start installing the additional packages from CTAN, I'd really like to make sure I'm not duplicating any of them... Apologies for what I'm sure is a silly question, but I looked and looked online for an answer and wasn't able to dig up anything. Your help is greatly appreciated in maintaining my sanity here. :) Thanks, -Colin


title: How to implement displayed LaTeX format data on Android devices

text: I'm working on a study that implements displayed format data on Android devices and it's original source code is written in LaTeX format. I'm puzzled. Although there have been Android software for such function, I don't know how to achieve that as I don't understand the principle. Would anyone tell or instruct me?


title: makeglossaries hangs waiting for input on mac

text: I'm very new to Latex so apologies if this is a newbie question. However I have looked around online and can't find an answer. I'm trying to compile my file in TeXShop (on mac) using the following but I'm not sure how to go about it (using the 'Typeset' button alone is not sufficient). Please can someone help me out?               (pdf)latex     makeglossaries     (pdf)latex     (pdf)latex      When I tried compiling the document with the script provided it got stuck. Here is a screenshot of what I see: ![enter image description here](http://i.stack.imgur.com/ZxkdV.png)


title: How to decypher font shape warnings?

text: Often one gets warnings of the form (example)               LaTeX Font Warning: Font shape `T1/qcs/m/sl' in size <10.95> not available     (Font)              Font shape `T1/qcs/m/it' tried instead on input line 7.      when some font/size combinations are not available. But what exactly do the things like               T1/qcs/m/sl      mean? **What do the four "letter combinations" separated by a`/` mean?** _(The given warning and shape combination is just an example to have something to work with, the question is meant in the most general way.)_