Skip to content

Instantly share code, notes, and snippets.

@global-anomaly
Last active October 19, 2024 11:20
Show Gist options
  • Save global-anomaly/9941c182a5eb1896546df7565707852a to your computer and use it in GitHub Desktop.
Save global-anomaly/9941c182a5eb1896546df7565707852a to your computer and use it in GitHub Desktop.
LaTeX preamble
%% thefermion-preamble.sty
%% Riasat Sheikh
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{thefermion-preamble}[2024/10/15 v.0.5]
% Option handling
\newif\ifnotes % Define a conditional flag
\DeclareOption{notes}{
\notestrue
}
\DeclareOption*{} % Default for unrecognized options
\ProcessOptions\relax
\usepackage{newtxtext} % Times-like fonts with math support
% AMS math and physics packages
\PassOptionsToPackage{tbtags}{amsmath}
\usepackage{mathtools,physics}
\ifnotes
% jheppub conflicting packages disabled when notes option is active
\usepackage{jheppub} % Load jheppub when notes option is used
\gdef\@fpheader{Notes of Riasat Sheikh}
\toccontinuoustrue
\else
% Geometry and fonts
\usepackage[a4paper, total={6.5in, 10in}]{geometry}
\usepackage{newtxtext, newtxmath}
% defining the author section
\usepackage{authblk}
% Bibliography and referencing
\usepackage[numbers,sort&compress]{natbib}
% Hyperlink colors
\usepackage[colorlinks=true
,urlcolor=blue
,anchorcolor=blue
,citecolor=blue
,filecolor=blue
,linkcolor=blue
,menucolor=blue
,linktocpage=true
,pdfa=true
,unicode=true
,psdextra
]{hyperref}
% Question counters
\newcounter{questioncounter}
\newcounter{equestioncounter}
% Line spacing and indentation
\renewcommand{\baselinestretch}{1.2}\normalsize
\setlength\parindent{1.2\parindent}
\fi
% Clever referencing
\usepackage{cleveref}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment