bachelor_thesis/latex/hirostyle.sty
2020-04-16 18:37:37 +02:00

120 lines
3 KiB
TeX

\ProvidesPackage{hirostyle}
\usepackage[utf8]{inputenc} % load early
\usepackage[T1]{fontenc}
% load early
\usepackage[english]{babel}
\usepackage[autostyle=true]{csquotes}
\usepackage{newpxtext,newpxmath}
\KOMAoptions{DIV=last}
\usepackage{physics}
\usepackage{graphicx, booktabs, float, scrhack}
\usepackage{mathtools,amssymb}
\usepackage[automark]{scrlayer-scrpage}
\usepackage[backend=biber, language=english, style=phys]{biblatex}
\usepackage{siunitx}
\usepackage[pdfencoding=auto]{hyperref} % load late
% \usepackage[activate={true,nocompatibility},final,tracking=true,spacing=true,factor=1100,stretch=10,shrink=10]{microtype}
\usepackage{caption}
\usepackage[list=true, font=small,
labelformat=brace, position=top]{subcaption}
\usepackage{tikz}
\usepackage{tikz-feynman}
\usepackage{wrapfig}
\usepackage{slashed}
\usepackage{minted}
\usepackage{pgfplots}
\usepackage{ifdraft}
\usepackage{microtype}
%% use the current pgfplots
\pgfplotsset{compat=1.16}
%% minted
\usemintedstyle{colorful}
\newmintedfile{yaml}{linenos,mathescape=true,fontsize=\small}
\newmintedfile{python}{linenos,mathescape=true,fontsize=\small,breaklines=true}
\newmintedfile{cpp}{linenos,mathescape=true,fontsize=\small,breaklines=true}
%% fix p slash
\declareslashed{}{/}{0}{.15}{p}
%% Tikz
\usetikzlibrary{arrows,shapes,angles,quotes,arrows.meta,external}
\tikzexternalize[prefix=tikz/]
%% Including plots
\newcommand{\plot}[1]{\ifdraft{\includegraphics[draft=false]{./figs/#1.pdf}}{\input{./figs/#1.pgf}}}
%% Including Results
\newcommand{\result}[1]{\input{./results/#1}}
%% SI units
\sisetup{separate-uncertainty = true}
%% Hyperref
\hypersetup{
colorlinks,
linkcolor={blue!50!black},
citecolor={red!50!black},
urlcolor={green!80!black}
}
%% Captions
\captionsetup{justification=centering}
%% Labels
\labelformat{chapter}{chapter~#1}
\labelformat{section}{section~#1}
\labelformat{figure}{figure~#1}
\labelformat{table}{table~#1}
% Macros
%% qqgg
\newcommand{\qqgg}[0]{q\bar{q}\rightarrow\gamma\gamma}
%% Impulses and Polarization Vectors convenience
\DeclareMathOperator{\ps}{\slashed{p}}
\DeclareMathOperator{\pe}{\varepsilon}
\DeclareMathOperator{\pes}{\slashed{\pe}}
\DeclareMathOperator{\pse}{\varepsilon^{*}}
\DeclareMathOperator{\pses}{\slashed{\pe}^{*}}
%% Spinor convenience
\DeclareMathOperator{\us}{u}
\DeclareMathOperator{\usb}{\bar{u}}
\DeclareMathOperator{\vs}{v}
\DeclareMathOperator*{\vsb}{\overline{v}}
%% Center of Mass energy
\DeclareMathOperator{\ecm}{E_{\text{CM}}}
%% area hyperbolicus
\DeclareMathOperator{\artanh}{artanh}
%% Fast Slash
\let\sl\slashed
%% Notes on Equations
\newcommand{\shorteqnote}[1]{ & & \text{\small\llap{#1}}}
%% Typewriter Macros
\newcommand{\sherpa}{\texttt{Sherpa}}
\newcommand{\rivet}{\texttt{Rivet}}
\newcommand{\vegas}{\texttt{VEGAS}}
%% Expected Value and Variance
\newcommand{\EX}[1]{\operatorname{E}\qty[#1]}
\newcommand{\VAR}[1]{\operatorname{VAR}\qty[#1]}
%% Uppercase Rho
\newcommand{\Rho}{P}
%% Transverse Momentum
\newcommand{\pt}[0]{p_\mathrm{T}}
%% Sign Function
\DeclareMathOperator{\sign}{sgn}