% % LaTeX2e Preamble / Ross Duncan 2011 % %------------------------------------------------------- % TODO 27/1/2011 % 1. Something for tikz % 2. Font alternatives? % 3. Which journals clash with which bits? % 4. No support for logic -- proof trees linear logic symbols etc % 5. Use switches to turn on/off some parts %------------------------------------------------------- \usepackage{color} \newcommand{\dzxc}{\texttt{DZXC}\xspace} %%%%%%%%%%%%%%%% KILL MESS SWITCH %%%%%%%%%%%%%%%% %1) No mess %\def\bR{\begin{color}{black}} %\def\bB{\begin{color}{black}} %\def\bM{\begin{color}{black}} %\def\bC{\begin{color}{black}} %\def\bW{\begin{color}{black}} %\def\bBl{\begin{color}{black}} %\def\bG{\begin{color}{black}} %\def\bY{\begin{color}{black}} % %\newcommand{\TODOb}[1]{} %\newcommand{\oldt}[1]{#1} %\newcommand{\newt}[1]{#1} % %\newcommand{\KILL}[1]{} % %\newcommand{\azx}{\dzxc} %2) Mess: \def\bR{\begin{color}{red}} \def\bB{\begin{color}{blue}} \def\bM{\begin{color}{magenta}} \def\bC{\begin{color}{cyan}} \def\bW{\begin{color}{white}} \def\bBl{\begin{color}{black}} \def\bG{\begin{color}{green}} \def\bY{\begin{color}{yellow}} \newcommand{\TODOb}[1]{\marginpar{\scriptsize\bB \textbf{TODO:} #1\e}} \newcommand{\oldt}[1]{{\color{blue} #1}} \newcommand{\newt}[1]{{\color{blue!50!red} #1}} \newcommand{\KILL}[1]{#1} \newcommand{\azx}{\texttt{\bfseries\color{red!70!black}[do you mean \textbackslash dzxc?]}\xspace} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\e{\end{color}\xspace} % typographical improvements \usepackage[T1]{fontenc} \usepackage{lmodern} %\usepackage{tgpagella} % \usepackage{tgheros} % \renewcommand*\familydefault{\sfdefault} %% EPSRC wants sans-serif \usepackage{fixltx2e} \usepackage{microtype} %\usepackage[stretch=10]{microtype} % more conservative %\usepackage[expansion=false]{microtype} % still more conservative \usepackage{xspace} \usepackage{multicol} \usepackage{eurosym} % make figs a bit nicer \newcommand{\figureline}{\rule{\textwidth}{0.5pt}} \newcommand{\figureend}{\rule{\textwidth}{0.5pt}} % do The Right Thing \makeatletter \newcommand\etc{etc\@ifnextchar.{}{.\@}\xspace} \newcommand\ie{i.e.\@\xspace} % these two may be broken \newcommand\eg{e.g.\@\xspace} \makeatother \newcommand\dr{Dr.\!~} \newcommand\mr{Mr.\!~} \newcommand\prof{Prof.\!~} %%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Include graphics in a nice way %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{graphicx} %%%% Use these commands to insert graphics into %%%% the text and have them line up properly. %%% - inlinegraphic requires absolute size to be given %%% - ninlinegraphic uses optional scaling factor %%%% first param is the desired height of the graphic %%%% if it is less the 1ex, it might not look good \newcommand{\inlinegraphic}[2]{ %% todo -- make this thing calculate the height %% itself based on a global scaling factor \dimendef\grafheight=255\dimendef\grafvshift=254 \grafheight=#1 \grafvshift=-0.5\grafheight \advance\grafvshift by 0.5ex \raisebox{\grafvshift}{\includegraphics[height=\grafheight]{images/#2}\xspace} } %%% optional first arg is scaling factor \newcommand{\ninlinegraphic}[2][1.0]{ \dimendef\grafheight=255\dimendef\grafvshift=254 \setbox0 = \hbox{\scalebox{#1}{\includegraphics{images/#2}}} \grafheight=\the\ht0 \grafvshift=-0.5\grafheight \advance\grafvshift by 0.5ex \raisebox{\grafvshift}{\includegraphics[height=\grafheight]{images/#2}\xspace} } \newcommand{\inline}[1]{ \raisebox{0.5ex}{\;#1\;} } \newcommand{\cfig}[1]{ \resizebox{\columnwidth}{!}{\ninlinegraphic{#1}} } %% first arg is optional scaling factor \newcommand{\cgraph}[2][1.0]{% \begin{center} \includegraphics[width=#1\textwidth]{images/#2} \end{center} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Mathematical packages and theorems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{latexsym} \usepackage{amssymb} \usepackage{amsmath} % can collide with some journals \usepackage{stmaryrd} \usepackage{mathtools} %%% not needed if amsmath loaded % \newcommand{\text}[1]{\ensuremath{\mbox{#1}}} %%% Defining theorems and friends usually makes problems for journal %%% styles \usepackage{amsthm} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition}\newtheorem{example}[theorem]{Example} \theoremstyle{definition}\newtheorem{examples}[theorem]{Examples} \theoremstyle{definition}\newtheorem{definition}[theorem]{Definition} \theoremstyle{definition}\newtheorem{definitions}[theorem]{Definitions} \theoremstyle{definition}\newtheorem{remark}[theorem]{Remark} \theoremstyle{definition}\newtheorem{remarks}[theorem]{Remarks} \newtheorem{notation}[theorem]{Notation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % General Mathematics shorthands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % aliases \newcommand{\infinity}{\infty} \newcommand{\iso}{\cong} \newcommand{\isomorphism}{\cong} \newcommand{\vd}{\ensuremath{\vdash}} % = turnstyle \newcommand{\dom}{\operatorname{dom}} \newcommand{\cod}{\operatorname{cod}} \newcommand{\Tr}{\operatorname{Tr}} \newcommand{\denote}[1]{% --``semantic'' brakets \llbracket #1 \rrbracket} \newcommand{\name}[1]{%--- name / coname \ulcorner #1 \urcorner} \newcommand{\coname}[1]{% \llcorner #1 \lrcorner} \newcommand{\sizeof}[1]{% \sizeof{x} == |x| \left|#1\right|} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Quantum Notations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\bra}[1]{% dirac 'bra' \ensuremath{\left\langle #1 \right|}\xspace} \newcommand{\ket}[1]{% dirac 'ket' \ensuremath{\left| #1 \right\rangle}\xspace} \newcommand{\innp}[2]{% dirac style inner product \ensuremath{\langle #1 \mid #2 \rangle}} \newcommand{\outp}[2]{% dirac style outer product \ensuremath{\left|\left. #1 \rangle\right.\langle\left. #2 \right|\right. }} \newcommand{\norm}[1]{% define command to get spacing right \ensuremath{\left| #1 \right| }} % aliases for circuits \newcommand{\CZ}{\ensuremath{\wedge Z}\xspace} \newcommand{\CX}{\ensuremath{\wedge X}\xspace} \newcommand{\CNot}{\CX} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Time to define some category theory stuff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\usepackage{diagrams} % remember to give shout-out to Paul Taylor %\newarrow{Equals}{}{=}{}{=}{} % Objects of ??? \newcommand{\OBJ}[1]{\ensuremath{\mathrm{Obj}_{#1}}} % Objects of {\cal ??} \newcommand{\OBJC}[1]{\ensuremath{\mathrm{Obj}_{{\cal #1}}}} % Arrows of ??? \newcommand{\ARR}[1]{\ensuremath{\mathrm{Arr}_{#1}}} % Arrows of {\cal ??} \newcommand{\ARRC}[1]{\ensuremath{\mathrm{Arr}_{{\cal #1}}}} % sub scripted identity morphisms \ifx\numericids\undefined \newcommand{\id}[1]{\ensuremath{\mathrm{id}_{#1}}} \else \newcommand{\id}[1]{\ensuremath{1_{#1}}} \fi % Caligraphic category names \newcommand{\catA}{\ensuremath{{\cal A}}\xspace} \newcommand{\catB}{\ensuremath{{\cal B}}\xspace} \newcommand{\catC}{\ensuremath{{\cal C}}\xspace} \newcommand{\catD}{\ensuremath{{\cal D}}\xspace} \newcommand{\catE}{\ensuremath{{\cal E}}\xspace} \newcommand{\catF}{\ensuremath{{\cal F}}\xspace} \newcommand{\catG}{\ensuremath{{\cal G}}\xspace} \newcommand{\catH}{\ensuremath{{\cal H}}\xspace} \newcommand{\catP}{\ensuremath{{\cal P}}\xspace} \newcommand{\catQ}{\ensuremath{{\cal Q}}\xspace} % Boldified names of useful categories (and some less useful!) % \newcommand{\vectfd}[1]{% category of f.d. vector spaces over some field \ensuremath{\mathbf{Vect}^{\mathrm{fd}}_{#1}}\xspace} \newcommand{\vectfdc}{% category of f.d. vector spaces over complexes \vectfd{\mathbb{C}}} \newcommand{\catRel}{% the category of sets and relations \ensuremath{\mathbf{Rel}}\xspace} \newcommand{\catSet}{% the category of sets and functions \ensuremath{\mathbf{Set}}\xspace} \newcommand{\catCat}{% the category of (small) categories \ensuremath{\mathbf{Cat}}\xspace} \newcommand{\catInvCat}{% the category of involutive categories \ensuremath{\mathbf{InvCat}}\xspace} \newcommand{\catComCl}{% the category of compact closed categories \ensuremath{\mathbf{ComCl}}\xspace} \newcommand{\catSComCl}{% the category of strongly compact closed categories \ensuremath{\mathbf{SComCl}}\xspace} \newcommand{\catGrph}{% the category of graphs \ensuremath{\mathbf{Grph}}\xspace} \newcommand{\qubit}{% the category of qubits \ensuremath{\mathbf{Qubit}}\xspace} \newcommand{\fdhilb}{% the category of finite dimensional hilbert space \ensuremath{\mathbf{fdHilb}}\xspace} \newcommand{\fdHilb}{\fdhilb} \newcommand{\catInvCom}{% the category of involutive categories \ensuremath{\mathbf{InvCom}}\xspace} \newcommand{\catCom}{% the category of compact closed categories \ensuremath{\mathbf{Com}}\xspace} \newcommand{\superop}{% the category of superoperators \ensuremath{\mathbf{SuperOp}}\xspace} %%%%% some game semantics notations \newcommand{\prefix}{\sqsubseteq} \newcommand{\restrict}{\upharpoonright} \newcommand{\PP}{\ensuremath{\mathsf{P}}\xspace} \newcommand{\OO}{\ensuremath{\mathsf{O}}\xspace} \newcommand{\Ag}{\catA} \newcommand{\GG}{\catG} \newcommand{\GL}{\ensuremath{{\GG_L}}\xspace} \newcommand{\GNL}{\ensuremath{{\GG_{NL}}}\xspace} %%----------------------------------------------------- %% TODO HERE --- TIKZ STUFF %%----------------------------------------------------- \usepackage{tikz} \usetikzlibrary{shapes,arrows} \usepackage{tikzquanto} \tikzstyle{every loop}=[] %\input{tikz/cnot.tex} \usepackage{tikzfig} \input{tikzstyles.tex} \tikzstyle{annote}=[blue,thick] \newcommand{\zx}{\textsc{zx}\xspace} \newcommand{\zxcalculus}{\textsc{zx}-calculus\xspace} \newcommand{\liquid}{\texttt{\bfseries\color{red!70!black}[do you mean \textbackslash Qsharp?]}\xspace} \newcommand{\Qsharp}{Q\texttt\#\xspace} \newcommand{\tket}{\ensuremath{\mathsf{t}|\mathsf{ket}\rangle}\xspace} \newcommand{\benREM}[1]{\texttt{\bfseries\color{red!70!black} [{#1}]}\xspace} \usepackage{pgfgantt} %%%% hyperref wants to be last \usepackage{hyperref} %%% Local Variables: %%% mode: latex %%% TeX-master: "PREPROP" %%% End: