title: How to use system font for equation in XeLaTeX?

text: I am trying to use system font for LaTeX. I am able to do it for text but not for the math part. Here is an example (compiled using XeLaTeX), where I use the font "Broadway", but it doesn't work for the math part. Any suggestion for how to define the font for the math part?               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \usepackage[xetex]{graphicx}     \usepackage{fontspec,xunicode}     \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}     \setmainfont[Scale=.95]{Broadway}     \setmonofont{Broadway}          \begin{document}     This is the formula for $(a+b)^2$     \begin{equation}     (a+b)^2=a^2+2ab+b^2     \end{equation}          \end{document}       I found alternate ways from The LaTex Font Catalogue.               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \usepackage{concmath}     \usepackage[T1]{fontenc}          \begin{document}     This is the formula for $(a+b)^2$     \begin{equation}     (a+b)^2=a^2+2ab+b^2     \end{equation}          \end{document}      I was looking for typewritter font and "concmath" is a good one and also provides math support. But I am more interested in courier font which is also available in catalogue               \usepackage{courier}     \renewcommand*\ttdefault{lcmtt}     \renewcommand*\familydefault{\ttdefault}     \usepackage[T1]{fontenc}      But now the maths appears in Roman. Is there any possible way to make the math part use the courier font. I am not sure if it can be done by modifying the corresponding .sty file somehow or if there is any other better way. All I am trying to do is to make the math part use the same font (for the text part only, not for the symbol) as text without any italic or bold.


title: How to make nodes on branchy TikZ chain lay on regular grid (trangular or square) automatically?

text: How to ensure that nodes on chain with branches (generated using `chains` library) are laid out on regular grid, regardless of node shape? I am interested in automatic placement on triangular or rectangular grid, if possible without use of matrices. Example: in the following diagram nodes are laid out on rectangular grid:               \usepackage{tikz}     \usetikzlibrary{chains}     \usetikzlibrary{scopes}          \begin{tikzpicture}[start chain,         every node/.style={on chain, join, draw},         every join/.style=<-]       \node {A};       \node {B};       \begin{scope}[start branch=foo]         \node [on chain=going below right] {E};         \node (F) {F};       \end{scope}       \node {C};       \node {D};       \node [join=with F] {G};     \end{tikzpicture}      But if I change node style to circle or rounded rectangle with a minimum size of 6mm the layout changes to _almost_ on triangular grid.


title: Can I temporarily supress xparse's log messages?

text: I know that I can suppress all those annoying `xparse` logging messages about redefining commands using the `log-declarations=false` package option. I find that I can do this after `xparse` has been loaded by issuing the relevant commands:               \msg_redirect_module:nnn { LaTeX / xparse } { info }    { none }     \msg_redirect_module:nnn { LaTeX / xparse } { warning } { none }      at an appropriate juncture. Then I can restore them with:               \msg_redirect_module:nnn { LaTeX / xparse } { info }    { info }     \msg_redirect_module:nnn { LaTeX / xparse } { warning } { warning }      My question is this: can I find out what the previous redirections were so that in the restoration code I can restore them to their previous value, not to some fixed choice?


title: Changing font size of chapter title without changing table of content font size

text: I am using document class report and I want to change the font size of chapter titles. I defined the following command to change title font size               \newcommand{\chaptersize}{\fontsize{25}{12}\selectfont}      It does change the font size of the title but it also change the font size of chapter title in the table of contents. Please suggest how to avoid change in the TOC.


title: Combining sffamily and scshape

text: According to a relevant comment, one should be able to specify both weights and shapes for each family. Why can I (seemingly) not have small caps with `\sffamily`? Minimal example:               \documentclass{article}          \begin{document}     \sffamily\scshape Test     \end{document}      produces the following output: ![enter image description here](http://i.stack.imgur.com/K2aSI.png)


title: Clear Option Clash error

text: I'm working with a template to create a course syllabus. The package requires an .sty file, which I have in the same folder. No matter what I try, I can't clear an error: "Option clash for package color" on line 53. I've read that this has something to do with a repeated package, but I can't figure out where that is. Any help appreciated. [The .sty file is below as well]               %     %      %     \documentclass[11pt,article,oneside]{memoir}          %% Script-based version control (requires vc package)     % \input{vc}          \usepackage{graphicx,url}     \usepackage{rotating}     \usepackage{memoir-article-styles} % in latex-custom-kjh/needs-memoir          %% Choose font system. Comment out these lines if you are not using xelatex     \usepackage{fontspec}     \usepackage{xunicode}          % Biblatex     \usepackage[american]{babel}     \usepackage[babel]{csquotes}     \usepackage[style=authoryear,                 bibstyle=authoryear,                 citestyle=authoryear-comp,                 uniquename=false,                 hyperref=true,                 backend=biber, babel=hyphen, bibencoding=inputenc]{biblatex}          %% Fix biblatex's odd preference for using In: by default.     \renewbibmacro{in:}{%       \ifentrytype{article}{}{%       \printtext{\bibstring{}\intitlepunct}}}          %% Bibliography from http://kjhealy.github.com/socbibs/     \addbibresource{/Users/kjhealy/Documents/bibs/socbib.bib}          % Definitions     \def\myauthor{Kieran Healy}     \def\mytitle{Sociology 155: Organizations and Management}     \def\mysubtitle{Syllabus}     \def\mycopyright{\myauthor}     \def\mykeywords{}     \def\mybibliostyle{plain}     \def\mybibliocommand{}     \def\mysubtitle{}     \def\myaddress{276 Soc/Psych}     \def\myemail{kjhealy@soc.duke.edu}     \def\myweb{http://www.kieranhealy.org}     \def\myphone{660-5737}     \def\myaffiliation{\ \\Duke University}     \def\mykeywords{Sociology, Syllabus, Undergraduate, Organizations, Management}          %% Links     \usepackage[usenames,dvipsnames]{color}     \usepackage[xetex,     colorlinks=true,     urlcolor=BrickRed,     plainpages=false,        pdfpagelabels,        bookmarksnumbered,        pdftitle={\mytitle},        pdfauthor={\myauthor},        pdfkeywords={\mykeywords}        ]{hyperref}          %% Uncomment to make a "DRAFT" watermark     % Page watermark     % \usepackage{type1cm,eso-pic}     % \makeatletter     % \AddToShipoutPicture{%     % \setlength{\@tempdimb}{.5\paperwidth}%     % \setlength{\@tempdimc}{.5\paperheight}%     % \setlength{\unitlength}{1pt}%     % \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%     % \makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.9}%     % {\fontsize{3cm}{3cm}\selectfont{Draft Only}}}}%     % Marginal Watermark     % \makebox(-100,-300){\rotatebox{45}{\textcolor[gray]{0.95}%     % {\fontsize{2cm}{2cm}\selectfont{}}}}     % \makebox(-500,-0){\rotatebox{90}{\textcolor[gray]{0.95}%     % {\fontsize{0.7cm}{0.7cm}\selectfont{}}}}     % }%     % }     % \makeatother          \begin{document}          %%% xelatex font choices     %\defaultfontfeatures{}     %\defaultfontfeatures{Scale=MatchLowercase}     % You will need to buy these fonts, change the names to fonts you own, or comment out if not using xelatex.     \setromanfont[Mapping=tex-text]{Minion Pro}     \setsansfont[Mapping=tex-text]{Myriad Pro}     \setmonofont[Mapping=tex-text,Scale=0.8]{Pragmata}          %% blank label items; hanging bibs for text     %% Custom hanging indent for vita items     \def\ind{\hangindent=1 true cm\hangafter=1 \noindent}     \def\labelitemi{$\cdot$}     %\renewcommand{\labelitemii}{~}          % Make figures as wide as the margins     \setkeys{Gin}{width=1\textwidth}          \chapterstyle{article-2} % alternative styles are defined in latex-custom-kjh/needs-memoir/. Consider e.g.\chapterstyle{article-4}     \pagestyle{kjh}          \title{\mytitle}     \author{\myauthor\smallskip\footnotesize\newline Office: 276 Sociology/Psychology \newline\texttt{\myemail} \newline \url{http://www.kieranhealy.org}}     \date{}          \published{\sffamily Spring 2010 / Tu\&Th 1:15--2:30pm / Gray 228}          \maketitle          % Include version information in footer if using vc package (see above).     % \thispagestyle{kjhgit}               % Copyright Page     % \textcopyright{} \mycopyright          %     % Main Content     %          \section{Course Description and Objectives}          %\newpage     %% Uncomment if you want a printed bibliography.     %\printbibliography          \end{document}      %%%%%%%%%%%%%%%%%%%%% Style file:               %%% Some article styles and page layout tweaks for the memoir class     %%% Choose these as article or pagestyles for your memoir document.      %%% Kieran Healy               %%% --------------------------------------------------     %%% Some useful bits and pieces     %%% --------------------------------------------------     %% Blank footnote command.     % Use \symbolfootnote[0]{Footnote text} for a blank footnote.      % Useful for an initial acknowledgment note.     \long\def\symbolfootnote[#1]#2{\begingroup%     \def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}          %% Redefine \and and \andnext to remove tabular environment.     %% Needed below for custom article-styles when multiple authors are present.      \renewcommand{\and}{\, }     \renewcommand*{\andnext}{%       \\\medskip }          %%% --------------------------------------------------     %%% Style: memo-comments     %%% For short notes.     %%% --------------------------------------------------          % Make the style for Chapters and sections        \makechapterstyle{memo-comments}{          \renewcommand\thesection{\arabic{section}}           \setsecheadstyle{\Large\sffamily}           \setsubsecheadstyle{\large\sffamily}           \setsubsubsecheadstyle{\normalsize\sffamily\itshape}          \renewcommand{\printchaptername}{}          \renewcommand{\chapternamenum}{}          \renewcommand{\chapnumfont}{\chaptitlefont}          \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}          \renewcommand{\afterchapternum}{}          \renewcommand{\printchaptername}{\secheadstyle}         \renewcommand{\cftchapterfont}{\normalfont}          \renewcommand{\cftchapterpagefont}{\normalfont\sffamily}          \renewcommand{\cftchapterpresnum}{\sffamily}          %\renewcommand{\cftchapterleader}{}          %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}         \captiontitlefont{\small}         \settocdepth{chapter}         \maxsecnumdepth{chapter}          \setsecnumdepth{chapter}              % reduce skip after section heading         \setaftersecskip{1.7ex}              % Title          \pretitle{\begin{flushleft}\LARGE\sffamily\bfseries}         \posttitle{\end{flushleft}\par\vskip 0.5em}         \preauthor{\begin{flushleft}\Large\sffamily}         \postauthor{\end{flushleft}}         \predate{\begin{flushleft}\sffamily\footnotesize\vspace{0.9em}}         \postdate{\end{flushleft}\par\vskip 2em}        }          %%% --------------------------------------------------     %%% Style: article-1      %%% --------------------------------------------------        \makechapterstyle{article-1}{          \setsecheadstyle{\Large\scshape}           \setsubsecheadstyle{\normalsize\itshape}          \renewcommand{\printchaptername}{}          \renewcommand{\chapternamenum}{}          \renewcommand{\chapnumfont}{\chaptitlefont}          \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}          \renewcommand{\afterchapternum}{}          \renewcommand{\printchaptername}{\secheadstyle}         \renewcommand{\cftchapterfont}{\normalfont}          \renewcommand{\cftchapterpagefont}{\normalfont\scshape}          \renewcommand{\cftchapterpresnum}{\scshape}          %\renewcommand{\cftchapterleader}{}          %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}         \captiontitlefont{\small}         %\settocdepth{chapter}     %     \maxsecnumdepth{section}      %     \setsecnumdepth{section}              % reduce skip after section heading         \setaftersecskip{1.7ex}              % set name of bibliography to 'references'         % \renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}              \pretitle{\newline\centering \LARGE\scshape \MakeLowercase }         \posttitle{\par\vskip 1em}         \predate{\footnotesize \centering}         \postdate{\par\vskip 1em}              % 'abstract' title, bigger skip from title         \addto\captionsamerican{\renewcommand{\abstractname}{}}         \abstractrunin        }          %%% --------------------------------------------------     %%% Style: article-2      %%% --------------------------------------------------          % Make the style for Chapters and sections        \makechapterstyle{article-2}{         \setsecheadstyle{\Large\sffamily}          \setsubsecheadstyle{\normalsize\sffamily\itshape}          \setaftersubsubsecskip{-1em}         \setsubsubsecheadstyle{\small\bfseries}         \renewcommand{\printchaptername}{}          \renewcommand{\chapternamenum}{}          \renewcommand{\chapnumfont}{\chaptitlefont}          \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}          \renewcommand{\afterchapternum}{}          \renewcommand{\printchaptername}{\secheadstyle}         \renewcommand{\cftchapterfont}{\normalfont}          \renewcommand{\cftchapterpagefont}{\normalfont\scshape}          \renewcommand{\cftchapterpresnum}{\scshape}          %\renewcommand{\cftchapterleader}{}          %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}         \captiontitlefont{\small}         %\settocdepth{chapter}         \maxsecnumdepth{chapter}          \setsecnumdepth{chapter}              % reduce skip after section heading         \setaftersecskip{1.7ex}              % set name of bibliography to 'references'         % \renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}              % Title flush left         \pretitle{\begin{flushleft}\LARGE\sffamily}         \posttitle{\end{flushleft}\par\vskip 0.5em}         \preauthor{\begin{flushleft}\sffamily\itshape  \Large \vspace{0.5em}}         \postauthor{\end{flushleft}}         \predate{\begin{flushleft}\sffamily\footnotesize\vspace{0.9em}}         \postdate{\end{flushleft}\par\vskip 2em}              % 'abstract' title, bigger skip from title         \addto\captionsamerican{\renewcommand{\abstractname}{Abstract:}}         \renewcommand{\abstractnamefont}{\normalfont\scriptsize\itshape}         \renewcommand{\abstracttextfont}{\normalfont\scriptsize}         \abstractrunin             }          %%% --------------------------------------------------     %%% Style: article-3      %%% --------------------------------------------------          % Make the style for Chapters and sections        \makechapterstyle{article-3}{          \renewcommand\thesection{\arabic{section}}           \setsecheadstyle{\Large\sffamily}           \setsubsecheadstyle{\large\sffamily}           \setsubsubsecheadstyle{\normalsize\sffamily\itshape}          \renewcommand{\printchaptername}{}          \renewcommand{\chapternamenum}{}          \renewcommand{\chapnumfont}{\chaptitlefont}          \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}          \renewcommand{\afterchapternum}{}          \renewcommand{\printchaptername}{\secheadstyle}         \renewcommand{\cftchapterfont}{\normalfont}          \renewcommand{\cftchapterpagefont}{\normalfont\sffamily}          \renewcommand{\cftchapterpresnum}{\sffamily}          %\renewcommand{\cftchapterleader}{}          %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}         \captiontitlefont{\small}         \settocdepth{chapter}         \maxsecnumdepth{chapter}          \setsecnumdepth{chapter}              % reduce skip after section heading         \setaftersecskip{1.7ex}              % set name of bibliography to 'references'         % \renewcommand{\bibname}{\mdseries\Large\sffamily\MakeLowercase References}              % Title          \pretitle{\par\vskip 3em              \begin{flushleft}\Huge\bfseries\sffamily}         \posttitle{\end{flushleft}\par\vskip 0.5em}         \preauthor{\begin{flushleft}\Large\bigskip}         \postauthor{\end{flushleft}}         \predate{\begin{flushleft}\normalsize}         \postdate{\end{flushleft}}              % \pretitle{\LARGE \sffamily}         % \posttitle{\par\vskip 0.5em}         % \preauthor{\large \sffamily \lineskip 1em}         % \postauthor{\par\lineskip 1em}         % \predate{\sffamily\footnotesize\vspace{0.65em}}         % \postdate{\par\vskip 2em}              % 'abstract' title, bigger skip from title         \addto\captionsamerican{\renewcommand{\abstractname}{Abstract:}}         \renewcommand{\abstractnamefont}{\normalfont\scriptsize\itshape}         \renewcommand{\abstracttextfont}{\normalfont\scriptsize}         \abstractrunin             }               %%% --------------------------------------------------     %%% Style: article-4 (AJS)      %%% --------------------------------------------------          %% Make the style for Chapters and sections        \makechapterstyle{article-4}{         \setsecheadstyle{\Large\scshape\MakeLowercase}          \setsubsecheadstyle{\normalsize\itshape}          \setaftersubsubsecskip{-1em}         \setsubsubsecheadstyle{\small\bfseries}         \renewcommand{\printchaptername}{}          \renewcommand{\chapternamenum}{}          \renewcommand{\chapnumfont}{\chaptitlefont}          \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}          \renewcommand{\afterchapternum}{}          \renewcommand{\printchaptername}{\secheadstyle}         \renewcommand{\cftchapterfont}{\normalfont}          \renewcommand{\cftchapterpagefont}{\normalfont\scshape}          \renewcommand{\cftchapterpresnum}{\scshape}          %\renewcommand{\cftchapterleader}{}          %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}         \captiontitlefont{\small}         %\settocdepth{chapter}         \maxsecnumdepth{chapter}          \setsecnumdepth{chapter}              % reduce skip after section heading         \setaftersecskip{1.7ex}              % set name of bibliography to 'references'         %\renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}              % % Title flush left         \pretitle{\par\vskip 3em              \begin{flushleft}\LARGE\bfseries}         \posttitle{\end{flushleft}\par\vskip 0.5em}         \preauthor{\begin{flushleft}\normalsize\bigskip}         \postauthor{\end{flushleft}}         \predate{\begin{flushleft}\normalsize}         \postdate{\end{flushleft}}              % 'abstract' bigger skip from title         \addto\captionsamerican{\renewcommand{\abstractname}{}}         \renewcommand{\abstractname}{}         \renewcommand{\abstracttextfont}{\normalfont\scriptsize}         \abstractrunin        }               %%% --------------------------------------------------     %%% article-4-sans (AJS, but sans-serif headings)      %%% --------------------------------------------------          %% Make the style for Chapters and sections        \makechapterstyle{article-4-sans}{         \setsecheadstyle{\sffamily\bfseries}          \setsubsecheadstyle{\normalsize\sffamily\itshape}          \setaftersubsubsecskip{-1em}         \setsubsubsecheadstyle{\small}         \renewcommand{\printchaptername}{}          \renewcommand{\chapternamenum}{}          \renewcommand{\chapnumfont}{\chaptitlefont}          \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}          \renewcommand{\afterchapternum}{}          \renewcommand{\printchaptername}{\secheadstyle}         \renewcommand{\cftchapterfont}{\normalfont}          \renewcommand{\cftchapterpagefont}{\normalfont\sffamily}          \renewcommand{\cftchapterpresnum}{\sffamily}          %\renewcommand{\cftchapterleader}{}          %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}         \captiontitlefont{\small}         %\settocdepth{chapter}         \maxsecnumdepth{chapter}          \setsecnumdepth{chapter}              %% reduce skip after section heading         \setaftersecskip{1.7ex}              %% set name of bibliography to 'references'         %%\renewcommand{\bibname}{\mdseries\Large\sffamily References}              % % Title flush left         \pretitle{\par\vskip 3em              \begin{flushleft}\LARGE\sffamily\bfseries}         \posttitle{\end{flushleft}\par\vskip 0.5em}         \preauthor{\begin{flushleft}\Large}         \postauthor{\end{flushleft}}         \predate{\begin{flushleft}\normalsize}         \postdate{\end{flushleft}}              %% 'abstract' bigger skip from title         \addto\captionsamerican{\renewcommand*{\abstractname}{}}         \renewcommand{\abstractnamefont}{\normalfont\scriptsize}         \renewcommand{\abstracttextfont}{\normalfont\scriptsize}         \abstractrunin                  }          %%% --------------------------------------------------     %%% Style: membook     %%% A book style     %%% --------------------------------------------------          %% Make the style for Chapters and sections        % \makechapterstyle{membook}{        %  \setsecheadstyle{\Large\sffamily\bfseries}         %  \setsubsecheadstyle{\normalsize\sffamily\itshape}         %      \setaftersubsubsecskip{-1em}        %  \setsubsubsecheadstyle{\small\sffamily\bfseries}        %  \renewcommand{\printchaptername}{\sffamily}         %  \renewcommand{\chapternamenum}{\sffamily}         %  \renewcommand{\chapnumfont}{\chaptitlefont\sffamily}         %  \renewcommand{\printchapternum}{\chapnumfont \thechapter\space}         %  \renewcommand{\afterchapternum}{}         %  \renewcommand{\printchaptername}{\secheadstyle}        %  \renewcommand{\cftchapterfont}{\normalfont}         %  \renewcommand{\cftchapterpagefont}{\normalfont\sffamily}         %  \renewcommand{\cftchapterpresnum}{\sffamily}         %  \renewcommand{\cftchapterleader}{\sffamily}         %  \renewcommand{\cftchapterafterpnum}{\cftparfillskip}        %  \captiontitlefont{\small}        %  %\settocdepth{chapter}        %  \maxsecnumdepth{chapter}         %  \setsecnumdepth{chapter}             %  % reduce skip after section heading        %  \setaftersecskip{1.7ex}             %  % set name of bibliography to 'references'        %  %\renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}             %  % % Title flush left        %  \pretitle{\par\vskip 3em         %      \begin{flushleft}\LARGE\sffamily\bfseries}        %  \posttitle{\end{flushleft}\par\vskip 0.5em}        %  \preauthor{\begin{flushleft}\normalsize\sffamily\bigskip}        %  \postauthor{\end{flushleft}}        %  \predate{\begin{flushleft}\normalsize\sffamily}        %  \postdate{\end{flushleft}}             %  % 'abstract' bigger skip from title        %  \addto\captionsamerican{\renewcommand{\abstractname}{}}        %  \renewcommand{\abstractname}{}        %  \renewcommand{\abstracttextfont}{\normalfont\scriptsize}        %  \abstractrunin        % }               %\RequirePackage[usenames,dvipsnames]{color}     %\RequirePackage{calc}     %\RequirePackage{color,calc}     %\newsavebox{\ChpNumBox}     %\definecolor{ChapBlue}{rgb}{0.00,0.65,0.65}     %\makeatletter     % \newcommand*{\thickhrulefill}{%     %   \leavevmode\leaders\hrule height 1\p@ \hfill \kern \z@}     % \newcommand*\BuildChpNum[2]{%     %   \begin{tabular}[t]{@{}c@{}}     %     \makebox[0pt][c]{#1\strut}  \\[.5ex]     %     \colorbox{BrickRed}{%     %       \rule[-10em]{0pt}{0pt}%     %       \rule{1ex}{0pt}\color{black}#2\strut     %       \rule{1ex}{0pt}}%     %   \end{tabular}}     % \makechapterstyle{BlueBox}{%     %   \renewcommand{\chapnamefont}{\large\sffamily}     %   \renewcommand{\chapnumfont}{\Huge\sffamily}     %   \renewcommand{\chaptitlefont}{\raggedright\Huge\sffamily}     %   \setlength{\beforechapskip}{20pt}     %   \setlength{\midchapskip}{26pt}     %   \setlength{\afterchapskip}{40pt}     %   \renewcommand{\printchaptername}{\sffamily}     %   \renewcommand{\chapternamenum}{\sffamily}     %   \renewcommand{\printchapternum}{%     %     \sbox{\ChpNumBox}{%     %       \BuildChpNum{\chapnamefont\@chapapp}%     %       {\chapnumfont\thechapter}}}     %   \renewcommand{\printchapternonum}{%     %     \sbox{\ChpNumBox}{%     %       \BuildChpNum{\chapnamefont\vphantom{\@chapapp}}%     %       {\chapnumfont\hphantom{\thechapter}}}}     % \renewcommand{\afterchapternum}{}     % \renewcommand{\printchaptertitle}[1]{%     %   \usebox{\ChpNumBox}\hfill     %   \parbox[t]{\hsize-\wd\ChpNumBox-1em}{%     %     \vspace{\midchapskip}%     %     \thickhrulefill\par     %     \chaptitlefont ##1\par}}%     %     \pretitle{\par\vskip 3em      %         \begin{flushleft}\LARGE\sffamily\bfseries}     %     \posttitle{\end{flushleft}\par\vskip 0.5em}     %     \preauthor{\begin{flushleft}\normalsize\sffamily\bigskip}     %     \postauthor{\end{flushleft}}     %     \predate{\begin{flushleft}\normalsize}     %     \postdate{\end{flushleft}}          % }               %%% --------------------------------------------------      %%% Custom styles for headers and footers The chapterstyles above     %%% style sections/subsections and titles, etc. These pagestyles     %%% control the running headers and footers. So far there's just one.     %%% --------------------------------------------------          %%%     %%% Basic      %%%     \makepagestyle{kjh}     %\makeevenfoot{kjh}{\thepage}{}{}     %\makeoddfoot{kjh}{}{}{\thepage}     %\makeheadrule{kjh}{\textwidth}{\normalrulethickness}     \newcommand{\@kjhmarks}{%       \let\@mkboth\markboth       \def\chaptermark##1{%         \markboth{%           \ifnum \c@secnumdepth >\m@ne             \if@mainmatter               \thechapter. \ %             \fi           \fi           ##1}{}}       \def\sectionmark##1{%         \markright{##1}}     }     \makepsmarks{kjh}{\@kjhmarks}     \makepsmarks{kjh}{}     \makeevenhead{kjh}{}{}{\scshape\thepage}     \makeoddhead{kjh}{}{}{\scshape\thepage}                    %%%     %%% RCS in footer      %%%          % Make the style for RCS revision control headers and footers     \makepagestyle{kjhrcs}     % \makeheadrule{kjhrcs}{\textwidth}{\normalrulethickness}     \newcommand{\@kjhrcsmarks}{%       \let\@mkboth\markboth       \def\chaptermark##1{%         \markboth{%           \ifnum \c@secnumdepth >\m@ne             \if@mainmatter               \thechapter. \ %             \fi           \fi           ##1}{}}       \def\sectionmark##1{%         \markright{##1}}     }     \makepsmarks{kjhrcs}{\@kjhrcsmarks}     %\makeevenhead{kjhrcs}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}     %\makeoddhead{kjhrcs}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}     \makeevenfoot{kjhrcs}{\texttt{\footnotesize\rcsInfoFile}}{\scshape\thepage}{\footnotesize \emph{Rev} \texttt{\rcsInfoRevision \  \rcsInfoDate}}     \makeoddfoot{kjhrcs}{\texttt{\footnotesize\rcsInfoFile}}{\scshape\thepage}{\footnotesize \emph{Rev} \texttt{\rcsInfoRevision \ \rcsInfoDate}}                    %%%     %%% Mercurial rev info in footers      %%%          % Make the style for hg revision control headers and footers     \makepagestyle{kjhhg}     % \makeheadrule{kjhhg}{\textwidth}{\normalrulethickness}     \newcommand{\@kjhhgmarks}{%       \let\@mkboth\markboth       \def\chaptermark##1{%         \markboth{%           \ifnum \c@secnumdepth >\m@ne             \if@mainmatter               \thechapter. \ %             \fi           \fi           ##1}{}}       \def\sectionmark##1{%         \markright{##1}}     }     \makepsmarks{kjhhg}{\@kjhhgmarks}     %\makeevenhead{kjhhg}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}     %\makeoddhead{kjhhg}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}     \makeevenfoot{kjhhg}{\texttt{\footnotesize \hgkw{Filename}}}{\scshape\thepage}{\texttt{\footnotesize Rev \hgkw{LastChangedRevision} on \hgfilemonth\ \hgfileday, \hgfileyear}}     \makeoddfoot{kjhhg}{\texttt{\footnotesize \hgkw{Filename}}}{\scshape\thepage}{\texttt{\footnotesize Rev \hgkw{LastChangedRevision} on \hgfilemonth\ \hgfileday, \hgfileyear}}                    %%%     %%% Git info in footers; requires vc package      %%%          % Make the style for vc-git revision control headers and footers     \makepagestyle{kjhgit}     % \makeheadrule{kjhgit}{\textwidth}{\normalrulethickness}     \newcommand{\@kjhgitmarks}{%       \let\@mkboth\markboth       \def\chaptermark##1{%         \markboth{%           \ifnum \c@secnumdepth >\m@ne             \if@mainmatter               \thechapter. \ %             \fi           \fi           ##1}{}}       \def\sectionmark##1{%         \markright{##1}}     }     \makepsmarks{kjhgit}{\@kjhgitmarks}     %\makeevenhead{kjhgit}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}     %\makeoddhead{kjhgit}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}     \makeevenfoot{kjhgit}{}{\scshape\thepage}{\texttt{\footnotesize \VCRevision\ on \VCDateTEX}}     \makeoddfoot{kjhgit}{}{\scshape\thepage}{\texttt{\footnotesize \VCRevision\ on \VCDateTEX}}                      %%%      %%% Custom appendix      %%%          % % Make the style for headers and footers in the Appendix     % \makepagestyle{kjhappendix}     % %\makeevenfoot{kjh}{\thepage}{}{}     % %\makeoddfoot{kjh}{}{}{\thepage}     % \makeheadrule{kjhapp}{\textwidth}{\normalrulethickness}     % \newcommand{\@kjhappmarks}{%     %   \let\@mkboth\markboth     %   \def\chaptermark##1{%     %     \markboth{%     %       \ifnum \c@secnumdepth >\m@ne     %         \if@mainmatter     %           \thechapter. \ %     %         \fi     %       \fi     %       ##1}{}}     %   \def\sectionmark##1{%     %     \markright{##1}}     % }     % \makepsmarks{kjhappendix}{\@kjhappmarks}     % \makeevenhead{kjhappendix}{\footnotesize\scshape Appendix}{}{\scshape\thepage}     % \makeoddhead{kjhappendix}{}{}{\footnotesize Data and Methods for \rightmark\normalsize\ \ \scshape\thepage}          %% Create a command to make a note at the top of the first page describing the     %% publication status of the paper.      \newcommand{\published}[1]{%         \gdef\puB{#1}}         \newcommand{\puB}{}         \renewcommand{\maketitlehooka}{%             \par\noindent\footnotesize \puB}           \endinput


title: White space in subsequent pages after wrapfigure

text: I have used `\begin{wrapfigure}` on one of my pages. Subsequently, the same amount of space is left (as white space) on all other pages. The code I've used (it's a `\documentclass{article}`):               \documentclass{article}          \usepackage{graphicx}     \usepackage[font=small]{caption}     \usepackage{wrapfig}     \usepackage{grffile}     \usepackage{fancyhdr}          \pagestyle{fancy}          \fancyfoot[l]{       \includegraphics[height=12pt,keepaspectratio]{FltOps}     }     \fancyfoot[r]{       \includegraphics[height=12pt,keepaspectratio]{QantasLogo}     }          \begin{document}     \graphicspath{ {/Users/Bob/Desktop/Internship report figures/} }          \section*{Executive Summary}          \section{Introduction}          \newpage     \section{About Qantas}          \subsection*{History}     Qantas was formally esthablished on 16 November 1920 in Brisbane, Queensland, Australia.  Currently it is the oldest continuously operated airline in the world. However, the story of the company officially called \textit{Queensland And Notheren Territories Aerial Services} began about a year earlier when the Federal Goverment offered a prize of 10,000 pounds for the first Australians to fly from England to Australia within 30 days. Former Australian Flying Corps officers W. Hudson Fysh and Paul McGinness, who served in Palestine on Bristol fighters during WWI, enlisted for the race. \\     Unfortunately their intended financier passed away before a suitable aircraft could be found. After a meeting with Fergus McMaster, Fysh and McGinness easily convinced him of their plans to set up an air service for the remote areas of the still densely populated Australia. Together with their former flight sergeant Arthur Baird as mechanic they travelled to Sydney to purchase their first Avro 504K. \\     These four men, who would remain connected to the company for years, first used their new airline for charter and joy-rides to raise capital. As soon as larger aircraft could be afforded regular mail and passengers services started, with the first scheduled flight being operated on 3 November 1922. Between 1926 and 1929 the newfounded company even started building its own aircraft, which makes it nowadays the only airline in the world to ever have done that. \\     As cooperation with the British Imperial Airways started, Qantas started its first overseas connections and on 17 april 1935 a four day flight from Brisbane to Singapore was made, which was the first official overseas flight by Qantas. This was part of what would become know as the Kangaroo-route. After a few years the airline decided to introduce Short C Class Empire flying boats, which would be used to run a trice-weekly service to England. \\     Qantas operated its international flight until the outbreak of WWII, since during the start of the war only domestic services were maintained. However in 1943 the British Air Ministry sought a plan together with BOAC, the former Imperial Airways, and Qantas to re-establish airial services between England and Australia. Flights on the Qantas-side would go from Perth, Australia, to Koggala Lake in Sri Lanka. This single hop over the Indian Ocean was with 5652 km the largest non-stop flight ever operated so far. The experience that Qantas had gained by transferring its Californian built Catalina aircraft would proove verey useful during these years. During the risky 271 crossings 648 passengers were flown while using celestial navigation because of the radio-silence that was required to escape enemy patrols.\\     In the years after the war Qantas quickly expanded its network with aircraft such as the Douglas DC3, DC4 and the Lockheed Constellation. After considerable debate the Australian Government decided in 1947 to buy all shares of Qantas while Hudson Fysh would remain Managing Director. The new destinations of the company now included far away places such as Hong Kong, Japan, South-Africa and from 1953 to North-America. \\     As the world entered the Jet age, Qantas would become the first airline outside the U.S. to fly the Boeing 707 in 1959 and a decade later, 1971, the Boeing 747 was introduced. Eventually, with the sale of the last 707 in 1979, the Qantas fleet consisted entirely of 747 aircraft until 1985. That year the Boeing 767 was introduced and in 1989, as part of a large fleet modernisation, the latest version of the 747 was taken into service: the 400 series. This type of aircraft is still being used until this day. \\     Eventually in 1992 the Australian Government announced that Qantas would be fully privatised, just after the airline had acquired its domestic competitor Australian Airlines. The now larger Qantas Group was able to sell a share of 25% to British Airways. As Qantas and Australian merged, the Group now consisted of Qantas and several regional susidiaries. In 2004 the new low-cost airline Jetstar was launched. While first only operating domestically, it nowadays also has international services and even special branches in Singapore and Japan under the banner of Jetstar Asia and Jetstar Japan respectively. On 20 October 2008 Qantas became the third airline in the world to operate the Airbus A380. \\          \begin{wrapfigure}{R}{0.5\textwidth}     \begin{center}     \includegraphics[width=0.42\textwidth]{QantasCorporate}     \end{center}     \end{wrapfigure}          \subsection*{Qantas Today}     Today the Qantas fleet consists of 146 aircraft and flies to 41 different destinations, both domestic and international. The Qantas Group, which employs 35,000 people, also consists of several susidiaries: Jetstart, QantasLink, Network Aviation, Express Freighters Australia, Qantas Freight and the New Zealand-based Jetconnect. The Group is part of Oneworld alliance, that serves over 850 different airports. \\     Since the start of the new millenium the more liberal airspace has not only given more opportunities to Qantas, but has also heavily increased the competition. On domestic flights Qantas mainly competes with Virgin Australia. However, on a international scale the competition becomes more complex. While Qantas is nowadays fully Australian owned, Virgin Australia has sold shares to Air New-Zealand, Singapore Airlines and Ethid Airways. While Qantas as a Group maintains to keep 65% of the domestic market, it only has 18% of the international market. \\     Being one of the strongest Australian brands, Qantas continues to have all its activities done within Australia, including its maintenance. Also, Qantas is until this day the oldest airline in the world that hasn't experienced any aircraft accident since the introduction of jet-powered aircraft. This record makes Qantas, along with several other factors, one of the safest airlines in the world. \\          \subsection*{Recent Developments and Future Strategy}          Qantas is in de middle of some big changes. First of all the airline is in the process of being split between Qantas Domestic and Qantas International. Within Australia Qantas is heavily competing with Virgin Australia as mentioned before. Last October there came a final stop to approaching the market agressively from both Qantas and Virgin by putting a lot of additional capacity in the market. While it is important for Qantas to retain a market-share of 65%, an increase in capacity from both sides resulted in overcapacity which naturally hurts both companies. \\     While things seems more quiet now domestically, there might be much more to come. Virgin Australia recently acquired budget airline Tiger Australia, formerly owned by Singapore Airways, and is meant to compete directly with Jetstar. Since Virgin previously had to keep an eye on both Qantas and Jetstar, in the near future the rival airline can completely focus on Qantas while Tiger will be taking on Jetstar. \\     As Virgin is linked internationally to Singapore, Etihad and Air New Zealand, and since there is a huge increase in air traffic from and to Asia, Qantas is turning its international division around in a few important ways. The most significant change is the recently initiated partnership with Emirates Airways. Qantas wants to lift its game to improve their product even more so it can match that of Emirates, it can link to Emirates' numerous European destinations and also increase passengers from and to the Middle East. Traditionally the famous Kangaroo route from Sydney to London hopped via Singapore, but that will be interchanged with Dubai. \\     With this important restructure on the Western side of the international network, Qantas will now be able to completely focus its attention to Asia. The flight schedule will be retimed from flights that previously would connect ideally with flights from Europe, to approaching Asia now directly with more convenient flight schedules and now treating it completely as a special market on its own. These changes took place in the last few months of the internship, so it is difficult to comment on results. However, they can be regarded as logical consequences of a changing world and market in which Qantas finding its place to continue its legacy.           \end{document}


title: Beamer: Having more than one bibliography

text: I want to make a presentation with the `beamer` class and include the Name of the Paper and the authors into my slides. I really like the style in which it is included when using the classical               \bibliography{sources1}{}     \bibliographystyle{plain}      But I want only one of my sources on each slide and a little bit of explanation afterwards. I have the BibTeX for each of my sources. Is there anyway to convert that to tex code directly and include that code into my slides? Is there a more elegant way? Several .bib files?


title: Extract key-value pairs from a string

text: I want to extract key value pairs from a string. I need this to define a new glossary style and want to pass some additional information through a existing parameter.               \newglossarystyle{meinglossar}{%     \renewenvironment{theglossary}{\begin{description}}{\end{description}}%     \renewcommand*{\glossaryentryfield}[5]{%     \item[\glstarget{##1}{##2}:]%      \dotfill ##5%     \item     \ifthenelse{\equal{##4}{\relax}}{}{\space (##4)}%      \space ##3 % THIS IS THE LINE THAT MATTERS      }%     }      In the almost last line I get the argument `##3` which contains a string like `parameter_1=xyz,parameter_2=ztu`. What I want to do is to access the values of this parameters to build a table:               \begin{tabular}{l l}       First Parameter & \parameter_1 \\ % \parameter_1 should contain "xyz"       ...     \end{tabular}      What is the best way to do this? Here is an example input:               \documentclass[12pt]{report}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage[]{glossaries}           \newglossarystyle{meinglossar}{%     \renewenvironment{theglossary}{\begin{description}}{\end{description}}%     \renewcommand*{\glossaryentryfield}[5]{%     \item[\glstarget{##1}{##2}:]% Eintragsname:     \dotfill ##5% ...Seitenzahl     \item     \gdef\parameters{##3}     % parameters contains now the key value pairs in the form of "name={lorem ipsum...},ref={lorem ipsum}" and i want to extract them one by one to insert them to a table     \begin{tabular}{l l}       Name & <name> \\%nameparameter       Reference & <ref> %refparameter     \end{tabular}     }%     }          %format     \renewcommand*{\glstextformat}{\textit}          % glossary     \newglossaryentry{workstation}{         name=Workstation,         description={             name={Lorem Ipsum},             ref={Chapter 1}         }     }               \newglossaryentry{Test}{         name=Test,         description={             name={Lorem Ipsum},             ref={Chapter 1}         }     }               \makeglossaries          \begin{document}                \section*{Test}     Now i will use \gls{workstation} and the \gls{Test} entries of the glossary.               \printglossary[style=meinglossar]          \end{document}


title: afterpage + list = missing \item

text: I'm trying to use the `afterpage` package to automatically insert text at the top of each page (please see my other question Section reminders at the top of each page?) but I'm having trouble. Sometimes I get unlucky and a list environment starts just before a page break. The first `\item` doesn't appear until just after the page break. When this happens, LaTeX gives me a "missing `\item`" error message because `\afterpage` is inserting text right after the start of a list environment. Here is a minimal example that emulates the problem I'm seeing:               \documentclass{article}     \usepackage{afterpage}     \begin{document}     \afterpage{afterpage-stuff}     before list     \begin{itemize}     \clearpage     \item an item     \end{itemize}     after list     \end{document}      If I remove that `\clearpage`, then everything works as expected. Is there something I can pass to `\afterpage` that would temporarily reset TeX's state so that I can safely insert some vertical mode material (e.g., a `minipage`) at the top of the next page without interfering with environments that span pages?


title: Watermark image

text: Please note I'm new to LaTeX so don't know much about it (yet). I've looked on-line about how to add a watermark image but don't know how to do it. I've seen sites that show something about it but they seem to be aimed at people who know how to add extra packages, something I don't know how to do (yet). Does anyone know of a site or tutorial that takes 'newbies' through the process on a step by step basis? I will need o have text easily readable on the page so the colors as I want to have it centered on the page both horizontally and vertically but automatically adjusted to fill the page to the margins up but keep the aspect ratio of the original image.


title: How to enumerate with capital latin or greek letters without the apostrophe?

text: I tried to do this with enumitem package as such:               \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage[utf8]{inputenc}     \usepackage[greek]{babel}     \usepackage[shortlabels]{enumitem}     .     .     \begin{document}     .     .     \begin{enumerate}[labels=\Alph*]     \item blah...     \item 2timesblah...     \end{enumerate}     .     .     \end{document}      But it will insist to add after every letter an apostrophe, like "A'". Even if I write it this way:               \begin{enumerate}[A.]     \item blah...     \item 2timesblah...     \end{enumerate}      the apostrophe is still there but before the dot. Actually, it will be there before anything: "A'.", "A')" etc. What can I do?


title: Set period only after very last bib-item in bibliography

text: My university has some special format-rules for the bibliography: The bib-items have no period at the end. Only the VERY LAST one has to end with a period! This is how it should look like: ![enter image description here](http://i.stack.imgur.com/xo9Dz.jpg)) I changed the finentrypoint with `\renewcommand{\finentrypunct}{}` \- that works fine. But how do I get the period after the very last entry then?? I use biber. Does any one have suggestions for me?


title: ntheorem conflicting with subfig

text: When I try to add a figure that consists of two subfigures to my document with the following piece of code               \begin{figure}[h]     \centering     \subfloat[Locally confluent]{     \begin{tikzpicture}[>=stealth,font=\sffamily]         \node (X) at (0,0) {$x$};         \node (Y) [below left=2cm and 1cm of X]  {$y$};% 2cm below, 1cm to the left (optional)         \node (Z) [below right=2cm and 1cm of X] {$z$};         \node (U) [below left=2cm and 1cm of Z]  {$u$};         \draw [semithick,->] (X) -- (Y);         \draw [semithick,->] (X) -- (Z);         \draw [semithick,->] (Y) -- (U) node [midway,below,sloped] {*};         \draw [semithick,->] (Z) -- (U) node [midway,below,sloped] {*};     \end{tikzpicture}     \label{fig:locallyconfluent}}     \qquad     \subfloat[Confluent]{     \begin{tikzpicture}[>=stealth,font=\sffamily]         \node (X) at (0,0) {$x$};         \node (Y) [below left=2cm and 1cm of X]  {$y$};% 2cm below, 1cm to the left (optional)         \node (Z) [below right=2cm and 1cm of X] {$z$};         \node (U) [below left=2cm and 1cm of Z]  {$u$};         \draw [semithick,->] (X) -- (Y) node [midway,above,sloped] {*};         \draw [semithick,->] (X) -- (Z) node [midway,above,sloped] {*};         \draw [semithick,->] (Y) -- (U) node [midway,below,sloped] {*};         \draw [semithick,->] (Z) -- (U) node [midway,below,sloped] {*};     \end{tikzpicture}     \label{fig:confluent}}     \caption{This is a figure containing several subfigures.}     \end{figure}      I get "no room for new \count" errors in my ntheorem.tex file where I include all ntheorem stuff and define all my theorems. Am I doing something wrong or why is this happening?


title: Exporting true pdf without dpi

text: I've used Inkscape for certain drawings, with the aim of including them into the text for printing. The whole text is compiled with LaTex. I chose the option "save as", and then select pdf option with dpi of 90. However, since the rest of the text is pdf, the imported image seems "less sharp", and does not allow "endless zooming" that I could do with text. The problem is more noticeable with printing, where the imported image (from Inkscape) is just "out of the rest" with sharpness. What would be your suggestion for a good quality drawing that would "fit the sharpness"? Since the drawings are created in Inkscape, I might export it to svg. Any other software that would allow me to export good pdf from svg? The best way would be to allow automatic and "as in Inkscape" import of graphtics to LaTex. Is this possible. Note that LatexDraw could allow me to achieve some work, but without some sophisticated drawings that I easily achieve with Inkscape. Could someone share the idea of how I might get the _true, infinite resolution_ PDF from the svg I created in Inkscape. It seems that whatever I create in Inkscape, the 'save as' - > pdf option always asks for dpi.


title: Letterhead creation query

text: I am new to Latex but wish to learn more. Does anyone here know how to create a letterhead using Latex? It will consist of a small image on the top left- hand side of each page and some text to the right of that running all the way to the right-hand side. Please note I only know the very basics so will need a step-by-step answer. I have already looked on the net but didn't understand the solutions I saw as they seemed to be aimed at more advanced people than myself.


title: Given four nodes forming a quadrilateral, how do I find the node at the intersection of the diagonals

text: I'm trying to find and name a node at the intersection of the diagonals of a quadrilateral formed by four other nodes. However, I'm not drawing a path. All I can seem to find in the tikz manual are examples involving drawing paths. Is there a way to do this without drawing anything? For example,               \documentclass{article}     \usepackage{tikz}     \pagestyle{empty}     \begin{document}          \begin{tikzpicture}       \node (A) at (0,0) {1};       \node (B) at (1,0) {2};       \node (C) at (5,3) {3};       \node (D) at (-2,7) {4};     \end{tikzpicture}          \end{document}      How do I find and label the node at the intersection of the diagonals `AC` and `BD`? Actually, most of the quadrilaterals I'm working with are rectangles with sides parallel to the axes. So, I'd be interested in solution that might only work for rectangles too.


title: Can we use enumerate with standalone class?

text: Can we use `\enumerate` with `\standalone` class? Isn't `enumerate` basic LaTeX? The minimal example, which does not compile with `standalone` but it does with `article`, is:                \documentclass{standalone}      \usepackage{tikz}          \begin{document}              \begin{enumerate}                  \item test                \end{enumerate}           \end{document}


title: Are there TeX-based course management systems?

text: I am looking for something similar to WebWork, WebAssign, MyMathLab, but geared to more advanced courses with specialized features. What I want is something that will work for say a numerical analysis course. Exchanging homework assignments through email seems not to be the most efficient way to do it. So I want   1. The software maintains a class folder for a certain course.   2. Students can enter free format tex-based answers, instructor can annotate, enter grades.   3. Software will maintain revisions of a document.   4. Software gives ability to export code to the program that runs it.  What software comes close? What system do you use? A home-made one using Web-2.0 seems feasible, at least for features 1,2,3. Related questions:   1. Can programs e.g. Matlab be made executable from within PDF?   2. Customizable latex equation editors for students I recently learned that BlackBoard now supports TeX.


title: How to use braces to achieve branch structure diagram

text: ![enter image description here](http://i.stack.imgur.com/LUdqq.png)               \documentclass{ctexart}     \setCJKmainfont{宋体}      \usepackage{amsmath,mathptmx}          \begin{document}     $     \text{《内经》学术体系}     \begin{cases}     \text{医学理论}             \begin{cases}                     \text{藏象}                         \begin{cases}                             \text{脏腑}\\                             \text{经络}\\                             \text{精气神}                         \end{cases}\\                     \text{疾病}                         \begin{cases}                             \text{病机}                                 \begin{cases}                                     \text{病因}\\                                     \text{发病}\\                                     \text{病理}\\                                     \text{传变}                                 \end{cases}\\                             \text{病症}                         \end{cases}             \end{cases}\\     \text{医学基础}             \begin{cases}                     \text{哲学}\\                     \text{天文历法}\\                     \text{地理学}\\                     \text{气象学}\\                     \text{数学}\\                     \text{社会学}             \end{cases}\\     \end{cases}     $          \end{document}       ![enter image description here](http://i.stack.imgur.com/iH7LC.png)


title: Centering a group of equations and text both which is used in \begin{align*}.....\end{align*}

text: Say I am trying to center a group of equations, written in separate lines, with equality sign aligned one below another, which are defined by: `$f(r)+1=g(r^2)+1=O(r)$ as $r\to 1$` by first using the following sequence of commands for centering:               \begin{align*}          & f(r)+1 \\     &=g(r^2)+2 \\     &=O(r)\\          \end{align*}      followed by as `$r\to 1$`. But this put `$r\to 1$` in a different line, not in the same line with O(r). I want the last line to be written as: `$O(r)$ as $r\to 1$`, centered in the middle of the page. How can I achieve this ? Thank you!


title: setting values in tikz picture

text: To anyone who can help me: I recently found this code posted as an answer to this (Drawing Karnaugh's maps in LaTeX) question on TeX exchange but I am having trouble adapting it to my needs.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{matrix,calc}          %isolated term     %#1- space between node and grouping line. Default=0     %#2- node     %#3- filling color     \newcommand{\implicantsol}[3][0]{         \draw[rounded corners=3pt, fill=#3, opacity=.3] ($(#2.north west)+(135:#1)$) rectangle ($(#2.south east)+(-45:#1)$);         }               %internal group     %#1-space between node and grouping line. Default=0     %#2-top left node     %#3-bottom right node     %#4-filling color     \newcommand{\implicant}[4][0]{         \draw[rounded corners=3pt, fill=#4, opacity=.3] ($(#2.north west)+(135:#1)$) rectangle ($(#3.south east)+(-45:#1)$);         }          %group lateral borders     %#1-space between node and grouping line. Default=0     %#2-top left node     %#3-bottom right node     %#4-filling color     \newcommand{\implicantcostats}[4][0]{         \draw[rounded corners=3pt, fill=#4, opacity=.3] ($(rf.east |- #2.north)+(90:#1)$)-| ($(#2.east)+(0:#1)$) |- ($(rf.east |- #3.south)+(-90:#1)$);         \draw[rounded corners=3pt, fill=#4, opacity=.3] ($(cf.west |- #2.north)+(90:#1)$) -| ($(#3.west)+(180:#1)$) |- ($(cf.west |- #3.south)+(-90:#1)$);     }          %group top-bottom borders     %#1-space between node and grouping line. Default=0     %#2-top left node     %#3-bottom right node     %#4-filling color     \newcommand{\implicantdaltbaix}[4][0]{         \draw[rounded corners=3pt, fill=#4, opacity=.3] ($(cf.south -| #2.west)+(180:#1)$) |- ($(#2.south)+(-90:#1)$) -| ($(cf.south -| #3.east)+(0:#1)$);         \draw[rounded corners=3pt, fill=#4, opacity=.3] ($(rf.north -| #2.west)+(180:#1)$) |- ($(#3.north)+(90:#1)$) -| ($(rf.north -| #3.east)+(0:#1)$);     }          %group corners     %#1-space between node and grouping line. Default=0     %#2-filling color     \newcommand{\implicantcantons}[2][0]{         \draw[rounded corners=3pt, fill=#2, opacity=.3] ($(rf.east |- 0.south)+(-90:#1)$) -| ($(0.east |- cf.south)+(0:#1)$);         \draw[rounded corners=3pt, fill=#2, opacity=.3] ($(rf.east |- 8.north)+(90:#1)$) -| ($(8.east |- rf.north)+(0:#1)$);         \draw[rounded corners=3pt, fill=#2, opacity=.3] ($(cf.west |- 2.south)+(-90:#1)$) -| ($(2.west |- cf.south)+(180:#1)$);         \draw[rounded corners=3pt, fill=#2, opacity=.3] ($(cf.west |- 10.north)+(90:#1)$) -| ($(10.west |- rf.north)+(180:#1)$);     }          %Empty Karnaugh map 4x4     \newenvironment{Karnaugh}%     {     \begin{tikzpicture}[baseline=(current bounding box.north),scale=0.8]     \draw (0,0) grid (4,4);     \draw (0,4) -- node [pos=0.7,above right,anchor=south west] {cd} node [pos=0.7,below left,anchor=north east] {ab} ++(135:1);     %     \matrix (mapa) [matrix of nodes,             column sep={0.8cm,between origins},             row sep={0.8cm,between origins},             every node/.style={minimum size=0.3mm},             anchor=8.center,             ampersand replacement=\&] at (0.5,0.5)     {                            \& |(c00)| 00         \& |(c01)| 01         \& |(c11)| 11         \& |(c10)| 10         \& |(cf)| \phantom{00} \\     |(r00)| 00             \& |(0)|  \phantom{0} \& |(1)|  \phantom{0} \& |(3)|  \phantom{0} \& |(2)|  \phantom{0} \&                     \\     |(r01)| 01             \& |(4)|  \phantom{0} \& |(5)|  \phantom{0} \& |(7)|  \phantom{0} \& |(6)|  \phantom{0} \&                     \\     |(r11)| 11             \& |(12)| \phantom{0} \& |(13)| \phantom{0} \& |(15)| \phantom{0} \& |(14)| \phantom{0} \&                     \\     |(r10)| 10             \& |(8)|  \phantom{0} \& |(9)|  \phantom{0} \& |(11)| \phantom{0} \& |(10)| \phantom{0} \&                     \\     |(rf) | \phantom{00}   \&                    \&                    \&                    \&                    \&                     \\     };     }%     {     \end{tikzpicture}     }          %Empty Karnaugh map 2x4     \newenvironment{Karnaughvuit}%     {     \begin{tikzpicture}[baseline=(current bounding box.north),scale=0.8]     \draw (0,0) grid (4,2);     \draw (0,2) -- node [pos=0.7,above right,anchor=south west] {bc} node [pos=0.7,below left,anchor=north east] {a} ++(135:1);     %     \matrix (mapa) [matrix of nodes,             column sep={0.8cm,between origins},             row sep={0.8cm,between origins},             every node/.style={minimum size=0.3mm},             anchor=4.center,             ampersand replacement=\&] at (0.5,0.5)     {                           \& |(c00)| 00         \& |(c01)| 01         \& |(c11)| 11         \& |(c10)| 10         \& |(cf)| \phantom{00} \\     |(r00)| 0             \& |(0)|  \phantom{0} \& |(1)|  \phantom{0} \& |(3)|  \phantom{0} \& |(2)|  \phantom{0} \&                     \\     |(r01)| 1             \& |(4)|  \phantom{0} \& |(5)|  \phantom{0} \& |(7)|  \phantom{0} \& |(6)|  \phantom{0} \&                     \\     |(rf) | \phantom{00}  \&                    \&                    \&                    \&                    \&                     \\     };     }%     {     \end{tikzpicture}     }          %Empty Karnaugh map 2x2     \newenvironment{Karnaughquatre}%     {     \begin{tikzpicture}[baseline=(current bounding box.north),scale=0.8]     \draw (0,0) grid (2,2);     \draw (0,2) -- node [pos=0.7,above right,anchor=south west] {b} node [pos=0.7,below left,anchor=north east] {a} ++(135:1);     %     \matrix (mapa) [matrix of nodes,             column sep={0.8cm,between origins},             row sep={0.8cm,between origins},             every node/.style={minimum size=0.3mm},             anchor=2.center,             ampersand replacement=\&] at (0.5,0.5)     {               \& |(c00)| 0          \& |(c01)| 1  \\     |(r00)| 0 \& |(0)|  \phantom{0} \& |(1)|  \phantom{0} \\     |(r01)| 1 \& |(2)|  \phantom{0} \& |(3)|  \phantom{0} \\     };     }%     {     \end{tikzpicture}     }          %Defines 8 or 16 values (0,1,X)     \newcommand{\contingut}[1]{%     \foreach \x [count=\xi from 0]  in {#1}          \path (\xi) node {\x};     }          %Places 1 in listed positions     \newcommand{\minterms}[1]{%         \foreach \x in {#1}             \path (\x) node {1};     }          %Places 0 in listed positions     \newcommand{\maxterms}[1]{%         \foreach \x in {#1}             \path (\x) node {0};     }          %Places X in listed positions     \newcommand{\indeterminats}[1]{%         \foreach \x in {#1}             \path (\x) node {X};     }          \begin{document}         \begin{Karnaugh}             \contingut{0,0,0,0,0,1,0,1,1,1,0,0,0,1,0,1}            \implicant{0}{2}{red}            \implicantdaltbaix[3pt]{3}{10}{blue}            \implicantcostats{4}{14}{green}         \end{Karnaugh}         %         \begin{Karnaughvuit}            \minterms{3,4}             \maxterms{0,1,6,7}            \indeterminats{2,5}            \implicant{3}{2}{green}            \implicant{4}{5}{}         \end{Karnaughvuit}         %         \begin{Karnaughquatre}             \minterms{1,2}            \maxterms{0,3}            \implicantsol{1}{green}            \implicantsol{2}{red}         \end{Karnaughquatre}          \end{document}      What I would like to do is be able to set the "ab" and "cd" text in the same way that the elements of the array are from inside the document instead of the preamble. One issue that I encountered is that if I manually set the text to be something in a math environment like $x_0$ I get a "bad box" error. My question is in 2 parts: 1. is there a way to prevent this bad box error and allow me to set this text to be something from the math environment (even if its only x_i that would be enough) and 2. how would I make a command to set the text from inside the document instead of the preamble?


title: Overfull box with addmargin (KOMA-Script) and SideBySideExample (fvrb-ex)

text: Why does the following code produce an overfull error and how can I avoid that?               \documentclass{scrartcl}     \usepackage{fvrb-ex}     \begin{document}       \begin{addmargin}[4em]{0em}         \begin{SideBySideExample}[xrightmargin=3cm]           a         \end{SideBySideExample}       \end{addmargin}     \end{document}


title: Problem with xelatex and the \drop command

text: I have the following definition for my title page:               %----- TITLE PAGE -----%       \newcommand*{\plogo}{\raisebox{+1.25ex}{\includegraphics[height=1in]{logo}} } % Generic publisher logo       \newcommand*{\titleAT}{       \begingroup % Create the command for including the title page in the document       \newlength{\drop} % Command for generating a specific amount of whitespace     \drop=0.1\textheight % Define the command as 10% of the total text height       \rule{\textwidth}{2pt}\par % Thick horizontal line     \vspace{3pt}\vspace{-\baselineskip} % Whitespace between lines     %\rule{\textwidth}{0.4pt}\par % Thin horizontal line       \vspace{0.75\drop} % Whitespace between the top lines and title     \centering % Center all text       \textcolor{Blue}{       {\Huge Title of the document}\\[0.5\baselineskip]} % Title line 1     %{\Large OF}\\[0.75\baselineskip] % Title line 2     %{\Huge \LaTeX ~Templates}} % Title line 3          \vspace{0.5\drop} % Whitespace between the title and short horizontal line     \rule{0.4\textwidth}{1.25pt}\par % Short horizontal line under the title     \vspace{\drop} % Whitespace between the thin horizontal line and the author name          {\LARGE \textsc{First Author nanme \\ \ \\ Second Author name }}\par % Author name          \vfill % Whitespace between the author name and publisher text     {\large \textcolor{blue}{\plogo}}\\[0.5\baselineskip] % Publisher logo     {\Large \textsc{ Publisher} } }\par % Publisher          \vspace{\drop} % Whitespace under the publisher text          \rule{\textwidth}{0.4pt}\par % Thin horizontal line     \vspace{2pt}\vspace{-\baselineskip} % Whitespace between lines     \rule{\textwidth}{1pt}\par % Thick horizontal line          \endgroup}          %---- END TITLE PAGE ----%      I keep getting the following error:               ! Undefined control sequence.       <argument> \drop


title: typing with latex

text: I've working on this for about two hours, but still can't find any wrong with it. This is what I type in:               \documentclas [a4papter, 12pt] {article}     \begin{document}          find \(lim_{x \to 3^+}\)\( frac{2x}{x-3}\) and \(lim_{x\to 3^-}\)\(frac{2x}{x-3}\)          \end{document}      Could anyone told me that what's the wrong with it? Thank you soooooo much.


title: Unitled section in Lyx

text: I am writing a Lyx document with untitled sections. As Lyx does not permit to create untitled sections, I use to insert the latex code `\section`, but it would be very much convenient to have "Lyx sections", in order to have it in the plan of the document and to see the numbers. I could name the section with a blank, but it would be weird. Any idea?


title: How to improve appearance of hindi deonagari font on lyx

text: If you use deonagari font on lyx, it does not appear properly on lyx user interface though the pdf generated is okay. What can I do it to improve it?


title: About greater sign and sigma

text: What I want to write is                if N+1 > N we do sigma (all the N) / the length of the array      For the greater sign I use                If N+1 \textgreater N      But it's shown like this                if N+1 >N       No space between the greater sign and N And about sigma, I do `\sum N / Length of the array` but doesn't seem right, the output is right but I get missing sign error


title: How to link items in TOC using beamer

text: I am preparing a fairly straight forward presentation using beamer. My question is this--how do I link items in my table of contents to the appropriate section/subsection? I feel as if there is something simple I'm missing...then again, maybe not. Thanks!


title: Using savetrees with LuaLaTeX

text: Apparently I can't use `savetrees` with `lualatex` \- is there another way to expand the writable area to the whole page (for US-letter currently, I think other people are interested in A4)? I get this error message:               ! Package microtype Error: The `tracking' feature doesn't currently work     (microtype)                with luatex.


title: Why doesn't a 17cm x 25cm picture fit on a 17cm x 25cm page?

text: Why doesn't this tikz picture fit on the first page of the document?               \documentclass{report}          \usepackage{tikz}       \usepackage[showframe, centering, text={17cm, 25cm}]{geometry}          \begin{document}          \noindent       \begin{tikzpicture}       \draw (0cm,0cm) grid (17cm,25cm);       \end{tikzpicture}            \end{document}      When I compile the picture is pushed to the second page and the first is blank. If I increase the height of the page slightly (say to 25.01cm) it fits. How is LaTeX handling this situation? Is there anyway to get an exact fit?


title: Different spacing between section and content

text: I have a strange problem with spacing between section and content header. Take a look at the picture below. ![Section spacing problems](http://i.stack.imgur.com/V7T1W.png) You can see that spacing between headers are different. I couldn't reproduce this error for simple documents, so I uploded my whole chapter here. What is even stranger, everything looks normal if I only delete a couple of last lines from the chapter. The source code is a little big that is why I decided to upload it on a server. What should I do to restore good spacing between sections presented in the picture? In the other chapters everything looks OK.


title: How can I align the first row of these equations?

text: \documentclass[ngerman]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}           \begin{document}     \begin{equation}     \nu = \rho \cdot \eta     \end{equation}     some text     \begin{flalign}     \text{Grenzviskosität} && [\eta] =&\lim\limits_{c,G \rightarrow \infty}{\eta_{red}} &\\     \text{reduzierte Viskosität} && \eta_{red} =& \frac{\eta_{sp}}{c}\\     \text{spezifische Viskosität} && \eta_{sp} =&\frac{\eta - \eta_{L}}{\eta_{L}}      \end{flalign}     \end{document}      I want the first equation to be aligned with the second block


title: Sentence diagramming

text: I want to make up some handouts on sentence diagramming. For those who didn't have to diagram sentences at school, I'm talking about something like this. ![enter image description here](http://i.stack.imgur.com/r78K3.jpg) It's basically an exploded view of the sentence, with the various parts all laid out in relation to each other. I would post some sample code for people to comment on, but I'm not even sure where to start with this. I'm putting the `tikz` tag on the question, but I don't even know whether `tikz` is the right tool for the job. Where should I start figuring this out? (I did find this earlier post, but it doesn't really get at the branching &c. in the link above.)


title: Equations in a box - table doesn't work

text: I want to put some limit equations in a table but all I get are errors such as "! Missing $ inserted." and "! You can't use `\eqno' in math mode.". Am I doing something wrong or is there another way to do this. This is what I have:               \begin{tabular}{| l |}  \hline        Text is here\\        \begin{equation}             \lim_{n\to \infty} (x_n  + y_n) = a + b        \end{equation}\\        Text is here\\   \hline        Text is here\\        \begin{equation}             \lim_{n\to \infty} (x_n  \cdot y_n) = a \cdot b        \end{equation}\\  \hline     \end{tabular}


title: How do I get babel to use the same typeface for regular and bold Hebrew text?

text: According to the babel package documentation (section 64), the default font used for Hebrew is Jerusalem which is a Metafont. Bold text is set in Dead Sea. This results in weird looking text, such as this: ![enter image description here](http://i.stack.imgur.com/vHxnt.png) Notice the first two words from the right on the second line. Ideally it should look like this: ![enter image description here](http://i.stack.imgur.com/bvAtz.png) (unfortunately the author of that doesn't remember the settings he used) I looked to no avail on how to set the bold font so it appears like the regular one only in bold. As a last resort, I tried migrating from babel to XeTeX with bidi, but couldn't set the font (using fontspec) to the jerus10.mf file that comes with the babel package. Maybe if I could get a hold of a TrueType font that matches it. EDIT: Here's a minimal example that illustrates the problem:               \documentclass[a4paper]{article}     \usepackage[utf8x]{inputenc}     \usepackage[english, hebrew]{babel}     \begin{document}     שלום     \emph{שלום}     \bf שלום          \unsethebrew     Hello     \emph{Hello}     \bf Hello     \end{document}      Which gets rendered like this: ![enter image description here](http://i.stack.imgur.com/9CQUR.png)


title: Setup SyncTeX with Emacs on debian stable (squeeze)

text: Is it possible to setup SyncTeX with Emacs on debian stable (squeeze)? Emacs24 is available from http://emacs.naquadah.org/ but squeeze is at its end of cycle and most other tools are outdated.               $ evince --version     GNOME Document Viewer 2.30.3          $ okular --version     Qt: 4.6.3     KDE Development Platform: 4.4.5 (KDE 4.4.5)     Okular: 0.10.5      I found the article Setup SyncTeX with Emacs but could not reproduce it here yet and want to know if there is a chance.


title: Missing font in ubuntu (SimSun)

text: Previously I complied my file using Xelatex in window 7 using Miktex and it works fine. Now I install TexLive 2009 in Ubuntu 12.04 and compile the same file again, but the following error occurs after compilation (`xelatex myfile.tex`):               kpathsea: Running mktexmf SimSun     ! I can't find file `SimSun'.     <*> ...:=ljfour; mag:=1; nonstopmode; input SimSun          Please type another input file name     ! Emergency stop.     <*> ...:=ljfour; mag:=1; nonstopmode; input SimSun          Transcript written on mfput.log.     grep: SimSun.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input SimSun' failed to make SimSun.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font \zf@basefont=SimSun at 10.0pt not loadable: Metric (TFM) file or install     ed font not found.     <to be read again>                     \let      l.30 \setCJKmainfont{SimSun}     Set Chinese font, complusory     ?       Is there any way I can use the font available for MikTex in Window 7 from Ubuntu? or any other way to deal with it? MWE:               \documentclass[a4paper]{article}          \usepackage{xeCJK}     \setCJKmainfont{SimSun}     \xeCJKsetup{PunctStyle=kaiming,CJKspace=true,CheckSingle=true}           \begin{document}     宋體中文字     \end{document}


title: What is the best way to achieve Figure - Comment structure in article class?

text: I'm writing my thesis in LaTeX. However, as most of the users do, I face the problem of placing figures. I tried various methods to place figures, and all of them were perfect -- except, when I add or remove a tiny bit of text. I'm trying to obtain the structure where I can place figures, just before (or after) the comments about the figures. Something like:               [Figure 1 here]     This figure is so good I cannot explain it.          [Figure 2 here]     This figure is a bit worse. So, here's my explaination: we tried time travel and apparently failed while doing it and ended up in current time          [Figure 3 here]     This figure shows us not to try time travel without precautions.      **I tried using floats**. When I place 4-5 figures consecutively, with paragraphs afterwards, it works good. But after 12-13 figures (my experiments include around 20 figures), it fails and gives the famous _too many unprocessed floats_ error. `\clearpage` sends the figures wherever LaTeX wishes (like end of the next section or even after the references). **I tried`[hbtp]` tag**. But then, although the figures are in correct section, I cannot force LaTeX to put paragraphs just after or before the figures, which is my initial problem. So, I need a generic method to achieve figure-comment structure that works whatever I add or remove.


title: How to adust the location of the inner component in the Outer component constructed by "fit"?

text: I use "fit" to make two small rectangles inside a bigger rectangle. And then add some words at the top of the bigger one, which causes a large blank space at the bottom of the bigger rectangle as showed in the following photo. However, I wish to get the graph that there is no blank at the bottom of the outside rectangle and almost no space between word and the top small rectangle. Could some one Help me? ![enter image description here](http://i.stack.imgur.com/Tgc6z.jpg)               \documentclass[tikz]{standalone}     \usetikzlibrary{         shapes.geometric,         positioning,         fit,         calc     }     \usetikzlibrary{decorations.markings}     \usepackage{tikz}     \newcommand*{\Shift}{0.6ex}     \begin{document}          \tikzset{       my box/.style = {draw, minimum width = 3em, minimum height=1em},     }     \begin{tikzpicture}[node distance=5mm]     \node[my box,align=center](a) {get flight\\(gf)};     \node[my box,align=center,below=of a] (b) {book flight\\(bf)};     \draw[->] (a) -- (b);          \node[draw, fit=(a) (b),minimum height=4cm] (ab) {};          \node[below=0.3mm of  ab.north,align=center](flight) {ontessage\\ jeusts};          \end{tikzpicture}     \end{document}


title: how to efficiently code in metapost?

text: I am trying to get better at metapost, but the error messages are pretty cryptic (if there are at all) and it always takes a big effort go compile an mp file. Up 'best' program for writing and compiling mp so far is http://www.tlhiv.org/mppreview/. It does provide some error messages but most of them are not useful. What program do you use for writing/debugging your metapost code? Is there a good IDE for writing metapost (that e.g. checks syntax and automatically updates a preview)? MP seems to be such a nice thing but it seems for beginners it is incredibly complicated to get into.


title: How can I get a limit arrow without modifying the current line's height?

text: I'm using `$f(x)\xrightarrow[x\to\infty] l$` to denote that a function tends to a certain value. However, this stretches the current line vertically. Is there any way to fix this?


title: Need help configuring entry type driver for biblatex-dw. Different citation style sa for different entry types

text: I need some help rewriting a bibliography driver. But lets start from the beginning: I'm using `biblatex` with the `biblatex-dw` style. In the footnotes my cites appear as `name` `shorttitle` and `page` Additionally to the usual literature i work with a lot of unpublished material from archives. My problem is the organization of these sources. They do not have a name at all, but are handled alone by their signature. There is always the name of the archive, the category, the subcategory and the box number: For example: `Archiv Newtown` `Dep 1` `Ru 4` `354` (No commata between the single parts) So everytime such a unpublished source is used, the full signature has to appear in the footnote. And of course in the bibliography the sources should be in the right alphanumerical order. Another point is, that in the citations within the text the `Ibid.` function should work. I mean if use the same source two times in a row it should give out `Ibid.` What i do not need is `Ibid.` within the signature (If e.g. the category, subcategory or box changes). So within the text it should look like               --------------------------------------------     1 ArchNew Ho1 Ru8 356.     2 Mueller 1994, p. 18.     3 ArchNew Ho1 Ru8 356.     4 Ibid.     5 ArchNew FAS Ru7 321      and in the bibliography               **Literature**          Mueller, Claus: Something. Berlin 1994          **Sources**          *Archive Newtown*          ArchNew Ho1 Ru8 356     ArchNew FAS Ru7 321      I found a thread with nearly the same problem and a solution here, but I I' afraid I couldn't rewrite the code over there to match my needs. The difference is that in this solution over there, the sources also have names and are therefore handled both by their name AND their signature. I only need the signature. Additionally i also need another subcategory since my signatures are longer. Maybe i could use the now free name field for this purpose? Could anybody help me out here? I'd be really, really grateful. The code i need to alter looks like this:               \documentclass{article}     \usepackage[ngerman]{babel}          \usepackage{xpatch}          \usepackage[         style=authortitle-dw,         firstfull=true     ]{biblatex}          \DefineBibliographyStrings{ngerman}{       chapter = {Bd.}     }          \renewbibmacro*{cite}{%       \usebibmacro{cite:citepages}%       \global\boolfalse{cbx:loccit}%       \ifentrytype{unpublished}%          {\ifthenelse{\ifciteibid\and\not\iffirstonpage}%             {\usebibmacro{cite:ibid}}{\usebibmacro{cite:firstfull}}}%          {\ifbool{cbx:firstfull}%             {\ifciteseen%               {\usebibmacro{cite:normal}}               {\usebibmacro{cite:firstfull}}}             {\usebibmacro{cite:normal}}}%       \usebibmacro{savestuff}%       }          \newbibmacro{savestuff}{%       \savelist{institution}{\lastinstitution}%       \savelist{location}{\lastlocation}%       \savefield{chapter}{\lastchapter}}          \xapptobibmacro{finentry}{\usebibmacro{savestuff}}{}{}          \DeclareBibliographyDriver{unpublished}{%       \iffirstonpage{\def\lastinstitution{}%         \def\lastlocation{}%         \def\lastchapter{}}{}%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{title}%       \newunit       \usebibmacro{in:}%       \iflistequals{institution}{\lastinstitution}%         {\bibstring{ibidem}%          \newunit\newblock%          \iflistequals{location}{\lastlocation}%            {\iffieldequals{chapter}{\lastchapter}%              {}{\printfield{chapter}}}%            {\printlist{location}\newunit\newblock%             \iffieldequals{chapter}{\lastchapter}%               {\bibstring{ibidem}}%               {\printfield{chapter}}}%         }%         {\printlist{institution}\newunit\newblock%          \iflistequals{location}{\lastlocation}%            {\bibstring{ibidem}\newunit\newblock%              \iffieldequals{chapter}{\lastchapter}%                {}{\printfield{chapter}}}%            {\printlist{location}\newunit\newblock%             \iffieldequals{chapter}{\lastchapter}%               {\bibstring{ibidem}}%               {\printfield{chapter}}}%         }%       \newunit\newblock%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \usebibmacro{finentry}}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}          @unpublished {test1,         title = {subcategory},         institution = {Archive 1},         location = {Category 1,         chapter = {Box1}     }          @unpublished {test2,         title = {subcategory},         institution = {Archive 1},         location = {Category 1},         chapter = {Box2}     }          @unpublished {test3,         title = {subcategory},         institution = {Archive 1,         location = {Category 2},         chapter = {Box2}     }          @article{test4,       title={Something},       author={Mueller, Claus}     }          \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          \footcite{test1}     \footcite{test1}     \footcite{test4}     \footcite{test1}     \footcite{test2}     \footcite{test3}     \footcite{test1}     \footcite{test4}     \clearpage     \footcite{test1}          \printbibliography          \end{document}


title: label separator between the section number and title to 0pt

text: I'm writing my thesis using mitthesis class. However, the numbering of the sections and subsections is not what I want. Right now my document has this numbering, but the 0 in X.0.X and X.0.Y should not be there. How can I fix that? Currently: Chapter 1 Introduction Section 1.0.1 subsection 1.0.2 subsection Should be: Chapter 1 Introduction Section 1.1 subsection 1.2 subsection My code is               \documentclass[12pt,twoside]{mitthesis}     \usepackage{lgrind}     \pagestyle{plain}     \begin{document}     \pagestyle{plain}     \pagenumbering{roman}     \include{acknowledgments}     %\include{contents}     %\setcounter{page}{3}     \newpage     \pagenumbering{arabic}     \include{chap1}     \include{chap2}     \appendix     %\include{appa}     %\include{appb}     \include{bib}     \end{document}      How can I solve it. I searched but I could not find the most relevant solution one to solve my problem. P.S. I am really new working with LaTex. thanks


title: Equivalent of css "position: relative" to move slighty a graphic

text: I have a header with two columns; On the first column, I have an image (the logo) and I would like to slightly adjust its position. Here is the relevant piece of code:               \fancyhead[LE,LO]{\tt\begin{multicols}{2}\includegraphics[scale=0.5]{logo.eps}\vfill\columnbreak some more text...\end{multicols}}      Is it possible to move a little bit to the top/left my image? [edit] here is a minimal working example:               \documentclass[a4paper,11pt]{article}     \usepackage{fancyhdr}     \usepackage{graphicx}     \usepackage{multicol}     \pagestyle{fancy}     \fancyhead{} % clear all header fields     \fancyhead[LE,LO]{\begin{multicols}{2}\includegraphics[height=3cm]{logo.eps}\vfill\columnbreak Right column text\end{multicols}}     \setlength\topmargin{2cm}     \setlength\oddsidemargin{2cm}     \setlength\textheight{200 mm}     \setlength\textwidth{17cm}     \setlength\headheight{3cm}     \setlength\headsep{2cm}     \begin{document}     some content     \end{document}      thanks


title: Align the length of two nodes inside a matrix

text: I wanted to create a node with vertical and horizontal parts. So after some searching I found that I can achieve this by using a matrix. I tried the code below:               \documentclass{article}     \usepackage{tikz,listings}     \usetikzlibrary{shapes.multipart,matrix}     \begin{document}     \begin{tikzpicture}[->, my shape/.style={     rectangle split, rectangle split parts=#1, draw, anchor=center}]          %transactional descriptor      \node[matrix, align=center, label=above:transactional descriptor] (up_part) at (7, 0) {             \node [my shape=4, rectangle split horizontal] (up_line) at (3, 0)              {\nodepart{one}\lstinline!start!\nodepart{two}\lstinline!readSet!\nodepart{three}               \lstinline!writeSet!\nodepart{four}\lstinline!commitTime!}; \\         };         \node[matrix, below of=up_part, node distance=0.5cm] (down_part)          {             \node [my shape=2, rectangle split horizontal] (down_line) at (3, 0)              {\nodepart{one}\lstinline!overwrittenVersions!\quad\nodepart{two}\lstinline!next!}; \\        };     \end{tikzpicture}          \end{document}      the problem is that the second node containing 2 parts has not the same width as the the node from above it, as you can see in the picture below: ![enter image description here](http://i.stack.imgur.com/48453.png) I tried using `minimum width` or `text width` but didn't work. Any ideas how to fix this?


title: \multirow and \bigstrut[b] not working together

text: \documentclass[]{article}     \usepackage{bigstrut}     \usepackage{multirow}     \usepackage{array}     \usepackage{tabularx}               \begin{document}              \newcolumntype{R}{>{\raggedleft\arraybackslash}X}              \begin{tabularx}{\linewidth}{X R}              Column 1 & Column 2 \\ \hline              1.1 & \multirow{2}[2]{*}{2a} \bigstrut[t] \\         1.2 &     \bigstrut[b] \\ \hline               1.3 & \multirow{3}[2]{*}{2b} \bigstrut[t] \\         1.4 &   \\         1.5 &   \bigstrut[b] \\ \hline              1.6 & 2c \bigstrut \\ \hline              \end{tabularx}          \end{document}      The output for this code I'm getting is: ![enter image description here](http://i.stack.imgur.com/eCphj.jpg) My question is: Notice how in the 1st two sections, viz. 2a and 2b, \bigstrut[b] is adding an extra amount of space when used in conjunction with \multirow. I checked some table tutorials online where they make use of this same construct, yet with no difficulty! Why is this happening?


title: tikz for DAG: give outline and background to labels that are out of the node?

text: I am using the `TikZ` and `tkz-berge` packages to create a direct acyclic graph. I've pasted my code below. I would like the variable labels "variable1", "variable2", etc to have an outline around them and a white background so they are easy to read over the arrows. Is there a way to do this? ( I would like to keep `LabelOut=true`)               \documentclass[]{article}     \usepackage{tikz}     \usepackage{tikz,fullpage}     \usetikzlibrary{arrows,%                     petri,%                     topaths}%     \usepackage{tkz-berge}     \usepackage[position=top]{subfig}     \usepackage{verbatim}     \begin{document}     \begin{figure}     \centering     \subfloat[]{     \begin{tikzpicture}[scale=0.75,transform shape]       \Vertex[x=2.221,y=2.379, LabelOut=true, Lpos=-90]{variable1}       \Vertex[x=-1.786,y=-2.495, LabelOut=true, Lpos=-90]{variable2}       \Vertex[x=-0.808,y=-0.482, LabelOut=true, Lpos=-90]{variable3}       \Vertex[x=1.834,y=-5.724, LabelOut=true, Lpos=-90]{variable4}       \Vertex[x=1.855,y=-1.202, LabelOut=true, Lpos=-90]{variable5}       \Vertex[x=2.820,y=5.684, LabelOut=true, Lpos=-90]{variable6}       \Vertex[x=-3.821,y=-0.308, LabelOut=true, Lpos=-90]{variable7}       \Vertex[x=-1.800,y=-5.955, LabelOut=true, Lpos=-90]{variable8}       \Vertex[x=-4.797,y=-4.289, LabelOut=true, Lpos=-90]{variable9}       \Vertex[x=5.243,y=3.474, LabelOut=true, Lpos=-90]{variable10}       \Vertex[x=4.377,y=-0.046, LabelOut=true, Lpos=-90]{variable11}       \Vertex[x=1.025,y=-3.360, LabelOut=true, Lpos=-90]{variable12}       \Vertex[x=-1.086,y=1.824, LabelOut=true, Lpos=-90]{variable13}       \Vertex[x=1.200,y=0.993, LabelOut=true, Lpos=-90]{variable14}     \tikzstyle{LabelStyle}=[fill=blue,sloped]     \tikzstyle{EdgeStyle}=[post]       \Edge[](variable3)(variable2)       \Edge[](variable4)(variable2)       \Edge[](variable4)(variable5)       \Edge[](variable5)(variable2)       \Edge[](variable5)(variable1)       \Edge[](variable1)(variable14)       \Edge[](variable6)(variable1)       \Edge[](variable7)(variable2)       \Edge[](variable7)(variable13)       \Edge[](variable8)(variable2)       \Edge[](variable9)(variable2)       \Edge[](variable10)(variable1)       \Edge[](variable11)(variable1)       \Edge[](variable11)(variable5)       \Edge[](variable12)(variable2)       \Edge[](variable12)(variable5)       \Edge[](variable13)(variable1)       \Edge[](variable14)(variable3)          \end{tikzpicture}     }          \end{figure}     \end{document}


title: "esint" integrals with default limits

text: When I'm trying to set a normal volume integral with the esint package, it will be generated with the limits set right to it: ![Default volume integral with esint](http://i.stack.imgur.com/SBrEU.png) A corresponding example code for this is               \documentclass{article}     \usepackage[intlimits]{amsmath}     \usepackage{esint}     \begin{document}       \[ \oiint_{O(V)} \]     \end{document}      What I'd like to archieve is something more like `\oiint\limits_{O(V)}` but without actually typing the limits-command as this should be the default behaviour in my document. The documentation provides no option similiar to the `intlimits` usable with `amsmath`. Until now I used a really dirty hack with `\re@DeclareMathSymbol`. Is there another way or maybe another package that could help me?


title: Bibliography : subdividing into sections

text: I would like to subdivide my bibliography into sections to let me distinguish the type of the references. How can I do this? Actually, I have a `.tex` and a `.bib` example file as follows:               \documentclass[11pt,a4paper]{book}     \usepackage[utf8]{inputenc}     \usepackage[francais]{babel}     \usepackage[T1]{fontenc}          \author{sk001}     \title{My title}               \begin{document}     J'ai inclu un ouvrage général \cite{book1}, et un ouvrage spécialisé \cite{book2}          \bibliography{bibliographie}     \bibliographystyle{alpha}          \end{document}      Ouvrages généraux               @book{     book1,      title="Premier document utilisé",     author="Auteur 1",     year="2013"     }      Ouvrages spéciaux               @book{     book2,     title="Deuxième document utilisé",     autor="Auteur 2",     year="1998"     }      How can I proceed?


title: biblatex: only use ibid in certain situations

text: `biblatex` has the option of using "ibid" in citations with the `authoryear- ibid` option. With this option activated, my pdf output contains both: **(I)** `(ibid.)`; and **(II)** `John (ibid)`. I would like to keep (I) but not (II) -- i.e., I would like `biblatex` to print `John (2000)` but not `John (ibid)`. Does anyone know how to do that? (Here is another way of formulating my question if you use `natbib=true`: can I activate the use of ibid with `\citep` but not with `\citet`?)


title: Formatting for body of \item in itemize/enumerate/description environment

text: What I am looking for is a way to specify some formatting, say italics, for the body of each `\item` in an itemize/enumerate/description environment, up front, without having to do it explicitly for each item. Moreover, I want no formatting for the Labels. This is what I want: ![enter image description here](http://i.stack.imgur.com/NDJeg.jpg) And here is my code sample:               \documentclass[]{article}     \usepackage{enumitem}               \begin{document}          \textit{\begin{itemize}[font=\normalfont]      \item[Label 1:] Item 1      \item[Label 2:] Item 2      \item[Label 3:] Item 3     \end{itemize}}          \end{document}      Is this a good way of doing it or is there a better way?


title: How to make LaTeX automatically call Inkscape to export figure to *.pdf_tex?

text: I'm working with Inkscape to update _all_ the figures of a book, using the PDF+LaTeX option to export the figures. Right now, every time I modify a figure I "save as..." both with Inkscape's *.svg and *.pdf (with the PDF+LaTeX option enabled). In the document the figure is included using:               \begin{figure}     \centering     \def\svgwidth{0.5\textwidth}     \input{my_figure.pdf_tex}     \end{figure}      This works fine, but having to save in both formats quickly gets annoying. I've read on the `svg-inkscape` documentation that "whenever the SVG file is updated, it is possible to have LATEX automatically call Inkscape to export the image to PDF and LATEX again. This simplifies the workflow (...)". The documentation says its possible, but I have not been able to implement it. ¿Is there a way to do it on OS X? I'm working with OSX 10.9.4, MacTeX 2014 and Inkscape 0.48, compiling with PDFLaTeX on both TexMaker or TexPad.


title: Introductory pages don't inherit plain pagestyle definitions

text: I'm compiling a report with custom headers and footers, using the `scrreprt` document class. I have redefined the headers and footers of the `plain` pagestyle through the `scrpage2` package, but the redefined style doesn't apply for the table of contents or anything before that (ref. the code below). How do I make my redefined `plain` pagestyle apply to the entire document?               \documentclass[11pt,b5paper,twoside,openright,parskip=full,abstract=true,BCOR=0.5cm]{scrreprt}     \usepackage[automark,headsepline,plainheadsepline]{scrpage2}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern,microtype}     \usepackage{parskip,titlesec}     \usepackage{xcolor}     \usepackage{lipsum}          \addtokomafont{disposition}{\rmfamily}     \KOMAoptions{numbers=noendperiod}          \ihead[]{\headmark}     \ohead[\pagemark]{\pagemark}     \ofoot[]{}     \setheadsepline{0.5pt}[\color{black!60!white}]     \renewcommand*{\chaptermarkformat}{\chapapp~\thechapter\autodot:\enskip}                    \begin{document}          \pagenumbering{roman}          \begin{abstract}     \thispagestyle{plain}     \noindent \lipsum[1-2]     \end{abstract}          \chapter*{Acknowledgments}     \lipsum[1-2]          \chapter*{Possibly another introductory chapter}     \lipsum[1-2]          \tableofcontents               \chapter{First chapter}     \pagenumbering{arabic}     \pagestyle{scrheadings}     \lipsum [1-3]               \section{Text train}     \lipsum[1-15]          \end{document}


title: Toggle visibility of solutions in LaTeX output for exams

text: So I have my own layout for my exams based on `scrartcl` and to prevent anomalies during some changes I want to have only one file per exam which holds both questions/excercises and solutions. Yet I would like to be able to set a variable etc. whichever method might be more convenient so that I can chose for one compilation whether solutions should be visible or not. What is the suggested approach for this?


title: Beamer Title Inside Node -- Line Break

text: I am creating my own `beamer` theme, and the way I have conceived the title page needs the title to be inside a `tikzpicture` node, in this form:                   \node [anchor=center] (title) at ($(box)+(0,.25)$) {%         \color{white}             {\usebeamerfont{title}\inserttitle}             };      It works perfectly until I need to insert long titles and need to break the lines... If I do:               \title[academic background \& research experience]       {Academic background \& \\ Research experience}      I get the error:                ! LaTeX Error: Something's wrong--perhaps a missing \item.      And if I do:               \usepackage{pbox}     \title[academic background \& research experience]       {\pbox{20cm}{Academic background \& \\ Research experience}}      I get the warning:                Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):      (hyperref) removing `\pbox '      Does anybody know what is happening here? EDIT: Please find a MWE below (I have the relevant lines in a `.sty` file, but adding them inside `\mode<presentation>{}` works as well)               \documentclass[ignorenonframetext]{beamer}               \mode<presentation> {         \usetheme{Berkeley}         \usecolortheme{albatross}              %PACKAGES, LIBRARIES AND ENVIRONMENTS HERE          \usepackage{tikz}         \usetikzlibrary{calc}               \title[academic background \& research experience]{Academic background \& Research experience}              \author{Name Surname}         \date[\today]{\today}              \setbeamertemplate{title page}{              \begin{tikzpicture}[remember picture,overlay, every node/.style={inner sep=0,outer sep=0}]             \node [rectangle, fill=gray, anchor=north east, minimum width=.86\paperwidth, minimum height=3cm] (box) at (current page.north east){};                       \node [anchor=center] (title) at ($(box)+(0,.25)$) {%             \color{white}                 {\usebeamerfont{title}\inserttitle}                 };                      \ifx\insertauthor\@empty             \else             \node [anchor=west] (author) at ($(title.south west)-(0,.5)$) {%             \color{white}                 {\usebeamerfont{author}\insertauthor}                 };                 \fi                      \ifx\insertdate\@empty             \else             \node [anchor=west] (date) at ($(title.south west)-(-.2,2)$) {%             \color{blue}                 {\usebeamerfont{date}\insertdate}                 };                 \fi         \end{tikzpicture}         }     }               \begin{document}               \begin{frame}[plain]     %\frametitle{SCB Departmental WIP - July 2013}     \titlepage % Print the title page as the first slide     \end{frame}               \end{document}