title: First use of glossary entry with asterisk

text: My question seems easy : How put an asterisk at the end of all first use of glossaries occurrences in the text (or for exemple, put it in bold…) ? But only in my glossary, not in my acronyms.               \documentclass{scrbook}     \usepackage[acronyms]{glossaries}          \newglossaryentry{word}{name={word},description={def. 1}}     \newglossaryentry{other}{name={other},description={def. 2}}     \newacronym[option=description]{acr}{Acronym}{Complet}+          \begin{document}     First use of \gls{word} and second use : \gls{word}.\\     First use of \gls{other} and second use : \gls{other}.\\     First use of \gls{act} and second use : \gls{acr}.          \printglossaries     \end{document}      I want just this result : > First use of word* and second use : word. > > First use of other* and second use : other. > > First use of Acronym (acr) and second use : acr. It must exist a simple command, but I don't find in the big `glossaries` manual… My problem is that I'm not english speaker. Thanks for your help.


title: Is there a "rule" that figures "must" be at the top of a page, and tables at the bottom?

text: Today I had a discussion with my professor, who demands me to put all of my figures at the top of a page, and all tables at the bottom. None may be inline with the text. He says that "this is the rule", although he cannot give me a source. Are there any arguments to back up his claim? If not, how can I convince him that this is bollocks?


title: How do I remove the hyphens from \bridge and \hapto in chemmacros \ch environment?

text: I'd like to typeset a chemical formula with both bridging and hapticity. (Specifically the title of this paper). There is a `coord-use-hyphen` option, but that only works inside the IUPAC environment, not the `\ch` environment. Here is the (almost) working example of what I want:               \documentclass[letterpaper]{article}          %Chemistry stuff     \usepackage{chemmacros}     \newcommand{\cheminfty}{\ensuremath{\infty}}               \begin{document}     \ch{^\cheminfty_{1}Zn[\trans-\bridge{2}(\hapto{3}:\hapto{3}-Ge9)]^{2-}}     \end{document}      As you can see, I have hyphens that should not exist after the `\bridge` and `\hapto`: Can someone help me fix this?


title: amscls.sty not found

text: both texmaker and texniccenter have problems with the replacement of amslatex with amsmath,amscls,amslatex-primer (see picture).![Error message in texmaker](http://i.stack.imgur.com/KbAnX.jpg) My tex file looks as follows:               \documentclass[a4paper,12pt]{scrartcl}     \usepackage{selinput}     \SelectInputMappings{     adieresis={ä},     germandbls={ß}}     \usepackage[ngerman]{babel}     \usepackage{color}     \usepackage[a4paper,lmargin={3cm},rmargin={3cm},     tmargin={2.5cm},bmargin = {2.5cm}]{geometry}     \usepackage{amsmath}     \usepackage{amscls}     \usepackage{amslatex-primer}          \begin{document}          $x=2$\\     $\mathbb{R}$          \end{document}      The error I receive both from texmaker and texniccenter is:               ! LaTeX Error: File `amscls.sty' not found.      I have installed the new packages (see picture) ![miktex package](http://i.stack.imgur.com/KSNLE.jpg) I think I have configured texmaker correctly (see picture) ![texmaker configuration](http://i.stack.imgur.com/JowOR.jpg) I also updated MikTex and synchronized and everything. Thank you for your help! nbt


title: Extract the numerical and non-numerical portion from text

text: I would like to extract the leading number and subsequent text from a string. I have an idea of using the `xstring` package to gobble characters from the right until I end up with a number or an empty string, but wondering if there is an easier way to do it. The leading number is all the text up until the first character that is not a digit, period, or a plus and minus sign. Don't really need to worry about error cases such as:   * an additional `+`, `-` within the number   * more digits after first non-numerical digit So, I should get the following output with the definitions of `\ExtractLeadingNumber` and `\ExtractTralingNonDigits` completed: ![enter image description here](http://i.stack.imgur.com/THJ3b.png) ## Code:               \documentclass[border=2pt]{standalone}     \usepackage{booktabs}          \newcommand*{\ExtractLeadingNumber}[1]{#1}%     \newcommand*{\ExtractTralingNonDigits}[1]{#1}%          % ignore #2 and #3 as those are only needed to produce the desired output     \newcommand{\Test}[3]{#1&\ExtractLeadingNumber{#1}&\ExtractTralingNonDigits{#1}\\}%     %\newcommand{\Test}[3]{#1&#2&#3\\}% This produces desired output          \begin{document}     \begin{tabular}{l r r r}      & &Number &Non-Digits\\          \midrule     Decimal:     &\Test{ 1.01abc}{ 1.01}{abc}     &\Test{+2.01abc}{+2.01}{abc}     &\Test{-3.01abc}{-3.01}{abc}          \midrule     Integer:     &\Test{  abc}{  }{abc}     &\Test{ 5abc}{ 5}{abc}     &\Test{+6abc}{+6}{abc}     &\Test{-7abc}{-7}{abc}          \midrule     Floating Point:     &\Test{ 5.34abc}{ 5.34}{abc}     &\Test{+6.34abc}{+6.34}{abc}     &\Test{-7.34abc}{-7.34}{abc}          \midrule     Number Only:     &\Test{3}{3}{}     &\Test{3.2}{3.2}{}     &\Test{-5.1}{-5.1}{}     &\Test{+5.1}{+5.1}{}          \midrule     No Digits:     &\Test{abc}{}{abc}          \midrule     Formatted Text:     &\Test{  8$abc_1$}{  8}{$abc_1$}     &\Test{-8.2$abc_1$}{-8.2}{$abc_1$}     &\Test{+$abc_1$}{+}{$abc_1$}     &\Test{$abc_1$}{}{$abc_1$}% no digits     \end{tabular}     \end{document}


title: biblatex shorthand and Biblatex authortitle

text: I have a problem with Biblatex Authortitle. I am trying to define the shorthand field connected with the style. the program I use (Citavi) creates the shorthands such as Gozzoli The Writing of History. Whenever I use the style however, the title appears without italics and comma between name of the author and title. My ideas for the citation was of having the author surname in Small Capitals, then comma, then the title of a book in italics and the title of an article in double quotation marks for instance. For the bibliography, the actual style was OK, at least for the moment. I have scanned through the Biblatex manual, but I have not found a way to do that, and a Google search did not help either. I am an Egyptologist trying to use XeLateX in the field, so please excuse me whether the question is slightly banal. As required I am now adding the example, the text is only garbage:               \documentclass[11pt]{memoir} % for a long document     \usepackage{filecontents}     \begin{filecontents}{PsammetichusII.bib}     @article{Gozzoli.2000,     author = {Gozzoli, Roberto B.},     year = {2000},     title = {The Statue BM EA 37891 and the Erasures of Necho II's Names},     pages = {67–80},     paginationtype = {page},     volume = {86},     journaltitle = {JEA},     shorthand = {Gozzoli The Statue BM EA 37891},     usera = {Yes},     userb = {Statue BM EA 37891}     }               @book{Gozzoli.2006b,     author = {Gozzoli, Roberto B.},     year = {2006},     title = {The Writing of History in Ancient Egypt during the First Millennium BC(ca.   1070-180 BC). Trends and Perspectives},     volume = {6},     publisher = {Golden House Publications},     shorthand = {Gozzoli The Writing of History in},     location = {London},     series = {Golden House Studies},     usera = {Yes},     userb = {Writing of History in Ancient Egypt}     }               @article{Gozzoli.1995,     author = {Gozzoli, Roberto B.},     year = {1995},     title = {The Nubian War Texts of Psametichus II: An Essay of Explication},     pages = {46–49},     paginationtype = {page},     volume = {25},     journaltitle = {JSSEA},     shorthand = {Gozzoli The Nubian War Texts of},     usera = {Yes},     userb = {Nubian War Texts}     }               @article{Gozzoli.1997,     author = {Gozzoli, Roberto B.},     year = {1997},     title = {La campagna nubiana di Psammetico II e i testi di frontiera saitici},     pages = {5–16},     paginationtype = {page},     volume = {38},     journaltitle = {DE},     shorthand = {Gozzoli La campagna nubiana di Psammetico},     usera = {Yes},     userb = {La campagna nubiana}     }     \end{filecontents}          \usepackage[style=authortitle,backend=biber]{biblatex}     %\usepackage[style=footnote-dw,backend=biber]{biblatex}     \addbibresource{PsammetichusII.bib}          %%% BEGIN DOCUMENT     \begin{document}          reign.\footnote{\textcite{Gozzoli.1995,Gozzoli.1997,Gozzoli.2000}The two articles     about    the Nubian texts, originally treated in the     dissertation,\Parencite{Gozzoli.2006b,Gozzoli.1995}     The second part is a list of royal documents or documents dated to Psammetichus II's     reign.\footnote{\autocite{Gozzoli.1995,Gozzoli.2006b}.}


title: What does \errorcontextlines do?

text: In the `rotating` package examples there is a command included before the document class.               \errorcontextlines32     \documentclass[twoside]{report}      When I apply `\meaning\errorcontextlines` to it, it does not show any definitions. What does it do?


title: daily one pager (agenda, weather, etc...)

text: I look for a tool to automate a daily printout with an agenda, weather forecast, stats from various web sources (e.g. analytics, adwords, etc.). Seems there is no such tool, so I started to think how to make one. My idea is to make a python script that will create a TeX file I can then export to PDF and send to my printer ... any good starting point (e.g. packages, tutorials for one pager kind of documents) you can advise? Thanks in advance! PS. My idea is to have this automatically printed on my wireless printer every morning so I can have it ready for my breakfast :)


title: Math journal publication process: do journals edit LaTeX code?

text: I'm an absolute beginner in this matter, but I want to know the following: If I understand correctly, once a Math paper is accepted for publication in a journal, they will ask you to submit the LaTeX source file. Once you send that file, does that journal work on the code and edit it in order to correct any technical inefficiencies (commands, spaces, alignment, etc.)? After this, do they send you the corrected LaTeX code for you to see it before it is used for publication?


title: Calling filename@parse inside a command definition fails

text: I am trying to redefine `\includegraphics` to both auto-label the included figure and to restrict the maximum width. The auto-labeling is done by transforming the base filename to camelcase using the `stringstrings` package. This is what I have:               \usepackage{stringstrings}     \usepackage[export]{adjustbox}     \usepackage{graphicx}          \let\origincludegraphics=\includegraphics     \renewcommand{\includegraphics}[1]{       \makeatletter       \filename@parse{#1}       \convertchar[q]{\filename@base}{\textunderscore}{\blankspace}       \capitalizewords[q]{\thestring}       \noblanks[q]{\thestring}       \origincludegraphics[max width=\linewidth]{\thestring}     }      It fails with an **undefined control sequence** error; this seems to be coming from the file parsing commands, because this doesn't work:               \documentclass[11pt]{report}     \usepackage{amsmath}     \begin{document}          \newcommand\testcmd[1]{       \makeatletter       \filename@parse{#1}       \filename@base       \makeatother     }          \testcmd{path/to/stuff.png}               \end{document}        * why doesn't file parsing work inside a command?   * is there another way to achieve my goal of figure auto-labeling by a component of the path?


title: Double arrow in TikZ?

text: I'm trying to draw two arrows between nodes as follows:               A ------> B       <--/---      The arrows should be parallel, in opposite directions but not on top of each other. (I can bend the arrows but that's not what I'm after.) What's the cleanest way to do this in TikZ? And can I have just one of the arrows "struck out" as in the example?


title: How do I redefine a custom environment that I have previously defined elsewhere?

text: I made a custom class for homework assignments and I've defined a solution environment as follows:               \def\qed{\ensuremath{\square}} % <-QED Symbol     \newenvironment{solution}{%  <-Solution       \par\addvspace{1em}       \itshape{Solution:}}       {\par\normalfont\hfill\qed\par\addvspace{\medskipamount}}%      This is intended to be a general purpose environment, but I am making a package specifically for use with math typesetting, and I'd like to slightly modify my solution environment when I load that package in this class... but I've tried the following and I get an error:               \let\solution\relax          \newenvironment{solution}{%  <-Solution       \par\addvspace{1em}       \itshape{Solution:}\par\addvspace{\medskipamount}}       {\par\normalfont\hfill\qed\par\addvspace{\medskipamount}}%      The error I get when trying to compile a document is > Command \solution already defined.


title: How do I embed a gather environment within a custom environment?

text: I've tried defining the following custom environment, but I get errors: > \begin{gather} ended by \end{solution} etc... Here's a MWE showing my problem:               \documentclass{article}          \usepackage[fleqn]{mathtools}          \newenvironment{solution}{%  <-Solution       \par\addvspace{1em}       \itshape{Solution:}\par\begin{gather}}       {\end{gather}\par\normalfont\hfill\qed\par\addvspace{\medskipamount}}%          \begin{document}       \begin{gather}         testing       \end{gather}            %% This does not work:       \begin{solution}         testing       \end{solution}     \end{document}


title: How to set colored ruled margins for different pages?

text: I want to write a LaTeX document, and I want to have document rules (colored margins distinguishing sections and/or even/odd pages). Here is a model of what I have in mind: ![Page preview for final document](http://i.stack.imgur.com/xKA3C.jpg) How can this be accomplished? I have seen this question which is the most relevant question to what I have in mind, however it doesn't quite accomplish my goal. I have also searched around in Google, and the best I have come up with is used "framed" package, which again, does not accomplish this task. I am sure that this can be done, though.


title: color fill an item of an enumerated list

text: I've recently seen How to "bubble in"/color fill an item counter ((A),(B),(C),...) in an enumerated list and I just wondered: what if I'd like to enumerate my list with the arabic numbers, i.e. 1,2,3 etc? What would be the code?


title: Modifying \answerline in the exam class

text: When using the exam class, is there a way to change the formatting of the item answer blanks created by `\answerline`? For a question, the label is 1. For a part, the label is (a) For a subpart, the label is i. I would like them all to be (1), (a), and (i) respectively. For example               \documentclass[answers]{exam}     \begin{document}     \begin{questions}     \question First one \answerline     \begin{parts}      \part first part \answerline     \begin{subparts}         \subpart A subpart \answerline         \end{subparts}     \end{parts}          \end{questions}     \end{document}


title: Equations didn't fit

text: I created a presentation with University of Hamburg beamer theme, which can be found here. However, in a slide, I wrote long equations but they did not fit and I cannot fix this problem. This is the print screen of this slide. ![enter image description here](http://i.stack.imgur.com/7o1Q4.png)


title: using US letter within an ACM paper

text: \documentclass{sig-alternate}      This previous line leads to a dimension 595 x 841 (according to pdf information).               \pdfpagewidth=8.5in     \pdfpageheight=11in      Those lines enabling another dimension, 612 × 792, which was required. Are there other possibilities to ensure 8.5x11 in?


title: Second table of contents only for annexes

text: I'd like to have in my report a table of contents from introduction to conclusion and another between the conclusion and the first annexe. This latter only for annexes :               - Table of contents         - 1. Intro         - 2. Chapter 1         - ...         - 20. Conclusion     - 1. Intro     - 2. Chapter 1     - ...     - 20. Conclusion     - SECOND TABLE OF CONTENTS         - Annexe 1         - Annexe n     - Annexe 1     - Annexe n      I know we can add annexes to the table of contents using :               \addcontentsline{toc}{chapter}{Annexes}      but is there a way to name a TOC like :               \tableofcontents{TOC1}      and use it to specify which one we want to add contents line :               \addcontentsline{toc}{chapter}{Annexes}{TOC1}      Thank you for your help.


title: Differents aligns

text: I have a problem trying to do this: I want to merge text and a two line equation (`aligned`) in a particular way:               \documentclass{article}     \usepackage{,mathtools}          \begin{document}           \begin{equation*}       \begin{aligned}     First line equation &. \\     Second line equation &.  \quad \text{ Aligned text with this line very long long long      long long long long and I don't want it to be out of paper}       \end{aligned}      \end{equation*}           \end{document}      This is my solution, but it only works when the text is short enough. And I want to be able to align text to first line too (not at the same time). Besides I have a problem too trying to align items with numbers:               \documentclass{article}     \usepackage{mathtools}     \begin{document}          \begin{enumerate}     \item      $      \begin{rcases}       \begin{aligned}     1 \text{   I want ones  in the same line} & . \\     \text{And be able to aling things too} & . \\       \end{aligned}      \end{rcases}      $     \end{enumerate}          \end{document}      Is it even possible?


title: Force inline-type superscript for display equations (but display-type subscript)

text: I am trying to create a macro `\jjoin` for a mathematical operator which roughly produces the following behaviour: Inline: `\bigvee^{(J)}`, subscript (typically `i \in I`) goes in the usual position (as in rendering `\bigvee^{(J)}_{i \in I}`);   Displaystyle: The `(J)` goes in the same spot as in inline equations, i.e. to the top-right, but the `i \in I` goes below the `\bigvee` as is usual in display style. I have tried the following definitions for `\jjoin`, to no avail:   * `\mathop{\bigvee{}^{(J)}}` (the `i \in I` appears too far to the right, because the `(J)` part is taken into consideration for determining the middle of the expression);   * `\makebox[0]{\ensuremath{\hphantom{\bigvee}^{(J)}}}\bigvee` (I'm not sure why this fails, but the position of `(J)` is wildly varying; perhaps because `\ensuremath` does not remember whether or not `\jjoin` is invoked in display mode?); but that's as far as my knowledge of (La)TeX goes. I have seen #99538 but the result is the same as my first attempt above. * * * MWE:               \documentclass[a4paper]{article}     \usepackage{amssymb,amsmath}          \newcommand{\jjoin}{\mathop{\bigvee\nolimits^{(J)}}}          \begin{document}     Inline: $\jjoin \qquad \jjoin_{i\in I}$          Display: \[\jjoin \qquad \jjoin_{i\in I}\]     \end{document}      * * * _NB. This is my first question here on TeX.SE; I hope that I didn't make too many beginner's errors. Feel free to point them out._


title: Modern book design, margins and typed area

text: The golden fleece of book design has been the typesetting of the typed area in relation to the paper and the spread. Famous typographers such as Jan_Tschichold and Rosarivo devised canon's of page construction detailing how to calculate margins and set the typed area. They produced diagrams such as the one shown below: ![enter image description here](http://i.stack.imgur.com/SfcMz.png) Trusted and respected class authors such as Peter Wilson (memoir) and Markus Kohm (KOMA-Script) exhorted authors to follow these rules, sometimes very strongly, in a language reminiscent of construction specifications. Markus Kohm writes, > In a double-sided document (e. g. a book) however, the complete inner margin > (the margin at the spine) **should be** the same as each of the two outer > margins; in other words, a single page contributes only half of the inner > margin... Some classes such as the octavo are dedicated to achieving the classical page ratios. Having looked at over 100 books as part of some development work I am trying to complete, the most immediate and apparent observation is that most Publishers and obviously their book designers currently disregard such rules. My own feeling is that this is mostly done for monetary reasons. The books in my opinion still look very good and maybe is time to let medieval rules fall away. Here, is my question and I know it will not have any specific answer. **What margin proportions and typed area settings do you think make a good modern book.** Can you provide statistics from some books you like (paper size, top margin, bottom margin, left margin and right margin). All margins defined absolutely as per the geometry package or you can use LaTeX terminology. ![enter image description here](http://i.stack.imgur.com/Dc5dT.jpg) Obviously, if a book has marginalia it is a whole different kettle of fish. So I would like if possible to limit the answers to books that do not contain margin material.


title: LaTeX letter with address field in the right place for a "C5 envelope with window"

text: Does anybody know of a good way to write simple paper letters in LaTeX, so that the formatting shows the receivers address on the right place so I will show in the window of those C5 envelops with a "address window" (see picture)? ![envelope](http://www.art4m.se/Images/Produkter/kuvert_C5.jpg) Those envelope follows some kind of standard here in Sweden, I would like too use them since my handwriting is not that good looking. The question is how I get a box with the receivers address in the upper right corner on the first page? * * * **Update** : I think the letter should conform to SS 34321 (Swedish Standard). **Note:** This question is "moved" over from SuperUser where I did not find a working answer (http://superuser.com/questions/58404/latex-letter-with-adress- field-in-the-right-place-for-a-c5-envelope-with-window) * * * **Update** : I created a basic example using the scrlttr2 and it's close enough for now, I have printed and the address show up in the right place. This is how my example looks like: ![Second try](http://i.stack.imgur.com/O0L2v.png) And then the tex code I used to create this version.               \documentclass[fontsize=11pt,a4paper]{scrlttr2}          \usepackage[english]{babel}     \usepackage[english]{isodate}          % font and input setup     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{datetime}     \renewcommand{\dateseparator}{-}     \newcommand{\todayiso}{\the\year \dateseparator \twodigit\month \dateseparator \twodigit\day}          \setkomavar{date}{\todayiso}     \setkomavar{signature}{Johan Simonsson}          \let\raggedsignature=\raggedright          \makeatletter     \@setplength{toaddrvpos}{30mm}     \@setplength{toaddrhpos}{130mm}          % The space to sign my name     \@setplength{sigbeforevskip}{10mm}     \makeatother               \setkomavar{subject}{Long fortune example}          \begin{document}      \begin{letter}{Pelle Gustavsson \\ Bergsgatan 17 lgh1115 \\ 123 45 Malmö \\ Sweden}     \opening{Dear Pelle Gustavsson}          The camel died quite suddenly on the second day, and Selena fretted     sullenly and, buffing her already impeccable nails -- not for the first     time since the journey begain -- pondered snidely if this would dissolve     into a vignette of minor inconveniences like all the other holidays spent     with Basil.     \\     --- Winning sentence, 1983 Bulwer-Lytton bad fiction contest.     \\\\     Gratitude and treachery are merely the two extremities of the same procession.     You have seen all of it that is worth staying for when the band and the gaudy     officials have gone by.     \\     --- Mark Twain, "Pudd'nhead Wilson's Calendar"          %\baselineskip          \closing{Best regards}     \end{letter}     \end{document}


title: How to detect if abstract reaches a second page, in order to add a header

text: I'm writing a thesis for which the very first page (or 2 if it's long enough) is the abstract. I have two formatting requirements that I can't figure out, when the abstract continues onto the second page:   1. how do I prevent the page number from showing up on page 2? I can suppress it on page 1 with `\thispagestyle{empty}`, but I don't know how to do that for page 2 since I don't know where page 2 starts   2. how do I add a header that only applies to page 2? Again, I don't know where to put this header declaration since I don't know where page 2 starts Here are the actual instructions: > If the abstract extends onto a second page, that page should be headed as > follows: >   >   >     Jane Mary Doe – [University], [year of graduation] >   > > The abstract is not paginated. If the abstract fits on 1 page, then there shouldn't be a second abstract page. Can anybody help me understand this problem?


title: Minipage that allows page breaks?

text: Is there a `minipage`-like environment that allows pagebreaks? Everything I can find is about avoiding page breaks (which `minipage` does well) but I want to indent a whole section, which is convenient to do by wrapping the section in `minipage` as `\leftskip` is overtaken by the environment enclosing this section.


title: References to align with the rest of the text

text: I'm using LaTeX2e and don't want the abbreviations that appear in my text (at `\cite`) to appear also in the left margin of the bibliography, so have:               \documentclass{article}     \usepackage{graphicx}\usepackage{rotating}     \usepackage{amsmath}     %...     \makeatletter     %...     \def\@biblabel#1{}     %...     \makeatother     %...     \begin{document}     %...     \begin{thebibliography}{}     \bibitem[Aitken 1935]{Aitken}Aitken AC (1935): Note on selection from a multivariate normal population. \emph{Proceedings of the Edinburgh Mathematical Society}, 4:106--110.     %...     \end{thebibliography}     %...     \end{document}      The problem is that the bibliography items are indented slightly more than the rest of the article text: ![enter image description here](http://i.stack.imgur.com/OyNCl.png) I want them indented the same as the article text. How do I get the references over to the left? (Note: I don't want to use BibTeX, as (a) using it for this is overkill (especially since I don't plan to use these references in future papers) and (b) it's another thing I'd have to learn.)


title: Strange indices in chapterbib

text: I am using `chapterbib` to put a bibliography at the end of each chapter using:               \usepackage[square, numbers, comma, sort&compress, sectionbib]{natbib}     \usepackage{chapterbib}      And i insert each bibliography with:               \nocite*          \bibliographystyle{alpha}          \bibliography{biblio}      My problem is that the indices of the citations are very weird! Here is what i get something like: ![enter image description here](http://i.stack.imgur.com/JBkoq.jpg) I'd like to have a usual numbering, with [1], [2], [3], etc. How can i do?


title: Can the package "caption" be used with KOMAScript classes?

text: Is the `LaTeX`-package `caption` compatible with `KOMAscript`-classes like `scrreprt`? (I did not find anything about that in the KOMAscript-Manual, but as KOMAscript redefines a lot for the floats and captions, I wonder if there might be problems.)


title: How to get chapterthumbs match their chapter titles in KOMA-Script?

text: This is an add-on question to a previous one on chapterthumbs. Please consider the MWE below, the chapterthumbs are not matching the chapter titles (Discussion should appear instead of Materials & Methods), so how to: **Objectives**   * Match chapterthumbs with their chaptertitle -- answered   * Activate chapterthumb on Abstract/Bibliography in the MWE -- answered   * Suppress chapterthumb on curriculum vitae in the MWE -- answered   * The advancement of the thumbs should _advance_ along the whole right edge of the page - answered! **MWE**               \documentclass{scrbook}     \usepackage{chapterthumb}%     \usepackage{etoolbox}%     \usepackage{nameref}%     \lohead[\putchapterthumb]{\putchapterthumb}     \addtokomafont{chapterthumb}{\bfseries}          %     \let\LaTeXStandardChapter\chapter%     \renewcommand*{\chapterthumbformat}{\refcommand{chapter::title::\number\value{chapter}}}%          \makeatletter          \newcounter{totalchaptercounter}%          \newrobustcmd{\WriteChapterTitleToAux}[1]{%     \refstepcounter{totalchaptercounter}%     \immediate\write\@auxout{%     \string\newlabel{chapter::title::\number\value{totalchaptercounter}}{{\thesection}{\thepage}{\unexpanded{#1}}{}}     }% End of writing to AUX file     }%          \newrobustcmd{\refcommand}[1]{%     \nameref*{#1}%     }%          \newcommand{\chapter@noopt}[1]{%     \WriteChapterTitleToAux{#1}%     \LaTeXStandardChapter{#1}%     }%          \newcommand{\chapter@opt}[2][]{%     \WriteChapterTitleToAux{#2}%     \LaTeXStandardChapter[#1]{#2}%     }%               \newcommand{\unstarredchapter}{%     \@ifnextchar[{\chapter@opt}{\chapter@noopt}%     }%          \newcommand{\starredchapter}[1]{%     \LaTeXStandardChapter*{#1}     }%                    \renewcommand{\chapter}{%     \@ifstar{\starredchapter}{\unstarredchapter}%     }%          %=====================Bibliography=============================     \usepackage{biblatex}     \usepackage{filecontents}     \begin{filecontents}{jobname.bib}     @article{rand_objective_1971,         title = {Objective criteria for the evaluation of clustering methods},         volume = {66},         issn = {01621459},         url = {http://www.jstor.org/discover/10.2307/2284239?uid=3737864&uid=2&uid=4&sid=21103234673533},         doi = {10.2307/2284239},         pages = {846},         number = {336},         journaltitle = {Journal of the American Statistical Association},         shortjournal = {J Amer Statist Assoc},         author = {Rand, William M.},         urldate = {2013-12-18},         date = {1971-12},         keywords = {Comparing partitions, Rand, statistics}     }          @article{hubert_comparing_1985,         title = {Comparing partitions},         volume = {2},         issn = {0176-4268, 1432-1343},         url = {http://link.springer.com/article/10.1007/BF01908075},         doi = {10.1007/BF01908075},         pages = {193-218},         number = {1},         journaltitle = {Journal of Classification},         shortjournal = {J Classif},         author = {Hubert, Lawrence and Arabie, Phipps},         urldate = {2013-12-18},         date = {1985-12-01},         langid = {english},         keywords = {{ARI}, Comparing partitions, Consensus indices, Measures of agreement, Measures of association, statistics, Statistics, general}     }        \end{filecontents}     \addbibresource{jobname.bib}     %==================================================     \title{Title of the Dissertation}     \author{Author Name}      \publishers{Faculty Name}          \begin{document}     \maketitle     \frontmatter     \pagestyle{plain}%     \tableofcontents %chapterthumb:no     \chapter{Acknowledgements} %chapterthumb:no     \chapter{Abstract}\dots     \clearpage     \mainmatter     \pagestyle{scrheadings}     \chapter{Introduction}\dots     Sample text here cited \parencite{hubert_comparing_1985}, which is different from \textcite{rand_objective_1971}.          \chapter{Materials \& Methods}\dots      \chapter{Results}\dots      \chapter{Discussion}\dots     \backmatter     \printbibliography[heading=bibintoc]     \clearpage%     \pagestyle{plain} % Or any other user defined style     \chapter*{Curriculum Vitae} %chapterthumb:no     \end{document}      **MWE Output**   ![enter image description here](http://i.stack.imgur.com/hHF0x.png) **Note**   * `chapterthumb` is not yet supported by TexLive2013, and hence should be manually installed    * The `chapterthumb.sty` v0.1 was used in the above MWE and not the updated v0.2 package on windows 7 platform. **Update**   there is no guarantee that the code in the MWE nor in solution to work because of the KOMA-script update. The new version of `chapterthumb` package is no more based on the `scrpage2` package, but rather on its successor `scrlayer` package. Please refer to http://www.komascript.de/chapterthumbs-example for more info.


title: Dots and Spacing in Table of Contents/List of Figures, etc. with `hyperref` loaded

text: I'm using the `hyperref` package and am unable to load `tocloft`. I've tried everything including a _voodoo ritual involving a rubber chicken_ to get the two to shake hands. Is there a work around to get dots in the table of contents, list of figures/tables? Also, in my list of figures/tables I have the depth set to section, so I see an overlap-spacing problem with the numbering and the caption title. Is there a simple way to correct this spacing?                \documentclass[psamsfonts,10pt,reqno,letterpaper]{amsbook}          \usepackage{chngcntr}     \counterwithin{section}{chapter}     \counterwithin{figure}{chapter}     \counterwithin{table}{chapter}           \usepackage[Lenny]{fncychap}     \ChRuleWidth{1.618pt}     \ChTitleVar{\raggedright  \huge }     \ChNameVar{\raggedleft  \Huge }          \usepackage[bookmarksdepth=subsection,plainpages=false]{hyperref}          \usepackage[english]{babel}     \usepackage{blindtext}          \begin{document}           \listoftables          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}               \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}          \begin{table}     \begin{tabular}{c}     stuff     \end{tabular}     \caption{stuff}     \end{table}               \end{document}


title: Is there a replacement for nccmath?

text: I noticed that the `nccmath` package is not mentioned in What packages do people load by default in LaTeX?. Since I have had several problems with `minipages` that all eventually led to `nccmath` related issues, I am wondering if this package is still being maintained, or if there is a replacement package that should be used instead. The problems I have had had include:   1. Minipage content overlaps with text before that if `nccmath` is used,   2. nccmath affecting minipage widths, and   3. Alignment of item number in list containing a minipage


title: Pdflatex document which is cropped to the largest content width and height?

text: Is it possible to create a `pdflatex` document which   * contains several pages with tables (one table per page)   * and the page width for all pages of the pdf file is cropped to the width of the largest content (same for the height)? _I hope I was clear enough: e. g. the table on page 1 is 20 cm wide and 25 cm in height. All other pages contain tables of 19 cm width, but the table of page 10 has a height of 26 cm. So I'd like to be the page format of the whole document: 20 cm wide and 26 cm in height and all tables should be aligned in the top left corner of this page size )_


title: How to center the pagenumber related to the page

text: My pagemark in the heading is centered related to the textbody, but since my left margin is wider than my right, the pagenumber is not centered related to the page. Little miniature example:               \documentclass[          12pt, % Schriftgröße          %DIV10,  % Teilung der Seite in 10 Teile (Layout bessere Lesbarkeit)          ngerman, % für Umlaute, Silbentrennung etc.          a4paper, % Papierformat          oneside, % einseitiges Dokument (Standard)          titlepage, % es wird eine Titelseite verwendet          parskip=half, % Abstand zwischen Absätzen (halbe Zeile)          headings=normal, % Größe der Überschriften verkleinern          listof=totoc, % Verzeichnisse im Inhaltsverzeichnis aufführen          bibliography=totoc, % Literaturverzeichnis im Inhaltsverzeichnis aufführen          %index=totoc, % Index im Inhaltsverzeichnis aufführen          captions=tableheading, % Beschriftung von Tabellen unterhalb ausgeben          final % Status des Dokuments (final/draft)      ]{scrreprt}           \usepackage[          %automark, % Kapitelangaben in Kopfzeile automatisch erstellen          %headsepline, % Trennlinie unter Kopfzeile          ilines % Trennlinie linksbündig ausrichten      ]{scrpage2}           \begin{document}                % Kopf- und Fußzeilen ----------------------------------------------------------      \pagestyle{scrheadings}      % Kopf- und Fußzeile auch auf Kapitelanfangsseiten      \renewcommand*{\chapterpagestyle}{scrheadings}      % Schriftform der Kopfzeile      \renewcommand{\headfont}{\normalfont}           % Kopfzeile      \ihead{}      \chead{\pagemark}    %TODO das muss ich noch zentrieren      \ohead{}      %\setlength{\headheight}{21mm} % Höhe der Kopfzeile      % Kopfzeile über den Text hinaus verbreitern      \setheadwidth[0pt]{textwithmarginpar}      \setheadsepline[text]{0pt} % Trennlinie unter Kopfzeile entfernen           % arabische Seitenzahlen im Hauptteil ------------------------------------------      \clearpage      \pagenumbering{arabic}      Das hier soll dann ein Text sein.      \end{document}      Thank you very much!


title: Error with percent sign in bib entry field when using biblatex/biber

text: I'm trying to use `biblatex` (v1.5a) with `biber` (v0.9.3) instead of BibTeX but I am having a problem with bib entries, where the abstract contains a percent sign. In that case, in the `bbl` file the corresponding entry will have a line with `\field{abstract}{ ...% ...}` with the percent sign causing the quotes not to be closed. And `pdflatex` complains with an error "Runaway argument" (see error message and minimal example below). So here is my question: How can I either make `biblatex` ignore the abstract entries (as BibTeX does) since I do not need them in my LaTeX document or tell `biblatex` to add an escape character automatically? Or am I missing something here? Any help is appreciated! Thanks. The error message is:               Runaway argument?     {Limit Cycle Walkers are bipeds that exhibit a stable cyclic gait wit\ETC.     ! File ended while scanning use of \field.     <inserted text>                      \par      l.51 \begin{document}          ! Undefined control sequence.     <argument> \blx@bbl@data       Here is a minimal working example:               \documentclass{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[american]{babel}     \usepackage{graphicx}     \usepackage{amsmath}      \usepackage{booktabs}     \usepackage[citestyle=authoryear,%numeric-comp,      bibstyle=authoryear,%numeric     backend=biber,     natbib=true,     hyperref=false]{biblatex}     \bibliography{myref}     \listfiles     \begin{document}      adsf asdf asdf asdf asdf asdf  asdf     \citep{Hobbelen2008b}          \printbibliography     \end{document}      with the corresponding conflicting entry (abstract shortened) given as:               @ARTICLE{Hobbelen2008b,       author = {Hobbelen, D.G.E. and Wisse, M.},       title = {{Ankle Actuation for Limit Cycle Walkers}},       journal = {The International Journal of Robotics Research},       year = {2008},       volume = {27},       pages = {709-735},       number = {6},       abstract = {Limit Cycle Walkers are bipeds that exhibit a stable ... by at  least 60%, without increasing ...         of 5% of its leg length, while walking efficiently at a mechanical         cost of transport of 0.09.}     }      (some other package versions: `etoolbox` v2.1, `logreq` v1.0)


title: Reduce space between enumerated items

text: ## Background A book with lots of images. All of the images are set to "here definitely" (as they must come after the text that introduces them). ## Problem The list types (enumerated and bullet) have too much space between them. The reason seems to be because the TeX engine wants to use up as much space on the page as possible, since the next page is essentially a large image that cannot fit on the current page. For example: ![](http://i.stack.imgur.com/VfptD.png) ## Related Links   * Remove space around bullet points in itemized or enumerated list   * http://www.ctan.org/tex-archive/macros/latex/contrib/paralist/paralist.pdf   * http://www.ctan.org/tex-archive/macros/latex/contrib/enumitem/enumitem.pdf ## Question What can be done to keep the text in lists together (even if it means plenty of space at the bottom of the page)? Other suggestions on tackling the problem are quite welcome.


title: Comment out lines without using % and comment enviroment

text: I would like to ask something which will greatly facilitate my work. But before, I introduce you to the problem I face. In my attempt to gather my notes for my students and give them something more quality like a book I've created hundreds of exercises where each one is a small own file. I input those through `\input{...}`. The problem I face is that I have in the first 2 or 3 lines of each separate file certain information such as, source of exercise, as the name of the file in which the exercise is, etc. That information I do not want to appear in the final result, so I comment those out with `%`. Occasionally, however, as I still processing the text I want to appear these _private information_ I have on the first lines on each separate file. As you can imagine being open about 500+ files and make comment out `%` the fist and second lines and after the inverse is somewhat painful. * * * **Here's my question** : Is there inner way to Latex to read a file that is imported but ignore the first two maybe three lines that have not been comment out with `%` ? Of course this could be done with a scrip from the command line by adding `%` in front of firsts lines ( Ι working on Linux) but what was very elegant and easy to do with some internal switch to LaΤeΧ . So I can choose when the first lines will appear and when not. * * * **one example** of how I structured each exercise               \\ {\color{red}{\small is the  exercise.435.tex}}  % is the name of the file     \\ {\color{red}{\small 1.84 ex. 127 page notes}}  % is the source of exercise etc          \begin{exercise}         . . .      \end{exercise}      * * * > **Final With your help and after two days.** I have collect here the final form I used eventually. **I've added the automatization of detection exercises's names .** Perhaps new users of latex as me , find something useful ( _I wrote here because I didn't know the right place to write those thinking. if is there another option please let me know_ )               \documentclass[a4paper,10pt]{article}     \usepackage{xcolor}          \usepackage[realmainfile]{currfile}[2012/05/06] % detects the names of imported files          %%%%%%%%%%%%%%%%%%%%%%%%%% for prologue ( The code is from the @egreg ) %%%%%%%%%%%%%%%%%%%%%%%%%%%%     \newif\ifprolog       \long\def\startprolog#1\stopprolog{%       \ifprolog         \par         \begingroup         \let\\\par         \color{red}\small \\  \currfilepath \\ #1    % \currfilepath for appear the name of each exersice is my extra  addition          \par\medskip                                   \endgroup                                        \fi}          \prologtrue % for to display the prologue ( comment out to disappear )          %%%%%%%%%%%%%%%%%%%%%%%%%% definition of exercise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \newtheorem{exercise}{\color{magenta} \Large \bfseries} % [chapter]    %[section]   %% at the book documentclass                \begin{document}           text above the exercise           \input{exersice.435.tex}           Text below the exercise           \end{document}      and the external file `exersice.435.tex` have the form:               \startprolog       1.84 ex. 127 page notes   % is the source of exercise etc     \stopprolog          \begin{exercise}      Here is the text of the exercise     \end{exercise}      * * * ## ![the final result](http://i.stack.imgur.com/Xgytl.png)


title: Customize the bibliography numbering

text: I've only one page of the bibliography on beamer which I want to remove its numbering. I'm getting as title : `Bibliography I` which I want it to became `Bibliography`. How to do that please?


title: Plot alignment using groupplot in pgfplots

text: I am using the `groupplots` library in `pgfplots` to create plot groupings. I am using the 2x2 sizing but only have 3 plots. How can I center the furthest right plot vertically, to make a triangle rather than an upside down _L_? In another case, I would like to center the bottom plot horizontally, would this use the same procedure? Is there a better tool to use than `groupplots`?               \documentclass{standalone}     \usepackage{tikz,pgfplots}         \usepgfplotslibrary{groupplots}          \begin{document}       \begin{tikzpicture}         \begin{groupplot}[           group style={group size=2 by 2},           width=4cm, height=4cm,         ]         \nextgroupplot           \addplot coordinates{(0,0) (1,2) (2,1)};         \nextgroupplot           \addplot coordinates{(0,0) (1,2) (2,1)};         \nextgroupplot           \addplot coordinates{(0,0) (1,2) (2,1)};         \end{groupplot}       \end{tikzpicture}     \end{document}


title: LaTeX math tabbing: Can we make alignat work this way?

text: The second `alignat` below illustrates my problem. ![enter image description here](http://i.stack.imgur.com/iXa4r.png)               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{alignat*}{2}       a &= & b \\         &  & + c     \end{alignat*}     \begin{alignat*}{2}       a &= & b \\         &  & + c \\         &= \text{long expression}     \end{alignat*}     \end{document}      I want the third line of the equation _not_ to alter spacing on previous lines. In other words, I want a math environment that behaves similarly to the `tabbing` environment. Could somebody help? **Edit:** The example I show above is a simplified one. In my real problem, the part corresponding to `= b` is quite complicated. If we use Werner's solution below, we would be repeating the whole complicated expression in `\phantom{}`. So, I guess there is no ready-made tabbing-like environment? My current workaround is to use `\hspace*{}` in place of `\phantom{}`, manually adjusting the position. (I'm not claiming it is better. Manual adjustment is annoying.) **Edit 2:** Werner has made me realize that I simplified my code so much that a simple `\phantom{{}={}}` is a good solution to the simplified code. So, the example below is a more accurate illustration of my original problem:               \documentclass{article}     \usepackage{amsmath}% http://ctan.org/pkg/amsmath     \begin{document}     \begin{align*}       a &= b [ c + d \\         &\phantom{{}=b [ c} + e] \\         &= \text{long expression}     \end{align*}     \end{document}      In this case, (I think) we have to repeat part of the previous line in `\phantom`, which is annoying when `b` and `c` are complicated. As I said in my "Edit" above, I'm currently using `\hspace*` to avoid repeating the complicated expression in a `phantom`.


title: a problem about `not found. \usefonttheme`

text: when i compile this bellow code with TexStudio on my computer:               \documentclass{beamer}     \usepackage{amssymb,latexsym,amssymb,amsmath,amsbsy,amsopn,amstext,upgreek}     \usepackage{color,multicol}     \usepackage{graphicx,wrapfig,fancybox,watermark,graphics}     \usepackage{picins}     \usepackage{pgf}     \usepackage{movie15}     \usepackage{hyperref}     \hypersetup{         pdfpagemode=FullScreen, % show in full screen?     }     \usepackage{pdfpages}          \usepackage{listings,bera}     \definecolor{keywords}{RGB}{255,0,90}     \definecolor{comments}{RGB}{60,179,113}     \lstset{language=C,     keywordstyle=\color{keywords},     commentstyle=\color{comments}\emph       }     \usepackage{algorithm}     \usepackage{algorithmic}     \renewcommand{\algorithmicrequire}{\textbf{Input:}}     \renewcommand{\algorithmicensure}{\textbf{Output:}}          % reference entry     \usepackage{bibentry}     \usepackage[numbers]{natbib}          \usepackage[        compress,        %minimal,        nonav,        red,        %gold,        %numbers,        %nologo,       polyu,         ]     {beamerthemeHongKong}     \usefonttheme{structuresmallcapsserif}          \begin{document}          \title{Title}     \author{Author}     \institute[institute]{institute full name}     \date{\today}     \frame{\titlepage}               \section*{Table of Contents}     \frame {       \frametitle{\secname}       \tableofcontents     }          \AtBeginSubsection[] {       \frame<handout:0> {       \frametitle{Outline}        \tableofcontents[current,currentsubsection]       }     }          \section{Section A}          \subsection{Subsection A-A}          \begin{frame}      \frametitle{\subsecname}        \begin{columns}       \column{0.5\textwidth}      \begin{overprint}      \onslide<1>        \begin{figure}       \includegraphics[width=\textwidth]{image/test-image1}       \caption{figure A}       \end{figure}      \onslide<2>       \begin{figure}       \includegraphics[width=\textwidth]{image/test-image2}       \caption{figure B}       \end{figure}      \end{overprint}      \column{0.5\textwidth}       \begin{block}{example}<1->       \begin{enumerate}         \item<1-|alert@1>         text about figure A         \item<2-|alert@2>         text about figure B       \end{enumerate}       \end{block}       \end{columns}       \end{frame}           \subsection{Subsection A-B}          \begin{frame}     \frametitle{\subsecname}     \begin{itemize}[<+- | alert@+>]       \item       item A       \item       Item B       \item       Item C     \end{itemize}     \end{frame}          \section{Section B}          \subsection{Subsection B-A}          \begin{frame}     \frametitle{\subsecname}     \begin{enumerate}       \item       item A       \item       Item B       \item       Item C     \end{enumerate}     \end{frame}          \subsection{Subsection B-B}          \begin{frame}     \frametitle{\subsecname}     \begin{itemize}       \item       item A       \item       Item B       \item       Item C     \end{itemize}     \end{frame}          \subsection*{Thanks}          \begin{frame}     \frametitle{\subsecname}     \begin{columns}     \column{2.5cm}     \column{5cm}     \Huge{Thank you!}     \column{2.5cm}     \end{columns}     \end{frame}               \end{document}      it says "File `beamerthemeHongKong.sty' not found. \usefonttheme" what does it mean? you can download this file from here


title: Long frames in mdframed

text: I need to use the `mdframed` package with frames extending many pages, e.g. more than 20 pages.. Consider the following code:               \documentclass{article}     \usepackage[framemethod=tikz]{mdframed}     \usepackage{expl3}     \ExplSyntaxOn     \cs_new_eq:NN \Repeat \prg_replicate:nn     \ExplSyntaxOff     \begin{document}     \begin{mdframed}     \Repeat{1500}{xxx\\}     \end{mdframed}     \end{document}      produces (with `pdflatex`) the following error               Underfull \hbox (badness 10000) in paragraph at lines 9--10          ! Dimension too large.     <argument> \dimexpr \ht \mdf@splitbox@one                                                +\dp \mdf@splitbox@one \relax      l.10 \end{mdframed}      What may be the problem here?


title: How to connect two lines in TikZ?

text: I finally managed to draw the following path diagram with TikZ. Now, however, I am facing a challeging task. I would like to connect two edges/lines (here drawn in red; for the social scientists, I want to illustrate an interaction effect). How can I do that? ![enter image description here](http://i.stack.imgur.com/wHcjL.png)               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning,mindmap,trees,shapes,shadows,calc,arrows,automata,decorations.text}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}[grow=left,       line/.style={>=latex},       coef/.style={font=\tiny},       rect/.style={font=\tiny, rectangle, draw, text width=.49cm, align=center, node distance = 1.8cm},       mycircle/.style={font=\tiny, circle, draw,  node distance = 0.2cm},       beschrif/.style={font=\tiny}]            \node[rect] (stab) {$D$};            \node[rect] (zuf_m) [above left = of stab] {$S_m$};       \node[rect] (zuf_f) [below left = of stab] {$S_f$};            \node[rect] (konf_m) [above left = of zuf_m] {$FoC_m$};       \node[rect] (konf_f) [below left = of zuf_f] {$FoC_f$};            \node[rect] (unemp_m) [below left= of konf_m] {$U_m$};       \node[rect] (unemp_f) [above left= of konf_f] {$U_f$};            \node[rect] (behav_m) [above = 0.6cm of zuf_m] {$CB_m$};       \node[rect] (behav_f) [below = 0.6cm of zuf_f] {$CB_f$};            \node (error_sm) [mycircle, right = 1.3cm of zuf_m] {$\epsilon_{Sm}$};       \node (error_cm) [mycircle, right = 2.8cm of konf_m] {$\epsilon_{FoCm}$};            \node (error_sf) [mycircle, right = 1.3cm of zuf_f] {$\epsilon_{Sf}$};       \node (error_cf) [mycircle, right = 2.8cm of konf_f] {$\epsilon_{FocCf}$};            \path (zuf_m.east) edge[->,line] (stab.west);       \path (zuf_f.east) edge[->,line] (stab.west);            \path (unemp_m.east) edge[->,line] (zuf_m.west);       \path (unemp_f.east) edge[->,line] (zuf_f.west);       \path (unemp_m.east) edge[->,line] (zuf_f.north west);       \path (unemp_f.east) edge[->,line] (zuf_m.south west);            \path (unemp_m.east) edge[->,line] (konf_m.west);       \path (unemp_f.east) edge[->,line] (konf_f.west);       \path (unemp_m.east) edge[->,line] (konf_f.north west);       \path (unemp_f.east) edge[->,line] (konf_m.south west);            \path (konf_m.east) edge[->,line] (zuf_m.north west);       \path (konf_f.east) edge[->,line] (zuf_f.south west);            \path (error_sm) edge[->, line] (zuf_m);       \path (error_sf) edge[->, line] (zuf_f);            \path (error_cm) edge[->, line] (konf_m);       \path (error_cf) edge[->, line] (konf_f);            \path (error_sm) edge[<->, bend left=90, line] (error_sf);       \path (error_cm) edge[<->, bend left=90, line, looseness=1] (error_cf);          \end{tikzpicture}          \end{document}


title: How to vertically center a table cell content when using sideways?

text: I have the following table:               \documentclass{article}     \usepackage{graphicx}     \usepackage{multirow}     \usepackage{adjustbox}     \usepackage{rotating}          \begin{document}               \begin{table}[htbp]     \begin{adjustbox}{width=\textwidth,totalheight=\textheight,keepaspectratio}     \begin{tabular}{| c | l | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c |}     \hline     A & B & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16\tabularnewline     \hline     \multirow{2}{*}{\begin{sideways}EFGH\end{sideways}} & abaadfgd & & & & & & & & & & & & & & & &\tabularnewline     \cline{2-18}     & afgdfgadg & & & & & & & & & & & & & & & &\tabularnewline     \cline{2-18}     & afgfdagdfgdfg & & & & & & & & & & & & & & & &\tabularnewline     \hline     \multirow{2}{*}{\begin{sideways}XYZ\end{sideways}} & dagdgadg & & & & & & & & & & & & & & & &\tabularnewline     \cline{2-18}     & adfgadgadg & & & & & & & & & & & & & & & &\tabularnewline     \cline{2-18}     & adfgfadgdafg & & & & & & & & & & & & & & & &\tabularnewline     \cline{2-18}     & afgdagdfgdg & & & & & & & & & & & & & & & &\tabularnewline     \hline     \end{tabular}     \end{adjustbox}     \end{table}          \end{document}      This results in a table like that: ![enter image description here](http://i.stack.imgur.com/DGtq4.png) I would like to vertically center the text in the first column, but I can't manage to do it. How should I proceed?


title: Accents and unicode-math

text: Why are certain accents in math mode invisible? I am using `unicode-math` and compile with XeLaTeX. Here is a MWE:               \documentclass{scrartcl}     \usepackage{unicode-math}     \begin{document}     x̃ŷz̄ $x̃ŷz̄$     \end{document}      This produces accents on the text mode letters but not on the math mode ones. Strange!


title: Strange behaviour of key /pgfplots/ymax

text: I have the following code:               \documentclass{standalone}          \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usepgflibrary{fixedpointarithmetic}     \usepackage{fp}          \begin{document}       \begin{tikzpicture}[fixed point arithmetic]         \begin{axis}[clip=false,ymax=3e7]           \addplot {1000000*x^2} node {\pgfkeysvalueof{/pgfplots/ymax}};           \pgfmathsetmacro{\maxexponent}{round(log10(\pgfkeysvalueof{/pgfplots/ymax}))}           \node at (axis cs:0,1.5e7) {\maxexponent};         \end{axis}       \end{tikzpicture}     \end{document}      that gives the correct result ![enter image description here](http://i.stack.imgur.com/GbHXH.jpg) But if I remove the `ymax` specification in `axis` environment the `addplot` node still works correctly but I get an error in defining the `\maxexponent` macro:               ! FP error: Logarithm of zero!.      and the node at the center becomes `0.0`. Why this different behaviour of the key `/pgplots/ymax`? ( **answered in Jake comment** ) ## Edit I asked this because I want to use the `ymax` value automatically determined by `pgfplots`. So I update my question to this one: "How can I record the value of `ymax` to use it in the same `axis` environment (from Jake comment I don't think this is possible) or in a subsequent one?"


title: Advice on an efficient method to strip out color tags from LaTeX

text: I have revised a manuscript in LyX, and as requested by the journal editor, coloured the new text in red. Once I completed the revision I exported to LaTeX to do the final tweaking of the manuscript. I now have a revised manuscript in pdf format with all changes marked up in red text. The problem is that I also need a unmarked up version (with red text removed). I can remove the red coloring in the LyX file, but then need to re-export and re-tweak the entire document whenever I make a small change. Because the color text was added in LyX I have `\textcolor{red}{Words and more words}` scattered all throughout the document. Can someone give me a clue to an efficient way to strip out the `\textcolor{red}` tags and the corresponding `{}` throughout the Latex file? I've tried searching online but have not managed to find an answer yet.


title: I want a Page Border around my Latex document. as in the image

text: I'm trying to make a project report and the format is the same as in the image below. I'm stuck where I need to give border to every page as shown below. I do not know anything about LaTeX so what I need is you to provide me with a perfect code and also specify where do I put this code. ![enter image description here](http://i.stack.imgur.com/NH3mG.jpg)


title: how to vertically align text in multirow cell with tabularx with renewcommand?

text: Here I come again, Following the indications on this url I managed to get almost exactly what I want. However the problem is that the first multirow cell (with text "5 and 6") is not vertically centered. Any help is very much appreciated. Setup is Miktex 2.9, updated packages from CTAN as of today, Texniccenter 2a3 on win7x32. Profile is Latex->PDF. Best regards and thanks in advance               \documentclass{article}     \usepackage{multirow,array,tabularx,booktabs}          \begin{document}     \newcolumntype{Z}{>{\centering\arraybackslash}X}     \newcolumntype{Y}{>{\small\raggedright\arraybackslash}X}     \renewcommand{\tabularxcolumn}[1]{>{\arraybackslash}m{#1}}     \begin{table}[htbp]     \begin{tabularx}{\textwidth}{|Z|Z|Z|}     \hline\hline Number&Image 1&Image 2\\\hline\hline     1&\includegraphics[width=0.2\columnwidth]{images/1.png}&\includegraphics[width=0.2\columnwidth]{images/1a.png}\\\hline     2&\includegraphics[width=0.2\columnwidth]{images/2.png}&\includegraphics[width=0.2\columnwidth]{images/2a.png}\\\hline     3&\includegraphics[width=0.2\columnwidth]{images/3.png}&\includegraphics[width=0.2\columnwidth]{images/3a.png}\\\hline     \multirow{2}{*}{5 and 6}&\multirow{2}{*}{\includegraphics[width=0.2\columnwidth]{images/56.png}}&\includegraphics[width=0.2\columnwidth]{images/5.png}\\\cline{3-3}     & & \includegraphics[width=0.2\columnwidth]{images/6.png}\\\hline     \end{tabularx}     \caption{Images}     \label{tab:figuretable}     \end{table}          \end{document}


title: What math fonts are available that work in xelatex?

text: For LaTeX, we have the Font Catalogue which is a good resource for fonts available through LaTeX. There doesn't appear to be a similar resource for Xe(La)TeX. So let's say I'm bored of computer modern and I want to try out some new fonts in XeLaTeX. Where can I find out what's available? Ideally I'd like to find what fonts have a math alphabet, at least some common ligatures (ff, ffi etc) and old style figures…


title: Avoid inverted exclamation and question marks, when followed by quotes

text: In an automated system that is generating LaTeX to render PostScript and PDF, i need to avoid an ambiguity in LaTeX:   * Two backticks (````) produce a closing doublequote: `“`   * A question/exclamation mark followed by a backtick (`?``) produces the inverted character: `¿`   * Combined, when trying to display a question mark followed by a quote (`,,wtf?```), LaTeX produces the following output: `„wtf¿‘` What is the best practise to avoid this? The desired output is: `„wtf?“`


title: Reusing circuit code with nodes in TikZ

text: I'm new to TikZ/PGF (a week or so in), and am loving it. I've had good success making figures so far, but have a question about best practices for including multiple copies of a sub-circuit in a single figure. And doing so in a way that allows simple connections to the input/output nodes of the sub-circuit. As a very rudimentary example (please excuse the free-handed drawing) in which I have a drawing with two repeated sub-circuits (contained within a rectangle). ![hand-drawn circuit](http://i.stack.imgur.com/gLkNo.jpg) So in this example, I'd like to define the amplifier circuit once, and then place it twice in the picture and connect wires to its input and output nodes. Does this require me to develop a library, or can the sub-circuit be written into the .tex file directly and then reused? I did see the post about using a \newsavebox here, but I'm not sure how I would access the nodes in the circuit using that approach. Any help is greatly appreciated. Many thanks.               \documentclass{article}     \usepackage{tikz}          \usetikzlibrary{circuits.logic.US,circuits.ee.IEC,positioning,fit}          \begin{document}     \begin{tikzpicture}[circuit ee IEC,circuit logic US,x=3cm,y=2cm,semithick,         set resistor graphic=var resistor IEC graphic]            % Box on the left (non circuit stuff)                                            \draw (0,0) rectangle (2,2);       \draw (1,1) rectangle (1.8,1.8);       \draw (0.3,0.2) rectangle (0.5,0.5);            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                               % Begin the sub-circuit to be replicated                                         \node[contact] (A) at (2.5,0) {};       \node[contact] [right=1.5cm of A] (B) {};       \node[contact] [above=1.5cm of B] (C) {};       \node[contact] [right=1.0cm of B] (D) {};       \node[contact] [right=1.5cm of D] (E) {};       \node[buffer gate] [right=0.1 of D] (amp) {};       % Problem #1:  there is whitespace between the amp output and the line to node E       \draw (A) to [resistor] (B) (B) to [capacitor] (D) (D) to (amp) (amp) to (E);       \draw (B) to [resistor] (C);       % Problem #2: had to tune 0.54 to get vertical line to node E.  (output of amp)       % Must be a better way ...       \draw (D) -- ++(0,0.5) to [capacitor] ++(right:0.54) to (E);       \tikzset{black box/.style={draw=black, rectangle}};       \node(preampbox) [black box, fit=(A) (C) (E) (amp), inner sep=0.4cm] {};       %%%%%%%%%%%%%%  end subcircuit  %%%%%%%%%%%%%%%%%%                                  \end{tikzpicture}     \end{document}      ![code output](http://i.stack.imgur.com/R28dY.png)


title: Recover from a pdf beamer presentation another pdf beamer presentation without the pauses

text: I have a beamer made PDF presentation which include pauses, and therefore double pages with the same content displayed slide by slide. I don't have the TEX code unfortunately. I would like to to known if it is possible to extract from this entire first PDF a presentation **without** these pauses. My aim is to include them later in a report. Thank you in advance for your help.


title: Tikz arithmetic progression

text: I'm trying to do something like that to show a arithmetic progression (using TikZ):![enter image description here](http://i.stack.imgur.com/JdiW0.jpg) Thanks! :D


title: Why does `align` break `tikz` node placement?

text: I want to put some marks in the document and place desciptions of these marks in the margin area, one below another. It works fine, however if I place a mark inside `align` environment corresponding node is vertically misplaced.               \documentclass{article}     \usepackage[a5paper,textwidth=9cm]{geometry}     \usepackage{tikzpagenodes}     \makeatletter     \protected\def\note#1{%       \textcolor{red}{!}%       \ifmeasuring@\else % do nothing during the measuring phase         \tikzpicture[remember picture,overlay]             \@ifundefined{pgf@sh@ns@note}                 {\coordinate (pos) at (0,0-|current page marginpar area.north west);}                 {\coordinate (pos) at (note.south west);}             \node (note) [anchor=north west,inner sep=0pt,text=red] at (pos) {#1};             \draw[red] (note.south west) rectangle (note.north east);         \endtikzpicture       \fi}     \makeatother     \usepackage{amsmath}     \usepackage{tabu}     \begin{document}     Some text, more\note{text 1st} text, even more text.     \begin{displaymath}         a+b+c =\note{math 1st} d+e+f = g+h     \end{displaymath}     Some text, more\note{text 2nd} text, even more text.     \begin{align}         a+b+c &=\note{align 1st} d+e+f \\         &= g\note{align 2nd}+h     \end{align}     Some text, more\note{text 3rd} text, even more text.     \begin{center}         \begin{tabu}{|c|c|c|}             \hline             Column 1&Column 2\note{tabu 1st}&Column3\\\hline             Cell 1&Cell 2&Cell 3\\\hline             Cell 4&Cell 5\note{tabu 2nd}&Cell 6\\\hline         \end{tabu}     \end{center}     Some text, more\note{text 4th} text, even more text.     \end{document}      ![mwe](http://i.imgur.com/LWveb2e.png) The same thing occurs if I use `tabu` tabular environment. Meanwhile `displaymath` and `tabular` do no harm. What is the reason? **Edit: Included`tabu` in MWE**


title: How to type a decimal point not in a number

text: I'm using `xepersian` package and I was trying to type `$0.\overline{1011}$`, but I noticed that the dot after 0 is not interpreted as a decimal point (The decimal sign in Persian is something like `/`). How do I make it look like a decimal sign? To illustrate the situataion, consider the code below. The first line doesn't use the overline and outputs the correct character for decimal point, but second line output a dot instead. Third line is meant to show how decimal point character is different from $/$.               \documentclass{article}     \usepackage{xepersian}          \begin{document}         $$0.1011$$         $$0.\overline{1011}$$         $$0/\overline{1011}$$     \end{document}      Here is how the output looks like: ![enter image description here](http://i.stack.imgur.com/Be9Lm.png)


title: What is an elegant way of indicating repeating elements in a vector?

text: Consider a vector that is made up of _N_ times the same element, stacked next to each other. I am having a hard time coming up with an elegant mathematical notation for indicating the repetitiveness of the elements, and the how often they repeat. The best I could come up with is: ![A vector with repeating elements](http://i.stack.imgur.com/cGyy4.png)               \documentclass{article}          \usepackage{mathtools}          \begin{document}     \[         \underbrace{%             \begin{pmatrix}                  \Delta t \mathbf{a}_b &  \Delta t \mathbf{a}_b & \cdots & \Delta t                 \mathbf{a}_b              \end{pmatrix}%          }_{N \times (\Delta t \mathbf{a}_b)}      \]     \end{document}      Can you propose a way to make this clearer in LaTeX?


title: PGF Math: "An internal routine of the floating point unit near"

text: I am using this snippet:               \documentclass{beamer}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}       \begin{axis}[          xlabel=$x$,         ylabel={$f(x) = x^{-1}$}       ]          \addplot {x^{-1}}; % this was previously: x^2       \end{axis}     \end{tikzpicture}          \end{document}      That worked until I changed `x^2` to `x^{-1}`. Now I am getting the following error (there are also lots of errors after it): > PGF Math: Sorry, an internal routine of the floating point unit near > '2Y1.0e0]'. (in 'x^{-1}'). \end{frame} **Research:** I could not find many search results except these two questions from Tex SE:   * Package PGF Math Error: Sorry, an internal routine of the floating point unit   * Create Table for a Family of Curves Unfortunately, they seem to be unrelated since their problem is caused by a foreach construct which I don't even have in my code. **My system** :   * MiKTeX-pdfTeX 2.9.4535 (1.40.13) (MiKTeX 2.9)   * PdfLaTeX   * Document class: Beamer


title: Can I define a variable that contains a URL (youtube) and call \includemedia with it?

text: I can successfully embed a video in my latex file using a syntax like this:               \documentclass[10pt,letterpaper]{book}         \usepackage[latin1]{inputenc}         \usepackage{amsmath}         \usepackage{amsfonts}         \usepackage{amssymb}         \usepackage{graphicx}         \usepackage{media9}         \begin{document}             \includemedia[             width=4in,height=3in,             activate=pageopen,             flashvars={              modestbranding=1 % no YT logo in control bar             &autohide=1       % controlbar autohide             &showinfo=0       % no title and other info before start             }             ]{}{http://www.youtube.com/v/Ssz7uq6wRFQ?rel=0}           \end{document}      However, I fail to do this with a variable:               documentclass[10pt,letterpaper]{book}         \usepackage[latin1]{inputenc}         \usepackage{amsmath}         \usepackage{amsfonts}         \usepackage{amssymb}         \usepackage{graphicx}         \usepackage{media9}     \begin{document}     \newcommand{\UrlLocation}{http://www.youtube.com/v/Ssz7uq6wRFQ?rel=0}          \includemedia[       width=4in,height=3in,       activate=pageopen,       flashvars={         modestbranding=1 % no YT logo in control bar        &autohide=1       % controlbar autohide        &showinfo=0       % no title and other info before start       }     ]{}{\UrlLocation}      \end{document}      is there a way to define a string variable that contains the URL and call \includemedia with this variable?


title: Natbib: Display hyperlinked author-year part in \citet and \citep using numerical (superscripted) option

text: I want to display an hyperlinked author-year citation with the `super` option in the `natbib` package like this: `\citet` : **Lancaster et al. (1999)** **(19)**   `\citep` : **(Lancaster et al., 1999)** **(19)** With `\usepackage[round,super]{natbib}`, only citation number (here for example : **`(19)`** ) is hyperlinked. I want to display an hyperlink on both author-year and number whether I use textual (`\citet`) or parenthesized (`\citep`) citation. Here's an MWE: ![enter image description here](http://i.stack.imgur.com/AMdLF.png)               \documentclass[12pt,a4paper,english,french]{article} %% use 'article' so that output fits on one page     \usepackage{filecontents}     \begin{filecontents}{Bibliob.bib}     @article{Lancaster99,        title={A new approach to {MSEs} Management},        author={Lancaster, James R. and Drauster, Mikael F. and Logan, Richard},        journal={Journal of International Research on Management},        volume={74},        number={2},        pages={132-157},        year={1999},        publisher={JSTOR}     }     \end{filecontents}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[frenchb]{babel}     \usepackage[round,super]{natbib}     \usepackage[colorlinks=true, linkcolor=blue, citecolor=blue]{hyperref}          \begin{document}     Textual citation:~\citep{Lancaster99}          Parenthesized citation:~\citet{Lancaster99}          \bibliographystyle{plainnat}     \bibliography{Biblio}       \end{document}       Is that possible to get the display I want ?


title: How to make "Go to Source" work for file with eps Figures in TexStudio

text: I am using TexStudio and my TeX file contains a `.eps` figure, which cannot use the `PDF Chain`. I change it to `DVI->PDF Chain`, and then the PDF file cannot successfully compile. However, I cannot use the fancy 'Go to Source' anymore by right click. How can I make it work again?


title: Huge white-space in latex template (springer journal)

text: I'm writing a paper for a Springer journal, so I downloaded Springer journal template from Springer Manuscript and after I compiled it, there is a huge white-space on the right. Anyone know how I can solve that? ![enter image description here](http://i.stack.imgur.com/9FnaE.png)


title: pgfplots and hyperref clash for complicated figure in book class

text: When using the book class, pgfplots, hyperref, and section labeling according to "How to reset chapter and section counter with \part", I get the following error               ! You can't use `the character -' after \the.     \value ->-               1.60942     l.51     \end{axis}      in the following MWE               \documentclass[a4paper, 12pt]{book}           \usepackage{pgfplots}     \pgfplotsset{compat=1.7} % to use more recent defaults          \usepackage{hyperref}          %section restarts at each part     %see http://tex.stackexchange.com/questions/54383/how-to-reset-chapter-and-section-counter-with-part/123777#123777     \makeatletter\@addtoreset{chapter}{part}\makeatother          \begin{document}          \begin{figure}       \centering     \pgfplotsset{         colormap/hot,     }%     \pgfmathparse{-ln(0.1)}%     \let\BEMAX=\pgfmathresult          \pgfmathparse{-ln(5)}%     \let\BEMIN=\pgfmathresult          % FIRST: define one color for every value of \be :      \pgfplotsforeachungrouped \be in {             0.1,             0.5,             0.8,             1.0,             2.0,             5.0} {         \pgfmathparse{-ln(\be)}         \let\value=\pgfmathresult     }               \begin{tikzpicture}         \begin{axis}[ylabel={$p(x)$},             legend to name={fig:mm_temp_legend}         ]           \pgfplotsforeachungrouped \be/\zedd in {                     0.1/12.4595,                     0.5/18.3263,                     0.8/29.6888,                     1.0/43.0372,                     2.0/403.539,                     5.0/1.07923e6 } {            \addplot+ gnuplot {x};           }         \end{axis}       \end{tikzpicture}     \end{figure}          \end{document}      which was adapted from Christian Feuersänger's answer to "line legend for mesh plots". I tried to make the example as small as possible. In particular, removing any of `\usepackage{hyperref}`, `\makeatletter\@addtoreset{chapter}{part}\makeatother`, `\let\value=\pgfmathresult` or `legend to name={fig:mm_temp_legend}` makes it compile.


title: Tkz-euclide error "Undefined control sequence \tkzMarkAngle"

text: > Note: While preparing the following question, I've spend about half an hour > in trying to create a MWE. Then I solved the problem. So I rewrote the > following to make it easy find this question with search engines / the > internal search and easy to see if your problem is the same (So I removed > any information that was only related to my problem). I currently get the followin error when I try to compile my document:               (./figures/geometry-6.tex     ! Undefined control sequence.     l.7     \tkzMarkAngle                          [arc=l,size=1cm,color=green,fill=green!20](H1,Q,P)     ?      ! Emergency stop.     l.7     \tkzMarkAngle                          [arc=l,size=1cm,color=green,fill=green!20](H1,Q,P)     !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on GeoTopo.log.      The document is               \documentclass[varwidth=true, border=2pt]{standalone}     \usepackage{tkz-euclide}          \begin{document}     \usetkzobj{all}     \begin{tikzpicture}         \tkzSetUpPoint[shape=circle,size=10,color=black,fill=black]         \tkzSetUpLine[line width=1]         \tkzDefPoints{0/0/Q, 4/1/H1, 1/2/P}         \tkzDefPoint(1.5,3){Phelper}         \tkzMarkAngle[arc=l,size=1cm,color=green,fill=green!20](H1,Q,P)         \tkzDrawLine(Q,H1)              \tkzLabelPoint[above left](Q){$Q$}         \tkzDefLine[parallel=through P](Q,H1) \tkzGetPoint{b}         \tkzMarkAngle[arc=l,size=1cm,color=green,fill=green!20](b,P,Phelper)         \tkzDrawLine[dashed](P,b)         \tkzLabelLine[pos=0.8,below](P,b){$h$}         \tkzLabelLine[pos=-0.6,left](P,Q){$f$}         \tkzLabelLine[pos=0.8,below](Q,H1){$g$}         \tkzLabelPoint[above left](P){$P$}         \tkzDrawLine[add=0.2 and 0.7](Q,P)         \tkzDrawPoints(P,Q)         \tkzMarkSegments[mark=||](Q,H1 P,b)     \end{tikzpicture}     \end{document}      What causes this error?


title: How to put a "coil" inside an ncline (between nodes)?, in PStricks

text: How to put a "coil" in an `\ncline` between nodes? similar to: ![enter image description here](http://i.stack.imgur.com/1LW3Y.png) I have viewed `\pscoil` and options as `coilarm=0.5,..` but.... in `\ncline` or similars?, how? I have this code, for example               \documentclass[12pt,a4paper,x11names]{article}     \usepackage{pstricks,pst-node,pst-blur,pstricks-add}     \usepackage{graphicx}     \usepackage{subcaption}     \usepackage[utf8]{inputenc}     \usepackage{eurosym}     \newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur}     \definecolor{azultenue}{RGB}{65,170,193}     \definecolor{rojotenue}{RGB}{192,2,3}     \definecolor{naranjatenue}{RGB}{241,101,35}     \definecolor{verdetenue}{RGB}{144,169,61}     \definecolor{gris135}{RGB}{135,135,135}          \begin{document}          \vspace{2.1cm}      \begin{figure}[h!]     \centering          \resizebox{10cm}{!}{          \psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm,nodesep=0.12cm}     %     \def\pscolhookii{\hskip 1cm}     \def\pscolhookiii{\hskip 1cm}     \begin{psmatrix}[rowsep=0.2, colsep=5.2]% defines the distance between two frames     &     &     \\[2.5cm]      [name=Inicio]      \psframegray(-2.5,-2.5)(2.5,2.5)     %      \rput(0,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p1}{\textcolor{black}{$p_1$}}}           \rput(-1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c1}{\textcolor{black}{$c_1$}}}      \rput(-0.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c2}{\textcolor{black}{$c_2$}}}      \rput(1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{cl}{\textcolor{black}{$c_\lambda$}}}           \ncline[arcangle=0]{->}{p1}{c1}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$}}     %      \ncline[arcangle=0]{->}{p1}{c2}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$} }     %      \ncline[arcangle=0]{->}{p1}{cl}      \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$} }     \rput(0,-3.0){$\bullet$ Crear $\lambda$ mutantes de $p_1$}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     &[name=Conjunto]     \psframegray(-2.5,-2.5)(2.5,2.5)     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     &[name=EM]     \psframegray(-2.5,-2.5)(2.5,2.5)     %     %     \end{psmatrix}     %     {\psset{linewidth=3pt, linecolor=red, arrows=->, nodesep=4pt,  linearc=0.25, angleB=180, shortput=nab, npos = 0.4,nodesep=2.6cm}     \ncline{Inicio}{Conjunto}     \ncline{Conjunto}{EM}     }          }     %\vspace{3.85cm}     \vspace{2.85cm}     \caption{Esquema $(1 + \lambda)$}\label{1maslambda-ilustracion}     \end{figure}          \vspace{1cm}          \end{document}


title: threeparttable: changing indentation of table footnotes

text: OK ladies and gentlemen, this is a follow-up question. Although most of my concerns have been answered in the previous question, I still have some issues. I want to know if there is a way to have the same indentation for the table notes as the main table. As you can see this code is good enough to fix the main table the way I like it, yet the indentation of the table footnotes is something that I do not prefer. The main code is the following:               \documentclass[11pt,a4paper]{book}     \usepackage[margin=1in,showframe]{geometry}     \usepackage{threeparttable,booktabs}     \begin{document}          \begin{table}     \centering     \begin{threeparttable}     \caption{OLS results} \label{ols_results}     \begin{tabular}{@{} p{4cm} cccccccc @{}}      \toprule     & \multicolumn{4}{c}{Non-HMO Hospitals}      & \multicolumn{4}{c@{}}{HMO-Hospitals} \\     \cmidrule(lr){2-5} \cmidrule(l){6-9}     & \multicolumn{2}{c}{Doctors} & \multicolumn{2}{c}{Non-Doctors}      & \multicolumn{2}{c}{Doctors} & \multicolumn{2}{c@{}}{Non-Doctors} \\     \cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7} \cmidrule(l){8-9}      & Mean &  StDev & Mean &  StDev       & Mean &  StDev & Mean &  StDev \\      \midrule     \underline{Demographics}: &&&&&&&& \\     Age & 32.59* &  [4.00] & 31.13* &   [4.28] & 32.63* &   [4.12] & 30.69* &   [4.28] \\     Mother's Education (\%) &&&&&&&& \\     \hspace{0.2em} Some college &&&&&&&& \\     \hspace{0.2em} College graduate &&&&&&&& \\     \hspace{0.2em} High education &&&&&&&& \\     Father's education &&&&&&&& \\      \hspace{0.2em} Some college &&&&&&&& \\     \hspace{0.2em} College graduate &&&&&&&& \\     \hspace{0.2em} High education &&&&&&&& \\     Insurance (\%) &&&&&&&& \\     \hspace{0.2em} HMO &&&&&&&& \\     \hspace{0.2em} Government &&&&&&&& \\     \hspace{0.2em} Indigent &&&&&&&& \\     \raggedright Placental\slash uterine rupture\slash         haemorrhage & 1.44 & [0.23] &&&&&& \\      \midrule     Observations      & \multicolumn{2}{c}{2360} & \multicolumn{2}{c}{7852}      & \multicolumn{2}{c}{256} & \multicolumn{2}{c@{}}{879}  \\     \bottomrule     \end{tabular}       \begin{tablenotes}     \tiny     \item[a] [whatever here, this is just a test] This table is made with the use of \LaTeXe. Cristobal is a port on the Atlantic side of the Panama Canal. It is located on the western edge of Manzanillo Island and is part of the Panamanian city and province of Colon. Cristobal Colon is the Spanish translation for Christopher Columbus, the Genovese explorer for whom these places were named.     \end{tablenotes}     \end{threeparttable}     \end{table}     end{document}


title: How to shift yticklabels vertically?

text: When plotting data matrices as done here and here, the tick labels get drawn at the border of fields. They should be drawn in the center. I've tried shifting them using `hspace` and `vspace`. This works for the xticklabels, but not for the yticklabels. It could be done manually by setting: `yticks = {0.5}` and `yticklabels = {1}`, but this command is called for plots of different sizes. This seems like there should be an easy solution, but I didn't find anything in the manual.               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}     \pgfplotstableread{             0 0 0.77             0 1 0                  1 0 0             1 1 0     }\data      \begin{tikzpicture}       \begin{axis}[         width=5cm,         %title={\texttt{Minimal purity plot}},             colormap={bluenew}{rgb255(0cm)=(255,255,255); rgb255(1cm)=(40,40,240)},             colorbar,             colorbar style={                     at={(1.5, 0.5)},                     anchor=west,                     xticklabel pos=right,                     try min ticks=3,             height=1.5cm,             x=0.25cm             },             xticklabel = {\hspace{-1.5cm}$\pgfmathprintnumber\tick$},             yticklabel = {\vspace{-1.5cm}$\pgfmathprintnumber\tick$},             xtickmin = 1,             ytickmin = 1,             xtick=data,             ytick=data,             point meta min=0,             point meta max=1,             xlabel=original feature,             ylabel=recovered feature,             y label style = {rotate=90},             axis equal,             x = 1.5cm,             y = 1.5cm,             z = 0cm ]     \addplot3 [surf, shader=flat corner] table {\data};       \end{axis}      \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/mQFrE.png)


title: My table works in latex in general but not in beamer

text: I am using excel2latex to create my tables, but when I am using beamer to create presentation file, it has error. My code is :               \usepackage{lmodern}     \usepackage[english]{babel}     \usepackage{mathrsfs}     \usepackage[latin1]{inputenc}     \usepackage{graphics}     \usepackage{graphicx, color}     \usepackage{subfigure}     \usepackage{graphicx}% http://ctan.org/pkg/graphicx     \usepackage{booktabs}                      \begin{frame}       \frametitle{}       \begin{table}[htbp]         \centering         \caption{Indices, Parameters and Decision Variables}           \begin{tabular}{llc}           \toprule                       &       & Explanation \\           \midrule           \multirow{4}[0]{*}{Indices} & i, j, {i'},{j'} & graph nodes \\           \multicolumn{1}{c}{} &  k, {k'} & Convoys\\           \multicolumn{1}{c}{} &  v & Convoys vehicles \\           \multicolumn{1}{c}{} & ${v_k}$ & Index for the last vehicles in the convoy k \\       \hline           \multicolumn{1}{c}{\multirow{14}[0]{*}{Parameters}} & N & Total number of convoys       or OD pairs. \\           \multicolumn{1}{c}{} & M          & Total number nodes on the network       (intersections)\\           \multicolumn{1}{c}{} & $l_{i,j}$      & length of the arc (i,j) \\           \multicolumn{1}{c}{} & $l_{k}^v$      & The length of the vehicle v in convoy k \\           \multicolumn{1}{c}{} &  $O_{ k}, D_{k}$   & The Origin and Destination points       of convoy k\\           \multicolumn{1}{c}{} & $r_{ k}$       & The arrival time of convoy k at       the Origin.  \\           \multicolumn{1}{c}{} & $ f_{k}$       & The deadline for convoy k to       reach its destination. \\           \multicolumn{1}{c}{} & $ S_{i,j}^k$       & The deadline for convoy k to       reach its destination. \\           \multicolumn{1}{c}{} & $w_{ i}$       & The length of the convoy i. \\           \multicolumn{1}{c}{} & $F_{i,j}$      & The traffic volume on edge (i,j).       \\           \multicolumn{1}{c}{} & $A_{E\times E}$    & The Tabu List matrix, is one       where corresponding edges should \\       \multicolumn{1}{c}{} & &not be occupied at the same time by more than one convoy. \\           \multicolumn{1}{c}{} & $l_{k}$        & The total length of convoy k. \\           \multicolumn{1}{c}{} & $\lambda_k$        & The waiting time interval at the origin       for convoy k. \\            \hline                \multicolumn{1}{c}{\multirow{7}[0]{*}{       }} &  $X_{ i,j}^k$ & $ \left\{ \begin{array}{rcl}       1 & \mbox{ If convoy k will pass through link (i,j) } &  \\       0 & \mbox{Otherwise} &        \end{array}\right. $ \\           \multicolumn{1}{c}{} & $Y_{k,k'}^i$        & $   \left\{ \begin{array}{rcl}       1 & \mbox{ If convoy k will pass through link (i,j) } &  \\       0 & \mbox{Otherwise} &        \end{array}\right. $  \\           \multicolumn{1}{c}{Decision} & $Z_{i,j}^{k}$      & The time interval which       convoy k is on the edge (i,j) \\           \multicolumn{1}{c}{Varialbes} & $t_{i}^{k,v}$     & The time when $v^th$       vehicle of  convoy k arrives at node i  \\           \multicolumn{1}{c}{} & $Q_{i,j,i',j}^{k,k'}$  & $   \left\{ \begin{array}{rcl}       1 & \mbox{ if Convoy k will pass the edge (i,j) before convoy {k'} pass edge (i',j')       } &  \\       0 & \mbox{Otherwise} &        \end{array}\right. $ \\           \multicolumn{1}{c}{} & $t_{i}^{k}$        & The time when convoy k will       arrive to node i \\           \multicolumn{1}{c}{} & $B_k$          & The integer waiting component of       convoy k \\           \bottomrule           \end{tabular}%         \label{tab:addlabel}%       \end{table}%             \end{frame}      And the error that I got is : ! Undefined control sequence. \multirow l.161 \end{frame} ?


title: Larger lowercase small-caps in Times?

text: The lowercase small-caps provided by the times package are too small for my taste. The lowercase characters appear smaller relative to the uppercase ones than they do in, say, computer modern or garamond. Is there a package that provides larger lowercase small-caps for a times-like font (e.g., a lowercase- to-uppercase differential comparable to that in computer modern)?


title: Reference grouped tables with hyperlinks

text: I have the following MWE.               \documentclass[12pt, a4paper]{report}     \usepackage[hidelinks]{hyperref}     \usepackage[all]{hypcap}     \begin{document}     As seen in Table \ref{table1} and \ref{table2}.     \begin{table}     \centering     \begin{tabular}{ l | c || r }       \hline                               1 & 2 & 3 \\       4 & 5 & 6 \\       7 & 8 & 9 \\       \hline       \end{tabular}     \caption{Table 1}     \label{table1}     \begin{tabular}{ l | c || r }       \hline                               1 & 2 & 3 \\       4 & 5 & 6 \\       7 & 8 & 9 \\       \hline       \end{tabular}     \caption{Table 2}     \label{table2}     \end{table}     \end{document}      I have two 'tabulars' defined within a table, this a requirement for me. I'm using the `hyperref` package to have clickable links to the tables. I'm also using `\usepackage[all]{hypcap}` in the premable so that on clicking the links, the page scrolls to the top of the table instead of the caption. However, on clicking the link of Table 2, the page scrolls to the caption. I'm suspecting this is happening because I have two tables grouped together. How could I go about this? I accept any workarounds as long as the tables would remain grouped together. I'd like to use this for figures as well. Thanks,


title: How to use the same linestyle for different isolines in pgfplots

text: I need assistance on how I can use the same linestyle in ternary diagrams where there is no need for using different colors, linestyles and legends.An example is given in the following programme which gave me the result in three colors and three linestyles.I wish to remove the legend,colour in the isolines and use the same linestyle for the three plotted coordinates at 0.9,0.8 and 0.7 isolines.Thanks.               \documentclass{standalone}          \usepackage{pgfplots}           \pgfplotsset{compat=1.8}          \usepgfplotslibrary{ternary}          \begin{document}          \begin{tikzpicture}          \begin{ternaryaxis}[                ternary limits relative=false,                width=7.5cm,                height=7.5cm,                ymax=1.0,                clip=false,                disabledatascaling,                minor tick num=1,                grid=both,     %          xlabel=A,      %         ylabel=B,      %         zlabel=C,      ]          \addplot3 coordinates {            (0.9047, 0.0953, 0.0000)                  (0.9019,   0.0883, 0.0098)                  (0.8993,   0.0806, 0.0201)                  (0.8969,   0.0722, 0.0309)                  (0.8950,   0.0630, 0.0420)                  (0.8936,   0.0532, 0.0532)                  (0.8929,   0.0428, 0.0643)                  (0.8930,   0.0321, 0.0749)                  (0.8938,   0.0212, 0.0850)                  (0.8953,   0.0105, 0.0942)                  (0.8975,   0.0000, 0.1025)             };          \addplot3 coordinates {             (0.8209,    0.1791, 0.0000)                   (0.8131,  0.1682, 0.0187)                   (0.8054,  0.1557, 0.0389)                   (0.7980,  0.1414, 0.0606)                   (0.7913,  0.1252, 0.0835)                   (0.7859,  0.1071, 0.1071)                   (0.7823,  0.0871, 0.1306)                   (0.7810,  0.0657, 0.1533)                   (0.7822,  0.0436, 0.1742)                   (0.7859,  0.0214, 0.1927)                   (0.7917,  0.0000, 0.2083)             };          \addplot3 coordinates {                 (0.7439,    0.2561, 0.0000)          (0.7313,   0.2418, 0.0269)          (0.7186,   0.2251, 0.0563)          (0.7060,   0.2058, 0.0882)          (0.6942,   0.1835, 0.1223)          (0.6841,   0.1580, 0.1580)          (0.6767,   0.1293, 0.1940)          (0.6729,   0.0981, 0.2290)          (0.6734,   0.0653, 0.2613)                 (0.6777,    0.0322, 0.2901)                 (0.6848,    0.0000, 0.3152)             };           \node[fill=white,draw] at (0.5,{sqrt(3)/2}) {$Sn$};          \node[fill=white,draw]  at (0,0) {$Sb$};           \node[fill=white,draw]  at (1,0) {$Bi$};           \legend{0.9, 0.8,0.7}          \end{ternaryaxis}     \end{tikzpicture}     \end{document}


title: How to manage bibliography files with a VCS while they're used by an external program?

text: I use Mendeley to organise citations. It exports a `.bib` file automatically to a folder on my Mac. I also have another `.bib` file that I use for other citations not stored in Mendeley (websites mostly). This file is stored in a folder containing all my LaTeX projects in separate folders. The reason that the `.bib` files are stored separate of the LaTeX project is that multiple projects use the same citations and this way I only have to maintain one `.bib` file (the other one is maintained by Mendeley). Inspired by the question on VCS I added my current LaTeX project to bitbucket.org using git. It is a directory that contains my `.tex` files and images, _not_ the `.bib` file. In my `main.tex` I include the two bibliographies as follows:               \bibliography{~/Documents/Dropbox/Mendeley/library,../other_refs}      My goal now is to make the repository self-contained, so that someone can just clone it and compile the LaTeX document. As my `.bib` files are not in the repo, how can I achieve this?   Symlinks are not an option as git does not follow symlinks anymore.


title: Horner scheme with a tabular

text: I know there exists a standard code for a Horner scheme. But I would like to get the following tabular. ![enter image description here](http://i.stack.imgur.com/01iLk.png) I've got the next code but I can't find how I get that little vertical line at the right bottom.               \begin{tabular}{c|cccc}               & 3 & 2 & -5 & -10 \\            &   &   &    &     \\ \hline               &   &   &    &         \end{tabular}        I've got another question about this. The number 11 is now shifted to the left, but I want that it's under 16.               \begin{tabular}{c|cccc}         & 3 & 2 & -5 & -10 \\          2 & $\downarrow$  & 6  & 16    & 22   \\ \hline         & 3  & 8  &  11   \multicolumn{1}{c|}{}  & 12        \end{tabular}


title: Adjusting pgfplots

text: I am having trouble controlling the axes in pgfplots. I have defined an evironment for graphs               \newenvironment{graph}[3][]{\begin{figure}[htp]     \def\tempa{#1} %Saves caption since \end cannot take arguments     \begin{center}     \begin{tikzpicture}[scale=1]      \draw node at (7,0) { \Large     $ #2 $ }; %variable on x-axis     \draw node at (0,6.1) { \Large $ #3 $}; %variable on y-axis     \begin{axis}[           axis lines=left,           axis equal,           %ticks=none,           %xlabel=$x$,           %ylabel=$y$,           %width=8cm,           %height=8cm,           domain=0:10.5,           restrict y to domain=0:10.5           samples=1000       ]               }     {     \end{axis}     \end{tikzpicture}     \end{center}     \ifdefempty{\tempa}{}{\caption{\tempa}} %Creates caption if argument is present.     \end{figure}          }       As you can see, I have been experimenting a bit with the axes. My problem is, that they are not of equal length. I would like them to have the same fixed domain 0:10.5, and be of the same exact length (cm). Usually the y-axis is shorter than the x-axis. In line 5 and 6 I define the names of the axes. As you can see the variables are placed at 6.1 instead of something like 10.5 which I defined the dimension of the axis to be. I would like be able to use the the coordinates of the axis when i use the draw command. ![1](http://i.imgur.com/Pm7DFq8.png?1?3338) If I set the position to 10, the nodes are totally misplaced.               \draw node at (10,0) { \Large    $ #2 $ }; %variable on x-axis      ![2](http://i.imgur.com/7o17n0X.png) The last problem is that the draw function does not work within the environment               \begin{graph}{x}{y}     \draw[dotted] (0,0) -- (2,2);     \end{graph}      This gives me nothing: ![3](http://i.imgur.com/ZeLWwGw.png) Thanks in advance.