title: BibLatex modification: no small caps in authors

text: When using the code from this question, I get the names of authors in small caps. Is it possible to have it in normal text ? The MWE:               \documentclass[a4paper,12pt]{memoir}          %% -1- Encoding Stuff     % input encoding with utf8     \usepackage[utf8]{inputenc}     % Use T1 Fonts     \usepackage[T1]{fontenc}     % URL package     \usepackage{url}     % Footnotes stick at the bottom of the page, not the bottom of the text     \usepackage[bottom]{footmisc}     % Custom quotes (French style)     \usepackage{csquotes}     % Links in the pdf     \usepackage[colorlinks=true,unicode]{hyperref}     % Babel --> Français !     \usepackage[francais]{babel}          %% -2- About Bibliography     % Load BibLaTeX     \usepackage[style=chem-acs,% Citation style                 hyperref=true,% Links to citations in the pdf                 babel=hyphen,% For hyphenation patterns                 backend=biber,% Use Biber. Probably better. If unavailable, switch this to bibtex                 refsection=chapter% Per chapter bibliography                ]{biblatex}          % All BibLaTeX setup taken almost straight from Tex.SX:     % http://tex.stackexchange.com/questions/20754/tuning-numbered-citations-as-footnote          % Setup options     \ExecuteBibliographyOptions{%       citetracker=true,% Citation tracker enabled in order not to repeat citations, and have two lists.       sorting=none,% Don't sort, just print in the order of citation       alldates=long,% Long dates, so we can tweak them at will afterwards       dateabbrev=false,% Remove abbreviations in dates, for same reason as ``alldates=long''       articletitle=true,% To have article titles in full bibliography       maxcitenames=999% Number of names before replacing with et al. Here, everyone.     }          % No brackets around the number of each bibliography entry     \DeclareFieldFormat{labelnumberwidth}{#1\addperiod}          % Suppress article title, doi, url, etc. in citations     \AtEveryCitekey{%       \ifentrytype{article}         {\clearfield{title}}         {}%       \clearfield{doi}%       \clearfield{url}%       \clearlist{publisher}%       \clearlist{location}%       \clearfield{note}%     }          % Print year instead of date, when available; make use of urldate     \DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}     \renewbibmacro*{date}{% Based on date bib macro from chem-acs.bbx       \iffieldundef{year}         {\ifentrytype{online}            {\printtext[urldate]{\printurldate}}            {\printtext[date]{\printdate}}}         {\printfield[date]{year}}}          % Remove period from titles     \DeclareFieldFormat*{title}{#1}          % Embed doi and url in titles, when available     \renewbibmacro*{title}{% Based on title bib macro from biblatex.def       \ifboolexpr{ test {\iffieldundef{title}}                    and test {\iffieldundef{subtitle}} }         {}         {\ifboolexpr{ test {\ifhyperref}                       and not test {\iffieldundef{doi}} }            {\href{http://dx.doi.org/\thefield{doi}}               {\printtext[title]{%                  \printfield[titlecase]{title}%                  \setunit{\subtitlepunct}%                  \printfield[titlecase]{subtitle}}}}            {\ifboolexpr{ test {\ifhyperref}                          and not test {\iffieldundef{url}} }              {\href{\thefield{url}}                 {\printtext[title]{%                    \printfield[titlecase]{title}%                    \setunit{\subtitlepunct}%                    \printfield[titlecase]{subtitle}}}}              {\printtext[title]{%                 \printfield[titlecase]{title}%                 \setunit{\subtitlepunct}%                 \printfield[titlecase]{subtitle}}}}%          \newunit}%       \printfield{titleaddon}%       \clearfield{doi}%       \clearfield{url}%       \ifentrytype{article}% Delimit article and journal titles with a period         {\adddot}         {}}          %---------------------------------------------------------------     % Essentially verbatim from Joseph Wright     % http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/     % --> Create macro sfcite to have both citations in footnotes and at the end.     \makeatletter          % Create sfcite command     \DeclareCiteCommand{\sfcite}[\cbx@superscript]%       {\usebibmacro{cite:init}%        \let\multicitedelim=\supercitedelim        \iffieldundef{prenote}          {}          {\BibliographyWarning{Ignoring prenote argument}}%         \iffieldundef{postnote}          {}          {\BibliographyWarning{Ignoring postnote argument}}%       }       {\usebibmacro{citeindex}%        \usebibmacro{sfcite}%        \usebibmacro{cite:comp}}       {}       {\usebibmacro{cite:dump}}          % Add entry to bibliography     \newbibmacro*{sfcite}{%       \ifciteseen       {}       {\xappto\cbx@citehook{%        \noexpand\footnotetext[\thefield{labelnumber}]{%          \fullcite{\thefield{entrykey}}\addperiod}}}}          % Superscript     \newrobustcmd{\cbx@superscript}[1]{%       \mkbibsuperscript{#1}%       \cbx@citehook%       \global\let\cbx@citehook=\empty}     \let\cbx@citehook=\empty          \makeatother     %---------------------------------------------------------------          % To have footnotes going well with citations --> \vfootnote     \long\def\vfootnote#1{%       \begingroup%       \def\thefootnote{\roman{footnote}}\footnote{#1}%       \endgroup}          % Bibliography as a section rather than chapter     \defbibheading{bibliography}[\bibname]{%       \section{#1}%     %  \markboth{#1}{#1}%     }          \begin{filecontents}{\jobname.bib}     @article{ref1,         hyphenation = {american},         title = {Natural Products as Sources of New Drugs over the Last 25 Years},         author = {Newman, D.J. and Cragg, G.M.},         journal = {J. of Nat. Prod.},         volume = {70},         number = {3},         pages = {461--477},         year = {2007}}     @article{ref2,         hyphenation = {american},         title = {Natural products as leads to potential drugs: an old process or the new hope for drug discovery?},         author = {Newman, D.J.},         journal = {J. of Med. Chem.},         volume = {51},         number = {9},         pages = {2589--2599},         year = {2008}}     @online{ref3,         author = {Quintin, C.},         title = {Les eponges},         url = {http://christophe.quintin.pagesperso-orange.fr/Liste_Doc.html},         urldate = {2009-05-03}     }     \end{filecontents}          \addbibresource{\jobname.bib}               \begin{document}          Test Test test          First citation.\sfcite{ref1,ref2} Some text\vfootnote{A footnote}.               \pagebreak     Second citation\sfcite{ref1}, second citation\sfcite{ref2}, first citation.\sfcite{ref3}     \printbibliography               \end{document}


title: Page break in incorrect position in resume

text: The pagebreak in this resume is in the wrong spot. I would like latex to automatically put a page break in the right spot. EDIT I would like items to be cut off by a page break and continued on the next page. My problem is that what happens right now is that if a page break is in the middle of a section, the items that fit on the page are shown, and the items that do not are not displayed at all. The next page starts with the next section. That is my problem. I don't want to manually tell latex where to put a page break because my resume with change with time, I have many different versions, and I don't want to specify it every time. The document is attached.               \documentclass{article}     %\usepackage{fullpage}     %\usepackage{amsmath}     %\usepackage{amssymb}     \usepackage{multicol}     \usepackage{comment}     \usepackage{color}     \usepackage{enumerate}     %\usepackage{python}               \ifx\UseOption\undefined     \def\UseOption{optb}     \fi               \textheight=10in     \pagestyle{empty}     %\raggedbottom     \raggedright               %  \renewcommand{\encodingdefault}{cg}       %\renewcommand{\rmdefault}{lgrcmr}               \def\bull{\vrule height 0.8ex width .7ex depth -.1ex }     % DEFINITIONS FOR RESUME               \newcommand{\area}[2]{\vspace*{-9pt} \begin{verse}\textbf{#1}   #2 \end{verse}  }               \newcommand{\lineunder}{\vspace*{-8pt} \\ \hspace*{-18pt} \hrulefill \\}               \newcommand{\header}[1]{{\hspace*{-15pt}\vspace*{6pt} \textsc{#1}} \vspace*{-6pt} \lineunder}               \newcommand{\employer}[3]{{ \textbf{#1} (#2)\\ \underline{\textbf{\emph{#3}}}\\  }}               \newcommand{\contact}[3]{     \vspace*{-8pt}     \begin{center}     {\LARGE \scshape {#1}}     \lineunder     #2 \\     #3     \end{center}     \vspace*{-8pt}     }     \newenvironment{achievements}{\begin{list}{$\bullet$}{\topsep 0pt \itemsep -2pt}}{\vspace*{4pt}\end{list}}     \newcommand{\schoolwithcourses}[4]{      \textbf{#1} #2 $\bullet$ #3\\      %#4 $\bullet$  Selected Coursework:\\     \vspace*{5pt}     }     \newcommand{\school}[4]{      \textbf{#1} #2 $\bullet$ #3\\     #4 \\     }     % END RESUME DEFINITIONS               \begin{document}     \small     \smallskip     \vspace*{-44pt}               \contact{Awesome person}     {Awesome home}      {Awesome phone number $\bullet$ Awesome email}        % $\bullet$ Awesome website}               \header{Education}                \textbf{Masters of Awesome}  \hfill 2011\\     Awesome University \\     \hspace*{-5pt}     \\      \textbf{Honours Awsomeness} \hfill 2006\\     Awesome University     \hspace*{-5pt}     \\                         \header{Honors and Awards}     \begin{achievements}          \item  Major Awesomeness, 2007-2009     \item  Total Awesomenewss, 2002     \item  The Awesome Award          \end{achievements}          \header{Skills}               \renewcommand{\labelitemi}{$\vcenter{\hbox{\tiny$\bullet$}}$}          \begin{verse}      \textbf{Awesome Skills}      \begin{multicols}{2}        \begin{itemize}        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome        \item Awesome       \end{itemize}         \end{multicols}      \end{verse}      \renewcommand{\labelitemi}{$\vcenter{\hbox{$\bullet$}}$}               \header{Job Experience}          \employer{Awesome Centre}{2008-2011}{Awesome analyst}     Dr. Awesome, Awesome Centre       \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.        \item Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.        \item Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.        \item Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum       \end{itemize}               \employer{Awesome Centre}{2008-2011}{Awesome analyst}     Dr. Awesome, Awesome Centre       \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.        \item Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.        \item Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.        \item Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum       \end{itemize}               \employer{Awesome Centre}{2008-2011}{Awesome analyst}     Dr. Awesome, Awesome Centre       \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.        \item Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.        \item Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.        \item Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum       \end{itemize}               \employer{Awesome Centre}{2008-2011}{Awesome analyst}     Dr. Awesome, Awesome Centre       \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.        \item Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.        \item Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.        \item Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum       \end{itemize}               \employer{Awesome Centre}{2008-2011}{Awesome analyst}     Dr. Awesome, Awesome Centre       \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.        \item Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.        \item Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.        \item Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum       \end{itemize}               \employer{Awesome Centre}{2008-2011}{Awesome analyst}     Dr. Awesome, Awesome Centre       \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.        \item Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.        \item Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.        \item Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum       \end{itemize}               \employer{Awesome Centre}{2008-2011}{Awesome analyst}     Dr. Awesome, Awesome Centre       \begin{itemize}         \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.        \item Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.        \item Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.        \item Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum       \end{itemize}               \end{document}


title: Using LuaTeX as a replacement for pdfTeX

text: In this question Differences between LuaTeX, ConTeXt and XeTeX various differences between LuaTeX and XeTeX (and ConTeXt) are discussed. And in this question Using XeLaTeX instead of pdfLaTeX a recipe for switching from pdfLaTeX to XeLaTeX is given. In this question, I would like a similar recipe for using LuaLaTeX. I'm particularly interested in the degree to which LuaTeX can be used as a drop-in replacement for pdfTeX. I'm _not_ interested in things that LuaTeX can do that pdfTeX can't. So the question is: What do I _need_ to do to use LuaLaTeX instead of pdfLaTeX to compile existing or new documents? Some specific sub-questions:   1. What packages are compatible with pdfLaTeX but _not_ with LuaLaTeX?   2. Are there any packages specific to LuaLaTeX that should be loaded in most LuaLateX documents?


title: extending \widetilde in formula

text: I have the following code:               \widetilde{\text{trunc}(\Delta_\mathbf{tot}(X))}      and the output in codecogs is ![enter image description here](http://i.stack.imgur.com/tGuSh.gif) How Can I do to extend \widetilde? How Can I do to have the following formula: ![enter image description here](http://i.stack.imgur.com/XFXwm.jpg)


title: Problems When Escaping from Listings

text: I would like to use LaTeX to document my C++ code, since I am able to typeset mathematics easily, as well as create diagrams using TikZ. I made a minimal LaTeX template for testing, but I have already encountered some problems that I would like to fix:   * Spaces are not generated at the end of each line of text in the escaped LaTeX code (if you look at the rendered output below, you should see some words stuck together).   * I would like environments in the escaped LaTeX code to stay within the shaded boundary, with line numbers to the left of each line (as it is with the rest of the code). In particular, I want to enforce a 1:1 correspondence between the number of a line of source code and its rendered output in the PDF. Can you please suggest a fix for these problems? Ideally, I would also like to be able to include TikZ pictures in the documentation, so that the diagram takes up exactly as many lines of code as the length of the escaped LaTeX code that I use to create it. But if this is too difficult to achieve, then I'm fine without it. Thank you very much for your time! **The Rendered Output** ![enter image description here](http://i.stack.imgur.com/sYrxX.png) **The LaTeX Code**               \documentclass[11pt, a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[top=0.4in,bottom=0in,left=0.7in,right=0.7in]{geometry}     \usepackage{listings}     \usepackage{mdframed}     \usepackage[usenames,dvipsnames]{xcolor}     \pagestyle{empty}          \lstset{         language=C++,         basicstyle=\sffamily,         commentstyle=\color{white!40!black},         escapechar=`,         escapebegin=\color{white!40!black},         escapeend={},         keywordstyle=\bfseries\color{Periwinkle},         numbers=left,         numberstyle=\sffamily\tiny\color{gray},         showstringspaces=false     }     \begin{document}     \begin{mdframed}[backgroundcolor=yellow!20,linewidth=0pt,         innertopmargin=0pt,innerbottommargin=0pt]     {\footnotesize     \lstinputlisting{test.hpp}     }     \end{mdframed}     \end{document}      **The Sample C++ Header**               /*     ** File Name:   test.hpp     ** Date:    04/25/2012     */          #ifndef TEST_HPP_INCLUDED__     #define TEST_HPP_INCLUDED__          /*     ** Template Parameters:     **     `\begin{enumerate}     \item[Schedule] A forward iterator that traverses the edge ordering that     ought to be used for each iteration.     \item[EdgeToFactorMap] A map of edges to factors. We can always transform a     graph such that the node potentials are subsumed into the edge potentials, so     this constraint does not result in a loss of generality.     \item[MessageFunc] A function used to compute the message     $\delta_{i \rightarrow j}$. It should accept as parameters the following:     \begin{itemize}          \item A const reference to a factor along $E_{ij}$.          \item A reference to the target factor to be written to.          \item The starting and ending iterators to a container of factors          representing the messages received by the sending clique, $C_{i}$.          \item The starting and ending iterators to a container of factors          representing the messages received by the receiving clique, $C_{j}$.     \end{itemize}     \item[Allocator] The allocator that ought to be used to obtain temporary     memory for the algorithm.     \end{enumerate}`     **     */     template <         class Schedule,         class EdgeToFactorMap,         class MessageFunc,         class Allocator     >          #endif


title: (labelyearlabelmonthlabelday) in biblatex-apa bibliography

text: I'm having trouble using `biblatex-apa` to create a bibliography. When I run my project through `latexmk`, I get a reference section that looks like this: > Chan, K., Van Zwieten, L., Meszaros, I., Downie, A., & Joseph, S. > (labelyearlabelmonth- labelday). Agronomic values of greenwaste biochar as a > soil amendment. Soil Research, 45(8), 629–634. > > Rondon, M. A., Lehmann, J., Ram ́ırez, J., & Hurtado, M. > (labelyearlabelmonthlabelday). Biological nitrogen fixation by common beans > (phaseolus vulgaris l.) increases with bio-char additions. Biology and > Fertility of Soils, 43 (6), 699–708. I took a look at this answer to a similar problem, but none of the suggestions worked for me. My bibliography file entries look like this:               @article{rondon2007biological,         Author = {Rondon, Marco A and Lehmann, Johannes and Ram{\'\i}rez, Juan and Hurtado, Maria},         Date-Added = {2014-01-05 23:51:41 +0000},         Date-Modified = {2014-01-05 23:51:41 +0000},         Journal = {Biology and Fertility of Soils},         Number = {6},         Pages = {699--708},         Publisher = {Springer},         Title = {Biological nitrogen fixation by common beans (Phaseolus vulgaris L.) increases with bio-char additions},         Volume = {43},         Year = {2007},         }          @article{chan2008agronomic,         Author = {Chan, KY and Van Zwieten, L and Meszaros, I and Downie, A and Joseph, S},         Journal = {Soil Research},         Number = {8},         Pages = {629--634},         Publisher = {CSIRO},         Title = {Agronomic values of greenwaste biochar as a soil amendment},         Volume = {45},         Year = {2008},     }      My .tex file looks like this (with most of the content removed for conciseness):               \documentclass[12pt,a4paper]{article}     \usepackage{fullpage,graphicx, url}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[backend=biber,style=apa]{biblatex}     \usepackage[version=3]{mhchem}     \DeclareLanguageMapping{british}{british-apa}     \addbibresource{biochar.bib}     \date{}     \begin{document}         \parencite{chan2008agronomic}.         \parencite{rondon2007biological}         \printbibliography      \end{document}      Any help with this problem would be greatly appreciated. I'm pretty new to bib latex, so I'll admit that I could very well be doing something extremely stupid. I'm using TeXLive 2013 on Mac OS X Mavericks, if that makes any difference.


title: Ignore stretch/shrink when using vspace

text: Please forgive me. I am quite the novice when it comes to LaTeX. I've been learning "on the fly" by downloading documents from the web and referring to sites like these to answer my questions. I'm at a total loss here. In general, my question is how I can disable or otherwise override stretch/shrink on a page. I've tried `\raggedbottom`. thinking that it would leave white space at the bottom of a given page and keep all default text spacing. No such luck. So, then I tried using `\vspace`, thinking surely it would keep it's assigned size. `10pt` would always be `10pt`, right? No such luck. On this site, I read about how vertical shrink/stretch works, but I don't know how or where to "turn it off." A very simple example:               \begin codeblock        code (multi-colored)     \end codeblock          Paragraph text.....      `codeblock` is a custom environment and `code` is the actual code. The words in the `code` are colored based on there function. When I look at the `codeblock` environment, I see no references to stretch or shrink. The problem I'm having is that I always want the same distance after the end of `codeblock` and the start of the next paragraph (currently using `\vspace` to do this), but currently this keeps changing. I'm having the same trouble with the `tabular` environment. I don't care if the rest of the page shrinks or stretches a small bit (although I want to continue to use `raggedbottom`), but I want the space after a table or code block to be uniform. Any suggestions??? Much appreciated.


title: Stretching colorbox to the end of line

text: I was just making my resume and I wanted to highlight the different sections. I used the color package. This is the code:               \usepackage{color}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}               \colorbox{Cyan}{\underline{\textbf{Objective}}}          To work in areas like Embedded systems, Hardware Design in an established firm and to apply the knowledge for personal and professional benefit\\      What I get is something like this: ![enter image description here](http://i.stack.imgur.com/knwtI.jpg) What I want is this: ![enter image description here](http://i.stack.imgur.com/nMdQC.jpg) Any ideas?


title: How to create rectangles like in this example?

text: I want to draw rectangles like the exmaple below in my tex file. I am trying to illustrate the path counting problem on a rectangular mesh. ![enter image description here](http://i.stack.imgur.com/T7g8D.png)


title: Tikz picture is not shown in the paper

text: I have a tikz-picture. It is a graph. I have created a presentation and it is seen in the presentation correct. Thereby, the code is correct. But now I am making a degree work and I have               \documentclass{report}       But the picture is not shown. Here is the code:               \begin{tikzpicture}         \tikzset{VertexStyleOrange/.style = {                      shape         = circle,                                      ball color     = orange,                                      inner sep      = 1pt,                                      outer sep      = 0pt,                                      minimum size   = 1 pt}}         \tikzset{VertexStyleBlue/.style = {                      shape          = circle,                                      ball color     = blue,                                      inner sep      = 1pt,                                      outer sep      = 0pt,                                      minimum size   = 1 pt}}         \tikzset{EdgeStyleBlue/.style   = {thick,                                      double  = blue,                                      double distance = 1pt}}      \tikzset{EdgeStyle/.style   = {thick,                                      double  = orange,                                      double distance = 1pt}}          \node at ( -3.5,3)[VertexStyleOrange](0) {0};                                     \node at ( -5,1)[VertexStyleBlue](1) {1};     \node at ( -2,1)[VertexStyleBlue](2) {2};     \node at ( -2,-1)[VertexStyleBlue](3) {3};     \node at ( -5,-1)[VertexStyleBlue](4) {4};     \node at ( -3.5,-3)[VertexStyleOrange](5) {5};     \node at ( 3.5,3)[VertexStyleOrange](6) {0};                                     \node at ( 5,1)[VertexStyleBlue](7) {1};     \node at ( 2,1)[VertexStyleBlue](8) {2};     \node at ( 2,-1)[VertexStyleBlue](9) {3};     \node at ( 5,-1)[VertexStyleBlue](10) {4};     \node at ( 3.5,-3)[VertexStyleOrange](11) {5};          \draw[EdgeStyle](1) to node{}(0);     \draw[EdgeStyle](2) to node{}(0);     \draw[EdgeStyleBlue](1) to node{}(2);     \draw[EdgeStyleBlue](2) to node{}(3);     \draw[EdgeStyleBlue](3) to node{}(4);     \draw[EdgeStyleBlue](4) to node{}(1);     \draw[EdgeStyleBlue](1) to node{}(3);     \draw[EdgeStyleBlue](4) to node{}(2);     \draw[EdgeStyle](5) to node{}(3);     \draw[EdgeStyle](4) to node{}(5);          \draw[EdgeStyle](11) to node{}(7);     \draw[EdgeStyle](11) to node{}(8);     \draw[EdgeStyle](6) to node{}(10);     \draw[EdgeStyle](6) to node{}(9);          \end{tikzpicture}      Instead of it I see a little black point. I pasted it in all places of document, but the result was the same - a little black stain. What is the reason? Here is the example:               \documentclass[a4paper,14pt]{report}     \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amssymb,amsfonts,amsmath,mathtext,cite,enumerate,float}     \usepackage[dvips]{graphicx}     \usepackage[14pt]{extsizes}     \usepackage{times}     \usepackage{hyperref}     \usepackage{tikz}     \usepackage[labelsep=period]{caption}     \usepackage{indentfirst}      \usepackage{makecell}      \DeclareCaptionLabelSeparator{par}{\par}     \captionsetup{labelsep=par,justification=centering}     \graphicspath{{images/}}               \newcommand\tablecaption[1]{     \captionsetup{labelsep=par,justification=centering}     \caption{#1}     }          \renewcommand{\baselinestretch}{1.5}\normalsize     \makeatletter     \renewcommand{\@biblabel}[1]{#1.}     \makeatother               \usepackage{geometry}     \geometry{left=3cm}     \geometry{right=1cm}     \geometry{top=2cm}     \geometry{bottom=2cm}          \setcounter{tocdepth}{2}     \setlength{\parindent}{1.5cm}          \renewcommand{\theenumi}{\arabic{enumi}}     \renewcommand{\labelenumi}{\arabic{enumi}}     \renewcommand{\theenumii}{.\arabic{enumii}}     \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}     \renewcommand{\theenumiii}{.\arabic{enumiii}}     \renewcommand{\labelenumiii}{\arabic{enumi}.\arabic{enumii}.\arabic{enumiii}.}     \renewcommand{\rmdefault}{ftm}          \begin{document}     \renewcommand\contentsname{Table of Contents}     \renewcommand\chaptername{Chapter}     \tableofcontents     \input{Introduction}     \end{document}      There is another code in "introduction":               \chapter{Introduction}     I want to tell you about smth...          \begin{center}     \begin{tikzpicture}         \tikzset{VertexStyleOrange/.style = {                      shape         = circle,                                      ball color     = orange,                                      inner sep      = 1pt,                                      outer sep      = 0pt,                                      minimum size   = 1 pt}}         \tikzset{VertexStyleBlue/.style = {                      shape          = circle,                                      ball color     = blue,                                      inner sep      = 1pt,                                      outer sep      = 0pt,                                      minimum size   = 1 pt}}         \tikzset{EdgeStyleBlue/.style   = {thick,                                      double  = blue,                                      double distance = 1pt}}      \tikzset{EdgeStyle/.style   = {thick,                                      double  = orange,                                      double distance = 1pt}}          \node at ( -3.5,3)[VertexStyleOrange](0) {0};                                     \node at ( -5,1)[VertexStyleBlue](1) {1};     \node at ( -2,1)[VertexStyleBlue](2) {2};     \node at ( -2,-1)[VertexStyleBlue](3) {3};     \node at ( -5,-1)[VertexStyleBlue](4) {4};     \node at ( -3.5,-3)[VertexStyleOrange](5) {5};     \node at ( 3.5,3)[VertexStyleOrange](6) {0};                                     \node at ( 5,1)[VertexStyleBlue](7) {1};     \node at ( 2,1)[VertexStyleBlue](8) {2};     \node at ( 2,-1)[VertexStyleBlue](9) {3};     \node at ( 5,-1)[VertexStyleBlue](10) {4};     \node at ( 3.5,-3)[VertexStyleOrange](11) {5};          \draw[EdgeStyle](1) to node{}(0);     \draw[EdgeStyle](2) to node{}(0);     \draw[EdgeStyleBlue](1) to node{}(2);     \draw[EdgeStyleBlue](2) to node{}(3);     \draw[EdgeStyleBlue](3) to node{}(4);     \draw[EdgeStyleBlue](4) to node{}(1);     \draw[EdgeStyleBlue](1) to node{}(3);     \draw[EdgeStyleBlue](4) to node{}(2);     \draw[EdgeStyle](5) to node{}(3);     \draw[EdgeStyle](4) to node{}(5);          \draw[EdgeStyle](11) to node{}(7);     \draw[EdgeStyle](11) to node{}(8);     \draw[EdgeStyle](6) to node{}(10);     \draw[EdgeStyle](6) to node{}(9);          \end{tikzpicture}     \end{center}      Even after deleting \begin{center} the picture is not shown


title: How to set two or more paragraphs to use the same amount of vertical space?

text: Given several paragraphs in ConTeXt or plain TeX, how can I ensure that all paragraphs use the same amount of vertical space, by adding white space to the end, as the longest paragraph in the set? E.g.:                   This is a paragraph     with only two lines.         This paragraph is a     little bit longer and it     has three lines.         This is the longest     paragraph, as it has     a second, third, and     fourth line.      The above paragraphs would get added white space afterward, such that they all occupy the same amount of vertical space as the last paragraph, because it is longest, e.g.:                   This is a paragraph     with only two lines.                   This paragraph is a     little bit longer and it     has three lines.              This is the longest     paragraph, as it has     a second, third, and     fourth line.


title: Draw rounded cube

text: How can I draw a rounded cube using Asymptote, Metapost or anything that produces high quality graphics? A rounded cube is for example the boundary of the minkovski sum C+S where C=[-1,1]^3 and S is the unit sphere. It is possible using Asymptote, but I have to parametrize and plot about 26 surfaces to do that (which I will if I have to). I was wondering if there is a simpler way. And I will like to be able to say where the center of this rounded cube is and if possible to be able to plot things like aC+rS where a,c are positive reals, i.e. to modify the radius of the sphere and of the cube. Maybe that's too much to ask... This is really the downfall of the first approach, i.e. plotting all the needed parametrized surfaces in Asymptote: that I have to do the same thing twice if I want to plot two such cubes with different parameters a,r.


title: MiKTeX / TeXnicCenter / Adobe Reader: No pdf produced

text: I know this post may be related to others on MiKTeX and TeXnicCenter, I read most of those. Yet, my problem is still unsolved. Any help would be awesome! I used to work on TeXnicCenter on another computer so some files I had are correct and pdf were accessible at that time; yet I cannot access them opening the `.tex` on my new system. I already went through some options to solve this issue.   * for MiKTeX "install packages on the fly", I have chosen "ask me first"; and change the package repository in Maintenance (admin) for MiKTeX .   * I followed all steps in configuring the output profiles in TeXnicCenter (see this link http://www.statslab.cam.ac.uk/~eva/texniccenter.html), and my path directory to adobe is: `C:\Program Files (x86)\Adobe\Reader 8.0\Reader\AcroRd32.exe` (I didn't take Adobe reader X since some web sites don't recommend it) the path directory for pdf is: `C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe` (notice that I have x64, could that be a problem?)   * I tried to open a very simple draft on MiKTeX (TeXworks) and it all the `aux`, `log`, and the `pdf` were produced.   * yet, I opened this same file (erasing the `aux`, `log`, `out` in my folder) with TeXnicCenter, no out/pdf files are produced.   * each time, I procede to build the pdf, the adobe window opens but stays empty. No `.out`, `.aux` files are produced, only the `.txt`. Error message: `there was an error opening this document. The file cannot be found`.


title: Debug an error due to new column type definition

text: > **Possible Duplicate:**   >  MiKTeX / TeXnicCenter / Adobe Reader: No pdf produced I introduced new column types as following               \newcolumntype{C}{>{\centering\arraybackslash} m{3cm} }     \newcolumntype{n}{>{\centering\arraybackslash} m{4.2cm} }      so that it allows me to vertically and horizontally align text in a table with graphics included. I use these packages for tables:               \usepackage{booktabs}     \usepackage{array}     \usepackage{tabularx}      and I use the latest version of TeXnicCenter editor. And I wrote the following table:               \begin{table}[here]     \begin{center}     \begin{tabular}[here]{C n n}          \toprule     state & image & parameters \\     \midrule     abc & \includegraphics[width=0.3\textwidth]{1.pdf} & 123 \\\midrule     cdf  & \includegraphics[width=0.3\textwidth]{2.pdf}  &  345 \\\midrule     fgh & \includegraphics[width=0.3\textwidth]{3.pdf}  &  567 \\\midrule     hij & \includegraphics[width=0.3\textwidth]{4.pdf}  &  789 \\\buttomrule     \end{tabular}     \end{center}     \end{table}      I liked the table I got, it is just what I need but I have some errors due to that! First I was unable to compile the pdf file directly! I should first close the pdf and then compile and then open it. How can I debug such an error??


title: Algorithms in mdframed

text: Now that I converted all my theorems to `mdframed`, I'd like a consistent layout for my algorithms as well? What ways are there to typeset pseudocode algorithms in `mdframed`? So far I've been using `algorithm.sty` from the `algorithms` bundle, together with `algpseudocode.sty` from the `algorithmicx`. But since that looks completely different, and has problems with `cleveref` as well, I'm looking for alternatives. `algorithm2e` on its own looks nice enough, but since that comes with its own float environment, I get an error `Not in outer par mode` when I try to plug that into an `mdframed` theorem environment. algorithmicx does not insist on outer par mode, but so far I haven't managed to get that working directly inside a frame either. For some reason, I get a lot of error messages I didn't get before, like label names having an extra `}`, or like `destination with the same identifier (name{ALG@line.2}) has been already used, duplicate ignored`. In an ideal world, a suitable solution would offer   * References for the whole algorithm as well as individual lines   * Flexible line numbering   * Flexible syntax formatting   * Allow page breaks withing algorithms   * Other bells and whistles to make things look nice


title: How to use several angle values in tikz l-system?

text: I need help on Tikz `lindenmayersystem` library. In this topic, JLDiaz presented a solution to draw segments of several lengths thanks to the command:               \symbol{S}{\pgflsystemstep=0.6\pgflsystemstep}      Is there a way to do the same thing with angles? I would like to use + or - 60 degree rotation and + or - 85 degree rotation to draw my figure. I've tried:               \documentclass[tikz]{standalone}     \usepackage{tikz}          \usetikzlibrary{lindenmayersystems}          \begin{document}          \begin{tikzpicture}     \pgfdeclarelindenmayersystem{mySystem}{         \symbol{a}{\pgflsystemleftangle = 60}         \symbol{b}{\pgflsystemrightangle = 60}       \rule{X -> FaF+F-F-F+FbF}     }          \draw  [l-system={mySystem, step=10pt, angle=85, axiom=X, order=1}]       lindenmayer system ;     \end{tikzpicture}          \end{document}      without any success: "a" and "b" symbol are ignored. Could you help me on this? Thank you!


title: How can I recreate this two tables in LaTeX?

text: In this case, the real text is irrelevant; the format and layout is what I'm interesed in. All my tries with it have seen deceptive. I'm impatient to study your ideas!. Thanks in advance. ![Table 1, without colored background](http://i.stack.imgur.com/SN3CL.png) ![Table 2, with alternate rows colored background](http://i.stack.imgur.com/hkRc5.png)


title: Background fill for H (high) timing character, and diagram size for tikz-timing

text: I would like to add a filled background to the `H` timing character, which otherwise does not have one (it is just a line). I don't want to use the `D` or `U` characters which do have a background fill, because they also add lines at both top and bottom - I would like a line only on top. This is how far I got with the MWE below: ![test1.png](http://i.stack.imgur.com/TjJVR.png) In the metachar `Y`, I'm trying to add a `H`, then a background node (but `\timing` doesn't define a `background` layer), then use `B` (back) character to re-draw a `H` on "top" again, but that doesn't work - as it can be seen, the fills are still in front, and are not quite aligned with the transition lines. How could I get an equivalent to a properly "filled" `H` character? An additional question is - how could I get the `\timing` diagram as a "fitting node" (with width and height), so I could align it center in the master node? `anchor=center` doesn't make any difference (probably because either the named node `tgraph1` doesn't have a size, or it just refers to the start of the diagram) The MWE:               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{fit}     \usepackage{tikz-timing}          % "The modifiers ‘@’ and ‘$’ allow the user to include macros."     \tikztimingmetachar{Y}{H@{\begin{pgfonlayer}{background}}N[rectangle,fill=gray,anchor=north east,minimum width=\xunit,minimum height=\yunit,draw=none,on background layer]{}@{\end{pgfonlayer}}BH}     % \tikzset{timing/u/.style={draw=none}} \tikztimingmetachar{Y}{U{}BH} % doesn't look good     % \tikzset{timing/h/.style={draw=red}} % nope          % %http://tex.stackexchange.com/questions/47704/how-to-establish-node-anchor-like-points-on-a-tikz-rectangle-path     \makeatletter     \tikzset{ %       fitting node/.style={         inner sep=0pt,         fill=none,         draw=none,         reset transform,         fit={(\pgf@pathminx,\pgf@pathminy) (\pgf@pathmaxx,\pgf@pathmaxy)}       },       reset transform/.code={\pgftransformreset},     }     \makeatother               \begin{document}          \begin{tikzpicture}          \node[draw,minimum width=5cm,minimum height=2.5cm] (master) at (0,0) {};          \timing[very thick,       name=tgraph1,       fill=black,       %timing/h/.style={fill=black},%{,cycle},       %fitting node, % crashes w/ "! Dimension too large."       anchor=center,       timing/yunit=1cm,     ]         at (master.center)       { LLL YYL HHH HHL };          \end{tikzpicture}          \end{document}


title: Draw A Double Arrow

text: My Latex code is below:               \documentclass{article}     \usepackage{geometry}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}     \begin{document}     \begin{tikzpicture}     \draw (0,0)--(0,4);     \draw (0.5,0)--(0.5,4);     \draw(-0.5,1.5)--(0.25,2);     \draw(0.25,2)--(1,1.5);     \draw(1.5,1.6)--(2.5,1.6);     \draw(1.5,1.9)--(2.5,1.9);     \end{tikzpicture}     \end{document}      It works well. The result is like that: ![propagator](http://i.stack.imgur.com/NIv5E.jpg) How can I draw this picture using double arrow? Thank you.


title: Packages in TOC in WinEdt

text: How can I change the tree setting to show packages used in the tex file? I am using this but it doesn't work very well:                 END="\usepackage[?]"     ITEM="\usepackage[?]"     // Disabled: Change Mode from ? to TeX to enable this item     MODE_FILTER="TeX"     CASE_SENSITIVE=1     BEGINNING_OF_LINE_ONLY=1     CURRENT_DOCUMENT_ONLY=1     ALL_OPENED_DOCUMENTS=0     COMPLETE_PROJECT_TREE=1     ICON="Figure"     LEVEL=96     CAPTION="%[!|Exe('%b\Macros\Gather\FigTab.edt');|];%$('FigTabGather');"     MAX_LINE_SPAN=99     ON_CTRL_CLICK_MACRO="GlobalMark;TreeTrack(2);"     ON_CLICK_MACRO="TreeTrack(2,1);"     ON_DBL_CLICK_MACRO="TreeTrack(2,2);"     ACTION="Find"       IMAGE="Find"       MACRO="TreeTrack(2);"     SUBSTITUTION="\label{*}"       SUB_FIND="\\label\{*\}"       SUB_REPLACE=""       SUB_REG_EX=1       SUB_CASE_SENSITIVE=1     SUBSTITUTION="  "       SUB_FIND=" +{ }"       SUB_REPLACE=" "       SUB_REG_EX=1       SUB_CASE_SENSITIVE=1     SUBSTITUTION="\dots"       SUB_FIND="\dots"       SUB_REPLACE="..."       SUB_REG_EX=0       SUB_CASE_SENSITIVE=1     SUBSTITUTION="\ldots"       SUB_FIND="\ldots"       SUB_REPLACE="..."       SUB_REG_EX=0       SUB_CASE_SENSITIVE=1      END="\usepackage[?]"


title: Which measurement units to use to shift labels in TikZ/PGFplot graphs

text: I often end up shifting labels on my TikZ/PGFplot graphs using, for example, `xshift=1.0em`, or `yshift=1.0ex`. Are these the correct units to be using to to the shifting? I don't think I should use absolute units as those won't adjust if the font sizes change similar to this question on Which measurement units should one use in LaTeX?. Wondering if there special considerations that I should keep in mind since this is not related to ordinary text?


title: fancyvrb, helvetica and underscore... is it just me?

text: Ran into some weirdness with `fancyvrb`, `helvetica` and `_`. Here's a MWE (for me):               \documentclass{article}     \usepackage{fancyvrb}          \begin{document}          \begin{Verbatim}[fontfamily=helvetica]     Oh no! It's a `_'. `\_' not much better.     \end{Verbatim}          \end{document}      Without any warnings or apologies, it produces ![](http://i.imgur.com/0eacE.png) ...i.e., missing a couple of underscores. Strange thing is, it works fine for `fontfamily=courier`. Anyone come across anything like this before? I'm not commited to `fancyvrb` so if a work-around is awkward, would happily take suggestions for another helvetica/sans-serif verbatim environment which would handle underscores.


title: Glyph alternates break hyphenation

text: Alan Munn explined in Use stylistic set variations only for certain glyphs how to enable glyph alternates for a certain subset of glyphs. I'm using the second method he described (the other method isn't viable for me) and it seems to break automatic hyphenation. Consider this example:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Linux Libertine O}     \usepackage[paperwidth =   6 em,right=   1 em,left=    1 em,]{geometry}     \begin{document}     A a h coherence      \end{document}      Here coherence is correctly hyphenated. ![correct](http://i.stack.imgur.com/nIE4n.jpg) Now the same with alernates switched on:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Linux Libertine O}     \usepackage[paperwidth =   6 em,right=   1 em,left=    1 em,]{geometry}     % Now the more complicated version:     \XeTeXinterchartokenstate=1 % enable character classes     \newXeTeXintercharclass\myalt % create a new class     \XeTeXcharclass `\h \myalt % add h to the class     % between any character of class 0 and \myalt add the alternate feature     \XeTeXinterchartoks 0 \myalt = {\begingroup\addfontfeature{Alternate=0}}     % between \myalt and any character end the group     \XeTeXinterchartoks  \myalt 0 = {\endgroup}     % between a word boundary and \myalt add the alternate feature     \XeTeXinterchartoks 255 \myalt = {\begingroup\addfontfeature{Alternate=0}}     % between \myalt and the word boundary end the group     \XeTeXinterchartoks  \myalt 255 = {\endgroup}     \begin{document}     A a h coherence      \end{document}      Now hyphenation is broken. ![broken](http://i.stack.imgur.com/1lgEX.jpg) Note that this is not an artifact of the specific example, I also tried it with a longer text. Is this a bug? EDIT: egreg explained that this is indeed not a bug. Is a workaround possible? One obvious possibility is to mark hyphenation points explicitly (e.g. co-herence), but that is unpractical in a longer document.


title: Appendix without sections ?

text: There is only one appendix chapter in my thesis, which Latex defaults as Appendix A. However, I need it to show up as only "Appendix" without A or 1. Can anyone please tell me how to achieve that. Thank you so much.


title: Can TeX post-process the PDF it produces?

text: This is a follow-up to Can LaTeX be persuaded to produce text output?. Having discovered that `pdftotext` is the way to go, I'm curious as to whether it is possible to have TeX invoke that command on the PDF after the PDF has been finished (presumably via some `write18` hackery). So this is close to Is it possible to compile a *TeX document with a single command? except that I simply want to run the equivalent of               pdflatex doc.tex; pdftotext doc.pdf      but wholly from within TeX. So it's sort of what I understand `xelatex` does with its producing the `dvi` first and then converting it to `pdf`. This is just idle curiosity, I fully realise that the shell command I gave above is almost certainly the easiest way of doing this, and that in explaining to others what to do (as I expect to have to do with this project) then the above will be simpler than "Run `pdflatex` with the `-enable-shell- escape` option.". To make this different from Taco's answer to Is it possible to compile a *TeX document with a single command?, I'd like to be able to hide this from the user in a style file.


title: Navigation (Bullets) very small in custom beamer outer theme

text: trying to customize our university theme, I got stuck with the size of the navigation bullets (mini frame style), which are displayed as if scaled to 50% and the same with it's text. Even though I can change the text size with               \setbeamerfont{headline}{size=\fontsize{9}{11}}      and the Sections/Subsections are displayed with a nice 9pt font, the bullets remain very small. I inserted the navigation with the following code:               \insertnavigation{\paperwidth}      to the header and use the helvet font - with no strange effect anywhere else though. Can anybody tell me, how to increase the size of the bullets? Do I have to set the scale factor somewhere?


title: Using a non-centralized structure for tex files - similar to \graphicspath

text: I have a fairly large document, that I have picked apart into different sections etc, each in their own file. To include graphics that are not in one central directory I use `\graphicspath` which works quite nicely. Is there a similar command I could use to include `tex` files from multiple directories without me explicitly naming them? The idea would be the following:               \graphicspath{{./Some/Directory/For/Figures1/},{./Some/Directory/For/Figures2/}}     \texpath{{./Some/Directory/For/Tex/Files1/},{./Some/Directory/For/Tex/Files2/}}      The I would like to call within the document:               \includegraphics{fig_from_Figures1}% this works     \includegraphics{fig_from_Figures2}          \input{doc_from_Files1}% this would be awesome     \input{doc_from_Files2}


title: Temporarily suppress two-column layout in Oxford Bioinformatics template

text: The Oxford Bioinformatics journal's template is one of my favorites and I use it for many of my school assignments. The template uses a two-column layout, but in an appendix at the end of the document I would like to include some source code. This of course looks horrible in the two-column layout, but I have been unable to suppress the two-column mode using `multicol` macros. Is there any way I can do this?


title: How can I raise an item symbol?

text: I don't like the appearance of standard `\textbullet`. It's too big. I decided to shrink it using `\footnotesize{}`. Unfortunately, the bullet is not at the center of a line (It's a little lower). How can it be raised? Is there a symbol other than `\textbullet` which represents a dot? `\cdot` is too small, btw.               \documentclass{article}     \usepackage{enumitem}     \setitemize{label=\footnotesize{\textbullet}}     \begin{document}      Items:     \begin{itemize}     \item Item 1     \item Item 2     \item Item 3     \end{itemize}     \end{document}


title: Vertical align in beamer frames in LyX

text: I am trying to vertically align content inside a _single_ beamer frame. On the manual I've found the `[t]` option to add to `\begin{frame}`. Question is, how do I add that option in LyX? I have tried with ERT in the frame title or using Short Title option without success. Also, I have tried using directly ERT to define the frame, something like:               ERT \begin{frame}[t]     ERT \frametitle{Foo Bar}          normal LyX content here          ERT \end{frame}      but no success again. How do I do something like that?


title: biblatex-apa: sentence case not working

text: Biblatex-Apa should automatically print titles in the reference list in sentence case, but for some reason it doesn't work (note the lowercase A after the colon):               \documentclass{article}          \usepackage[american]{babel}     \usepackage[utf8]{inputenc}          \usepackage[autostyle]{csquotes}     \usepackage[style=apa, backend=biber, natbib=true, firstinits=true, uniquename=init]{biblatex}      \DeclareLanguageMapping{american}{american-apa}          \begin{filecontents}{case.bib}          @ARTICLE{Saetre2010,       author = {Saetre, Peter and Lundmark, Per and Wang, August and Hansen, Thomas         and Rasmussen, Henrik B. and Djurovic, Srdjan and Melle, Ingrid and         Andreassen, Ole A. and Werge, Thomas and Agartz, Ingrid and Hall,         Hakan and Terenius, Lars and Jonsson, Erik G.},       title = {The Tryptophan Hydroxylase 1 ({TPH1}) Gene, Schizophrenia Susceptibility,         and Suicidal Behavior: A Multi-Centre Case-Control Study and Meta-Analysis},       journal = {American Journal of Medical Genetics, Part B: Neuropsychiatric Genetics},       year = {2010},       volume = {153B},       pages = {387--396},     }          \end{filecontents}     \addbibresource{case.bib}          \begin{document}          \nocite{*}          \printbibliography[]          \end{document}


title: How do I find out which font shapes and series are used in my document?

text: Is there a way to get a list of all encoding/family/series/shape combinations that are actually used in a document that you have the sources of? You know, like the `OT1/fvm/m/n` strings you get when a particular font is missing. This is important when you want to change to a commercial font and need to know what weights and variants you actually need to buy. Like: "Do I actually need the demi-bold small caps italics?" And since many font changes are not done by hand with `\emph`s and whatnot, things can easily get a little confusing in a longer document.


title: Beamer ToC: vertical spacing compressed when making ToC in columns environment

text: I am trying to adapt the Beamer table of content to my needs. I use the columns environment to change the lay-out of frames with a lot of white space. This works fine in most cases, but when I use it with the ToC, the vertical spacing is wrong, and the list is compressed. See the example below. Any ideas how to fix this? I could maybe use a hack like this post Beamer: Vertical alignment of multi-column ToC, but I'd prefer something more elegant. Just to be clear: I don't have a very long ToC in my real document, it's for aesthetic reasons only.               \documentclass{beamer}     %\setbeamertemplate{subsection in toc shaded}[default][20]          \begin{document}     \begin{frame}     %\begin{columns}     %\column{.25\textwidth}     %\column{.75\textwidth}     \tableofcontents[sectionstyle=show, subsectionstyle=show/shaded]     %\end{columns}     \end{frame}          \section{What I like}     \frame{         \begin{columns}[t]         \column{.25\textwidth}         \column{.75\textwidth}         \tableofcontents[sectionstyle=show, subsectionstyle=show/show/shaded]         \end{columns}     }          \subsection{I like chocolate}     \begin{frame}     \frametitle{I like chocolate}     \begin{columns}[t]     \column{.25\textwidth}     \column{.75\textwidth}     because it's nice and sweet     \end{columns}     \end{frame}     \subsection{I like football}     \begin{frame}     \frametitle{I like football}     because all my friends play it too     \end{frame}          \section{What I don't like}     \frame{         \begin{columns}[t]         \column{.25\textwidth}         \column{.75\textwidth}         \tableofcontents[sectionstyle=show, subsectionstyle=show/show/shaded]         \end{columns}     }     \subsection{I don't like being sad}     \begin{frame}     \frametitle{I don't like being sad}     because it makes me cry     \end{frame}     \subsection{I don't like fighting}     \begin{frame}     \frametitle{I don't like fighting}     because I always loose     \end{frame}               \end{document}


title: Elliptic Moebius map on sphere using Tikz

text: I'm trying to adapt this example from texample to produce a sphere with arrows indicating the effect of a elliptic Moebius map. In fact, I'm trying to redraw the spheres below, but for a while I'm working only with two of them. ![enter image description here](http://i.stack.imgur.com/BqUml.png) Using the file below I got this: ![enter image description here](http://i.stack.imgur.com/geFsC.png) But I don't know how to decrease the length of the arrow and how to move it to other circles. I tried to change the angles but no success. Helps are welcome. **Here is the code**               % Stereographic and cylindrical map projections     % Author: Tomasz M. Trzeciak     % Source: LaTeX-Community.org      %         <http://www.latex-community.org/viewtopic.php?f=4&t=2111>     \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,fadings,decorations.pathreplacing}     \usepackage{verbatim}          %% helper macros          \newcommand\pgfmathsinandcos[3]{%       \pgfmathsetmacro#1{sin(#3)}%       \pgfmathsetmacro#2{cos(#3)}%     }     \newcommand\LongitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % azimuth       \tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}     }     \newcommand\LatitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % latitude       \pgfmathsetmacro\yshift{\cosEl*\sint}       \tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %     }     \newcommand\DrawLongitudeCircle[2][1]{       \LongitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1,dashed}}        % angle of "visibility"       \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %       \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);       %\draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1);     }     \newcommand\DrawLatitudeCircle[2][1]{       \LatitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1,line width=.7pt}}       \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}       % angle of "visibility"       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}       \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);       %\draw[red,current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1);     }          %% document-wide tikz options and styles          \tikzset{%       >=latex, % option for nice arrows       inner sep=0pt,%       outer sep=2pt,%       mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=3pt,         fill=black,circle}%     }          \begin{document}          \begin{tikzpicture}[scale=1.4] % "THE GLOBE" showcase          \def\R{2.5} % sphere radius     \def\angEl{35} % elevation angle     \def\angAz{-105} % azimuth angle     \def\angPhi{-40} % longitude of point P     \def\angBeta{0} % latitude of point P     %     \filldraw[ball color=white] (0,0) circle (\R);     \foreach \t in {-80,-60,...,80} { \DrawLatitudeCircle[\R]{\t} }     \foreach \t in {-5,-35,...,-175} { \DrawLongitudeCircle[\R]{\t} }     %     \pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole     \coordinate[mark coordinate] (N) at (0,\H);     \draw (N)  node[inner sep=1pt,below=0pt] {$\infty$}; %+(0.3ex,0.6ex)     %     \LongitudePlane[xzplane]{\angEl}{\angAz}     \LongitudePlane[pzplane]{\angEl}{\angPhi}     \LatitudePlane[equator]{\angEl}{0}     \draw[red,equator,->,thick] (\angAz:\R) to[bend right=30] (\angPhi:\R);     \end{tikzpicture}          \end{document}


title: How can I set stretch of verbatim to be different than "global" setting?

text: In my file I need to use 1.5 line stretch. But, as for `verbatim` I need it to be 1.0. What should I add to preamble to achieve that?               \documentclass{article}     \usepackage[nodisplayskipstretch]{setspace} \setstretch{1.5}     \begin{document}      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam.     \begin{verbatim}     A = 5     B = 123     C = 123123     \end{verbatim}     Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam.     \end{document}


title: How to align a tabular cell right and centre?

text: I've vertically centered a column of headings as suggested in an answer to this post using `array` and `m{}`. How can I also right-align those headings? Here is a picture of my current table and the results: ![enter image description here](http://i.stack.imgur.com/1Dz83.png)               \documentclass[a4paper]{article}          \usepackage[demo]{graphicx}     \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{array}          \begin{document}          \begin{figure}\centering%         \def\tinySubWidth{2.5cm}         \begin{tabular}{m{2cm}m{\tinySubWidth}m{\tinySubWidth}m{\tinySubWidth}m{\tinySubWidth}}             &             \centering Column 1&             \centering Column 2&             \centering Column 3&             Column 4             \\             The first row heading%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}\\             The second row heading%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}\\             The third row heading%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}\\             The fourth row heading%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}%             &\includegraphics[width=\tinySubWidth]{path}\\         \end{tabular}         \caption{Bla}         \label{fig:res-axvel-latax}     \end{figure}          \end{document}


title: How do you pass unknown keys as options to a TikZ picture?

text: I try to write a command that accepts options, using pgfkeys. Unknown keys are collected in a style, that I try to use as global options for a tikzpicture environement. A minimal example would be:               \documentclass{article}     \usepackage{tikz}          \newif\ifsquare          \pgfqkeys{/test}{%      square/.is if=square,      square/.default=true,     % collect unknown keys in style 'remainingkeys':      .unknown/.code={%       \let\currname\pgfkeyscurrentname%       \let\currval\pgfkeyscurrentvalue%       \ifx#1\pgfkeysnovalue%        \pgfqkeys{/tikz}{remainingkeys/.append style={\currname}}%       \else%        \pgfqkeys{/tikz}{remainingkeys/.append style={\currname=\currval}}%       \fi%      }%     }          \newcommand\myfigure[1][]{     % initialize:      \pgfqkeys{/tikz}{remainingkeys/.style={}}      \pgfqkeys{/test}{square}     % set user keys:      \pgfqkeys{/test}{#1}      \begin{tikzpicture}[/tikz/remainingkeys]       \ifsquare        \fill (0,0)rectangle(1,1);       \else        \fill (0,0)rectangle(1.2,.8);       \fi      \end{tikzpicture}     }          \begin{document}           \myfigure[square,rotate=45]                % rotated 45 degs; ok      \myfigure[square,fill=red]                 % red; ok      \myfigure[square,rotate=45,fill=red]       % red, but doesn't rotate      \myfigure[square=false]                    % not square      \myfigure[square=false,fill=red,rotate=45] % not square, not red and rotated 90 degs!          \end{document}       The command \myfigure simply draws a square or rectangle, depending on the value of the 'square'-key. This key is handled correctly. All other options are handled by the .unknown/.code handler and collected into the style 'remainingkeys', which eventually is passed to \begin{tikzpicture}. The first call of \myfigure indeed draws a square, and rotates it, but the third call doesn't! Somehow not all unknown keys are stored in 'remainingkeys'. In the fifth call even the rotation angle isn't right. I tried a lot of things, but this is the best that I can come up with, at least without producing any TeX-errors. I'm doing something seriously wrong, but what? I'm dead in the water...


title: Is it possible to use \newsavebox with more accurate bounding box?

text: I have 2 cases here. First case, I want to set the paper size to the size of `$\displaystyle E=mc^2$` and second case it is set to the size of `\fbox{$\displaystyle E=mc^2$}`. Unfortunately, in both cases I got outputs that got cropped at the top and bottom. **Note:** The gray frame in the following screenshot is not a part of my drawing. Instead it is the background color of Adobe Reader X. ## Case 1: Without using `\fbox`               \documentclass[cmyk]{minimal}          \usepackage{pstricks}          \newsavebox\IBox     \savebox\IBox{$\displaystyle E=mc^2$}          \newdimen\mywidth     \newdimen\myheight     \mywidth=\wd\IBox     \myheight=\ht\IBox          \paperwidth=\mywidth     \paperheight=\myheight     \voffset=-1in     \hoffset=-1in     \topskip=0bp          \special{papersize=\the\mywidth,\the\myheight}          \parindent=0cm     \pagecolor{cyan}          \begin{document}     \begin{pspicture}(\mywidth,\myheight)     \psframe[linecolor=red](\mywidth,\myheight)     \rput[lb](0,0){\usebox{\IBox}}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/nr7Eu.png) **Note:** The top and bottom parts get cropped. ## Case 2: Using `\fbox`               \documentclass[cmyk]{minimal}          \usepackage{pstricks}          \newsavebox\IBox     \savebox\IBox{\fbox{$\displaystyle E=mc^2$}}          \newdimen\mywidth     \newdimen\myheight     \mywidth=\wd\IBox     \myheight=\ht\IBox          \paperwidth=\mywidth     \paperheight=\myheight     \voffset=-1in     \hoffset=-1in     \topskip=0bp          \special{papersize=\the\mywidth,\the\myheight}          \parindent=0cm     \pagecolor{cyan}          \begin{document}     \begin{pspicture}(\mywidth,\myheight)     %\psframe[linecolor=red](\mywidth,\myheight)     \rput(0.5\mywidth,0.5\myheight){\usebox{\IBox}}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/3vMDS.png) **Note:** The top and bottom parts get cropped. ## Questions: How to increase the accuracy of `\newsavebox`? Is it possible?


title: auctex, hooking into wrapping specific environment

text: I do a lot of editing using `Emacs` and `auctex`, some of this involve wrapping certain parts of the manus with a certain environment. This is quite easy using `transient-mark-mode` and `C-c C-e`. But I'd like `Emacs` to do some cleanup on the text as well as wrapping the environment. As far as I can see `LaTeX-add-environments` is mostly for empty environments, where the interface will ask for information. Anyone know if it it possible to add a processing hook as well, or do I need to take a different route?


title: Resize table and caption

text: I usually apply a `\scalebox` to resize things, but I always stumble upon the fact that I cannot simply include a `\caption{...}` in the `\scalebox`. As an alternative to `\scalebox`, I found I may use `\resizebox`, but this macro also does not allow me to include `\caption{...}`'s. Is there anyway to resize both the `tabular` and the table's `caption`?


title: Location of a particular LaTeX environment in the generated PDF document

text: Is it possible to get the exact page number (or several page numbers if it spreads so) in the generated PDF document for a particular LaTeX environment (say, `\begin{figure} ...\end{figure}`) after compilation? Editing the corresponding LaTeX source file (e.g. injecting some specific marks) is available for that purpose. **Update:** Is `pdfsync` helpful for that?


title: Defining a new command whose argument doesn't need braces

text: I created a `\newcommand` to allow me to quickly create one-item lists. `\newcommand{\itemm}[1]{\begin{itemize}\item #1 \end{itemize}}` When I used `\item`, I don't have to put braces around the text. Is there a way I can allow my new macro `\itemm` to work without braces? e.g.               \begin{itemize}     \item Pennsylvania    % no braces works fine     \end{itemize}               \itemm {Philadelphia}  % \itemm currently requires braces                            % or only the first character is itemized     \itemm Pittsburg       % I would like \itemm to not require braces                            % and to itemize the entire string


title: Customising a tikz calendar

text: I am trying to make a simple calendar, this is how far I have got so far...               \documentclass{article}     \usepackage[nomessages]{fp}% http://ctan.org/pkg/fp     \usepackage{tikz}     \usepackage{ifthen}     \usetikzlibrary{arrows,shapes}     \usetikzlibrary{positioning,calendar,er}     \usetikzlibrary{decorations.markings}     \usetikzlibrary{shapes.geometric}     \usepackage[margin=0.5in, paperwidth=15.8in, paperheight=8.5in]{geometry}     \usepackage{geometry}     \pagenumbering{gobble}          \makeatletter%          \newcommand{\modulo}[2]{%       \FPeval{\result}{trunc(#1-(#2*trunc(#1/#2,0)),0)}\result%     }              \pgfkeys{/pgf/calendar/even/.code={%                 \pgfmathparse{int(mod(\pgfcalendarifdatejulian,2))}                 \ifnum                    \pgfmathresult=0                 \relax\pgfcalendarmatchestrue\fi%         }}%          \tikzoption{day headings}{\tikzstyle{day heading}=[#1]}     \tikzstyle{day heading}=[]     \tikzstyle{day letter headings}=[         execute before day scope={ \ifdate{day of month=1}{%           \pgfmathsetlength{\pgf@ya}{\tikz@lib@cal@yshift}%           \pgfmathsetlength\pgf@xa{\tikz@lib@cal@xshift}%           \pgftransformyshift{-\pgf@ya}           \foreach \d/\l in {0/M,1/T,2/W,3/T,4/F,5/S,6/S} {             \pgf@xa=\d\pgf@xa%             \pgftransformxshift{\pgf@xa}%             \pgftransformyshift{\pgf@ya}%             \node[every day,day heading]{\l};%           }          }{}%       }%     ]          \makeatother%          \begin{document}         \begin{tikzpicture}[every calendar/.style={             week list,             month label above centered,             day xshift = 0.8cm,             day headings=black,             day letter headings,             }]             \matrix[column sep=5em, row sep=3em] {                 \calendar[dates=2012-01-01 to 2012-01-last] if (even) [orange]; &                 \calendar[dates=2012-02-01 to 2012-02-last] if (even) [orange]; &                 \calendar[dates=2012-03-01 to 2012-03-last] if (even) [orange]; \\                 \calendar[dates=2012-04-01 to 2012-04-last] if (even) [orange]; &                 \calendar[dates=2012-05-01 to 2012-05-last] if (even) [orange]; &                 \calendar[dates=2012-06-01 to 2012-06-last] if (even) [orange]; \\                 \calendar[dates=2012-07-01 to 2012-07-last] if (even) [orange]; &                 \calendar[dates=2012-08-01 to 2012-08-last] if (even) [orange]; &                 \calendar[dates=2012-09-01 to 2012-09-last] if (even) [orange]; \\                 \calendar[dates=2012-10-01 to 2012-10-last] if (even) [orange]; &                     \calendar[dates=2012-11-01 to 2012-11-last] if (even) [orange]; &                 \calendar[dates=2012-12-01 to 2012-12-last] if (even) [orange]; \\             };              \end{tikzpicture}     \end{document}      Now I want to colour the days alternately, i.e. jan 1, 3, 5... would be one colour and the rest another colour, for the whole year. This could either be a different font colour for the number or a background fill colour, I don't really mind, as long as there is an pretty way to distinguish odd and even numbered days of the year easily. ps: this is just a minor annoyance, but my calendar is appearing on page 2 of a pdf file with a blank first page, and I'm not sure why. I'm making it like `pdflatex wim_cal.tex wim_cal.pdf`. * * * After some hours of mucking around I have made some small progress and edited my tex sample above (you can see the diff..) The first blank page thing is fixed. Now I think I am almost there, if you search for the part `\pgfcalendarifdatejulian` , when I replace that with an even number then I get all days orange on the calendar, when I replace it with an odd number then I get all days black. But with `\pgfcalendarifdatejulian` as is, I get an error like `! Dimension too large.` when doing pdflatex. What am I missing now? * * * Edit: I still have not solved this problem.. should I post a new, update question with my latest attempts?


title: Draw background lines dashed in TikZ-3dplot depending on view position

text: In the graphic the red line is partly covered (in the background) of the 3d-object. Is it possible to draw the background parts of the lines dashed (or calculate the "intersection" points)? After that I like to fill the surfaces with transparent color. I fear that I have to declare the surfaces in a other way (like rectangles).               \documentclass[border=5pt]{standalone}   % for LuaLaTeX     \usepackage{pgfplots}                        \usepackage{tikz, tikz-3dplot}     %\usetikzlibrary{shadows, shadows.blur, shapes, arrows, positioning, circuits.ee.IEC, decorations, matrix, intersections, patterns, 3d}        %\usepackage[european, cuteinductors]{circuitikz}     \pgfplotsset{compat=newest}     \begin{document}          \tdplotsetmaincoords{70}{10}    % set position of 3d-view     \begin{tikzpicture}[tdplot_main_coords]          % Set parameters     %\newcommand\hexX{1}        -> defined in loop     \newcommand\hexY{0}     %\newcommand\hexZ{0}        -> defined in loop     %\newcommand\hexAng{7.5}    -> defined in loop     \newcommand\lowerinnerrad{6}     \newcommand\lowerouterrad{6.5}     \newcommand\hexlowerHeigth{0}     \newcommand\hexupperHeigth{1}          % Calculate 4*6 Corners and draw connections     \foreach \NAME/\hexX/\hexZ in {li/\lowerinnerrad/\hexlowerHeigth, lo/\lowerouterrad/\hexlowerHeigth, ui/\lowerinnerrad/\hexupperHeigth, uo/\lowerouterrad/\hexupperHeigth}{         \foreach \i/\n/\Ang in {1/2/0, 3/4/120, 5/6/240}{             \coordinate (LP_\NAME\i) at ({cos(\Ang+7.5)  *\hexX-sin(\Ang+7.5)  *\hexY}, {sin(\Ang+7.5)  *\hexX+cos(\Ang+7.5)  *\hexY}, \hexZ);                       \coordinate (LP_\NAME\n) at ({cos(\Ang+112.5)*\hexX-sin(\Ang+112.5)*\hexY}, {sin(\Ang+112.5)*\hexX+cos(\Ang+112.5)*\hexY}, \hexZ);           }         \draw[-] (LP_\NAME1)--(LP_\NAME2)--(LP_\NAME3)--(LP_\NAME4)--(LP_\NAME5)--(LP_\NAME6)--cycle;     }          % Draw connections of each corner and numbering     \foreach \Number in {1,2,...,6}{             \draw[-] (LP_li\Number)--(LP_lo\Number)--(LP_uo\Number)--(LP_ui\Number)--cycle;             \node[label=above:{\Number}] (a\Number) at (LP_uo\Number) {};       % indicating corners only     }          \draw[-, red] (LP_li3)--(LP_li4); % example: partly covered line          \end{tikzpicture}     \end{document}      ![3d object](http://i.stack.imgur.com/lZbtW.png) **Edit 1** I expanded the example a little bit (just insert code above `\end{tikzpicture}`). A circle is added to show how each 6 points of each hexagon are calculated. Additional the top plain is filled. But still the problems with lines...               \foreach \Ang in {0,1,2,...,360}{                                                          %Calculate circle points         \coordinate (LP_circ\Ang) at ({cos(\Ang)  *\lowerouterrad-sin(\Ang)  *\hexY}, {sin(\Ang)  *\lowerouterrad+cos(\Ang)  *\hexY}, \hexupperHeigth);                  }          \foreach \Ang in {0,1,2,...,359}{         \pgfmathtruncatemacro{\Numberplusone}{\Ang+1}                                       % Calculate following point number         \draw[-, blue!80!black](LP_circ\Ang)--(LP_circ\Numberplusone);     }          \fill[green, opacity=0.3] (LP_lo4) -- (LP_uo4) -- (LP_uo5) -- (LP_lo5) -- cycle;        % Example for one segment, like loop below          \foreach \Number in {1,2,...,6}{                                                        % Fill top segments         \pgfmathtruncatemacro{\Numberplusone}{\Number+1}                                    % Calculate following point number         \ifthenelse{\equal{\Numberplusone}{7}}{\pgfmathtruncatemacro{\Numberplusone}{1}}{}  % Point 7 does not exist, will be changed to 1              \fill[blue, opacity=0.3] (LP_uo\Number) -- (LP_ui\Number) -- (LP_ui\Numberplusone) -- (LP_uo\Numberplusone) -- cycle;     }      ![Version2](http://i.stack.imgur.com/MgGZP.png) **Edit 2** Now I edited it a little bit more and it looks better, but dashed lines still would be nice, as well as a solution how to draw lines or arrows in the "middle" (see picture). One more problem is, that if you change the point of view, you have to draw nearly a new picture. Hope anyone has experience with such (3d-)problems.               \documentclass[border=5pt]{standalone}   % for LuaLaTeX     \usepackage{pgfplots}                        \usepackage{tikz, tikz-3dplot}     \usetikzlibrary{patterns}       \pgfplotsset{compat=newest}     \begin{document}          \tdplotsetmaincoords{70}{10}    % set position of 3d-view     \begin{tikzpicture}[tdplot_main_coords]          % Set parameters------------------------------------------------------------------------------------------------------------     % First Platform LP     %\newcommand\HexX{1}        -> defined in loop     \newcommand\HexY{0}     %\newcommand\HexZ{0}        -> defined in loop     %\newcommand\hexAng{7.5}    -> defined in loop     \newcommand\LowerInnerRad{6}     \newcommand\LowerMiddleRad{6.4}     \newcommand\LowerOuterRad{6.8}     \newcommand\HexLowerHeigthLP{0}     \newcommand\HexUpperHeigthLP{1}                    % Coordinate System------------------------------------------------------------------------------------------------------------     \foreach \Ang in {0,1,2,...,360}{                                                      %Calculate circle points             \coordinate (LP_circ\Ang) at ({cos(\Ang)  *\LowerOuterRad-sin(\Ang)  *\HexY}, {sin(\Ang)  *\LowerOuterRad+cos(\Ang)  *\HexY}, 0);                    }               \draw[-, dotted] \foreach \x [remember=\x as \lastx (initially 0)] in {1,...,360}{(LP_circ\lastx) -- (LP_circ\x)} -- (LP_circ0);     %\draw[-, fill=green] \foreach \Ang in {1,...,359}{\pgfmathtruncatemacro{\NumberPlusOne}{\Ang+1}     %(LP_circ\Ang) -- (LP_circ\NumberPlusOne)}-- cycle;     \fill[pattern color = gray, pattern = north east lines] (LP_circ0)--(LP_circ10)--(LP_circ20)--(LP_circ30)--(LP_circ40)--(LP_circ50)--(LP_circ60)--(LP_circ70)--(LP_circ80)--(LP_circ90)--(LP_circ100)--(LP_circ110)--(LP_circ120)--(LP_circ130)--(LP_circ140)--(LP_circ150)--(LP_circ160)--(LP_circ170)--(LP_circ180)--(LP_circ190)--(LP_circ200)--(LP_circ210)--(LP_circ220)--(LP_circ230)--(LP_circ240)--(LP_circ250)--(LP_circ260)--(LP_circ270)--(LP_circ280)--(LP_circ290)--(LP_circ300)--(LP_circ310)--(LP_circ320)--(LP_circ330)--(LP_circ340)--(LP_circ350)--cycle; % in loop it didn't work...               \draw[-, dashed, thick] (0,0,0)--({cos(120)  *\LowerOuterRad-sin(120)  *\HexY}, {sin(120)  *\LowerOuterRad+cos(120)  *\HexY}, 0);     \draw[-, dashed, thick] (0,0,0)--({cos(240)  *\LowerOuterRad-sin(240)  *\HexY}, {sin(240)  *\LowerOuterRad+cos(240)  *\HexY}, 0);               \draw[-stealth, thick] (0,0,0)--(8,0, 0) node[anchor=west]{$x$};     \draw[-stealth, thick] (0,0,0)--(0,-8, 0) node[anchor=north]{$y$};     \draw[-stealth, thick] (0,0,0)--(0,0,-2) node[anchor=north]{$z$};         \draw[-stealth, thick, red] (0,0,-1.8)--(0,0, 4) node[anchor=south]{arrow should be ``surrounded" by hexagon};               % Platform------------------------------------------------------------------------------------------------------------     % Calculate 4*6 Corners and draw connections     \foreach \NAME/\HexX/\HexZ in {li/\LowerInnerRad/\HexLowerHeigthLP, lo/\LowerOuterRad/\HexLowerHeigthLP, ui/\LowerInnerRad/\HexUpperHeigthLP, uo/\LowerOuterRad/\HexUpperHeigthLP}{         \foreach \i/\n/\Ang in {1/2/0, 3/4/120, 5/6/240}{             \coordinate (LP_\NAME\i) at ({cos(\Ang+7.5)  *\HexX-sin(\Ang+7.5)  *\HexY}, {sin(\Ang+7.5)  *\HexX+cos(\Ang+7.5)  *\HexY}, \HexZ);                       \coordinate (LP_\NAME\n) at ({cos(\Ang+112.5)*\HexX-sin(\Ang+112.5)*\HexY}, {sin(\Ang+112.5)*\HexX+cos(\Ang+112.5)*\HexY}, \HexZ);           }         %\draw[-] (LP_\NAME1)--(LP_\NAME2)--(LP_\NAME3)--(LP_\NAME4)--(LP_\NAME5)--(LP_\NAME6)--cycle;     }          \foreach \NAMEa/\NAMEb/\op in {uo/ui/0.2, lo/li/0.8, ui/li/0.2, uo/lo/0.2}{                                     % Fill 4 outside walls           \foreach \Number in {1,2,...,6}{                                                        % Fill 6 segments (of the top plateau, for example)             \pgfmathtruncatemacro{\NumberPlusOne}{\Number+1}                                    % Calculate following point number             \ifthenelse{\equal{\NumberPlusOne}{7}}{\pgfmathtruncatemacro{\NumberPlusOne}{1}}{}  % Point 7 does not exist, will be changed to 1                  \fill[blue, opacity=\op] (LP_\NAMEa\Number) -- (LP_\NAMEb\Number) -- (LP_\NAMEb\NumberPlusOne) -- (LP_\NAMEa\NumberPlusOne) -- cycle;         }     }          % Draw connections of each corner and numbering     \foreach \Number in {1,2,...,6}{             \draw[-] (LP_li\Number)--(LP_lo\Number)--(LP_uo\Number)--(LP_ui\Number)--cycle;             \node[label=above:{\Number}] (a\Number) at (LP_uo\Number) {};       % indicating corners only     }          \foreach \NAME in {li, lo, ui, uo}{         \draw[-] (LP_\NAME1)--(LP_\NAME2)--(LP_\NAME3)--(LP_\NAME4)--(LP_\NAME5)--(LP_\NAME6)--cycle;     }          \end{tikzpicture}     \end{document}      ![Version 3](http://i.stack.imgur.com/BLJeI.png)


title: Appendices in PDF Outline appear as childs of last section

text: I'm using the following general outline in `book` class:               \mainmatter         \include{introduction}              \part{...}             \include{chapter1}             ...              \part{...}             ...             \include{conclusions}          \addcontentsline{toc}{part}{\appendixtocname}     \appendixpage     \appendix         \include{...}          \backmatter         % Glossary         \cleardoublepage         \addcontentsline{toc}{chapter}{Nomenclature}         \markboth{Nomenclature}{Nomenclature}         \makenomenclature         \input{nomenclature}         \printnomenclature[4.5cm]              % Bibliography / References         \cleardoublepage         \addcontentsline{toc}{chapter}{References}         \bibliographystyle{amsalpha}         \renewcommand{\bibname}{References}         \bibliography{thesis}      But a lot of things comes wrong in the final PDF, among them:   1. Appendices appear as childs of last section in the last chapter.   2. Clicking on Nomenclature and References bookmarks sends to the wrong page.   3. Despite these problems, the page numbers in TOC are right. Help?


title: cref reference format for label type `' undefined

text: I have this error that I suspect comes from the fact that my tables and figures are in a slave file. It seems that `cleveref` does not manage to see the "class" of my float. I tried with `varioref` and I have a similar issue, I tried to put the `\includegraphics` before the text, I updated my TeXLive... Any help is welcome. Here my example (sorry if it's not following the proper rule but it's my first time with a question).               \documentclass[english]{article}     \usepackage{graphicx}     \usepackage{lscape, rotating}      \usepackage{tabu, longtable}      \usepackage{babel}     \usepackage{hyperref, varioref, cleveref}     \usepackage[xindy, acronym, nonumberlist]{glossaries}          \begin{document}          Before running any analysis we first checked for collinearity or correlation      among variables and did not notice any specific relationship (scatterplot      not shown).          We present here scatterplot matrix of data grouped by theme: presence data      (\vref{Pevex8r}), CPUE data (\vref{Cevex8r}) and time and location data      (\vref{TLevex8r}).          As \gls{CPUE} data are severely skewed, we transformed them using a $log$      transformation: $\log($\gls{CPUE}$+1)$ (\vref{CTevex8r}).           \include{figure_Recap1}     \end{document}      Here is what my slave file looks like:               \begin{figure}     \scalebox{0.8}{     \includegraphics{../../R/Data_exploration/Plots/Pevex8r.pdf}     }     \label{Pevex8r}\caption{Scatterplot matrix of species presence variable}      \end{figure}          \begin{figure}     \scalebox{0.7}{     \includegraphics{../../R/Data_exploration/Plots/TLevex8r}     }     \label{TLevex8r}\caption{Scatterplot matrix of time and location variable}      \end{figure}      etc...


title: What might cause TexMaker to look like this?

text: See image below. No matter how many times I uninstall and reinstall TeXMaker, it keeps showing up with that layout instead of the typical one. It started happening recently and I am clueless about the issue. I am not asking just for the sake of getting it back to normal, but because I am afraid that whatever caused this change might have changed other stuff in the software's performance. ![TeXMaker's appearance](http://i.stack.imgur.com/acimB.png) Edit: The typical one would be the one featured on the website of TeXMaker: http://www.xm1math.net/texmaker/


title: Using TikZ to draw array figures

text: I am new in LaTeX and even more on TikZ. I want to use TikZ to draw the kind of figure described in the below picture. I looked for some tutorial or particular topics that deals with that but never was able to find what I want. I hope that someone can help me. Many thanks ![enter image description here](http://i.stack.imgur.com/mf2nU.png)![enter image description here](http://i.stack.imgur.com/yIEkN.png)


title: Aligning Decimal Points in Columns

text: I simply want to align the decimal points in columns. I know this has been answered already but I can not figure out how to apply it in my table. Forgive me, I am very new to LaTeX. This is the code that I have:               \begin{table}[h]     \begin{center}     \begin{tabular}{ccc|cc|cc|c}     \hline\hline      \multirow{2}{*}{$A$}  & \multirow{2}{*}{$B$}  & \multirow{2}{*}{$C$} & \multicolumn{2}{c|}{1} & \multicolumn{2}{c|}{2} &      \multirow{2}{*}{$F$}\\\cline{4-7}     &&&$D$&$E$&$D$&$E$&\\\hline\hline     \multirow{3}{*}{2} &    \multirow{3}{*}{5} &    12  &   2.146   &   9.144   &   6.311   &   9.566   &   7.134   \\  \cline{3-8}     &&  14  &   3.245   &   10.255  &   6.978   &   19.274  &   18.245  \\  \cline{3-8}     &&  16  &   7.176   &   11.968  &   10.852  &   47.485  &   25.282  \\  \hline\hline     \end{tabular}     \end{center}     \end{table}      One more thing. If my table was too long, and I wanted to cut it so that the other half is in the other page, is that possible? And if it is not too much to ask, can you show me how?


title: Why can't I use \newfloat more than once?

text: I've found the float package, which lets me specify `\newfloat{program}{...}` to get other named floats than Table and Figure. However, if I try to use this more than once, I get a cryptic error:               ! You can't use `\def' after \the.       \fs@plain ->\def                         \@fs@cfont {\rmfamily }\let \@fs@capt \floatc@plain \def \@...      It points to the first line where I try to use one of the new floats - not where I define the second one. However, if I remove all calls to `\newfloat` except one, everything works as expected. Is this a problem with the package? If so, is there another package I can use that does the same thing (and doesn't depend on this package)? * * * **UPDATE:** This seems to be related to using the `listings` package in new floats. The following code produces the above error:               \documentclass{article}          \usepackage{floatrow}     \DeclareNewFloatType{program}{name=Program,fileext=lop,within=section}     \DeclareNewFloatType{output}{name=Output,fileext=loo,within=section}          \usepackage{listings}          \begin{document}          \begin{program}     \lstinputlisting{thisfile.tex}     \caption{some code}     \end{program}          \end{document}      If I comment out the second `\DeclareNewFloatType`, or do something else in the float (for example `\begin{tabular}...\end{tabular}` instead of `\lstinputlisting{...}`), the code compiles correctly.


title: Natbib: Truncate list of authors ONLY in the citation

text: (After a long series of searchs in vain):   For a citation where authors list is greater or equal to **`3`** I want to display `First_author et al` ONLY in the citation and NOT in the bibliographic entry. Is that possible please ? Here a MWE:               \documentclass[12pt,a4paper,english,french]{book}     \usepackage[T1]{fontenc}     \usepackage[utf8x]{inputenc}     \usepackage[frenchb]{babel}     \usepackage[round,longnamesfirst]{natbib}          \begin{document}     Authors text cited~\citep{Meliker2010}.     \bibliographystyle{plainnatcustom}     \bibliography{MyBiblio}     \end{document}      Here the `MyBiblio.bib` file:               @incollection{Meliker2010,     author={Meliker, Jaymie R. and Slotnick, Melissa J. and AvRuskin, Gillian A. and Kaufmann,  Andrew M. and Jacquez, Geoffrey D. and Nriagu, Jerome O.},     year={2010},     booktitle={Handbook of Applied Spatial Analysis},     editor={Fischer, Manfred M. and Getis, Arthur},     title={Exposure Assessment in Environmental Epidemiology},     publisher={Springer Berlin Heidelberg},     pages={753-767},     }      Note that the `plainnatcustom.bst` file is a renamed copy of the known `plainnat.bst` file where I replaced inside the `"and"` by `"et"` (to get translation of **and** to **et** in french) and put it in my LaTeX working directory. For this MWE I get the citation as:   - Authors text cited **(Meliker, Slotnick, AvRuskin, Kaufmann, Jacquez, et Nriagu, 2010)**.  But I look for a citation display like this:   - Authors text cited **(Meliker et al. 2010)**.  No problem with the bibliographic entry where full list of authors is displayed as I do prefer.


title: pgfkeys error in ytableau package

text: I'm running TeX Live 2013 Debian (on a Linux Mint 17 machine). I'm getting the following error when I try to load the `ytableau` package:               ! LaTeX Error: File `pgfkeys.sty' not found.      When I search the package manager for any packages that mention `pgfkeys` I find the only match is in `texlive-pictures` which is already installed on my system, the docs say that `texlive-pictures` includes > pgfkeyx -- Extended and more robust version of pgfkeys.   >  pgfopts -- LaTeX package options with pgfkeys. Is it that someone renamed `pgfkeys` to `pgfkeyx` and thus broke backwards compatibility with other packages? That would indeed be unfortunate. Any help much appreciated. Here is my entire input file that produced the error:               \documentclass[11pt,oneside]{amsart}     \usepackage{amsthm,amssymb,amsfonts}     \usepackage[margin=1.3in]{geometry}     \usepackage{ytableau}     \usepackage{tikz}          \begin{document}     \title{Sample Title}     \author{Some author}      \maketitle          \end{document}


title: PSTricks Animation and dvips

text: I want to create animation in Beamer using the animate package. I easily created a basic example following the "all-in-one approach" from this older post but I can not use pdflatex to compile, which leads to my issue. I use this minimal code (copied from mentioned post) in a file called main.tex:               \documentclass{beamer}     \usepackage{filecontents}          %====================== BEGIN FILE CONTENTS ==========================     \begin{filecontents*}{dummy.tex}     \documentclass{article}     \usepackage{pstricks-add}          \usepackage[active,tightpage]{preview}     \PreviewBorder=0pt     \PreviewEnvironment{pspicture}          \newcommand\RotatingArrow[1]{%         \begin{pspicture}(-1,-1)(10,11)             \psframe*[linecolor=cyan,opacity=0.3](-1,-1)(10,11)             \psset{arrows=->}             \psaxes(0,0)(-0.5,-0.5)(9,10)[$x$,0][$y$,90]             \rput(4.5,0.6){\Huge{Temps = #1 s}}             \rput{#1}(4.5,5.5){%                 \psset{arrowsize=5pt}                 \pnode(2,0){A}                 \pnode(2,3){B}                 \psline[linecolor=blue](A)                 \uput[0]{-#1}(A){\Huge{$\textcolor{blue}{\vec{a}}$}}                 \psline[linecolor=red](A)(B)                 \uput[90]{-#1}(B){\Huge{$\textcolor{red}{\vec{v}}$}}}     \end{pspicture}}          \begin{document}         \multido{\i=0+10}{36}{\RotatingArrow{\i}}     \end{document}     \end{filecontents*}     %====================== END FILE CONTENTS =========================          \usepackage{graphicx}     \usepackage{animate}          \begin{document}     \immediate\write18{latex dummy}     \immediate\write18{dvips dummy}     \immediate\write18{ps2pdf dummy.ps}     \begin{frame}{Circular motion in action}         \animategraphics[controls,scale=0.5]{10}{dummy}{}{}     \end{frame}     \end{document}      This works fine when I compile in command line using:               pdflatex -shell-escape main.tex      However, as because of other tricks I usually use in my presentations, I need to use the route latex->dvips->ps2pdf, but when I compile doing:               latex main.tex     dvips main.dvi     ps2pdf main.ps      I get the error: **Package animate Error: Missing frame number in \animategraphics command.** THis error occurs after the step: latex main.tex According to the animate package documentation, I think it should work but I'm obviously doing something wrong. Though the documentation mentions some issue with this way of compiling, I do not manage to work through it. Any pointer ?


title: Nomenclature package error : Lonely \item--perhaps a missing list environment

text: I am using the package `nomencl` to generate a list of abbreviations. However, after a recent MiKTeX 2.9 update (using TeXnicCenter) I keep getting errors for the abbreviation items               LaTeX Error: Lonely \item--perhaps a missing list environment.      Unfortunately, I cannot figure out an MWE (the MWE that I tried do work, but the real document doesn't). So here is a shortened version of my main document (without all the other header stuff and bibliography):               \documentclass{scrartcl}     \usepackage[intoc]{nomencl}      \let\abk\nomenclature        \renewcommand{\nomname}{List of Abbreviations}     \let\OrgItem\item     \renewcommand\nompreamble{\renewcommand\item[1][]{\OrgItem[##1]\dotfill         \hspace{\labelsep}}}         \setlength{\nomitemsep}{-\parsep}        \makenomenclature          \begin{document}     \printnomenclature \newpage     \include{Introduction}     \include{Methods}     \include{Results}     \end{document}      However, if instead of including the chapters I simply try out an MWE with the same header and one abbreviation:               \begin{document}     \printnomenclature \newpage     This is my txt \abk{txt}{text}     \end{document}      then everything works fine. Any suggestions about the reason?


title: Variations of an exam

text: I'm using the great exam package to create exams. But sometimes there are many students so I need to create different "versions" - `Group A` and `Group B`. Mainly the differences are only the numbers in questions so the text of questions are similar. Now I do the follow:   * create a command named `\finalexam` which has the questions with macros (`\question[5] What is the result of $\a\cdot\b$`)   * create the macros (`\def\a{10}`, `\def\b{20}`)   * call `\finalexam`   * change the macros (`\def\a{20}`, `def\b{30}`)   * call `\finalexam` Is there any other (better) solution or a ready-to-use package? **Edit** : a simple example               \documentclass{exam}     \usepackage[magyar]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{t1enc}     \usepackage{nicefrac}     \usepackage{siunitx}     \usepackage{multicol}     \pagestyle{empty}     \addpoints     \pointname{ pont}     \pointsinrightmargin     \marginpointname{ pont}     \begin{document}     \newcommand{\doga}{     \centerline{\large V. exam -- \group\ group}     \begin{questions}         \question[5]What is the result of $\a\cdot\b$?     \end{questions}}     %     \newcommand{\group}{A}     \renewcommand{\a}{5}     \renewcommand{\b}{10}     \doga     %     \renewcommand{\group}{B}     \renewcommand{\a}{10}     \renewcommand{\b}{20}     \doga     \end{document}


title: Replace missing small caps by uppercase

text: I am using `glossaries` with the `sc` option to set acronyms in small caps. This works fine in the main text, but the font I am using for sectioning (and, importantly, `description` labels) does not have small caps, so that problems like this occur:               \documentclass{scrartcl}          \usepackage[smallcaps]{glossaries}     \newacronym{sc}{smallcaps}{little big letters}     \makeglossaries          \begin{document}          \section{\Glsname{sc} in a section title}     \Gls{sc}          \section{this is better: \GLSname{sc}}          \printglossaries     \end{document}      ![enter image description here](http://i.stack.imgur.com/ZYVcm.png) I would like to replace the small caps in the sans-serif font with “big caps” (or maybe faked small caps). Is there a way to do this? _Note:_ I have a semi-satisfactory solution based on `\GLSname` for sectioning and `\let\glsnamefont\uppercase` for the glossary. I still wonder if it would be possible to make a “smart” replacement based on the font.