title: How can I tell ConTeXt to automatically rotate images to fit their dimensions most accurately?

text: I have high resolution images that would be much more effectively executed in landscape format. Is there a way to tell ConTeXt to automatically place images in landscape format to suit their dimensions when fitting them to a page?


title: \pgfmathdectobase macro \pgfmathresult digit index or bitwise operators

text: Is there a way to access each digit of a macro returned by `\pgfmathdectobase` (or `\pgfmathresult`) which is a binary number ? This would be useful for a function which prints the power set of a given set (according to binary representations of numbers between `0` and `2^|given set|`). I can think of two versions 1) convert macro to an array and loop or 2) calculate size of macro and loop with `\foreach` if there is way to access the digits. Unfortunately I was not able to find anything near in the pgfmanual. Also another possible solution would be with bit-masks. Does tikz support anything like that? Or any idea on a package that does? I would be happy with any other package that can use the results from `\pgfmathdectobase`, too, if there is way to use it outside of tikz. Thanks!


title: Larger arrows in xy

text: I'm trying to make a poster, and have managed to enlarge math symbols in XY for my diagrams, but the arrows are too thin and unless you're right up against the poster, the arrow heads are almost invisible. Is there a good way to enlarge the arrows in xy?


title: How can I pad cells of a blockarray?

text: After some struggle, I was able to render the matrix I was after. It now has the right "shape", but it does not look very nice; especially the spacing between the bracket and the matrix contents is too small, both horizontally and vertically. How can I solve this? Is there a way to define cell padding?               \documentclass{article}       \usepackage{blkarray}     \usepackage{multirow}     \begin{document}       \begin{equation}     C =     \begin{blockarray}{cccccccc}       &   & & & j & & &   \\     \begin{block}{c[ccc|c|ccc]} % [I O]       & 1 &                                    &     & 0      & 0      & \ldots & 0           \\       &   & \ddots                             &     & \vdots & \vdots &        & \vdots      \\       &   &                                    & 1   & 0      & 0      & \ldots & 0           \\      \BAhhline{&-------}      i & \BAmulticolumn{3}{c|}{A_1}             & Q_{11} & \multirow{4}{*}{$B_2+b_2$} &                                                           \multirow{4}{*}{$\ldots$}  &                                                           \multirow{4}{*}{$B_n+b_n$}          \\     \BAhhline{&----}        & \BAmulticolumn{3}{c|}{A_1+a_1}         & 0      &                                     \\       &   & \vdots                             &        & \vdots &                            \\       & \BAmulticolumn{3}{c|}{A_n+A_n} & 0     &                                              \\       \end{block}      \end{blockarray}     \end{equation}     \end{document}


title: LaTeX templates for writing a thesis

text: Aside from CTAN, what are good resources/repositories for Latex templates? In particular, I'm looking for some pretty Thesis templates (I'm familiar with classicthesis)


title: How do I bulletpoint some equations within an Align environment?

text: I have a sequence of aligned equations, and I wish to bulletpoint some (but not all) of them. For example, in this MWE I wish to bulletpoint just the first and third lines (beginning with ABCDE = ..., and with F = ...).               \documentclass{article}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{hyperref}          \begin{document}          This is some text in which I discuss the equations that follow. Lorem ipsum dolor     sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore     et dolore magna aliqua.     \begin{align}     ABCDE &= xy + xz \nonumber \\     &= x(y+z), \\     F &= pq + pr \nonumber \\     &= p(q+r).     \end{align}     This is more text in which I discuss the above equations. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.     Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu     fugiat nulla pariatur.          \end{document}      I have tried to use the `Itemize` environment and an `\intertext` command to insert the `\item`, as suggested at Sharing alignment between equations in two different items, but this produces ugly formatting, probably because I don't have a 'title' for each item - the first bulletpoint sits on the line _above_ the first line of the equations, a gap is introduced between the second and third lines, and there is no second bulletpoint:               \documentclass{article}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{hyperref}          \begin{document}          This is some text in which I discuss the equations that follow. Lorem ipsum dolor     sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore     et dolore magna aliqua.     \begin{itemize}     \item \begin{align} ABCDE &= xy + xz \nonumber \\     &= x(y+z), \\     \intertext{\item } F &= pq + pr \nonumber \\     &= p(q+r).     \end{align}     \end{itemize}     This is more text in which I discuss the above equations. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.     Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu     fugiat nulla pariatur.          \end{document}      At the moment I am attempting to work around this by simply inserting `\bullet` wherever I want a bulletpoint and fiddling with the whitespace by hand (e.g. using `\quad` and the like) until the bulletpoints are aligned with each other and a suitable distance from their equation, but this is hardly satisfactory. Thanks for the help, I hope this question makes sense!


title: Draw a multi-chain structure

text: I'm trying to draw the a structure that has multiple chains from the start, based on this example http://www.texample.net/tikz/examples/assignment- structure/ What I have so far is:               \documentclass[]{article}     \usepackage{tikz}     \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%         decorations.pathreplacing,decorations.pathmorphing,shapes,%         matrix,shapes.symbols}     \tikzset{     >=stealth',       punktchain/.style={         rectangle,          rounded corners,          % fill=black!10,         draw=black, very thick,         text width=10em,          minimum height=3em,          text centered,          on chain},       line/.style={draw, thick, <-},       element/.style={         tape,         top color=white,         bottom color=blue!50!black!60!,         minimum width=8em,         draw=blue!40!black!90, very thick,         text width=10em,          minimum height=3.5em,          text centered,          on chain},       every join/.style={->, thick,shorten >=1pt},       decoration={brace},       tuborg/.style={decorate},       tubnode/.style={midway, right=2pt},     }          \begin{document}          \begin{figure}[h]     \centering     \begin{tikzpicture}[node distance=.8cm,       start chain=1 going below, start chain=2 going below]          \node[punktchain, join] (start) {Static MC};               \node[punktchain, join] (probf)      {Uniform Generator};          \node[punktchain, join] (u) {U};          \node[punktchain, join] (rules) {Transformation Rules};          \node[punktchain, join, ] (simrv) {Simulated r.v. X};           \node (loop) [punktchain ]  {Simulation algorithm (loop)};             %Left Branch              \begin{scope}[start branch=left,                     every join/.style={->, thick, shorten <=1pt}, ]                     \node[punktchain, on chain=going left, join=by {<-}] (var) {Variance Reduction};             \end{scope}                  %Lower branch             \node[punktchain, join] (paths) {Sample paths};             \node[punktchain, join] (law) {Law of large numbers};              \node[punktchain, join] (estim) {Monte Carlo Estimation};          \draw[tuborg] let         \p1=(loop.west), \p2=(loop.east) in         ($(\x1,\y1+2.5em)$) -- ($(\x2,\y2+2.5em)$) node[below, midway]  {};     \end{tikzpicture}     \caption{}     \label{fig:6forces}     \end{figure}     \end{document}      Which looks like this so far ![Partial diagram](http://i.stack.imgur.com/kqigO.png) What I'd like to do from here on, is what I've sketched above in black color. That is, I want another chain to the right of the existing that links up at the (loop) node and has a fork in it as well. Can somebody give me some help? I've been going over the tikz manual but I'm not getting very far. Cheers, Christos


title: The revenge of the vboxes

text: Yes, they're back. With a vengeance. Those pesky little buggers we call `\vbox`es which I've fought against previously. (And Bruno, too.)               \parskip=0pt     \def\unquo{\unvbox0\smallskip}     \def\bquo#{\smallskip\dimen255=\prevdepth\setbox0\vbox\bgroup\prevdepth=\dimen255       \narrower\noindent\strut\aftergroup\unquo\let\next= }          \hsize=20pc     Some text which goes on for a while, in fact, hopefully long enough to     produce a line break.     \bquo{A quote which goes on for a while, so long in fact, that I was hoping to     see a line break somewhere durin this ouote.}     And then some more text.     \bye      ![enter image description here](http://i.stack.imgur.com/dgmiz.png) No! What is that space? Not the same amount as before the quote I can tell you that much. Sure you'll tell me `\smallskipamount` is `3pt plus 1pt minus 1pt`, but that can't be `2pt`. No way. Halp. Please.


title: How to vary alignment in document?

text: I wanted to **left align** my document in such a way that some pages...e.g. **Abstract** to remain justified, but the rest of the document left aligned. Anyway to do that?


title: How to get makeidx and chapterbib work together?

text: `chapterbib` produces bibliographies per chapter. But `makeidx` appears to create the index without considering the matter in the `bbl` files. Consequently, index entries point to the wrong page numbers once the bibliographies are added. How do I stop this from happening? `hyperref` appears to be working correctly. Edited to add an example, which is big as there needs to be more than a page long bibliography to cause this issue: These files are in the same folder:               thesis.tex     intro.tex     theory.tex     Ref.bib      Contents of thesis.tex:               \documentclass[DIV=12, toc=listof, paper=A4]{scrreprt}     \usepackage[inner=3cm,outer=2.5cm,bottom=3cm]{geometry}     \usepackage[super,sort&compress]{natbib}     \usepackage{natmove}     \usepackage[sectionbib]{chapterbib}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{fancyhdr}     \usepackage{setspace}     \usepackage{lmodern}     \usepackage[hypcap]{caption}     \usepackage{makeidx}     \usepackage[hidelinks]{hyperref}          \makeindex          \pagestyle{fancyplain}     \setcitestyle{comma}          % % Math abbreviations end          %\renewcommand{\familydefault}{\sfdefault}     \renewcommand{\sectfont}{\normalfont\bfseries}     %\setkomafont{disposition}{\rmfamily}          \begin{document}               \setstretch{1.5}          \tableofcontents     \clearpage          \pagenumbering{arabic}          \include{intro}     \clearpage          \include{theory}     \clearpage          \phantomsection     \clearpage     \addcontentsline{toc}{chapter}{\indexname}     \printindex     \end{document}      Contents of intro.tex:               \chapter{Introductions}          \newpage     \index{spin--wave} (SWs) occurred over fifty years ago  \cite{Bloch1930}.     \cite{Chumak2010, Klos2013}.      \cite{Kim2010}.     \newpage     magnetoresistance \cite{Baibich1988, Binasch1989},  \cite{Inoue1999},  \cite{Figotin2003}  \cite{Carcia1985, Carcia1988}. modulation. \index{spin--wave}  \cite{Choi2007} along with very efficient signal transmission and logical operations, have been studied in isolated and dipole coupled ferromagnetic nanodisks.                    %\section{The Landau--Lifshitz--Gilbert (LLG) equation}     \index{Landau--Lifshitz--Gilbert equation|see{LLG equation}} \index{LLG equation}           the \index{Larmor!precession} \textit{Larmor precession}. The the \index{damping!Gilbert} \index{Gilbert damping} \textit{Gilbert damping}.      \newpage     \newpage          A\index{LLG equation} \textit{LLG equation} \cite{Landau1935, Gilbert2004}. \cite{Donahue1999} adiabatically \cite{Antos2008}.          \cite{Berger1996}, $e$ \cite{Slonczewski1996}, \cite{Li2003},  \cite{Lee2006}  \cite{Berkov2005}. \cite{Xiao2004}.  Eq.~\eqref{eq:llg2} \cite{Donahue1999}          %\bibliographystyle{naturemag}     \bibliographystyle{aipnum4-1}     \begin{flushleft}     \bibliography{Ref}     \end{flushleft}     \addcontentsline{toc}{section}{\numberline{}Bibliography}      Contents of theory.tex:               \chapter{Theoretical Background}          \section{Ferromagnetism \index{ferromagnetism} \label{sec:ferro}}          a \index{magnetic!field} \textit{magnetic field} \cite{Kumar2013},          \bibliographystyle{aipnum4-1}     \begin{flushleft}     \bibliography{Ref}     \end{flushleft}     \addcontentsline{toc}{section}{\numberline{}Bibliography}      Contents of Ref.bib               % This file was created with JabRef 2.9.2.     % Encoding: Cp1252          @ARTICLE{Antos2008,       author = {Roman Antos and YoshiChika Otani and Junya Shibata},       title = {Magnetic Vortex Dynamics},       journal = {J. Phys. Soc. Jpn.},       year = {2008},       volume = {77},       pages = {031004},       number = {3},       doi = {10.1143/JPSJ.77.031004},       numpages = {8},       publisher = {The Physical Society of Japan},       timestamp = {2014.01.08},       url = {http://jpsj.ipap.jp/link?JPSJ/77/031004/}     }          @ARTICLE{Baibich1988,       author = {Baibich, M. N. and Broto, J. M. and Fert, A. and Van Dau, F. Nguyen         and Petroff, F. and Etienne, P. and Creuzet, G. and Friederich, A.         and Chazelas, J.},       title = {Giant Magnetoresistance of (001)Fe/(001)Cr Magnetic Superlattices},       journal = {Phys. Rev. Lett.},       year = {1988},       volume = {61},       pages = {2472--2475},       month = {Nov},       doi = {10.1103/PhysRevLett.61.2472},       issue = {21},       numpages = {0},       publisher = {American Physical Society},       timestamp = {2014.01.08},       url = {http://link.aps.org/doi/10.1103/PhysRevLett.61.2472}     }          @ARTICLE{Berger1996,       author = {Berger, L.},       title = {Emission of spin waves by a magnetic multilayer traversed by a current},       journal = {Phys. Rev. B},       year = {1996},       volume = {54},       pages = {9353--9358},       month = {Oct},       doi = {10.1103/PhysRevB.54.9353},       issue = {13},       publisher = {American Physical Society},       timestamp = {2014.01.08},       url = {http://link.aps.org/doi/10.1103/PhysRevB.54.9353}     }          @ARTICLE{Berkov2005,       author = {Dmitri V. Berkov and Natalia L. Gorn},       title = {Stochastic dynamic simulations of fast remagnetization processes:         recent advances and applications },       journal = {J. Magn. Magn. Mater.},       year = {2005},       volume = {290--291},       pages = {442--448},       number = {1},       note = {\textit{Proceedings of the Joint European Magnetic Symposia (JEMS'         04)}},       abstract = {Numerical simulations of fast remagnetization processes using stochastic         dynamics are widely used to study various magnetic systems. In this         paper, we first address several crucial methodological problems of         such simulations: (i) the influence of finite-element discretization         on simulated dynamics, (ii) choice between Ito and Stratonovich stochastic         calculi by the solution of micromagnetic stochastic equations of         motion and (iii) non-trivial correlation properties of the random         (thermal) field. Next, we discuss several examples to demonstrate         the great potential of the Langevin dynamics for studying fast remagnetization         processes in technically relevant applications: we present numerical         analysis of equilibrium magnon spectra in patterned structures, study         thermal noise effects on the magnetization dynamics of nanoelements         in pulsed fields and show some results for a remagnetization dynamics         induced by a spin-polarized current. },       doi = {http://dx.doi.org/10.1016/j.jmmm.2004.11.569},       issn = {0304-8853},       keywords = {Micromagnetic calculation},       timestamp = {2013.12.31},       url = {http://www.sciencedirect.com/science/article/pii/S0304885304018323}     }          @ARTICLE{Binasch1989,       author = {Binasch, G. and Gr\"unberg, P. and Saurenbach, F. and Zinn, W.},       title = {Enhanced magnetoresistance in layered magnetic structures with antiferromagnetic         interlayer exchange},       journal = {Phys. Rev. B},       year = {1989},       volume = {39},       pages = {4828--4830},       month = {Mar},       doi = {10.1103/PhysRevB.39.4828},       issue = {7},       numpages = {0},       publisher = {American Physical Society},       timestamp = {2014.01.08},       url = {http://link.aps.org/doi/10.1103/PhysRevB.39.4828}     }          @ARTICLE{Bloch1930,       author = {Bloch, F.},       title = {Zur Theorie des Ferromagnetismus},       journal = {Z. Physik},       year = {1930},       volume = {61},       pages = {206},       timestamp = {2014.01.07}     }          @ARTICLE{Carcia1988,       author = {Carcia, P. F.},       title = {Perpendicular magnetic anisotropy in Pd/Co and Pt/Co thin--film layered         structures},       journal = {J. Appl. Phys.},       year = {1988},       volume = {63},       pages = {5066--5073},       number = {10},       doi = {http://dx.doi.org/10.1063/1.340404},       timestamp = {2014.01.07},       url = {http://scitation.aip.org/content/aip/journal/jap/63/10/10.1063/1.340404}     }          @ARTICLE{Carcia1985,       author = {Carcia, P. F. and Meinhaldt, A. D. and Suna, A.},       title = {Perpendicular magnetic anisotropy in Pd/Co thin film layered structures},       journal = {Appl. Phys. Lett.},       year = {1985},       volume = {47},       pages = {178--180},       number = {2},       doi = {http://dx.doi.org/10.1063/1.96254},       timestamp = {2014.01.07},       url = {http://scitation.aip.org/content/aip/journal/apl/47/2/10.1063/1.96254}     }          @ARTICLE{Choi2007,       author = {Choi, Sangkook and Lee, Ki-Suk and Guslienko, Konstantin Yu. and         Kim, Sang-Koog},       title = {Strong Radiation of Spin Waves by Core Reversal of a Magnetic Vortex         and Their Wave Behaviors in Magnetic Nanowire Waveguides},       journal = {Phys. Rev. Lett.},       year = {2007},       volume = {98},       pages = {087205},       month = {Feb},       doi = {10.1103/PhysRevLett.98.087205},       issue = {8},       numpages = {4},       publisher = {American Physical Society},       timestamp = {2014.01.08},       url = {http://link.aps.org/doi/10.1103/PhysRevLett.98.087205}     }          @ARTICLE{Chumak2010,       author = {Chumak, Andrii V. and Tiberkevich, Vasil S. and Karenowska, Alexy         D. and Serga, Alexander A. and Gregg, John F. and Slavin, Andrei         N. and Hillebrands, Burkard},       title = {All-linear time reversal by a dynamic artificial crystal},       journal = {Nat. Commun.},       year = {2010},       volume = {1},       pages = {141},       doi = {10.1038/ncomms1142},       timestamp = {2013.05.03}     }          @BOOK{Donahue1999,       title = {OOMMF User's Guide, Version 1.0},       publisher = {Tech. Rep. NIS--TIR 6376, National Institute of Standards and Technology,         Gaithersburg, MD},       year = {1999},       author = {M. Donahue and D. G. Porter},       date = {2002},       eprint = {http://math.nist.gov/oommf/doc/userguide12a3/userguide/},       organization = {NIST Interagency Report No. 6376},       timestamp = {2014.01.08},       version = {1.2a3}     }          @ARTICLE{Figotin2003,       author = {Figotin, A. and Vitebskiy, I.},       title = {Electromagnetic unidirectionality in magnetic photonic crystals},       journal = {Phys. Rev. B},       year = {2003},       volume = {67},       pages = {165210},       month = {Apr},       doi = {10.1103/PhysRevB.67.165210},       issue = {16},       numpages = {20},       publisher = {American Physical Society},       timestamp = {2014.01.08},       url = {http://link.aps.org/doi/10.1103/PhysRevB.67.165210}     }          @ARTICLE{Gilbert2004,       author = {Gilbert, T.L.},       title = {A phenomenological theory of damping in ferromagnetic materials},       journal = {IEEE Trans. Mag.},       year = {2004},       volume = {40},       pages = {3443--3449},       number = {6},       doi = {10.1109/TMAG.2004.836740},       issn = {0018-9464},       keywords = {damping;eddy current losses;ferromagnetic materials;damping theory;ferromagnetic         damping;ferromagnetic materials;magnetic core memories;magnetic domains;magnetic         losses;magnetic recording;magnetization processes;phenomenological         theory;Damping;Eddy currents;Energy loss;Equations;Extraterrestrial         measurements;Lattices;Magnetic domains;Magnetic field induced strain;Magnetic         materials;Magnetization;65;Ferromagnetic damping;ferromagnetic materials;magnetic         core memories;magnetic domains;magnetic losses;magnetic recording;magnetization         processes},       timestamp = {2014.01.08}     }          @ARTICLE{Inoue1999,       author = {Inoue, Mitsuteru and Arai, Ken\'ichi and Fujii, Toshitaka and         Abe, Masanori},       title = {One--dimensional magnetophotonic crystals},       journal = {J. Appl. Phys.},       year = {1999},       volume = {85},       pages = {5768--5770},       number = {8},       doi = {http://dx.doi.org/10.1063/1.370120},       timestamp = {2014.01.07},       url = {http://scitation.aip.org/content/aip/journal/jap/85/8/10.1063/1.370120}     }          @ARTICLE{Klos2013,       author = {K{\l}os, J. W. and Kumar, D. and Krawczyk, M. and Barman, A.},       title = {Magnonic Band Engineering by Intrinsic and Extrinsic Mirror Symmetry         Breaking in Antidot Spin-Wave Waveguides},       journal = {Sci. Rep.},       year = {2013},       volume = {3},       pages = {2444},       month = aug,       doi = {10.1038/srep02444},       publisher = {Macmillan Publishers Limited. All rights reserved},       timestamp = {2013.08.21}     }          @ARTICLE{Kim2010,       author = {Sang-Koog Kim},       title = {Micromagnetic computer simulations of spin waves in nanometre-scale         patterned magnetic elements},       journal = {J. Phys. D: Appl. Phys.},       year = {2010},       volume = {43},       pages = {264004},       number = {26},       abstract = {Current needs for further advances in the nanotechnologies of information-storage         and -processing devices have attracted a great deal of interest in         spin (magnetization) dynamics in nanometre-scale patterned magnetic         elements. For instance, the unique dynamic characteristics of non-uniform         magnetic microstructures such as various types of domain walls, magnetic         vortices and antivortices, as well as spin wave dynamics in laterally         restricted thin-film geometries, have been at the centre of extensive         and intensive researches. Understanding the fundamentals of their         unique spin structure as well as their robust and novel dynamic properties         allows us to implement new functionalities into existing or future         devices. Although experimental tools and theoretical approaches are         effective means of understanding the fundamentals of spin dynamics         and of gaining new insights into them, the limitations of those same         tools and approaches have left gaps of unresolved questions in the         pertinent physics. As an alternative, however, micromagnetic modelling         and numerical simulation has recently emerged as a powerful tool         for the study of a variety of phenomena related to spin dynamics         of nanometre-scale magnetic elements. In this review paper, I summarize         the recent results of simulations of the excitation and propagation         and other novel wave characteristics of spin waves, highlighting         how the micromagnetic computer simulation approach contributes to         an understanding of spin dynamics of nanomagnetism and considering         some of the merits of numerical simulation studies. Many examples         of micromagnetic modelling for numerical calculations, employing         various dimensions and shapes of patterned magnetic elements, are         given. The current limitations of continuum micromagnetic modelling         and of simulations based on the LandauâLifshitzâGilbert equation         of motion of magnetization are also discussed, along with further         research directions for spin-wave studies.},       timestamp = {2014.01.08},       url = {http://stacks.iop.org/0022-3727/43/i=26/a=264004}     }          @ARTICLE{Kumar2013,       author = {D. Kumar and P. Sabareesan and W. Wang and H. Fangohr and A. Barman},       title = {Effect of hole shape on spin-wave band structure in one-dimensional         magnonic antidot waveguide},       journal = {J. Appl. Phys.},       year = {2013},       volume = {114},       pages = {023910},       number = {2},       eid = {023910},       doi = {10.1063/1.4813228},       keywords = {band structure; dispersion relations; magnons; quantum dots; spin         waves},       numpages = {6},       publisher = {AIP},       timestamp = {2014.01.08},       url = {http://link.aip.org/link/?JAP/114/023910/1}     }          @ARTICLE{Landau1935,       author = {L. D. Landau and E. M. Lifshitz},       title = {On the theory of the dispersion of magnetic permeability in ferromagnetic         bodies},       journal = {Phys. Zeitsch. der Sow.},       year = {1935},       volume = {8},       pages = {153},       timestamp = {2013.05.03}     }          @ARTICLE{Lee2006,       author = {Lee, Kyung-Jin and Dieny, Bernard},       title = {Micromagnetic investigation of the dynamics of magnetization switching         induced by a spin polarized current},       journal = {Appl. Phys. Lett.},       year = {2006},       volume = {88},       pages = {132506},       number = {13},       eid = {132506},       doi = {http://dx.doi.org/10.1063/1.2190450},       timestamp = {2014.01.01},       url = {http://scitation.aip.org/content/aip/journal/apl/88/13/10.1063/1.2190450}     }          @ARTICLE{Li2003,       author = {Li, Z. and Zhang, S.},       title = {Magnetization dynamics with a spin-transfer torque},       journal = {Phys. Rev. B},       year = {2003},       volume = {68},       pages = {024404},       month = {Jul},       doi = {10.1103/PhysRevB.68.024404},       issue = {2},       numpages = {10},       publisher = {American Physical Society},       timestamp = {2014.01.08},       url = {http://link.aps.org/doi/10.1103/PhysRevB.68.024404}     }          @ARTICLE{Slonczewski1996,       author = {J.C. Slonczewski},       title = {Current-driven excitation of magnetic multilayers },       journal = {J. Magn. Magn. Mater.},       year = {1996},       volume = {159},       pages = {L1 - L7},       number = {1â2},       doi = {http://dx.doi.org/10.1016/0304-8853(96)00062-5},       issn = {0304-8853},       timestamp = {2013.10.21},       url = {http://www.sciencedirect.com/science/article/pii/0304885396000625}     }          @ARTICLE{Xiao2004,       author = {Xiao, Jiang and Zangwill, A. and Stiles, M. D.},       title = {Boltzmann test of Slonczewskis theory of spin-transfer torque},       journal = {Phys. Rev. B},       year = {2004},       volume = {70},       pages = {172405},       month = {Nov},       doi = {10.1103/PhysRevB.70.172405},       issue = {17},       numpages = {4},       publisher = {American Physical Society},       timestamp = {2014.01.08},       url = {http://link.aps.org/doi/10.1103/PhysRevB.70.172405}     }      Normal compilation:   1. pdflatex -> thesis.tex.   2. bibtex -> intro.tex.   3. bibtex -> theory.tex.   4. makeidx -> thesis.tex.   5. pdfchain -> thesis.tex. Now if you note the entry of "magnetic!field" in Index, it says that it is on page 5. But it should be page 6. I think this simply because the makers of `makeidx` forgot about the content in `bbl` files which are produced in steps 2 and 3 of compilation.


title: Reduce line height in p type table cells

text: I need to set a big table and want to compress it in a way that it fits on one page. The table contains a column of type `p` with text breaking over multiple lines. Now I want to reduce the overall line spacing. Usually, I'm using a `\renewcommand{\arraystretch}{0.9}` for that, but that does not seem to work for `p` columns. See the following example (I set the spacing to 0.5 to make my goal more clear):               \documentclass[ngerman]{scrbook}     \begin{document}     {         \renewcommand{\arraystretch}{0.5} % this reduces the vertical spacing between rows         \begin{table}             \centering             \begin{tabular}{l p{5cm}}                 \hline                 row one &                      the quick brown fox jumps over the lazy dog.                      the quick brown fox jumps over the lazy dog.                      the quick brown fox jumps over the lazy dog. \\                 row two \\                 row three \\                 \hline             \end{tabular}         \end{table}     }     \end{document}      This produces the following result: ![TableLineSpacing](http://i.stack.imgur.com/6O3W4.png) Beside the spacing between the rows (green arrow), I would like to reduce the line spacing in between the "the quick brown fox" lines as well (red arrow). Any hints strongly appreciated.


title: Error cross-referencing when tikz mode is graphics if exist

text: I am getting the error "Undefined control sequence" when using               \tikzset{external/mode=graphics if exists}      and the label does not exist (It should produce a warning not an error, though because the references are not resolved in the first compilation, it will certainly produce error in the first run) MWE:               \documentclass{article}     \usepackage{subfig}     \usepackage{pgfplots}     \usepackage{tikzscale}     \usepackage{cite}         \usepgfplotslibrary{external}         \tikzexternalize         %\tikzset{external/mode=graphics if exists}          \newcommand{\Eref}[1]{E{ }(\ref{#1})}          \begin{document}     \begin{figure}       \centering       \begin{tikzpicture}[]       \begin{axis}[         xlabel=$x$,         ylabel={$f(x) = x^2 - x +4$}       ]       \addplot {x^2 - x +4};       \end{axis}       \end{tikzpicture}%       \caption{Caption text}       %\label{fig:fig1}     \end{figure}          This reference to\Eref{fig:fig1}, fails.          \end{document}      It compiles well in the current form. After the first run, if you uncomment `\tikzset`... it produces an error. It happened after I updated my TeX Live to 2014 version. If you further uncomment the `\label`... after two runs it works well. P.S. I am using `tikzscale` with external .tikz file, though in this MWE I just copy-pasted the `tikzpicture` environment (the error still exist).


title: Centering ellipses inside a rectangular node

text: The following TikZ picture consists of a rectangle containing two ellipses. I'm constructing this by putting a TikZ picture environment inside the node of an including TikZ picture environment. I've seen this idiom used before, but it doesn't seem particularly standard. I've also not seen any documentation on this in the PGF manual. My main question is, what do I need to do to get the two ellipses centered in the rectangle? To be more precise I want both ellipses to be side by side, at equal distances from the top and bottom of the rectangle, and equal distances on either side of an imaginary vertical line dividing the rectangle into two equal pieces. I guess some resizing of either or both the rectangle and the ellipses will be necessary, and that's Ok. I haven't tried to do that, since I can't even get the ellipses centered correctly. I tried using `at (0,0)` for ellipse OUTPUT1, and `at (3,0)` for ellipse OUTPUT2, and experimented with changing those values. TikZ ignores the former as far as I can tell, but does move OUTPUT2 around in response to the latter, but I'm not sure what it is doing. I'm unclear overall on what this `at` option is doing. A secondary question is: how do I get the text within the ellipses centered? I've been having problems with this in various contexts (within TikZ), so I must be missing something. On a more general note, as with lots of things about TikZ, I'm unclear on how this is supposed to work. Is the sub-picture aware of the enclosing node? Is there some "natural" way we can teach the sub-ellipses to respect the bounds of the enclosing node? I should add that I plan to be using this rectangle as an element in a matrix. Thus it needs to look like one unit. This obviates possible other strategies like using the fit library to draw around the ellipses, per How to write inside an ellipse in TikZ?. I haven't actually tried doing this, so don't know if it would work.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows, positioning}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{5em}%     \begin{document}     \begin{tikzpicture}[auto]       \tikzstyle{file} = [ellipse, rounded corners, text width=12em, text height=3em, minimum height=1em, minimum width=1em, align=center, draw]       \tikzstyle{block} = [rectangle, rounded corners, text width=12em, text height=3em, minimum height=2em, minimum width=15em, align=center, draw]       \node [block, minimum height=6em, minimum width=40em] (OUTPUT)       {         \begin{tikzpicture}[anchor=center]           \node [file, inner sep=0pt, draw] (OUTPUT1) at (0,0) {MAP/PED files};           \node [file, right=2em of OUTPUT1, inner sep=0pt, draw] at (3, 0) (OUTPUT2){TFAM/TPED files};         \end{tikzpicture}         \textbf{Data files}\\       };     \end{tikzpicture}     \end{document}


title: Creating Table using array

text: I'm trying to create entry similar to tables using array               begin{array}{*{20}{r}}        {}| & A |& B  \\     \hline        A_1| & {one|} & {two}  \\        B_2| & {three|} & {four}  \\     \hline      \end{array}      Is there any way to draw continuous vertical lines? (something like hline for drawing horizontal lines?)


title: Inline arrangement using "enumitem"

text: \documentclass[a4paper]{article}          \usepackage[inline]{enumitem}          \begin{document}          \begin{itemize*}       \item First point       \item Second point       \item Third point     \end{itemize*}          \end{document}      The above code gives ![enter image description here](http://i.stack.imgur.com/3kc4M.jpg) I need two items per row when i give               \begin{itemize*}(2)       \item First point       \item Second point       \item Third point     \end{itemize*}      I need three items per row when i give               \begin{itemize*}(3)       \item First point       \item Second point       \item Third point     \end{itemize*}      Something similar to "tasks" using "enumitem" The output similar to ![enter image description here](http://i.stack.imgur.com/qrson.jpg)


title: tabular input by columns (i.e. transpose a table)

text: I would like to be able to transpose a `tabular`(`x`) table like in the following example. It is not necessary to be completely automated, but I don't want to change the data order, which is a painful and stupid. By "not completely automated" I mean that e.g. the headers can be done seperately etc. Let's see the MWE:               \documentclass{article}          \usepackage{booktabs}     \def\Midrule{\midrule[\heavyrulewidth]}          \begin{document}          \centering          \begin{tabular}{*6c}\toprule     \bfseries Name & Alice & Bob & Chuck & Dave & Eve\\\Midrule     \bfseries Sex & Female & Male & Male & Male & Female\\\midrule     \bfseries Age & 18 & 19 & 20 & 21 & 22\\\bottomrule     \end{tabular}          \bigskip          Which I want to look like          \bigskip          \begin{tabular}{*3c}\toprule     \bfseries Name & \bfseries Sex & \bfseries Age\\\Midrule     Alice & Female & 18\\\midrule     Bob & Male & 19\\\midrule     Chuck & Male & 20\\\midrule     Dave & Male & 21\\\midrule     Eve & Female & 22\\\bottomrule     \end{tabular}               \end{document}      ![MWE](http://i.stack.imgur.com/Ii0V7.png) Note: I know that there's an `expl3` solution, but I would like to get it without `expl3` (mostly because people would might use my code quite often have an old LaTeX installed and I cannot be convincing them to change this).


title: tufte-style book url in marginnote

text: How do I put a `\url{}` in a `\marginnote{}` without error using tufte-book document? I have already tried `\marginnote{\url{http}}` but I get the error illegal parameter number in definition of ...


One occasionally encountered problem with LaTeX is incompatibility between packages. **What are best practices for package authors to deal with package conflicts?** For example:   * What is the best way to deal with package option conflicts?   * How should package conflicts be documented? (Is there a uniform/recommended way for presenting this in package documentation? I think thre isn't.)   * There is `\PassOptionsToPackage`.   * Is there a way of throwing an error if a particular package has already been loaded?   * Is there a standard way of telling the user (via a warning or error) to change the package loading order?   * How can a package detect an incorrect package loading order upon being loaded (if the respective dependencies are known to that package's author)?   * Is there a recommended way/interface for packages to communicate with regard to indicating or checking whether/how a certain command has already been patched/modified?   * Is there a recommended way for packages to document or warn other packages against what sorts of patches to existing commands they are executing? (I have a suspicion that the "best" answer to some of these questions is "wait for LaTeX3", but this doesn't mean one can't or shouldn't document workarounds in the meantime. In fact I am asking these questions partly to provide a record of documentation.) Some questions on TeX.SE constituting partial answers or asking for related information:   * Two conflicting packages in one document — doable?   * choosing macro names so as to avoid namespace conflicts   * Could using different packages cause a contradiction for the compiler?   * Creating a dependency tree (\RequirePackage) for packages used in my document   * Package options and \RequirePackage: order of commands and option conflicts?


title: List   marginpars in the/a TOC

text: I try to write a longer story. To make the structure more clear I use the command `\marginpar`. But that is still time consuming when it comes to the point when I need to find a certain passage. That is the reason, why it would be helpful to have some kind of Table of Marginpars. My question: Is it possible to force the marginpar elements to appear in the ToC and/or even better in a separated Table of Marginpars? Note: I am aware that an alternative solution could be to define the section command in a way that it is typeset as a marginpar.


title: Use the s (star) argument with \NewDocumentEnvironment

text: Would it be possible to use the `s` argument specifier of `xparse` in `\NewDocumentEnvironment` so that we get an environment an a starred version of it? Actually it works, but the star goes to the wrong place:               \documentclass{article}          \usepackage{xparse}          \NewDocumentEnvironment{baz}{s O{Foobar}}{%        \begin{quote}        \IfBooleanTF{#1}{%           \textbf{#2 (starred)}\quad        }{%           \textbf{#2 (non-starred)}        }%     }{%        \end{quote}     }          \usepackage{lipsum}          \begin{document}     \lipsum[1]     \begin{baz}        \lipsum[2]     \end{baz}     \lipsum[3]     % Star at the wrong place in a LaTeX2e sense     \begin{baz}*[Name]        \lipsum[2]     \end{baz}     \lipsum[3]     \end{document}      It would be great if `\NewDocumentEnvironment{baz}{s ...` defines `{baz}` and `{baz*}`, otherwise one have to define them separately as in 2e syntax…


title: Footnotes disappear when using overlays in beamer

text: I use footnotes for citations in combination with the `beamer` package. I adapted the code from this question and everything works quice nicely - except when using overlays. Then the footnotes only show on one slide but are hidden afterwards as shown below. ![enter image description here](http://i.stack.imgur.com/yk9Rp.png) So my question is: How can I accomplish that the footnotes appear on the same slide as the corresponding item? If that is not possible, the footnotes should at least be visible until the next frame appears. Here is my MWE:               \documentclass{beamer}     \usepackage[english]{babel}     \usepackage{csquotes}     \usepackage[style=numeric-comp, backend=biber, citetracker=true,sorting=none]{biblatex}     \usepackage{hyperref}          \addbibresource{biblatex-examples.bib}          \makeatletter     \newtoggle{cbx@togcite}     % Citation number in brackets     \renewcommand\@makefntext[1]{%       \iftoggle{cbx@togcite}         {{\normalfont[\@thefnmark]}\enspace #1}         {{\normalfont\@thefnmark}\enspace #1}%       \global\togglefalse{cbx@togcite}}          \DeclareCiteCommand{\sfcite}[\cbx@superscript]%       {\usebibmacro{cite:init}%        \let\multicitedelim=\supercitedelim        \iffieldundef{prenote}          {}          {\BibliographyWarning{Ignoring prenote argument}}%        \iffieldundef{postnote}          {}          {\BibliographyWarning{Ignoring postnote argument}}}       {\usebibmacro{citeindex}%        \usebibmacro{sfcite}%        \usebibmacro{cite:comp}}       {}       {\usebibmacro{cite:dump}}          \newbibmacro*{sfcite}{%       \ifciteseen       {}       {\xappto\cbx@citehook{%        \global\toggletrue{cbx@togcite}%        \noexpand\footnotetext[\thefield{labelnumber}]{%          \fullcite{\thefield{entrykey}}\addperiod}}}}          \newrobustcmd{\cbx@superscript}[1]{%       \mkbibsuperscript{\mkbibbrackets{#1}}%       \cbx@citehook%       \global\let\cbx@citehook=\empty}          \let\cbx@citehook=\empty     \makeatother          \begin{document}     \begin{frame}     \frametitle{First Frame}     \begin{itemize}[<+->]       \item First citation. \sfcite{reese}        \item Second citation.\sfcite{springer}     \end{itemize}     \end{frame}          \begin{frame}     \frametitle{Second Frame}     Third citation.\sfcite{glashow}     \end{frame}          \end{document}


title: line numbers in Arabic poem

text: I am typing an Arabic poem as part of a longer `XeLaTeX` document. So my paper has three parts: Introduction (7 pages), edition of Arabic poem (5 pages) that I typeset using `polyglossia` and `bidi` `\traditional poem` (two justified columns), and translation of the Arabic poem (4 pages). I need to add some footnotes (textual variants) in the Arabic poem. I want to have the footnote marker in Arabic (`mashriq`) but when I insert at the beginning of the Arabic poem the command `\setdefaultlanguage[numerals=mashriq]{arabic}` it changes both footnote markers and page numbers to `mashriq` (including also the page numbers in the translation section. (If I insert the command in the preamble, it changes all numerals in the document to `mashriq` form.) I would ideally like the footnotes to be on the bottom of each page, but the `traditionalpoem` environment seems to insert them only at the end of the poem. I can live with that.   1. Is there some way to get `mashriq` forms only in the footnote markers within the Arabic text section without changing any other numbers to `mashriq` form?   2. Another, presumably easier, solution would be to number the lines of the text of the Arabic poem and create unnumbered footnotes that reference line numbers rather than specific footnote markers, but I have not found a way to accomplish this. I tried using package `lineno`. It did not produce any error messages but it also did not number the lines of the poem. I have found examples of code defining a new environment, `numberedpoem`, published on the internet which apparently work for some people, but when I run the example through `TeXWorks` (`MikTeX 2.9`) it does not compile. There is an error code:              ! Undefined control sequence.      l.63 \footdir@temp                   \footdir@ORG@xepersian@footnotetext\@footnotetext{\bidi@fo...      I am at a loss to know what to do because the sample does not even contain 63 lines of code.


title: Asymmetric cloud shape in TikZ

text: I have this little cloud shape that I want to use in my system diagram figures.               \usetikzlibrary{shapes}          \begin{tikzpicture}     \node [cloud, draw,cloud puffs=10,cloud puff arc=120, aspect=2, inner ysep=1em] {};     \end{tikzpicture}      It looks like this: ![symmetric cloud](http://i.stack.imgur.com/zzyRQ.png) The problem, though, is that the cloud is too symmetrical. I want one side to be 'shorter'. Something like this (minus the arrow, text and drop shadow, of course): ![unsymmetric cloud](http://i.stack.imgur.com/7eYMt.png) Can't find anything in the manual or online. Any hints?


title: Page breaking problem with exam.cls

text: For some time, version 2.01 of the exam document class has been used in my department. In the future we are going to use the latest version (currently 2.4), and this has to be customised so that existing papers typeset as before. In the example below, the new version of `exam.cls` puts in an extra page break.               \documentclass{exam}     \setlength{\textheight}{8.8in} %set \textheight as in the old version     \extraheadheight[.7in]{-.2in}     %     \begin{document}     \hrule     \newpage     \showthe\textheight     \hrule     \vskip408pt     \hrule     \begin{center}     \rule{0.5\textwidth}{212pt}     \end{center}     \end{document}      Our existing exam papers include the `\extraheadheight` command shown here. I expected setting `\textheight` to 8.8in (the value used by version 2.01 of `exam.cls`) and then including `\extraheadheight` to reproduce the behaviour of the old version, but in this case it does not. Why does this happen?


title: Position a node a certain distance away from another node at a certain angle in TikZ?

text: Like the title says, is it possible to position a node a certain distance away from another node at a certain angle from that node?


title: pgfkeys-values only in list of possible values

text: In the following example, the key `formatting` has the initial default value `apmep`.               \pgfkeys{         /test/.is family, /test,         formatting/.initial = apmep     }      I would also like that the value of the key `formatting` can only belong to the set of values `{apmep, basic, design}`. Is it possible ?


title: How to make a float that is not labelled 'Figure' but 'Listing'

text: I would to include my listings as floats, pretty much as Figures, but I don't want to call them Figures. I want to call them listings. How can I do that?


I need to create similar table using LaTeX: ![Table with multirows, multicolumns, and a combination of both](http://i.stack.imgur.com/zRHhm.jpg) I have tried to use `\tabular` and `\multicolumn`, but every time I get something wrong. Could someone help me?               \begin{table}[!ht]     \small     \begin{tabular}{ | l | l | l | l | l | l | l | l | l | l | l | l | l | }     \hline     \multirow{3}{*}{Header 1 \\&\multirow{2}{*}{Header 2} &  &  & Header 3 \\&  &  &  &     &  &  &  &  \\ \hline      &  &  &  & L1 &  & L2 &  & L3 &  &  &  &  \\ \hline      & \multicolumn{2}{c}{H1} & \multicolumn{2}{c}{H2} & \multicolumn{2}{c}{H3} & M1 &     M2 & S1 & S2 & K1 & K2 &  &  &  \\ \hline      T1 & 2 & 0 & 0 & 5 & 2 & 2 & . & 0 & . &  &  &  \\ \hline      T2 & 2 & 1 & 1 & 2 & 2 & 1 & 1 & 1 & 1 &  &  &  \\ \hline      T3 & 2 & 3 & 1 & 4 & 0 & 2 & 1 & 1 & 1 &  &  &  \\ \hline      T4 & 18 & 0 & 0 & 2 & 2 & 4 & . & 0 & . &  &  &  \\ \hline      T5 & 5 & 0 & 0 & 3 & 3 & 1 & . & 0 & . &  &  &  \\ \hline      T6 & 4 & 0 & . & 1 & 1 & 1 & . & 1 & 0 & \  & \  & \  \\ \hline      T7 & 1 & 0 & 1 & 1 & 1 & 1 & . & 1 & 1 & \  & \  & \  \\ \hline      T8 & 4 & 0 & . & 1 & 1 & 1 & . & 1 & 0 & \  & \  & \  \\ \hline      \end{tabular}      \end{table}


title: Strange errors and error changes

text: Typesetting:               \documentclass[a4paper]{report}     \usepackage{thmtools,amsthm,hyperref}     \newtheorem{defi}{Definizione}          \begin{document}               \renewcommand\listtheoremname{Definizioni, Teoremi, Proposizioni, ecc.}     \listoftheorems[ignoreall,show={defi}]     \end{document}      yields:               This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     (./gungugungu4.tex     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 78 languages loaded.     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/report.cls     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thmtools.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-patch.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/parseargs.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-kv.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/etexcmds.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-autoref.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/aliasctr.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/carlisle/remreset.sty)))     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-listof.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-restate.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/amscls/amsthm.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/hyperref.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))     (/usr/local/texlive/2013/texmf-dist/tex/generic/ifxetex/ifxetex.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/auxhook.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/kvoptions.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/pd1enc.def)     (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/hyperref.cfg)     (/usr/local/texlive/2013/texmf-dist/tex/latex/url/url.sty))          Package hyperref Message: Driver (autodetected): hxetex.          (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/hxetex.def     (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/puenc.def)     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/stringenc.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))     (./gungugungu4.aux)          Package thmtools Warning: amsthm loaded after thmtools .               Package thmtools Warning: ntheorem loaded after thmtools .          (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/nameref.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))     (./gungugungu4.out) (./gungugungu4.out)          Package hyperref Warning: Rerun to get /PageLabels entry.          ./gungugungu4.tex:9: Extra \else.     \@forloop ...lse #5\def #4{#2}\ifx #4\@nnil \else                                                        #5\@iforloop #3\@@ #4{#5}\...     l.9 \listoftheorems[ignoreall,show={defi}]      Loading `thmtools` _after_ `amsthm` solves everything, and removing `hyperref` yields:               This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     (./gungugungu4.tex     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 78 languages loaded.     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/report.cls     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thmtools.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-patch.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/parseargs.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-kv.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/etexcmds.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-autoref.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/aliasctr.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/carlisle/remreset.sty)))     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-listof.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/thmtools/thm-restate.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/amscls/amsthm.sty)     (./gungugungu4.aux)          Package thmtools Warning: amsthm loaded after thmtools .               Package thmtools Warning: ntheorem loaded after thmtools .          ./gungugungu4.tex:9: Missing \endcsname inserted.     <to be read again>                         \relax      l.9 \listoftheorems[ignoreall,show={defi}]      So the questions are: what is that error:               ./gungugungu4.tex:9: Extra \else.     \@forloop ...lse #5\def #4{#2}\ifx #4\@nnil \else                                                        #5\@iforloop #3\@@ #4{#5}\...     l.9 \listoftheorems[ignoreall,show={defi}]      and why does it vanish by listening to the warning and loading `amsthm` _before_ `thmtools`? Why does removing `hyperref` change the error so radically? What is calling `ntheorem`?


title: Turn website into novel

text: I would like to use TeX to typeset Søren Kierkegaard's complete works, which are available online here. It includes a collection of notes in a separate XML file which I would like to add to the document as side notes if possible. This question deals with how one can automatically convert an entire website into LaTeX, but as is also mentioned in the answer, these solutions are far from perfect. What I need is not really a program that automatically converts everything into TeX. Rather, I need a program where I can specify manually specify which LaTeX command each HTML tag must be converted into. For instance, the note reference               *      should be automatically converted into               \Anote{r132}      (cf. this question). Does there exist some software that can convert HTML tags into LaTeX commands in this way?


title: Beamer bullets with Alegreya Sans

text: I find Alegreya Sans especially readable for presentations, in part because it has real italics and not just an oblique shape. However, itemization is problematic. Although the default, triangular bullets of `beamer` work as expected, the circle, ball, and square options produce miniature bullets, and the latter two are lower than they should be. For example:               \documentclass{beamer}     \usefonttheme{professionalfonts}     \usepackage[T1]{fontenc}     \usepackage{AlegreyaSans}     \begin{document}     \begin{frame}       \frametitle{Tiny Bullets}            \structure{default}       \begin{itemize}       \item An item.       \end{itemize}            \structure{circle}       \setbeamertemplate{itemize items}[circle]       \begin{itemize}       \item An item.       \end{itemize}            \structure{ball}       \setbeamertemplate{itemize items}[ball]       \begin{itemize}       \item Another item.       \end{itemize}            \structure{square}       \setbeamertemplate{itemize items}[square]       \begin{itemize}       \item Yet another item.       \end{itemize}     \end{frame}     \end{document}      ![output of pdftex](http://i.stack.imgur.com/0VLbt.png) I get the same results with `luatex`, but `xetex` stumbles only on the circle:               \documentclass{beamer}     \usepackage{fontspec}     \usefonttheme{professionalfonts}     \setsansfont{Alegreya Sans}     \begin{document}     \begin{frame}       \frametitle{Tiny Bullets}            \structure{default}       \begin{itemize}       \item An item.       \end{itemize}            \structure{circle}       \setbeamertemplate{itemize items}[circle]       \begin{itemize}       \item An item.       \end{itemize}            \structure{ball}       \setbeamertemplate{itemize items}[ball]       \begin{itemize}       \item Another item.       \end{itemize}            \structure{square}       \setbeamertemplate{itemize items}[square]       \begin{itemize}       \item Yet another item.       \end{itemize}     \end{frame}     \end{document}      ![output of xetex](http://i.stack.imgur.com/FjjES.png) In `luatex`, I can use `luacode` to gain access to the font’s ornaments, among which are circles and squares:               \documentclass{beamer}     \usepackage{fontspec,luacode}     % http://tex.stackexchange.com/a/120762/7883     \begin{luacode}       documentdata       = documentdata or { }            local stringformat = string.format       local texsprint    = tex.sprint       local slot_of_name = luaotfload.aux.slot_of_name            documentdata.fontchar = function (chr)     local chr = slot_of_name(font.current(), chr, false)     if chr and type(chr) == "number" then       texsprint         (stringformat ([[\char"%X]], chr))     end       end     \end{luacode}     \def\fontchar#1{\directlua{documentdata.fontchar "#1"}}     \usefonttheme{professionalfonts}     \setsansfont{Alegreya Sans}     \defbeamertemplate{itemize item}{cornament}{\fontchar{circle1}}     \defbeamertemplate{itemize item}{sornament}{\fontchar{square1}}     \begin{document}     \begin{frame}       \frametitle{Custom Bullets}            \structure{circle}       \setbeamertemplate{itemize item}[cornament]       \begin{itemize}       \item An item.       \end{itemize}            \structure{square}       \setbeamertemplate{itemize item}[sornament]       \begin{itemize}       \item Another item.       \end{itemize}     \end{frame}     \end{document}      ![output of luatex](http://i.stack.imgur.com/gyyEU.png) Any ideas why this is happening? It makes no difference whether I use the OpenType fonts provided in TeX Live (for reasons unknown, the package author created them by converting google’s Truetype fonts) or the OpenType fonts straight from the foundry.


title: pdfTeX warning with Beamer class

text: Compiling the following file               \documentclass{beamer}          \usepackage{lmodern}          \begin{document}          \begin{frame}     First frame     \end{frame}          \begin{frame}     Second frame     \end{frame}          \end{document}      I get this warning               pdfTeX warning (ext4): destination with the same identifier (name{\\let\040}) has been already used, duplicate ignored      Why does this happen and how can I get rid of it?


title: Latex: How do I write "\sim_G" but so that the G is directly underneath the "\sim"?

text: In Latex, How do I write "\sim_G" but so that the G is directly underneath the "\sim"?


title: Comprehensive list of mathmode dots with explanations

text: I have read on several occasions that there are differences between the multitude of `dots` commands that TeX and `amsmath` offer. However, I am not sure up to this day when to use which, and how critical it really is whether I use the correct one or not. The document `mathmode` by Herbert Voss points out: > It is not easy to see the differences between some of them. That obviously does not help me any further. Could you provide some explanation for each of the commands, and in which context to use them for the rest of us? Further, some example explaining how big the difference between the commands really is would be great.


title: Numbering sequent proofs like equations

text: I am trying to reproduce some very old articles for use in an anthology. Some of these articles present certain rules of inference as proofs in sequent calculus, but number them along with equations, using the same numbering style as equations. Normally, I use bussproofs for this kind of proof environment, but bussproofs only allows numbering right next to the inference line in the proof tree. If bussproofs were usable inside an equation environment, what I'm looking for would be something like this:               \begin{equation*}\tag{I1}       \begin{prooftree}       \AxiomC{$A \land B$}       \UnaryInfC{$A$}       \end{prooftree}       \end{equation*}      But, of course this errors out when I generate the PDF, since bussproofs proof trees can't be embedded in other environments in this way (or can they, and I just don't know some trick?). Any suggestion as to how I might be able to get the result I'm looking for?


title: Splitting .tex file across pages when included as figure

text: I am trying to include a .tex file in my thesis. The file is some MATLAB code formatted to appear correctly in LaTeX. The compiler throws a warning that the code is too long for the page, but it doesn't automatically split it across multiple pages. The code I am using is:               \begin{figure}          \input{SUB_GRID_FLAG_ML.tex}          \caption{SUB GRID FLAG ML, \hl{See APPENDIX FOR FULL CODE}}          \label{SUB_GRID_FLAG_ML_CODE}          \end{figure}      Is there a way to do this inside my main LaTeX file rather than any included .tex files? The content of SUB_GRID_FLAG_ML.tex               % This file was automatically created from the m-file        % "m2tex.m" written by USL.        % The fontencoding in this file is UTF-8.        %           % You will need to include the following two packages in        % your LaTeX-Main-File.        %         % \usepackage{color}        % \usepackage{fancyvrb}        %         % It is advised to use the following option for Inputenc        % \usepackage[utf8]{inputenc}        %              % definition of matlab colors:        \definecolor{mblue}{rgb}{0,0,1}        \definecolor{mgreen}{rgb}{0.13333,0.5451,0.13333}        \definecolor{mred}{rgb}{0.62745,0.12549,0.94118}        \definecolor{mgrey}{rgb}{0.5,0.5,0.5}        \definecolor{mdarkgrey}{rgb}{0.25,0.25,0.25}             \DefineShortVerb[fontfamily=courier,fontseries=m]{\$}        \DefineShortVerb[fontfamily=courier,fontseries=b]{\#}             \noindent                                                               \hspace*{-1.6em}{\scriptsize 1}$  $\color{mgreen}$%Set up a flag to alternate the nodes updated on different time steps.$\color{black}$$\\        \hspace*{-1.6em}{\scriptsize 2}$  subGridFlag = 0;$\\        \hspace*{-1.6em}{\scriptsize 3}$  $\\        \hspace*{-1.6em}{\scriptsize 4}$  $\color{mgreen}$%Set up a flag to alternate the nodes updated on different rows.$\color{black}$$\\        \hspace*{-1.6em}{\scriptsize 5}$  rowFlag = 0;$\\        \hspace*{-1.6em}{\scriptsize 6}$  $\\        \hspace*{-1.6em}{\scriptsize 7}$  $\color{mblue}$for$\color{black}$ t = 1:Ns$\\        \hspace*{-1.6em}{\scriptsize 8}$      $\color{mgreen}$%% RED NODES$\color{black}$$\\        \hspace*{-1.6em}{\scriptsize 9}$      if(subGridFlag == 0)$\\        \hspace*{-2em}{\scriptsize 10}$          $\color{mblue}$for$\color{black}$ l = 2:Nx-2$\\        \hspace*{-2em}{\scriptsize 11}$              $\color{mblue}$for$\color{black}$ m = 2:Ny-2$\\        \hspace*{-2em}{\scriptsize 12}$                  if(rowFlag == 0)$\\        \hspace*{-2em}{\scriptsize 13}$                      p(l,m) = (0.5*(p1(l-1,m)+p1(l+1,m)+p1(l,m-1)...$\\        \hspace*{-2em}{\scriptsize 14}$                                                  +p1(l,m+1))-p2(l,m));$\\        \hspace*{-2em}{\scriptsize 15}$                      rowFlag = 1;$\\        \hspace*{-2em}{\scriptsize 16}$                  $\color{mblue}$else$\color{black}$$\\        \hspace*{-2em}{\scriptsize 17}$                      p(l+1,m) = (0.5*(p1(l,m)+p1(l+2,m)+p1(l+1,m-1)...$\\        \hspace*{-2em}{\scriptsize 18}$                                              +p1(l+1,m+1))-p2(l+1,m));$\\        \hspace*{-2em}{\scriptsize 19}$                      rowFlag = 0;$\\        \hspace*{-2em}{\scriptsize 20}$                  $\color{mblue}$end$\color{black}$$\\        \hspace*{-2em}{\scriptsize 21}$              $\color{mblue}$end$\color{black}$$\\        \hspace*{-2em}{\scriptsize 22}$              $\\        \hspace*{-2em}{\scriptsize 23}$          $\color{mblue}$end$\color{black}$$\\        \hspace*{-2em}{\scriptsize 24}$          subGridFlag = 1;$\\        \hspace*{-2em}{\scriptsize 25}$          rowFlag = 0;$\\        \hspace*{-2em}{\scriptsize 26}$          $\\        \hspace*{-2em}{\scriptsize 27}$          $\color{mgreen}$% Get Output Value$\color{black}$$\\        \hspace*{-2em}{\scriptsize 28}$          out(t) = p(Outx,Outy);$\\        \hspace*{-2em}{\scriptsize 29}$          $\color{mgreen}$% Update mesh history$\color{black}$$\\        \hspace*{-2em}{\scriptsize 30}$          p2 = p1;$\\        \hspace*{-2em}{\scriptsize 31}$          p1 = p;$\\        \hspace*{-2em}{\scriptsize 32}$          $\color{mgreen}$%% BLUE NODES$\color{black}$$\\        \hspace*{-2em}{\scriptsize 33}$      $\color{mblue}$else$\color{black}$$\\        \hspace*{-2em}{\scriptsize 34}$          $\color{mblue}$for$\color{black}$ l = 2:Nx-2$\\        \hspace*{-2em}{\scriptsize 35}$              $\color{mblue}$for$\color{black}$ m = 2:Ny-2$\\        \hspace*{-2em}{\scriptsize 36}$                  if(rowFlag == 0)$\\        \hspace*{-2em}{\scriptsize 37}$                      p(l,m+1) = (0.5*(p1(l-1,m+1)+p1(l+1,m+1)+p1(l,m)...$\\        \hspace*{-2em}{\scriptsize 38}$                                                  +p1(l,m+2))-p2(l,m+1));$\\        \hspace*{-2em}{\scriptsize 39}$                      rowFlag = 1;$\\          \hspace*{-2em}{\scriptsize 40}$                  $\color{mblue}$else$\color{black}$$\\        \hspace*{-2em}{\scriptsize 41}$                      p(l+1,m+1) = (0.5*(p1(l,m+1)+p1(l+2,m+1)+p1(l+1,m)...$\\        \hspace*{-2em}{\scriptsize 42}$                                                +p1(l+1,m+2))-p2(l+1,m+1));$\\        \hspace*{-2em}{\scriptsize 43}$                      rowFlag = 0;$\\        \hspace*{-2em}{\scriptsize 44}$                  $\color{mblue}$end$\color{black}$$\\        \hspace*{-2em}{\scriptsize 45}$              $\color{mblue}$end$\color{black}$$\\        \hspace*{-2em}{\scriptsize 46}$          $\color{mblue}$end$\color{black}$$\\        \hspace*{-2em}{\scriptsize 47}$          subGridFlag = 0;$\\        \hspace*{-2em}{\scriptsize 48}$          rowFlag = 0;$\\        \hspace*{-2em}{\scriptsize 49}$          $\color{mgreen}$% Get Output Value$\color{black}$$\\        \hspace*{-2em}{\scriptsize 50}$          out(t) = p(Outx,Outy);$\\        \hspace*{-2em}{\scriptsize 51}$          $\color{mgreen}$% Update mesh history$\color{black}$$\\        \hspace*{-2em}{\scriptsize 52}$          p2 = p1;$\\        \hspace*{-2em}{\scriptsize 53}$          p1 = p;$\\        \hspace*{-2em}{\scriptsize 54}$      $\color{mblue}$end$\color{black}$$\\        \hspace*{-2em}{\scriptsize 55}$  $\color{mblue}$end$\color{black}$$\\             \UndefineShortVerb{\$}        \UndefineShortVerb{\#}        * * * **Update: I** just had my `flushleft` in the wrong place and have regained the formatting. Unfortunately LaTeX now splits all code no matter what, even small 10 line chunks are split when called near the bottom of the page, rather than being at the top of the next page, losing much of the layout qualities of the float environment. Are there any other techniques I could try?


title: listings ignore final newline

text: When I write listings in my LaTeX code I usually follow this format               \begin{lstlisting}     foo     bar     baz     \end{lstlisting}      and when I put this inside a normal LaTeX document, things look fine. But when I put this inside a `beamer` block, there is an extra line that is included at the end and I need to do               \begin{lstlisting}     foo     bar     baz\end{lstlisting}      to get it to look right. Is there any way to tell `listings` to ignore the final newline?


title: EndNote to latex reference export

text: I have already exported my `.txt` file from EndNote but how to compile it with TeX work? Here is my exported file:               @article{h2,        author = {Acock, Alan C.},        title = {Working With Missing Values},        journal = {Journal of Marriage & Family},        volume = {67},        number = {4},        pages = {1012-1028},        note = {Journal of Marriage & Family     Authors:Acock, Alan C.; Physical Description: Bibliography; Diagram; Graph; Table; Subject: Missing observations (Statistics); Subject: Families; Subject: Families -- Research; Subject: Research; Number of Pages: 17p; Record Type: Article},        abstract = {Less than optimum strategies for missing values can produce biased estimates, distorted statistical power, and invalid conclusions. After reviewing traditional approaches (listwise, pairwise, and mean substitution), selected alternatives are covered including single imputation, multiple imputation, and full information maximum likelihood estimation. The effects of missing values are illustrated for a linear model, and a series of recommendations is provided. When missing values cannot be avoided, multiple imputation and full information methods offer substantial improvements over traditional approaches. Selected results using SPSS, NORM, Stata (mvis/micombine), and Mplus are included as is a table of available software and an appendix with examples of programs for Stata and Mplus. Reprinted by permission of the publisher.},        keywords = {Missing observations (Statistics)     Families     Families -- Research     Research},        year = {2005}     }          @article{        author = {Baker, Stuart G. and Laird, Nan M.},        title = {Regression Analysis for Categorical Variables With Outcome Subject to Nonignorable Nonresponse},        journal = {Journal of the American Statistical Association},        volume = {83},        number = {401},        pages = {62},        note = {Baker, Stuart G. 1; Laird, Nan M. 2; Affiliations: 1: Staff Fellow, Biometry Branch, Division of Cancer Prevention and Control, National Institutes of Health (NIH), Bethesda, MD 20892-4200.; 2: Professor of Biostatistics, Department of Biostatistics, Harvard School of Public Health, Boston, MA 02115.; Issue Info: Mar1988, Vol. 83 Issue 401, p62; Thesaurus Term: REGRESSION analysis; Thesaurus Term: STATISTICAL hypothesis testing; Thesaurus Term: MULTIVARIATE analysis; Thesaurus Term: MATHEMATICAL models; Subject Term: LOG-linear models; Subject Term: CONFIDENCE intervals; Subject Term: HYPOTHESIS; Author-Supplied Keyword: EM algorithm; Author-Supplied Keyword: Missing data.; Author-Supplied Keyword: Sample survey; Number of Pages: 8p; Document Type: Article},        abstract = {We develop a log-linear model for categorical response subject to nonignorable nonresponse. The paper differs from Fay (1986) in its focus on estimation and hypothesis testing in a regression setting, as opposed to imputation in a multivariate setting. We present several new results concerning the existence of solutions on the boundary of the parameter space and the construction of confidence intervals for estimates. We illustrate the method by estimating the proportion of voters preferring Truman in a 1948 preelection poll (Mosteller, Hyman, McCarthy, Marks, and Truman 1949). Results may depend strongly on the model assumed for nonresponse; goodness-of-fit tests are available for comparing alternative models. [ABSTRACT FROM AUTHOR]     Copyright of Journal of the American Statistical Association is the property of Taylor & Francis Ltd and its content may not be copied or emailed to multiple sites or posted to a listserv without the copyright holder's express written permission. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)},        keywords = {REGRESSION analysis     STATISTICAL hypothesis testing     MULTIVARIATE analysis     MATHEMATICAL models     LOG-linear models     CONFIDENCE intervals     HYPOTHESIS     EM algorithm     Missing data.     Sample survey},        year = {1988}     }          @book{        author = {Bishop, Yvonne M. M. and Fienberg, Stephen E. and Holland, Paul W.},        title = {Discrete Multivariate Analysis : Theory and Practice},        publisher = {MIT Press},        note = {Accession Number: 49463. Edition: 12th repr. ed. Publication Type: eBook. Language: English.},        keywords = {Multivariate analysis     Statistical methods--Models},        pages = {560p.},        year = {1995}     }          @article{        author = {Blumenthal, Saul},        title = {MULTINOMIAL SAMPLING WITH PARTIALLY CATEGORIZED DATA},        journal = {Journal of the American Statistical Association},        volume = {63},        number = {322},        pages = {542},        note = {Blumenthal, Saul 1; Affiliations: 1: New York University.; Issue Info: Jun68, Vol. 63 Issue 322, p542; Thesaurus Term: SAMPLING (Statistics); Thesaurus Term: PROBABILITY theory; Thesaurus Term: WORK sampling; Thesaurus Term: WORK measurement; Thesaurus Term: MATHEMATICAL models; Thesaurus Term: TIME study; Thesaurus Term: VARIANCES; Subject Term: CATEGORIES (Mathematics); NAICS/Industry Codes: 541910 Marketing Research and Public Opinion Polling; Number of Pages: 10p; Document Type: Article},        abstract = {In sampling situations with categorical observations the problem of uncategorized or partially categorized data sometimes arises. For instance, in signal detection, the problem can arise when an observer detects the presence of a signal, but cannot distinguish among several possible types of signal he may be receiving. In work sampling, it rises when an observer must classify the subject's activity into one of several major categories (which may be easy to identify) and then into one of several subcategories which may sometimes be difficult to distinguish. The observer may prefer not to make a distinction in doubtful cases or because of cost or time considerations may be told to make the distinction in only a selected fraction of the cases. Examples can be found in many other fields as well. Estimation of the probabilities of the subcategories is the subject of concern here and is made difficult by the unclassified observations. The effects of partial classification on the means and variances of the maximum likelihood estimates will be studied.},        keywords = {SAMPLING (Statistics)     PROBABILITY theory     WORK sampling     WORK measurement     MATHEMATICAL models     TIME study     VARIANCES     CATEGORIES (Mathematics)},        year = {1968}     }          @book{        author = {Carpenter, James R., Kenward Michael G.},        title = {Multiple imputation and its application},        publisher = {Wiley},        edition = {1st edition},        abstract = {: "This book is written with three main aims; to provide a thorough introduction to the general MI methods, to provide a detailed discussion of the practical use of the MI method and to present real-world examples drawn from the field of biostatistics"--Provided by publisher. Contents: Introduction -- The multiple imputation procedure and its justification -- Multiple imputation of quantitative data -- Multiple imputation of binary and ordinal data -- Multiple imputation of unordered categorical data -- Nonlinear relationships -- Interactions -- Survival data, skips and large datasets -- Multilevel multiple imputation -- Sensitivity analysis: MI unleashed -- Including survey weights -- Robust multiple imputation. Access: Materials specified: John Wileyhttp://dx.doi.org/10.1002/9781119942283 Materials specified: Wiley Online Libraryhttp://onlinelibrary.wiley.com/book/10.1002/9781119942283 http://site.ebrary.com/id/10662548 Materials specified: ebrary SUBJECT(S) Descriptor: Multiple imputation (Statistics) Missing observations (Statistics) Social sciences -- Statistical methods. Medical statistics. Medicine -- Research -- Statistical methods. Data Interpretation, Statistical. Biomedical Research -- methods. Medical statistics. Medicine -- Research -- Statistical methods. Missing observations (Statistics) Multiple imputation (Statistics) Social sciences -- Statistical methods. Note(s): Includes bibliographical references (pages 316-326) and indexes. General Info: Other format available: Print version:; Carpenter, James R.; Multiple imputation and its application.; 1st ed.; Chichester, West Sussex : John Wiley & Sons, 2013 Class Descriptors: LC: QA277; Dewey: 610.72/4; NLM: WA 950 Responsibility: James R. Carpenter and Michael G. Kenward, Department of Medical Statistics, London School of Hygiene and Tropical Medicine, UK. Vendor Info: Coutts Information Services YBP Library Services ebrary (COUT YANK EBRY) Material Type: Document (dct); Internet resource (url); eBook (ebk) Document Type: Internet Resource; Computer File Date of Entry: 20120718 Update: 20130905 Accession No: OCLC: 801051995 Provider: OCLC Database: Ebooks --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------},        year = {2013}     }


title: ctable cell vertical align

text: I have a table like this: ![sample table](http://i.stack.imgur.com/wLMTy.png)               \documentclass{article}     \usepackage{ctable}     \begin{document}     \ctable      [caption=Sample]      {|p{2cm}|c|}      {}      {       \hline       some multiline (2 or 3 fields) field & need to vertically center this \\ \hline       one more field & and this \\ \hline      }     \end{document}      I want cells at the second column to be vertically center aligned. Which is the simplest and best method?


title: Add Retrieved-on-date field, using natbib and agsm

text: For my bibliography I am using `natbib` package with `agsm` style using following commands               \usepackage{natbib}     \bibliographystyle{agsm}      Question: How Can I insert "Retrieved” or “Last accessed with my Reference Entry I get something like this: > Tams Barta, 2012. Elixir 2, A System Information Monitoring Application and > Widget. Android Market. Available at: http://goo.gl/30udM **[Accessed > January 4, 2012]**


title: Only older version of caption available

text: Sorry if my message is not in the best of english. I have been working on this for the last 12 hours with no solution. **Gist:**   * I am trying to submit my latex source files to a scientific journal   * My latex source files use caption, subcaption and such and it compiles fine on my personal computer and other computers I have tried it on.   * However, the journal wants my source files because they compile the .tex files online in their "system". **My source file does not compile on their system**.   * I get a large log file with a prominent line that says: > LaTeX Warning: You have requested, on input line 34, version `2008/08/24' of > package caption3, but only version`2007/04/11 v3.0q caption3 kernel (AR)' is > available. Tried google -- no help. What should I do? **Working example:** svjour.cls is available here.                   \documentclass[smallextended,referee]{svjour3}               % \RequirePackage{fix-cm}              \usepackage{graphicx}         \usepackage{caption}              % \usepackage{subfig}         \usepackage{subcaption}         \captionsetup{compatibility=false}         \usepackage{amsmath}         \usepackage[numbers]{natbib}              \begin{document}                   \begin{figure}         \centering         \begin{subfigure}[b]{0.38\textwidth}           \centering           \includegraphics[width=\linewidth]{figure1.pdf}            \caption{blah}           \label{fig:1a}         \end{subfigure}         \hspace*{1em}         \begin{subfigure}[b]{0.52\textwidth}           \centering           \includegraphics[width=\linewidth]{figure2.pdf}            \caption{Blah fing blah}           \label{fig:1b}         \end{subfigure}         \caption{BlahBlah}         \label{f:figlabel}         \end{figure}        \end{document}


title: Differences between Tex Live and TexMaker

text: What is the difference between Tex Live and TexMaker. Are they in the same category? What's the difference between these two?


title: Acro Package - Customise the \printacronyms style with hyphen or other

text: I am trying to write a `List of Acronyms` and I am trying to work out how to edit the output format of the `\printacronyms` lists. The way I would like them to look is as below, it is not essential that the spacing be exactly as shown below but that is the general idea. Please find below an MWE for your convenience, thank you ![Hyphenated style](http://i.stack.imgur.com/ap1UZ.jpg)               \documentclass{scrreprt}     \usepackage{acro}          % probably a good idea for the nomenclature entries:     %\acsetup{first-style=long}          % class `abbrev': abbreviations:     \DeclareAcronym{ny}{       short = NY ,       long  = New York ,       class = abbrev     }     \DeclareAcronym{la}{       short = LA ,       long  = Los Angeles ,       class = abbrev     }     \DeclareAcronym{un}{       short = UN ,       long  = United Nations ,       class = abbrev     }          % class `nomencl': nomenclature     \DeclareAcronym{angelsperarea}{       short = \ensuremath{a} ,       long  = The number of angels per unit area ,       sort  = a ,       class = nomencl     }     \DeclareAcronym{numofangels}{       short = \ensuremath{N} ,       long  = The number of angels per needle point ,       sort  = N ,       class = nomencl     }     \DeclareAcronym{areaofneedle}{       short = \ensuremath{A} ,       long  = The area of the needle point ,       sort  = A ,       class = nomencl ,       cite =  ,     }          \begin{document}          \ac{ny}, \ac{la} \ac{ny} and \ac{un} are abbreviations whereas     \ac{angelsperarea}, \ac{numofangels} and \ac{areaofneedle} are part of the     nomenclature          \printacronyms          \printacronyms[include-classes=nomencl,name=Nomenclature]          \end{document}      # Update Further problem (Solved) I have implemented the wrapped labeling environment and it looks perfect, however I want to print the acronyms irrespective of whether I use them or not, so I changed the `\acsetup{list-type=acronyms,only-used=false}` command as shown. The problem is that now I only get a maximum of 4 acronyms in each print list, this does **not** happen however if I simply `\printacronyms`. Could you help make sense of this please? Please find updated MWE:               \documentclass{scrreprt}     \usepackage{acro}          % \DeclareAcronym{ny}{     % short = NY ,     % short-plural = ,     % long = New York ,     % long-plural = ,     % class = city ,     % cite = NewYork     % }          \DeclareAcronym{pwr}{         short = PWR ,         short-plural = s ,         long = Pressurised Water Reactor ,         long-plural = s ,         class = reactors ,     }          \DeclareAcronym{ebr}{         short = EBR-I ,         short-plural =  ,         long = Experimental Breeder Reactor I ,         long-plural =  ,         class = reac.exist ,     }          \DeclareAcronym{lwr}{         short = LWR ,         short-plural = s ,         long = Light Water Reactor ,         long-plural = s ,         class = reactors ,     }          \DeclareAcronym{epr}{         short = EPR ,         short-plural =  ,         long = European Pressurised Reactor ,         long-plural =  ,         class = reac.exist ,     }          \DeclareAcronym{candu}{         short = CANDU ,         short-plural =  ,         long = CANada Deuterium Uranium ,         long-plural =  ,         class = reac.exist ,     }          \DeclareAcronym{acr}{         short = ACR ,         short-plural = s ,         long = Advanced CANDU Reactor ,         long-plural = s ,         class = reactors ,     }          \DeclareAcronym{sfr}{         short = SFR ,         short-plural = s ,         long = Sodium Fast Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{lfr}{         short = LFR ,         short-plural = s ,         long = Lead Fast Reactor ,         long-plural = s ,         class = reactors ,     }          \DeclareAcronym{gfr}{         short = GFR ,         short-plural = s ,         long = Gas Fast Reactors ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{msr}{         short = MSR ,         short-plural = s ,         long = Molten Salt Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{scwr}{         short = SCWR ,         short-plural = s ,         long = Supercritical Water Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{vhtr}{         short = VHTR ,         short-plural = s ,         long = Very High Temperature Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{htgr}{         short = HTGR ,         short-plural = s ,         long = High Temperature Gas cooled Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{htr}{         short = HTR ,         short-plural = s ,         long = High Temperature Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{mhr}{         short = GT-MHR ,         short-plural = s ,         long = Gas Turbine-Modular Helium Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{pmr}{         short = PMR ,         short-plural = s ,         long = Prismatic Modular Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{pbmr}{         short = PBMR ,         short-plural = s ,         long = Pebble Bed Modular Reactor ,         long-plural = s ,         class = reactor ,     }          \DeclareAcronym{heu}{         short = HEU ,         short-plural =  ,         long = High Enriched Uranium ,         long-plural =  ,         class = reac.term ,     }          \DeclareAcronym{leu}{         short = LEU ,         short-plural =  ,         long = Low Enriched Uranium ,         long-plural =  ,         class = reac.term ,     }          \DeclareAcronym{pcs}{         short = PCS ,         short-plural = s ,         long = Power Conversion System ,         long-plural = s ,         class = reac.term ,     }          \DeclareAcronym{ihx}{         short = IHX ,         short-plural = s ,         long = Intermediate Heat Exchanger ,         long-plural = s ,         class = reac.term ,     }               \newenvironment{acronyms}       {\labeling[~\dots]{myheadings}}       {\endlabeling}          \acsetup{list-type=acronyms,only-used=false}          \begin{document}          \addchap*{List of Acronyms}         \addcontentsline{toc}{section}{List of Acronyms}              \printacronyms[include-classes=reactors,name=Reactor Types]         \printacronyms[include-classes=reac.exist,name=Reactor Names]         \printacronyms[include-classes=reac.term,name=Reactor Terms]               \end{document}      # Solved Turns out that putting an extra `s` for the `class name` (`\printacronyms[include-classes=reactors,name=Reactor Types]`) for reactor causes this error. The class was simply called `reactor`.


title: MiKTeX Path refresh FNDB

text: I have several cls files and macros in a folder that is set as a root directory for MikTeX in Windows (The files are in `C:/localtexmf/tex/latex/Macros` and the root directory is set as `C:/localtexmf`). However, whenever I update any of the files in this folder, or add new cls files, I need to run the update FNDB again for LaTeX (TeXMaker) to recognize the changes. On other operating systems (Ubuntu and Mac) once the folder is specified within the tree I did not need to run an update every time. Is this not the case for Windows? Any thoughts much appreciated.


title: cleveref gets names wrong when using the SIAM document class

text: When I try to use `cleveref` in conjunction with the SIAM style files, references to theorems, sections, figures and tables are accurate, but all other references' names (corollaries, definitions, lemmas, ...) are replaced with "Theorem". Here's a minimal example:               \documentclass[final]{siamltex}     \usepackage{cleveref}          \begin{document}          Here's a definition.          \begin{definition}      \label{def:somedef} Some definition.     \end{definition}          If I use cleveref to try to refer to the above, I get ``\Cref{def:somedef}''.          \end{document}      which produces:               Here’s a definition.     Definition 0.1. Some definition.     If I use cleveref to try to refer to the above, I get “Theorem 0.1”.      A similar question was asked a while ago, and the answer was to rely on `ntheorem` or `amsthm`. I suppose I could get away with this by redefining all problematic environments (`mydefinition`, `mylemma` and so on), but is there a simpler or cleaner way?


title: Unsightly spacing with Calligra font (Christmas card)

text: I'm writing my Christmas cards again with LaTeX. Last year I used a commercial font with XeTeX. For this year I was thinking about using Calligra as font, but for some reason the output is not nice looking (for me). This small example               \documentclass[a5paper,11pt,landscape,parskip]{scrartcl}     \usepackage[top=1cm, bottom=1cm, left=1cm, right=1cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[german]{babel}               \pagestyle{empty}     \usepackage[T1]{fontenc}          \usepackage{calligra}     \setlength{\parindent}{0mm}     \setlength{\parskip}{10mm}     \begin{document}         \calligra\Huge         \begin{flushleft}             Liebe aaaaabbba,                  ich wünsche euch frohe Weihnachten aaa             aaaa  aaaa a aa aa aaa aaaa aaaa aaa aa aaa              und hoffe, dass ich euren Geschmack getroffen habe.                  Viele Grüße\\             Euer bbaa         \end{flushleft}          \end{document}      will render like this: ![output](http://i.stack.imgur.com/PYNdE.png) I think "Weihnachten" looks like W_eihnachten and the text doesn't look left aligned for me. Is this normal, or is there some error in my Code? I was thinking about some problem with the ligatures...


title: How to use URLs in BibTeX database when using natbib in TeX file?

text: I will first give you the codes then I will explain my problem:               \documentclass[a4paper,10]{article}     \usepackage[utf8]{inputenc}     \usepackage{natbib}     \usepackage{hyperref}          \begin{document}       I hereby cite \citep{Adams_2013}.            \bibliography{article_lib}       \bibliographystyle{agsm}     \end{document}      Here is the BibTex file entry:               @MISC{Adams_2013,     author = {W. Adams},     title = {Breaching reservoirs},     month = {June},     year = {2013},     volume = {13},     number = {6},     language = {English},     howpublished = {AfroAIDSinfo Online},     organization = {AfroAIDSinfo},     note = {Retrieved 04 June 2013},     url = {http://www.afroaidsinfo.org/MRCWeb/appmanager/mrc/afroaidsinfo;jsessionid=qS16RJ2DzhkKvPp1h1xW14gmRSysHHTFbfzhn0QSZxv251QPJGxF!404223779?_nfpb=true&_windowLabel=editorials_1_1&editorials_1_1_actionOverride=%2Fpageflows%2Feditorials%2Fbegin&editorials_1_1cm_nodepath=%2FBEA+Repository%2FArticles%2FScience%2FClinical+Science%2FAntiretroviral+therapy%2FBreaching+HIV},     journal = {AfroAIDSinfo},     timestamp = {2013.06.04}     }      When I run the following in terminal:               latex example     bibtex example     latex example     latex example      I get the following error message: > The top-level auxiliary file: example.aux > > I found no \bibstyle command---while reading file example.aux > > (There was one error message) How do I solve this problem? I need to include the url. Everything was working well until I included the url in the BibTeX database. I had the bibtex entry as @ARTICLE and it worked well, minus the url. Then, I changed it to @MISC with the url and now it doesn't work. Following the advice on here I loaded the hyperref package to enable url usage. But, it doesn't work. I wrapped the url in the bibtex file in double quotation marks, but I got the same result. Here is the thread whose advice I followed: How can I use BibTeX to cite a web page?


title: Tool for converting maths writing to LaTeX

text: I have a dream. I want my maths writing to magically be made into a `.tex` file so that I can edit it. I want to write my papers, my exams, my lecture notes, _everything_ , by hand, then wave a magic wand to convert them to something pretty (and editable!). For example, could I scan in my writing and run some program which will do this for me? Or would I be able to use the Galaxy Note or Surface Pro (both of which come with usable styluses (styli?), and the Note can even read my handwriting!). Or is my dream not going to be realised just yet... Just to be precise, I want something to do the following: when I write the following (on paper, on a tablet - I don't care!)... >   1. Equations: $2+3x-5=6$ >   2. Blackboard-bold: $\mathbb{R}$ for the reals >   3. Maybe \mathcal also works $\mathcal{C}$? >   4. Maths on its own line is a must! $$e^{\pi i}=-1$$ And noticing the > stuff below! >   5. Subscripts and superscripts, sets and other common things. $$S=\{x_i: > x_i^2\in\mathbb{Q}\}$$ >   6. Maybe I am dreaming a bit much with this one, how about rendering the > "G" in "$G$ is a group"? >   7. Works with align: $$ \begin{align*} 3&=1+2\\ &=2+1\\ &=1+1+1 > \end{align*} $$ >   8. Matrices: $$ \left( \begin{array}{ccc} 1&0&0\\ 0&1&0\\ 0&0&1 > \end{array} \right) $$ >   9. Finally, I want to prove theorems so it'd better recognise what is > coming next... > > > **Theorem 1** (A. Theorem) **.** This is a theorem. > > _Proof._ This is a proof. ∎ ...then the magic wand will yield a `.tex` document with the following code (with suitable environments defined etc.)               \begin{enumerate}         \item Equations: $2+3x-5=6$         \item Blackboard-bold: $\mathbb{R}$ for the reals         \item Maybe \mathcal also works $\mathcal{C}$?         \item Maths on its own line is a must!         \[         e^{\pi i}=-1         \]         And noticing the stuff below!         \item Subscripts and superscripts, sets and other common things.         \[         S=\{x_i: x_i^2\in\mathbb{Q}\}         \]         \item Maybe I am dreaming a bit much with this one, how about rendering the "G" in "$G$ is a group"?         \item Works with align:         \begin{align*}         3&=1+2\\         &=2+1\\         &=1+1+1         \end{align*}         \item Matrices:         \[         \left(         \begin{array}{ccc}         1&0&0\\         0&1&0\\         0&0&1         \end{array}         \right)         \]         \item Finally, I want to prove theorems so it'd better recognise what is coming next...         \end{enumerate}          \begin{theorem}[A. Theorem]         This is a theorem.         \end{theorem}          \begin{proof}         This is a proof.         \end{proof}      * * * Note that the following two questions are relevant, but do not answer the above question. They are both rather outdated. Tablet for reading textbooks and writing math by hand?? Kindle as a Tool for Mathematicians?


title: Question about epstopdf command line options

text: I am running on windows, and I would like to know what command line options are used internally by pdflatex to convert an eps to pdf file? (Note: to run pdflatex, I downloaded MikTex, and used that as the front end.) Once MikTex had run, it downloaded the "epstopdf" package (?), along with the command line tools. I then chained the two command line utilities eps2eps, and then epstopdf to generate the file. i.e., eps2eps file1.eps file2.eps epstopdf file2.eps (I needed to run eps2eps to fix the lack of a bounding box.) The contents were correct, but the pdf page size was cropped to the figure size. When pdflatex generates the files, the intermediate file (xx-converted-to.pdf) the pdf page size was a normal page size (8x11 or whatever). And to make sure this is clear - this is a question about the epstopdf executable, not how to use pdflatex. My hope is that someone here would have the expertise to explain how pdflatex uses the other executables to generate the intermediate pdf. Thanks.


title: Best way to denote an angle in TikZ?

text: What is the best and simplest way to denote an angle, with an arc and a label telling its name? I wish to be able to control (obviously) the vertices on which the angle lays, the name of the angle and also control the radius of the little arc and whether it should fill the whole part-of-a-circle shape in color.