title: How to make this diagram in latex

text: Please could someone make this diagram in LaTeX and if you have some other thought to make it better than I draw it I'll be grateful. Here is how figure 1 and 2 ![enter image description here](http://i.stack.imgur.com/nGtGh.jpg) Thanks to Mr John Wickerson who provide me best style of diagram ![enter image description here](http://i.stack.imgur.com/8Tf3A.jpg) if possible different style with comment thanks                     \usepackage{tikz}           \usetikzlibrary{arrows, decorations.markings}           % for double arrows a la chef           % adapt line thickness and line width, if needed           \tikzstyle{vecArrow} = [thick, decoration={markings,mark=at position           1 with {\arrow[semithick]{open triangle 60}}},           double distance=1.4pt, shorten >= 5.5pt,           preaction = {decorate},           postaction = {draw,line width=1.4pt, white,shorten >= 4.5pt}]          \tikzstyle{innerWhite} = [semithick, white,line width=1.4pt, shorten >= 4.5pt]


title: ConTeXt: Figure scaling to width and text wrapping for Pandoc-generated documents

text: Consider the following Pandoc-generated ConTeXt document:               \setuppapersize [A4][A4]     \setuplayout    [width=middle,  backspace=1.5in, cutspace=1.5in,                      height=middle, topspace=0.75in, bottomspace=0.75in]          \setuppagenumbering[location={footer,center}]          \setupexternalfigures[       order={svg,pdf,png,jpg},       location=global,       wfactor=fit,       ]          \definedescription       [description]       [headstyle=bold, style=normal, location=hanging, width=4cm]          \starttext     \placefigure[here,nonumber]{Little kitten}{\externalfigure[http://placekitten.com/g/480/300][method=jpg]}          \startdescription{{\externalfigure[http://placekitten.com/g/640/400][method=jpg]}}       \input bryson     \stopdescription     \stoptext      ![current output](http://i.stack.imgur.com/Um1sa.png) ## Question Little kitten should grow to `\textwidth`. The other kitten should fit through a width of 4cm with text wrapped around it. Its picture should be flush at the top with the wrapped text. The kittens may not be touched; only the setup before `\starttext` may be changed. Furthermore, no references to the image URLs should appear in the preamble for this problem to be solved as generally as possible. I tried something with `\setupexternalfigures` and `wfactor=fit` but it does not seem to work.


title: Adjustbox on a landscape page makes a table too small

text: I am trying to use adjustbox to scale down a table that is too large for a landscape page, but when I use it, the scaled table is much smaller than it needs to be relative to the size of the page. Any idea what I am doing wrong? Below is an example that shows the issue. The same table is shown both using adjustbox and without.               \documentclass[letterpaper,12pt,oneside]{article}     \usepackage{booktabs,pdflscape,adjustbox}          \begin{document}          \begin{landscape}          some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text.            \begin{table}[t]          \begin{adjustbox}{max width=\textheight}     \begin{tabular}{*{5}{l}}     \toprule        & \multicolumn{2}{c}{Women} & \multicolumn{2}{c}{Men} \\\cmidrule(lr){2-3}\cmidrule(lr){4-5}                          & Person-  &    & Person-  &  \\                          &  month  &  Unique & month  &  Unique \\     Sample restrictions  & records  &  individuals & records  &  individuals \\     \midrule     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx          & xxxxxx & xxxxx & xxxxx & xxxxx \\     \bottomrule     \end{tabular}     \end{adjustbox}     \end{table}     \end{landscape}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%% now same table without adjustbox     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \clearpage     \begin{landscape}     \begin{table}[t]     \begin{tabular}{*{5}{l}}     \toprule        & \multicolumn{2}{c}{Women} & \multicolumn{2}{c}{Men} \\\cmidrule(lr){2-3}\cmidrule(lr){4-5}                          & Person-  &    & Person-  &  \\                          &  month  &  Unique & month  &  Unique \\     Sample restrictions  & records  &  individuals & records  &  individuals \\     \midrule     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx          & xxxxxx & xxxxx & xxxxx & xxxxx \\     \bottomrule     \end{tabular}     \end{table}     \end{landscape}          \end{document}


title: How to integrate an subtitle into TABLE OF CONTENTS?

text: I have a problem with a book I am writing. Here the facts: I am basically working in one tex.file let's call it **mainfile.tex** , where I want to include my other tex.files! I have a **Layout.file** , where I define new commands as `\title`               \newcommand{\headtitle}{}      \newcommand{\headauthors}{}     \newcommand{\tocauthors}{}          \newcommand{\title}[1]{     \addcontentsline{toc}{chapter}{#1}     \begin{center}  \textbf{\fontsize{60pt}{25pt}\selectfont #1} \normalfont\vspace*{-2ex}\end{center}       \renewcommand{\headtitle}{#1}}      `\subtitle`               \newcommand{\subtitle}[1]{\begin{center} \doublespacing \textbf{\huge ---\\[1ex] \Huge #1}\end{center}}      and so on! now I want LaTeX to include the subtitle into the table of contents just behind the title, maybe with a `\--` in between. The command for the table of contents is in my **mailfile.tex** with is as follows:               \begin{document}     %%Layout     \pagestyle{empty}     \input{Layout}                  \tableofcontents


title: Modified \overline over first character of complex argument

text: I've been using `zref` to handle my references. It has allowed me to customize a reference the way I want through its property lists. In particular, I reference a variety of structures in my document that are created in an automated way. Here's a MWE that provides the setup and illustrates my current problem:               \documentclass{article}     \usepackage{zref}% http://ctan.org/pkg/zref     \makeatletter     \newcounter{thegraph}% Graph counter     \zref@newlist{graph}% Graph reference stored in list 'graph'     \zref@newprop*{type}[??]{??}% Create new 'graph type' property     \zref@newprop*{number}[??]{\thethegraph}% Create new 'graph number' property     \zref@addprops{graph}{type, number}% Graph reference (or property list) has type & number     \newcommand{\graph}[1]{\zref@setcurrent{type}{G}\newgraph{1}{#1}}%     \newcommand{\digraph}[1]{\zref@setcurrent{type}{D}\newgraph{2}{#1}}%     \newcommand{\newgraph}[2]{% New graph #1=type; #2=ref       \refstepcounter{thegraph}% Increase counter       % zref label has to written immediately (not at page shipout), since more than one new graph may appear on page       \zref@wrapper@immediate{\zref@labelbylist{#2}{graph}}% Write graph list to .aux (using zref)       \label{#2}% Label newgraph for reference       \ifnum#1>0\ensuremath{\zref@getcurrent{type}_{\thethegraph}}\fi% Print graph symbol (if requested)     }     \newcommand{\graphref}[1]{\ensuremath{\zref@extract{#1}{type}_{\zref@extract{#1}{number}}}}% Reference to a graph     \newcommand{\complementg@aux}[2][3]{{}\mkern#1mu\overline{\mkern-#1mu#2}}     \newcommand{\complementg}[2][3]{\edef\@tempa{#2}\expandafter\complementg@aux\expandafter[\expandafter#1\expandafter]\@tempa}     \makeatother          \begin{document}          This is~\graph{first} and~\digraph{second}. Now see~\graphref{first} and~\graphref{second}.     What about~$\complementg{\graphref{first}}$ and~$\complementg{\graphref{second}}$?          \end{document}      The above MWE gives the following output ![enter image description here](http://i.stack.imgur.com/SVlue.png) while I'd like it to look like this: ![enter image description here](http://i.stack.imgur.com/QtX9i.png)               This is~$G_1$ and~$D_2$. Now see~$G_1$ and~$D_2$.     What about~$\complementg{G_1}$ and~$\complementg{D_2}$?      The choice of `\complementg` stems from a discussion in chat and because it worked in a non-`zref` implementation. My question is: How can I define `\complementg` such that allows for being used in all of the following formats while only providing a "modified `\overline`" for the first character:               $\complementg{G_1}$% Basic math content with subscript manual subscript     $\complementg{\graphref{lab}}$% Referenced zref label (like above)     $\complementg{\mathcal{G}}$% "Complex" formatting of content      * * * In a typographic sense, this question is somewhat related to What's the proper way to write a vector with a single character subscript?


title: PGFPLOTS: Insert a boxplot outside the chart axis labels, much like GNU R

text: I have some code that plots a horizontal barchart. What I would like to do is put a boxplot or confidence interval above my horizontal axis which is on top of the chart. GNU R (see R In Action, Robert Kabacoff) allows boxplots along/out-side the horizontal/vertical axis which gives a nice look and much information at a glance. In a similar manner, I was trying to add a boxplot or horizontal error bars above the x axis labels. Since the boxplot plots quartiles, error bars/confidence interval with the min/max about the mean may be more meaningful for what I'm showing. How do I get something like that? Is there some clipping going on, as my axis shift up seems to ignore larger shift values. Also, I can't get the vertical red line to extend above the x axis. My thought was to plot a thick red line of +/- n SDEV and thin error bars of min/max above the x axis and a boxplot on the bottom of the chart. With that I would like to label the \mu and +/- n\sigma points if possible. I commented out the error bar addplot below. Another thought is how can I get PGFPLOTS to calculate the mean/sdev. If boxplot can calculate the quartiles, is there some mechanism to pull the data column Miles from the inline table? I started this project keeping Tufte Principles in mind, but I keep adding more ink items. I hope to merge some other data into this type of chart. I really appreciate any help with this problem. Regards, Dave               \documentclass{article}     \usepackage[usenames,dvipsnames]{color}     \usepackage[left=0.5in,right=0.5in,top=0.8in,bottom=0.75in]{geometry}     \usepackage{amsmath,relsize}     \usepackage{filecontents}      \usepackage{pgfplots}      \usepackage{pgfplotstable}     \pgfplotsset{width=.95\textwidth, compat=newest}           \pgfplotsset{         discard if/.style 2 args={             x filter/.code={                 \edef\tempa{\thisrow{#1}}                 \edef\tempb{#2}                 \ifx\tempa\tempb                     \def\pgfmathresult{inf}                 \fi             }         },         discard if not/.style 2 args={             x filter/.code={                 \edef\tempa{\thisrow{#1}}                 \edef\tempb{#2}                 \ifx\tempa\tempb                 \else                     \def\pgfmathresult{inf}                 \fi             }         }     }          \pgfkeys{/pgfplots/x axis shift down/.style={         x axis line style={yshift=-#1},         xtick style={yshift=-#1},         xticklabel shift={#1}}}     \pgfkeys{/pgfplots/y axis shift left/.style={         y axis line style={xshift=-#1},         ytick style={xshift=-#1},         yticklabel shift={#1}}}          \begin{document}     \sffamily     \begin{filecontents}{data.csv}     Miles,   Bike,    rdate      12.5,    Yel-11,  {$\stackrel{\hbox{Yel-11}}   {\hbox{\tiny 03/30/14}}$}     16.5,    Fuji,    {$\stackrel{\hbox{Fuji}}     {\hbox{\tiny 04/23/14}}$}     21.0,    8000SHX, {$\stackrel{\hbox{8000SHX}}  {\hbox{\tiny 05/18/14}}$}     24.2,    Yel-11,  {$\stackrel{\hbox{Yel-11}}   {\hbox{\tiny 05/24/14}}$}     \end{filecontents}     %                                              \pgfplotstablegetrowsof{data.csv}     \edef\numberofrows{\pgfplotsretval}          \pgfplotsset{every axis/.append style={semithick,tick style={major tick     length=4pt,thick,black}}}     \begin{center}     \fbox{ \begin{tikzpicture}     \begin{axis}[     %/pgf/number format/.cd,1000 sep={},     width=0.90\linewidth,height=4cm,     xbar,/pgf/bar shift=0pt,     % title style={yshift=1cm},     % title={\centering More Customization: ``colorbar top''},     title={\centering label 2014},     title style={yshift=1cm, text width=8cm,font=\rmfamily\itshape\Large},     xmin=0, xmax=50, xticklabel pos=upper, tick align=outside,     xticklabel style={major tick length=20pt, color=black,tickwidth={10pt}},     axis x line*=top, %tickwidth={2pt},     axis y line*=left, y axis line style={opacity=0},     xmajorgrids, major grid style=white, axis on top,     xtick={0,10,15,20,25,30,35,40,50}, %,100,150,200,250},     separate axis lines, x axis shift up=35pt, y axis shift left=10pt,     %xtick=\empty, %xlabel= {},     %enlarge x limits={value=0.1, upper},     enlarge y limits=0.25,     ytick={0,...,\numberofrows},     %ytick={0,...,\pgfmathresult}, %\pgfplotsretval},     y dir=reverse,     y tick label style={align=right, major tick length=5pt},     yticklabels from table={data.csv}{[index]2},     nodes near coords, nodes near coords align=horizontal,     %point meta=explicit symbolic     ]          \addplot [draw,fill=blue, discard if not={Bike}{Fuji}]              table [y expr=\coordindex, x index=0, col sep=comma]{data.csv};          % \addplot [draw,fill=blue!60!white, discard if not={Bike}{Yfoil}]      %         table [y expr=\coordindex, x index=0, col sep=comma]{data.csv};          \addplot [draw,fill=yellow,  discard if not={Bike}{Yel-11}]              table [ y expr=\coordindex, x index=0,col sep=comma]{data.csv};          % \addplot [draw,fill=red,     discard if not={Bike}{Y-22}]      %         table [ y expr=\coordindex, x index=0,col sep=comma]{data.csv};          \addplot [draw,fill=gray,    discard if not={Bike}{8000SHX}]              table [ y expr=\coordindex, x index=0,col sep=comma]{data.csv};          \draw [red,dotted,thick] (axis cs:18.6,-1) -- (axis cs:18.6,29)            node[anchor=west,on top] at (axis cs:19.0,0.5)                 {label};      \draw  node[anchor=center,on top] at (axis cs:40.0,3) {label};          %\addplot[error bars/.cd, x dir=both, x fixed=5.12,] coordinates{ (18.6,-1)};          \end{axis}     \end{tikzpicture}  }%fbox     \end{center}     \end{document}


title: How to replace "E" by "\mathbb{E}" throughout out the article in LaTeX

text: I have a quick question about replacement in LaTeX. At first, I used capital `E` throughout my paper and now I really need to replace `E` by `\mathbb{E}`, somebody suggests that I can use Macros to achieve. But how can I do that?


title: Conditionally add multicols to enumerate environment

text: I would like an environment to be called by `\begin{myenv}` that conditionally adds multicols if called by `\begin{myenv}{<number of columns>}`. This is what I tried:               \documentclass{article}        \usepackage{enumitem}        \usepackage{multicol}          \makeatletter     \newenvironment{myenv}[1]{         \def\@tempa{#1}%        \ifx\@tempa\@empty             \expandafter\@firstoftwo        \else             \expandafter\@secondoftwo         \fi             {%             \begin{enumerate}[label=\Alph*),itemsep=0pt,#1]             }             {%             \setlength{\multicolsep}{5pt}             \begin{multicols}{#1}                 \begin{enumerate}[label=\Alph*),itemsep=0pt]             }         }         {\ifx\@firstoftwo             \end{enumerate}         \else             \end{enumerate}\end{multicols}         \fi         }     \makeatother     \begin{document}          \begin{myenv}{5}        \item dog        \item cat        \item duck        \item fly     \item spider     \end{myenv}     \end{document}      Unfortunately it only works when a number of columns is specified, if I call just `\begin{myenv}` and error is triggered and latex tells me that 0 columns is not a good idea. Is there a way to fix this?


title: Question about headings

text: I'm currently learning LaTeX and want to know how to make headings like in this document: http://www.math.northwestern.edu/~kra/papers/primes.pdf Like 1. Introduction 2. etc etc I'm thinking that it's got to involve \section somehow and centering it Thanks!


title: Adding row spacing to a longtable?

text: I want to add some extra spacing between the rows of my `longtable` - but not for every table of the entire document, just one of them. I've tried to use the `\\\\[dist]` mechanism, but with surprising (at least to me) results: The distance is only added if the rightmost cell of the row being ended is the one with the greatest height: ![spacing issue](http://i.stack.imgur.com/Yb0Bl.png) What can I do to add the space regardless of the individual height of the cells?               \documentclass{minimal}     \usepackage{longtable}              \begin{document}     \begin{longtable}{p{2cm}p{2cm}}     first & first \\     nospace & nospace \\     short & short \\[6pt]     sep & sep \\     short & long long long long long long \\[6pt]     sep & sep \\     long long long long long long & short \\[6pt]     last & last \\     \end{longtable}     \end{document}


title: double foreach for color shifting nodes

text: I want to draw the bottom series of circles: ![enter image description here](http://i.stack.imgur.com/MHwX3.jpg) Here is my code:               \documentclass[margin=.5cm]{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[every node/.style={circle}]      \foreach \a in {100,90, ..., 0}{      \foreach \n in {1,2, ..., 11}{       \node [fill={green!\a!red}] at (\n,0)   {};       }}            \node [fill={green!100!red}] at (1,-2) {};       \node [fill={green!90!red}] at (2,-2) {};       \node [fill={green!80!red}] at (3,-2) {};       \node [fill={green!70!red}] at (4,-2) {};       \node [fill={green!60!red}] at (5,-2) {};       \node [fill={green!50!red}] at (6,-2) {};       \node [fill={green!40!red}] at (7,-2) {};       \node [fill={green!30!red}] at (8,-2) {};       \node [fill={green!20!red}] at (9,-2) {};       \node [fill={green!10!red}] at (10,-2) {};       \node [fill={green!0!red}] at (11,-2) {};     \end{tikzpicture}       \end{document}      To avoid all the repetitions I'd like to use two `foreach` loops, but I can't seem to use them correctly, since the result is the first series of circles, with no color shifting. What am I doing wrong?


title: Inclusion of pgfplotstable in tikzpicture

text: Is there any way to include a table generated by pgfplotstable in the tikzpicture environment, where other figures generated by pgfplots exist, in order to save them together as one figure with tikzexternalize? I have tried it, but the placement of the elements is problematic. If it can't be done, can the tables be saved as a pdf box like the figures, so that they can be included easily in another document?


title: Sort bibliography entries with respect to their logical sequence (part i and then part ii)

text: In my bibliography I have the following two entries:               Hosseini, S.A., Shah, N., 2011a. Enzymatic hydrolysis of cellulose part ii: Population balance modelling of hydrolysis by exoglucanase and universal kinetic model. Biomass Bioenerg. 35,     3820–3840.     Hosseini, S.A., Shah, N., 2011b. Modelling enzymatic hydrolysis of cellulose part i: Population balance modelling of hydrolysis by endoglucanase. Biomass Bioenerg. 35, 3841–3848.      The problem is that they appear in reverse order from the point of view of logical sequence (part i should be before part ii). The bibliography style that I use (model2-names from elsevier) sorts the entries alphabetically but for these two entries I would like to force part i to appear before part ii. Here are the `.bib` entries:               @ARTICLE{Hosseini2011,       author = {Seyed Ali Hosseini and Nilay Shah},       title = {Modelling enzymatic hydrolysis of cellulose part I: Population balance         modelling of hydrolysis by endoglucanase},       journal = {Biomass Bioenerg.},       year = {2011},       volume = {35},       pages = {3841-3848},       file = {:Hosseini and Shah 2011 - Enzymatic hydrolysis of cellulose part I.pdf:PDF},       journaltitle = {Biomass and Bioenergy}     }          @ARTICLE{Hosseini2011a,       author = {Seyed Ali Hosseini and Nilay Shah},       title = {Enzymatic hydrolysis of cellulose part II: Population balance modelling         of hydrolysis by exoglucanase and universal kinetic model},       journal = {Biomass Bioenerg.},       year = {2011},       volume = {35},       pages = {3820-3840},       file = {:Hosseini and Shah 2011 - Enzymatic hydrolysis of cellulose part II universal kinetic model.pdf:PDF},       journaltitle = {Biomass and Bioenergy}     }      Is there a way to hack it? Part II comes before Part I but the titles are arranged alphabetically (which is normal since 'Enzymatic' comes before 'Modelling').


title: How to correct problem with ybar plot: bad axis and too many labels in x axis

text: I need a bit of help here with the axis... Any suggestions would be always welcome. I have got 2 extra labels at the x axis...                \documentclass{scrreprt}           \usepackage{pgfplots}      \usepgflibrary{decorations.markings}      \usepackage{tikz}      \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri     }      \usepackage{textcomp}           \begin{document}           \begin{tikzpicture}      \begin{axis}[      symbolic x coords={AL2O3, ALN, Si3N4, BeO, Epoxid, Polimid, ALSiC, Al, Cu,      Mo, Si, Au},      width=15cm,      height=5cm,      %xtick={200,400},      %grid=major,      x tick label style={rotate=90,anchor=east},      ylabel=$\mathbf{W/m\cdot K}$,      enlargelimits=0.15,      legend style={at={(0.5,-0.15)},      anchor=north,legend columns=-1},      ybar=5pt,% configures `bar shift'      ymin=0,      ymax=500,      bar width=0.4cm,      nodes near coords,      ]      \addplot[color=black, fill=lightgray, ybar legend]      coordinates {(AL2O3,24) (ALN,180) (Si3N4,70) (BeO,250) (Epoxid,3.0)      (Polimid,0.385) (ALSiC,200) (Al,237) (Cu,394) (Mo,138) (Si,148) (Au,317)};      \end{axis}      \end{tikzpicture}      \end{document}      Somehow I would like to have a minor grid at the y axis, and that it starts at 0 along with the x axis, and that the upper axis doesn't have a cross...


title: Biblatex authoryear dashed for entries with no year

text: I'm using biblatex authoryear and have multiple entries of the same author that do not have a year. When I cite them there are letters shown to distinguish them: ![mwe](http://i.stack.imgur.com/1YJLC.png) But in the bibliography those letters are not shown and you can only distinguish them by the title. Is it possible to show the letters in the bibliography, too?               \documentclass[a4paper,12pt]{article}%     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{filecontents}     \begin{filecontents}{bib.bib}     @BOOK{bar1,       title = {Text One},       year = {},       author = {Firstname Lastname},     }     @BOOK{bar2,       title = {Text Two},       year = {},       author = {Firstname Lastname},     }     \end{filecontents}          \usepackage[backend=biber, style=authoryear-icomp, dashed=true]{biblatex}     \addbibresource{bib.bib}          \begin{document}          \cite{bar1} and \cite{bar2}          \printbibliography     \end{document}


title: How to insert a figure in tikzposter with labels and captions?

text: I am writing a poster of a0 size with the help of standard tikz poster tempelate. Due to some reasons, the standard latex format as given below wouldn't work.                   \begin{figure}[htb]         \centerline{\includegraphics[width=0.95\textwidth]{example_picture.png}}         \caption[]{This is an example picture}         \label{example_picture}         \end{figure}           But according to the tikzposter Manual, one can use something called \tikzpicture. How to do that ? Can anyone help ? Gunn


title: In Lyx, "Part" section in Arabic numbers and numbering the rest of the sections accordingly

text: The default in lyx is to have I. First part (roman number)   1. Section 1 1.1 Subsection 1 and I'd like to have   1. First part (arabic number) 1.1 Section 1 1.1.1 Subsection 1 etc. Any suggestion? Thanks a lot in advance!


title: Add space for handwritten notes at the end of each chapter

text: Is it possible to have LaTeX insert some lines for handwritten notes at the end of each chapter? As a new chapter will always start on a odd page, they should appear on the last even page of the current chapter (how to check if there is enough space left?). I'm also interested in your suggestions how to make it nicely or fancy looking. My idea so far: ![Picture](http://i.stack.imgur.com/ou2fq.png) MWE used to generate example:               \documentclass{scrbook}     \usepackage{blindtext}          \usepackage{pgffor, ifthen, xcolor}     \newcommand{\notes}[3][\empty]{%         \noindent \textbf{Notes}\vspace{10pt}\\         \foreach \n in {1,...,#2}{%             \ifthenelse{\equal{#1}{\empty}}                 {\textcolor{gray}{\rule{#3}{0.2pt}}\\}                 {\textcolor{gray}{\rule{#3}{0.2pt}\vspace{#1}}\\}             }     }          \begin{document}     \chapter{First chapter}     \blindtext[5]     \par\vfill     \notes[10pt]{5}{\textwidth}          \chapter{Second chapter}     \blindtext[8]     \par\vfill     \notes[10pt]{3}{\textwidth}     \end{document}      Found original definition of `\notes` here. Update: Lines will be displayed in gray.


title: Remove backslashes from url fields in .bib entry

text: The problem I'm having is that urls with backslashes in the `.bib` file are not linking correctly. I'm using Mendeley to generate a .bib file that gets imported and used in the references section of a document via the `biblatex` package. Mendeley escapes some special characters in the url field with a backslash (so _ turns to \_). As I understand it, `biblatex` wants those urls without escaped characters, as is. This is most likely what's causing the problem. So I'm figuring there isn't a clean package option that tells `biblatex` to do something proper with the backslashes in url fields. If there is, that would be an ideal solution to the problem. If there's not, I was thinking of doing a for loop over the `url` fields within LaTeX and stripping any '\'. But I'm not yet familiar enough with LaTeX programming to do this.


title: stack multiple PDF pages

text: I have two PDF files, a form page with header and footer and a content page, and like to merge (overlay) them into a single page. Both PDFs are full size A4 portrait pages. I've tried this:               \documentclass[a4paper]{article}     \usepackage{pdfpages}     \begin{document}     \includepdf[]{form.pdf}     \includepdf[]{content.pdf}     \end{document}      but this of course results in PDF file with two pages. Can someone give me a hint?


title: Can we use \curvepnodes and \psnline to replace the concatenated points passed to \psrline?

text: ![enter image description here](http://i.stack.imgur.com/Z5fHf.gif) Can we use `\curvepnodes` and `\psnline` to get the same result as what the following code produces?               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{multido,pst-node}     \begin{document}     \begin{pspicture}[showgrid](-5,-5)(5,5)     \def\points{}%     \multido{\r=0.0+0.1}{90}{\xdef\points{\points(!1 \r\space sqrt 700 mul PtoC)}}     \psset{showpoints,dotstyle=o,dotscale=2}     \rput(-1,0){\expandafter\psrline\points}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/KzBXM.png) Note: The segments have equal length.


title: Making a class to generate colored tables with a predefined layout

text: This is a follow-up question in which I asked how to define classes with \newcommands into \newenvironments, and I had some good answers to this particular issue. However, the problem that I have does not rely only on the issue described in the other thread, but it is more general. for instance, I wish to create a class to generate tables like the following ![Example](http://i.stack.imgur.com/GZWCL.png) The plain code that I use to create this table is the following               \documentclass[landscape, 12pt]{report}          \usepackage{graphicx}     \usepackage{enumerate}     \usepackage{enumitem}     \setlist{nolistsep}     \usepackage[top=0.1cm, bottom=0cm, left=0.1cm, right=-0cm]{geometry}     \usepackage[dvipsnames,usenames]{xcolor}          \begin{document}     \noindent               \colorbox{cyan!20}{     \begin{tabular}{|p{12.6cm}|}         \hline         Champions League \\         - Team 1: The Hawks\\         \hline\\         FIRST-STRING PLAYERS:         \begin{enumerate}              \item John              \item Carl              \item Smith          \end{enumerate} \\               RESERVE PLAYERS:          \begin{enumerate}              \item Anthony              \item Luke          \end{enumerate} \\          \hline          COACH: Robert\\\hline     \end{tabular}     }          \end{document}      And I am quite happy with that, but I wish also to create a class such, referring to the example in the picture:   1. The "1" after "- Team" in the second line is an incresing number (so I guess I need a counter inside a \newenviroment definition);   2. What is written with capital letters (e.g. FIRST-STRING PLAYERS, etc.) is fixed in the table;   3. The tournament name (e.g. Champions League is a kind of "global" variable) As an indicative example, here is a kind of main document I wish to use:               \documentclass{Teams}          \begin{document}          \CUP{Champions League}          \begin{team}     \TeamColor{Cyan!20}     \TeamName{The Hawks}     \FSPlayers{         \begin{enumerate}         \item John         \item Carl         \item Smith     \end{enumerate}     }     \RPlayers{     \begin{enumerate}         \item Anthony         \item Luke     \end{enumerate}     }        \Coach{Robert}     \end{team}      I hope that my problem is clear. Unfortunately, I have never written any class before, so any help will be greatly appreciated.


title: What is the smallest paper dimension that can be used in (La)TeX?

text: I want to know what is the smallest paper dimension (in big point) that can be used in (La)TeX?


title: Shading of cubes in 3D picture

text: The example here is just great (and even better with the implementation in the comment). I would, however, like to have all the sides on a cube in the same color but have the color change in each layer of cubes. Here is the code (and a MWE of it's usage):               % Plane partition     \documentclass{minimal}     \usepackage{tikz}     \usepackage{verbatim}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength{\PreviewBorder}{5pt}          \begin{comment}     :Title: Plane partition          Illustration of a `plane partition'.          Plane partition: http://mathworld.wolfram.com/PlanePartition.html     \end{comment}          % Three counters     \newcounter{x}     \newcounter{y}     \newcounter{z}          % The angles of x,y,z-axes     \newcommand{\xaxis}{210}     \newcommand{\yaxis}{-30}     \newcommand{\zaxis}{90}          % The top side of a cube     \newcommand{\topside}[3]{%       \fill[fill=yellow, draw=black,shift={(\xaxis:#1)},shift={(\yaxis:#2)},       shift={(\zaxis:#3)}] (0,0) -- (30:1) -- (0,1) --(150:1)--(0,0);     }          % The left side of a cube     \newcommand{\leftside}[3]{%       \fill[fill=red, draw=black,shift={(\xaxis:#1)},shift={(\yaxis:#2)},       shift={(\zaxis:#3)}] (0,0) -- (0,-1) -- (210:1) --(150:1)--(0,0);     }          % The right side of a cube     \newcommand{\rightside}[3]{%       \fill[fill=blue, draw=black,shift={(\xaxis:#1)},shift={(\yaxis:#2)},       shift={(\zaxis:#3)}] (0,0) -- (30:1) -- (-30:1) --(0,-1)--(0,0);     }          % The cube      \newcommand{\cube}[3]{%       \topside{#1}{#2}{#3} \leftside{#1}{#2}{#3} \rightside{#1}{#2}{#3}     }          % Definition of \planepartition     % To draw the following plane partition, just write \planepartition{ {a, b, c}, {d,e} }.     %  a b c     %  d e     \newcommand\planepartition[1]{      \setcounter{x}{-1}       \foreach \a in {#1} {         \addtocounter{x}{1}         \setcounter{y}{-1}         \foreach \b in \a {           \addtocounter{y}{1}           \setcounter{z}{-1}           \foreach \c in {0,...,\b} {             \addtocounter{z}{1}           \ifthenelse{\c=0}{\setcounter{z}{-1},\addtocounter{y}{0}}{             \cube{\value{x}}{\value{y}}{\value{z}}}           }         }       }     }          \begin{document}           \begin{tikzpicture}     \planepartition{{5,3,2,2},{4,2,2,1},{2,1},{1}}     \end{tikzpicture}          \end{document}      I have never used TikZ (and I do not have the time to learn it at the moment), so I would be very glad if someone would change the code for me to achive the desired result. P.S. I have also posted this question here.


title: Change Section titles to Small Caps only in ToC

text: I'm new to LaTeX and already facing my first problem. I want to change all section titles to small caps in the table of contents but **not** in the text. I'm using WriteLaTeX and `article` as document class. This is how my document is structured               \documentclass{article}          \begin{document}          \tableofcontents          \newpage     \section{Section 1}     \subsection{Section 1.1}     \subsection{Section 1.2}          \newpage     \section{Section 2}          \newpage     \section{Section 3}     \end{document}


title: Is there a command to convert cm to bp?

text: I want to convert a length in cm (centimeter) to bp (big point). Is there a command to convert `cm` to `bp`?


title: Getting rid of \vspace{1em} from MATLAB LaTeX publish

text: When publishing an m-file from MATLAB to LaTeX, a vertical space of 1em is inserted after each text paragraph. I frequently input these published files directly into a master document by using the `standalone` package, but the 1em vspace doesn't look good with the rest of the typography. My question is then, is there a way to state in the preamble of the master document to somehow ignore the command `\vspace{1em}`? mwe:               \documentclass{article}     \usepackage{graphicx}     \usepackage{color}       \sloppy      \definecolor{lightgray}{gray}{0.5}     \setlength{\parindent}{0pt}     \begin{document}          \begin{par}     Some text     \end{par} \vspace{1em}     \begin{verbatim}     syms x     x=solve(3*x-3==2)     \end{verbatim}     \color{lightgray} \begin{verbatim}      x =          5/3          \end{verbatim} \color{black}     \begin{par}     Some more text     \end{par} \vspace{1em}          \end{document}      m-file:               %%     % Some text     syms x     x=solve(3*x-3==2)     %%     % Some more text


title: Making this figure in LaTeX

text: I am trying to generate the following figure in TeX:![enter image description here](http://i.stack.imgur.com/v71ME.png) With coloured squares. What I have did so far is:               \documentclass{article}     \usepackage{xcolor}     \begin{document}     \centering     \fboxsep=10mm \fboxrule=0.5mm     \fcolorbox{black}{blue!40!white}{{\bf P}}\\[2cm]          \fboxsep=3mm \fboxrule=0.5mm     \fcolorbox{black}{blue!40!white}{$a_1$}\fcolorbox{black}{blue!40!white}{$o_1$}\fcolorbox{black}{blue!40!white}{$a_2$}\fcolorbox{black}{blue!40!white}{$o_2$}\fcolorbox{black}{blue!40!white}{$a_3$}\fcolorbox{black}{blue!40!white}{$o_4$}\\[2cm]          \fboxsep=10mm \fboxrule=0.5mm     \fcolorbox{black}{blue!40!white}{{\bf Q}}          \end{document}      But it looks like I cannot further continue with this approach because for arrows I will need tikz(right?!). On the other hand I don't have a clue about the sign on the right of the figure and how to generate that! Plus there is this annoying distance between my squqares and in the original figure the outer boundary of the tape-like rectangle that the characters are in is wider than the inner lines. How can I generate that?


title: Using template in XeLaTeX

text: I am currently trying to make a resume using a template in XeLaTeX. I am very new to MiKTEX and really do not know so much about programming (I have a lot of experience in Texmaker though) and am unable to solve this problem myself or understand answers to similar questions when reading them since the solutions often requires some knowledge to understand. I'll try to post my code here and hope that some kind sole can help me with my issue.               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Friggeri Resume/CV     % XeLaTeX Template     % Version 1.0 (5/5/13)     %     % This template has been downloaded from:     % http://www.LaTeXTemplates.com     %     % License:     % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)     %     % Important notes:     % This template needs to be compiled with XeLaTeX and the bibliography, if used,     % needs to be compiled with biber rather than bibtex.     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               \documentclass['print']{friggeri-cv} % Add 'print' as an option into the square bracket to remove colors from this template for printing          \usepackage{tipa}     \addbibresource{bibliography.bib} % Specify the bibliography file to include publications          \begin{document}               \header{john}{smith}{junior business analyst} % Your name and current job title/field          %----------------------------------------------------------------------------------------     %   SIDEBAR SECTION     %----------------------------------------------------------------------------------------          \begin{aside} % In the aside, each new line forces a line break     \section{contact}     123 Broadway     City, State 12345     Country     ~     +0 (000) 111 1111     +0 (000) 111 1112     ~     \section{languages}     english mother tongue     spanish \& italian fluency     \section{programming}     {\color{red} $\varheartsuit$} JavaScript     Python, C++, PHP     CSS3 \& HTML5     \end{aside}          %----------------------------------------------------------------------------------------     %   EDUCATION SECTION     %----------------------------------------------------------------------------------------          \section{education}          \begin{entrylist}     %------------------------------------------------     \entry     {2011--2012}     {Masters {\normalfont of Commerce}}     {The University of California, Berkeley}     {\emph{Money Is The Root Of All Evil -- Or Is It?} \\ This thesis explored the idea that money has been the cause of untold anguish and suffering in the world. I found that it has, in fact, not.}     %------------------------------------------------     \entry     {2007--2008}     {Bachelor {\normalfont of Business Studies}}     {The University of California, Berkeley}     {Specialization in Commerce}     %------------------------------------------------     \end{entrylist}          %----------------------------------------------------------------------------------------     %   WORK EXPERIENCE SECTION     %----------------------------------------------------------------------------------------          \section{experience}          \begin{entrylist}     %------------------------------------------------     \entry     {2012--Now}     {LEHMAN BROTHERS}     {Los Angeles, California}     {\emph{1\textsuperscript{st} Year Analyst} \\     Developed spreadsheets for risk analysis on exotic derivatives on a wide array of commodities (ags, oils, precious and base metals), managed blotter and secondary trades on structured notes, liaised with Middle Office, Sales and Structuring for bookkeeping. \\     Detailed achievements:     \begin{itemize}     \item Learned how to make amazing coffee     \item Finally determined the reason for \textsc{PC LOAD LETTER}:     \begin{itemize}     \item Paper jam     \item Software issues:     \begin{itemize}     \item Word not sending the correct data to printer     \item Windows trying to print in letter format     \end{itemize}     \item Coffee spilled inside printer     \end{itemize}     \item Broke the office record for number of kitten pictures in cubicle     \end{itemize}}     %------------------------------------------------     \entry     {2010--2011}     {LEHMAN BROTHERS}     {London, United Kingdom}     {\emph{Summer Intern} \\     Rated "truly distinctive" for Analytical Skills and Teamwork.}     %------------------------------------------------     \entry     {2008-2009}     {Buy More}     {Burbank, California}     {\emph{Computer Repair Specialist} \\     Worked in the Nerd Herd and helped to solve computer problems by asking customers to turn their computers off and on again.}     %------------------------------------------------     \end{entrylist}          %----------------------------------------------------------------------------------------     %   AWARDS SECTION     %----------------------------------------------------------------------------------------          \section{awards}          \begin{entrylist}     %------------------------------------------------     \entry     {2011}     {Postgraduate Scholarship}     {School of Business, The University of California}     {Awarded to the top student in their final year of a Bachelors degree.}     %------------------------------------------------     \end{entrylist}          %----------------------------------------------------------------------------------------     %   COMMUNICATION SKILLS SECTION     %----------------------------------------------------------------------------------------          \section{communication skills}          \begin{entrylist}     %------------------------------------------------     \entry     {2011}     {Oral Presentation}     {California Business Conference}     {Presented the research I conducted for my Masters of Commerce degree.}     %------------------------------------------------     \entry     {2010}     {Poster}     {Annual Business Conference, Oregon}     {As part of the course work for BUS320, I created a poster analyzing several local businesses and presented this at a conference.}     %------------------------------------------------     \end{entrylist}          %----------------------------------------------------------------------------------------     %   INTERESTS SECTION     %----------------------------------------------------------------------------------------          \section{interests}          \textbf{professional:} data analysis, company profiling, risk analysis, economics, web design, web app creation, software design, marketing \textbf{personal:} piano, chess, cooking, dancing, running          %----------------------------------------------------------------------------------------     %   PUBLICATIONS SECTION     %----------------------------------------------------------------------------------------          \section{publications}          %\printbibsection{article}{article in peer-reviewed journal} % Print all articles from the bibliography          %\printbibsection{book}{books} % Print all books from the bibliography          \begin{refsection} % This is a custom heading for those references marked as "inproceedings" but not containing "keyword=france"     \nocite{*}     \printbibliography[sorting=chronological, type=inproceedings, title={international peer-reviewed conferences/proceedings}, notkeyword={france}, heading=subbibliography]     \end{refsection}          \begin{refsection} % This is a custom heading for those references marked as "inproceedings" and containing "keyword=france"     \nocite{*}     \printbibliography[sorting=chronological, type=inproceedings, title={local peer-reviewed conferences/proceedings}, keyword={france}, heading=subbibliography]     \end{refsection}          \printbibsection{misc}{other publications} % Print all miscellaneous entries from the bibliography          \printbibsection{report}{research reports} % Print all research reports from the bibliography          %----------------------------------------------------------------------------------------          \end{document}      The error code I get from MiKTEX is:               ! Undefined control sequence.     <argument> \c_keys_code_root_tl                                      fontspec/Ligatures/Historical     l.8 ...tureoption{Ligatures}{Historic}{Historical}


title: Typesetting a descending italic z

text: I have a document which has many short quotes in which I would like to imitate the fonts. For this document I am limited to `LaTeX` (not `LuaTeX`) by the publisher. The `jkpvos` font family from `kpfonts` does a reasonable job with this Marin Mersenne (1625) except for the descending z (4th and 5th line below). How might I imitate it with `LaTeX`? ![Font example to be reproduced with LaTeX](http://i.stack.imgur.com/QZjV6.png) Added to original question: It does not need to be perfect. The image below is what I have for this quote, and it is sufficient for my purposes (other than the z). ![enter image description here](http://i.stack.imgur.com/HmjlV.png)


title: reducing space before and after sub-headings

text: How can I reduce the space between \subsection and its following text, and also with \subsubsection. Currently it has a 2-line space above, and a 3-line space before and after the two headers. I am using `\documentclass{scrreprt}` and `\usepackage{savetrees}`. ![some of the \\subsubsection](http://i.stack.imgur.com/NfFZL.png)               \documentclass{scrreprt}      \usepackage{savetrees}     \usepackage{lipsum}           \begin{document}           \subsection{Indications}           \subsubsection{Prices}           \end{document}


title: PGF math engine imprecise?

text: The command `\pgfmathparse{asin(1/\x)}` yields for each `\x` in the range of 125 to 142 the same value, whereas `\pgfmathparse{1/\x}` yields the much more precise values for each `\x`. Is the ArcSin function of PGF that imprecise? What can i do to get more precise results? MWE:               \documentclass[11pt]{minimal}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}         \foreach \x in {120,121,...,150}         {             \pgfmathparse{1/\x}\let\fraction\pgfmathresult             \pgfmathparse{asin(\fraction)}\let\angle\pgfmathresult             \node at (0, \x/2-60) {\x, \fraction, \angle};          }     \end{tikzpicture}     \end{document}


title: How to control the spaces before and after itemize(listing) environment inserted in a table?

text: I have a macro that inserts itemize environment in a longtable. The issue is that I have big spaces between top and bottom of the itemize environment. How can I control the spaces? ![enter image description here](http://i.stack.imgur.com/pqlkk.png)               \documentclass{article}     \usepackage{longtable}     \usepackage{booktabs}          \newcommand{\heu}[1]{%     \textit{BB Heuristic:} #1%     }%          \newcommand{\whypri}[2]{%     \begin{itemize} %     \item \textit{Why}: #1%     \item \textit{Priority Justification}: #2%     \end{itemize}%     }          \begin{document}          \begin{longtable}{c|p{0.4\textwidth}|p{0.5\textwidth}}     \caption[Derivation Plan]{Derivation Plan} \label{d_plan} \\        \toprule     \textbf{1} & \multicolumn{2}{l}{\textbf{Goal: Extensibility}} \\\midrule     1.1      & \heu{Reduce Data/Event Dependency}     &  \whypri{Extensible components should be working as a standalone that has minimum     dependency on other components. The more dependencies, the more complexity     Occurs To prevent extensible structure.}{Less complexity in extension introduced     by reducing dependency.}     \\\midrule     %\st{BB Heuristic: }     \bottomrule     \end{longtable}          \end{document}


title: How to remove header on the page with big picture?

text: Can you help me to remove header from the page where is only one big picture? I tried `\thispagestyle{empty}` but it removes a header on the next or previous page. I don't know how to remove it exactly from the page only with the picture. I put this picture in my document by using `{sidewaysfigure}` environment and `\includegraphics` in it. Here is my MWE               \documentclass{book}          \usepackage[demo]{graphicx}          \usepackage[      centering,      top=12mm,      headheight=14pt,      headsep=11pt,      includeheadfoot,      papersize={160mm,235mm},      text={125mm,190.7mm},     ]{geometry}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{}      \newcommand{\TheAuthor}{}      \newcommand{\Author}[1]{\renewcommand{\TheAuthor}{#1}}      \rhead{\small\TheAuthor}     \newcommand{\TheTitle}{}      \newcommand{\Title}[1]{\renewcommand{\TheTitle}{#1}}      \lhead{\small\normalfont\TheTitle}     \fancyfoot{}      \fancyhead[RO,LE]{\thepage}           \usepackage{lipsum}          \usepackage{rotating}               \begin{document}          \lipsum          \begin{sidewaysfigure}        \centering        \fbox{\includegraphics[width=190mm]{pic.jpg}}          \caption*{\footnotesize\centering{Pic. 1}}     \end{sidewaysfigure}          \lipsum          \end{document}


title: Suppressing page numbers for floating figure

text: At the end of a manuscript, I have several figures, each of which takes up an entire page. A couple of these figures have long captions that end up overlapping the page number. I'd like to suppress the page number on these pages. No matter where I put `\thispagestyle{empty}`, it only suppresses the page number for the first figure.


title: Defining a width that fills remaining horizontal space for text fields in hyperref forms environment

text: This code               \documentclass[10pt,a4paper]{article}          \usepackage[showframe,headheight=2in,headsep=0.1in,left=0.8in,right=0.8in,bottom=0.5in]{geometry}      \usepackage{xcolor}      \usepackage{hyperref}          \begin{document}     \begin{Form}     \noindent\textbf{DESCRIPTION OF ACTIVITY}\raisebox{-2pt}{\TextField[name=description,width=4.3in]{~}}     \end{Form}          \end{document}      gives the output ![enter image description here](http://i.stack.imgur.com/ky6Uw.png) Notice that the text field box did not end at the right margin. This results to ugly alignment of the boxes after typing several lines with text fields. I could have used `\hfill` before the text field but that will leave ugly white space between DESCRIPTION... and the text field. So, to my question: How can I define a width, remwidth, such that I can write               \noindent\textbf{DESCRIPTION OF ACTIVITY}\raisebox{-2pt}{\TextField[name=description,width=remwidth]{}}      so that the text field box stops exactly at the right margin rule? I would appreciate it very much if the the answer would include an explanation of what is happening at every step. **Edit: October 15, 2012** I edited the question since the problem is really about the `\TextField` command and the `hyperref` package putting a padding in it as noted in the comments. The other part of my question on defining a width command that I can use elsewhere is actually solved by `\linewidth`, which I just learned last night even after 3 years of using LaTeX. The question Difference between \textwidth, \linewidth and \hsize clarified its use for me.


title: How to select whole environment in TeXstudio

text: > When I was a Windows user (a long time ago), I remember that it was possible > to select the whole environment in WinEdt just by double clicking the > `\begin` command. > > Is it possible to do this in TeXstudio? How do we select an environment? > > * * * > > **Edit** I tried the suggestions below with no progress. I am posting an > image showing what happens when I press the shortcut `Ctrl`+`Shift`+`P` and > **(after released the 3 keys)** I pressed the key `i` or `I`. First, with > the cursor at the right, that is, `\begin{equation}|` (note the yellow > color). Second, after `Ctrl`+`Shift`+`P`, note the `equation` in blue color. > Then, I pressed only the key `i` (I tried also only `I`). > > enter image description here


title: Gcard with six panels

text: I want to make a card in latex with six panels. Sorry for the crude explanation, but something like this: \__/, that is, the card folds both from the left and the right, with the two edges meeting in the middle. So you have, for example, the following panels:   * Front left: 3" x 6"    * Front right: 3" x 6"   * Inside left: back of front left   * Inside middle: 6" x 6"   * Inside right: back of front right   * Back: back of inside middle I found the gcard package which allows for four panels like a regular card. Is it possible to alter the gcard package to allow for this?


title: How to redefine the colon-symbol with unicode-math (spacing problem)

text: I want to change the usual role of `:` and `\colon`. Consider the following code               \documentclass{scrreprt}          \usepackage{amsmath}     \usepackage{unicode-math}          %\unimathsetup{colon=literal}     %\DeclareMathSymbol{:}{\mathpunct}{operators}{"3A}     %\let\colon\relax     %\DeclareMathSymbol{\colon}{\mathrel}{operators}{"3A}               \begin{document}         \newcommand\mycolon{\mathpunct{\char"003A}}         \newcommand\myratio{\mathrel{\char"003A}}              \( \pi:X \to Y \) (1)              \( \pi\myratio X \to Y \) (2)              \( \pi\colon X \to Y \) (3)              \( \pi\mycolon X \to Y \) (4)     \end{document}      The first two have the same gap between $\pi$ und $X$. (3) has less space and (4) the least amount. Remember the spacing of (3). Now uncomment the lines to interchange the role of ':' and \colon. Through now (1') is now correctly set as a punctation, the spacing is equal to (4') and NOT equal to the previous space of (3). Is there a way to adjust them? **EDIT: Solution due to egreg** (with minimal changes)               \documentclass{scrreprt}          \usepackage{amsmath}     \usepackage{unicode-math}     \usepackage{etoolbox}               \patchcmd{\colon}{:}{\relcolon}{}{}         % Remove ':' from the definition of \colon      \newcommand\myratio{\mathrel{\char"02236}}  % Define how the colon should look like as a ratio      %\newcommand\myratio{\mathrel{\char"003A}}  % Use for wider space     \AtBeginDocument{         \edef\relcolon                          % Define \recolon with current ':'             {\mathrel{\Umathcharnum\the\Umathcodenum`:}}             \begingroup\lccode`~=`:                 % Make ':' math-active and redefine it to be \colon         \lowercase{\endgroup\let~}\colon         \mathcode`:="8000         \let\colon\myratio                      % Redefine \colon with \myratio                           }          \begin{document}         \( \pi:X \to Y \) (1)              \( \pi\colon X \to Y \) (2)     \end{document}


title: unwanted text as part of font change

text: I have the following line:               {\fontencoding{T1}\fontfamily{Latin Modern}\fontseries{m}\fontshape{n}\selectfont P} is the total 2010 population in urban areas in Maricopa County or in sensitivity groups.      The output shows: > modern.fd Modern.fd P is the total 2010 population in urban areas for > Maricopa County or in sensitivity groups. I am not sure why the text "modern.fd Modern.fd" is appearing. Oddly, it only appears in the first instance of that line of code; i.e., I have repeated the line in different parts of the same `.tex` file, and in subsequent instances, it displays the "P" character in Latin Modern, as I intended.


title: log scale plot and filter not interacting well in pgfplots

text: It looks like when I try to scale coordinate data in a `pgfplots`, I cannot do it in log scale simply, since the expression filter seems to be applied to the final point and not the table value. For example, I expect these two commands to produce basically the same plot:               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[ymode=log] % ymode=normal works well!     \addplot+[] table[     x expr=\thisrow{X}*1., y expr=\thisrow{Y}*3, row sep=\\     ]{     X Y \\     1 1.1 \\     2 11 \\     3 110 \\     } node[]{};     \addplot+[x filter/.code={\pgfmathparse{\pgfmathresult*1.}\pgfmathresult},      y filter/.code={\pgfmathparse{\pgfmathresult*3.}\pgfmathresult}]      plot coordinates     {      ( 1, 1 )      ( 2, 10)      ( 3, 100)     };     \end{axis}     \end{tikzpicture}     \end{document}      However I get this, ![wrongplot](http://i.stack.imgur.com/8I1dS.png) where the red line (`coordinates` version) is not the expected result. For example the last red point is about 10^6 and not about 300. (Using `ymode=normal` produces the expected graph) Obviously `y filter/.code` is not doing what I expected. I remember reading something about this in the manual. Maybe it is by design. The question is: **Is there another way of applying this transformation so it works for linear and log plot (just changing the value of`ymode`)? Or I have to switch to the `plot table`-based code altogether?**


title: TikZ: arrange trees block by block

text: I use TikZ to create trees. Now I've to arrange four trees in a matrix like this:               Tree A Tree B     Tree C Tree D      I already tried the \matrix command. This works, but it leaves absolutely no space between the trees. I want to have the trees to be seperated by a space, in order to create arrows between the trees. Ideally the four trees are located in four boxes, which all have the same size and the same space between them. Any suggestions? Thanks. Edit: This is what I've come up with:               \documentclass{article}     \usepackage{scalefnt}     \usepackage{tikz}     \usetikzlibrary{arrows,calc}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{decorations.pathreplacing}     \usetikzlibrary{trees}     \usetikzlibrary{matrix}     \pgfdeclarelayer{background}     \pgfsetlayers{background,main}     \begin{document}     \begin{tikzpicture}         [         every node/.style={rectangle, draw, fill=black!10,           text badly centered, font=\scalefont{0.45}, text width=1.3cm},         level distance=0.7cm,         level 1/.style={sibling distance=2cm}         ]              \matrix [draw=none, fill=none, column sep=2cm, row sep=1.5cm]         {           \path node {Ressourcen} [edge from parent fork down]           child {node {Zeit}}           child {node {Umwelt}             child {node [text width=2.8cm]{Lernumgebung, Personen Material}}           }           child {node {Physiologie}};           &           \path node {Ziele} [edge from parent fork down]           child {node {kurzfristig}}           child {node {langfristig}};\\                \path node {Volition} [edge from parent fork down]           child {node {Aufmerksamkeit}}           child {node {Motivation}}           child {node {Emotionskontrolle}};           &           \node {Lernstrategien};\\         };       \end{tikzpicture}     \end{document}      Now it would be nice to have boxes around the trees and to have arrows between the boxes...


title: "Faking" small caps for a font installed from .ttf files

text: Say I have installed a font using something like `otfinst.py` or similar. And say this font doesn't have a small caps version. Is there an easy way to fake small caps in pdflatex? At the moment, text that is supposed to be `sc` just shows up as regular text... For a one off, I can fake small caps like this (requires `graphicx`):               F\scalebox{0.7}{\MakeUppercase{ake small caps}}      And I guess what I'd like is a macro that does that. That is, it `scalebox`es and then `MakeUppercase`s all of the lower case letters in its argument. Is that possible?


title: Beamer: split header in two lines

text: I have a lot of sections in my beamer presentation. Because of that I cannot see all of them in the header. Since I'm using the Darmstadt theme, it seems that the header has enough space two write the sections in 2 lines. How can I do that? I could use other theme too.               \documentclass[hyperref={pdfpagelabels=false},xcolor=dvipsnames]{beamer}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     \usepackage{subfigure}     \usepackage{wasysym}     \usepackage{pdfpages}     \usepackage{beamerthemeshadow}     \usepackage{caption}     \usepackage{xcolor}     \usepackage{multicol}     \usetheme{Darmstadt}          \begin{document}          \begin{frame}     \titlepage     \end{frame}          \begin{frame}\frametitle{TOC}     \begin{multicols}{2}     \tableofcontents     \end{multicols}     \end{frame}          \section{Section 1}     \begin{frame} \frametitle{Section 1}          \end{frame}          \end{document}      Thanks


title: How to make auctex not prompt me on C-c C-c

text: The C-c C-c bind runs TeX-command-master. It always asks me "is this what you want to do?" and I'm always hitting return to do it. I'd like a version of this command which just does it without asking.


title: Can I override the author name abbreviation in the abbrv bibliography style?

text: I'm using the `\bibliographystyle{abbrv}`. I have a paper in my bibliography, with an author whose first name has been abbreviated in the original paper with "Th." (the full name is unknown to me). When using the `abbrv` bibliography style, bibtex/latex further abbreviates this to "T.", which seems wrong, if the author explicitly used "Th." So, is there a way to override the author name abbreviation by the `abbrv` bibliography style, so that I can force it to not abbreviate "Th." any further?


title: xparse with underscore and optional argument

text: I need a macro which handles its input as follows:   1. `\foo A` > #2 = A   2. `\foo{A}` > #2 = A   3. `\foo(B)` > #3 = A (round brackets)   4. `\foo_m A` > #1 = m, #2 = A   5. `\foo_m{A}` > #1 = m, #2 = A   6. `\foo_m(B)` > #1 = m, #3 = B (round brackets)   7. `\foo_{m}(B)` > #1 = m, #3 = B (and analogous for `(B) = {A}` ) Bonus points, if also `\foo_m {A}` and `\foo_m (B)` (with an additional space) are mapped like 5 and 6, resp. (Remark: If I left an argument out in the above listing, then #? = NoValue is desired.) I tried the following definition               \NewDocumentCommand\foo{t_ m g d()}      but this does not work in all cases (not in the 3. and 4.).


title: moderncv: Increase space between cventry

text: I wrote my CV using `moderncv` but the entries (in particular `\cventry`) are too compact for me. I tried to change the `parskip` but it does not change anything. Could you tell me how could I increase the spacing between the items?


title: Biblatex 2.7 and \DefineBibliographyStrings

text: I downloaded the latest version 2.7. If I use               \DefineBibliographyStrings{brazil}{%         namedash={---------},%         volumeof={de},%         url={Disponível em: },%         shorthands={Abreviaturas}     }      namedash and volumeof work, but url and shorthands don't (either using babel or polyglossia). Version 2.5 works without problems (I don't even need to specify "shorthands"). Is there anything I can do to make it work with 2.7?


title: How to Convert XeTeX to HTML

text: I realize its too much to post the entire document. Here is a small portion of document, it just keep repeating itself for various verses. Sorry this is the minimum example size I could squeeze it to.               \documentclass[a4paper,12pt]{article}     %\usepackage[left=0.15in,right=0.15in,top=0.75in,bottom=0.75in]{geometry}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{polyglossia}     \usepackage{longtable}     \usepackage[doublespacing]{setspace}     \usepackage{verse}     \usepackage{varwidth}          \AtBeginEnvironment{Verse}{\singlespacing}          \AtBeginEnvironment{longtable}{\onehalfspacing}          \newcommand{\blt}{\begin{longtable}{p{1.5cm}p{0.05cm}p{3.5cm}|p{1.5cm}p{0.05cm}p{3.5cm}|p{1.5cm}p{0.05cm}p{3.5cm}}}     \newcommand{\elt}{\end{longtable}}          \newcommand{\bv}{\begin{Verse}\large}     \newcommand{\ev}{\end{Verse}}          \newcommand{\bfns}{\begin{footnotesize}}     \newcommand{\efns}{\end{footnotesize}}          \newcommand{\sz}{\\[\normalbaselineskip]}     \newcommand{\csec}[1]{\section{#1}}          \newenvironment{Verse}       {\center\varwidth{\linewidth}}       {\endvarwidth\endcenter}          \setmainfont[Script=Devanagari]{Sanskrit 2003}          \begin{document}      \bv     तपः स्वाध्यायनिरताम् तपस्वी वाग्विदाम् वरम् |          \\      नारदम् परिपप्रच्छ वाल्मीकिर्मुनिपुङ्गवम् ॥ १.१.१ ॥     \ev          \bfns  \blt \hline     तपस्वी & = &  sagacious thinker & वाल्मीकि: & = &  Sage [Poet]  वाल्मीकि & तपः & = & in thoughtful-meditation  \\     स्व अध्याय & = & in self, study of scriptures & निरतम् & = & always - who is eternally studious in scriptures& वाक् & = & in speaking [in enunciation] \\          विदाम् & = & among expert enunciators & वरम् & = & sublime one - with नारद & मुनि पुन्गवम् & = & with sage, paragon, with such a paragon sage Naarada \\          नारदम्  & = &  with [such a sage] Naarada & परिपप्रच्छ  & = &  verily [inquisitively,] inquired about          \elt \efns          सर्व गुण समिष्टि रूपम् पुरुषम्  all, merited endowments, composite, in form - about such a man.]      A thoughtful-meditator, an eternally studious sage in scriptures about the Truth and Untruth, a sagacious thinker, and a sublime enunciator among all expert enunciators is नारद, and with such a Divine Sage नारद, the Sage-Poet वाल्मीकि is inquisitively enquiring about a man who is a composite for all merited endowments in his form and calibre. [1-1-1]\\       \end{document}      This is the command I ran: `htxelatex bala.tex # generate html`. Now I am getting the following error:               (/usr/local/texlive/2011/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (./bala.aux)          ! LaTeX Error: Command `\acute' already defined in `'.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.33 \begin{document}          ?      I changed the package options of `fontspec` to `\usepackage[no- math]{fontspec}` and it gave me this error:               ----------------------------------------------------     (--- xdv font = [/usr/local/texlive/2011/texmf-dist/fonts/opentype/public/lm/lmmono10-regular.otf] (not implemented) ---)     --- warning --- Couldn't find font `[/usr/local/texlive/2011/texmf-dist/fonts/opentype/public/lm/lmmono10-regular.otf].htf' (char codes: 0--255)     (--- xdv font = Sanskrit2003 (not implemented) ---)     --- warning --- Couldn't find font `Sanskrit2003.htf' (char codes: 0--255)     (--- xdv font = Sanskrit2003 (not implemented) ---)     --- error --- Illegal storage address     ----------------------------          t4ht.c (2010-12-16-08:47 kpathsea)     t4ht -.xdv        -f/Bala      (/usr/local/texlive/2011/texmf-dist/tex4ht/base/unix/tex4ht.env)     Entering Bala.lg


title: Abbreviate resolved abbreviations in authors' first names in biblatex

text: I like to resolve abbreviated first names in my `.bib` file. For example, if the author of a book is given as `Paul G. J. Smith`, I will resolve the abbreviations as `Paul G[eorge] J[ohn] Smith` in my `.bib` file. Some journals, however, specifically want the names of the authors to be printed as they appear in the cited work. The entry for Smith, therefore, should appear as `Smith, Paul G. J.` in the printed bibliography. What do I need to do in `biblatex` in order to tell it to replace a sequence beginning with `[` and ending with `]` with a dot `.`? Please suggest a command I can put in the preamble of my `.tex` file. I have a long list of `biblatex` tweaks in my preambles, and I would prefer to keep them all there, if possible. A MWE:               \documentclass{article}     \usepackage{csquotes}     \usepackage[             bibstyle = authoryear,             citestyle = authoryear-comp,             sorting = nyt,             language = american,             abbreviate = false,             backend = biber]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @BOOK{smith2006,         AUTHOR = "Paul G[eorge] J[ohn] Smith",         TITLE = "My life with the Beatles",         YEAR = "2006"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \noindent     Text \parencite{smith2006}.     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/Xzzrm.png)


title: No period between article name and journal, {article}-only (authoryear-ibid)

text: my department has very specific expectations for formatting the Works Cited. Usually, most parts are to be delimited (by a period, a comma, a colon…). I got around most of the issues, but one remains. For articles, it is to be this:               Last Name, First Name. Year. “Title of Article.” Title of Book. Ed. Name(s) of editor(s). Place: Publisher. Pages of article.      Note how the period between Title of Article and Title of Book is missing. It is to be inside the article title. I can easily insert that one into my bib- file, but I would then have to get rid of the one that author year-comp sets. So far I fiddled around with `\xpatch` with hints from biblatex: No period after book and collection titles, but I can’t seem to get it to work. I also looked in `standard.bbx` for anything that looks like what I’m looking for but I cannot seem to find anything. Any help would be greatly appreciated, thanks! Please find attached my .tex-file:               \documentclass[a4paper,12pt]{article}     \usepackage{xpatch}          \usepackage{csquotes}          \usepackage{polyglossia}     \setmainlanguage[variant=american]{english}          \usepackage{fontspec,xltxtra,xunicode}          \usepackage[style=authoryear-ibid,backend=biber,doi=false,isbn=false,url=false,autolang=hyphen]{biblatex}          \addbibresource{Merkliste.bib}          \renewcommand*{\postnotedelim}{\addcolon\space}          \renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}         \renewcommand*{\intitlepunct}{\addspace}          \renewcommand{\bibpagespunct}{\ifentrytype{incollection}{\addperiod\addspace}{\addcolon\addspace}}          \DeclareFieldFormat{postnote}{#1}     \DeclareFieldFormat{multipostnote}{#1}     \DeclareFieldFormat{pages}{#1}          \xpatchbibmacro{date+extrayear}{%       \printtext[parens]%     }{%       \setunit*{\addperiod\space}%       \printtext%     }{}{}     %\xpatchbibdriver{article}{\newunit\usebibmacro{title}}{%     %\setunit{\addspace}\newunit%     %\usebibmacro{publisher+location+date}%     %}{}{}          \AtEveryBibitem{\clearlist{language}} % clears language     \AtEveryBibitem{\clearfield{note}}    % clears notes     \AtEveryBibitem{\clearfield{series}}   % clears Series     \AtEveryBibitem{\ifentrytype{book}{\clearfield{number}}{}}     \AtEveryBibitem{\ifentrytype{book}{\clearfield{pages}}{}}     \begin{document}     \nocite{*}.      \printbibliography     \end{document}      Commented out is the part with which I am trying to achieve the correct references. Here is one example of such a journal in my .bib:               ![@article{conrick_challenges_2006,         Author = {Conrick, Maeve},         Date-Modified = {2014-08-03 13:33:04 +0000},         Doi = {10.1386/ijfs.9.3.311_1},         Issn = {13682679},         Journal = {International Journal of Francophone Studies},         Keywords = {{BILINGUALISM}, Bill 101, {CANADA}, {CONFEDERATION}, 1867, Education, {FEDERAL} government, francophone, French, {GOVERNMENT} policy, {HISTORY}, {LANGUAGE} \& languages, language policy, linguistic duality, minority language communities, official languages, Quebec},         Month = dec,         Number = {3},         Pages = {311--328},         Shorttitle = {The challenges of linguistic duality for francophone Canada},         Title = {The challenges of linguistic duality for francophone Canada: contact, conflict and continuity},         Url = {http://www.redi-bw.de/db/ebsco.php/search.ebscohost.com/login.aspx%3fdirect%3dtrue%26db%3daph%26AN%3d24405708%26site%3dehost-live},         Urldate = {2014-07-26},         Volume = {9},         Year = {2006}}][1]


title: How do I embed equations in the text?

text: Let's say I have a text block like this: > Within the field of texture analysis, a number of categories of methods > exist, and even if we restrict ourselves to statistical methods, a large > number of methods are available. `\begin{equation} f(x) = x + 3 > \end{equation}` Statistical approaches are considered to be generally > applicable and work well for natural textures present in images. Here the `\begin{equation} f(x) = x + 3 \end{equation}` won't work. Could someone please help me?


title: Footnote indent equal to text parindent

text: Is there a way to save the document `\parindent` and use it to indent footnotes? I am using `koma-script`, therefore I would like to use the `\deffootnote[mark width]{indent}{parindent}{definition}` command. A MWE is               \documentclass{scrartcl}     %\deffootnote[1em]{0em}{1em}{\textsuperscript{\thefootnotemark}}          \parindent = 20pt          \deffootnote[\dim\the\parindent]{0em}{\the\parindent}{\textsuperscript{\thefootnotemark}}          \begin{document}          Here it will be placed a footnote\footnote{This is a footnote!}.          \end{document}      But it doesn't work as expected!


title: How to create individual chapter PDFs

text: My document structure has   * one file with preamble (i.e. `MainTex`)   * and around 75 individual `.tex` files (i.e. `Chapter_01`, `Chapter_02`, ..., `Chapter_75`) representing each chapter. I am using `\include` command to create a one big PDF file, the output is `MainTex.pdf`. Life is all good up to this point. If I have to create individual PDF for each chapter then do I need to run 75 times with each chapter name and rename the PDF manually to match to chapter name. Because if I include only `Chapter_01` and run it creates PDF named as `MainTex.pdf`. Is there a way I can automate this workflow?


title: what's the best solution to split a .tex file into separate compiled files?

text: I have a .tex file that includes several chapters (all through the `\input` command). I would like to run `pdflatex` in one command such that it saves each chapter into a separate PDF file, while maintaining correct references to sections, bibliography (that appears in the end) and so on. Is that possible?


title: Outputting each chapter of a LaTeX document to a separate PDF

text: Is it possible to output each chapter of a LaTeX document to a separate PDF? I have a document with 10 chapters and I would like to get 10 PDFs when I compile my document. Could someone help me on this?


title: Creating multiple PDF files from a single LaTeX file

text: > **Possible Duplicate:**   >  How to create individual chapter PDFs In my LaTeX file, I have               \chapter{chapter one}          \chapter{chapter two}          \chapter{chapter three}      etc. I wonder if there is a way to create separate PDF files for each chapter, i.e. `chapter one.pdf`, `chapter two.pdf`, `chapter three.pdf` etc. As there are quite a few chapters in my document and they keep changing, separating the chapters manually can prove to be time consuming and ineffective. I am using texlive in Ubuntu. Any help is much appreciated.


title: How do I put text over a squiggly arrow?

text: I am currently trying to write text over a squiggly arrow (`\rightsquigarrow`). For normal arrows, I use the `extarrows` package, which provides commands like `\xlongrightarrow` and `\xLongrightarrow` which dynamically stretch the arrow depending on the text length. However, the package does not provide commands for squiggly arrows and I was not able to find another one which does so.


title: Hebrew LyX reverses parenthesis

text: I'm trying to write an Hebrew document in LyX, export to LaTeX and then compile with XeTeX. Everything works great (after some minor corrections in the output, mainly removing the \L tags babel creates) except one thing: Parenthesis. They are reversed. But not always; only when they're in "pure" text. In mathboxes and even in more complex circumstances and such they are not reversed, making the easy solution of "simply flip everything" impossible. For example:               \item {$\left(A\cup B\right)\cup C=A\cup\left(B\cup C\right)$} )\textbf{אסוציאטיביות}האיחוד(.      This is a strange example, as the first parentehsis (right before the textbf) are shown correctly, but the ones at the end are not. I only need to flip the closing parenthesis. All this seems too chaotic for me to handle even with a script. What exactly is going on here? Is there some way to force LyX to treat parenthesis in Hebrew docs in some unified manner?


title: multicols not wrapping to 2nd column properly?

text: > **This question led to a new feature in a package:**   >  `multicol` I am having problem with `multicol` package, I created a sample demo to show it. When I put 3 `minipage`s of certain height in the `multicol` it puts 2 of the boxes on the first column, but the 2nd box is too big to fit that column (overflows the page) and should've been moved to the 2nd column. LateX even outputs the message `Overfull \vbox (145.52644pt too high) has occurred while \output is active`. But if I go change the height of the 2nd box to `40em`, it would work great, and also if I use unbalanced columns (`multicols*`) then it also works great, but I need balancing columns and I need it to handle columns automatically. ![Preview of the sample code](http://i.stack.imgur.com/VHh1W.png)               \documentclass[12pt]{article}     \usepackage[paperwidth=8.5in, paperheight=11.0in, right=.25in,left=.25in,top=.75in,bottom=0.75in]{geometry}     \usepackage{multicol}          \newcommand{\drawbox}[1]     {         % Draws a simple box given the height         \noindent\fbox{%             \begin{minipage}{0.9\linewidth}%                 \hfill \vspace{#1}%             \end{minipage}         } \\     }          \begin{document}         \begin{multicols}{2}             \drawbox{40em}                  % This box is too big to fit in the fist column, but would work great in the second colum             \drawbox{30em}              \drawbox{40em}         \end{multicols}     \end{document}


title: Want to fill line with repeating string

text: Similar to the `\dotfill` command, but with your own text, rather than dots. If the string was: `kitty!` The entire line would look like the following: `kitty!kitty!kitty!kitty!kitty!kitty!kitty!kitty!kitty!` Is there any way to do this?


title: How to write “not a subset” of a set?

text: How to write A is not a subset of B in LaTeX? I can write `$A\nsubseteq B$`, but I want to remove the equality sign. Please help.


title: How do I prevent \includegraphics from rendering in bold in Acrobat?

text: I believe I'm seeing the same problem mentioned here, but just to summarize: When I use `\includegraphics` for a PDF, any other text on that page is rendered **in bold** in Acrobat 9 _if 2D hardware acceleration is used_. Is there any solution for preventing this (aside from turning the PDF into a raster format like JPG or PNG, and obviously aside from changing my PDF reader or turning off 2D graphics acceleration)? * * * Example:               \documentclass{article}     \usepackage{graphicx}     \usepackage{subfig}     \begin{document}         \begin{figure}             \subfloat[caption]{\includegraphics{Bad.pdf}}         \end{figure}     \end{document}      Bad.pdf (base64):               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     1kaPNVbVbck1FJsXHI2P4n8VXLMACmVuZHN0cmVhbQplbmRvYmoKNCAwIG9iagogICAxNjU3CmVu     ZG9iagoyIDAgb2JqCjw8CiAgIC9FeHRHU3RhdGUgPDwKICAgICAgL2EwIDw8IC9DQSAxIC9jYSAx     ID4+CiAgICAgIC9hMSA8PCAvQ0EgMC4xMTc2NDcgL2NhIDAuMTE3NjQ3ID4+CiAgID4+CiAgIC9G     b250IDw8CiAgICAgIC9mLTAtMCA1IDAgUgogICAgICAvZi0xLTAgNiAwIFIKICAgPj4KPj4KZW5k     b2JqCjcgMCBvYmoKPDwgL1R5cGUgL1BhZ2UKICAgL1BhcmVudCAxIDAgUgogICAvTWVkaWFCb3gg     WyAwIDAgMjQwIDE2OS42MDAwMDYgXQogICAvQ29udGVudHMgMyAwIFIKICAgL0dyb3VwIDw8CiAg     ICAgIC9UeXBlIC9Hcm91cAogICAgICAvUyAvVHJhbnNwYXJlbmN5CiAgICAgIC9DUyAvRGV2aWNl     UkdCCiAgID4+CiAgIC9SZXNvdXJjZXMgMiAwIFIKPj4KZW5kb2JqCjggMCBvYmoKPDwgL0xlbmd0     aCA5IDAgUgogICAvRmlsdGVyIC9GbGF0ZURlY29kZQogICAvTGVuZ3RoMSAyNTQ0Cj4+CnN0cmVh     bQp4nM1UbXBU5RU+9z7v2U022c1u9gYSgWTjZkliPogb5Bu8hKQQsBgIbUMlksCSxN1EwjeIqytI     +YgBgrgg2DYqM7UBbegHjYRBsFDtOJlxhjKKzhRsh9FO/9COOhLgpmcXnOl0pv3b3jPvPec57znP     Oee97y5pROSgGIF8KzuaO2nUje1E2kHxVq/cuN63r/L4l4I/TvhaOls7Po/9/QIR2mW/q7V9S8sn     K9+sFfuErC/aVjWHvr7UMyj73wie1CYO55f2vxCpCsEFbR3rN7uP0luClwhOb1+9sll4Y4KbBLs7     mjd3qmb9c8Gdgn2da1d1bthi+1rwfiJ+nHRqseKqhY9Jt3YiryffE8j35Lcour0OY25ft+J21zf/     WGsrlmyN2ohsm/gyuQR4Nf/kfLtf8ye19udP9fgbWdqprJ7bfzph3XopS/dlcfjWj9RTkchwnMOR     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     42vLCKrq9ohkk8MlG4tk4oSia7g0dJ5LC4zuX18d1Ojt1VB1t+xumscnXZU6lKrszbVP2b98j2hX     Ik5X91Jj7YFCxPvqcso7Vc8vx/VzEgplbmRzdHJlYW0KZW5kb2JqCjExIDAgb2JqCiAgIDIzMQpl     bmRvYmoKMTIgMCBvYmoKPDwgL1R5cGUgL0ZvbnREZXNjcmlwdG9yCiAgIC9Gb250TmFtZSAvRFRJ     WURMK0RlamFWdVNlcmlmLUl0YWxpYwogICAvRm9udEZhbWlseSAoRGVqYVZ1IFNlcmlmIEl0YWxp     YykKICAgL0ZsYWdzIDQKICAgL0ZvbnRCQm94IFsgLTgzOSAtMzQ2IDE2NDQgMTEwOSBdCiAgIC9J     dGFsaWNBbmdsZSAwCiAgIC9Bc2NlbnQgOTI4CiAgIC9EZXNjZW50IC0yMzUKICAgL0NhcEhlaWdo     dCAxMTA5CiAgIC9TdGVtViA4MAogICAvU3RlbUggODAKICAgL0ZvbnRGaWxlMiA4IDAgUgo+Pgpl     bmRvYmoKMTMgMCBvYmoKPDwgL1R5cGUgL0ZvbnQKICAgL1N1YnR5cGUgL0NJREZvbnRUeXBlMgog     ICAvQmFzZUZvbnQgL0RUSVlETCtEZWphVnVTZXJpZi1JdGFsaWMKICAgL0NJRFN5c3RlbUluZm8K     ICAgPDwgL1JlZ2lzdHJ5IChBZG9iZSkKICAgICAgL09yZGVyaW5nIChJZGVudGl0eSkKICAgICAg     L1N1cHBsZW1lbnQgMAogICA+PgogICAvRm9udERlc2NyaXB0b3IgMTIgMCBSCiAgIC9XIFswIFsg     NjAwIDcyMiA3NTIgXV0KPj4KZW5kb2JqCjUgMCBvYmoKPDwgL1R5cGUgL0ZvbnQKICAgL1N1YnR5     cGUgL1R5cGUwCiAgIC9CYXNlRm9udCAvRFRJWURMK0RlamFWdVNlcmlmLUl0YWxpYwogICAvRW5j     b2RpbmcgL0lkZW50aXR5LUgKICAgL0Rlc2NlbmRhbnRGb250cyBbIDEzIDAgUl0KICAgL1RvVW5p     Y29kZSAxMCAwIFIKPj4KZW5kb2JqCjE0IDAgb2JqCjw8IC9MZW5ndGggMTUgMCBSCiAgIC9GaWx0     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     rApBQ9bDIlv3sNz/2wf+1wD+60O/6v8Er0tHagplbmRzdHJlYW0KZW5kb2JqCjE1IDAgb2JqCiAg     IDI1NTAKZW5kb2JqCjE2IDAgb2JqCjw8IC9MZW5ndGggMTcgMCBSCiAgIC9GaWx0ZXIgL0ZsYXRl     RGVjb2RlCj4+CnN0cmVhbQp4nF2Qz27DIAzG7zyFj92hIknb7BIhTd0lh/3Rsj0AAZMhLYAIOeTt     R0zVSbME0g/7s/nMr/1z72wC/h69GjCBsU5HXPwaFcKIk3WsbkBblW5Et5plYDyLh21JOPfOeNZ1     wD9ycklxg8OT9iM+MADgb1FjtG6Cw9d1KE/DGsIPzugSVEwI0GhyuxcZXuWMwEl87HXO27Qds+yv     4nMLCA1xXb6kvMYlSIVRuglZV+UQ0JkcgqHT//JtUY1GfctI1XWurqpTLYgaohYLnQqZQmeix0uh     S6FzobZUtjTz1n2fvq/qbk2tMWZXtE+ysxuxDu8rDz7sKjq/t9p+LAplbmRzdHJlYW0KZW5kb2Jq     CjE3IDAgb2JqCiAgIDI1MQplbmRvYmoKMTggMCBvYmoKPDwgL1R5cGUgL0ZvbnREZXNjcmlwdG9y     CiAgIC9Gb250TmFtZSAvWEdGWVVZK0RlamFWdVNlcmlmCiAgIC9Gb250RmFtaWx5IChEZWphVnUg     U2VyaWYpCiAgIC9GbGFncyA0CiAgIC9Gb250QkJveCBbIC03NjkgLTM0NiAxNjc5IDExMDkgXQog     ICAvSXRhbGljQW5nbGUgMAogICAvQXNjZW50IDkyOAogICAvRGVzY2VudCAtMjM1CiAgIC9DYXBI     ZWlnaHQgMTEwOQogICAvU3RlbVYgODAKICAgL1N0ZW1IIDgwCiAgIC9Gb250RmlsZTIgMTQgMCBS     Cj4+CmVuZG9iagoxOSAwIG9iago8PCAvVHlwZSAvRm9udAogICAvU3VidHlwZSAvQ0lERm9udFR5     cGUyCiAgIC9CYXNlRm9udCAvWEdGWVVZK0RlamFWdVNlcmlmCiAgIC9DSURTeXN0ZW1JbmZvCiAg     IDw8IC9SZWdpc3RyeSAoQWRvYmUpCiAgICAgIC9PcmRlcmluZyAoSWRlbnRpdHkpCiAgICAgIC9T     dXBwbGVtZW50IDAKICAgPj4KICAgL0ZvbnREZXNjcmlwdG9yIDE4IDAgUgogICAvVyBbMCBbIDYw     MCA2MzYgNjQ0IDYwMiA2NDQgNDAxIDM3MCBdXQo+PgplbmRvYmoKNiAwIG9iago8PCAvVHlwZSAv     Rm9udAogICAvU3VidHlwZSAvVHlwZTAKICAgL0Jhc2VGb250IC9YR0ZZVVkrRGVqYVZ1U2VyaWYK     ICAgL0VuY29kaW5nIC9JZGVudGl0eS1ICiAgIC9EZXNjZW5kYW50Rm9udHMgWyAxOSAwIFJdCiAg     IC9Ub1VuaWNvZGUgMTYgMCBSCj4+CmVuZG9iagoxIDAgb2JqCjw8IC9UeXBlIC9QYWdlcwogICAv     S2lkcyBbIDcgMCBSIF0KICAgL0NvdW50IDEKPj4KZW5kb2JqCjIwIDAgb2JqCjw8IC9DcmVhdG9y     IChjYWlybyAxLjEwLjIgKGh0dHA6Ly9jYWlyb2dyYXBoaWNzLm9yZykpCiAgIC9Qcm9kdWNlciAo     Y2Fpcm8gMS4xMC4yIChodHRwOi8vY2Fpcm9ncmFwaGljcy5vcmcpKQo+PgplbmRvYmoKMjEgMCBv     YmoKPDwgL1R5cGUgL0NhdGFsb2cKICAgL1BhZ2VzIDEgMCBSCj4+CmVuZG9iagp4cmVmCjAgMjIK     MDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDA4ODA3IDAwMDAwIG4gCjAwMDAwMDE3NzIgMDAwMDAg     biAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAxNzQ5IDAwMDAwIG4gCjAwMDAwMDQ5MjcgMDAw     MDAgbiAKMDAwMDAwODY0NiAwMDAwMCBuIAowMDAwMDAxOTQyIDAwMDAwIG4gCjAwMDAwMDIxNDkg     MDAwMDAgbiAKMDAwMDAwNDAzOSAwMDAwMCBuIAowMDAwMDA0MDYyIDAwMDAwIG4gCjAwMDAwMDQz     NzIgMDAwMDAgbiAKMDAwMDAwNDM5NSAwMDAwMCBuIAowMDAwMDA0NjgwIDAwMDAwIG4gCjAwMDAw     MDUwOTUgMDAwMDAgbiAKMDAwMDAwNzc0MSAwMDAwMCBuIAowMDAwMDA3NzY1IDAwMDAwIG4gCjAw     MDAwMDgwOTUgMDAwMDAgbiAKMDAwMDAwODExOCAwMDAwMCBuIAowMDAwMDA4MzkwIDAwMDAwIG4g     CjAwMDAwMDg4NzIgMDAwMDAgbiAKMDAwMDAwOTAwMCAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXpl     IDIyCiAgIC9Sb290IDIxIDAgUgogICAvSW5mbyAyMCAwIFIKPj4Kc3RhcnR4cmVmCjkwNTMKJSVF     T0YK


title: How can I allow gather to break between pages?

text: > **Possible Duplicate:**   >  Custom alignment of columns in align environment MWE:               \documentclass{article}     \usepackage{lipsum}     \usepackage{amsmath}     \begin{document}      \lipsum[1-4]          \lipsum[4]     \begin{gather}     \dfrac{1}{a} = a ^ {-1} \\     \dfrac{1}{b} = b ^ {-1} \\     \dfrac{1}{c} = c ^ {-1} \\     \dfrac{1}{d} = d ^ {-1} \\     \dfrac{1}{e} = e ^ {-1}     \end{gather}     \end{document}      Some of the equations could fit on the first page. How can I accomplish that?


title: Which programming language is used by TikZ/PGF?

text: I've been playing with TikZ for while, and now I want to dig a bit deeper and produce some reusable components for future references. There are certain syntax that are used in many examples on TikZ site. For example I saw a `\foreach` loop, couple variables here and there. So I wonder which programming language is used to write `Tikz` document?


title: Trouble with nested tables

text: I am using nested table environments in the following snippet:               \begin{document}     \noindent     \begin{tabularx}{\textwidth}{rX lX}            COURSEWORK & Machine Learning, Probabilitistic Learning, Probabilistic Graphical Models, Intermediate Statistics A \& B, Statistical Methodology I \& II, Statistical Computing, Information Retreival, Principles of Data Management, Data Structures, Computer Architecture\\      \\*       COURSEWORK & \begin{tabular}{ l l l }        Machine Learning & Probabilistic Learning & Probabilistic Graphical Models \\        Intermediate Statistics & Statistical Computing & Statistical Methods \\        Principles of Data  & Data Structures & Computer Architecture \\       \end{tabular}\\          \end{tabularx}      which produces following document: ![enter image description here](http://i.stack.imgur.com/NOGCt.jpg) Now, there are three issues with this rendering:   1. The tabular listing of courses seems to have extra indentation (note the entries are already left justified) &   2. The section title 'COURSEWORK' for the tabular listing appears in front of middle row, I would like it to start from the top of the tabular listing. I tried using `\multirow` but it does not take the section title above the middle row. Please suggest how these can be achieved.


title: Change Colour on Chapter/Section headings {Lyx}

text: I am using Lyx and Layout report for my thesis. I would like to change the colour of chapters sections and subsections (only the headings) from black to blue. I attach a screenshot in order to understand what colours i am trying to achieve only on headings (Chapter /section and subsection ) ![](http://i.stack.imgur.com/jSWDX.png) Also is it possible to change the colour of table of contents to blue ? (again only the heading)


title: Formating verbatim (not using listing package)

text: Considering the following verbatim:               \begin{verbatim}     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa     \end{verbatim}      How to make sure that the verbatim text is not going out of the page, but going on the following line as soon as the width of the page has been passed? Please note that I am looking for a solution without the `listing` package. * * * **EDIT** (to describe my problem a bit more) I am having a long report in which I use a lot verbatim. From time to time, the text of the verbatim is going out of the page. Furthermore, I do use the `listing` package with box for some special programming code. I would like to keep the same verbatim format, but with auto "end of line" for the verbatim code. Is there a simple way for doing it? * * * **EDIT 2** if you take the following verbatim with a very long string :               \begin{verbatim}     $ mylinuxcommand      !+.++++.....+++-+++-!^!^+............................................;+++-^^!--.........+++--!^!^+.++++.....+++-+++-^!^+............................................;+++-^^!--.........+++--!^!^+.++++.....+++-+++-!^!^+............................................;+++-^^!--.........+++--!^!^     $ myotherlinuxcommand     true     $ mylastcommand     "Thank you for your help"     \end{verbatim}      On your pdf, only a part of this string is displayed (It stays on the same line, it's "continuing" out of the page). As on below (pdf dislay) : > $ mylinuxcommand > > > !+.++++.....+++-+++-!^!^+............................................;+++-^^!- > > $ myotherlinuxcommand > > true > > $ mylastcommand > > "Thank you for your help" I wish it could go on the next line automatically, so that all the content of this long string is displayed. The displayed result would give, on the pdf (pdf display): > $ mylinuxcommand > > !+.++++.....+++-+++-!^!^+........................................ > > ....;+++-^^!--.........+++--!^!^+.++++.....+++-+++-^!^+...... > > .....................................;+++-^^!--.........+++-- > > !^!^+.++++.....+++-+++-!^!^+................................. > > ...........;+++-^^!--.........+++--!^!^ > > $ myotherlinuxcommand > > true > > $ mylastcommand > > "Thank you for your help" So that the **entire long string** from the verbatim is displayed on the pdf. A long string should be automatically cut when it reaches the width of the page, and the rest recursivally displayed on the other line. Please note that this long string can change, but globally the structure and chars used remain the same.