title: Figures are not visible inside minipage

text: I am a novice in Latex. Recently I am trying to use minipage to show some figures. The code I am using is as following:               \begin{figure}[t]          \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=0.eps, width=7cm}     \caption{Extracting root node coordinates for calculating LEMBR}\label{fig1}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=1.eps, width=6cm}     \caption{Sending LEMBRs from client sites to Query Site,Calculating GEMBR at Query site and sending them back to client sites parallely}\label{fig2}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=2.eps, width=4.5cm}     \caption{Partitioning the copy of GEMBR at each client sites}\label{fig3}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=3.eps, width=6cm}     \caption{Mapping Leaf Level objects at each site on the partitioned GEMBR}\label{fig4}     \end{minipage}          \end{figure}      I am using the above code inside each sections of my paper. But problem is I don't find last 3 figures,it appears to me that those are invisible. What could be the problem? Also, those figures are not found when I am referencing them from my writing,it shows **??** instead. This is the minimal code which has the same problem, just compile it with some random epsfiles. In this case it doesnt show first four figures and puts ?? in their references.               \documentclass{ssdbm}     \def\pdfshellescape{1}     \usepackage{epstopdf} %automatically converts eps->pdf for use in pdfLaTeX.     \usepackage{graphicx}          \begin{document}          \title{Test}           \numberofauthors{1}      \author{MiNdFrEaK}          \maketitle     \begin{abstract}          \end{abstract}          \terms{Test0,Test1,Test2}          %\keywords{} % NOT required for Proceedings          \section{Introduction}          \cite{VO11,GA84,SC03}          \section{Preliminaries}          1)This is shown in Figure \ref{fig1}.            2)This is shown in Figure \ref{fig2}.          3)This is shown in Figure \ref{fig2}.          4)This is shown in Figure \ref{fig3}.          5)This is depicted in \ref{fig4}.               \begin{figure}[t]          \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=0.eps, width=7cm}     \caption{Figure 1}\label{fig1}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=1.eps, width=6cm}     \caption{Figure 2}\label{fig2}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=2.eps, width=4.5cm}     \caption{Figure 3}\label{fig3}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=3.eps, width=6cm}     \caption{Figure 4}\label{fig4}     \end{minipage}          %%and repeat everything from \begin{minipage}... to \end{minipage} again for each image     \end{figure}               \section{Some Strategy Name1}          The PMSJ algorithm comprises of the following steps:          1)This is shown in Figure \ref{fig5}.          2)This is shown in Figure \ref{fig6}.          3)This is depicted in Figure \ref{fig7}.          \begin{figure}[t]          \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=P_1.eps, width=6cm}     \caption{Figure 5}\label{fig5}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=P_2.eps, width=6cm}     \caption{Figure 6}\label{fig6}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=P_3.eps, width=6cm}     \caption{Figure 7}\label{fig7}     \end{minipage}               %%and repeat everything from \begin{minipage}... to \end{minipage} again for each image     \end{figure}          \section{Some Strategy Name2}          The steps for BFSJ are as follows:          1)This is shown in Figure \ref{fig8}.          2)This is depicted in Figure \ref{fig9}.          3)This is shown in Figure \ref{fig10}.          \begin{figure}[t]          \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=B_1.eps, width=6cm}     \caption{Figure 8}\label{fig8}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=B_2.eps, width=6cm}     \caption{Figure 9}\label{fig9}     \end{minipage}     \\[1cm]     \begin{minipage}[t]{\linewidth}     \centering     \epsfig{file=B_3.eps, width=6cm}     \caption{figure 10}\label{fig10}     \end{minipage}          %%and repeat everything from \begin{minipage}... to \end{minipage} again for each image          \end{figure}          \section{Conclusions}          \section{Acknowledgments}          \balance          \bibliographystyle{abbrv}     \bibliography{ssdbm}            \end{document}


title: Vertical space in interaction with figure/center environment

text: I misused the `figure` environment to insert some vertical space and now try to replace it by `center`. However, the two environments behave differently when I use a scaled box as content of the `figure`/`center` environment. `center` inserts more space. Is there a way to fix this?               \documentclass{scrbook}                    \usepackage{lipsum}            \usepackage{float}          \usepackage{graphicx}     \newcommand{\oneline}[1]{\resizebox{\ifdim\width>\linewidth\linewidth\else\width\fi}{!}{#1}}          \begin{document}                         \lipsum      \lipsum[3-8]            %\begin{center}     \begin{figure}[H]     \oneline{%     \begin{tabular}{|c|c|c|c|c|}\hline       Prefield & T/C & \multicolumn{3}{|c|}{Sentence Field} \\ \hline     & & & Verbal Field & \\ \hline\hline     Om andre bisper \ldots & vides & ikke & & \\     (`whether other bishops ) & (`know.{\sc pres.pass}') & (`not') &&\\\hline     & om &  andre bisper& har & lignende planer \\     & (`whether') &  (`other bishops') & (`have) & (`similar plans') \\ \hline     \end{tabular}     }     \end{figure}     %\end{center}          \lipsum[3-10]            \end{document}


title: Vertical lines in matrices should be aligned

text: I'm trying to write matrices one below the other but I want the vertical lines (compare example below) to be aligned. Eventually, there will be several matrices in one document - in the example below there are only two.               \documentclass{article}          \usepackage{amsmath}          \begin{document}     \begin{align}     \begin{array}{l}     \mathrm{I} \\     \mathrm{II} \\     \mathrm{III} \\     \end{array}     \left (     \begin{array}{rrr|r}     3 & 6 & 3 & 3 \\     2 & 1 & -1 & -1 \\     -1 & 2 & 2 & 1 \\     \end{array}     \right )     \begin{array}{c}     \\     \mathrm{II} + \left (-\frac 2 3 \right ) \cdot \mathrm{I} \\     \mathrm{III} + \left (\frac 1 3 \right ) \cdot \mathrm{I}\\     \end{array}     \end{align}     \begin{align}     \begin{array}{l}     \mathrm{I^{**}}\\     \mathrm{II^{**}} \\     \mathrm{III^{***}} \\     \end{array}     \left (     \begin{array}{rrr|r}     1 & 0 & 0 & 1 \\     0 & 1 & 0 & -1 \\     0 & 0 & 1 & 2 \\     \end{array}     \right )     \end{align}      \end{document}


title: \newcommand creates underfull\hbox (badness 10000) in paragraph

text: I have a 2-column document with repeating boxes. So I created these macros (don't mind the colors and boxheight):               % -------------------------------------------------------     % aitparagraph     %     % gives header and content with proper size and color     % for an arbitrary box     %     \newcommand{\aitparagraph}[2]{         \vspace{0.5cm}         {\Large \bf \textcolor{AITred}{#1}} \\[10pt] {#2}     }               % -------------------------------------------------------     % aitbox     %     % a single box      %     \newcommand{\aitbox}[2]{         \begin{minipage}[t]{\hsize}             \fcolorbox{AITgray}{white}{                 \begin{minipage}[t]{0.92 \hsize}                     \vbox to \the\boxheight{                         \aitparagraph{#1}{#2}                         \vfill                     }                  \end{minipage}             }         \end{minipage}     }      When use these macros in my document like this:               \begin{multicols}{2}          \aitbox{FIRSTBOX}{              Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue euneque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla.           }          \columnbreak          \begin{minipage}[t]{\hsize}         \fcolorbox{AITgray}{white}{             \begin{minipage}[t]{0.92 \hsize}                 \vbox to \the\boxheight{                     \aitparagraph{SECOND}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue euneque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla.}                     \vfill                 }              \end{minipage}         }     \end{minipage}          \end{multicols}      The first box ("FIRSTBOX") gives me "Undefull \hbox (badness 10000) in paragraph)" whereas the pure macro-less version renders without any complains. Utilizing the macro introduces this warning. Why? How can I get rid of it? What am I doing wrong?


title: tikz - drawing a timeline with intervals

text: I would like to obtain a tikz picture that looks like the following. Can you help me to complete my code to achieve that result? ![enter image description here](http://i.stack.imgur.com/bJFK2.png)               \documentclass[11pt]{article}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{tikz}          \begin{document}             \begin{tikzpicture}[x=50]            \draw (-0.2,0) -- (1.2,0);                  \draw (0, 0) node[below=7pt] {$a_1$};            \draw[] (0,-0.1) -- (0,0.1);            \draw (1, 0) node[below=7pt] {$a_2$};                   \draw[] (1,-0.1) -- (1,0.1);        \end{tikzpicture}          \end{document}      * * * **EDIT** I like @Qrrbrbirlbel's proposal, but I would like to make the "[" and ")" symbols a little bit larger. Any idea?


title: How to set the bold font of the keyword Definition using IEEEtran without introducing package ntheorem?

text: I am writing a paper with the recommended template `IEEEtran.sty`. IEEEtran has its own theorem environment such as definitions, theorems, axioms, corollaries, lemmas, and so on. I want to set the bold font of the keywords `Definition` and `Theorem`. I know how to do this with the package `ntheorem`. However, I do not want to introduce this package into the `IEEEtran` template (avoiding possible side effects). Thus, > How can I set the bold font of the keywords `Definition` and `Theorem` using > "IEEEtran.sty" without introducing package "ntheorem"?


title: Alignment of text not correct

text: How would I make the position of the name of my referees be alligned on the same row? In the picture below, I would like to make the "Name of person" on the right to be aligned nicely with the "Name of person" on the left. Note that I need to put more lines of address for one person, I cannot change the number of lines that I have. My LaTeX code is below ![enter image description here](http://i.stack.imgur.com/YxUz7.jpg)               \documentclass[10pt]{article}     \usepackage{array, xcolor, lipsum, bibentry}     \usepackage[margin=3cm]{geometry}     \usepackage{scrbase,scrpage2}     \pagestyle{scrheadings} % pagestyle with page number     \lohead{My Name}                    \definecolor{lightgray}{gray}{0.8}     \newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}     \newcolumntype{R}{p{0.8\textwidth}}     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}               \begin{document}     \thispagestyle{empty}     \begin{center}\bfseries\Huge John Doe \end{center}     \vspace{1em}     \begin{minipage}[ht]{0.70\textwidth}     Address Line 1\\     Address Line 2\\     Address Line 3\\     Address Line 4\\     Address Line 5     \end{minipage}     \begin{minipage}[ht]{0.48\textwidth}     Mobile: 123-456789\\     Email: myemail@gmail.com\\     Date of Birth: 01/01/2012\\     Citizenship: My citizenship     \end{minipage}     \vspace{2pt}          \section*{Referees}     \begin{minipage}[ht]{0.70\textwidth}     \textbf{Name of person}\\     \textit{Position}\\     Address 1\\     Address 1\\     Address 1\\     Address 1\\     Contact no. :+123-1234567     \end{minipage}     \begin{minipage}[ht]{0.48\textwidth}     \textbf{Name of person}\\     \textit{Position}\\     Address 1\\     Address 1\\     Address 1\\     Address 1\\     Address 1\\     Address 1\\     Contact no. :+123-1234567     \end{minipage}          \end{document}


title: avoid line clipping in path picture

text: I define a node style `Host` like this (sorry for german labels):               \tikzset{Host/.style={path picture={%       \coordinate (hinten links oben) at ($(path picture bounding box.north west)!0.33!(path picture bounding box.north east)$);       \coordinate (hp1) at ($(path picture bounding box.north west)!0.66!(path picture bounding box.north east)$);       \coordinate (vorne links oben) at ($(path picture bounding box.south west)!0.66!(path picture bounding box.north west)$);       \coordinate (vorne rechts unten) at ($(path picture bounding box.south west)!0.66!(path picture bounding box.south east)$);       \coordinate (vorne rechts oben) at ($(vorne rechts unten)!0.66!(hp1)$);       \coordinate (hinten rechts unten) at ($(path picture bounding box.south east)!0.33!(path picture bounding box.north east)$);       \path (vorne links oben) edge [-] (hinten links oben);       \path (hinten links oben) edge [-] (path picture bounding box.north east);       \path (path picture bounding box.north east) edge [-] (hinten rechts unten);       \path (hinten rechts unten) edge [-] (vorne rechts unten);       \path (vorne rechts unten) edge [-] (path picture bounding box.south west);       \path (path picture bounding box.south west) edge [-] (vorne links oben);       \path (vorne links oben) edge [-] (vorne rechts oben);       \path (vorne rechts oben) edge (path picture bounding box.north east) edge (vorne rechts unten);     }},minimum width=2em, minimum height=3em}      When I use this style, the lines along the borders of the bounding box visually appear thinner. I think this is because line "grow around" their defining endpoints and thus get clipped by the bounding box. Is there an easy way to insert a margin of sorts?


title: Incorrect frame numbers when pages included using pdfpages in beamer

text: I am including some pages using `pdfpages` in `beamer`. I understand that these pages can not be included a frames. Rather these are included as simple texts. So far so good. However, I get incorrect frame counts in slide footers. Please see this minimal example,               \documentclass{beamer}          \usepackage{pdfpages}          \mode<presentation>     {       \usetheme{Luebeck}       \setbeamercovered{transparent}     }          \usepackage{times}          % Frame numbers     \expandafter\def\expandafter\insertshorttitle\expandafter{%       \insertshorttitle\hfill\insertframenumber\,/\,\inserttotalframenumber}          \begin{document}          \begin{frame}       \frametitle{First Frame}     \end{frame}          \begingroup       \setbeamercolor{background canvas}{bg=}       \includepdf[pages=1-10]{mypdf.pdf}     \endgroup          \begin{frame}       \frametitle{Last Frame}     \end{frame}               \end{document}      While I need the first slide to have the number 1/12, and the last slide 12/12, this actually comes out to be 1/2 and 2/2. I know that beamer is doing nothing wrong. This is mathematically 100% correct. But from a user point of view, this is not intended. Is there any way I can incorporate _non-frame_ pages in slide counts?


title: Two labeled equations on the same line with labels lining up vertically

text: I'm using the following LaTeX code within the `amsmath` environment in LaTeX (MiKTeX 2.9 and TeXnicCenter under Windows):               Let $f$ represent the resulting number of such two-step cycles that operate per second (expressed in Hz.)          \makebox[0.9\textwidth][c]{     \begin{minipage}{0.45\linewidth}     \begin{equation}      f = \frac{1}{t_{on} + t_{off}} \label{eq:f}     \end{equation}      \end{minipage}      \hspace{0.05\linewidth}      \begin{minipage}{0.45\linewidth}      \begin{equation}      \frac{1}{f} = t_{on} + t_{off} \label{eq:invf}     \end{equation}      \end{minipage}     } \break          The total time required per cycle is the inverse of frequency of those cycles.      My desire is to place two numbered equations (I wouldn't mind learning to also support subequation lettering, but it's not necessary in this case) on the exact same line, with their own equation labels displayed. I am using numbering on the left side, not the right side, for this document and I would like the left equation number of the above pair to line up with the equation number that occurs when I only place a single equation using `\begin{equation}` or `\begin{align}`. Without the `\makebox` part, the numbering does NOT line up. So I pushed it with the `\makebox`. It does line up the way I show it above, but I receive multiple "bad box" errors, which I'd like to understand better and possibly remove. Also, I'd like any advice about a better way to do this without having to nudge things with a wrapped box. I have searched around for a while and tried many different approaches without good success, including `\begin{subeqnarray}` and `\begin{subequations}`.


title: change \sqrt symbol

text: I'm trying to change the sqrt sign into the glyph '317 of the following character map, that is the mathematical pi three font table. ![mathematical pi three font table](http://i.stack.imgur.com/2GIrd.png) I would use it only for non-large root, e.g `\sqrt{a}`, `\sqrt{5/2}` etc. So, I use this instruction                \DeclareMathRadical{\sqrtsign}{mathpi3}{'317}{largesymbols}{"70}      where `mathpi3` is the name of the alphabet that represents mathematical pi three font, and largesymbols the ordinary cmex font. Actually, it does not work correctly because I think I need to change also the overline of the root (e.g. using '267 or '167 glyphs). In fact, the output of this instruction is posted in the following picture ![the root](http://i.stack.imgur.com/g4orI.png) In addition, I think I may change the encoding of the font, in order to put the glyph on the correct position into the font table (the "70 one), but actually I'm not able to do this.


title: Which TeX should one start out with?

text: Ever since learning Vim, I've felt slow going in anything else. Lately I've been writing my notes and other small documents in Markdown using Vim. I've decided to to take it a step further by learning a TeX formatting language. I've read that ConTeXt is more _"Batteries Included"_ , with a consistent design unlike LaTeX which requires packages with a not so consistent design. LaTeX however, has many packages and tools, but then again LaTeX has many conflicts between packages. That is my understand between them so please correct me if I'm wrong. I'm kind of leaning towards ConTeXt because I also read on their site that it's easier to make my own design, in LaTeX I need to use one made by someone else because its so complicated. But I'm learning web design and development so if its really not much harder than CSS let me know. I'm also not sure if ConTeXt is good for the long run due to the lack of good documentation, and books. _An HTML converter could be very useful_ on couple projects in the the not so near future (a book with a PDF and Web version), and LaTeX looks to be in the lead here. ConTeXt converts to XML which means I will need to learn XSLT and more advanced stuff of XHTML to use. Since some LaTeX packages that I may or may not want to use might conflict with HTML conversion tools, I may not be able to covert to HTML very easily anyway. At this moment I'm very much undecided. It appears as if ConTeXt might be less of a headache to work with. LaTeX on the other hand has more learning material and tools that could let me do more. **So, as some one with experience, what do you think I would be best for me, or any other beginner, who has no experience in TeX whatsoever?** Also, if you recommend Latex, what back-end should I use? XeTeX, LuaTeX, pdfTeX? What packages should I use that are known to work well together?


title: Small problem with XeLaTeX

text: I downloaded this template from the internet, but now I don't get it to run properly. Can someone with more experience give me a hand? I think it is something small, but I can't figure it out.               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Plasmati Graduate CV     % LaTeX Template     % Version 1.0 (24/3/13)     %     % This template has been downloaded from:          %     % Original author:     % Alessandro Plasmati      %     % License:     % CC BY-NC-SA 3.0      %     % Important note:     % This template needs to be compiled with XeLaTeX.     % The main document font is called Fontin and can be downloaded for free     % from here:      %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %----------------------------------------------------------------------------------------     %   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS     %----------------------------------------------------------------------------------------          \documentclass[a4paper,10pt]{article} % Default font size and paper size          \usepackage{fontspec} % For loading fonts     \defaultfontfeatures{Mapping=tex-text}     \setmainfont[SmallCapsFont = Fontin SmallCaps]{Helvetica} % Main document font          \usepackage{xunicode,xltxtra,url,parskip} % Formatting packages          \usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors          \usepackage[big]{layaureo} % Margin formatting of the A4 page, an alternative to layaureo can be \usepackage{fullpage}     % To reduce the height of the top margin uncomment: \addtolength{\voffset}{-1.3cm}          \usepackage{hyperref} % Required for adding links   and customizing them     \definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color     \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document          \usepackage{titlesec} % Used to customize the \section command     \titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections     \titlespacing{\section}{0pt}{3pt}{3pt} % Spacing around sections          \begin{document}          \pagestyle{empty} % Removes page numbering          \font\fb=''[cmr10]'' % Change the font of the \LaTeX command under the skills section          %----------------------------------------------------------------------------------------     %   NAME AND CONTACT INFORMATION     %----------------------------------------------------------------------------------------          \par{\centering{\Huge John \textsc{Smith}}\bigskip\par} % Your name          \section{Personal Data}          \begin{tabular}{rl}     \textsc{Place and Date of Birth:} & Canada  | 20 November 1987 \\     \textsc{Address:} & 123 Broadway, City, State, Canada \\     \textsc{Phone:} & +1 111 1112\\     \textsc{email:} & \href{mailto:john@smith.com}{john@smith.com}     \end{tabular}          %----------------------------------------------------------------------------------------     %   WORK EXPERIENCE      %----------------------------------------------------------------------------------------          \section{Work Experience}          \begin{tabular}{r|p{11cm}}     \emph{Current} & 1\textsuperscript{st} year Analyst at \textsc{Lehman Brothers}, London \\     \textsc{Mar 2012} & \emph{Commodities Structured Trading}\\      & \footnotesize{Developed spreadsheets for risk analysis on exotic derivatives on a wide array of commodities (\textit{ags, oils, precious} and \textit{base metals}), managed blotter and secondary trades on structured notes, liaised with Middle Office, Sales and Structuring for bookkeeping.}\\     \multicolumn{2}{c}{} \\          %------------------------------------------------          \textsc{Jul 2010-Oct 2011} & Summer Intern at \textsc{Intech Inc}, Chicago \emph{}\\     & \footnotesize{Received pre-placed offer from the Exotics Trading Desk as a result of very positive review. Rated ``\emph{truly distinctive}'' for Analytical Skills and Teamwork.}\\     \multicolumn{2}{c}{} \\          %------------------------------------------------          \textsc{Jan-Mar 2011} & Computer Technician at \textsc{Buy More}, Burbank \emph{}\\     & \footnotesize{Worked in the Nerd Herd and helped to solve computer problems by asking customers to turn their computers off and on again.}     \end{tabular}          %----------------------------------------------------------------------------------------     %   EDUCATION     %----------------------------------------------------------------------------------------          \section{Education}          \begin{tabular}{rl}      \textsc{July} 2012 & Master of Commerce in \textsc{Finance}, \textbf{The University of California}, Berkeley\\     & 110/110 \small\emph{First Class Honours} | Major: Quantitative Finance\\     & Thesis: ``Money is the Root of All Evil - Or is it?'' | \small Advisor: Prof. James \textsc{Smith}\\     &\normalsize \textsc{Gpa}: 8.0/9.0\hyperlink{grds}{\hfill | \footnotesize Detailed List of Exams}\\     &\\          %------------------------------------------------          \textsc{July} 2011& Undergraduate Degree in \textsc{}\textsc{Business Studies} \\&110/110 \small\emph{Commerce Specialization}, \normalsize\textbf{The University of California}, Berkeley\\     & Heavily specialized in mundane paperwork | \small Advisor: Stefano \textsc{Bonini}\\     &\normalsize \textsc{Gpa}: 7.5/9.0 \hyperlink{grds_usc}{\hfill| \footnotesize Detailed List of Exams}\\     &\\          %------------------------------------------------          \textsc{Fall} 2008 & Exchange Semester at \textbf{University of Southern California}, Los Angeles\\     & \textsc{Gpa}: 8.0/9.0 \hyperlink{grds_usc}{\hfill| \footnotesize Detailed List of Exams}\\     &\\          %------------------------------------------------          \textsc{July} 2006& \textbf{Liceo Classico ``E. Duni''}, Matera | Final Grade: 100/100     \end{tabular}          %----------------------------------------------------------------------------------------     %   SCHOLARSHIPS AND ADDITIONAL INFO     %----------------------------------------------------------------------------------------          \section{Scholarships and Certificates}          \begin{tabular}{rl}     \textsc{Sept.} 2012 & Faculty of Science Masters Scholarship \footnotesize(\$30,000)\normalsize\\          \textsc{June} 2010 & {\textsc{Gmat}\textregistered}\setmainfont[SmallCapsFont=Fontin SmallCaps]{Fontin-Regular}: 730 (\textsc{q:50;v:39}) 96\textsuperscript{th} percentile; \textsc{awa}: 6.0/6.0 (89\textsuperscript{th} percentile)     \end{tabular}          %----------------------------------------------------------------------------------------     %   LANGUAGES     %----------------------------------------------------------------------------------------          \section{Languages}          \begin{tabular}{rl}     \textsc{English:} & Fluent\\          \textsc{Italian:} & Mothertongue\\          \textsc{French:} & Basic Knowledge\\     \end{tabular}          %----------------------------------------------------------------------------------------     %   COMPUTER SKILLS      %----------------------------------------------------------------------------------------          \section{Computer Skills}          \begin{tabular}{rl}     Basic Knowledge: & \textsc{php}, my\textsc{sql}, \textsc{html}, Access, \textsc{Linux}, ubuntu, {\fb \LaTeX}\setmainfont[SmallCapsFont=Fontin SmallCaps]{Fontin-Regular}\\          Intermediate Knowledge: & \textsc{vba}, Excel, Word, PowerPoint\\     \end{tabular}          %----------------------------------------------------------------------------------------     %   INTERESTS AND ACTIVITIES     %----------------------------------------------------------------------------------------          \section{Interests and Activities}          Technology, Open-Source, Programming\\     Paradoxes in Decision Making, Psychoanalysis, Behavioural Finance\\     Football, Travelling          %----------------------------------------------------------------------------------------          \newpage          %----------------------------------------------------------------------------------------     %   GRADE TABLES     %----------------------------------------------------------------------------------------          \par{\centering\Large \hypertarget{grds}{Master of Science in \textsc{Finance}}\par}\large{\centering Grades\par}\normalsize          \begin{center}     \begin{tabular}{lcc}     \multicolumn{1}{c}{\textsc{Exam}} & \textsc{Grade}&\textsc{Credit Hrs}\\ \hline     Corporate Finance (Valuation) & 25 & 6\\     Financial Statement Analysis & 28 & 6\\     Statistics & 27 & 6\\     Theory of Finance & 26 & 6\\     Quantitative Methods for Finance & 30 & 6\\     Econometrics & 24 & 6\\     Derivatives & 31 & 6\\     Management of Financial and Insurance Companies & 30 & 6\\     Business Law & 31 & 6\\     Investment Banking  & 28 & 6\\ \\            Behavioral Models for Economics and Finance  & 29 & 6\\     Numerical Methods for Finance & 29 & 6\\     Advanced Derivatives & 30 & 6\\     Fixed Income (Advanced Methods) & 30 & 6\\ \\     English Language & 30 & 4\\     French Language & 31 &  4\\      Internship & & 8\\           Final Thesis & & 20\\        & Total & 120\\\cline{2-3}     &\textsc{Gpa}&\textbf{8.0}     \end{tabular}     \end{center}     \bigskip     \hrule     \bigskip          %------------------------------------------------          \bigskip          \par{\centering\Large \hypertarget{grds_usc}{Exchange Program at \textsc{usc}, Los Angeles}\par}\large{\centering Grades\par}\normalsize          \begin{center}     \begin{tabular}{lcc}     \multicolumn{1}{c}{\textsc{Exam}} & \textsc{Grade} & \textsc{Grade Points}\\      \hline     Corporate Financial Strategy & A & 4\\     Derivatives & A & 4\\     Money, Credit, and Banking & A & 4\\     Business Strategy & A- & 3.5\\     & &\\\cline{2-3}     & \textsc{Gpa} & \textbf{3.875}     \end{tabular}     \end{center}          %----------------------------------------------------------------------------------------          \end{document}


title: change color of pgfplot bar plot

text: I want to plot two bar plots next to each other. This works without a problem. However both use the first color defined in a pre or selfdefined colorseries. I tried to modify the color manually in the plot, but the color and fill definitions have no effect:               \documentclass[border=5mm]{standalone}     \usepackage{pgfplots, pgfplotstable}          \begin{document}          \pgfplotstableread[header=false, col sep=comma]{      1, first item     5, second item     }\datatable          \begin{tikzpicture}       \begin{axis}[                 ,xbar         ,bar width=2ex, y=3ex         ,enlarge y limits={abs=0.75}         ,ytick={data} % (\empty,data,{coordinate list})         ,yticklabels from table={\datatable}{1}       ]       \addplot table [         ,red!20!black,fill=red!80!white,         y expr=-\coordindex, % Use negative coordinate index as y coordinate         x index=0 % Use first column as x coordinate       ] {\datatable};       \end{axis}     \end{tikzpicture}          \end{document}      The plot is still in the default blue.


title: Moderncv casual header - photo right, name and title on the left

text: I like the moderncv casual theme, but I would like to change the order of the photo and the name / title. I tried the solution described in this question: Modify moderncv header               ! Undefined control sequence.     \maketitle ->{{\firstnamestyle                                     {\@firstname}~\familynamestyle {\@familyname}...     l.33 \maketitle      Example code:               \documentclass[11pt,a4paper]{moderncv}          % moderncv themes     \moderncvtheme[blue]{casual}     \AtBeginDocument     {     % reverse the name and photo     \makeatletter     % maketitle     \renewcommand*{\maketitle}{%       {%         {\firstnamestyle{\@firstname}~\familynamestyle{\@familyname}}}%         \hfill%         \ifthenelse{\isundefined{\@photo}}%           {}%           {{\color{firstnamecolor}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}\\[-.35em]}%         {\color{firstnamecolor}\rule{\textwidth}{.25ex}\\[2.5em]}%     % optional quote       \ifthenelse{\isundefined{\@quote}}%         {}%         {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%       \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle     \makeatother     }          \firstname{John}     \familyname{Doe}     \title{Curriculum Vitae}         \address{Example Street}{12345 Exampe Town}     \photo{picture}          \begin{document}     \maketitle     \end{document}


title: Problem controlling vertical alignment of minipage containing only math

text: I would like to insert a large box containing maths into a line of text and align the box with the top of main line. Strangely, the argument "[t]" gets ignored in the first example below (the second works as expected):               Beginning of line     \begin{minipage}[t]{40mm}\raggedright     $x = \begin{cases} 0 & \text{blah} \\ 1 & \text{blah} \end{cases}$     \end{minipage}     rest of line.          Beginning of line     \begin{minipage}[t]{4cm}\raggedright     (things work fine as long as the content is text)     \end{minipage}     rest of line here


title: Trouble creating properly aligned matrix within a matrix

text: I'm trying to insert parentheses around a group of elements creating a matrix within a larger matrix. So far I have this:               \begin{equation}     \begin{bmatrix}     \begin{matrix}     0 & 0 \\     0 & \omega_0 \\     -\omega_0 & 0 \\     0 & 0     \end{matrix} &     \begin{matrix}     -\frac{p_1}{2} & -\frac{p_2}{2} & 0 \\     0 & 0 & \frac{p_2}{2} \\     -\frac{p_2}{2} & \frac{p_1}{2} & 0 \\     \end{matrix} \\     \begin{matrix}     0 & 0 \\     0 & 0 \\     0 & 0     \end{matrix} & \omega_0 \mathbf{I}^{-1}     \begin{pmatrix}     I_{yx} & (I_{yy} - I_{zz}) & 2 I_{yz} \\     (I_{zz} - I_{xx}) & -I_{xy} & -2 I_{xz} \\     -I_{yz} & I_{xz} & 0     \end{pmatrix}     \end{bmatrix}     \end{equation}      Basically, it's four smaller matrices combined into one larger one. However, the elements aren't aligned between these matrices. Sorry there's no picture, I don't have the reputation yet to include one.


title: LaTeX - tables, multirow with non integer number of rows

text: **Editted to provide a clearer example** Basically I want to make a table that in one column has a series of dates and the second and third columns have a series of objectives for that date. However the number of elements in the second and third column are not the same, and do not share a common factor, however I want all three columns to be equally spaced vertically. In other words the vertical distance between the `2011-2012` should be the same to both `Training 1` and `Training 2`, and they should be between the Objectives. So, for example, what I want to do is:               \begin{tabular}{|l c c|}         \hline         Year & Objective & Training \\         \hline         \multirow{5}{*}{2011-2012} & Objective 1 & \multirow{1.5}{*}{Training 1} \\                              & Objective 2 &                               \\                              & Objective 3 & \multrow{1.5}{*}{Training 2}  \\         \hline     \end{tabular}      To look something like:                            Year         Objective     Training                               Objective 1                                             Training 1                  2011-2012    Objective 2                                             Training 2                               Objective 3      But with the vertical space between `Objective`s compressed. Obviously this doesn't work as multirow expects an integer number. Is there another command where a non-integer number would work, or a work around to get the effect that I desire. What is the best way of doing something like this? **Additional edit** This needs to be scalable, so that I can take any three numbers I choose and be able to make an evenly spaced table e.g. ![enter image description here](http://i.stack.imgur.com/W3CwH.png) The colours do not need to be replicated, they are merely illustrative (plus are easy enough to do via colorx). The top row are the titles, the multi- coloured segments are columns with a different number of elements (the number of elements in each column is stated in the title).


title: Problems with theorem/definition/statement numbering

text: I have theorems, definitions, statements, that look like as follows \section{1} \subsection{1} Theorem 1.1.1 .... Statement 1.1.2 .... Definition 1.1.3.... \subsection{2} Theorem 1.2.1 .... Statement 1.2.2 .... Definition 1.2.3.... * * * Instead of it, I want to have this: \section{1} \subsection{1} Theorem 1.1 .... Statement 1.2 .... Definition 1.3.... \subsection{2} Theorem 2.1 .... Statement 2.2 .... Definition 2.3.... * * * i.e in my document I do not need at all section numbering in these environments. What shall I to do?


title: Bibliography using the combine class

text: I am using the `book` option of the `combine` class. When I format the following example, the citations typeset as `[0,0]` instead of `[1,2]`. The bibliography items all begin with zero. I did not import a file in my posted example, but the same thing happens to imported files. I would like a solution to this problem.               \documentclass[book]{combine}     \usepackage[numbers]{combnat}     \begin{document}     \title{The collection}     \author{A. N. Editor}     \date{\today}     \maketitle     \tableofcontents     \chapter{First chapter}     \section{Introduction}     Chapter citations: \cite{article01, article02}.     \bibliographystyle{plainnat}     \begin{thebibliography}{2}       \providecommand{\natexlab}[1]{#1}       \providecommand{\url}[1]{\texttt{#1}}       \expandafter\ifx\csname urlstyle\endcsname\relax       \providecommand{\doi}[1]{doi: #1}\else       \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi       \bibitem[Name(1986)]{article01}       Author Name.       \newblock My article.       \newblock \emph{Mathematics}, 1986.            \bibitem[Two(1987)]{article02}       Author Two.       \newblock Another article.       \newblock \emph{Statistics}, 1987.     \end{thebibliography}     \end{document}


title: Change equation font to Times New Roman?

text: How would I change equation font in the `\begin{equation}` environment to Times? For instance, I use this code in LaTeX:                   \begin{equation}         \begin{split}         {L_{CML}}\left( \theta  \right) &= \,\Biggl( {\prod\limits_{g = 1}^{QSJ - 1} {\prod\limits_{g' = g + 1}^{QSJ} {P\left( {{{\left[ y \right]}_g} = {{\left[ m \right]}_g},{{\left[ y \right]}_{g'}} = {{\left[ m \right]}_{g'}}} \right)} } } \Biggr)\\         &= \Biggl( {\prod\limits_{g = 1}^{QSJ - 1} {\prod\limits_{g' = g + 1}^{QSJ} {\,\,\,\Biggl[ \begin{split}         \,\,\,{\Phi _2}({{\tilde \vartheta }_g},{{\tilde \vartheta }_{g'}},{\nu _{gg'}}) - {\Phi _2}({{\tilde \vartheta }_g},{{\tilde \phi }_{g'}},{\nu _{gg'}})\\          - {\Phi _2}({{\tilde \phi }_g},{{\tilde \vartheta }_{g'}},{\nu _{gg'}}) + {\Phi _2}({{\tilde \phi }_g},{{\tilde \phi }_{g'}},{\nu _{gg'}})         \end{split} \Biggr]} } } \Biggr),         \end{split}         \end{equation}      I'm currently facing the following issues:   1. The equations are in cmr font. How to make it Times New Roman only for the equation environment? When I use `\usepackage{times`} outside the entire document font gets changed.   2. I cannot bold and italicize certain elements at once. Also, the Greek letters like nu in the equation cannot be bold and italicized at once.    3. How can I undo the centering of the equation environment? Can it by any chance be made left aligned?    4. How can I make the equations more compact? I find that certain equations which sits nicely in Word when I use MathType overflows the paragraph limits in LaTeX. I use the `amsmath` package for the equations.


title: cross-referencing figures : Any way to use Fig. instead of figure

text: I'm using `IEEEtran.cls` to produce an article. When setting captions on figures, the text begins with > Fig 1. (for example). However, when I reference this figure by using `\ref{img:something}`, this is rendered to > figure 1 Is there a way to tweak the `\ref` command so that it be consistent with captions?


title: Roman numerals at the bottom

text: I'm quite struggling with footers. After hours spent trying to customize usepackage{fancyhdr} and pagestyle{fancy}, I decided to create as simple document as possible. Something reminding picture below. ![enter image description here](http://i.stack.imgur.com/LfIQo.jpg) Unfortunately, when I use               \documentclass[a4paper,12pt,titlepage,oneside,final]{book}     \begin{document}          \frontmatter     \begin{titlepage}     {\bf Titlepage}     \end{titlepage}          \newpage     \thispagestyle{empty}     {\bf included pdf}          \newpage     {\bf declaration}          \newpage     {\bf Acknowledgement}          \newpage     \thispagestyle{empty}     {\bf included pdf}          \tableofcontents               \mainmatter     \chapter*{introduction}     \addcontentsline{toc}{chapter}{introduction}          \chapter{1st chapter}          \end{document}      two problems occur: 1) Roman numerals (i - iv) are placed in the header, on the right. Maybe it's more convenient, I'm not sure - I would rather put them at the bottom if possible. 2) Final .pdf file starts with 1 instead of i (or nothing for titlepage). I would expect pages to be denoted by Arabic numerals since Introduction. Do you have any clue? Thanks for your time!


title: Annotated bibliography in html with BiBTeX?

text: I am looking to create an annotated bibliography as a basic `html` page similar to this but with hyperlinks to each publication using its DOI or URL field. Is there any existing script to generate something of this sort from entries in a .bib file? I imagine this could be accomplished with `htlatex` but would prefer a simpler solution if possible.


title: Create New Type of Align Environment with Unique Counter

text: I am trying to typeset some chemical equations in my thesis, and I would like to have the chemical equations have a unique counter from regular equations. I also need to have some of them align over the -> . I know I can use \cee{} from the mhchem package within the align environment, but I don't know to separate the counters. I tried fiddling with creating a new environment, but couldn't get it to work right at all (first time trying that out...). I would love to have an aligned environment "chemical" that did all this. Thanks in advance for any help!


title: skim cannot reload file after auctex preview-latex

text: I am using emacs+skim to preview latex on macs, and I use auctex preview-latex from time to time. the problem is, after I run `C-c C-p C-d` in emacs to preview entire document, the pdf file is now deleted, and skim show a bunch of formulas (as Sumatra does on Windows). Then I recompile and run `C-c C-v` to see file in skim, but skill still shows a bunch of formulas in separate pages. While in Sumatra, it shows immediately the newly compiled pdf file, despite that it was deleted a while ago due to preivew-latex. Is there a way to fix this on mac? p.s. This seems only to happen when the entire document is previewed in emacs, for example, `C-c C-p C-e` does not cause this problem. At first skim ask permission to revert for every newly generated pdf file, but the "secret preference" mentioned in the post resolves the issue.


title: Hyphens in mathmode

text: Whenever I write a hyphenated word inside `\mathit` or `\mathbf` or whatever ...               \mathit{long-variable-name}      ... I _always_ intend for the hyphens to be hyphens, not minus signs. There is a webpage giving several workarounds for this (http://www.logic.at/staff/salzer/etc/mhyphen/), but I would like a proper solution where I don't have to write monstrosities like               \mathit{long\mhyphen{}variable\myhyphen{}name}      My vision is to redefine the `\mathit` command (and its cousins) so that when `-` appears in its argument, it is automatically replaced with whatever command is necessary to produce a hyphen.   * Is this possible?   * Might doing so cause problems? I mean, do people ever put a whole _formula_ inside `\mathit`? ('Cause then you _would_ want the `-` to produce a minus.)


title: How to limit the figure caption width?

text: Figure captions seem to wrap at the page width. How could I make them wrap at the figure width instead? Currently, they can easily be mistaken for normal text.               \begin{figure}[!htb]         \begin{center         \begin{tikzpicture} ... \end{tikzpicture}         \caption{Caption goes here.}         \end{center}     \end{figure}      ![pdf example](http://i.stack.imgur.com/96ykw.png)


title: Bibtex warning: There is a number but no volume in ...?

text: I always get this warning from using Bibtex : **There is a number but no volume in ... Empty journal in ...** Could anyone tell me what is wrong here, how to correct this? I am using TeXnicCenter and MikTeX package.


title: Wrapping text around a pdf

text: I am making a poster and have an image which is of PDF format. I want the picture to be to right of the block it is in and the text to run down the left hand side of it? I have searched but can not get anything to work for me In response to the first comment I have now tried                \begin{minipage}{0.5\textwidth}      \includegraphics[scale=2]{BOB.pdf}      \end{minipage}      But I get the image in the center of my box rather than to the right hand side. MWE: `               \documentclass[final,hyperref={pdfpagelabels=false}]{beamer}     \mode<presentation> { \usetheme{Berlin} \usetheme{Dreuw} }      \usepackage{times}      \usepackage{amsmath,amsthm, amssymb, latexsym}      \boldmath      \usepackage{wrapfig, graphicx, upgreek}      \usepackage[english]{babel}      \usepackage[latin1]{inputenc}      \usepackage[orientation=landscape,size=a0,scale=1.4,debug]{beamerposter}          \begin{document}     \begin{frame}{}          \begin{columns}[t]         \begin{column}{.30\linewidth}         \begin{block}{Monte Carlo Technique}                When we have..accuracy through looking at the proportion of points inside and outside the circle.          \begin{wrapfigure}[13]{r}{0.4\textwidth}         \includegraphics[width=0.4\textwidth]{BOB.pdf}          \end{wrapfigure}         The Monte Carlo ....vvfvfdv           \end{block}              \end{column}          \end{columns}     \end{frame}{}     \end{document}


title: Are there limits to the number of new macros or commands in TeX/LaTeX

text: Is there a maximum number of new definitions such as               \def\myNewDefA{foo}     \def\myNewDefB{bar}     ...     \newcommand\myNewMacroA{foo}     \newcommand\myNewMacroB{bar}      one can have in a document typeset with pdflatex?


title: Header not displaying correctly on chapter page due to subsection

text: (Complete source code below.) (Note: Not sure if I am using LaTeX or just TeX. I am editing with TeXworks, as TeXStudio was not rendering what I typed without +20 seconds of lag.) I apologize if this question has already been asked. I searched tex.stackexchange.com, the internet, and the `fancyhdr` documentation, but could not find the solution. Simply put, I used `fancyhdr` to setup headers, however the chapter pages are not displaying correctly, despite using `fancyhdr` to redefine the `plain` style. The best clue I could get from the `fancyhdr` documentation was the following: > Another problem with the marks in the standard LATEX classes is that the > higher level sectioning commands (e.g. \chapter) call \markboth with an > empty right argument. This means that on the ﬁrst page of a chapter (or a > section in article style) the \rightmark will be empty. If this is a problem > you must manually insert extra \markright commands or redeﬁne the > \chaptermark (\sectionmark) commands to issue a \markboth command with two > decent parameters. I am not clear how to implement this solution, despite many attempts. * * * In detail, this is what I am trying to do (the bold items are causing problems):   1. Left Header: [Author's Name]   2. Right Header: [Book Author's Name]>["Chapter"+Chapter#]>[Subsection Name]   3. **The same Header must show on all pages, including the chapter pages** , and excluding the Table of Contents. **[For solution, see egreg's response.]**   4. Subsections must not be automatically numbered, i.e., they must be "* commands".   5. Subsections must appear in Table of Contents, despite being "* commands". P.S. **[Solved, see solution below:]** Is there a way (1) to not have the subsections automatically numbered and (2) included in the Table of Contents, yet not have to input each subsection title three times? Just curious. See below:               \subsection*{Title of Subsection 3\markright{Title of Subsection 3}{}}     \addcontentsline{toc}{subsection}{Title of Subsection 3}      Solution #1 (Simplest): In preamble, write `\setcounter{secnumdepth}{1}`. Solution#2: In preamble, create a new command by writing:               \newcommand{\newsubsection}[1]{\subsection*{#1\markright{#1}}%         \addcontentsline{toc}{subsection}{#1}}      To save everyone some time compiling, on the left is the chapter page, and on the right shows what the chapter page header should look like this: ![Problem: Header on Chapter Page](http://i.stack.imgur.com/4WHTf.png)               \documentclass{report}          % PACKAGES     \usepackage{fancyhdr}     \usepackage{lastpage} % Allows referencing of the last page to allow footer to read: "Page [Current page] of [Total number of pages]."     \usepackage{comment} % Allows comments of the type: \begin{comment}This text is commented out.\end{comment}     %\usepackage[colorlinks=true]{hyperref} % Turns table of contents and labels into clickable links. Commented out to speed up compiling.     \usepackage[T1]{fontenc} % Allows use of ">" symbol.     \usepackage{lmodern} %Not really sure what this is for.          % FORMATTING     % Header and Footer     \pagestyle{fancy}          % Allows calling chapter and section names in headers and footers.     \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter}{}}     \renewcommand{\subsectionmark}[1]{\markright{#1}{}}          % General Header and Footer     \lhead{\DocumentAuthor}      \chead{}     \rhead{\BookAuthor>\leftmark>\rightmark}     \lfoot{}     \cfoot{}     \rfoot{Page \thepage\ of \pageref{LastPage}}          % Chapter Header and Footer     \fancypagestyle{plain}{%      \lhead{\DocumentAuthor}      \chead{}     \rhead{\BookAuthor>\leftmark>\rightmark}     \lfoot{}     \cfoot{}     \rfoot{Page \thepage\ of \pageref{LastPage}}}          % Header/Footer Separation-line Width     \renewcommand\headrulewidth{0.5pt}      \renewcommand\footrulewidth{0.5pt}          \setlength\parindent{0pt} % Remove paragraph indentation.          % NAME AND CLASS SECTION     \newcommand{\DocumentAuthor}{Author Name}     \newcommand{\BookAuthor}{Book Author}          %DOCUMENT     \begin{document}          \tableofcontents{}     \thispagestyle{empty}          \chapter{Title of Chapter 1}     \section{Sample Problems}     \subsection*{Title of Subsection 1\markright{Title of Subsection 1}{}}     \addcontentsline{toc}{subsection}{Title of Subsection 1}     \pagebreak{}     \subsection*{Title of Subsection 2\markright{Title of Subsection 2}{}}     \addcontentsline{toc}{subsection}{Title of Subsection 2}     \subsection*{Title of Subsection 3\markright{Title of Subsection 3}{}}     \addcontentsline{toc}{subsection}{Title of Subsection 3}     \pagebreak{}     \subsection*{Title of Subsection 4\markright{Title of Subsection 4}{}}     \addcontentsline{toc}{subsection}{Title of Subsection 4}          \end{document}


title: How can I change the colour of my document's section numbering?

text: I know how to change the colour of a section name using for example               \section{\color{Red} Foobar}      but that still leaves the section number in black. Is there any way to change the colour of the numbers of the sections, subsections, etc?


title: PDFs included by XeLaTeX are rotated

text: When I include an image in pdf format, the image in the file is normal when compiling with pdfLaTeX, but it is rotated counterclockwise 90 degree when using XeLaTeX. The questions are:   1. Why?   2. How to avoid this? I don't mean using the option of `angle=-90` of the command `\includegraphics`.               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \includegraphics{impact1}     \end{document}      ![impact1](http://i.stack.imgur.com/xTCfs.png)


title: Macro to outline a cell in pgfplotstable

text: Still struggling with the `\expandafter` and `\noexpand` tex macros. I'm trying to put a table together using `pgfplotstable`. In this case the code is something like               \documentclass{article}     \usepackage{pgfplotstable}          \def\outline{\noexpand\fbox{{##1}}}          \begin{document}     \pgfplotstableread[row sep=\\,col sep=&,header=false]{%     1 & 2 & 3 & 4\\%     5 & 6 & 7 & 8\\%     9 & 10 & 11 & 12\\%     }\mytable          \pgfplotstabletypeset[     debug,     column name={},     every row 2 column 1/.style={postproc cell content/.style={@cell content=\outline}}     ]\mytable          \end{document}      and gives the error `you can't use macro parameter character in horizontal restricted mode`. I f I escape the `##1` it replaces cell contents with `##1`. What I'm trying to do is eventually have a line that says something like: `every row 2 column 1/.style=\outline` and a macro along the lines of               \def\outline{%     \{postproc cell content.style=%     \{@cell content=\noexpand\fbox{##1}\}\}}      What am I doing wrong?


title: How to make a "template" for beamer?

text: I think that what I would like to do is a class file, however beamer is a latex class, so I'll try the long description: I have written quite a few commands to make a beamer document look the way I like. I have to actually write some more and add conditionals so that it can look in one of the two ways I like, and allow to configure it, and configure the colors (theme?). I would like to put all those commands in a single file so that it is easy to reuse (by me and possibly other people, if they are fear no errors or bugs). AFAIK, a document has only one class, therefore I should do something different. I think it may be possible to define a `.sty` file and use it with `\usepackage`, this would allow to use options to configure the behaviour of the poorly written and insanely overcomplicated file. I may be wrong, though. The question is twofold: What should I do and how can I do that? For the first, I guess it's a .sty but I may be completely wrong, for the second, the url of a tutorial or example would probably be the best option. Thank you.


title: TikZ: remove margin, padding, border around nodes containing images

text: I want to create a simple figure where images are connected with arrows. Here is what I did:               \begin{tikzpicture}     \node[](A) {\includegraphics[width=0.2\textwidth]{a}};     \node[right=1mm of A](B) {\includegraphics[width=0.2\textwidth]{b}};     \draw[->] (A) to (B);     \end{tikzpicture}      ![example](http://i.stack.imgur.com/cgS1w.png) But I want the arrow to start and end right at the images with no space between. How can I do that?


title: How to force alignment of "cases" brackets in an enumerate environment?

text: I am using the `enumitem` and `amsmath` packages to give the recursive definition of the valuation function $\nu$ for classical first order logic. The way I have it set up, the brackets of the cases are not aligned (due to differences in length of the expressions preceding the cases brackets). Here is the MWE:               \documentclass[12pt]{scrartcl}     \usepackage{enumitem}     \usepackage{amsmath,amssymb}          \begin{document}          \begin{enumerate}[noitemsep,label=\alph*)]          \item $\nu(A      \wedge B) = \begin{cases}     1,&\text{if $\nu(A) = \nu(B) = 1$};\\     0,&\text{otherwise.}\end{cases}$     \item $\nu(A \vee B) = \begin{cases}     1,&\text{if $\nu(A) = 1$ or $\nu(B) = 1$};\\     0,&\text{otherwise.}\end{cases}$     \item $\nu(A \rightarrow B) = \begin{cases}     1,&\text{if $\nu(A) = 0$ or $\nu(B) = 1$};\\     0,&\text{otherwise.}\end{cases}$     \item $\nu(A \leftrightarrow B) = \begin{cases}     1,&\text{if $\nu(A) = \nu(B)$};\\     0,&\text{otherwise.}\end{cases}$     \item $\nu(\forall xA) = \begin{cases}     1,&\text{if for all $d \in D, \nu(A_x(c_d)) =1$;}\\     0,&\text{otherwise.}     \end{cases}$         \item $\nu(\exists xA) = \begin{cases}     1,&\text{if for some $d \in D, \nu(A_x(c_d)) =1$;}\\     0,&\text{otherwise.}     \end{cases}$         \end{enumerate}          \end{document}      I would like for the brackets to be aligned down the page, ideally without creating too much ugly spacing elsewhere.


title: Creating .dat files and reading a .dat file in pgfplots

text: The first question I have, is about creatinga .dat file in Mac. How can I create a file containing columns of data with .dat format in Mac OS Lion? What I did was to create the file using TextEdit, save it with extension .dat.rtf and then go to "get info" of the file and change the .rtf part. Is there any better way? And second question is: How can I refer to a .dat file in a different folder in pgfplots? the `/Users/.../filename.dat` seems doesn't work. I really appreciate your help. Cheers


title: How to iterate over a comma separated list?

text: **How can I iterate, loop, process, or otherwise do _something_ , with each element from a comma separated list of things?** This question has been asked perhaps many many times, and the are already lots of very good answers everywhere. However I think it would also be valuable to have a single reference point where all such alternative techniques are explained in detail, with their advantages and disadvantages discussed. All of plain-TeX, LaTeX, LaTeX3, LuaTeX, Context, etoolbox, pgffor, etc. answers are invited. Please consider explaining, for example:   * How does the command/method deal with whitespace around items?   * How does the command/method deal with empty/missing items? (e.g. `a,b,,c`)   * How does the command/method deal with a trailing comma?   * Can the command/method work of a list stored on a macro?   * Is each iteration evaluated globally or on a local group? (i.e., if a command is defined during an iteration, does the command survive the loop?)   * Do items get expanded or somehow mangled before being processed?   * What about lists where items are `key=value` or some other kind of pairs?   * Does the method work for lists separated with something other than a comma?   * Any other thing I should know before deciding to use this method?


title: Make lines disappear, pst-solides3D

text: I'm drawing the following cylinder which represents a water flowing and cooling down               \documentclass[a4paper,10pt]{article}     \usepackage{pstricks}     \usepackage{auto-pst-pdf}     \usepackage{pst-solides3d}     \usepackage{xcolor}     \usepackage{epstopdf}     \usepackage[english]{babel} %change language if necessary     \usepackage[english,verbose]{layout}%change language if necessary          \begin{document}          \begin{pspicture}(-3,-4)(3,4)      \psset{viewpoint=50 50 20 rtp2xyz,Decran=50,lightsrc=viewpoint      }       \psset{color1=cyan,color2=red}       \psSolid[h=8,r=0.5, object=cylindre, ngrid=50 15, RotZ=30,     hue =1 0 0 0 0 1,linewidth=0.01pt ](0,0,-2.5)  \end{pspicture}          \end{document}      I would like the black lines to disappear, or atleast partially merge with the image. Is there anyway to perform this ?


title: When using colortbl, column is still white. What am I doing wrong?

text: It is probably apparent I'm trying to color the last column green, but for me, it shows up as white still. Also, if I understand correctly '>' is just used by `tabularx` for demarcating formatting information?               \documentclass[compress,red,notes]{beamer}          \usepackage{tabularx}     \usepackage{xcolor}     \usepackage{colortbl}          \definecolor{Green}{rgb}{0,1,0}          \begin{document}          \frame{\frametitle{Performance}          \begin{figure}     \centering     \resizebox{\textwidth}{!}{%     \begin{tabular}{lrrrrrrrr>{\columncolor[rgb]{Green}}r}     \textbf{(a)} \hspace{1.2cm} & Max. $\mu$ & Model &       Standard FBA & Fitted FBA & GIMME & iMAT & Lee et al. & FALCON\\      & 75 \%& Yeast~5 MC & 0.66 & 0.66 & NaN  & 0.57 & 0.64 & 1 \\      & 75 \%& Yeast~7 MC & 0.66 & 0.66 & 0.68 & 0.66 & 0.66 & 0.98\\      & 75 \%& Yeast~5 HC & 0.73 & 0.78 & 0.75 & 0.66 & 0.98 & 0.99\\     Pearson's r      & 75 \%& Yeast~7 HC & 0.70 & 0.70 & 0.80 & 0.66 & 0.98 & 0.99\\      & 85 \%& Yeast~7 MC & 0.62 & 0.62 & 0.65 & 0.62 & 0.62 & 0.97\\      & 85 \%& Yeast~5 HC & 0.88 & 0.89 & 0.9  & 0.81 & 0.99 & 0.99\\      & 85 \%& Yeast~7 HC & 0.67 & 0.67 & 0.87 & 0.62 & 0.98 & 0.98\\     \end{tabular}}     \caption{Here is a caption.}     \label{tab:FalcPerf}     \end{figure}     }          \end{document}


title: Referencing in multienum package

text: Can you reference the counter when using the `multienum` package? See MWE below:               \documentclass{article}     \usepackage{multienum}          \begin{document}          \begin{multienumerate}     \mitemxxx{Not\label{test1}}{Linear}{Not\label{test2}}     \end{multienumerate}     \ref{test1} \ref{test2}     \end{document}


title: Double unwanted arrow tip in Tikz

text: I'm trying to make an arrow with a round tip. The arrow comes exactly as I want it except that it gets a double tip, while I want only one. I checked the code multiple times but without success, maybe it's a default option? Here is the picture of the section (ignore the style, it's very spartan since it's a minimal code): ![double arrow tip](http://i.stack.imgur.com/FJMeI.png) And here is the code:               \documentclass[10pt]{article}     \usepackage[a4paper, margin=1cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage{rotating}     \usepackage{pgfplots}     \usepackage{tikz}     \usetikzlibrary{arrows,backgrounds,snakes}          \pgfplotsset{compat=1.7}     \pagestyle{empty}     \begin{document}              \tikzset{     proar/.style={         draw=black,         -*,         fill=green,         }}               \begin{tikzpicture}[y=-6.6mm]                     \centering                  \filldraw[fill=white, midway, draw, inner sep=1pt] (8.2,-1) rectangle (8.8,5.5);                  \foreach \y [evaluate=\y as \year using int(1700+\y*10)] in {0,1,...,5}{                           \draw[] (8.5,\y) -- (8.5,\y) node[font=\scriptsize] {$\year$};                      \draw[] (8,\y) -- (8.2,\y);                     \draw[] (8.1,\y+.5) -- (8.2,\y+.5);                     \draw[] (8.8,\y) -- (9,\y);                     \draw[] (8.8,\y+.5) -- (8.9,\y+.5);                     }                  \draw[proar] (8.8,3) edge[out=0,in=180] (10,5) node[right] at (10,5) {random text};                  \end{tikzpicture}          \end{document}


title: Correct indented sections in Beamer's TOC

text: Following Indent subsections in Beamer's TOC and The LaTeX Beamer Class / Bugtracker / indentation in table of contents - ID: 2882539 I want to correct the behavior that if a section-title exceeds the current line, the new line is not indented correctly - the new line should be aligned with the first line (the text of it, not the bullet). ![example result](http://i.stack.imgur.com/tZE9U.png) Example (see above for result):               \documentclass[xcolor=x11names,compress]{beamer}               %% Beamer Layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \useoutertheme[subsection=false,shadow]{miniframes}     \setbeamertemplate{footline}[page number]     \useinnertheme{default}     %\usefonttheme{serif}     \usepackage{palatino}          \setbeamerfont{title like}{shape=\scshape}     \setbeamerfont{frametitle}{shape=\scshape}          \setbeamercolor*{lower separation line head}{bg=DeepSkyBlue4}      \setbeamercolor*{normal text}{fg=black,bg=white}      \setbeamercolor*{alerted text}{fg=red}      \setbeamercolor*{example text}{fg=black}      \setbeamercolor*{structure}{fg=black}           \setbeamercolor*{palette tertiary}{fg=black,bg=black!10}      \setbeamercolor*{palette quaternary}{fg=black,bg=black!10}           \renewcommand{\(}{\begin{columns}}     \renewcommand{\)}{\end{columns}}     \newcommand{\<}[1]{\begin{column}{#1}}     \renewcommand{\>}{\end{column}}     \setbeamertemplate{section in toc}[sections numbered]          %% Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}          \begin{frame}{Agenda}     \setcounter{tocdepth}{1}     \tableofcontents     \end{frame}          \begin{frame}     \section{\scshape This is an example for a very very long Sectiontitle bla bla bla}          \end{frame}          \begin{frame}     \section{\scshape Short Title2}          \end{frame}          \end{document}


title: Continuous numbering of custom float with caption package

text: I defined a custom environment that allows me to define mathematical problem statements and puts them in a box. Since I have quite a few of them in my report, I decided to properly caption them, which also allows me to refer back to the problems with `cleveref`. Here is my code [1]:               \usepackage{xparse}     \usepackage{xcolor}     \usepackage{caption}     \usepackage{cleveref}          \definecolor{problemgray}{gray}{0.9}          \DeclareCaptionType{problem}[Problem][List of Problems]     \crefname{problem}{Problem}{Problems}     \Crefname{problem}{Problem}{Problems}          \newsavebox{\tmpbox}     \NewDocumentEnvironment{problembox}{mo}{%         \noindent%         \begin{lrbox}{\tmpbox}%             \begin{minipage}{0.9\textwidth}%                 \par\noindent%             }{%             \end{minipage}\end{lrbox}%         \begin{center}%             \captionof{problem}{#1}%             \vspace{0.25em}%             \setlength{\fboxsep}{0.5em}             \colorbox{problemgray}{\usebox{\tmpbox}}%             \ifthenelse{\equal{#2}{}}{                 %             }{                 \label{#2}%             }         \end{center}     }      The format is thus: `\begin{problembox}{<problem caption>}[<optional label>]`. In this way, the problems are currently numbered per chapter, e.g. Problem 2.1, Problem 2.2, etc. However, most of my problems build upon each other. Thus my question,   **How can I get`caption` to continuously number custom floats rather than per chapter?** [1] Note that I lied: The boxes are actually not floats, but I could make them floats the way I set them up. I just wanted to have a captioned but fixed environment. _Bonus question:_ How can I allow page breaks within a problem using my code?


title: Loading latex from tex

text: I decided venture into the very basics of the world of TeX and LaTeX. I have been playing around with `tex`, `pdftex` and `latex` and after paying close attention to the binaries and not being able to figure out what is going on I decided it was time to come and ask for help from someone with knowledge. ## `latex` == `pdftex` Are the `latex` and `pdftex` binaries the same? I am using Mac OS X 10.7.5 and this is what I have from the terminal:               jmlopez$ which pdftex     /usr/texbin/pdftex     jmlopez$ ls -al /usr/texbin/pdftex     -rwxr-xr-x  1 root  wheel  1662700 Jun 21  2011 /usr/texbin/pdftex      This tells me that pdftex is an actual binary which I can execute. Let us take a look at `latex`:               jmlopez$ which latex     /usr/texbin/latex     jmlopez$ ls -al /usr/texbin/latex     lrwxr-xr-x  1 root  wheel  6 Feb 13  2012 /usr/texbin/latex -> pdftex      It seems that `latex` is a symbolic link to `pdftex`. So in reality, `latex` and `pdftex` and even `pdflatex` are the same program, that is `pdftex`. ## `pdftex` The next set of commands displays what happens when I submit commands to pdftex:               jmlopez$ pdftex     This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)      restricted \write18 enabled.     **\relax     entering extended mode          *\show\newcommand     > \newcommand=undefined.     <*> \show\newcommand          ?       `pdftex` is not `latex` since it doesn't know the definition of `\newcommand`. But now let us see what happens with `latex`. ## `latex`               jmlopez$ latex     This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)      restricted \write18 enabled.     **\relax     entering extended mode     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,      icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or     iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,      lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol     ish, portuguese, romanian, russian, sanskrit, serbian, serbianc, slovak, sloven     ian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded     .          *\show\newcommand     > \newcommand=macro:     ->\@star@or@long \new@command .     <*> \show\newcommand          ?       From the first line when you enter `latex` and `pdftex` you can see that it is the exact same program. The only difference is that `pdftex` somehow knows that when it is executed as the symbolic link `latex` then it needs to load all the `latex` definition. Definitions which include the `\newcommand` macro. ## Loading `latex` from `pdftex` or `tex` My actual question is, given that I have executed `pdftex` or `tex`, how can load `latex` so that all the macros that `latex` defines are available in `pdftex`? The reason I wish to know this is because I want to find the actual files that defines all of these macros so that I can try to have a better understanding of what is going on when I use the command `latex`. I wish to know how `latex` defines all of its enviroments and how it knows where to look for its packages. Those may be other question for the future, but for now I just want to know if it is possible to load the `latex` macros from `pdftex` or `tex`.


title: Embedded PDF viewer in Texmaker not working correctly

text: I am new to LaTeX world. I have set Texmaker (installed on windows 8.1) to show source editor and embedded pdf viewer on same window. Now whenever I Press "Run", the embedded PDF viewer window do not show the output PDF. It only display the output PDF whenever i reopen it by "File>Open Recent". I have posted a screenshot regarding this, I deleted the equation in my sample document and saved it and pressed "RUN" but right window did not show the changes made by me. It is still showing the equation deleted previously. ![enter image description here](http://i.stack.imgur.com/qu7cU.png) any help on this?


title: Using remember picture with pgfplots

text: The two rectangles in the example plot, by my reckoning, should overlap exactly. I would be most grateful if somebody could explain why they don't! My presumption is that this is a bug in my TikZ version (2.10), however downloading the latest TikZ didn't alleviate the problem. Thanks               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}          Version (\pgfversion)          \begin{tikzpicture}[remember picture]     \begin{axis}     \addplot coordinates { (0,0) (1,1) };     \coordinate (X) at (axis cs:0.5,0.5);     \node [anchor=north east, draw, inner sep=5mm, red] at (axis cs:0.5,0.5){};     \end{axis}     \end{tikzpicture}     \begin{tikzpicture}[remember picture, overlay]     \node [anchor=north east, dashed, draw, inner sep=5mm, green] at (X) {};     \end{tikzpicture}     \end{document}      ![Screenshot of document](http://i.stack.imgur.com/yTKSD.png)


title: Include political map in beamer-presentation and emphasize one country

text: Following Political Map in LaTeX I want to include a "political" map of Europe and/or Germany in a beamer-class presentation. I particularly like this SVG map from Wikipedia. Is it possible to modify it, so it emphasizes for example Germany? The target should look somewhat like this (Germany emphasized in red, all other countries in grey). If the world map could be optional that would be even better. ![goal example](http://i.stack.imgur.com/SysOC.png)


title: Groupplots become misaligned with axis equal image

text: I have several images I want to align in a groupplot environment. All of the images have the same width, whereas the images fall into two categories when it comes to height, one with "small height" and one with "large height". I have tried to plot them like this (top row are "large height", bottom row are "small height"):               \documentclass[10pt]{standalone}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \begin{document}     \begin{tikzpicture}     \begin{groupplot}[             axis equal image,             enlargelimits=false,             axis on top,             xmin=0.0, xmax=6, ymax=5,             group style={group size=2 by 2, horizontal sep=0em, vertical sep=0em,                          x descriptions at=edge bottom,                          y descriptions at=edge left,},         ]         \nextgroupplot[ymin=-5]         \addplot graphics[xmin=0.0, xmax=6.0, ymin=-5.0, ymax=5.0] {image1};         \nextgroupplot[ymin=-5]         \addplot graphics[xmin=0.0, xmax=6.0, ymin=-5.0, ymax=5.0] {image1};         \nextgroupplot[ymin=0]         \addplot graphics[xmin=0.0, xmax=6.0, ymin=0.0, ymax=5.0] {image1};         \nextgroupplot[ymin=0]         \addplot graphics[xmin=0.0, xmax=6.0, ymin=0.0, ymax=5.0] {image1};     \end{groupplot}     \end{tikzpicture}     \end{document}      This results in the various images overlapping as can be seen below. If I remove `axis equal image`, I get correct alignment, but the images do not get the correct aspect ratio. Using `axis equal` instead of `axis equal image` gives correct alignment and aspect ratio, but leaves a lot of empty space in the top row (where the "large height" images are plotted) and makes the x ticklabels incorrect. How to solve this to get a nice, compact layout? ![Misaligned groupplots due to axis equal image](http://i.stack.imgur.com/lQMzf.png)


title: Using PGF in Lyx

text: I just tried coping & pasting code from How to draw Venn diagrams (especially: complements) in LaTeX and I get errors ... I suppose I need to install/configure Lyx to use PGF/Tikz? ![](http://i.stack.imgur.com/6DncF.png)


title: How to avoid beamer counter incrementing

text: In Latex beamer, I've created a _handout_ environment for slides that are for the produced handout only (ie. not to be shown on the viewer). It looks like this:               \newenvironment{handout}[2][1]{        \begin{frame}<handout>[environment=handout,allowframebreaks]     }     {\end{frame}}      Key point in the above is: 1) <handout> ensures it is only visible on handout 2) allowframebreaks allows the handout to run over several slides. OK so far. Only problem is that the framenumber counter (which is used to display page numbers) is incremented for each slide, which means that the handout material and the displayed material in the presentation gets out of sync. So I want to freeze the counter. I tried simply to back up the current value of the framenumber counter to a temporary in the _before_ part of the environment definition and reseting to that in the _after_ part. That did however now work. Something like this:               \newenvironment{handout}[2][1]{        \begin{frame}<handout>[environment=handout,allowframebreaks]        \setcounter{backupcounter}{\value{framenumber}}     }     {\end{frame}\setcounter{framenumber}{\value{backupcounter}}}      So the question is basically, how do I avoid the counter incrementing over these slides?


title: Capitalization and periods in LaTeX section headings

text: I’m fairly new to LaTeX but love it. I am putting together the backbone of my dissertation in Report class. I am bound to APA style for headings. Using the Titlesec package I’ve got the headings very close, and here is my question: The level 2 heading (section) has major words capitalized, bold font flush left. The third level (subsection) is only first word capitalized, indented, and ends with a period. Is it worth trying (or even possible) to format the sections in Titlesec to handle the capitalization and periods, or should I just type the headings in that way every time and not worry about it? Thanks for your time


title: Specified appendices and cross-referencing in text

text: I am setting up appendices like suggested in the answer to this question: Appendix - Adding PDF, using the MWE suggested by cfr:               \documentclass[a4paper]{article}     \usepackage{geometry}     \usepackage{fancyhdr}     \usepackage{pdfpages}     \usepackage{xparse}     \usepackage{kantlipsum}          \makeatletter     \NewDocumentCommand\headerspdf{ O {pages=-} m }{% [options for include pdf]{filename.pdf}       \includepdf[%         #1,         pagecommand={\thispagestyle{fancy}},         scale=.7,         ]{#2}}     \NewDocumentCommand\secpdf{somO{1}m}{% [short title]{section title}[page specification]{filename.pdf} --- possibly starred       \clearpage       \thispagestyle{fancy}%       \includepdf[%         pages=#4,         pagecommand={%           \IfBooleanTF{#1}{%             \section*{#3}}{%             \IfNoValueTF{#2}{%               \section{#3}}{%               \section[#2]{#3}}}},         scale=.65,         ]%         {#5}}     \makeatother          \pagestyle{fancy}          \begin{document}          Reference to my appendix \ref{secpdf:Test}.          \newpage     \appendix          \secpdf[Short Title]{PDF on Section Page with Short Title}{/usr/local/texlive/2013/texmf-dist/doc/latex/mwe/mwe.pdf}     \label{secpdf:Test}     \kant[3]     \headerspdf[pages=2-3]{/usr/local/texlive/2013/texmf-dist/doc/latex/mwe/mwe.pdf}     \end{document}      It correctly delivers Appendix A in appendix, but now I am having troubles with the cross-referencing. I tried a reference like shown in the example but it does not work properly. There is a similar case, which I cannot manage to transfer on my case: How to correctly label an included PDF?


title: Fractions with large elements

text: What is best practice for typesetting fractions with large objects in the numerator and denominator? For example, fractions with limits, integrals, summations, etc... cause the expressions to look contracted and somewhat odd. I understand that it is probably best to leave this as is when writing mathematics inline, but as a stand-alone fraction I feel it would be much less distracting if the symbols were typeset at normal size and the fraction was given more height in which to place itself. Are there standards (for pure mathematics) regarding this problem? And what are the options - if it's generally permitted - for expanding the fraction size to incorporate large objects? * * * ## Example               \frac{\sum_{i=0}^{n} i^2}{\iint_{D}\frac{\partial (x,y)}{\partial (u,v)}\,\mathrm{d}u\,\mathrm{d}v}      Both the summation and the integral look somewhat cramped.


title: LuaLaTeX vs XeLaTeX

text: > **Possible Duplicate:**   >  Differences between LuaTeX, ConTeXt and XeTeX What are the differences between LuaLaTeX and XeLaTeX? Why should someone prefer one over the other?


title: Kerning between bold and non-bold text

text: I'd like to write a word in bold followed by a comma and a non-bold word, like this:               \textbf{why}, blah      If I just write `why,` TeX inserts a kern to shift the comma a little closer to the "y". But when I write `{why},` (even without the `\textbf`), TeX doesn't insert the kern; apparently kerning doesn't happen across a group boundary. If I write `{why,}` then I get the kern, but I also get a bold comma. What I'd like to know is:   * Is there a way to make TeX recognize that a pair of letters should be kerned even when there's a group boundary in between?   * Stylistically, _should_ that comma be bold?


title: Rotating around axes with tikz-3dplot

text: I'm a bit confused by the following code. I would think that the following would produce an animation of rotating 90-degrees around the x-, y-, and z-axes, but the first part of the animation looks like it rotates around the z-axis and not the x-axis. Any ideas?               \documentclass[xcolor=dvipsnames]{beamer}     \usepackage{tikz}     \usepackage[english]{babel}     \usepackage{animate}  % Animations     \usepackage{tikz-3dplot}          \usepgflibrary{arrows}     \usetikzlibrary{decorations.markings, arrows, decorations.pathmorphing,        backgrounds, positioning, fit, shapes.geometric}          \def\drawaxes{         \draw[thick,->] (0,0,0) -- (5,0,0) node[anchor=north east]{$x$};         \draw[thick,->] (0,0,0) -- (0,5,0) node[anchor=north west]{$y$};         \draw[thick,->] (0,0,0) -- (0,0,5) node[anchor=south]{$z$};     }          \begin{document}     \begin{frame}       \begin{center}         \begin{animateinline}[autoplay, controls, poster=first]{60}           \multiframe{90}{iFrame=0+1}{             \tdplotsetmaincoords{0}{0}             \begin{tikzpicture}[tdplot_main_coords]               \draw (-5cm, -3cm) rectangle (5cm, 3cm);                    \tdplotsetrotatedcoords{\iFrame}{0}{0}               \begin{scope}[color=red,                             tdplot_rotated_coords,                             xshift=-3cm,scale=0.25]                 \drawaxes               \end{scope}                    \tdplotsetrotatedcoords{0}{\iFrame}{0}               \begin{scope}[color=red,tdplot_rotated_coords,scale=0.25]                 \drawaxes               \end{scope}                    \tdplotsetrotatedcoords{0}{0}{\iFrame}               \begin{scope}[color=red,                             tdplot_rotated_coords,                             xshift=3cm,scale=0.25]                 \drawaxes               \end{scope}             \end{tikzpicture}           }         \end{animateinline}       \end{center}     \end{frame}     \end{document}


title: How to have corresponding section/chapter names as headers on each page?

text: When I use the following in my preamble, I’m just getting a plain straight line as my header and the page number displayed at the bottom center of my page.               \documentclass{book}          \usepackage[paperwidth=5in,paperheight=7in]{geometry}          \usepackage{fancyhdr}          \pagestyle{fancy}          \begin{document}          \begin{center}            \section*{Etsuko's picnic}          \end{center}          TEXT          \end{document}      I thought the default fancyhdr trait was to print the name of the corresponding chapter as the header. But in my case nothing is being printed. I wanted to have the name of the corresponding chapters as the headers of each page in my book. How can I achieve that?


title: Split mdframed environment occasionally skips page

text: I'm currently using the `mdframed` package for a custom environment for my master's thesis. In rare cases, the environment shows some rather strange behaviour — the correctly split environment (i.e. the two, or sometimes even three parts) skips a page! What I mean by that is, that the environment gets split as it should be, into two or sometimes three parts. However, the first part is not printed on the page were it should be, but on the next page. The second part is then printed on the subsequent page, and so on. I've been trying to re-create this behaviour for a MWE, but I haven't succeeded yet. I cannot post the LaTeX code of my thesis, but I could post part of the PDF which shows this unwanted behaviour. The definition of my custom environment might help though — it is largely based on an answer to one of my other questions (see Combining `tikzpicture` and `lstlisting`).               \usepackage[framemethod=TikZ]{mdframed}          \makeatletter     \def\mdf@@codeheading{Default}%     \define@key{mdf}{title}{%        \def\mdf@@codeheading{#1}     }          \mdfdefinestyle{nicebox}{%      innertopmargin=16pt,      innerbottommargin=8pt,      middlelinewidth=.8pt,      outerlinewidth=4pt,outerlinecolor=white,      innerleftmargin=10pt,      innerrightmargin=10pt,      leftmargin=-4pt,rightmargin=-4pt,      skipabove=\topskip,      skipbelow=\topskip,      roundcorner=4pt,      singleextra={\node[draw, fill=white, thick, anchor=west, xshift=10pt+1pt, font=\bfseries] at (O|-P) {\csname mdf@@codeheading\endcsname \space \theboxnumber};},      firstextra={\node[draw, fill=white, thick, anchor=west, xshift=10pt+1pt, font=\bfseries] at (O|-P) {\csname mdf@@codeheading\endcsname \space \theboxnumber};}     }          \newenvironment{boxenv}[2]{%       \incboxnumber       \label{#2}       \bigskip       \mdframed[style=nicebox,title={#1}]     }{\endmdframed}


title: TikZ: xshift not shifting

text: Why wont `xshift` work here?               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}       \coordinate (Q) at (2.1cm, -1cm);            \draw[xshift = 0.5cm] (Q) -- +(0, 3cm); % no shift            \begin{scope}[xshift = 0.5cm]         \draw (Q) -- +(0, 3cm); % no shift       \end{scope}     \end{tikzpicture}     \end{document}       Both the scoped and non-scoped version produce the same image: ![enter image description here](http://i.stack.imgur.com/ufxwZ.png) As we can see, the line is drawn from `Q` and not shifted.


title: homemade glyph in lualatex

text: Is possible to join/glue 2 or more glyph and change orginal font? For example I need 'a'='a' and 'dot' above or under or k=f+k but f is small and up than small k. And change orginal a and k? here example: ![enter image description here](http://i.stack.imgur.com/8LQSB.png)


title: Changing Table Numbering Scheme to Include Section Number

text: When I create a table and use \caption, Latex automatically adds "Table 1.1" or something similarly numbered. I'm using the book format, and want the caption numbering to be of the form "Table x.y.z", where x is the chapter number, y is the section number, and z is the table number within x.y. For example, the second table in section 4 in chapter 2 should say "Table 2.4.2".   How do I make Latex change the numbering of the tables?


title: adding keywords to be highligted in the lstlistings

text: The recent version of C++ has added a some new keywords e.g. decltype etc.. I want to highlight them in my report. I saw this post but it didn't work for me. Extend a language with additional keywords? So i added the following code               \usepackage{listings}     \lstset{emph={%           decltype%         },emphstyle={\color{black}}%     }      But then I got the error message: undefined control sequence decltype when used in the following way:               \begin{lstlisting}     auto f(T1 X, T2 Y) ->        decltype(X<Y)     {}     \end{lstlisting}


title: problem with using loop inside the tabular environment

text: I am having trouble with using a loop inside a tabular environment:               \newcounter{it}     \setcounter{it}{0}          \begin{tabular}{ll}       \loop\ifnum\theit<4         \addtocounter{it}{1}         Q & A\\       \repeat     \end{tabular}      I receive an error about argument of loop having an extra } and the compilation stops at &. I don't get an error when it is a single column table, but even in that case the result is not as expected: I get a single execution of the loop in place of 4. Can someone tell me what I am missing? Is there special considerations when using loops inside tabular?


title: mfpic graphics show just blank boxex

text: I am really new to LaTeX and this might be a stupid question but I spent hours to figure out how to make the actual figure showing up in TeXnicCenter. Would you please help me? Here is the code               \documentclass{article}     \usepackage[metapost,mplabels]{mfpic}     \opengraphsfile{mypics}     \begin{document}     Hyperbolic metric disks:          \begin{mfpic}[72]{-1}{1}{-1}{1}       \setmfpair{Z}{(dir 45)/3}       \setmfpair{W}{Moebius (Z)(.5*dir -45)}       \draw\gfill[gray(.94)]\circle{(0,0),1}       \draw\gfill[gray(.87)]\pshcircle{Z,4/5}       \gfill[gray(.80)]\pshcircle{Z,1/2}       \draw\gfill[gray(.73)]\pshcircle{W,1/2}       \draw\pshcircle{Z,1/2}       \tlpointsep{3bp}       \point{Z,W,(0,0)}       \tlabel[br]{Z}{$z$}       \tlabel[tl]{W}{$w$}       \tlabel[tr]{(0,0)}{$0$}     \end{mfpic}          Hyperbolic geodesics:          \begin{mfpic}[72]{-1}{1}{-1}{1}       \circle{(0,0),1}       \draw\gfill[gray(.88)]         \lclosed         \connect           \hypergeodesic{.999*dir 0, .999*dir 120}           \hypergeodesic{.999*dir 120, .999*dir 240}           \hypergeodesic{.999*dir 240, .999*dir 0}         \endconnect       \mfpfor{K=6,12,24,48}         \mfpfor{J=0 upto K-1}           \rotatepath{(0,0),J*(360/K)}\hypergeodesic{.999*dir 0, .999*dir (360/K)}         \endmfpfor       \endmfpfor     \end{mfpic}          \closegraphsfile     \end{document}      ![Blank image figure box](http://i.stack.imgur.com/uLIbT.png)


title: Compressed / abbreviated bibliography? (Biblatex or otherwise?)

text: I'm writing a grant application, and I've been asked to compress my bibliography so that it looks something like this: > 1. Smith, J. _Nature_ **7** , 201-204 (1999). 2. Jones, B. _Cell_ **17** , > 364-369 (2007). 3. Jackson, R. et al. _J Comp Bskt Weave_ **32** , 123-190 > (2010). 4. Parker, P. et al. _J Wall Climb_ , **10** , 17-21 (1973). [...] First author name only (followed by et al.), abbreviated and italicised journal names, bold volume numbers, no line breaks so that the entire reference list is basically a single giant paragraph (I know, it's ugly as sin, but this is what I've been asked to do), etc. I'm using biblatex because I need to print this bibliography in the middle of the proposal, and it just seemed easiest to use biblatex in that situation. Is there any biblatex style that would do what I'm looking for? Or failing that, a bibtex style and I'll figure out how to print the bibliography in the right place? Or will I need to figure out how to roll my own?