title: Fit given text on a user specified number of pages

text: > **Possible Duplicate:**   >  Is there any package to automatically select font size and margins to > optimize pages? Is it possible to make a given text fit on _n_ pages, where _n_ is a number chosen by the user? Preferably by diminishing the margins first (up to a certain point). Changing the fontsize is acceptable too but only after the margins have their minimum values. The document is plain text. There are no figures, tables or other float like environments. Just plain text with sections and subsections + enumerate and itemize environments. No footnotes either. Can something like this be achieved through TeX? Or I should use an external script (recompiiling at every circle?)?


title: What software do publishers use?

text: I know I am not along in my frustration when converting my LaTeX documents for submission to publishers whose typesetters don't use LaTeX. For instance: maybe they only accept `eps` figures, which doesn't allow transparency; or maybe they end up retyping all the equations by hand anyhow. My question: what software _are_ the typesetters using, when it's not LaTeX? Are there any tips for avoiding the frustration of getting your stuff put therough this software? More generally: Does the non-LaTeX typesetting software have advantages, or are they just stuck in some proprietary stone age? I have seen it suggested that a better workflow would be to write in semantic XML (docbook) and use style sheets to convert to latex in producing e.g. `pdf` output. I have two motives: understand the process, so as to make modern publishing less frustrating; and to see what the right way forward in the future is.


title: How to create Ishikawa (fishbone) diagrams with LaTeX?

text: Is there an automated way or a "template" to create **Ishikawa (also called "fishone") diagrams** with LaTeX? They are used e. g. to show the factors influencing a process and have a hiearchical structure:   * the horizontal main line is the process itself   * the big branches show the main factors   * and they can be detailed further to show the factors which influence or "compose" the main factors For the usage:   * it would be great if the layout (distributing the branches equally) could be done more or less automatically  _Example_ from wikipedia (http://en.wikipedia.org/wiki/Ishikawa_diagram): ![example](http://i.stack.imgur.com/T9yya.png) (link to google search result for more "inspiring" examples, to see how such diagrams can look like and how they are used)


title: Problem adding pdfpages to current class and/or tex file

text: The following .tex script complies perfectly on my computer:               \documentclass{report}     \usepackage[final]{pdfpages}     \begin{document}     \includepdf{Elanderphdmath.pdf}     \end{document}      However, no matter if I put               \RequirePackage{pdfpages}      in the class file, or if I put               \usepackage{pdfpages}      in the main tex file that uses the class file, I get the same errors, primarily               ! Undefined control sequence.     \@calc@post@scan ...st@scan \else \def \calc@next                                                        {\calc@error #1}\fi \fi \f...      which occurs at some random location where there is normally no problem. Again, these errors occur simply by adding the \usepackage or \RequirePackage command. Has anyone heard of any conflicts with this package and other packages? I don't have the first clue why it's not working. Thanks in advance! Update 20110419 0955: I am using MikTex 2.9 on Windows 7. I just added all packages necessary (I hope) for pdfpages to run properly. I'm assuming this is true since the sample code ran perfectly (see above). I have two files, the class file and the main file. Here is the header for the class file:               \NeedsTeXFormat{LaTeX2e}[1995/12/01]     % Minimal LaTeX version required     \ProvidesClass{unlvmathesis}[2010/3/13 UNLV Math Thesis class v1.0]     \LoadClassWithOptions{report}          % REQUIRED PACKAGES ----------------------------------------------------------     % Note that they are also included as comments where they are used.          \RequirePackage{amsmath, amsthm, amsfonts, amssymb}     \RequirePackage{epsfig}     \RequirePackage{float}     \RequirePackage{caption}     \RequirePackage{geometry}     \RequirePackage{tocloft}     %\RequirePackage{hyperref}     \RequirePackage{pdfpages}      Here is the header for the main TEX document:               \documentclass[12pt]{unlvmathesis}     %\usepackage{pdfpages}     \usepackage{amsmath,amsthm,amssymb}     \usepackage{tocloft}     \usepackage{ulem}     \usepackage{wrapfig}     %\usepackage{subfig}     \usepackage{float,caption,array,multirow}     \usepackage{graphicx,graphics,epsfig,pictexwd}     \usepackage{rotating}     \usepackage{psfrag}     \usepackage{layout}     \usepackage{hyperref}     \usepackage{listings}      Let me know if there is any more info that I can provide which would be useful. Update: 4:21pm. After some reading, I see that the calc package affects the setcounter function. The errors are occurring only at the \section locations. In the class file, this is the only line that I see that is related to section numbering:               \setcounter{secnumdepth}{1}    % SUBSECTIONS ARE NOT NUMBERED      Maybe something is undefined that the calc package is choking on? Does everything have to be initialized? Update 4:50pm: At the first section in the first chapter, I get all of the following error messages:               ! Undefined control sequence.     \@calc@post@scan ...st@scan \else \def \calc@next                                                        {\calc@error #1}\fi \fi \f...     l.4 \section{History of Metamaterials}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \@calc@post@scan ...fi \fi \fi \fi \fi \calc@next           l.4 \section{History of Metamaterials}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \@calc@post@scan ...st@scan \else \def \calc@next                                                        {\calc@error #1}\fi \fi \f...     l.4 \section{History of Metamaterials}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \@calc@post@scan ...fi \fi \fi \fi \fi \calc@next           l.4 \section{History of Metamaterials}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Missing number, treated as zero.     <to be read again>                         \begingroup      l.4 \section{History of Metamaterials}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing number, treated as zero.     <to be read again>                         \afterassignment      l.4 \section{History of Metamaterials}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)               ! Undefined control sequence.     \GenericError  ...                                                                                \let \@err@               ...     l.4 \section{History of Metamaterials}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Missing { inserted.     <to be read again>                         \let      l.4 \section{History of Metamaterials}          A left brace was mandatory here, so I've put one in.     You might want to delete and/or insert some corrections     so that I will find a matching right brace soon.     (If you're confused by all this, try typing `I}' now.)          ! Extra }, or forgotten \endgroup.     \@hangfrom #1->\setbox \@tempboxa \hbox {{#1}}                                                   \hangindent \wd \@tempboxa \no...     l.4 \section{History of Metamaterials}          I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     \H@old@sect ...c }\interlinepenalty \@M #8\@@par }                                                       \endgroup \csname #1mark\e...     l.4 \section{History of Metamaterials}          I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Missing number, treated as zero.     <to be read again>                         \begingroup      l.4 \section{History of Metamaterials}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Undefined control sequence.     \@calc@post@scan ...st@scan \else \def \calc@next                                                        {\calc@error #1}\fi \fi \f...     l.4 \section{History of Metamaterials}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \@calc@post@scan ...fi \fi \fi \fi \fi \calc@next           l.4 \section{History of Metamaterials}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Missing \endgroup inserted.     <inserted text>                      \endgroup      l.4 \section{History of Metamaterials}          I've inserted something that you may have forgotten.     (See the <inserted text> above.)     With luck, this will get me unwedged. But if you     really didn't forget anything, try typing `2' now; then     my insertion and my current dilemma will both disappear.          ! Missing number, treated as zero.     <to be read again>                         \vskip      l.4 \section{History of Metamaterials}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing } inserted.     <inserted text>                      }     l.4 \section{History of Metamaterials}          I've inserted something that you may have forgotten.     (See the <inserted text> above.)     With luck, this will get me unwedged. But if you     really didn't forget anything, try typing `2' now; then     my insertion and my current dilemma will both disappear.          ! Missing } inserted.     <inserted text>                      }     l.4 \section{History of Metamaterials}          I've inserted something that you may have forgotten.     (See the <inserted text> above.)     With luck, this will get me unwedged. But if you     really didn't forget anything, try typing `2' now; then     my insertion and my current dilemma will both disappear.          LaTeX Font Info:    Try loading font information for U+msa on input line 6.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd"     File: umsa.fd 2009/06/22 v3.00 AMS symbols A     )     LaTeX Font Info:    Try loading font information for U+msb on input line 6.          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd"     File: umsb.fd 2009/06/22 v3.00 AMS symbols B     )      I get all of these same error messages for every \section of every chapter. So, it's got something to do with incorporating the Calc package and sections.


title: Glossaries: Hyperref/Link only the first occurence of an entry in each chapter

text: I want something similar to this question, but the answer lacks a few things that I need:   * redefinitions of the plural variants of the `\gls` macros (`\glspl`, `\Glspl`, `\GLSpl`)   * every time a new chapter is started, I want the hyperrefs to be turned on again (automatically)   * in the `\printglossaries`-produced section, _all_ glossary references should be hyperrefs (for when I'm using `\gls` in an entry's description) Regarding the first bullet point, it would be nice if `\gls{x}` is the singular form of `\glspl{x}` would produce just _one_ hyperref to the corresponding glossary entry. An acceptable alternative to not having hyperrefs in subsequent glossary entry usages would be to just disable the colored boxes on the hyperrefs (but keeping the hyperrefs)


title: How to put i=1 to n for a \square?

text: Here's the i=1 to n for a `\bigwedge`                \documentclass[conference]{IEEEtran}      \usepackage{ amssymb }      \begin{document}     $ \bigwedge\limits_{i=1}^n t_1 $           \end{document}      How do I do it for a `\square` (it doesn't work if I replace `\bigwedge` with `\square`), it gives an error that `\limit` can only be used for math operators.


title: AltGr+S in TeXstudio tries to save file

text: Recently (2 days ago) I downloaded TeXstudio along with all packages I need. Today I also worked out how to make polish characters work (like `ą`, `ę`, `ł`), but whenever I press `AltGr` and `S` (which should result with `ś` on polish keyboard) TeXstudio opens save file window, so I am unable to input that character properly. I can't see any `AltGr`+`S` shortcut in settings either.


title: Could a map file / TECkit generate a TeX command?

text: > **This is not an important question.** I am just wondering if we could generate a command using a map file for TECkit. Or do we have to use character classes for this task, see pages 14 and 15 in the XeTeX reference guide, or LuaTeX instead? In this example I tried to type `a` and get a `{\ae a}` command. At the TeX level I am defining the `\ae` part. This is my non-working experiment. My `test.map` file looks like this:               ; This is test.map file...     LHSName "input (keyboard)"     RHSName "output (glyphs)"     Define a U+0061     pass(Unicode)     a > U+007BU+005CU+0061U+0065U+0020U+0061U+007D      I run this line to get `test.tec` file:               teckit_compile test.map -o test.tec      I run `xelatex mal-teckit-test.tex`, where this is the content of the TeX file:               % run: xelatex mal-teckit-test.tex     \documentclass{article}     \pagestyle{empty}     \usepackage{fontspec}     \usepackage{xcolor}     \def\ae{\color{green}}     \setmainfont[Mapping=test]{lmroman10-bolditalic.otf}     \begin{document}     a {\ae b}     \end{document}      The preview of the result is this (first picture), the wanted result is shown on the second picture. ![mwe, actual result](http://i.stack.imgur.com/mdeqe.png)   ![mwe, wanted result](http://i.stack.imgur.com/I0NSx.png)


title: Circle with labelled rotated radians

text: I'm wondering how I can reproduce the following diagrams using TeX: ![An angle θ with two concentric circles.](http://i.stack.imgur.com/200FU.png) ![Angles are fractions of a full circle.](http://i.stack.imgur.com/xLaQM.png) I realize this question is similar to this other question, however I'm not nearly experienced enough to be able to translate from the answer to that question to the above diagram. (Label rotation, explicit set of rotations, nested circles with partial radians, etc.) Thank you for any assistance you can offer.


title: How to generate many anchors inside \pgfdeclareshape?

text: In defining a new shape with `\pgfdeclareshape`, I have problems to add many anchors with the `\foreach` statement. Each anchor is defined with three arguments. In the example, the argument `#1` is OK but the program complains with `#2` and `#3`. How can I generate so many anchors with different keys with `\foreach`?               \documentclass[a4paper,landscape]{article}     \usepackage{tikz}     \usetikzlibrary{calc,arrows}     \usepackage{amsmath}     \usepackage[left=1cm,right=1cm]{geometry}     \pagestyle{empty}          \begin{document}     \makeatletter     % Define shapes     \pgfdeclareshape{PE}{       % Inherit from rectangle       \inheritsavedanchors[from=rectangle]       \inheritanchor[from=rectangle]{center}       \inheritanchorborder[from=rectangle]            % In the following I want to make many anchors with some loop. For example,       %\foreach \x/\Y/\z in {een/1/.7,ee/1/0,ees/1/-1}       %{\anchor{\x}{       %  \pgf@process{\northeast}%       %  \pgf@x=\y\pgf@x%       %  \pgf@y=\z\pgf@y%       %}}       %However, while #1 is replaced but #2 and #2 are not.        %How can I use \foreach or TeX loop?                    \anchor{een}{         \pgf@process{\northeast}%         \pgf@x=1\pgf@x%         \pgf@y=.7\pgf@y%       }       \anchor{ee}{         \pgf@process{\northeast}%         \pgf@x=1\pgf@x%         \pgf@y=0\pgf@y%       }       \anchor{ees}{         \pgf@process{\northeast}%         \pgf@x=1\pgf@x%         \pgf@y=-.7\pgf@y%       }         \anchor{se}{         \pgf@process{\northeast}%         \pgf@x=1\pgf@x%         \pgf@y=-1\pgf@y%       }            % Draw the rectangle box and the port labels       \backgroundpath{         % Rectangle box         \pgfpathrectanglecorners{\southwest}{\northeast}       %Add labels       %The following code doesn't work.       %\foreach \x/\y in {een,ee,ees}       %  {       %  \pgf@anchor@PE@\x       %  \pgftext[at={\pgfpoint{\pgf@x}{\pgf@y}},x=-\pgfshapeinnerxsep,y=0]{\raisebox{-.75ex}{\y}}       % }       %\foreach \x/\y in {anchor@PE@een/een,\pgf@anchor@PE@ee/ee,\pgf@anchor@PE@ees/ees}       %{       %  \x       %  \pgftext[at={\pgfpoint{\pgf@x}{\pgf@y}},x=-\pgfshapeinnerxsep,y=0]{\raisebox{-.75ex}{\y}}       %}     }     \makeatother          \begin{tikzpicture}[>=stealth']       \tikzset{PE/port labels/.style={font=\sffamily\scriptsize}}       \tikzset{every PE node/.style={draw=blue,minimum width=2cm,minimum         height=3cm,very thick,inner sep=1mm,outer sep=0pt,cap=round}}       % Place PEs       \foreach \m in {0,...,3}         \node [shape=PE] (PE\m) at ($ 4*(\m,0)$) {};     \end{tikzpicture}     \end{document}


title: Removing Leading Space

text: I would like to remove the leading space that appears on the left before the equation on the latex below.               \documentclass[preview]{standalone}     \usepackage{amsmath}     \usepackage{bm}     \usepackage{varwidth}     \usepackage{amsfonts}     \usepackage{yfonts}     \usepackage[T1]{fontenc}     \usepackage{amssymb}     \begin{document}     \begin{varwidth}{\linewidth}     \large     \begin{align*}     &{\bf y}_{l} = \sum _{k=1}^{L} {\bf H}_{l,k} {\bf x}_{k}+ {\bf w}_{l} &{{(1)}}     \end{align*}     \end{varwidth}     \end{document}


title: qed symbol error

text: I may have misunderstood the documentation, but I believe that if I use the `amsmath` package in the declaration, then typing `\qed` should give me a Q.E.D. symbol. When I do this, it crashes with `undefined control sequence`. The snippet:               \documentclass[11 pt]{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{graphicx}     \graphicspath{{/texfiles/}}     \begin{document}     ...     Since we proved that any function with the property ($\pi$) is an increasing involution, we have thus proved that $f(x) = x$ is the only function which satisfies ($\pi$).      \qed      What is going wrong here?


title: Table isn't displaying

text: \documentclass[manuscript]{aastex}     \begin{document}          \clearpage          \begin{deluxetable}{}     \tabletypesize{\scriptsize}     \rotate     \tablecaption{Sample table taken from \citet{treu03}\label{tbl-1}}     \tablewidth{0pt}     \tablehead{     \colhead{Mon ID} & \colhead{U} & \colhead{B} & \colhead{V} & \colhead{R} &     \colhead{I} & \colhead{u} & \colhead{g} &     \colhead{i} & \colhead{J} &     \colhead{Jerr} & \colhead{H} & \colhead{Herr} & \colhead{K} & \colhead{Kerr} & \colhead{IRAC1} & \colhead{I1err} & \colhead{IRAC2} & \colhead{I2err} & \colhead{IRAC3} & \colhead{I3err} & \colhead{IRAC4} & \colhead{I4err} & \colhead{MIPS24} & \colhead{M24err} & \colhead{SpT} & \colhead{HaEW} & \colhead{RA} & \colhead{DEC} & \colhead{Mean I1} & \colhead{Mean I2} & \colhead{alpha K24} & \colhead{Class} & \colhead{alpha K8} & \colhead{Av}}          \startdata     Mon-000101 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 16.749 & 99.999 & 16.253 & 99.999 & 99.999 & 99.999 & 11.142 & 0.014 & 10.05 & 0.007 & 9.091 & 0.028 & 8.326 & 0.066 & 99.999 & 99.999 & null  & -99.999 & 100.27242 & 9.608597 & 11.082 & 10.034 & 0.39  & I     & 0.39  & 31.1 \\         Mon-000171 & 99.999 & 99.999 & 24.485 & 22.18 & 19.966 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 99.999 & 14.942 & 0.058 & 14.479 & 0.111 & 13.639 & 1.256 & 12.11 & 0.302 & 99.999 & 99.999 & null  & -99.999 & 100.2923 & 9.52286 & 14.834 & 14.385 & 0.45  & I     & 0.45  & 33.7 \\     \enddata     \end{document}      (Above) is a small piece of the table I'm trying to produce. Basically I've just copy/pasted my data (translated using `excel2latex`), into a sample.tex document that came in the `aastex` package. When I try to view the PDF (sorry, not too familiar with the LaTeX lingo) I get this as an error:               ./sample.tex:600: Use of /@array doesn't match its definition.     <argument> \edef \reserved@a {         \reserved@a x}\advance \@tempcnta \m@ne     1.600 \startdata          ?      I have no idea what that means, or where my problem lies. Thanks in advance for any pointers, assistance, general help.


title: natbib creates no errors but no output either

text: I am using `natbib` as my bibliography style, the strange thing is that when I run my code, I get no errors or warnings what so ever, But I get 0 pages of output! Its really strange, I am sure that the code is right, when I switch back to plain style, I get my output perfectly. I am totally new to LaTaX appreciate if you can help me with that. (I am using TeXnicCenter.)


title: Weird Alignment in TOC

text: I want to align my TOC, so that the appendices and other appendix type chapters are aligned by the numbers, rather than the start of the chapter headings. So in the situation below, case A is the default, the A's and B's are not aligned. I would like them aligned as demonstrated in case B. ![Sample Output](http://i.stack.imgur.com/qm7B4.png) Does anyone know how to do this? NB: The red lines are not part of the problem, merely to illustrate the current alignment... Trying to fish the relevant code out of about 20 pages of other code, this is what I think is the relevant parts. You can see that Appendix is the Same as Exhibit in the sense that they are bot appendixes, but with different chapter names and reset number counters. **CODE TO ADD TOC.**               \pagestyle{empty}     \cleardoublepage     \setlength{\cftbeforechapskip}{7pt}     \setlength{\cftbeforesecskip}{0pt}     \begin{spacing}{0.9}                 \let\orignumberline\numberline             \tableofcontents                         \vspace{1em}                      \let\chapter=\subsection                         \renewcommand{\cftfigfont}{\small Fig }             \renewcommand*{\addvspace}[1]{}             \listoffigures                  \let\chapter=\subsection                     \renewcommand{\cfttabfont}{\small Tab }              \renewcommand*{\addvspace}[1]{}              \listoftables     \end{spacing}      **CODE TO ADD EXHIBIT.**               \noappendicestocpagenum     \renewcommand{\appendixtocname}{List of Exhibits}     \renewcommand{\appendixname}{Exhibit}     \renewcommand{\setthesection}{\roman{section}}     \renewcommand{\setthesubsection}{\roman{subsection}}          \begin{appendices}         \setcounter{chapter}{0}         \renewcommand{\thechapter}{\Alph{chapter}}         \renewcommand{\thesection}{\thechapter.\roman{section}}         \renewcommand{\thesubsection}{\thesection.\roman{subsection}}              \chapter{Mathematical Proofs}                  %Text Removed Here....     \end{appendices}      **CODE TO ADD APPENDIX.**               \renewcommand{\appendixname}{Appendix}     \begin{appendices}         \setcounter{chapter}{0}         \pagestyle{detailed}         \chapter{Data - The Quick Brown Fox}         \lettrine{D}{ata} Summary Goes Here.         \lipsum[1]         \newpage              \chapter{Data - Jumped Over the Lazy Dog}         \lettrine{D}{ata} Summary Goes Here.         \lipsum[1]         \newpage     \end{appendices}


title: How to switch page numbers to/from Roman numerals

text: I am trying to have the page numbering of the front matter in lower case Roman and the rest in Arabic numbers. I also don't want the number on the title page (though it should be counted). According to the documentation I found (ConTeXt reference manual (2011); ConTeXt garden wiki), I should use something along the lines of               \setuppagenumbering[state=stop]     % title page     \setuppagenumbering[state=start,conversion=romannumerals]     % rest of front matter, e.g. TOC     \setuppagenumbering[conversion=numbers]     % body     % back matter      Well, the suppression of page numbers on the title page works, but I can't seem to switch to Roman numerals.


title: How to connect nodes with TikZ?

text: I hope you help me. I want to connect these nodes as in the attached image. I tried it using chains, but I could'n get it. I'd like to use the best way to connect nodes.               \documentclass{article}     \title{New}     \usepackage{tikz}     \usetikzlibrary{chains}          \begin{document}     \begin{center}     \begin{tikzpicture}           \draw (6,3) node (problema) [draw,rounded corners,align=left,text width=50mm]{\small{\center \textbf{TITLE}\\ Text text text text text text text text text text text text text text text text text text text}};           \draw (0,0) node (causa1) [draw,rounded corners,align=left,text width=40mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (6,0) node (causa2) [draw,rounded corners,align=left,text width=40mm]{\small{ \textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (12,0) node (causa3) [draw,rounded corners,align=left,text width=40mm]{\small{ \textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};          \draw (problema) -| (causa1);     \draw (problema) -- (causa2);     \draw (problema) -| (causa3);           \draw (0,-2.2) node (indir1) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (0,-4.4) node (indir2) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (0,-6.6) node (indir3) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (0,-8.8) node (indir4) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};           \draw (6,-2.2) node (indir5) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (6,-4.4) node (indir6) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (6,-6.6) node (indir7) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (6,-8.8) node (indir8) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};      \draw (6,-11) node (indir9) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};           \draw (12,-2.2) node (indir10) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{Title}\\ Text text text text text text text text text text text text text text text text text text text}};          \end{tikzpicture}     \end{center}          \end{document}      ![enter image description here](http://i.stack.imgur.com/j6aQp.png)


title: TeX file with PSTricks figure won't compile

text: Consider the following file which is a modified version of the file Kernkraftwerk-DWR-v2-ps2pdf.tex: http://gratisupload.dk/vis/698163 (It contains more charachters than I'm allowed to enter here.) I have tried to clean up the code (and have so far converted some of the comments into Danish). My problem is that I cannot compile using               latex filename.tex     dvips -T 35cm,21cm -o filename.ps filename.dvi     ps2pdf filename.ps      but I don't know why. No DVI file is created but I'm clueless as to why that it. **Update** Now I can't even compile the original file. Maybe something has happened when I upgraded to TeX Live 2013. **Update 2** Maybe I should try and put `\rput` inside the `pspicture` environment.


title: Make every element of an array displaystyle?

text: Is there a way to make every element of an `array` be `\displaystyle`? I don't want to do something like `\everymath={\displaystyle}` (or whatever it should be) because I want this for a particular array only. Also, one of the column specifications is `p{5cm}` which makes it text mode. So _that_ column shouldn't be `\displaystyle`. (Or rather, the solution shouldn't choke on a text column. Any bright ideas?


title: How to align caption with table?

text: \documentclass[letterpaper,12pt]{article}          \begin{document}          \begin{table}     \caption{Test test test test test}     \begin{tabular}{c c c c}     \hline\noalign{\smallskip}     $V_{a}$ & $B$ & $r$ & $e/m$\\     (V) & (T) & (m) & (C/kg)\\     \hline\noalign{\smallskip}     1 $\pm$ 1 & 2.04 $\pm$ 0.04 & 2.36 $\pm$ 0.1 & 1 $\pm$ 1\\     \hline\noalign{\smallskip}     \end{tabular}     \end{table}          \end{document}      I'd like to keep the formating of the table above how it is. It is the caption that I'd like to change. I don't like how it seems to be hanging off the right side of the table. I think the caption should be aligned with the left side of the table. How would I do this?


title: How can include the full abstract of a citation in the References section using BibTeX?

text: I would like to have the abstract (specified in the `.bib` file) for each citation in a paper to appear in the References section. How can I accomplish this? The .bib file (generated by Mendeley) has the abstract specified so:               @article{RefName,     abstract = {really long abstract},     author = {Author, F M},     journal = {Nano Letters},     keywords = {key,words},     number = {12},     pages = {2728--2735},     title = {{The Title}},     volume = {6},     year = {2006}     }      The citation displays fine with               \bibliographystyle{plain}      but I would just like the full abstract included in the citation, something like > [1] F M Author. The Title. [ _Abstract here, or anywhere_.] _Nano Letters_ , > 6(12):2728-2735, 2006.


title: Remove border of top left table cell

text: I want to remove the border of the top left table cell (top-border and left border of this cell). My table looks like this:               \begin{table}[!ht]           \centering         \begin{tabular}{|c|c|c|c|}    \hline                  &  Item1 & Item2 & Item3 \\ \hline         Group1 & 0.8 & 0.1 & 0.1 \\ \hline         Group2 & 0.1 & 0.8 & 0.1 \\ \hline         Group3 & 0.1 & 0.1 & 0.8 \\ \hline         Group4 & 0.34& 0.33& 0.33 \\ \hline         \end{tabular}     \end{table}      Does somebody have a hint how i can do this?


title: Problem with font after upgrading to MacTeX 2013

text: I got a problem after upgrading to MacTeX 2013 today. When I try to produce a pdf file with pdflatex I get an error like this:               mktexpk: don't know how to create bitmap font for pfrr8r. mktexpk: perhaps pfrr8r is     missing from the map file     kpathsea: Appending font creation commands to missfont.log. ** WARNING ** Could not locate     a virtual/physical font for TFM "pfrr8r"...      Any help would be much appreciated. Edit: Here is an example of what I am trying to do.               \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage{blindtext}     \renewcommand{\rmdefault}{pfr}     \begin{document}     \blindtext     \end{document}      Something goes wrong when I add \renewcommand{\rmdefault}{pfr}.


title: Using infer from the proof package?

text: I am using the `\infer` command from the `proof` package. Few things that I am trying to do unsuccessfully:   1. How can I have some space between the elements of the proof? such as space between x and y with `\infer{x y}{z}`. I can use `\,`, but there should be a better way to do it, I think.   2. `\begin{center}` has no effect on any of the inference rules, and I still want to be able to center them.   3. How would I set up space between the inference rules without using `vspace`? Right now, they appear very crowded, one right under the other.


title: Left & Right text on title

text: I'm trying to have in a subsection title, a text on the left and another on the right, on the same line. Here's what I did:                \subsection {Right Text \hfill Left Text}      It works fine, but on the summary (table of contents), I also see the right text, but I only want to see the left one. How can I do that?


title: Document configuration via tags or labels?

text: > **This question led to a new package:**   >  `tagging` I'm trying to work out options for configuring a large memoir to multiple audiences via multiple editions. Obviously one method of doing this is by building a master set of sections and then combining them into several different master documents which are basically a string of `\input{}` commands. Another might be to define a set of section id environments and then include or exclude them with `\newcomment{} \commentson{} and commentsoff{}` Yet another way would be an inverse of this: to tag each section with one or more labels. Something like this:               \begin{tagged}{managers,library}     \chapter{A Simple Introduction}     ...     \end{tagged}     \begin{tagged}{sysprogs,library}     \chapter{A Complex Introduction}     ...     \end{tagged}     \begin{tagged}{sysprogs,administrators}     \chapter{How to erase the system}     ...     \end{tagged}      where I could then do something at the start like:               \usetag{sysprogs}      to build the "System Programmer" edition. Is there a package that will do something like this? * * * Accepted @Leo Liu's answer. Bril.


title: deluxetable* caption not displaying

text: I am trying to create a page-wide deluxetable using the two-column formatted ApJ article style. The caption displays when creating a single column deluxetable, but will not display when I use deluxetable*. I receive the following error: > "Package ltcaption error: Not allowed in longtable* environment" Here is my preamble and minimal compilable code:               \documentclass[apj]{emulateapj}     \usepackage{subcaption}     \usepackage{tablefootnote}     \begin{document}          %Table 1: Non-working example     \begin{deluxetable*}{cc}     \tabletypesize{\footnotesize}     \tablewidth{0.99\textwidth}     \tablecaption{This caption does not display}     \tablehead{     \colhead{col 1$^{1}$} &      \colhead{col 2}      }      \startdata     1 & 1 \\     1 & 1     \enddata     \tablenotetext{1}{Footnote}     \end{deluxetable*}          %Table 2: Working example     \begin{deluxetable}{cc}     \tabletypesize{\footnotesize}     \tablewidth{0.99\textwidth}     \tablecaption{This caption does display}     \tablehead{     \colhead{col 1$^{1}$} &      \colhead{col 2}      }      \startdata     1 & 1 \\     1 & 1     \enddata     \tablenotetext{1}{Footnote}     \end{deluxetable}          \end{document}


title: biblatex custom reference

text: I've been searching for a way to create "Custom References" with biblatex, but haven't found a solution to my problem. Among "normal sources" like Journal Articles, I need other references where I can put a custom sentence in it. Like "[3] This was performed by someone else". Is there an option to do that?                \documentclass{scrreprt}     \usepackage[refsection=chapter,style=chem-angew]{biblatex}     \usepackage[english]{babel}     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \begin{filecontents}{biblio.bib}          @article{entry1,          author = "George D. Greenwade",         title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",         year = "1993",         journal = "TUGBoat",         volume = "14",         number = "3",         pages = "342--351",                url=" www.ctan.org"     }          \end{filecontents}          \addbibresource{biblio.bib}          \begin{document}     \chapter{Test Chapter One}     \cite{entry1}     So far so good, now I need another reference that says 'This was performed by someone else'.     \printbibliography[heading=subbibliography]          \end{document}


title: Tkz-fct Package Error -- I can't find file `tikzlibrary'.

text: I tried to install and use the new `Tkz-fct` package. The installation was OK, MikTex Package Manager says that I've successfully installed the package but if I try the most easy example from the `userguide` (from 20. January 2011) I got the message:               ! I can't find file `tikzlibrary'.      and no file is produced... Could anyone help me? Thank much!


title: Capitalising first letter of each word in section headings using book class

text: I would like to convert the fist letter of each word in all my section headings to capitals automatically. Is it possible? ie `\section{This is my first section}` **Section 1. This Is My First Section**


title: Latex longtable misalignment after pagebreak

text: I have a longtable spanning multiple pages but the verticle alignment is forced at the pagebreak, so the first page is pushed down to the bottom while the second page is glued to the top. How can i force both to the top of the page (or to the center for that matter).               \documentclass[12pt]{article}     \usepackage{pgfplots}     \usepackage{pdflscape}     \usepackage{booktabs}     \usepackage{tabularx}     \usepackage{longtable}               \begin{document}               \section{Title}          \tiny     \     \vfill     \begin{longtable}[!htb]{>{\raggedright}p{0.5cm}>{\raggedright}p{3.5cm}>{\raggedleft}p{1.5cm}>{\raggedleft}p{1cm}>{\raggedleft}p{1cm}>{\raggedleft}p{1cm}>{\raggedleft}p{1cm}p{1cm}<{\raggedleft}}     \caption[Correlations]{This table displays x}\\\\          \toprule     \multicolumn{1}{l}{No} &     \multicolumn{1}{l}{Company Name} &     \multicolumn{1}{r}{Constituent} &     \multicolumn{1}{r}{1} &     \multicolumn{1}{r}{2} &     \multicolumn{1}{r}{3} &     \multicolumn{1}{r}{4} &     \multicolumn{1}{r}{N}\\     \midrule     \endfirsthead          \multicolumn{8}{c}{{\bfseries \tablename\ \thetable{} -- continued from previous     page}}\\          \toprule     \multicolumn{1}{l}{No} &     \multicolumn{1}{l}{Company Name} &     \multicolumn{1}{r}{Constituent} &     \multicolumn{1}{r}{1} &     \multicolumn{1}{r}{2} &     \multicolumn{1}{r}{3} &     \multicolumn{1}{r}{4} &     \multicolumn{1}{r}{N}\\     \midrule     \endhead          \midrule     \multicolumn{8}{r}{{Continued on next page}} \\\\     \midrule     \endfoot     \bottomrule     \endlastfoot     \input{"input.tex"}      \label{table:grid_dailyaverages}     \end{longtable}     \vfill     \     \end{document}      ![Result of compilation \(data obfuscated\) input.tex contains data \(8 columns\) with \\pagebreak at 30th line number which breaks the page to the next](http://i.stack.imgur.com/76FeP.png)


title: Sorting citations in \nocite

text: I have this problem that I simply cannot figure out despite having deep trawled the net. I would like to have two bibliographies. One that keeps citations that I cite in the text, and one for all citations (e.g. a complete publication list). The former should be ordered in the order I cite them, while the latter should be ordered by year. The problem for the latter is that I can make it ordered by year using the `\nocite{*}`, but they will be numbered in the (arbitrary) ordering they where written in bibtex. A min working example:               \documentclass{article}     \usepackage[backend=biber,style=numeric-comp,sorting=none]{biblatex}          \begin{filecontents}{mybib.bib}     @article{ref2014,       author = {First, Author},       volume = {54},       number = {2},       journal = {Phys. Rev. {\O}},       year = {2014},       title = {Funny title 1},       pages = {1--3}}     @article{ref2012,       author = {Second, Author},       volume = {54},       number = {2},       journal = {Phys. Rev. {\O}},       year = {2012},       title = {Funny title 2},       pages = {1--3}}     @article{ref2013,       author = {Third, Author},       volume = {54},       number = {2},       journal = {Phys. Rev. {\O}},       year = {2013},       title = {Funny title 3},       pages = {1--3}}     \end{filecontents}          \addbibresource{mybib.bib}          \begin{document}     \section{Interesting text}     \begin{refsection}[mybib]     Citing some stuff \cite{ref2013,ref2012} numbered in the order I cite     them\cite{ref2014}.     \printbibliography[title=Citations]        \end{refsection}          \begin{refsection}[mybib]     \nocite{*}      \printbibliography[sorting=ynt,title={Entire publication list sorted by year}]        \end{refsection}       \end{document}      Now my _Entire publication list sorted by year_ is sorted by year but numbered in the order `2,3,1`. I want it to be `1,2,3`. Can anyone help me?


title: Proper use of in:, \intitlepunct for @inbook entries in biblatex

text: The following code produces what are (to me) unexpected results and I would like to know where I am going wrong. Here's the code:               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @bookinbook{robber-early-years,       crossref  =   {robber-robberies},       title     =   {Robbing Trains: The Early Years},       pages     =   {33-245}}     @inbook{robber-greatest,       crossref  =   {robber-robberies},       title     =   {My Greatest Robbery Yet},       pages     =   {456--468}}     @book{robber-robberies,       author    =   {Robber, Great Train},       title     =   {A Robber's Life},       year      =   2014,       publisher =   {Fictitious Emporium Ltd.},       address   =   {Somewhere}}     \end{filecontents}     \usepackage{biblatex}     \makeatletter       \renewcommand*{\intitlepunct}{\addspace}       % http://tex.stackexchange.com/a/10686/39222       \renewbibmacro{in:}{%         \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}     \makeatother     \bibliography{\jobname.bib}          \begin{document}          \autocites{robber-early-years}{robber-greatest}          \printbibliography          \end{document}      What I expect this to do for entry types which use the `bibmacro` `in:` and which are not of type `@article` is to use `in` or `In` followed by a breakable space _rather than_ `in` or `In` followed by a colon etc. However, I get a full stop as well and I do not understand why: ![Unexpected full stops in bibliography](http://i.stack.imgur.com/qcu5E.png) I can avoid this by redefining the `@inbook` entry type:               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @bookinbook{robber-early-years,       crossref  =   {robber-robberies},       title     =   {Robbing Trains: The Early Years},       pages     =   {33-245}}     @inbook{robber-greatest,       crossref  =   {robber-robberies},       title     =   {My Greatest Robbery Yet},       pages     =   {456--468}}     @book{robber-robberies,       author    =   {Robber, Great Train},       title     =   {A Robber's Life},       year      =   2014,       publisher =   {Fictitious Emporium Ltd.},       address   =   {Somewhere}}     \end{filecontents}     \usepackage{biblatex}     \makeatletter       \renewcommand*{\intitlepunct}{\addspace}       % http://tex.stackexchange.com/a/10686/39222       \renewbibmacro{in:}{%         \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}     \makeatother     \bibliography{\jobname.bib}     \makeatletter     \DeclareBibliographyDriver{inbook}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{title}%       \newunit       \printlist{language}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{in:}%     %   \usebibmacro{bybookauthor}%     %   \newunit\newblock       \usebibmacro{maintitle+booktitle}%       \newunit\newblock       \usebibmacro{byeditor+others}%       \newunit\newblock       \printfield{edition}%       \newunit       \iffieldundef{maintitle}         {\printfield{volume}%          \printfield{part}}         {}%       \newunit       \printfield{volumes}%       \newunit\newblock       \usebibmacro{series+number}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \usebibmacro{publisher+location+date}%       \newunit\newblock       \usebibmacro{chapter+pages}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \iftoggle{bbx:related}         {\usebibmacro{related:init}%          \usebibmacro{related}}         {}%       \usebibmacro{finentry}}     \makeatother          \begin{document}          \autocites{robber-early-years}{robber-greatest}          \printbibliography          \end{document}      ![Hacked bibliography less unwanted full stops](http://i.stack.imgur.com/4h2Y5.png) But this is surely not the best way to do this. It strikes me as odd that the driver for `@inbook` tries to use the book author as well as the author. As I understand it, `@inbook` and `@bookinbook` are for precisely those cases in which the author of the whole is also the author of a distinct part. An example for `@bookinbook` mentioned in the manual is the collected works of an author. But in that case, you would not expect a distinct author and it seems silly to include the author twice when laying out the entry. This makes me think that I'm fundamentally misunderstanding something here - either about how the commands work or about the intended purpose of these entry types. If I stick to the standard definition of `in:`, I don't get spurious full stops but I do, of course, get the colon I wanted to get rid of. (This looks especially silly for non-article entries, in my view, and `in` is altogether unnecessary for article entries so eliminating the colon seemed a good option. The comment in the code is to the question I took the code from but I cannot get it to work 'right'.) Can anybody explain how to do this correctly and how these are intended to be used?


title: Numbers in Devanagari

text: ## First question Although the manual mentions that simple numbers would create Devanagari digits, somehow it is not working for me. The way I use it in .dn file is:               {\dn || 1-23||\\}      Then passing .dn file through pre-processor generates the corresponding section in .tex file as:               {dn .. \rn{1}{\rs -\re}\rn{23}..}      And the output in .pdf still does not have numbers in Devanagari. It looks like: ![image](http://i50.tinypic.com/28qvrc8.png) ## Second question Including devanagari package, using               \usepackage{devanagari}      changes the font style of page number digits on the page of contents. What might be the reason behind this? I tried to play around a lot to solve both the above issues, but was not able to solve them. Any help would be highly appreciated.


title: Subscript without text in math mode

text: I want e.g. `\bigtriangleup` as a subscript in math mode, but I do not want it as the subscript of any preceding symbol as `|` as in `|_{\bigtriangleup}`. I tried with `_{\bigtriangleup}` which does not work. Does anyone know a solution?


title: Remove "Chapter" prefix from ToC in amsbook class

text: I am struggling to make a small change to the Table of Contents of my `amsbook` document in `LyX`. Basically, I just want to change the ToC to say               1.   Something      instead of               Chapter 1.  Something      as it does currently (so, basically get rid of the Chapter bit). I would like to keep the Appendix name in the ToC, probably. I've already redefined `\@makechapterhead` to fix the chapter headings. I've tried to cut down my LyX document to something minimal which builds. There's probably more which could be taken out, but hopefully it's brief enough to understand!               \documentclass[12pt,oneside,british,reqno]{amsbook}     \usepackage{mathptmx}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=3cm,bmargin=2cm,lmargin=3cm,rmargin=3cm}     \pagestyle{plain}     \setlength{\parskip}{\bigskipamount}     \setlength{\parindent}{0pt}     \usepackage{color}     \usepackage{babel}     \usepackage{textcomp}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}          \makeatletter          \numberwithin{section}{chapter}          \usepackage{graphicx}          %Change (numbered) chapter style to something more plain     \renewcommand{\@makechapterhead}[1]{%     \global\topskip 2.5pc\relax       \begingroup       \fontsize{\@xxpt}{22}\bfseries%\centering         \thechapter\enspace\enspace\enspace #1\par \endgroup       \skip@34\p@ \advance\skip@-\normalbaselineskip       \vskip\skip@ }          % Change (un-numbered) chapter style to something more plain     \renewcommand{\@makeschapterhead}[1]{%     \global\topskip 2.5pc\relax       \begingroup       \fontsize{\@xxpt}{22}\bfseries%\centering       #1\par \endgroup       \skip@34\p@ \advance\skip@-\normalbaselineskip       \vskip\skip@ }          % Make chapter lines of TOC be BOLD     \def\l@chapter{\@tocline{0}{8pt plus1pt}{0pt}{}{\bfseries}}          \makeatother          \begin{document}          \tableofcontents{}          \chapter{Something}     \section{First Section}     \section{Second Section}     Some text          \chapter{Something Else}     \section{Another Section}          \appendix          \chapter{Something in Appendix}          \end{document}


title: \DeclareNumChars and commands in page field

text: I am creating a tools to manage manuscripts in classical philology. These manuscript are paginated by folio, each folio have a recto and a verso. So when citing a manuscript, we says the folio and the information about recto or verso. For example : > Paris, BNF, Grec 1470, f. 23r-25v Means "Greek manuscript 1470 of BNF in Paris, folio 23 recto to folio 25 verso. I can declare new characters in numbering of page with :               \DeclareNumChars*{vr}      That works fine : the pagination prefix (folio, which I have declared) is correctly put. However, as I don't know how I would like to print the folio information, I made two command : `\recto` and `\verso`, that I used in my page field.               \newcommand{\recto}{r}     \newcommand{\verso}{v}      Which I hope to change it, if needed, by               \newcommand{\recto}{\textsuperscript{r}}     \newcommand{\verso}{\textsuperscript{v}}      However, the use of these command makes `\DeclareNumChars*{vr}` does not work. Is there any solution ? Full preamble example :               \documentclass{article}     \usepackage[citestyle=verbose]{biblatex}     \newcommand{\verso}{v}     \newcommand{\recto}{r}     \DeclareNumChars*{vr}     \bibliography{biblio.bib}     \begin{document}     \cite{P1470}     \end{document}      And the file biblio.bib (indeed, it's more complexe, because it's a personnal entrytype)               @book{P1470,        Title={Paris BNF 1470},        Bookpagination={folio},        Pages={23\recto-25\verso}     }


title: How to backup custom fonts and packages

text: I'm about to format my computer but I have installed a lot of TeX fonts and some useful TeX packages. I'd like to backup them, especially the fonts, because it took me a long long time to install but I'm afraid of forgetting important folders / files. What are the best practises to do such a thing ? I'm running under OSX with MacTeX Any suggestion welcome, thanks !


title: Curves in polar coordinates

text: Why there are different units used for rectangular and polar coordinates?               \begin{tikzpicture}[scale=2]     \draw[->] (-1,0) -- (1,0);     \draw[->] (0,-1) -- (0,1);     \draw node [red] at (-1,.25) {\scriptsize{Kardioida $r=5-5\sin \theta$}};     \draw[color=red,domain=0:6.28,samples=200,smooth] plot (canvas polar cs:angle=\x r,radius=      {5-5*sin(\x r)});    %r = angle en radian     \end{tikzpicture}


title: Table spanning two columns creates hole in text

text: I am writing an article in two columns:               \documentclass[a4paper,11pt,twocolumn]{jarticle}      And at one point I include a table spanning 2 columns.               text before table          \begin{center}     \begin{table*}[ht]     ...     \end{table*}     \end{center}          text after table      The table is placed at the top of the following page. This is fine. What troubles me, that there are approximately 3 white lines between `text before table` and `text after table` Please, how can I remove this white space?


title: Show all available fields in references

text: I'm using bibtex and I create my references with `\bibliography{myref}`. My question is what to do so that everything is shown. An example:               @misc{Clason,     author = {Clason,Christian},     title = {{Numerische Mathematik I}},     howpublished = {Vorlesungsskript},     url= "\url{http://www.uni-graz.at/people/clason/teaching/numa12/NuMaSkript.pdf}",     year={2012},     Institution={{Institut für Mathematik und Wissenschaliches Rechnen     Karl-Franzens-Universität Graz}},     }      Do my BibTeX entry and LaTeX not show the Institution and the URL?


title: Why doesn't "double" work in the options list of a scope?

text: An example document:               \documentclass[convert={size=320}]{standalone}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}         \begin{scope}[line width = 2pt, red]             \foreach \x in {1, 2, 3, 4} {                 \draw (\x, 0) -- (\x, 5);             }         \end{scope}         \begin{scope} [ line width = 2pt,                         color = green!80,                         double distance = 2pt,                         double = blue          % <--- This doesn't have any effect                         ]             \draw (0, 4) -- (5, 4);         \end{scope}         \begin{scope} [ line width = 2pt,                         color = green!80,                         double distance = 2pt,                         every path/.style = {double = blue}                         ]             \draw (0, 3) -- (5, 3);         \end{scope}         \begin{scope} [ line width = 2pt,                         color = green!80,                         every path/.style = { double distance = 2pt,                                               double = blue                                               }]             \draw (0, 2) -- (5, 2);         \end{scope}         \begin{scope} [every path/.style = { line width = 2pt,                                              color = green!80,                                              double distance = 2pt,                                              double = blue                                              }]             \draw (0, 1) -- (5, 1);         \end{scope}     \end{tikzpicture}          \end{document}      The result: ![](http://junk.orderofthehammer.com/j2013/double.png) I don't understand this behaviour. Why do all the other options in the scope options list apply to the drawn paths, but not "double"? The other options can be put in the scope options list or in the `every path/.style` options list within the scope options list, and they'll work either way. But not "double". The PGF/TikZ manual, extensive though it is, did not illuminate things for me.


title: How to make a link open multiple pages when clicked?

text: I have to create a hyperlink which opens two links with one click. Is it possible using LaTeX? I'm using `\href{<url>}{Open two links}`.


title: Tooltip that works with all pdf readers

text: Is it possible to get tooltips into a LaTeX pdf? I am working on my CV. I would like to show some more information on my electronic version once you swipe over that field with the mouse. i.e. when swiping with the mouse over education I want to show my subjects taken in undergrad through a tooltip. Is this possible and if yes would if work for all kind of pdf readers?


title: Making table fill the page vertically

text: I have several tables in my document that are _just_ a bit too small to fill the entire page, vertically. I'd like to stretch the table, either by adding empty lines at the bottom, or by stretching the lineskip, so that the table fills the text area. How would I go about this?               \documentclass{scrbook} % because that is what I use          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{tabularx}          \usepackage{showframe}     \usepackage{lipsum}          \begin{document}          \begin{table*}     \begin{tabularx}{\linewidth}{|X|X|}     \hline     \textbf{Column A} & \textbf{Column B}\\     \hline     \lipsum[1] & \lipsum[2] \\     \hline     \end{tabularx}     \end{table*}          \end{document}      I want the red-marked whitespace to disappear, i.e. the table borders to match the textarea borders. ![enter image description here](http://i.stack.imgur.com/Yront.png) Note that this is contrived. In the real document, this is about `sidewaystable` \- making the non-textarea height much more disruptive for the overall layout, and removing the option of simply having surrounding text take up the whitespace.


title: How to prevent \cite at the end of the sentence start a new line with a dot

text: When I end a sentence like this:               Here is something you should read \cite{name}.      Sometimes the end of the sentence coincies with the end of a row. In this case the next line begins with the dot at the end of the sentence. Putting the dot _before_ the `\cite`               Here is something you should read.\cite{name}      solves the problem, but I checked some scientific articles and they all put the dot _after_ the `\cite` and do not get this adverse effect. How can I prevent the dot to jump to the next line? EDIT: A minimum working example:               \documentclass[a4paper,11pt,twocolumn]{jarticle}     \usepackage{evocomp}          \begin{document}     ----------------Here is something you should read\cite{lal}.     \end{document}      It seems that the problem is in the `evocomp` package I am using.


title: Using BibTex as a general database for generating a table

text: I want to create an overview table of some data. More specifically, I have some named objects and for each of these I have some properties. Example data and schematic of output:               + -------+--------+-------+--------+     | Object | Edible | Color | Size   |     + -------+--------+-------+--------+     | Apple  | yes    | green | small  |     | Cat    | no     | brown | medium |     + -------+--------+-------+--------+      Instead of entering the table manually, I'd like to create something like a database and then generate the table based on a format description. I thought this could maybe be done with BibTex. I would create a bib file with content like this:               @misc{apple,         name={Apple},         edible={yes},         color={green},         size={small}     }     @misc{cat,         name={Cat},         edible={no},         color={brown}         size={medium}     }      And then create a (very) custom bibliography style to turn this into a table. I could create some external script to transform the bib file into a table (JSON would probably be a better data format then) but I'd like to use TeX tools. How can I get from this (or similar) bib to a table instead of a list (like usually with references)?


title: Markup Haskell sources in complex structured document with `lhs2TeX`

text: # Simple task Suppose there is a `example.tex` file with Haskell listings:               \documentclass{article}     \usepackage{fancyvrb}     \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}          \begin{document}     \begin{code}     sequence :: [IO a] -> IO [a]     sequence      [] = return []     sequnce (c : cs) = do       x <- c       xs <- sequence cs       return (x : xs)     \end{code}     \end{document}      ![easy before](http://i.stack.imgur.com/TIBpZ.png) Let's prepare this file to be processed via `lhs2TeX`:               \documentclass{article}     %include lhs2TeX.fmt     %include lhs2TeX.sty          \begin{document}     \begin{code}     sequence :: [IO a] -> IO [a]     sequence      [] = return []     sequnce (c : cs) = do       x <- c       xs <- sequence cs       return (x : xs)     \end{code}     \end{document}        * `lhs2TeX example.tex -o example_new.tex`   * `pdflatex example_new.tex` What we've got: ![easy after](http://i.imgur.com/UneyFcM.png) It is exactly how I want sources to look like. # Real-world example In real world there are often many files with haskell sources collected by `\input` command in main file: `hardmod.tex`:               \documentclass{disser}     \usepackage{fancyvrb}     \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}     \begin{document}     \input{first}     \input{second}     \end{document}      `first.tex`:               Some stuff          \begin{code}     sequence :: [IO a] -> IO [a]     sequence      [] = return []     sequnce (c : cs) = do       x <- c       xs <- sequence cs       return (x : xs)     \end{code}          and more words.      `second.tex`:               Another example of code:     \begin{code}     ap :: Monad m => m (a -> b) -> m a -> m b     ap mf mx = do       f <- mf       x <- mx       return (f x)     \end{code}     And a conclusion.       `lhs2TeX` produces whole latex document, that why it is kinda tricky to compile `hardmod.tex` with nice sources prepared by `lhs2TeX`. **Question** : how can `lhs2TeX` could be used in complex structured document like this to get nice source formatting?


title: Making a log plot with negative values "continuous"

text: I'm trying to plot some data on a log axis using PGFplots. The data include negative values. Obviously, these can't be displayed on the plot, but I'd like the plot to "run into" the lower edge to indicate that it continues to lower values. How can I do this? Here's an example using the function `x^2 - 1` (although the actual data I'm working with is read from files and stored in a macro, I'm not plotting a formula). If I plot the function on a log axis,               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}      \begin{tikzpicture}       \begin{axis}[ymode=log,domain=-5:5,unbounded coords=jump]        \addplot {x^2 - 1};       \end{axis}      \end{tikzpicture}     \end{document}      it looks like this: ![current behavior](http://i.stack.imgur.com/FG7cg.png) I would like to get it to look like this: ![desired behavior](http://i.stack.imgur.com/5JRXk.png) In this case I managed to fake it by adding in an extra point below the range of the graph, but that doesn't help me when I'm reading in data points from a file. I _can_ write a script to preprocess my file to add in extra data points, if that's what it takes, but I'd prefer to take care of it by tweaking a setting in PGFplots, or doing something else that's not too complicated in pure (La)TeX if possible.


title: Installing latexdiff on a Mac

text: I need to install latexdiff on my Mac, but have been unable to. The simplest approach `sudo port install latexdiff` gives me the error `sudo: port: command not found`. Alternative installation instructions on CTAN are unclear to me. Can latexdiff be installed on a Mac from Terminal using the files available on CTAN? If possible, how can this be done?


title: Are my programming skills transferable to LaTeX and TikZ?

text: I just want to ask what is LaTeX and TiKZ programming language like? Basically, I am looking at projects available in my final year. The project I looked at is a graphical interface to draw graphs in LaTeX which looks quite interesting. I have skills in java, C, C++ and HTML, but will my programming knowledge be transferable to LaTeX and TikZ? Also, I have briefly used LaTeX before to structure my reports, and didn't realize it can produce graphs :o


title: New installation – Texmaker Quick Build says: "Could not start the command"

text: I just downloaded and installed Texmaker. I've never used any (La)TeX before. When I click the Run button with an arrow next to "Quick build" I get an error saying "Could not start the command". Why? What do I need to do?


title: Keep showing "could not start the command"

text: I just install TexStudio and I'm learning it from scratch. I compiled the following               \documentclass[a4paper,12pt]{article}     \begin{document}     Homework      \end{document}      but it keeps showing the err: > Could not start the command: latex -src -interaction=nonstopmode "test".tex Does anyone know how to deal w that?


title: latex to lualatex error at compilation

text: > Solution: having an up to date system I've download a template from LaTeXtemplates: http://www.latextemplates.com/template/classicthesis-typographic-thesis This is a template I want to use but using lualatex. I've start modification of all the document: comment the package not needed, and so on. But I'm done with an error: `l.18 \RequireXeTeX` I don't know wich package need XeTeX. Here is the log:                   This is LuaTeX, Version beta-0.60.2-2010070109 (rev 3730)  (format=lualatex 2014.4.15)  21 MAY 2014 09:13     **main     (./main.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov     ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1     9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san     skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn     orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian     , estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po     rtuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded.     (/usr/share/texmf-texlive/tex/latex/koma-script/scrreprt.cls     Document Class: scrreprt 2009/07/24 v3.04a KOMA-Script document class (report)     (/usr/share/texmf-texlive/tex/latex/koma-script/scrkbase.sty     Package: scrkbase 2009/07/24 v3.04a KOMA-Script package (KOMA-Script-dependent      basics and keyval usage)          (/usr/share/texmf-texlive/tex/latex/koma-script/scrbase.sty     Package: scrbase 2009/07/24 v3.04a KOMA-Script package (KOMA-Script-independent      basics and keyval usage)          (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14     )     (/usr/share/texmf-texlive/tex/latex/koma-script/scrlfile.sty     Package: scrlfile 2009/03/25 v3.03 KOMA-Script package (loading files)          Package scrlfile, 2009/03/25 v3.03 KOMA-Script package (loading files)                       Copyright (C) Markus Kohm          ))) (/usr/share/texmf-texlive/tex/latex/koma-script/tocbasic.sty     Package: tocbasic 2009/06/08 v3.03b KOMA-Script package (handling toc-files)     )     Package tocbasic Info: omitting babel extension for `toc'     (tocbasic)             because of feature `nobabel' available     (tocbasic)             for `toc' on input line 117.     Package tocbasic Info: omitting babel extension for `lof'     (tocbasic)             because of feature `nobabel' available     (tocbasic)             for `lof' on input line 118.     Package tocbasic Info: omitting babel extension for `lot'     (tocbasic)             because of feature `nobabel' available     (tocbasic)             for `lot' on input line 119.     Class scrreprt Info: You've used standard option `openright'.     (scrreprt)           This is correct!     (scrreprt)           Internaly I'm using `open=right'.     (scrreprt)           If you'd like to set the option with \KOMAoptions,     (scrreprt)           you'd have to use `open=right' there     (scrreprt)           instead of `openright', too.     Class scrreprt Info: File `scrsize11pt.clo' used to setup font sizes on input l     ine 1271.          (/usr/share/texmf-texlive/tex/latex/koma-script/scrsize11pt.clo     File: scrsize11pt.clo 2009/07/24 v3.04a KOMA-Script font size class option (11p     t)     )     (/usr/share/texmf-texlive/tex/latex/koma-script/typearea.sty     Package: typearea 2009/07/24 v3.04a KOMA-Script package (type area)          Package typearea, 2009/07/24 v3.04a KOMA-Script package (type area)                       Copyright (C) Frank Neukam, 1992-1994                       Copyright (C) Markus Kohm, 1994-          \ta@bcor=\skip41     \ta@div=\count79     \ta@hblk=\skip42     \ta@vblk=\skip43     \ta@temp=\skip44     Package typearea Info: These are the values describing the layout:     (typearea)             DIV  = 10     (typearea)             BCOR = 14.22636pt     (typearea)             \paperwidth      = 597.50793pt     (typearea)              \textwidth      = 408.2971pt     (typearea)              DIV departure   = -3%     (typearea)              \evensidemargin = 44.38632pt     (typearea)              \oddsidemargin  = 0.28453pt     (typearea)             \paperheight     = 845.04694pt     (typearea)              \textheight     = 514.20023pt     (typearea)              \topmargin      = 12.2347pt     (typearea)              \headheight     = 17.0pt     (typearea)              \headsep        = 20.40001pt     (typearea)              \topskip        = 11.0pt     (typearea)              \footskip       = 47.60002pt     (typearea)              \baselineskip   = 13.6pt     (typearea)              on input line 1115.     )     \c@part=\count80     \c@chapter=\count81     \c@section=\count82     \c@subsection=\count83     \c@subsubsection=\count84     \c@paragraph=\count85     \c@subparagraph=\count86     \abovecaptionskip=\skip45     \belowcaptionskip=\skip46     \c@pti@nb@sid@b@x=\box26     \c@figure=\count87     \c@table=\count88     \bibindent=\dimen102     ) (./classicthesis-config.tex     \c@dummy=\count89          (/usr/share/texmf-texlive/tex/latex/lipsum/lipsum.sty     Package: lipsum 2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text     File: lipsum.dtx 2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text     \c@lips@count=\count90     )     (/usr/share/texmf-texlive/tex/xelatex/polyglossia/polyglossia.sty     Package: polyglossia 2009/01/25 v1.0.2 Babel replacement for XeLaTeX          (/usr/share/texmf-texlive/tex/latex/etoolbox/etoolbox.sty     Package: etoolbox 2009/08/06 v1.8 e-TeX tools for LaTeX          (/usr/share/texmf-texlive/tex/latex/etex-pkg/etex.sty     Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)     \et@xins=\count91     ))     (/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty     Package: fontspec 2008/08/09 v1.18 Advanced font selection for XeLaTeX          (/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty     Package: ifxetex 2009/01/23 v0.5 Provides ifxetex conditional     )     !       ********************************************      * XeTeX is required to compile this document.      * Sorry!      ********************************************.     \RequireXeTeX ...********************************}                                                       \endgroup \fi      l.18 \RequireXeTeX          ? x               Here is how much of LuaTeX's memory you used:      1703 strings out of 256747      100000,552014 words of node,token memory allocated 253 words of node memory still in use:        1 hlist, 1 rule, 42 glue_spec, 1 if_stack, 1 write, 1 dir nodes        avail lists: 2:15,3:1,4:3,5:2,6:31,7:1,9:3,10:3      5397 multiletter control sequences out of 65536+50000      15 fonts using 602239 bytes      36i,1n,48p,848b,48s stack positions out of 5000i,500n,6000p,200000b,50000s     No pages of output.     PDF statistics: 0 PDF objects out of 1000 (max. 8388607)      0 named destinations out of 1000 (max. 131072)      1 words of extra memory for PDF output out of 10000 (max. 10000000)      I can give the modification I made in the config-file if needed


title: how can I change the exponential value to decimal?

text: I want to make my plot completely in decimal. I used the function               \pgfkeys{         /pgf/number format/precision=1,          /pgf/number format/fixed zerofill=true     }      to make my decimal like 2.0 instead of only 2. Now I am facing a problem that my value which was 0.2 now changed to 2.0 x10exp2. I want it back to 0.2. Please help. Code and pic is given.![plot after using pgfkeys function](http://i.stack.imgur.com/Ifdcy.png)               \begin{figure}[htb!]     \centering     \begin{tikzpicture}     \pgfkeys{          /pgf/number format/precision=1,          /pgf/number format/fixed zerofill=true     }     \begin{axis}[     ybar, ymax=4, ymin=0,     %enlargelimits=0.10,     legend style={at={(0.5,-0.20)},     anchor=north,legend columns=-1},     ylabel={Surface Roughness (nm)},     xlabel={Substrate},     symbolic x coords={Glass,Silicon,PEN},     xtick=data,     nodes near coords,     nodes near coords align={vertical},     ]     \addplot [fill= white] coordinates {(Glass,2.4) (Silicon,1.1) (PEN,1.8)};     \addplot [fill = black] coordinates  {(Glass,1.1) (Silicon,0.2) (PEN,1.0)};          \legend{Profilometer,AFM}     \end{axis}     \end{tikzpicture}      \caption{Substrate Vs IBD Surface Roughness(Avg)}     \label{Subvibd}     \end{figure}


title: Inputting multiple files in LaTeX

text: Suppose I have a directory containing a bunch of LaTeX source files, and I want to input all of them into a single main file. I could do this by saying               \input{dir/file1.tex}     \input{dir/file2.tex}     \input{dir/file3.tex}     ...      Is there some way to input all of files in the directory "dir" using a single command? This is useful, for example, if I want to keep adding files to the directory "dir" but don't want to have to remember to add further \input commands to the main file.


title: Ignoring actual height and width of box

text: I would like the following TikZ qtree to come out symmetric:               \documentclass{article}     \usepackage{tikz-qtree}     \begin{document}     \Tree[.O [.N O R ] [.O N \fbox R ] [.R N O ]]     \end{document}      (so that, in particular, the edge from the root to its child 'O' is vertical). Since               \documentclass{article}     \usepackage{tikz-qtree}     \begin{document}     \Tree[.O [.N O R ] [.O N R ] [.R N O ]]     \end{document}      _is_ symmetric, obviously it's the `\fbox` that's preventing this; so I thought that something like:               \documentclass{article}     \usepackage{tikz-qtree}     \begin{document}     \Tree[.O [.N O R ] [.O N {\smash{\fbox R}\phantom R} ] [.R N O ]]     \end{document}      would work, but it seems actually to be _worse_. (I think that this doesn't really have anything to do with qtree, which is why I didn't put it in the tags, but I couldn't think up an equivalent example without it.) (EDIT: Per @DavidCarlisle's advice, I made all code snippets compile-able.)


title: Change page margin inside own environment

text: I would like to define an environment, that inserts a page with different margins than defined in the preamble. I tried using the following LaTeX code.               \documentclass[a4paper,10pt]{article}          \usepackage[left=5.2cm,top=2cm,right=1.5cm,bottom=2cm,nohead,nofoot]{geometry}     \usepackage{blindtext}          \newenvironment{myenv}{       \newgeometry{left=1.5cm,top=20cm,right=1.5cm,bottom=2cm,nohead,nofoot}       \blindtext[2]     }{       \newpage            \restoregeometry     }          \begin{document}          \begin{myenv}          \end{myenv}     \blindtext[10]     \end{document}      Unfortunately on the second page there is an unexpected page break after a few lines. The following code produces the desired result.               \documentclass[a4paper,10pt]{article}          \usepackage[left=5.2cm,top=2cm,right=1.5cm,bottom=2cm,nohead,nofoot]{geometry}     \usepackage{blindtext}          \newenvironment{myenv}{       \newgeometry{left=1.5cm,top=20cm,right=1.5cm,bottom=2cm,nohead,nofoot}       \blindtext[2]     }{       \newpage     }          \begin{document}          \begin{myenv}          \end{myenv}     \restoregeometry     \blindtext[10]     \end{document}      However I do not want to write `\restoregeometry` manually each time I use `myenv`. Can anyone explain me the difference between the two code pieces above and provide a solution for this problem? Thanks.


title: How to reposition or remove middle pagination labels?

text: Right now, I am using the following fancy headers as required by my school's department policy. However, when I look at the footer, it has a number for each page in the middle of my footer label. I want to move the page number to the bottom right or completely remove it from the bottom middle of the footer. I added the page number to the top right, which I like, but it still remains in the bottom middle as well. I followed the steps on this page: Position of page numbers but it only removes my current header/footer information, which is not helpful. I only want to remove the page lettering in the bottom middle of the page. Here is the code I'm using currently for my fancy header/footer. This part is in the package inclusion area:               \usepackage{fancyhdr} %%For headers/footers     \pagestyle{fancy} %%For fancy headers      This part is in the document:               \fancyhead[L]{M 414 - DETERMINISTIC MODELS } %%Header     \rhead{Lecture Notes}     \fancyfoot[L]{NAME INFO - UNIVERSITY OF MONTUCKY: MATH DEPARTMENT} %Footer     \rhead{}     \renewcommand{\footrulewidth}{1pt}          %Fix headers on Table of Contents and List of Figures:     \fancypagestyle{plain}{     \fancyhead{}     \fancyfoot{}     \fancyhead[L]{M 414 - DETERMINISTIC MODELS} %%Header     \fancyhead[R]{Lecture Notes}     \fancyfoot[L]{NAME INFO - UNIVERSITY OF MONTUCKY: MATH DEPARTMENT} %Footer     \rhead{}     \renewcommand{\footrulewidth}{1pt}     }          \rhead{\thepage}


title: Section referencing disabled by \renewcommand

text: The sections in my article have to be re-styled as follows :               \renewcommand{\section}[1]{\medskip \addtocounter{section}{1}\flushleft      \textbf{\Roman{section}. \ #1}\medskip \setcounter{subsection}{0}     \setlength{\parindent}{5ex}}      However, I am unable to refer to my sections using `\label` and `\ref` commands. Referencing works fine is the above code is commented out. What could be the issue? edit: The referencing needs to be in Roman too.


title: fitting a wide table in centre of a page

text: I want to fit this table in the centre of a page. I couldn't find any way to fit this table on the page. Can anyone suggest a solution?               \documentclass{article}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{amsmath}          \usepackage{graphicx}          \begin{document}     \begin{table}[htbp]       \centering       \resizebox{0.25\textwidth}{!}{\begin{minipage}{\textwidth}          \begin{tabular}{ c c c c c }     \toprule     \textbf{MODEL} & \textbf{IH}& \textbf{NH}&\textbf{NH}&\textbf{NH}\\     \midrule\\     \addlinespace[-2ex]     $ 50\%$ &     $ \begin{pmatrix}  0.101  &0.00028 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.114 - 0.000036 i\\ -0.000066 - 0.018 i&0.00101 - 6.78\times10^{-6} i&0.17 + 0.000036 i \end{pmatrix}$ &    $ \begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$&    $ \begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$      &$\begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$\\     \addlinespace[4.5ex]     $70\%$ & $ \begin{pmatrix}  0.101  &0.00028 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.114 - 0.000036 i\\ -0.000066 - 0.018 i&0.00101 - 6.78\times10^{-6} i&0.17 + 0.000036 i \end{pmatrix}$ &    $ \begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$&    $ \begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$      &$\begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$\\     \addlinespace[4.5ex]     $ 90\%$ &$ \begin{pmatrix}  0.101  &0.00028 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.114 - 0.000036 i\\ -0.000066 - 0.018 i&0.00101 - 6.78\times10^{-6} i&0.17 + 0.000036 i \end{pmatrix}$ &    $ \begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$&    $ \begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$      &$\begin{pmatrix}  0.101 &0.00027 - 0.015 i &-0.000066 - 0.018 i\\0.00027 - 0.015 i & 0.00101 - 6.78\times10^{-6}i & 0.115 - 0.000036 i\\ -0.000066 - 0.018i&0.00101 - 6.78\times10^{-6} i&0.116 + 0.000036 i \end{pmatrix}$\\     \bottomrule     \end{tabular}           \end{minipage}}     \end{table}     \end{document}


title: Font Issue -- Times and Computer Modern work but nothing else

text: This code seems to work:               \documentclass{article}     \usepackage{times}          \begin{document}          This is a test.           \end{document}  %End of document.      But, I have had no luck with any fonts other than Times and Computer Modern. I ran the code here (http://gael-varoquaux.info/computers/garamond/) to attempt Garamond, and I received the following error:               pdflatex> LaTeX font warning: Font shape `T1/pgm/m/n' undefined      This spirals, and I finally get the LaTeX font warning that "some fonts were not available, defaults substituted." Even if I run the deceptively simple:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{garamond}          \begin{document}          This is a test.          \end{document}      It doesn't work and I still get the same pdflatex error message. I've also tried running this in LuaLaTeX and XeLaTeX, and it doesn't work. Further, this seems to happen with many, many font distributions. I can use LuaLaTeX and an ODF or TT font; this seems to work, but I don't like the mixture of regular math and the ODF/TT. I can't even use Euler for math! I am running a Windows 8 machine with TeXnicCenter. This originally started in LyX, where I tried changing the fonts through the menu, and I received very similar error messages. When I do an internet search, there seems to be a lot of Windows 8 machines that have the same problem. Or is it something that I am doing incorrectly? I'm a bit of a novice, but I'm willing to try to fix the problem. I want a different font :/ Thanks!


title: Animated scrolling marquee across an entire page.

text: I would like to have a scrolling marquee across the entire width of a page. I am intending this for a Beamer presentation, but the solution doesn't necessarily have anything to do with beamer. I would rather not use Beamer's built-in `\animate` command because (1) I would like to have control over the frame rate; and (2) I would like the slide to appear as a single page in the PDF. I therefore started playing around with the `animate` package for PDF animations. The tricky part is that I would like to have the marquee scroll _on top of_ some other text/images on the slide. My first instinct was to do something like this:               \begin{amimateinline}[autoplay,                           begin={\begin{tikzpicture}[overlay]},                           end={\end{tikzpicture}}]{10}       \multiframe{20}{rmarqueexpos=1.0+-0.05}{         \node at ($(current page.west)!\rmarqueexpos!(current page.east)$) {The marquee text!};       }     \end{animateinline}      The problem with this approach is that `animateinline` apparently expects its contents to be a non-zero-width box, and `tikzpicture` overlays are not apparently typeset as a box (I'm assuming they act like floats). My second, more successful approach was to put the `animateinline` inside of an overlaid node that is centered on `(current page.center)`. The difficulty there is that `animateinline` apparently also expects each frame of the animation to be the same width. Therefore, I have to pad the right and left sides of the marquee with whitespace to make it work. Here is the closest I have gotten so far:               \documentclass{article}     \pagestyle{empty}     \usepackage{tikz}     \usepackage{animate}     \begin{document}       \LARGE Lorem ipsum dolor sit amet, consectetur adipiscing       elit. Vivamus nibh nibh, porttitor eu porttitor ac, tincidunt ut       massa. Nullam quis semper erat. Ut non massa eu est aliquam suscipit       at vel mi. Fusce commodo porttitor metus rhoncus bibendum. Ut       fermentum pharetra lacus, id ornare dolor pretium tempor. Sed       scelerisque mollis nisi quis malesuada. Mauris vitae nisi vitae       augue gravida ultrices et nec metus. Quisque egestas, libero vel       tempor dignissim, dolor tellus lacinia felis, nec imperdiet tortor       ipsum dapibus ipsum. Quisque sodales eleifend molestie. Duis ac       tortor velit. Nullam non justo a nunc tempus dignissim. Praesent       condimentum ullamcorper mi, ut molestie odio placerat at. Duis       consectetur consequat luctus. Nullam neque sem, sodales non porta       ut, commodo vitae justo. Aenean eu facilisis quam. Sed dui nulla,       venenatis a ullamcorper ac, blandit non dolor.            \begin{tikzpicture}[remember picture,overlay]         \node at (current page.center) {           \begin{animateinline}[autoplay]{10}             \multiframe{20}{rmarqueexpos=1.0+-0.05}{                   \setbox0=\hbox{\scalebox{2}{\Huge The marquee text!}}               \dimen0=\wd0 % The width of the marquee               \dimen1=\textwidth %% \dimen1 will be the lefthand padding               \advance\dimen1 by \dimen0               \dimen2=\dimen1 %% \dimen2 will be the righthand padding               \advance\dimen2 by -\rmarqueexpos\dimen1               \advance\dimen2 by -\dimen0               \hspace*{-\dimen0}\hspace*{\rmarqueexpos\dimen1}\box0\hbox to \dimen2{}             }           \end{animateinline}         };       \end{tikzpicture}     \end{document}      ~~The problem with that is that the margins are a bit off (probably due to my hacked padding).~~   **Edit:** I solved this problem: It was just an off-by-one error in the `multiframe` for-loop. See my answer for details. What am I doing wrong (besides being crazy enough to try and do an animated marquee in TeX)? Is there a better way to do this?


title: How can I draw circled integers with the same size by TikZ?

text: I used the statement               \newcommand*\circled[1]{\tikz[baseline=(char.base)]{     \node[shape=circle,draw,inner sep=2pt] (char) {#1};}     }      to draw some circled integers. Ex.               \circled{$X'$} \circled{$1'$} \circled{$1$} \circled{$2'$} \circled{$2$}       But these are not same size. How can I fix it? ![output](http://i.stack.imgur.com/NI3zs.jpg)


title: Double tagged equations?

text: In the following example ![enter image description here](http://i.stack.imgur.com/ZXlJR.png) the inequality (2.26) is obtained in the environment `equation`, but the equations (2.27) and (2.28) by dirty tricks, destroying the structure of the document. This is because additional tags (i) and (ii) are needed on the left- hand side of lines. (This is, in fact, some kind of an enumeration). How to obtain such additional tags in equations or even more: produce a list with equations of its elements? I am trying to find better solutions then How to number equations with a list environment _Remark._ According to some wishes a (very ugly) code snippet. I hope that it would be enough instead of MWE and I know, that one should not use LaTeX in the presented way.               Indukcja matematyczna pozwala przenieść nierówność \eqref{(2.25)} na dowolną liczbę składników:     \begin{equation}     \label{(2.26)}      J(X_1+\ldots +X_n)\leqslant \alpha_1^2J(X_1)+\ldots +\alpha_n^2J(X_n),%$ \hfill (2.26)      \end{equation}          \vspace{2mm}     \noindent gdzie $X_1,\ldots ,X_n$ są niezależne oraz $\alpha_i\in[0,1],\; \sum_{i=1}^n\alpha_i=1$. Nierówność (2.26) udowodnili Stam (1959) oraz Blachman (1965), nie korzystając z lematu 2.2. Nierówność (2.26) można zapisać w kilku      równoważnych postaciach:          \vspace{2mm}     \noindent$\;\;${\it (i) $\;\;\;J(\sqrt{\alpha_1}X_1+\ldots +\sqrt{\alpha_n}X_n)\leqslant \alpha_1J(X_1)+\ldots +\alpha_nJ(X_n)$;\hfill {\rm (2.27)}          \vspace{2mm}     \noindent$\;\;$(ii) $\;\;\displaystyle \frac{1}{J(X_1+\ldots +X_n)}\geqslant \frac{1}{J(X_1)}+\ldots +\frac{1}{J(X_n)}$;\hfill     {\rm (2.28)}


title: How to chang the colon after figure number to another symbol?

text: I want to change the colon in the caption to another symbol e.g. Figure 1: this is figure to Figure 1 | this is figure How can I do this?


title: How to create a newcommand for fontsize?

text: I am trying to create a command to modify fontsize with one parameter, it seems that the paramater is not expanding properly:               \newcommand{\mycfs}[1]{\fontsize{#1pt}{1.2*#1pt}}


title: makeheadrule in the memoir class

text: I have been trying to get the `makeheadrule` and `makefootrule` directives to work in a `memoir` class document. Here is an MWE               \documentclass[10pt]{memoir}     \usepackage{lipsum}               \copypagestyle{memoirStylePages}{headings}     \makerunningwidth{memoirStylePages}{\textwidth}          \makeheadrule{memoirStylePages}{\textwidth}{\normalrulethickness}     \makefootrule{memoirStylePages}{\textwidth}{\normalrulethickness}{}          \nouppercaseheads          \makeevenhead{memoirStylePages}{\thepage}{}{}     \makeoddhead{memoirStylePages}{}{}{\itshape\leftmark}          \makeevenfoot{memoirStylePages}{}{}{}     \makeoddfoot{memoirStylePages}{}{}{}          \makepsmarks{memoirStylePages}{%       \createmark{chapter}{left}{nonumber}{}{}     }          \pagestyle{memoirStylePages}          \begin{document}     \chapter{A chapter}     \section{A section}         \lipsum[1-10]         \end{document}      I am unable to understand why I get the errors.


title: newclude has destroyed my application

text: I added               \usepackage{newclude}      with commands such as               \include*{myfile}      in an attempt to include myfile without the concomitant `\clearpage`. This didn't work, so I removed this new code and returned my tex file back to the same state it was in before. Now it won't compile! I keep getting the following error message:               ! Undefined control sequence.          \@auxtag{myfile}{%      What the heck is going on??


title: kpathsea/fontspec does not recognize a font whose name has a space in it

text: Using XeLaTeX and the fontspec package, I am experiencing problems using fonts whose name includes the space character. Here is a simple example:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Times New Roman}     \begin{document}\end{document}      gives, upon `xelatex` the error:               kpathsea: Invalid fontname `Times New Roman', contains ' '      I have used this font before and previously working examples ceased to work when I re-installed my operating system (Ubuntu 11.04) and TeXlive2011.


title: /subfiles and name.sty problems

text: **Situation:** I have a main document (titr.text) on which \subfiles and child documents are called via \subfile commands, a separate novel.sty file for the preamble of the main document. **Problem:** My problem is in two parts: a) The name.sty file needs to be called either by the titr document (to tyeset the whole novel) or by the child document file (if a single chapter part e.g. scene one) is typeset. b) When the child document is typeset if '\usepackage{../ ../ ../novel}' is not commented out and '\usepackage{../ ../ ../novel}' in the titr.tex is commented out then, the resulting typeset has different headers styles to typesetting carried out by the main 'titr.tex' document. **MWE**               %TITR Main Document 5.06in x 7.81in, facing pages     % Begin document      \documentclass[11pt,english,british,twoside,openany]{scrbook}      \usepackage{novel}      \usepackage{subfiles}           %Frontmatter     \begin{document}         \title{Tears in the Rain}         \date{}         \maketitle     \frontmatter              \chapter*{Preface}         \subfile{./chapters/a_front/pref.tex}          %Mainmatter     \mainmatter          %The Chapters       \part{One}       \chapter{Genesis}         \subfile{./chapters/chap_one/scenes/one_one.tex}         \subfile{./chapters/chap_one/scenes/one_two.tex}         \subfile{./chapters/chap_one/scenes/one_three.tex}         \subfile{./chapters/chap_one/scenes/one_four.tex}      . . . \end{document} one_one.tex (and subsequent child documents) is:               \documentclass[../ ../ ../titr.ex]{subfiles}     \usepackage{../ ../ ../novel}     \begin{document}     \part{One}      \end{document}


title: Image inside another image

text: I currently have some LaTeX code to have multiple images side by side:               \begin{figure*}     \begin{center}     \includegraphics[height=2cm]{foo11.jpg}     \includegraphics[height=2cm]{foo12.jpg}\\     \includegraphics[height=2cm]{foo21.jpg}     \includegraphics[height=2cm]{foo22.jpg}     \end{center}     \caption{my caption.}     \end{figure*}      I would now like to add a small inset, inside for example `foo12.jpg` and `foo22.jpg`. For example, having the image `bar12.jpg` as a small thumbnail in the top-right corner of `foo12.jpg` and having the image `bar22.jpg` as a small thumbnail in the top-right corner of `foo22.jpg`. Of course, my goal is **not** to do that using Photoshop (or any external tool/script) but to do it directly in LaTeX. I guess this should be doable (since with Acrobat we can place images wherever we want in a PDF, and since LaTeX figures are "floating"), but have no idea how and I can't find any resource to help.


title: How can I speed up LaTeX compilation?

text: The slowest part is a dozen of diagrams in `TikZ.`


title: What is the difference between \relax and {}?

text: As I understand it, the point of `\relax` is to stop a macro from swallowing up subsequent material (such as whitespace). But `{}` (`\bgroup\egroup`) serves the same function. Why do we need both?


title: Customizing the navigation bar

text: I was wondering how I can customize the sidebar such that it only shows the current section and subsections that I am currently presenting and how can I remove the navigation bar from the title slide.


title: How to add quotation marks to fractions?

text: As the title says I want to add quotation marks around a fraction in `\displaystyle` mode. My first try looks very unnatural, as you can see               ^{``}\frac{1}{0^-}^"      The problem is with the first quotation mark: how do I put it at the same height as the second one?