title: TOC customization in amsbook

text: I am transcribing an old book in LaTeX, trying to preserve the style. I found the `amsbook` class to be the perfect solution for me. I produce chapters with `\chapter{Thermodynamic Systems}` and I get something like "Chapter I - Thermodynamic Systems". When I create the TOC, the word "Chapter" is repeated for each entry, but I want it as a heading for all chapters, and then print only the chapter number. This is what I get: > Preface.................................................................iii > > Introduction.........................................................vii > > Chapter I. Thermodynamic Systems.......................1 > >   1. The state of a system......................................1 > > > Chapter II. The First Law of Thermodynamics.........2 (actually, without points) and so on... This is instead the original layout: > ........................................................................Page > Preface.................................................................iii > > Introduction.........................................................vii > > Chapter > > I. Thermodynamic Systems....................................1 > >   1. The state of a system......................................1 > > > II. The First Law of Thermodynamics......................2 (sorry for the poor reproduction, you have to imagine that "Chapter", "I" and "II" are vertically aligned.) Is there also a way to write the word "Page" at the top of the pages numbers and to get the dots, like the original book? I searched all around the web, but all the packages I found that allow to modify the TOC are incompatible with the amsbook class. I DO NOT want to remove the word "Chapter" in the actual chapter name, I want to remove it only in the TOC. Here is an axample of the document:               \documentclass[10pt,twoside,titlepage,reqno]{amsbook}     \usepackage[a5paper]{geometry}     \geometry{papersize={5.375in,8.500in}}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage[%hypertex,                      unicode=true,                      plainpages = false,                       pdfpagelabels,                       bookmarks=true,                      bookmarksnumbered=true,                      bookmarksopen=true,                      breaklinks=true,                      backref=false,                      colorlinks=true,                      linkcolor = blue,                      urlcolor  = blue,                      citecolor = red,                      anchorcolor = green,                      hyperindex = true,                      hyperfigures     ]{hyperref}     \hypersetup{      pdftitle={Thermodynamics},      pdfauthor={Enrico Fermi},      pdfsubject={Unabridged, unaltered republication of 1937 edition.}     }     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{lettrine}     \usepackage{type1cm}     \renewcommand{\LettrineTextFont}{\MakeUppercase}     \renewcommand{\thechapter}{\Roman{chapter}}     \usepackage{chngcntr}     \counterwithout{section}{chapter}          \author{\scshape{Enrico Fermi}}     \title{\Huge \MakeUppercase{Thermodynamics}}     \copyrightinfo{1936}{Enrico Fermi\\Copyright holder, Laura Fermi}               \makeindex          \begin{document}          \frontmatter          \maketitle          \makeatletter     \@setcopyright     \makeatother          \chapter*{Preface}     \lettrine{T}{his} book originated in a course of lectures held at Columbia University,      New York, during the summer session of 1936.          Blablabla...          \begin{flushright}     \textsc{E. Fermi}     \end{flushright}               \tableofcontents               \chapter*{Introduction}     \lettrine{T}{hermodynamics} is mainly concerned with the transformations      of heat into mechanical work and the opposite transformations of mechanical work into heat.          Blablabla...          \mainmatter               \chapter{Thermodynamic Systems}\index{Thermodynamical systems}     \section{The state of a system and its transformations}\index{Thermodynamical state of a system}     The state of a system in mechanics is completely specified at a     given instant of time if the position and velocity of each mass      point of the system are given. For a system composed of a     number $N$ of mass-points, this requires the knowledge of     $6N$ variables.          Blablabla...          \subsection*{A system composed of a chemically defined homogeneous fluid}     \index{Chemically homogeneous systems}\index{Chemically homogeneous fluid}     We can make the following measurements on such a     system: the temperature $t$, the volume $V$, and the pressure $p$.          Blablabla...          \chapter{The First Law of Thermodynamics}     \section{The statement of the first law of thermodynarnics}     Some text...               \chapter{The Second Law of Thermodynamics}\label{chap:2ndLawOfThermo}               \printindex          \end{document}      Thanks in advance for the help!


title: URL linebreaks W/O \sloppy

text: Hours of reading the different articles on url linebreaking did not reveal a solution for the following problem: I've got a long url, which I do not intend to short using online services. The url package and pdfLaTeX output is used. The line break occurs at a place, that looks ugly and that I cannot understand, why a tool that fortunately takes proper layout so serious, wraps here. My MWE is:               \documentclass[10pt,a5paper]{book} % Regular text font size is 10 pt.          \usepackage{lipsum} % load paragraphs of filler text          \setlength{\oddsidemargin}{20mm}     \setlength{\textwidth}{108.5mm}          \usepackage{url}     \makeatletter     \g@addto@macro{\UrlBreaks}{\UrlOrds}     \g@addto@macro{\UrlBreaks}{\do\/\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0\do\.}     \makeatother          \begin{document}          \lipsum[2]          Available: \url{http://www.aaa.bb.cccc.dh/uploads/dfjasdasdfsadfsdfklfjskldfjssdfasdfasdfdfsdf/Psdfsdafresentationskdjf_sdfsad_sdf_sdf_sadfasdf.pdf}          \end{document}      ![PDF output](http://i.stack.imgur.com/g7L8I.jpg) As can be seen, the "d" in the second last line is already overlength (compared to the paragraph above), still LaTeX adds the "f" instead of wrapping after the "d". I fully understand, that the second last line cannot be perfectly justified as there are no spaces that can be enlarged (I've read about a package that enlarges the letters in these cases) - my question is just, why LaTeX makes things even worse with adding the "f" instead of making it the first letter in the last line, and what I can do about that without using the sloppy workaround, which makes the rest look far worse than just wrapping before the "f"?


title: Single digit on the next line (another 'I thought LaTeX wouldn't do that')

text: While writing a paper, a sentence in the middle of a paragraph was ending with "as seen in table \ref{table-foo}.", in this case the table number was 1. The PDF ended up with the word _table_ ending a line and "1. Here comes the next sentence bla bla" on the next. That is, the PDF looks like this:               bla bla bla bla as seen in table     1. Bla bla bla bla.      I'm happy with LaTeX overall, but I really thought its default rules would prevent such an occurrence (I previously another question along the same line, but a different case: http://tex.stackexchange.com/questions/3129/widow-word- on-a-page-i-thought-latex-wouldnt-do-that). I'm also baffled because compressing a line so there's room for an extra "1." shouldn't be a problem. I can fix this particular problem by using ~ instead of a space, but this is not a good solution (text edits will change the possible place of occurrence). Is there a declarative way to avoid such cases? To re-emphasize, this was happening inside a paragraph, so it's not a widow/orphan case. The relevant packages I used are given below. What was invoked was: "pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2010.9.21)" from within WinEDT with the default settings.               \documentclass[12pt,titlepage]{article}          % page margins     \usepackage[letterpaper]{geometry}     \geometry{top=1.0in, bottom=1.0in, left=1.1in, right=1.0in}          %set line spacing of document     \usepackage{setspace}     \setstretch{1.6}          % typographical improvements     \usepackage[final,babel]{microtype}          \frenchspacing


title: elsarticle table and figure caption

text: I want to change the caption of `elsarticle` in LyX for table to be ![enter image description here](http://i.stack.imgur.com/qomij.png) and for figures to be ![enter image description here](http://i.stack.imgur.com/deRFR.png) Mine is the following: I use the `caption` package in document preamble               \usepackage[labelfont=bf,labelsep=newline,justification=raggedright,singlelinecheck=false,font=small]{caption}      but I get large word **Table** in bold and **figure** not **fig.** as required and also after figure there is a new line which is not required here is mine ![enter image description here](http://i.stack.imgur.com/sEcuq.png) and figure is here ![enter image description here](http://i.stack.imgur.com/H8alk.png)


title: Color Blind Friendly Mesh Colormap

text: I have a plot with a mesh and it uses a lovely colormap, however, I can't find a way to make `tikzpicture` only use colorblind friendly colors. I'm not colorblind, but I know at least some of the people who will be reading my technical document are. Any ideas on how to fix it? ## Minimal Working Example For example, the following code produces a figure with a colormap that may not be acceptable:               \documentclass[varwidth=true, border=2pt]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}         \begin{tikzpicture}             \begin{axis}[nodes near coords={(\coordindex)},                 title=Rectangle from matrix input]                 % note that surf implies 'patch type=rectangle'                 \addplot3[surf,shader=interp,samples=2,                 patch type=rectangle]                  {x*y};             \end{axis}         \end{tikzpicture}     \end{document}      This results in: ![enter image description here](http://i.stack.imgur.com/SmIo5.png)


title: How to create quizzes with macqtex?

text: I found a beautiful example of a powerful quiz that was created using LaTeX: http://www.tug.org/texshowcase/macqtexDemo.pdf This example uses JavaScript inside a PDF document. Unfortunately, **there is no source available**. Does anyone know where I can find it? P.S. Maybe there are similar packages you can advise?


title: Can TeXstudio automatically produce a combined list of todo notes from different documents?

text: I am keeping notes for several (5) projects in Latex.   * Each project gets its own folder with a set of Latex source files (mostly one main file that `input`s the individual chapters).   * Each project is compiled into one PDF file.   * I usually work on one project at a time.   * All projects `input` a single `Preamble.tex` in a separate, 6th folder.   * All projects use `hyperref` and `biblatex` (in case these are relevant).   * All projects are `\documentclass{report}`, though hopefully this won't matter. I am using `todonotes` to make todo notes for myself which show parts of each document that needs work. This package makes an index of all notes with `\listoftodos`, which is already very useful. But when each project has its own list of todos, and if I want to ask "which project's todos should I work on today?", I have to open all 5 PDFs and keep alt-tabbing back and forth between them. I would like one of the following to happen:   * Every time I compile any of the PDFs in TeXstudio, a 6th PDF is automatically generated which has a list of todos from every project.   * Whenever I want an up-to-date combined list of todos, I compile a separate document made for this purpose (or run a single non-interactive script) which generates a list of todos. I know that it isn't too difficult to write a C# (or other language) program to grab the relevant pages from each PDF, but perhaps there is a more elegant way. The combined list of todos should group todos from each project in their own section. I don't care if it doesn't have links (I just want to get, at a glance and in a single step, an idea of what project needs what work done), though the solution shouldn't break the hyperlinked list of todos I already get in each individual document. There are two related questions I found:   * Multiple Documents with shared TOC and Indexes seems related but I am using TeXstudio and MiKTeX, not ConTeXt. I found a `.toc` file which looks like a list of sections (probably used to make the TOC), but I don't know what file has an index of the todos.   * How to produce a combined index from multiple documents? is a similar problem, but I don't understand the solution at all and so cannot adapt it to my todo notes.


title: How to introduce a dynamic counter for enumerate environment?

text: I would like to use numbers: "1.", "2.", "3.", ... but the last item ("n.") is an exception, instead of "10." for example I would like to use "(9+1).".


title: axis lable in millions/thousands

text: I have a simple barchart, on the y axis i have values which are displayed full written (e.g. 5'000'000). I dont want to change the orginal data but change the y-axis lable into a fullwritten value e.g. "5 Mio." Any Idea how to approach this target, I tried but couldn't find anything useful.The only thing I found is something for tables, and I think it should be possible whith barcharts as well, any hint ? I guess I need to have a temporary value which devides just the lable on the y-axis cheers endo


title: Break page in \valign

text: Let's say I have a `\valign` like:               \parindent=0pt     \tabskip=\baselineskip     \valign{& \hsize=.5\hsize\raggedright #\crcr     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.     &     Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.     &     Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.     &     Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.     &     Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.     &     At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.     \cr     }          \bye      then how come it doesn't break pages between the items? Even if I `\setbox` it into a `\vbox` and `\vsplit` it to `\vsize`!? Is it somehow possible to break page inside `\valign`?


title: Replace several letters in math font

text: I need to typeset a whole document sans serif with `sourcesanspro`, including formulas. I know that there are a lot of arguments against doing this, but in this particular case it makes sense. My problem is (as often asked at several places of the web), that I don't find a proper sans serif math font. I searched the web for hours and tested a lot of possibilities (`arec`. `cmbright`, `iwona` ...) but ended up using `sansmath`. As far as I understood `sansmath`, it uses the default sans serif family for typesetting formulas. The problem is, that `sourcesanspro` doesn't include greek letters or symbols like blackboard fonts. Is it possible to replace several symbols of the math font, e. g. greek letters, by the greek letters of other fonts manually? That's my MWE, so far:               \documentclass{scrartcl}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{amsmath, amssymb}          \usepackage[default]{sourcesanspro}          \usepackage{sansmath}     \sansmath          \begin{document}               \noindent     ABCDEFGHIJKLMNOPQRSTUVWXYZ \\     abcdefghijklmnopqrstuvwxyz \\     $abcdefghijklmnopqrstuvwxyz$ \\     $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ \\     $\alpha\beta\gamma\delta\epsilon\varepsilon\zeta\eta\theta\vartheta\iota\kappa\varkappa\lambda\mu\nu\xi o\pi\varpi\rho\varrho\sigma\varsigma\tau\upsilon\phi\varphi\chi\psi\omega$ \\     $\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega$ \\     $\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$     \[       \frac{1}{2\pi i}\int_\gamma f = \sum_{k=1}^m n(\gamma;a_k) \cdot \text{Res}(f;a_k).     \]          \end{document}      ![Sans serif document](http://i.stack.imgur.com/IuTV0.png)


title: XMP with XeLaTeX

text: I got the `hyperxmp` package to include XMP copyright information with regular LaTeX but with XeLaTeX there seems to be a problem. I need XeLaTeX for its better font support and typographic features. Is there any way to get `hyperxmp` working with XeLateX? Here's a stripped-down version of the `hyperxmp` package documentation example:               \documentclass{article}          \usepackage{hyperxmp}     \usepackage{hyperref}          \title{Paper}     \author{Nomen Nescio}          \hypersetup{     pdfcopyright={Copyright © Nomen Nescio. Creative Commons 3.0 Attribution License.}     pdflicenseurl={http://creativecommons.org/licenses/by/3.0/us/}     }          \begin{document}          \maketitle          processes in so-called empty space\dots          \end{document}      XeLaTeX gives this:               ** WARNING ** Could not find an object definition for "hyxmp@Metadata".     ** WARNING ** Interpreting special command object (pdf:) failed.     ** WARNING ** >> at page="1" position="(133.768, 524.256)" (in PDF)     ** WARNING ** >> xxx "pdf: object @hyxmp@Metadata << /Type /Metadata /Subtype /XML..."     ** WARNING ** >> Reading special command stopped around >>stream\x0a<?xpacket begin="\xc3\xaf\xc2\xbb\xc2\xbf" id="W5M...<<     ** WARNING ** Unresolved object reference "hyxmp@Metadata" found!!!      When I open the file and look at the properties, there is no copyright information. I have tried with another file that has them and it shows its copyright information.


title: Setting up LaTeX -> DVIPS -> PS2PDF with Shell-Escape (in TeXStudio)

text: I am trying to set up a "user command" on `TeXStudio` with the purpose of compiling with `shell-escape` and the `LaTeX -> DviPs -> Ps2Pdf` cycle. This is what I have done to get `shell-escape` to work and produce `PDF` output. [ **Edit:** This section edited: see explanation below] **Method 1.** In `TeXStudio` preferences -> `Build` -> `User Commands`:               latexmk --shell-escape     latexmk -synctex=1 -interaction=nonstopmode --shell-escape %.tex      See screenshot: top user command, the two lines above are entered from left to right. ![enter image description here](http://i.stack.imgur.com/Kf7zT.png) **Method 2.** At the top of my document insert the line:               % !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape]       This line induces `TeXStudio` to request authorization to compile with `shell- escape`. This setup has so far worked for me to invoke `shell-escape` _and_ produce `PDF` output "on the fly". By **analogy** , I tried the following: **Method 1b.** User Command:               latex --shell-escape: dvips : ps2pdf : view-pdf     latex -synctex=1 -interaction=nonstopmode --shell-escape %.tex: dvips -o %.ps %.dvi: ps2pdf %.ps      **Method 2b.** Top of document:               % !TeX TXS-program:compile = txs:///latex/[--shell-escape]      But that does not work. Am I on the right track? To provide context: my purpose is to be able to compile the code shown here: Recreating a guilloche with TikZ. The code relies on the `tkz-fct` package and apparently requires the use of `shell-escape` but does not support `pdflatex`, suggesting that the `latex -> dvips -> ps2pdf` route is a natural one to try. And it is the route recommended in the `tkz-fct` manual. How to set user commands in TexStudio? is a tex-stackexchange question with a link to the `TeXStudio` doc, which addresses related problems, but not this particular one head-on. The `TeXStudio` documentation is here: http://svn.code.sf.net/p/texstudio/code/trunk/utilities/usermanual_en.html#SECTION02a **Edit:** Explanation about my first edit. I initially wrote that I had been succesful with the following settings:               pdflatex --shell-escape     pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex      However, I had been running this command on documents that had this at the top:               % !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape]       And it turns out that this line overrules my user commands. This is stated explicitly in Harish Kumar's answer (thanks Harish!). Without this overruling line, my user command does not succesfully invoke `shell-escape`. However, replacing `pdflatex` with `latexmk` did invoke `shell-escape` without the overruling line. I have therefore edited my incorrect claim. Having said that, I do not know much about `latexmk` other than it seems to be working. **Epilogue:** Read Harish Kumar's answer to see how to properly enter the commands. Another thing I have since discovered is that the spanner-shaped button allows you to select among existing commands and to combine several commands, in that way the proper separator will be added between commands. Lastly, if you read the various comments here you will see that one reason why I had a hard time getting this to work was because the LaTeX file I was trying to compile needs `gnuplot` and I didn't have `gnuplot` installed on my system, giving me the impression that my commands were not working when they were (after Harish's corrections they were working properly).


title: removing custom text style

text: I wanted to make the font of my figure captions smaller, so I just went from figure to figure and changed the captions using "Text Style -> Customized -> Font Size -> Smaller". Then I found out that there is a much simpler and more general way to achieve the same effect. But how do I remove all the customized styles that I added manually? Is it possible to do this automatically in LyX?


title: Tikz: How to create and reuse a picture

text: I am a beginner in `Tikz` and I have two questions:   1. I'm trying to draw the picture below but have been unsuccessful (I drew the right part though but couldn't draw the left one)   2. How can I reuse these two shapes in other pictures if I use them a lot? This is what I used to draw the right part:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}     \begin{tikzpicture}         \draw[semithick] (0,0) -- (1,4);% left line         \draw[semithick] (3,0) -- (2,4);% right line         \draw[semithick] (0,0) arc (180:0:1.5 and -0.5);         \draw[semithick] (1.5,4) ellipse (0.5 and 0.166);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/gk2Ee.png) I appreciate your help and thank you in advance.


title: Custom Footnote Key/ID

text: I would like footnotes to not show numbers but rather whatever text I want. So something like this:               Here is my text. No numbers appear here even though there are footnotes embedded all throughout.           ----------          1:1 Footnote with custom key '1:1"     1:2 Another footnote with custom key.     2:4 Not necessarily covering every combination, so I need to be able skip some.


title: How to write a formula using box product

text: Can anybody help in writing the following formula... I am having trouble. LHS I can write, but not the RHS. ![enter image description here](http://i.stack.imgur.com/WnqrF.jpg)


title: Putting name on every page in resume?

text: I am following this template to build a resume. When there are multiple pages, I was wondering how to put my name on every page? Thanks! The code is (you may need to download the res.cls file from the link above)               \documentclass[margin, 10pt]{res} % Use the res.cls style, the font size can be changed to 11pt or 12pt here          \usepackage{helvet} % Default font is the helvetica postscript font          \setlength{\textwidth}{5.1in} % Text width of the document          \begin{document}          \moveleft.5\hoffset\centerline{\large\bf John Smith} % Your name at the top          \moveleft\hoffset\vbox{\hrule width\resumewidth height 1pt}\smallskip % Horizontal line after name; adjust line thickness by changing the '1pt'          \moveleft.5\hoffset\centerline{123 Broadway} % Your address     \moveleft.5\hoffset\centerline{City, State 12345}     \moveleft.5\hoffset\centerline{(000) 111-1111 or (111) 111-1112}          \begin{resume}     ...     \end{resume}          \end{document}


title: How do I typeset a chemical reaction equation? I want to have a long "="

text: I am new to LaTeX. I searched ctan.org, but didn't find what I want. I want to typeset a chemical reaction equation. The `=` mark seems too short. I need a long one. I tried to add an option `2cm` to get a long `=` but failed. Here is the raw code:               \documentclass{beamer}     \begin{document}     \begin{frame}        $H_{2}O =[2cm] H_{2}\uparrow+O_{2}\uparrow$     \end{frame}     \end{document}      The output screenshot is here: ![Screenshot](http://i.stack.imgur.com/nEvzv.png) In my opinion, the font doesn't look good. Would you give me some advice? For example, is there some font which would be appropriate for typesetting chemical reaction equations?


title: File `imakeidx.sty' not found

text: Since the last update of MiKTeX, I am experiencing an issue when compiling my work : it stops and the log file says :               ! LaTeX Error: File `imakeidx.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name:      ! Emergency stop.     <read *>           l.104 ^^M          *** (cannot \read from terminal in nonstop modes)      This does not seem to be directly related to my preamble, since I have tried with minimal test documents and the same issue happens; moreover, my document used to compile properly until yesterday, without any change being made since to the preamble. I have removed and reinstalled MiKTeX 2.9 twice, with both basic and complete versions, and none of them worked, as the system does not find `imakeidx.sty`. Any idea of what is happening, and how to solve it ? Many thanks for any help provided.


title: Collapse "on page"s for multiple references in \vref

text: The code at the bottom produces > See equations (1) and (2) on page 6 and on page 11. What I'd like is > See equations (1) and (2) on pages 6 and 11. Otherwise it looks quite strange in my opinion. Is there an easy way to do that?               \documentclass{article}          \usepackage{lipsum}     \usepackage{varioref}     \usepackage[nameinlink,noabbrev]{cleveref}          \begin{document}          See \vref{eq:1,eq:2}.          \newpage     \lipsum     \newpage     \lipsum     \newpage          \begin{equation}       \label{eq:1}       e=mc^2     \end{equation}          \newpage     \lipsum     \newpage     \lipsum     \newpage          \begin{equation}       \label{eq:2}       e=mc^2     \end{equation}          \end{document}


title: How can I refer to an absent value in expl3?

text: The `xparse` package has a concept of `-NoValue-`, a kind of '`\null`' token used to represent the absence of any value (where `\null` would probably be considered a value). If I would like to manually use this value, how would I go about doing it?               \documentclass{article}     \usepackage{expl3,xparse}     \ExplSyntaxOn          \begin{document}          \some_test:NTF{\marker}{true}{false} % should print true          \end{document}      * * * My specific use case is in an `l3prop` list:               \prop_new:N \g__ds_type_supertype_subtypes_prop     \prop_put:Nnn \g__ds_type_supertype_subtypes_prop      { some_type_that_has_no_supertypes }      { \marker,subtypes,here }      with the generalization (note I have not directly tested this yet).               % To manage our typing, we will have a property list going from     % supertype -> supertype,subtype,...,subtype     \prop_new:N \g__ds_types_supertype_subtypes_prop     \let\_ds_types_no_supertype\q_no_value     \let\_ds__if_no_supertype_p\quark_if_no_value_p          % Create a new type (#1) that has a supertype (#2)     \cs_new:Npn \_ds_new_type_with_supertype:nn #1 #2      {       \clist_new:c        { g__types__ #1 __supertype_subtypes_clist }            \clist_put_right:cn        { g__types__ #1 __supertype_subtypes_clist }        { #2 }            \prop_put:Nnn \g__ds_types_supertype_subtypes_prop        { #1 }        { \use:c { g__types__ #1 __supertype_subtypes_clist } }      }          % Create a new type (#1) that has no supertypes     \cs_new:Npn \_ds_new_type:n #1      {       \_ds_new_type_with_supertype:nn { #1 } { \_ds_types_no_supertype }      }


title: A fix for \vspace*, does it break other things?

text: Thanks to the answers to this question, I believe I have a fix for `\vspace*` that will make it work sanely at the top of a page.               \def\@vspacer#1{%             \ifvmode                     \dimen@\prevdepth                     \begingroup                     \topskip\z@skip                     \hrule\@height\z@                     \nobreak                     \endgroup                     \vskip#1%                     \vskip\z@skip                     \prevdepth\dimen@             \else                     \@bsphack                     \vadjust{%                             \@restorepar                             \begingroup                             \topskip\z@skip                             \hrule\@height\z@                             \nobreak                             \endgroup                             \vskip#1%                             \vskip\z@skip                     }%                     \@esphack             \fi     }      The only change from the standard definition is the addition of `\begingroup`, `\topskip\z@`, and `\endgroup`. As near as I can tell, this should only affect `\vspace*`s that appear at the beginning of a page. The idea is that `\vspace*{5in}` should really be 5in, not 5in + 10pt. And one shouldn't have to use `\kern-\topskip` after `\vspace*`s that appear at the top of the page. Is there some reason this or something similar was not in the LaTeX 2e kernel? There are no comments in the source noting any sort of problems with `\vspace` and `\topskip`. In fact, `\topskip` is barely mentioned in the source.


title: How to make a landscape table fill the whole width?

text: It seems that neither `\textwidth` nor `\textheight` can force the table to fill the whole width.               \documentclass[dvips]{book}     \usepackage[a4paper,margin=20mm,showframe]{geometry}     \usepackage{lscape}     \usepackage{lipsum}     \usepackage{calc}     \usepackage{longtable,array}          \begin{document}     \chapter{One}     \lipsum[1]     \section{One One}     \lipsum[2]          \pagestyle{empty}     \begin{landscape}     \begin{longtable}{|m{0.4\textheight-2\tabcolsep-1.5\fboxrule}|m{0.6\textheight-2\tabcolsep-1.5\fboxrule}|}     \hline     a & b\\\hline     c & d\\\hline     \end{longtable}     \end{landscape}     \pagestyle{plain}          \lipsum[3]     \end{document}      * * * **EDIT 1:** I made a correction in the column width, i.e., changing `2\fboxrule` to `1.5\fboxrule`. The former calculation is wrong because the rule between 2 columns should NOT be calculated twice. I slipped a little here. And I got an output as follows: ![alt text](http://i.stack.imgur.com/wxecw.png) * * * **EDIT 2: It's my real scenario (as opposed to the minimal code)**               \documentclass[dvipsnames,rgb,dvips]{book}          \usepackage[a4paper,margin=20mm,showframe]{geometry}     \usepackage{longtable}     \usepackage{array}     \usepackage{calc}     \usepackage{ltablex}     \usepackage{lscape}          \newcounter{No}     \renewcommand{\theNo}{\stepcounter{No}\arabic{No}}     \newenvironment{MyTable}[4]%     {%         \newcolumntype{A}[1]%         {%             >{%                 \begin{minipage}%                     {%                         ##1\textwidth-2\tabcolsep-1.5\arrayrulewidth%                     }%                     \vspace{\tabcolsep}%              }%              c%             <{\vspace{\tabcolsep}\end{minipage}}%         }%         \setcounter{No}{0}%comment out this if you want to continuous numbering for all tables.         \begin{longtable}%         {%                 |>{\scriptsize\centering\theNo}A{#1}<{}%                 |>{}A{#2}<{\centering\input{\jobname.tmp}}%                 |>{\centering\lstinputlisting{\jobname.tmp}}A{#3}<{}%                 |>{\scriptsize\arraybackslash}A{#4}<{}%                 |%         }%         \hline\ignorespaces%     }%     {%         \end{longtable}%     }          \newcommand{\Comment}[1]{& & & #1\\\hline}               \usepackage{listings}     \lstset{%     language={PSTricks},     basicstyle=\ttfamily\scriptsize,%     keywordstyle=\color{blue}%,     %backgroundcolor=\color{yellow!30}%     }     \usepackage{fancyvrb}               \def\MyRow{%                     \VerbatimEnvironment%             \begin{VerbatimOut}{\jobname.tmp}%     }          \def\endMyRow{%             \end{VerbatimOut}%           }                    \usepackage{pstricks,pst-node}     \newpsstyle{gridstyle}{%     gridwidth=0.4pt,%default: 0.8pt     gridcolor=Red!20,%default: black     griddots=0,%default: 0      %     gridlabels=3pt,%default: 10pt     gridlabelcolor=Blue,%default: black     %     subgriddiv=5,%default: 5     subgridwidth=0.2pt,%default: 0.4pt     subgridcolor=Green!20,%default: gray     subgriddots=0%default: 0     }          \usepackage{lipsum}          \begin{document}     \chapter{Introduction to PSTricks}     \lipsum[1]          \section{At a glance galleries}     \lipsum[1-5]          %Landscape starts here.     %\pagestyle{empty}     \begin{landscape}     \thispagestyle{empty}     \begin{MyTable}{0.05}{.25}{0.4}{0.3}%     %=============     \begin{MyRow}     \pspicture*[showgrid](4,4)     \pnode(1,1){A}     \pnode(3,3){B}     \ncline{A}{B}     \endpspicture     \end{MyRow}     \Comment{\lipsum[1]}     %=============     \begin{MyRow}     \begin{pspicture}[showgrid](4,3)     \psframe*[linecolor=red!30](3,2)     \end{pspicture}     \end{MyRow}     \Comment{\lipsum[2]}     %=============     \begin{MyRow}     \pspicture[showgrid](4,3)     \psframe*[linecolor=green!30](3,2)     \endpspicture     \end{MyRow}     \Comment{\lipsum[3]}     %=============     \begin{MyRow}     \pspicture[showgrid](4,3)     \psframe*[linecolor=yellow!30](3,2)     \endpspicture     \end{MyRow}     \Comment{\lipsum[4]}     %=============     \begin{MyRow}     \pspicture[showgrid](4,3)     \psframe*[linecolor=Maroon!30](3,2)     \endpspicture     \end{MyRow}     \Comment{\lipsum[5]}     %=============     \end{MyTable}     %Landscape stops here.     \end{landscape}     %\pagestyle{plain}          \section{Node}     \lipsum[1-5]     \end{document}      Unfortunately, `\arrayrulewidth` does not work. * * * **EDIT 3:** `dvips` has been added for both code snippets above. The `\arrayrulewidth` still cannot work the way we want.


title: Automatically draw and labels angles of a triangle in TikZ

text: I'm using LaTeX with TikZ to create a (right-angle) triangle. Now I would like to label each angle by adding a half circle and a text label. Unfortunately I only managed to create a label for the gamma angle. What do I need to do in order to put such a label into the remaining corners?               \begin{tikzpicture}[thick]     \draw(0,0) -- (90:2cm) node[midway,left]{$opposite leg$} -- (0:4cm) node[midway,above right]{$hypotenuse$} -- (0,0) node[midway,below]{$adjacent leg$};     \draw[fill=lightgray, thick] (0,0) -- (0:0.8cm) arc (0:90:0.8cm) node at (45:0.5cm) {$\gamma$} -- cycle;     \end{tikzpicture}


title: Generate an image with minimum space around it

text: I'm using this solution to generate images:               \ifdefined\formula     \else     \def\formula{E = m c^2}     \fi     \documentclass[border=2pt]{standalone}     \usepackage{amsmath}     \usepackage{varwidth}     \begin{document}     \begin{varwidth}{\linewidth}     \[ \formula \]     \end{varwidth}     \end{document}      Everything works perfect when I have a large multi-level formula, say something like this `pV=\frac{m}{M}RT`. However, when the formula gets more flat, like `p=mv`, I get extra space at the top. Looks like the document has some kind of a min height … How do I remove it? So that the resulting img/pdf will be exactly the size of my formula + border?


title: What is the difference between \Centering and \centering?

text: My question is already written on the title above. * * * **EDIT 1:** I attempted to use `\Centering` and remove `\arraybackslash` in my original code below. It cannot be compiled.               \documentclass[dvips,dvipsnames,rgb]{book}          \usepackage[a4paper,margin=10mm,showframe]{geometry}     \usepackage{longtable}     \usepackage{array}     \usepackage{calc}     \usepackage{ragged2e}     \usepackage{lscape}          \newcounter{No}     \renewcommand{\theNo}{\stepcounter{No}\arabic{No}}     \newenvironment{MyTable}[4]%     {%         \newcolumntype{A}[1]%         {%             >{%                 \begin{minipage}%                     {%                         ##1\linewidth-2\tabcolsep-2\arrayrulewidth%                     }%                     \vspace{\tabcolsep}%              }%              c%             <{\vspace{\tabcolsep}\end{minipage}}%         }%         \setcounter{No}{0}%comment out this if you want to continuous numbering for all tables.         \begin{longtable}%         {%                 |>{\scriptsize\Centering\theNo}A{#1}<{}%                 |>{}A{#2}<{\Centering\input{\jobname.tmp}}%                 |>{\Centering\lstinputlisting{\jobname.tmp}}A{#3}<{}%                 |>{\scriptsize\arraybackslash}A{#4}<{}%Please try to remove \arraybackslash here.                 |%         }%         \hline\ignorespaces%     }%     {%         \end{longtable}%     }          \newcommand{\Comment}[1]{& & & #1\\\hline}               \usepackage{listings}     \lstset{%     language={PSTricks},     basicstyle=\ttfamily\scriptsize,%     keywordstyle=\color{blue}%,     %backgroundcolor=\color{yellow!30}%     }     \usepackage{fancyvrb}               \def\MyRow{%                     \VerbatimEnvironment%             \begin{VerbatimOut}{\jobname.tmp}%     }          \def\endMyRow{%             \end{VerbatimOut}%           }                    \usepackage{pstricks,pst-node}     \newpsstyle{gridstyle}{%     gridwidth=0.4pt,%default: 0.8pt     gridcolor=Red!20,%default: black     griddots=0,%default: 0      %     gridlabels=3pt,%default: 10pt     gridlabelcolor=Blue,%default: black     %     subgriddiv=5,%default: 5     subgridwidth=0.2pt,%default: 0.4pt     subgridcolor=Green!20,%default: gray     subgriddots=0%default: 0     }          \usepackage{lipsum}          \begin{document}     \chapter{Introduction to PSTricks}     \lipsum[1]          \section{At a glance galleries}     \lipsum[1-5]          %Landscape starts here.     \pagestyle{empty}     %\begin{landscape}     \begin{MyTable}{0.05}{.25}{0.4}{0.3}%     %=============     \begin{MyRow}     \pspicture*[showgrid](4,4)     \pnode(1,1){A}     \pnode(3,3){B}     \ncline{A}{B}     \endpspicture     \end{MyRow}     \Comment{\lipsum[1]}     %=============     \begin{MyRow}     \begin{pspicture}[showgrid](4,3)     \psframe*[linecolor=red!30](3,2)     \end{pspicture}     \end{MyRow}     \Comment{\lipsum[2]}     %=============     \begin{MyRow}     \pspicture[showgrid](4,3)     \psframe*[linecolor=green!30](3,2)     \endpspicture     \end{MyRow}     \Comment{\lipsum[3]}     %=============     \begin{MyRow}     \pspicture[showgrid](4,3)     \psframe*[linecolor=yellow!30](3,2)     \endpspicture     \end{MyRow}     \Comment{\lipsum[4]}     %=============     \begin{MyRow}     \pspicture[showgrid](4,3)     \psframe*[linecolor=Maroon!30](3,2)     \endpspicture     \end{MyRow}     \Comment{\lipsum[5]}     %=============     \end{MyTable}     %Landscape stops here.     %\end{landscape}     \pagestyle{plain}          \section{Node}     \lipsum[1-5]     \end{document}


title: How to adjust spacing between caption and table / figure in beamer?

text: I want to adjust spacing between caption and table/figure in beamer. However I am not able to overcome the warning > Package caption Warning: \caption will not be redefined since it's already > (caption) redefined by a document class or package which is (caption) > unknown to the caption package. I have tried by using `caption` and `subfig` packages. I used the command `\captionsetup{skip=0pt,belowskip=0pt}`. I am unable to overcome the warning. _EDIT: I wish to add that I am trying to modify (reduce) the spacing in this frame. For other frames I am okay with the default spacing._ I need following format for my frame. `MWE` the way it appears to me is               \documentclass{beamer}     \mode<presentation> {\usetheme{Madrid}}     \usepackage{graphicx} % Allows including images     \usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables     \usepackage{lmodern}% http://ctan.org/pkg/lm     \usepackage{bm}     \usepackage{subfig}     %   \usepackage{caption}     \graphicspath{{Images/}} % path for images          \begin{document}         \begin{frame}         \frametitle{Results: Measurement of Length}         \begin{picture}(0,200)         \put(-5,210){             \begin{minipage}[t]{0.48\linewidth}                 \setbeamerfont{caption}{size=\tiny}                  \captionsetup[figure]{skip=0pt}%,belowskip=0pt}                 \begin{figure}                     \includegraphics[width=4.5cm, height=3cm]{C5.S.Results/Slide1.png}                      \caption{Calibration: 1mm $\approx$\ 247 pixels.}                 \end{figure}             \end{minipage}         }         \put(175,210){             \begin{minipage}[t]{0.48\linewidth}                 \centering                 \tiny{                 \begin{table}[H]                 \setbeamerfont{caption}{size=\tiny}                  \captionsetup{skip=0pt,belowskip=0pt}                    \caption{Mean of measurements shown in Fig.\  1}                 \begin{tabular}{cc}                     \specialrule{1pt}{0pt}{3pt}                     \textbf{Reading} & \textbf{Measurements from } \\                     \textbf{Number}& \textbf{Fig. A \ ($\bm\mu$m)}  \\                     \specialrule{1.5pt}{2pt}{4pt}                         1 & 121.6\\                         2 & 117.6\\                         3 & 121.6\\                         4 & 137.8\\                         5 & 121.6\\\specialrule{0.25pt}{2pt}{4pt}                     \textbf{Mean diameter :} & \textbf{124}\\                     \specialrule{1pt}{2pt}{2pt}                 \end{tabular}                 \end{table}                 }             \end{minipage}         }     \end{picture}     \end{frame}     \end{document}       The frame comes out like this![enter image description here](http://i.stack.imgur.com/5uPhy.png)


title: How to add/insert a rule in the headline and footline

text: all: When we use the specified format from beamer, `\documentclass[compress]{beamer}`, how do we add/insert a black line above the headline and under the footline into each slide?               \documentclass[compress]{beamer}          \setbeamertemplate{navigation symbols}{}     \setbeamertemplate{footline}[frame number]{}          \setbeamercolor{section in head/foot}{fg=secinhead,bg=black}     \setbeamercolor{subsection in head/foot}{fg=secinhead,bg=black}          \setbeamerfont{footline}{size=\tiny}          \usecolortheme[rgb={0,0,0}]{structure}          \useinnertheme{circles}     \newenvironment{proenv}{\only{\setbeamercolor{local structure}{fg=black}}}{}               \useoutertheme{infolines}          \usefonttheme{structurebold}          \setbeamertemplate{background canvas}[vertical shading][bottom=white,top=white]      Thank you,


title: Scientific Notation Only For Large Numbers -- with uncertainty

text: I've been using Betohaku and Bruno Le Floch's answer to Scientific Notation Only For Large Numbers to turn scientific notation of as follows:               \documentclass{standalone}     \RequirePackage[         per-mode=reciprocal,         scientific-notation=true,         retain-explicit-plus,         table-space-text-post=\textsuperscript{~a},         table-align-text-post=true,         table-align-exponent,         table-align-uncertainty,         separate-uncertainty = true,     ]{siunitx}     \usepackage{expl3}     \ExplSyntaxOn         \cs_new_eq:NN \fpcmpTF \fp_compare:nTF     \ExplSyntaxOff     \let\OldSI\SI%     \renewcommand*{\SI}[3][]{%         \fpcmpTF{abs(#2)<=.001}{%             \OldSI[scientific-notation=true,#1]{#2}{#3}%         }{%             \fpcmpTF{abs(#2)>=1000}{%                 \OldSI[scientific-notation=true,#1]{#2}{#3}%             }{%                 \OldSI[scientific-notation=false,#1]{#2}{#3}%             }%         }%     }     \begin{document}     \SI{83}{\mega\pascal} looks good, \SI{83(22)}{\mega\pascal} doesn't.     \end{document}      The problem is I have some values with uncertainties (as in the above MWE) and (of course) the comparison to a threshold value (hardcoded here) fails, so the code above gives: ![render of above .tex code](http://i.stack.imgur.com/j8FF9.png) Now siunitx can parse 83(22) into two parts, so it must be possible, but haing spent some time staring at siunitx.sty and the expl3 manual I'm none the wiser. Clearly I can work around this by saying `[scientific-notation=false]` before the latter example, but the point of the code-based solution is consistency (for avoiding small exponents). So is there simple way to achieve output like (83 ± 22) MPa from the input I have? Or a beginners guide to writing in expl3?


title: How to hook to solution environment of exam class to put the answers in the end of document

text: I want to put the answers to the end of the document, just like the way Martin Scharrer did in his reply to the question tex core - Showing Solutions of the Questions "separately" - TeX - LaTeX Stack Exchange, I can now put the answers of "true or false" kind of questions, and the answers of multiply choices questions, but I don't have a method to put the answers wrapped by solution environment of exam class. Here is my code               %\documentclass[answers,12pt]{exam}     \documentclass[12pt]{exam}     \usepackage{environ}     \usepackage[normalem]{ulem}     \usepackage{etoolbox}          \usepackage{amssymb}     \newcommand\False{$\times$}     \newcommand\True{$\checkmark$}               \newlength\answerspace     \setlength\answerspace{0.5in}     \newcommand\dottedanswerline[1][{}]{%       % One optional argument, the default value of which is empty.       \unskip\linebreak[0]\enspace       \hbox{}\nobreak\dotfill       \ifprintanswers %whether to show the answers or leave it as a blank         \hbox to \answerspace{(\hfil#1\hfil)}%        % \xappto\answertext{\expandonce{\thequestion\theanswer}}        %\xappto\answertext{\thequestion,#1\space}       \else         \hbox{(\hskip 0.5in)}%         \xappto\answertext{\thequestion,#1\space}       \fi     }% dottedanswerline               \newcommand{\answertext}{}     \usepackage{etoolbox}     \NewEnviron{answer}{\xappto\answertext{\expandonce{\BODY}}}%               \makeatletter          \AtEndEnvironment{solution}{\xappto\answertext{\BODY\space}}     %\AtEndEnvironment{solution}{\xappto\answertext{\thequestion,\BODY\space}}          \newlength\choiceitemwidth     \newif\ifshowsolution \showsolutiontrue     \newcounter{choiceitem}%选项的序号计数单元          \def\thechoiceitem{\Alph{choiceitem}}%用ABCD来显示选项序号          \def\makechoicelabel#1{#1\uline{\thechoiceitem.}\else\thechoiceitem.\fi\space} %答案显示下划线+字母或者字母，用于最终显示          \def\choice@mesureitem#1{\cr\stepcounter{choiceitem}\makechoicelabel#1}%计数器加1，同时显示ABCD标签，是用于测量长度的          %这个是用来进行测量用的，第一遍\BODY的parse     \def\choicemesureitem{\@ifstar       {\choice@mesureitem\ifprintanswers \xappto\theanswer{\thechoiceitem}}%       {\choice@mesureitem\iffalse}}%          \def\choice@blockitem#1{%       \ifnum\value{choiceitem}>0\hfill\fi       \egroup\hskip0pt       \hbox to \choiceitemwidth\bgroup\hss\refstepcounter{choiceitem}\makechoicelabel#1}          \def\choiceblockitem{\@ifstar       {\choice@blockitem\ifprintanswers}%       {\choice@blockitem\iffalse}}          \def\choice@paraitem#1{%       \par\refstepcounter{choiceitem}\makechoicelabel#1}          \def\choiceparaitem{\@ifstar       {\choice@paraitem\ifprintanswers}%       {\choice@paraitem\iffalse}}               \NewEnviron{mychoices}{%       \def\theanswer{}       \begingroup         \let\item\choicemesureitem         \setcounter{choiceitem}{0}%         \settowidth{\global\choiceitemwidth}{\vbox{\halign{##\hfil\cr\BODY\crcr}}}%       \endgroup        \dottedanswerline[\theanswer]       \trivlist\item\relax       \parindent0pt       \setcounter{choiceitem}{0}%       \ifdim\choiceitemwidth<0.24\linewidth         \choiceitemwidth=0.25\linewidth         \let\item\choiceblockitem         \bgroup\BODY\hfill\egroup       \else\ifdim\choiceitemwidth<0.48\linewidth         \choiceitemwidth=0.5\linewidth         \let\item\choiceblockitem         \bgroup\BODY\hfill\egroup       \else % \choiceitemwidth > 0.5\linewidth         \let\item\choiceparaitem         \BODY       \fi\fi       \endtrivlist          }     \makeatother                    \begin{document}     \section{True OR False questions}     \begin{questions}     \question text text text text text text text text text text text text.\dottedanswerline[\True]          \question text text text text text text text text text text text text.\dottedanswerline[\True]          \question text text text text text text text text text text text text.\dottedanswerline[\False]     \end{questions}               \section{Multiply choices questions}     \begin{questions}       \question Why is there air?       \begin{mychoices}         \item To blow up volleyballs.         \item*  To fill an unneeded void.       \end{mychoices}            \question text text text text text text text text text text text text text text text text text text text text       \begin{mychoices}             \item foo             \item bar             \item*baz       \end{mychoices}          \end{questions}          \section{Other questions}     \begin{questions}     \question[5] text text text text text text text text text text text text text text text text?     \begin{solution}[2cm]     1, text answer1     2, text answer2     \end{solution}          \question text text text text text text text text text text text text text text text text?     \begin{parts}     \part[2]     part one?     \part[2]     part two?     \end{parts}     \begin{solution}[2cm]     1, answer to part1     2, answer to part2     \end{solution}     \end{questions}     \section{Answers}     % \newpage     % Some time later     \answertext          \end{document}       And here is the screen shot, I just want to put the answers(in blue color) in the end of the document. Those answers are put in the solution environment defined by exam class, so I try to use the `\AtEndEnvironment{solution}{\xappto\answertext{\thequestion,\BODY\space}}` command to append the body of the solution environment to the global variable, but surely `\BODY` is not defined. Another improvement is that I need to put different kind of answers in different paragraphs, not in the same line as currently shown in the image. ![put answers in the end of document](http://i.stack.imgur.com/2ROY3.png)


title: Upper case chapter titles Tocstyle?

text: I would like to make table of contents in Tocstyle (standard package). Here is my code.                       \documentclass[fontsize=12pt]{scrreprt}     \usepackage{tocstyle}     \usetocstyle{standard}               \addtokomafont{disposition}{\rmfamily}          \usepackage{titlesec}     \usepackage{setspace}     \usepackage{tocloft}            \renewcommand{\thechapter}{\Roman{chapter}}     \renewcommand \thesection{\arabic{chapter}.\arabic{section}}     \renewcommand \thesubsection{\arabic{chapter}.\arabic{section}.\arabic{subsection}}          \titleformat{\chapter}[display] {\singlespacing\rmfamily\fontsize{16pt}{19pt}\bfseries}     {\MakeUppercase{\chaptertitlename\ \thechapter}\filcenter}{10pt}{\centering\uppercase}     {\fontsize{14pt}{16pt}\filcenter}                       \begin{document}     \tableofcontents     \newpage     \chapter{Test}     \section{Test}     \chapter{Test}     \section{Test}     \chapter{Test}     \section{Test}          \end{document}      and I cannot use the following code with Tocstyle.               \renewcommand{\cftchapfont}{\bfseries\uppercase}      I would like to make a title of contents with all capital letters like "TEST".![enter image description here](http://i.stack.imgur.com/DQ8Iq.png)


title: pgfGantt does not connect relations to bars

text: I am using pgfgantt to outline a project timeline, but there is blank space along the x axis between the between the relations and the block. I would like the lines to start at the edge of the blocks. A minimal example is below.               \documentclass{article}     \usepackage{pgfgantt}          \begin{document}          \begin{center}     \begin{tikzpicture}[scale=\textwidth/105cm, yscale=3]     \begin{ganttchart}{150}     %tasks                                                                                \ganttbar[name=t1]{Task 1}{2}{21}\\     \ganttbar[name=t2]{Task 2}{21}{28+3}\\     %relations                                                                                \ganttlink{t1}{t2}     \end{ganttchart}     \end{tikzpicture}     \end{center}          \end{document}      This outputs: ![enter image description here](http://i.stack.imgur.com/fwTeI.png)


title: Align pinned nodes in PGFplots

text: I'm working with plots generated from `matlab2tikz` and I have several plot lines close to each other. Labeling them is proving difficult, but I believe a good looking solution could be to list the labels, and draw vertical lines to the appropriate plot. Consider the following MWE:               \documentclass{standalone}     \usepackage{tikz, pgfplots}     \begin{document}     \begin{tikzpicture}[scale = 3.5]         \begin{axis}[xmin=0,xmax=3,ymin=0,ymax=5]             \addplot[domain=0:3,solid]{(x-4)^2}    node[pos=0.8,pin=-180:{Plot 1}] {} ;             \addplot[domain=0:3,solid]{(x-3.5)^2}  node[pos=0.8,pin=-180:{Plot 2}] {} ;             \addplot[domain=0:3,solid]{(x-3)^2}    node[pos=0.8,pin=-180:{Plot 3}] {} ;         \end{axis}     \end{tikzpicture}     \end{document}      Which produces ![enter image description here](http://i.stack.imgur.com/0Su2k.png) Given I don't know where the `addplot` plots will show up (i.e around `x = 3` or `x = 300`), is there a way to align the labels/nodes with equal height spacing, and have the pins extend until they reach the plot?


title: Render author with lower case name in bibliography

text: I have an author who decided to lower the case of the first letter of both her name and surname as a political act. Problem is `Biber` doesn't agree with it and complains with               WARN - Couldn't determine Last Name for name "case, lower" - ignoring name      How do I increase `Biber` sensitivity toward political differences? Please consider the following MWE to replicate the warning message               \RequirePackage{filecontents}          \begin{filecontents*}{mybib.bib}     @article{lower_case,         title = {Title},         volume = {15},         number = {5},         urldate = {2012-10-12},         journal = {Journal},         author = {case, lower  and Case, Upper},         month = jun,         year = {2012},         pages = {222--333}     }     \end{filecontents*}          \documentclass{article}               % Set the values for the bibliography     \usepackage[         style=apa,         backend=biber,         isbn=false,         url=false,         doi=false,         eprint=false,         hyperref=true,         backref=false,         firstinits=false,     ]{biblatex}          % Recommended for biblatex     \usepackage[utf8]{inputenc}     \usepackage{csquotes}     \usepackage{xpatch}          % Set language     \usepackage[british]{babel}     \DeclareLanguageMapping{british}{british-apa}          \addbibresource{mybib.bib}          \begin{document}          \cite{lower_case}          \printbibliography     \end{document}


title: Failed pre-flight: How do I repair .notdef and incorrect glyphs?

text: I am trying to get a document that is written with XeLaTex printed as a book by a professional printer. The PDF I sent to the company did not pass their pre-flight check, however. Their tool "pdfToolbox 6.3" produced a report with the (only) error message (translated from German): “Font refers to ".notdef" glyph” (followed by a list of page numbers). That report also marks the problems with red boxes. Here is an example: ![bad](http://i.stack.imgur.com/SPFTd.png) Hovering over the box, I get a tooltip message that reads: “Font refers to ".notdef" glyph, Page 183, font BqkpklGmylbhCMEX10 [...]” And this is how it is supposed to look: ![good](http://i.stack.imgur.com/2NE49.png) So there are actually two problems - _incorrect_ glyphs and _.notdef_ glyphs, and the latter are found by the pre-flight tool. There are no “Missing character: ...” messages in XeLaTex's log file. I have tried to come up with a MWE, but since I do not have access to pdfToolbox, the following code may possibly not reproduce the problem.               \documentclass{scrbook}     \usepackage[fleqn]{amsmath}     \usepackage{amsthm}     \usepackage{exscale}     \usepackage{mathspec}     \setmainfont[Mapping=tex-text]{Minion Pro}     \setmathsfont(Digits,Latin){Minion Pro}     \setmathrm{Minion Pro}     \begin{document}     \begin{align*}      S(0, j) &= j\cdot \mathit{del}, \nonumber \\      S(i, 0) &= \sum_{k=1}^i v(b_k, f_k, \varepsilon), \nonumber \\      S(i, j) &= \max\left\{      \begin{array}{l}       S(i, j-1) + \mathit{del},\\       \max\limits_{k=0,\dots,j}\, \big(S(i-1, k) + v(b_i,f_i, s_{k+1\ldots j})\big)\\      \end{array}     \right\} \,.     \end{align*}     \end{document}


title: What are the parameters of Definition enviroment?

text: I'm trying to redefine Definition theoremstyle and I'm stuck trying to find a single webpage where I could look up the parameters of that style. I keep finding plain style, but that's not what I want. Help.


title: Automatically generate section title slides in beamer?

text: Is there a way to get beamer to automatically stick in a slide with a centered title whenever I use `\section{title}` or `\subsection{title}` or (heaven forbid) `\subsubsection{title}`? I'm hoping some package or command will do this for every time one of these commands is used, but I would settle for a `\maketitle` type command that would work within each section or subsection.


title: xcookybooky -- too much vertical space between recipes

text: It seems to me that there is too much vertical space between individual recipes or between recipe and its hint. Is there a way to make it narrower? ![Imgur](http://i.imgur.com/GMr6gTu.png) MWE:               \documentclass[a4paper]{article}     \usepackage{graphicx}     \usepackage{ifxetex,ifluatex}     \usepackage{xcookybooky}     \usepackage{textcomp}          %%% Fix the setting by xcookybooky     \AtBeginDocument{       \setRecipenameFont{\familydefault}{\encodingdefault}{b}{n}     }          \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex       \usepackage[T1]{fontenc}       \usepackage[utf8]{inputenc}       \usepackage[czech]{babel}     \else % if luatex or xelatex       \usepackage{fontspec}       \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}       \ifluatex         \usepackage[czech]{babel}       \fi       \ifxetex         \usepackage{polyglossia}         \setmainlanguage{czech}       \fi     \fi          \IfFileExists{microtype.sty}{\usepackage{microtype}}{}          \ifxetex       \usepackage[setpagesize=false, % page size defined by xetex                   unicode=false, % unicode breaks when used with xetex                   xetex]{hyperref}     \else       \usepackage[unicode=true]{hyperref}     \fi     \hypersetup{linkcolor=black}          %\setromanfont{Georgia}     %\setRecipenameFont{Georgia}{T1}{m}{n}     \setRecipeColors{recipename=black}     \title{Recepty}     \author{Václav Zeman a Ludmila Zemanová}     \date{\today}          \setHeadlines{       inghead = Ingredience,       prephead = Příprava,       hinthead = Tip,       calory = energetický obsah,       continuationhead = Pokračování,       continuationfoot = ...pokračování na další stránce...     }               \begin{document}     \begin{recipe}[       source = babička Řepská       ]{Bábovka}       \ingredients{         \unit[40]{dkg} & polohrubá mouka \\         \unit[15]{dkg} & cukr \\         \unit[10]{dkg} & tuk \\         \unit[1]{ks} & prášek do pečiva       }       \preparation{         \step Dát do mísy a zadělat mlékem. Těsto musí být hodně řídké.       }     \end{recipe}          \begin{recipe}[       bakingtime = 40 minut,       bakingtemperature = 190~°C       ]{Bábovka -- bez vajec a bez mléka}       \ingredients{         \unit[300]{g} & polohrubá mouka \\         \unit[150]{g} & moučkový cukr \\         \unit[100]{g} & Hera nebo máslo \\         \unit[1]{ks} & vanilkový cukr \\         \unit[1]{ks} & prášek do pečiva \\         \unit[150]{ml} & vlažná voda \\         \unit[1]{hrst} & rozinek a posekaných ořechů       }       \preparation{         \step Smícháme všechny sypké suroviny včetně rozinek a ořechů.            \step Přilijeme vodu a vlažný rozpuštěný tuk, důkladně promícháme a nalijeme do vymazané a vysypané formy.         \step Pečeme při 190~°C asi 40 minut. Zkoušíme špejlí.       }     \end{recipe}          \begin{recipe}[       bakingtime = 40 minut,       bakingtemperature = 190~°C       ]{Bábovka -- variace předchozího receptu}       \ingredients{         \unit[300]{g} & polohrubá mouka \\         \unit[100]{g} & cukr krystal \\         \unit[100]{g} & Hera nebo máslo \\         \unit[1]{ks} & vanilkový cukr \\         \unit[1]{ks} & prášek do pečiva \\         \unit[150]{ml} & vlažná voda \\         \unit[1]{lžíce} & olej \\         \unit[1]{hrst} & rozinky, nasekané ořechy nebo kandované ovoce       }       \preparation{         \step Smícháme všechny sypké suroviny včetně rozinek a ořechů.            \step Přilijeme vodu a vlažný rozpuštěný tuk, důkladně promícháme         a nalijeme do vymazané a vysypané formy.         \step Pečeme při 190~°C asi 40 minut. Zkoušíme špejlí.       }     \end{recipe}          \end{document}


title: ! LaTeX Error: \caption outside float. Yes in one document, No in another

text: I have the following LaTeX code in a document.               \begin{centering}     \caption{Patient Contacting Materials} \label{tab:materials}          \begin{tabulary}{\textwidth}{LLL}          \toprule     Feature & Manufacturer & Material \\          \midrule          Outer Tray & Solvay & Polysulfone - UDEL P-1700 CL2611 Clear \\     Moldable Inner Material & Perstop &  Polycaprolactone CAPA 650 \\     \bottomrule          \end{tabulary}     \end{centering}      In "document A", it formats perfectly into a small, properly captioned, floating table. In "document B", this exact same text throws off the error "! LaTeX Error: \caption outside float." Any thoughts or insights would be appreciated.


title: nameref fails when chapter title has macro

text: I'm trying to use `\nameref` for chapters. It works fine as long as the `\chapter` command has no macros as argument. If the `\chapter` command takes a macro as argument, `\nameref` always prints the last chapter name. `\autoref` works fine though. A MWE is here.               \documentclass{book}     \usepackage{pgfkeys}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{hyperref}          \hypersetup{       colorlinks=true,       linkcolor=Blue     }          \pgfkeys{%       /chapter/.is family,%       /chapter,%       title/.initial = {},%       label/.initial = {},%     }          \newcommand{\Chapter}[1]{%       \pgfkeys{/chapter, #1, title/.get = \theChapterTitle, label/.get = \theChapterLabel}%       \chapter{\theChapterTitle}\label{\theChapterLabel}%     }          \newcommand{\ChapRef}[1]{%       \autoref{#1} {\textemdash} \nameref{#1}%     }          \begin{document}     %     \Chapter{label=chapter-one, title=Chapter One}     %     \Chapter{label=chapter-two, title=Chapter Two}     %     \Chapter{label=chapter-three, title=Chapter Three}     %          \ChapRef{chapter-one}          \ChapRef{chapter-two}          \ChapRef{chapter-three}          \end{document}      Further to my comment I'm attaching a MWE of what I mean about \chapter command taking multiple arguments.               \documentclass{book}     \usepackage{pgfkeys}     \usepackage{hyperref}          \hypersetup{       colorlinks=true,     }          \pgfkeys{%       /chap/.is family,%       /chap,%       label/.initial = {},%       one/.initial = {},%       two/.initial = {},%     }          \let\ea=\expandafter          \newcommand{\Chapter}[1]{%       \pgfkeys{/chap, #1, one/.get=\First, two/.get=\Second, label/.get=\thechaplabel}%       \ea\chapter{\ea\ea\ea\First\,\ea\textemdash\,\ea\Second}\label{\thechaplabel}     }          \newcommand{\ChapRef}[1]{%       \autoref{#1} - \nameref{#1}%     }          \begin{document}          \Chapter{one=ABC, two=abc, label={abc-abc}}     \Chapter{one=PQR, two=pqr, label={pqr-pqr}}     \Chapter{one=XYZ, two=xyz, label={xyz-xyz}}          \chapter{New Chapter}     \ChapRef{abc-abc}          \ChapRef{pqr-pqr}          \ChapRef{xyz-xyz}          \end{document}      the `\nameref` always displays the latest chapter name whereas the `\autoref` displays the correct chapter number.


title: Dynamic table column generation

text: I'm trying hard in finding a way to streamline my table generation. As you can see in the attached code, the problem is related with the code "\@for \el:=#1\do{\textbf{\el} &}", where "&" should separate the columns and the columntitles. If I remove the "&" char, i get no separated columns, but one whole string in the first column. That makes sense to me, because table cells are seperated with "&". The thing is that i have no clue how to tell latex to accept or eval "&" as column separator. I hope the explanation makes sense somehow. I let the code speak:               \documentclass{article}          \usepackage{longtable}     \usepackage{booktabs}     \usepackage{forloop}     \usepackage{xstring}          \makeatletter          % http://tex.stackexchange.com/a/107298     \newcommand*{\commalength}[1]{%       \StrCount{#1,}{,}%     }          % http://tex.stackexchange.com/a/87420     \newcommand{\columnheader}[1]{%         % if i remove the "&" it works as a whole string but not splitted in columns         % HERE IS THE BUG WITH THE "&"         \@for \el:=#1\do{\textbf{\el} &}%     }     \makeatother               \newcommand{\generatecolumns}[1]{              % getting the column count automatically would be really nice like \commalength{#1}         \multicolumn{5}{l}{\emph{Continuation of \tablename\ \thetable{}}} \\         \toprule         % the column titles should be generated here ...         \columnheader{#1} \\ \midrule         \endhead              \hline          \multicolumn{5}{l}{\emph{Continued on next page}} \\         \bottomrule         \endfoot     }               \begin{document}          \begin{longtable}{lllll}              % this are the column titles         \generatecolumns{Column1,Column2,Column3,Column4,Column5}              \newcounter{i}         \forloop{i}{1}{\value{i} < 100}{             \arabic{i} & a & b & c & d \tabularnewline         }          \end{longtable}          \end{document}      I have searched the forum but have not found a solution to this problem. Many thanks, Gernot


title: Alignment with Multicols and Polyglossia

text: I'm working with a two column multicol environment for an English-Yiddish dictionary (using XeLaTeX and Polyglossia). I have a couple of issues, and I'm putting them all together because I'm not sure whether the solutions are related. (1) I'd like to align the bottoms of the columns. I'm aware that this has been asked before, but using the grid package has not helped (perhaps I'm using it wrong). Note, I'm not worried about individual lines on the left lining up with those on the right, but that the columns look justified vertically as a whole. It seems to work until I add the line `\setlength{\parskip}{3pt}`. (2) I'd like each of the entries that spill onto a second line to be indented on the left after the first line as well as on the right. I can't seem to figure out how to get `\hangindent` to do both left and right. **EDIT:** I solved this by increasing the entire paragraph `\leftskip` and putting a negative `\hspace` on the first line. It feels like a bad hack, and I would love a better answer. (3) Looking at the translation for "be eager to", there seems to be a line break inserted after "בעלן" when the `\hspace` in the definition of `\subentry` is set to 0.3cm or higher, but this problem doesn't occur when `\hspace` is inserting 0.2cm. What could be causing this? Code (with a decent number of [repeated] entries to fill a page):               \documentclass[10pt]{book}     \usepackage{polyglossia, multicol}          \setlength{\textwidth}{7.5in}     \setlength{\oddsidemargin}{-0.5in}     \setlength{\evensidemargin}{-0.5in}     \setlength{\parskip}{3pt}          \setdefaultlanguage{english}     \setotherlanguages{hebrew}     \newfontfamily\hebrewfont[Script=Hebrew]{Arial Unicode MS}          \newcommand{\h}[1]{\RL{\texthebrew{#1}\hfil}}     \newcommand{\hangparagentry}{\hangindent-0.5em \hangafter1 \leftskip 0.3em \parindent -0.5em}     \newcommand{\hangparagsubentry}{\hangindent-0.5em \hangafter1 \leftskip 1.1em \parindent -0.5em}     \DeclareDocumentCommand{\entry}{ m o m }{\noindent\hangparagentry{\textbf{#1}\hspace{0.5cm}\hfill \h{#3\IfNoValueF{#2}{ \textenglish{\scriptsize{#2}}}}}\par}     \DeclareDocumentCommand{\subentry}{ m o m }{\noindent\hangparagsubentry{\textbf{#1}\hspace{0.3cm}\hfill \h{#3\IfNoValueF{#2}{ \textenglish{\scriptsize{#2}}}}}\par}          \begin{document}          \setlength{\columnseprule}{0.4pt}          \flushright          \begin{multicols}{2}          \entry{E}{}     \subentry{(letter)}{דער ע, ־ען}     \subentry{(mus.)}{דער מי, ־ען}     \subentry{E flat}{מי בעמאָל}     \subentry{E sharp}{מי דיעז}     \entry{eager}[[LÓET/LÓER]]{להוט (אױף/צו); נײַגעריק}     \subentry{be eager to}[[BALN] [KhÉYShEK] [LÓET/LÓER]]{זײַן אַ בעלן צו; האָבן חשק צו; זײַן נײַגעריק ‹להוט› צו; זײ֜ער ‹שטאַרק› װעלן}     \subentry{be eager to please}{שטאַרק באַמיִען זיך צו געפֿעלן}     \entry{E}{}     \subentry{(letter)}{דער ע, ־ען}     \subentry{(mus.)}{דער מי, ־ען}     \subentry{E flat}{מי בעמאָל}     \subentry{E sharp}{מי דיעז}     \entry{eager}[[LÓET/LÓER]]{להוט (אױף/צו); נײַגעריק}     \subentry{be eager to}[[BALN] [KhÉYShEK] [LÓET/LÓER]]{זײַן אַ בעלן צו; האָבן חשק צו; זײַן נײַגעריק ‹להוט› צו; זײ֜ער ‹שטאַרק› װעלן}     \subentry{be eager to please}{שטאַרק באַמיִען זיך צו געפֿעלן}     \entry{E}{}     \subentry{(letter)}{דער ע, ־ען}     \subentry{(mus.)}{דער מי, ־ען}     \subentry{E flat}{מי בעמאָל}     \subentry{E sharp}{מי דיעז}     \entry{eager}[[LÓET/LÓER]]{להוט (אױף/צו); נײַגעריק}     \subentry{be eager to}[[BALN] [KhÉYShEK] [LÓET/LÓER]]{זײַן אַ בעלן צו; האָבן חשק צו; זײַן נײַגעריק ‹להוט› צו; זײ֜ער ‹שטאַרק› װעלן}     \subentry{be eager to please}{שטאַרק באַמיִען זיך צו געפֿעלן}     \entry{E}{}     \subentry{(letter)}{דער ע, ־ען}     \subentry{(mus.)}{דער מי, ־ען}     \subentry{E flat}{מי בעמאָל}     \subentry{E sharp}{מי דיעז}     \entry{eager}[[LÓET/LÓER]]{להוט (אױף/צו); נײַגעריק}     \subentry{be eager to}[[BALN] [KhÉYShEK] [LÓET/LÓER]]{זײַן אַ בעלן צו; האָבן חשק צו; זײַן נײַגעריק ‹להוט› צו; זײ֜ער ‹שטאַרק› װעלן}     \subentry{be eager to please}{שטאַרק באַמיִען זיך צו געפֿעלן}     \entry{E}{}     \subentry{(letter)}{דער ע, ־ען}     \subentry{(mus.)}{דער מי, ־ען}     \subentry{E flat}{מי בעמאָל}     \subentry{E sharp}{מי דיעז}     \entry{eager}[[LÓET/LÓER]]{להוט (אױף/צו); נײַגעריק}     \subentry{be eager to}[[BALN] [KhÉYShEK] [LÓET/LÓER]]{זײַן אַ בעלן צו; האָבן חשק צו; זײַן נײַגעריק ‹להוט› צו; זײ֜ער ‹שטאַרק› װעלן}     \subentry{be eager to please}{שטאַרק באַמיִען זיך צו געפֿעלן}     \entry{E}{}     \subentry{(letter)}{דער ע, ־ען}     \subentry{(mus.)}{דער מי, ־ען}     \subentry{E flat}{מי בעמאָל}     \subentry{E sharp}{מי דיעז}     \entry{eager}[[LÓET/LÓER]]{להוט (אױף/צו); נײַגעריק}     \subentry{be eager to}[[BALN] [KhÉYShEK] [LÓET/LÓER]]{זײַן אַ בעלן צו; האָבן חשק צו; זײַן נײַגעריק ‹להוט› צו; זײ֜ער ‹שטאַרק› װעלן}     \subentry{be eager to please}{שטאַרק באַמיִען זיך צו געפֿעלן}     \entry{E}{}     \subentry{(letter)}{דער ע, ־ען}     \subentry{(mus.)}{דער מי, ־ען}     \subentry{E flat}{מי בעמאָל}     \subentry{E sharp}{מי דיעז}     \entry{eager}[[LÓET/LÓER]]{להוט (אױף/צו); נײַגעריק}     \subentry{be eager to}[[BALN] [KhÉYShEK] [LÓET/LÓER]]{זײַן אַ בעלן צו; האָבן חשק צו; זײַן נײַגעריק ‹להוט› צו; זײ֜ער ‹שטאַרק› װעלן}     \subentry{be eager to please}{שטאַרק באַמיִען זיך צו געפֿעלן}     \entry{E}{}     \subentry{(letter)}{דער ע, ־ען}     \subentry{(mus.)}{דער מי, ־ען}     \subentry{E flat}{מי בעמאָל}     \subentry{E sharp}{מי דיעז}     \entry{eager}[[LÓET/LÓER]]{להוט (אױף/צו); נײַגעריק}     \subentry{be eager to}[[BALN] [KhÉYShEK] [LÓET/LÓER]]{זײַן אַ בעלן צו; האָבן חשק צו; זײַן נײַגעריק ‹להוט› צו; זײ֜ער ‹שטאַרק› װעלן}     \subentry{be eager to please}{שטאַרק באַמיִען זיך צו געפֿעלן}     \entry{ear}{}     \subentry{(anat.)}{דער/דאָס אױער, ־ן}     \subentry{(hearing)}{דאָס געהער}     \subentry{(of corn)}{די פּשעניטשקע, ־ס; די זאַנג ‹דאָס זאַנגל› קוקורוזע; דער קאַטשן, קאַטשענעס}     \subentry{be all ears}{אױפֿשטעלן די אױערן; אָנשטעלן מױל און אױערן}     \subentry{up to one's ears in}{איבערן קאָפּ מיט; ביז איבער די אױערן מיט}     \subentry{by ear (mus.)}{לױטן געהער; נאָכן געהער נאָך}     \subentry{have a good ear}{האָבן אַ גוט אױער; האָבן אַ גוט געהער; האָבן אַן אױער פֿאַר מוזיק}     \subentry{have an ear to the ground}[[DÉYFEK]]{װיסן װאָס סע טוט זיך; האַלטן אַ פֿינגער אױפֿן דפֿק}     \subentry{have sb.'s ear}{האָבן אַ טיר צו}     \subentry{It went in one ear and out the other}[[BEKhÉYREM]]{ס׳איז מיר אין אײן אױער אַרײַן און פֿון צװײטן אַרױס; פֿרעג מיך בחרם װאָס ער האָט געזאָגט}     \subentry{to my ear}[[KhUSh]]{לױט מײַן חוש}          \end{multicols}     \end{document}


title: Cover page with latex

text: How can I design the following cover with latex? ![enter image description here](http://i.stack.imgur.com/yZVOJ.png)


title: Expanding tick marks and labels beyond data set

text: I am looking to expand the y- and x-axis values beyond the data for visual reasons. I tried to force the ticks and labels, but it did not work. I wish the two axis to start at zero and end beyond the maximum datapoints. This is my first attempt at `pgfplots.`               \documentclass{article}     \usepackage{tikz,pgfplots}     \usetikzlibrary{snakes,backgrounds,arrows,decorations.markings}     \begin{document}     %     %     \begin{center}     \begin{tikzpicture}                     \begin{axis}[                             small,                              xlabel=Time in min.,                             ylabel=Distance in mi.,                             axis y line=left,                             axis x line=bottom,                             xtick={0,2,4,6,8,10,12},                             ytick={0,1,1.5,2,...,3.5},                             xticklabels={0,2,4,6,8,10,12},                             yticklabels={0,1,1.5,2,...,3.5},                             xtickmin=0,                             xtickmax=11,                             ytickmin=0,                             ytickmax=3.5                                 ]                      \addplot[color=blue,mark=*]                          coordinates {                             (1,1)                             (2,1)                             (5,3)                             (8,3)                             (9,2)                             (10,3)                                     };                     \end{axis}      \end{tikzpicture}     \end{center}     %     %     \end{document}


title: How to plot data with time in x-axis, but no date?

text: I have a set of data in below format,               #time    #value     01:10    2     02:15    3     02:20    7     ...      _The 'time' is given in HH:mm format._ I want to plot the data with the _time_ dimension on the _x-axis_. The data comes without a **date** part. But I got an _argument run away_ error. I have to add the _date_ part to the data to plot the data, as I did below. > I would like to know if there's a way to plot the data **without** providing > the date part, as it would be very confusing if someone looks at the code.               \begin{tikzpicture}       \begin{axis}[         date coordinates in=x,         xtick=data,         xticklabel=\hour:\minute,         xlabel=Time \small{(minutes from 12:00 pm)},         ylabel=\# of Players,         date ZERO=2014-1-1,       ]         \addplot coordinates {           (2014-1-1 00:00,6000)           (2014-1-1 00:30,5800)           (2014-1-1 1:00,6000)           (2014-1-1 1:30,5500)           (2014-1-1 2:00,5300)           (2014-1-1 2:30,5000)         };       \end{axis}     \end{tikzpicture}


title: how to add space between nodes in tikz?

text: I have the following tikz picture:                \documentclass{book}      \usepackage{tikz}           \begin{document}           \begin{tikzpicture}      \node(x1) {$x_1$};      \node(x2) [right of = x1] {$x_2$};      \node(x3) [right of = x2]{$x_3$};      \node(x4) [right of = x3]{$x_4$};           \draw [->] (x1) -- (x2) ;      \draw [->] (x2) -- (x3) ;      \draw [->] (x3) -- (x4) ;                \node(y1) [below of = x1]{$y_1$};      \node(y2) [right of = y1] {$y_2$};      \node(y3) [right of = y2] {$y_3$};      \node(y4) [right of = y3] {$y_4$};           \draw [->] (y1) -- (x1) ;      \draw [->] (y2) -- (x2) ;      \draw [->] (y3) -- (x3) ;      \draw [->] (y4) -- (x4) ;           \end{tikzpicture}            \end{document}      I want the arrows to be longer. When I use "shorten >= -5pt" for example, in the draw command in the square brackets, the arrows become longer, but they go over the nodes. Is there a way to make everything more spacious, in addition to lengthening the arrows? Also, is there a way to insert another node to the left of one of the vertical arrows? (or more specifically, how do I state "below of" or "left of" etc. for an arrow, and not a node?) I tried \draw(arr1) to label the arrow, and then later put a node to the left of arr1, but I get an error.


title: Latex Longtable - Caption starts at margin

text: I am having a problem using longtable `\caption`. The captions are not set to `\textlength` and run into the margins. I would like the multi-line captions to be restricted to `\textlength` and centred under the table itself. ![screenshot 1](http://i.stack.imgur.com/JKkfW.png) ![screenshot 2](http://i.stack.imgur.com/VSuuJ.png) I have tried:               \usepackage{caption} \captionsetup[table]{singlelinecheck=false}     \usepackage{caption} \captionsetup[longtable]{singlelinecheck=false}          \LTcapwidth=\textwidth      All to no avail. A sample table is:               \LTcapwidth=\textwidth     \begin{longtable}[c]{l c c c c c c}      & $p < 0.05$ & $p < 0.01$ & $p < 0.001$ & $p < 10^{-6}$ & $p < 10^{-7}$ & $p <                 p_{\text{genome}}$\\     SNP p-value & 80 & 80 & 80 & 0 & 0 & 0\\     SNP p-value Inverse & 80 & 80 & 80 & 0 & 0 & 0\\     Tree Min p-value & 80 & 80 & 80 & 4 & 1 & 0\\     Tree Min p-value Inverse & 80 & 80 & 80 & 0 & 0 & 0\\     \label{tab:nullpop}     \caption{A summary of the minimum p-value results for the trees built with     \possessivecite{RefWorks:116} null population data. The value used for $p <     p_{\text{genome}}$ is the value derived from the 1000 Genomes Data of $p < 10^{-8.86}$.}     \end{longtable}


title: Keeping two rows on one page using longtable

text: I am creating a `longtable` which spreads over multiple pages. The problem is that the coefficients and standard errors which are in two consequential rows sometimes get separated. How to I hold those two rows together (i.e. on one page)? So for example image that you want the AAAAA and CC row to be always to be packed together (AAAA always followed by CC). Now the last row in this table (on the first page) is AAAA but I want it to be together with the first row on the next page. One solution would be to put a pagebreak before the last AAAA (on the first page) but I need a general solution because I am producing lots of tables like this (automatically).               \documentclass{article}          \usepackage[referable]{threeparttablex}     \usepackage{longtable}     \usepackage{booktabs}          \begin{document}          \begin{ThreePartTable}     \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}     \begin{TableNotes}[flushleft]     \item[a] \label{tn:a} \footnotesize test test test test test test test test     \item[b] \label{tn:b} test2     \item Test     \source Made up by daleif     \end{TableNotes}     \begin{longtable}{@{\extracolsep{4pt}}l*{2}{c}@{}}     \caption{A long table that goes on and on and ....}\\     \toprule     Column 1 & Column 2 & Column 3 \\     \midrule     \endfirsthead     \multicolumn{3}{l}{\emph{... table \thetable{} continued}} \\     \toprule     Column 1 & Column 2 & Column 3 \\     \midrule     \endhead     \midrule     \multicolumn{3}{r}{\emph{Continued on next page...}}\\     \endfoot     \bottomrule     \insertTableNotes\\     \endlastfoot     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\               AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\             AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\       CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\                CC   &          & DD  \\     AAAA & XXXXXXXX & BBBB \\     AAAA\tnotex{tn:a} & XXXXXXXX & BBBB \\       CC   &          & DD\tnotex{tn:b}   \\     \end{longtable}     \end{ThreePartTable}          \end{document}


title: Full Customize of Itemize and Enumerate

text: Suppose, it's necessary to change the most of itemize or enumerate parameters _globally_ (it's not elegant to change the parameters inside every itemize or enumerate environment). If to write something like               \renewcommand{\@listI}{     \leftmargin=5mm     \labelsep=5mm     \itemindent=0mm     \listparindent=3mm}      it will not work in standard LaTeX classes. Also, it's possible to create own itemize like               \newenvironment{itemizetest}     {\begin{list}{$\bullet$}{     \leftmargin=5mm     \labelwidth=3mm     \labelsep=3mm     }}{\end{list}}      but it's just one-level itemize (not nested).   1. Is it possible to change default parameters of itemize/enumerate globally (in preamble)?   2. If to create own itemize or enumerate, is it possible to create 2nd level (nested)?


title: progressbar Beamer theme: Errors trying to build an adapted example

text: I'm very new to `LaTeX`, so sorry, if this question is too trivial. I'm using the following code to build a **sample presentation** , based on the 'progressbar' `Beamer` theme and its demo code:               \usepackage[english] {babel}     \usepackage[T1]      {fontenc}          \usepackage{amsmath, amsfonts, graphicx}     \usepackage{bibunits, tikz}          \graphicspath{{./}{images/}{/home/ruser/diss-floss/figures/}}          \usetheme{progressbar}     \progressbaroptions{imagename=LogoNSU}          \setbeamersize       {text margin left=1em, text margin right=1em}          \title       [Short Title]       {Full Title of the Presentation}          \author       [Bruce Wayne]       {Bruce Wayne\quad Clark Kent\\Peter Parker\quad Alan Scot}          \date       {April 01, 2011}          \institute       {Justice League of America}          \begin{document}          \maketitle          \begin{frame}{Overview}            \tableofcontents          \end{frame}          \section       {Introduction}          \begin{frame}       {Introduction}            Things in a Bulleted List\pause            \begin{enumerate}       \item Bullets that         \begin{enumerate}         \item one         \item two         \end{enumerate}\pause       \item Come up         \begin{enumerate}         \item one         \item \emph{two} and three         \end{enumerate}\pause       \item One by one         \begin{enumerate}         \item one         \item two         \end{enumerate}       \end{enumerate}     \end{frame}               \section       {Main Body}          \subsection{Equations}          \begin{frame}       {Equations}            Equations are easy       \begin{itemize}       \item Just copy/paste equations\pause       \item From the paper!         \begin{equation*}           \textbf{p}^* = \underset{\textbf{p}}{\arg\!\min}~\sum_{\textbf{x}}\left[ I(\textbf{W}(\textbf{x};\textbf{p})) - T(\textbf{x}) \right]^2         \end{equation*}       \end{itemize}     \end{frame}               \begin{frame}       {Pictures}            \begin{figure}[t]         \centering         \includegraphics[height=\dimexpr11\textheight/16\relax]{ggplot2ExamplePlot}         \caption{Sample ggplot2 plot}       \end{figure}     \end{frame}               \begin{frame}       {A Movie}            \begin{block}         {Some block}              \begin{itemize}         \item Movies only seem to work in Adobe Reader         \item Movie file is not embedded, it must be on the computer         \end{itemize}       \end{block}            \pause       \begin{alertblock}         {Some more block}              Movies only seem to work in Adobe Reader\par         Movie file is not embedded, it must be on the computer       \end{alertblock}       \pause            \begin{exampleblock}{}         Some text in here.              \begin{itemize}[<+->]         \item Movies only seem to work in Adobe Reader         \item Movie file is not embedded, it must be on the computer and           what happe with a very long item?         \end{itemize}       \end{exampleblock}     \end{frame}               \section       {Conclusion}          \begin{bibunit}[plain]     \begin{frame}       {Credits}            \begin{itemize}       \item Brought to you by Cédric Mauclair       \item Please let me know about improvements!       \item Inspiration: \url{http://www.shawnlankton.com}... (in code)       \end{itemize}            \nocite{ipsum}       \bibliography{demo}          \end{frame}     \end{bibunit}          \begin{bibunit}[plain]     \begin{frame}       {Questions}            \nocite{lorem}       \bibliography{demo}          \end{frame}     \end{bibunit}               \appendix[Appendices]          \begin{frame}       \frametitle{First appendix}     \end{frame}          \begin{frame}       \frametitle{Second appendix}     \end{frame}          \end{document}               %%% Local Variables:     %%% mode: latex     %%% TeX-master: "demo-slides.tex"     %%% End:      Please note that my changes in this demo document currently are limited to the following:   1. `\graphicspath{{./}{images/}{/home/ruser/diss-floss/figures/}}`   2. `\progressbaroptions{imagename=LogoNSU}`   3. `\includegraphics[height=\dimexpr11\textheight/16\relax]{ggplot2ExamplePlot}` `\caption{Sample ggplot2 plot}` The **build process** is mainly successful, but it produces the following messages:               ! Package pgfkeys Error: I do not know the key '/pb/imagename' and I am going t     o ignore it. Perhaps you misspelled it.          See the pgfkeys package documentation for explanation.     Type  H <return>  for immediate help.      ...          l.10 \progressbaroptions{imagename=LogoNSU}          ?      After I press key, the process completes, but it fails to replace the default theme's picture (`tree04.jpg`) with my custom one (`LogoNSU.jpg`). Here's the corresponding log excerpt:               [1          {/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} </usr/share/texmf/tex/latex     /beamer/themes/theme/images/tree04.jpg>]     No file demo-slides.toc.     [2           </usr/share/texmf/tex/latex/beamer/themes/theme/images/tree04.jpg>]      Why is this happening? Also, some visual elements are distorted. For example fonts in my version are not as solid as in the original example. Finally, text in text blocks on pages `Credits` and `Questions` is completely missing (blocks are empty). Your help is much appreciated! My environment:               pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)     kpathsea version 6.1.1     Compiled with libpng 1.2.49; using libpng 1.2.50     Compiled with zlib 1.2.8; using zlib 1.2.8     Compiled with poppler version 0.24.5


title: How to align colons on titlepage

text: I would like to align the two colons in the \author field of my titlepage. Is there a possibility to do this in a similar way as in the \align environment?               \documentclass[a4paper,12pt]{article}     \linespread{1.5}     \usepackage[margin=2cm]{geometry}     \usepackage{ngerman}     \usepackage[utf8]{inputenc}     \usepackage{multicol}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{ulem}     \usepackage{graphicx}     \usepackage{natbib}     \usepackage{float}     \usepackage[compact]{titlesec}     \begin{document}     \begin{titlepage}     \title{Title}     \author{Me\\Referentin: XXX \\Korreferent: XXX}     \date{9. Dezember 2013}     \maketitle     \begin{figure}[h!]     \centering     \includegraphics[width=0.8\textwidth]{Bilder/titelbild/Istanbul.jpg}     \end{figure}     \end{titlepage}      Thank you for your help in advance.


title: Multi-page Figure with subcaption package

text: I have a figure with subfigures defined using the **subcaption** package (*not the deprecated subfig or subfigure). I need the parent figure to span two pages with two subfigs on each page. I have achieved this using the `\ContinuedFloat` command, however my subfigure numberings are resetting between pages instead of resuming. Below is a minimal example:               \usepackage{graphicx,subcaption}          \begin{figure}[H]       \caption{My Figure}         \begin{subfigure}{\textwidth}             \caption{Fig 1}             \includegraphics[...]{something.jpg}         \end{subfigure}         \begin{subfigure}{\textwidth}             \caption{Fig 2}             \includegraphics[...]{something.jpg}         \end{subfigure}     \end{figure}     % allow break     \begin{figure}[H]         \ContinuedFloat % continue from previous page         \begin{subfigure}{\textwidth}             \caption{Fig 3}             \includegraphics[...]{something.jpg}         \end{subfigure}         \begin{subfigure}{\textwidth}             \caption{Fig 4}             \includegraphics[...]{something.jpg}         \end{subfigure}     \end{figure}      In this example 'Fig 3' and 'Fig 4' are incorrectly labelled (a) and (b) instead of (c) and (d). How can I resume the subfig numbering correctly?


title: Problem with Folding Library in Tikz package

text: I'm trying to run through a trail but can't seem to get it to work. Code goes as follows.               \documentclass[11pt]{article}           \usepackage{tikz}           %optional libraries      \usetikzlibrary{decorations,arrows,automata,positioning}      \usetikzlibrary{mindmap}      \usetikzlibrary{calc}      \usetikzlibrary{folding}      \usepackage[grapics,tightpage,active]{preview}      \setlength{\PreviewBorder}{2pt}      \PreviewEnvironment{tikzpicture}           \begin{document}      \begin{tikzpicture}           \begin{tikzpicture}[transform shape]     \tikzfoldingdodecahedron     [folding line length=10mm,     face 1 = {\node {1};},     face 2 = {\node {2};},       face 3 = {\node {3};},     face 4 = {\node {4};},     face 5 = {\node {5};},     face 6 = {\node {6};},     face 7 = {\node {7};},     face 8 = {\node {8};},     face 9 = {\node {9};},     face 10 = {\node {10};},     face 11 = {\node {11};},     face 12 = {\node {12};},              \end{tikzpicture}         \newpage             \end{document}


title: Can not find how to change the size of text blocks

text: I am looking at the CV template located here, and I can not figure out how to make the description text blocks wider on the right. The blocks I am talking about are the ones similar to the block starting with   "`Provided analysis of spreads..`" What should I be looking at?


title: code-block directive causing error Empty verbatim environment

text: When I use directive .. code-block:: c in rst on Ubuntu 12.04 version and compile using latexpdf Error:               (/usr/share/texmf-texlive/tex/latex/psnfss/t1pcr.fd)     ! FancyVerb Error:       Empty verbatim environment     .     \FV@Error ... {FancyVerb Error:     \space \space #1     }          l.537 \end{Verbatim}               ?       Generated log file has follwoing error lines:               1128 LaTeX Font Info:    Try loading font information for T1+pcr on input line 536.     1129 (/usr/share/texmf-texlive/tex/latex/psnfss/t1pcr.fd     1130 File: t1pcr.fd 2001/06/04 font definitions for T1/pcr.     1131 )     1132 ! FancyVerb Error:     1133   Empty verbatim environment     1134 .     1135 \FV@Error ... {FancyVerb Error:     1136 \space \space #1     1137 }     1138      1139 l.537 \end{Verbatim}     1140      1141 ?     1142       I am not sure what is happening...? what I should do? If I remove .. code- block directive the compilation is sucessful. But I want ..code-block diretive for C code formating, Any help is appreciated.


title: IDE / Best known method for writing Hebrew documents with LaTeX

text: I usually use LyX to prepare lecture notes, course summaries, etc. The reason I use LyX and not LaTex directly is twofold -   1. I usually need to type in real time - summing a lecture. I think for this I'd still need LyX.   2. I write all these documents in Hebrew, and it seems to me that writing Hebrew documents with LaTeX will be a real pain (different direction of text, etc.). So I'm looking to solve #2 - have you ever used LaTeX for a right-to-left language effectively? What IDEs support this? What do you do when you need to write a document in such a language?


title: Height of colorbox

text: I'm trying to "highlight" two parts of a sentence by using a `\colorbox` like so:               \colorbox{red}{This is} \colorbox{blue}{a great sentence.}      The problem is that in the second part the height colorbox is a bit bigger, because it contains a `g` which extends below the baseline. As a result, the two colorboxes do not align at the bottom which looks suboptimal. How would I make the two boxes line up?