summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/notestex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/notestex')
-rw-r--r--macros/latex/contrib/notestex/README.md29
-rw-r--r--macros/latex/contrib/notestex/doc/NotesTeX.pdfbin0 -> 571685 bytes
-rw-r--r--macros/latex/contrib/notestex/doc/NotesTeX.tex436
-rw-r--r--macros/latex/contrib/notestex/tex/NotesTeX.sty751
4 files changed, 1216 insertions, 0 deletions
diff --git a/macros/latex/contrib/notestex/README.md b/macros/latex/contrib/notestex/README.md
new file mode 100644
index 0000000000..b75f5ab33a
--- /dev/null
+++ b/macros/latex/contrib/notestex/README.md
@@ -0,0 +1,29 @@
+README for NotesTeX
+
+NotesTeX v1.0.
+Created by Aditya Dhumuntarao.
+Updated September 22, 2017.
+
+E-mail comments and suggestions to adhumunt@gmail.com.
+
+This material is subject to the LaTeX Project Public License.
+See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
+the details of that license.
+
+
+NotesTeX
+---
+An All-In-One LaTeX Notes Package For Students.
+---
+NotesTeX is a modification of the original Jhep journal format in order to suit the needs of students in university. The NotesTeX package offers the following
+
+* Several mathematics and physics packages.
+* Margins and margin environments for tables, figures, and asides.
+* \TeX\ shortcuts for various math scripts namely vector bold math, *mathbb*, *mathfrak*, and *mathcal*.
+* *amsthm* integrations and special environments for theorems, lemmas, proofs, definitions, examples, and remarks.
+* Stylized support for the *part* environment.
+* A fullpage environment that spans across the text width and the margin for longer equations and horizontal figures.
+
+The goal of this package was to make notetaking easier for students and offer easy support for marginnotes along with a reliable and legible formatting structure.
+
+More information can be found at the Github linked here. \ No newline at end of file
diff --git a/macros/latex/contrib/notestex/doc/NotesTeX.pdf b/macros/latex/contrib/notestex/doc/NotesTeX.pdf
new file mode 100644
index 0000000000..454ed92656
--- /dev/null
+++ b/macros/latex/contrib/notestex/doc/NotesTeX.pdf
Binary files differ
diff --git a/macros/latex/contrib/notestex/doc/NotesTeX.tex b/macros/latex/contrib/notestex/doc/NotesTeX.tex
new file mode 100644
index 0000000000..4b1b995054
--- /dev/null
+++ b/macros/latex/contrib/notestex/doc/NotesTeX.tex
@@ -0,0 +1,436 @@
+\documentclass[10pt]{article}
+\pdfoutput=1
+\usepackage{../tex/NotesTeX}
+
+%\usepackage{showframe}
+
+\title{\begin{center}{\Huge \textit{NotesTeX}}\\{{\itshape An All-In-One Notes Package For Students}}\end{center}}
+\author{Aditya Dhumuntarao\footnote{\href{https://geodesick.com/}{\textit{My Personal Website}}}}
+
+
+\affiliation{
+DAMTP, University of Cambridge\\
+Perimeter Institute of Theoretical Physics\\
+University of Minnesota
+}
+
+\emailAdd{adhumunt@gmail.com}
+
+\begin{document}
+ \maketitle
+ \flushbottom
+ \newpage
+ \pagestyle{fancynotes}
+ \part{Introduction}
+ \section{Motivation}\label{sec:motivation}
+ \begin{margintable}\vspace{.8in}\footnotesize
+ \begin{tabularx}{\marginparwidth}{|X}
+ Section~\ref{sec:motivation}. Motivation\\
+ Section~\ref{sec:reqpackages}. Required Packages\\
+ Section~\ref{sec:license}. Margins\\
+ \end{tabularx}
+ \end{margintable}
+ During my year as a Part III student at Cambridge, I realized that my theoretical physics professors, namely David Tong and David Skinner, would use the \texttt{jhep} format to typeset the notes for their classes. As the year went on, I started typesetting my personal notes during class and realized that the \texttt{jhep} format, while great for publications and lecture notes in general, was lacking a few small but useful features.
+
+ I came across James P. Sethna's wonderful text on statistical mechanics, published by the Oxford University Press, and loved the formatting of the OUP. Sadly the OUP does not have a publicly released LaTeX .sty file for their content, and while the Memoir class and the Tufte style packages provide extensive functionality, I needed something slightly different and a package that was more readily modifiable. Enter \textit{NotesTeX}.
+
+ The result of this year long work, from 2016-2017, is the package now known as \textit{NotesTeX.} The purpose of this package was to consolidate all these changes that I slowly incorporated into the original \texttt{jhep} format, and to provide stable support for commonly used physics and mathematics environments. I sincerely hope that you enjoy the package!
+
+
+ \section{Required Packages}\label{sec:reqpackages}
+ For \textit{NotesTeX,} the following packages are required
+ \begin{center}
+ \texttt{marginnote, sidenotes, fancyhdr, titlesec, geometry, and tcolorbox.}
+ \end{center}
+ The roles of each of these packages will be discussed in Part~\ref{Part:Modification}. However, for a brief summary, the \texttt{marginnote}, \texttt{sidenote}, \texttt{titlesec}, and \texttt{tcolorbox} packages are used in creating the \texttt{$\backslash$part} environment, the package \texttt{geometry} is used globally to set the page width, page height, and margin width, and finally, \texttt{fancyhdr}, which is overridden on the title page, the contents page, and the \texttt{$\backslash$part} page, sets the header for the body.
+
+ \section{License}\label{sec:license}
+ Aditya Dhumuntarao does not own the copyright to the original package, \texttt{jheppub.sty}. All modification have been approved by the Jhep Editorial committee, and permission has been attributed to Aditya to distribute freely the modified version of \texttt{jheppub.sty}, known as \texttt{NotesTeX.sty}.
+
+ This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is found \href{http://www.latex-project.org/lppl.txt}{here}, and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. The current maintainer of this work is Aditya Dhumuntarao.\footnote{Please contact me at my email if you have any questions or comments.}
+
+ \newpage
+
+ \part{Modifications}\label{Part:Modification}
+ \section{Features}\label{sec:Features}
+ \begin{margintable}\vspace{1.4in}\footnotesize
+ \begin{tabularx}{\marginparwidth}{|X}
+ Section~\ref{sec:Features}. Features\\
+ Section~\ref{sec:incpackage}. Included Packages\\
+ Section~\ref{Sec:Margins}. Margins\\
+ Section~\ref{sec:shortcuts}. Shortcuts\\
+ Section~\ref{Sub:Special}. \texttt{amsthm} Environments\\
+ Section~\ref{sec:part}. Part Environment\\
+ Section~\ref{Sec: Fullpage}. Fullpage Environment\\
+ \end{tabularx}
+ \caption{Contents for \textsc{Part II}}
+ \end{margintable}
+ While \textit{NotesTeX}\footnote{Affectionately called \textit{NoTeX}.} inherits most of the \texttt{jhep} formatting for sections, subsections, subsubsections, title page, contents page, and bibliography presets, there are significant departures from the original format and underlying features. The central focus of this package was to expand the use of the margin in order to include; simple marginnotes, numbered side--notes, marginfigures, and margintables. The secondary motivation was to include a list of preloaded packages that any physics or mathematics students would require while type--setting notes. Lastly, there are a few stylistic improvements that allow for better readability.\\
+
+ \noindent \textit{NotesTeX} includes the following:
+ \begin{enumerate}
+ \item Several mathematics and physics packages.
+ \item Margins and margin environments for tables, figures, and asides.
+ \item \TeX\ shortcuts for various math scripts namely vector bold math, \texttt{mathbb}, \texttt{mathfrak}, and \texttt{mathcal}.
+ \item \texttt{amsthm} integrations and special environments for theorems, lemmas, proofs, definitions, examples, and remarks.\
+ \item Stylized support for the \texttt{part} environment.
+ \item A fullpage environment that spans across the text width and the margin for longer equations and horizontal figures.
+ \end{enumerate}
+ Each of these will be discussed in the following subsections.
+
+ \section{Included Packages} % (fold)
+ \label{sec:incpackage}
+ Additional package are listed right under the required packages in \texttt{NotesTeX.sty}. These are divided into font styling packages and mathematical and physics related packages. The list of packages are also reiterated here and their links are in the sidenotes.
+ \begin{verbatim}
+ \usepackage[T1]{fontenc} % Font Styling
+ \usepackage{lmodern,mathrsfs}
+ \end{verbatim}
+ \begin{margintable}\footnotesize
+ \begin{tabularx}{\marginparwidth}{|X}
+ \href{https://www.ctan.org/pkg/fontenc}{fontenc}\\
+ \href{https://www.ctan.org/pkg/mathrsfs}{mathrsfs}\\
+ \href{https://www.ctan.org/pkg/enumitem}{enumitem}\\
+ \href{https://www.ctan.org/pkg/mathtools}{mathtools}\\
+ \href{https://www.ctan.org/pkg/amsfonts}{amsfonts}\\
+ \href{https://www.ctan.org/pkg/amsthm}{amsthm}\\
+ \href{https://www.ctan.org/pkg/bm}{bm}\\
+ \href{https://www.ctan.org/pkg/array}{array}\\
+ \href{https://www.ctan.org/pkg/tabularx}{tabularx}\\
+ \href{https://www.ctan.org/pkg/booktabs}{booktabs}\\
+ \href{https://www.ctan.org/pkg/graphicx}{graphicx}\\
+ \href{https://www.ctan.org/pkg/float}{float}\\
+ \href{https://www.ctan.org/pkg/caption}{caption}\\
+ \href{https://www.ctan.org/pkg/setspace}{setspace}\\
+ \href{https://www.ctan.org/pkg/multicol}{multicol}\\
+ \href{https://www.ctan.org/topic/pgf-tikz}{tikz}\\
+ \href{https://www.ctan.org/pkg/physics}{physics}\\
+ \href{https://www.ctan.org/pkg/cancel}{cancel}
+ \end{tabularx}
+ \caption{Links}
+ \end{margintable}
+ \begin{verbatim}
+ \usepackage[shortlabels]{enumitem} % Enumitem Options
+ \usepackage{mathtools,amssymb,amsfonts,amsthm,bm} % Math Presets
+ \usepackage{array,tabularx,booktabs} % Table Presets
+ \usepackage{graphicx,wrapfig,float,caption} % Figure Presets
+ \usepackage{setspace,multicol} % Text Presets
+ \usepackage{tikz,physics,cancel} % Physics Presets
+ \end{verbatim}
+
+ % section prepackage (end)
+
+
+ \newpage
+
+
+ \section{Margins}\label{Sec:Margins}%
+ \textit{NotesTeX} inherits all the margin commands that are used by \texttt{sidenote} and \texttt{marginnote}, and two additional pre-configured commands known as \texttt{$\backslash$mn} and \texttt{$\backslash$sn}. The relevant commands, and the packages they belong to, are
+ \begin{center}
+ \begin{multicols}{2}
+ \noindent\texttt{$\backslash$marginfigure~[sidenote]\\
+ $\backslash$sidenote~[sidenote]\\
+ $\backslash$marginnote~[marginnote]\\
+ $\backslash$margintable~[sidenote]\\
+ $\backslash$sn~[NotesTeX]\\
+ $\backslash$mn~[NotesTeX]\\
+ }
+ \end{multicols}
+ \end{center}
+ The implementation of each of these is as follows.
+ \begin{enumerate}
+ \item \texttt{Marginnote:} This is how a \texttt{$\backslash$marginnote\{...\}} behaves.\marginnote{Not numbered, 10pt.}
+ \item \texttt{Mn:} This is how a \texttt{$\backslash$mn\{...\}} behaves.\mn{Numbered, footnotesize.}
+ \item \texttt{Sidenote:} This is how a \texttt{$\backslash$sidenote\{...\}} behaves.\sidenote{Numbered, 10pt.}
+ \item \texttt{Sn:} This is how a \texttt{$\backslash$sn\{...\}} behaves.\sn{Numbered, footnotesize.}
+ \item \texttt{Marginfigure:} This environment requires the \texttt{$\backslash$begin\{marginfigure\}} {$\cdots$}\newline\texttt{$\backslash$end\{marginfigure\}} enclosings. The \texttt{caption} package is needed to caption the figure.
+ \begin{marginfigure}
+ \begin{center}
+ \begin{tikzpicture}
+ \draw[black,thick] (-1,-1) -- (-.06,-.06);
+ \draw[black,thick] (.06,.06) -- (1,1);
+ \draw[black,thick] (-1,1) -- (1,-1);
+ \filldraw[black] (-1,-1) circle (2pt) node[anchor=north] {2};
+ \filldraw[black] (-1,1) circle (2pt) node[anchor=south] {1};
+ \filldraw[black] (1,-1) circle (2pt) node[anchor=north] {3};
+ \filldraw[black] (1,1) circle (2pt) node[anchor=south] {4};
+ \end{tikzpicture}
+ \end{center}
+ \caption{Marginfigure: Tikz}
+ \end{marginfigure}%
+ \item \texttt{Margintable:} This environment requires the \texttt{$\backslash$begin\{margintable\}} {$\cdots$}\newline\texttt{$\backslash$end\{margintable\}} enclosings. A table package, such as \texttt{tabular}, \texttt{tabulary}, \texttt{tabu}, or \texttt{tabularx} is required. The \texttt{caption} package is needed to caption the table.
+ \begin{margintable}
+ \vspace{.1in}
+ \begin{tabularx}{\marginparwidth}{|X|X|}
+ \hline
+ \textit{NotesTeX} & \textbf{rocks!}\\
+ \hline
+ \end{tabularx}
+ \caption{Margintable}
+ \end{margintable}
+ \end{enumerate}
+ \subsection{Why use both \texttt{marginnotes} and \texttt{sidenotes}?}
+ Quite simply, \texttt{marginnotes} overlap each other if they are too close. This means that figures, and tables can overlap by just using \texttt{marginnotes}. This is why \texttt{sidenotes} is so useful as it not only numbers all side notes, but also dynamically aligns all side notes, figures, and tables.
+
+ So clearly, \texttt{sidenotes} must be better right? There are a few places where \texttt{sidenotes} fails too however. For instance, \texttt{sidenotes} cannot be used in equations, \texttt{multicols}, and with the \texttt{tcolorbox}\sn{See \ref{Sub:Special} and \ref{Sec: Fullpage} for more details.} environment. As the majority of the special environments from \texttt{amsthm} are modified to use \texttt{tcolorbox}, \texttt{marginnotes} becomes an essential part of \textit{NotesTeX}.
+
+ \newpage
+
+ \section{\TeX\ Shortcuts}\label{sec:shortcuts}
+ \textit{NotesTeX} comes built in with a minimal set of keyboard shortcuts for a few special characters. All of these shortcuts can be found in \texttt{NotesTeX.sty} just under
+ \begin{verbatim}
+ % ----------------------------------------------------------------------
+ % User Created Commands
+ % ----------------------------------------------------------------------
+ ...
+ \end{verbatim}
+ If one has their own macros,\sidenote{\footnotesize Most people have their own shortcuts for commonly used mathematics, such as derivatives or integrals. For those looking for some physics shortcuts, the \textbf{supremely excellent} physics package (automatically included in \textit{NotesTeX}) has possible everything that one can imagine.} then simply add it under this area.
+
+ \subsection{Available Shortcuts}
+ To keep things light, \textit{NotesTeX} offers the following simplifications/shortcuts to the mathematics dictionary.
+ \begin{enumerate}
+ \item Vector Bold Math: The shortcut \texttt{\{$\backslash$bf $\cdot$\}} $\longrightarrow$ \texttt{$\backslash$bf$\cdot$} creates boldface text. For example, \texttt{\{$\backslash$bf a\}} becomes \texttt{$\backslash$bfa} producing the output \bfa. This works for both upper and lower case alphabet.
+ \item \texttt{Mathfrak:} The \texttt{$\backslash$mathfrak} environment is quite similar to the Vector Bold Math in the shortcut argument, \texttt{$\backslash$mathfrak\{$\cdot$\}} $\longrightarrow$ \texttt{$\backslash$mf$\cdot$}. This works for both upper and lower case producing
+ \begin{center}
+ $\mfa\mfb\mfc\mfd\mfe\mff\mfg\mfh\mfi\mfj\mfk\mfl\mfm\mfn\mfo\mfp\mfq\mfr\mfs\mft\mfu\mfv\mfw\mfx\mfy\mfz$\\
+ $\mfA\mfB\mfC\mfD\mfE\mfF\mfG\mfH\mfI\mfJ\mfK\mfL\mfM\mfN\mfO\mfP\mfQ\mfR\mfS\mfT\mfU\mfV\mfW\mfX\mfY\mfZ$
+ \end{center}
+ \item \texttt{Mathbb}: All \texttt{$\backslash$mathbb\{$\cdot$\}} objects are turned into \texttt{$\backslash$bb\{$\cdot$\}}. This only works for uppercase alphabet.
+ \begin{equation*}
+ \bbA\bbB\bbC\bbD\bbE\bbF\bbG\bbH\bbI\bbJ\bbK\bbL\bbM\bbN\bbO\bbP\bbQ\bbR\bbS\bbT\bbU\bbV\bbW\bbX\bbY\bbZ
+ \end{equation*}
+ \item \texttt{Mathcal:} All \texttt{$\backslash$mathcal\{$\cdot$\}} objects are turned into \texttt{$\backslash$mc\{$\cdot$\}}. This only works for uppercase alphabet.
+ \begin{equation*}
+ \mcA\mcB\mcC\mcD\mcE\mcF\mcG\mcH\mcI\mcJ\mcK\mcL\mcM\mcN\mcO\mcP\mcQ\mcR\mcS\mcT\mcU\mcV\mcW\mcX\mcY\mcZ
+ \end{equation*}
+ \end{enumerate}
+
+
+ \newpage
+ \section{\texttt{amsthm} Environments}\label{Sub:Special}
+ \texttt{amsthm} environments are defined as usual being enclosed by \texttt{$\backslash$begin\{environment\}}$\cdots$ \texttt{$\backslash$end\{environment\}} and most have been modified ostensibly from the original \texttt{amsthm} presets. Primarily, most environments, with the exception of the exercise environment, are now integrated with the wonderful \texttt{tcolorbox} package. Note that the counting for \texttt{theorems} and \texttt{lemmas} is distinct from the counting for \texttt{definitions}. Also note that the \texttt{breakable} for \texttt{tcolorbox} allows these environments to span multiple pages.
+
+ \begin{definition}
+ The \texttt{definition} environment and the associated \texttt{tcolorbox} are provided by the following code in \texttt{NotesTeX.sty}:
+ \begin{verbatim}
+ \tcolorboxenvironment{definition}{
+ boxrule=0pt,
+ boxsep=0pt,
+ colback={White!90!Cerulean},
+ enhanced jigsaw,
+ borderline west={2pt}{0pt}{Cerulean},
+ sharp corners,
+ before skip=10pt,
+ after skip=10pt,
+ breakable,
+ }
+ \end{verbatim}
+ \end{definition}
+ \begin{theorem}
+ The \texttt{theorem} environment and the associated \texttt{tcolorbox} are provided by the following code in \texttt{NotesTeX.sty}:
+ \begin{verbatim}
+ \tcolorboxenvironment{theorem}{
+ boxrule=0pt,
+ boxsep=0pt,
+ colback={White!90!Dandelion},
+ enhanced jigsaw,
+ borderline west={2pt}{0pt}{Dandelion},
+ sharp corners,
+ before skip=10pt,
+ after skip=10pt,
+ breakable,
+ }
+ \end{verbatim}
+ \end{theorem}
+ \begin{lemma}
+ The \texttt{lemma} environment and the associated \texttt{tcolorbox} are provided by the following code in \texttt{NotesTeX.sty}:
+ \begin{verbatim}
+ \tcolorboxenvironment{lemma}{
+ boxrule=0pt,
+ boxsep=0pt,
+ blanker,
+ borderline west={2pt}{0pt}{Red},
+ before skip=10pt,
+ after skip=10pt,
+ sharp corners,
+ left=12pt,
+ right=12pt,
+ breakable,
+ }
+ \end{verbatim}
+ \end{lemma}
+ \begin{proof}
+ The \texttt{proof} environment and the associated \texttt{tcolorbox} are provided by the following code in \texttt{NotesTeX.sty}:
+ \begin{verbatim}
+ \tcolorboxenvironment{proof}{
+ boxrule=0pt,
+ boxsep=0pt,
+ blanker,
+ borderline west={2pt}{0pt}{NavyBlue!80!white},
+ before skip=10pt,
+ after skip=10pt,
+ left=12pt,
+ right=12pt,
+ breakable,
+ }
+ \end{verbatim}
+ \end{proof}
+ \begin{example}
+ The \texttt{example} environment and the associated \texttt{tcolorbox} are provided by the following code in \texttt{NotesTeX.sty}:
+ \begin{verbatim}
+ \tcolorboxenvironment{example}{
+ boxrule=0pt,
+ boxsep=0pt,
+ blanker,
+ borderline west={2pt}{0pt}{Black},
+ sharp corners,
+ before skip=10pt,
+ after skip=10pt,
+ left=12pt,
+ right=12pt,
+ breakable,
+ }
+ \end{verbatim}
+ \end{example}
+ \begin{remark}
+ The \texttt{remark} environment and the associated \texttt{tcolorbox} are provided by the following code in \texttt{NotesTeX.sty}:
+ \begin{verbatim}
+ \tcolorboxenvironment{remark}{
+ boxrule=0pt,
+ boxsep=0pt,
+ blanker,
+ borderline west={2pt}{0pt}{Green},
+ before skip=10pt,
+ after skip=10pt,
+ left=12pt,
+ right=12pt,
+ breakable,
+ }
+ \end{verbatim}
+ \end{remark}
+ \begin{exercise}
+ The exercise environment remains unchanged from the \texttt{amsthm} presets.
+ \end{exercise}
+
+
+
+ \subsection{\texttt{tcolorbox} Environment and Known Issues} % (fold)
+ \label{ssub:tcolorbox environments_and_known_issues}
+
+ There is one issue with this however.\marginnote{Not a major one but frustrating nonetheless.} Since we are using a \texttt{tcolorbox}, this proof environment is incompatible with \texttt{$\backslash$sn} and \texttt{$\backslash$sidenote}, as it results in a \textbf{Float(s) Error}. However, this environment is compatible with \texttt{$\backslash$mn} and \texttt{$\backslash$marginnote} thankfully.\mn{As one can see right here.}
+
+
+ The \texttt{breakable} should allow the \texttt{proof} environment to span multiple pages. If one wishes to change the color, simply modify the line which states \texttt{borderline west=\{1pt\}\{0pt\}\{blue\}}. The first numeric value dictates the width of the line, the second dictates how close it is away from the \textit{left} margin, while the last argument obviously dictates the color. This code could also be used to change any of the other \texttt{amsthm} environments.
+
+ % subsubsection tcolorbox environments_and_known_issues (end)
+
+ \section{The Part Environment}\label{sec:part}
+ In the original Jhep format, the \texttt{$\backslash$part} environment is not special and is set to the default given by the article class. In \textit{NotesTeX}, the \texttt{part} environment produces the following image. Furthermore the code responsible is noted below.\\
+
+ \begin{fullpage}
+ {{\centering
+ \begin{tcolorbox}[width=\marginparwidth,height=\marginparwidth/2,colback=black!75!white,colframe=black!75!white,center title,fonttitle=\bfseries\normalsize,title=PART,text fill]
+ \begin{center}
+ {\color{white}\Huge\bfseries\#}
+ \end{center}
+ \end{tcolorbox}
+ }}
+ ~ \newline
+ \begin{verbatim}
+ \titleformat{\part}[hang]{{\thispagestyle{plain}}\Huge\bfseries}{\marginnote{
+ \begin{tcolorbox}
+ [width=\marginparwidth,height=\marginparwidth/2,colback=black!75!white,
+ colframe=black!75!white,center title,fonttitle=\bfseries\normalsize,title=PART,
+ text fill]
+
+ \begin{center}
+ {\color{white}\thepart}
+ \end{center}
+
+ \end{tcolorbox}
+ }[-1.25in]}{0pt}{\Huge\bfseries}
+ \end{verbatim}
+ \end{fullpage}
+
+ This combines the \texttt{titlesec} and the \texttt{tcolorbox} packages, placing the title of the \texttt{$\backslash$part} on the left hand side, and the \texttt{$\backslash$part} number in the margin. It is recommended that one do not mess with this, other than changing the colors given by \texttt{colback} and \texttt{colframe}.
+ \newpage
+
+ \section{Fullpage Environment}\label{Sec: Fullpage}
+ \begin{fullpage}
+ The \texttt{fullpage} environment is defined by
+ \begin{center}
+ \texttt{$\backslash$begin\{fullpage\}}\\
+ $\cdots$\\
+ \texttt{$\backslash$end\{fullpage\}}
+ \end{center}
+ with the with of the \texttt{fullpage} environment given by \texttt{$\backslash$textwidth}+\texttt{$\backslash$marginparsep}+\texttt{$\backslash$marginparwidth}.\\
+ \end{fullpage}
+ There are some clear benefits of having use of the full page at times. Suppose that one wants to place a figure that cannot fit into the margins, or if an equation is quite long and it bleeds into the margin, then the \texttt{fullpage} environment can both clearly separate these from the surrounding text and allot for the dimensions without hassle. The code in \texttt{NotesTeX.sty} that is responsible for the \texttt{fullpage} environment is given by\sn{This is also an example of why the \texttt{fullpage} environment is nice.}\\
+
+ \begin{fullpage}
+ \begin{verbatim}
+ \newenvironment{fullpage}{
+ {\smallskip\noindent
+ \begin{minipage}{\textwidth+\marginparwidth+\marginparsep}\hrule\smallskip\smallskip}
+ {\smallskip\smallskip\hrule\end{minipage}\vspace{.1in}
+ }
+ \end{verbatim}
+ \end{fullpage}
+
+ \begin{remark}
+ If one do not like the lines at the beginning and end of the \texttt{fullpage} environment, simply remove all the \texttt{$\backslash$hrule} that is in the code. Similarly, it is possible to change the vertical spacing after the \texttt{fullpage} is over, by modifying the \texttt{$\backslash$vspace\{\}} argument.
+ \end{remark}
+
+ \begin{fullpage}
+ \begin{multicols}{2}
+ A major benefit of having a \texttt{fullpage} is the ability to use \texttt{multicols} to its fullest extent. For example, these empty sentences are an example of how effective the \texttt{multicols} package can be inside of the \texttt{fullpage} environment.
+
+ This would be especially useful for formatting exercises in multiple columns and it makes the text distinct from the rest of the \texttt{fullpage} environment. The author has run out of things to say.
+ \end{multicols}
+ \end{fullpage}
+
+ \subsection{Known Issues with Fullpage}\label{Sub: Fullpage_Issues}
+
+ There are a few issues with the \texttt{fullpage} however.
+ \begin{remark}
+ Since the \texttt{fullpage} environment uses a \texttt{minipage}, and minipages do not work over multiple pages, one will need a new \texttt{fullpage} per page.
+ \end{remark}
+ \begin{remark}
+ \textbf{Also, please note \texttt{marginnote}, or \texttt{sidenotes} cannot be used in this environment.} Footnotes, on the other hand, can be used but are really ugly.
+ \end{remark}
+
+ \newpage
+
+ \part{Advanced Page Formatting}
+ For those wanting to adjust the margin sizes, or the \texttt{fancyhdr} layout, there are a few comments that could be made here.
+ \section{Page Dimensions}
+ \textit{NotesTeX} relies on the \texttt{geometry} package to set its dimensions. The associated code is the deceptively simple chunk of code given by
+ \begin{verbatim}
+ \geometry{paperheight=845pt,paperwidth=597pt,
+ marginparsep=.02\paperwidth,marginparwidth=.23\paperwidth,
+ hoffset=-1in, voffset=-1in, headheight=.02\paperheight,
+ headsep=.03\paperheight,footskip=20pt,
+ textheight=.84\paperheight,textwidth=.64\paperwidth}.
+ \end{verbatim}
+ Ignoring most of the arguments, the \texttt{$\backslash$paperheight} and \texttt{$\backslash$paperwidth} are set to be the standard $8\times11$ inches but in \texttt{pt} format instead. All other options, with the exception of \texttt{$\backslash$hoffset} and \texttt{$\backslash$voffset}, inherit fractions of \texttt{$\backslash$paperheight} and \texttt{$\backslash$paperwidth}, the most important being \texttt{$\backslash$marginparwidth}. Increasing \texttt{$\backslash$marginparwidth} causes the margin to bleed off of the right side of the page. In order to increase, one \textbf{must} decrease the \texttt{$\backslash$textwidth} accordingly.
+
+
+ \section{\texttt{Fancyhdr} Layout}
+ As mentioned before, \texttt{fancyhdr} is overridden on the title page, the contents page, and the \texttt{$\backslash$part} page, and sets the header for all other pages through the code
+ \begin{verbatim}
+ \pagestyle{fancy}%
+ \newlength{\offset}%
+ \setlength{\offset}{\marginparwidth + \marginparsep}%
+ \renewcommand{\sectionmark}[1]{\markboth{#1}{}}%
+ \renewcommand{\subsectionmark}[1]{\markright{#1}{}}%
+
+ \fancypagestyle{fancynotes}{%
+ \fancyhf{}%
+ \fancyheadoffset[rh]{\offset}%
+ \renewcommand{\headrulewidth}{0pt}%
+ \fancyhead[L]{\textsc{\leftmark}}%
+ \fancyhead[R]{\footnotesize \textit{\rightmark}~~~~ \thepage}%
+ }%
+ \end{verbatim}
+ The header style is set so that it spans the width of the entire page as opposed to just the \texttt{$\backslash$textwidth} through the line \texttt{$\backslash$fancyheadoffset[rh]\{$\backslash$myoddoffset\}}. The \texttt{$\backslash$sectionmark} and \texttt{$\backslash$subsectionmark} are set up so that the \texttt{section} appears on the left and all \texttt{subsections} appear on the right along with the page number, and this is given in the last two lines of code.
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/notestex/tex/NotesTeX.sty b/macros/latex/contrib/notestex/tex/NotesTeX.sty
new file mode 100644
index 0000000000..81b10b69db
--- /dev/null
+++ b/macros/latex/contrib/notestex/tex/NotesTeX.sty
@@ -0,0 +1,751 @@
+%% NotesTeX.sty
+%% A package modified from NotesTeX.sty from
+%% https://jhep.sissa.it/jhep/help/JHEP_TeXclass.jsp
+%% by Aditya Dhumuntarao.
+%% ------------------------------- Legal -------------------------------
+%% Adity Dhumuntarao does not own the copyright to the original package,
+%% jheppub.sty. All modification have been approved by the Jhep Editori-
+%% al committee, and permission has been attributed to Aditya to distri-
+%% bute freely the modified version of jheppub.sty, known as NotesTeX.sty
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% The Current Maintainer of this work is
+%% Aditya Dhumuntarao <adhumunt@gmail.com>
+%% --------------------------------------------------------------------
+
+% ----------------------------------------------------------------------
+% Jhep Master Presets
+% ----------------------------------------------------------------------
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{NotesTeX}[2017/03/21 r1]
+
+\gdef\@fpheader{\ }
+\gdef\@journal{jhep}
+
+\newif\ifnotoc\notocfalse
+\newif\ifemailadd\emailaddfalse
+\newif\iftoccontinuous\toccontinuousfalse
+\newif\ifnatbibsort\natbibsorttrue
+
+\DeclareOption{no-natbib-sort}{\natbibsortfalse}
+\ProcessOptions\relax
+
+% ----------------------------------------------------------------------
+% User Top Level Packages: Required
+% ----------------------------------------------------------------------
+
+\usepackage{marginnote,sidenotes,fancyhdr,titlesec,geometry}
+\usepackage[dvipsnames]{xcolor}
+\usepackage[many]{tcolorbox}
+
+% ----------------------------------------------------------------------
+% User Top Level Packages: Additional & Styling
+% ----------------------------------------------------------------------
+
+\usepackage[T1]{fontenc} % Font Styling
+\usepackage{lmodern,mathrsfs}
+
+\usepackage[shortlabels]{enumitem}
+
+\usepackage{mathtools,amssymb,amsfonts,amsthm,bm} % Math Presets
+\usepackage{array,tabularx,booktabs} % Table Presets
+\usepackage{graphicx,wrapfig,float,caption} % Figure Presets
+\usepackage{setspace,multicol} % Text Presets
+\usepackage{tikz,physics,cancel} % Physics Presets
+
+
+% ----------------------------------------------------------------------
+% User Page Prefrences
+% ----------------------------------------------------------------------
+\DeclareGraphicsExtensions{.pdf,.png,.jpg}
+
+\geometry{paperheight=845pt,paperwidth=597pt, %fix paperwidth and height.
+ marginparsep=.02\paperwidth,marginparwidth=.23\paperwidth,
+ hoffset=-1in, voffset=-1in, headheight=.02\paperheight,
+ headsep=.03\paperheight,footskip=20pt,
+ textheight=.84\paperheight,textwidth=.64\paperwidth}
+
+\pagestyle{fancy}%
+\newlength{\myoddoffset}%
+\setlength{\myoddoffset}{\marginparwidth + \marginparsep}%
+\renewcommand{\sectionmark}[1]{\markboth{#1}{}}%
+\renewcommand{\subsectionmark}[1]{\markright{#1}{}}%
+
+\fancypagestyle{fancynotes}{%
+ \fancyhf{}%
+ \fancyheadoffset[rh]{\myoddoffset}%
+ \renewcommand{\headrulewidth}{0pt}%
+ \fancyhead[L]{\textsc{\leftmark}}%
+ \fancyhead[R]{\footnotesize \textit{\rightmark}~~~~ \thepage}%
+}%
+
+\fancypagestyle{fancypart}{%
+ \fancyhf{}%
+ \fancyfootoffset[rh]{\myoddoffset}%
+ \renewcommand{\headrulewidth}{0pt}
+ \fancyfoot[L]{\footnotesize \thepage}%
+}%
+
+\titleformat{\part}[hang]{{\thispagestyle{fancypart}}\Huge\bfseries}{\marginnote{
+\begin{tcolorbox}[width=\marginparwidth,height=\marginparwidth/2,colback=black!75!white,colframe=black!75!white,center title,fonttitle=\bfseries\normalsize,title=PART,text fill]
+ \begin{center}
+ {\color{white}\thepart}
+ \end{center}
+\end{tcolorbox}
+}[-1.25in]}{0pt}{\sffamily\Huge\bfseries}
+
+\newenvironment{fullpage}
+ {\smallskip\noindent\begin{minipage}
+ {\textwidth+\marginparwidth+\marginparsep}\hrule\smallskip\smallskip}
+ {\hrule\end{minipage}\vspace{.1in}}
+
+% ----------------------------------------------------------------------
+% User Created Environments
+% ----------------------------------------------------------------------
+
+
+\newtheoremstyle{mystyle}%
+ {}%
+ {}%
+ {}%
+ {}%
+ {\sffamily\bfseries}%
+ {.}%
+ { }%
+ {}%
+
+\renewenvironment{proof}{{\sffamily\bfseries Proof. }}{\qed}
+
+\theoremstyle{mystyle}{
+ \newtheorem*{remark}{Remark}
+}
+
+\theoremstyle{mystyle}{
+ \newtheorem{definition}{Definition}[section]
+}
+
+\theoremstyle{mystyle}{
+ \newtheorem{theorem}{Theorem}[section]
+}
+
+\theoremstyle{mystyle}{
+ \newtheorem{lemma}[theorem]{Lemma}
+}
+
+\theoremstyle{mystyle}{
+ \newtheorem*{example}{Example}
+}
+
+\theoremstyle{definition}{
+ \newtheorem*{exercise}{Exercise}}
+
+
+\tcolorboxenvironment{definition}{
+ boxrule=0pt,
+ boxsep=0pt,
+ colback={White!90!Cerulean},
+ enhanced jigsaw,
+ borderline west={2pt}{0pt}{Cerulean},
+ sharp corners,
+ before skip=10pt,
+ after skip=10pt,
+ breakable,
+}
+
+\tcolorboxenvironment{theorem}{
+ boxrule=0pt,
+ boxsep=0pt,
+ colback={White!90!Dandelion},
+ enhanced jigsaw,
+ borderline west={2pt}{0pt}{Dandelion},
+ sharp corners,
+ before skip=10pt,
+ after skip=10pt,
+ breakable,
+}
+
+\tcolorboxenvironment{lemma}{
+ boxrule=0pt,
+ boxsep=0pt,
+ blanker,
+ borderline west={2pt}{0pt}{Red},
+ before skip=10pt,
+ after skip=10pt,
+ sharp corners,
+ left=12pt,
+ right=12pt,
+ breakable,
+}
+
+\tcolorboxenvironment{proof}{
+ boxrule=0pt,
+ boxsep=0pt,
+ blanker,
+ borderline west={2pt}{0pt}{NavyBlue!80!white},
+ before skip=10pt,
+ after skip=10pt,
+ left=12pt,
+ right=12pt,
+ breakable,
+}
+
+\tcolorboxenvironment{remark}{
+ boxrule=0pt,
+ boxsep=0pt,
+ blanker,
+ borderline west={2pt}{0pt}{Green},
+ before skip=10pt,
+ after skip=10pt,
+ left=12pt,
+ right=12pt,
+ breakable,
+}
+
+\tcolorboxenvironment{example}{
+ boxrule=0pt,
+ boxsep=0pt,
+ blanker,
+ borderline west={2pt}{0pt}{Black},
+ sharp corners,
+ before skip=10pt,
+ after skip=10pt,
+ left=12pt,
+ right=12pt,
+ breakable,
+}
+
+\renewcommand*{\raggedleftmarginnote}{\noindent}
+\renewcommand*{\raggedrightmarginnote}{\noindent}
+\newcommand{\mn}[1]{\textsuperscript{\thesidenote}{}\marginnote{\textsuperscript{\thesidenote}{}~\itshape\footnotesize #1}\refstepcounter{sidenote}}
+\newcommand{\en}[1]{\marginnote{\footnotesize #1}}
+\newcommand{\sn}[1]{\sidenote{\itshape\footnotesize #1}}
+
+% ----------------------------------------------------------------------
+% User Created Commands
+% ----------------------------------------------------------------------
+
+\newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}}
+\newcommand{\xint}{\int_{x_1}^{x_2}}
+\newcommand{\tint}{\int_{t_1}^{t_2}}
+\newcommand{\mw}{\sqrt{m\omega}}
+\newcommand{\de}{\delta}
+\newcommand{\dde}{\dot{\delta}}
+\newcommand{\di}{\delta_i}
+\newcommand{\ddi}{\dot{\delta_i}}
+\newcommand{\dddi}{\ddot{\delta_i}}
+\newcommand{\dipl}{\delta_{i+1}}
+\newcommand{\dimi}{\delta_{i-1}}
+\newcommand{\ddt}[1]{\frac{{d} #1}{dt}}
+\newcommand{\ddtt}[1]{\frac{d^2 #1}{dt^2}}
+\newcommand{\ddx}[1]{\frac{d #1}{dx}}
+\newcommand{\ddxx}[1]{\frac{d^2 #1}{dx^2}}
+\newcommand{\eps}{\epsilon}
+\newcommand{\del}[2]{\frac{\partial #1}{\partial #2}}
+\newcommand{\deltwo}[2]{\frac{\partial^2 #1}{\partial #2^2}}
+\newcommand{\lam}{\lambda}
+\newcommand{\Lam}{\Lambda}
+\newcommand{\sig}{\sigma}
+\newcommand{\Sig}{\Sigma}
+\newcommand{\half}{\frac{1}{2}}
+\newcommand{\munu}{{\mu\nu}}
+\newcommand{\thalf}{\tfrac{1}{2}}
+
+\newcommand{\bfA}{{\bf A}}
+\newcommand{\bfB}{{\bf B}}
+\newcommand{\bfC}{{\bf C}}
+\newcommand{\bfD}{{\bf D}}
+\newcommand{\bfE}{{\bf E}}
+\newcommand{\bfF}{{\bf F}}
+\newcommand{\bfG}{{\bf G}}
+\newcommand{\bfH}{{\bf H}}
+\newcommand{\bfI}{{\bf I}}
+\newcommand{\bfJ}{{\bf J}}
+\newcommand{\bfK}{{\bf K}}
+\newcommand{\bfL}{{\bf L}}
+\newcommand{\bfM}{{\bf M}}
+\newcommand{\bfN}{{\bf N}}
+\newcommand{\bfO}{{\bf O}}
+\newcommand{\bfP}{{\bf P}}
+\newcommand{\bfQ}{{\bf Q}}
+\newcommand{\bfR}{{\bf R}}
+\newcommand{\bfS}{{\bf S}}
+\newcommand{\bfT}{{\bf T}}
+\newcommand{\bfU}{{\bf U}}
+\newcommand{\bfV}{{\bf V}}
+\newcommand{\bfW}{{\bf W}}
+\newcommand{\bfX}{{\bf X}}
+\newcommand{\bfY}{{\bf Y}}
+\newcommand{\bfZ}{{\bf Z}}
+
+\newcommand{\bfa}{{\bf a}}
+\newcommand{\bfb}{{\bf b}}
+\newcommand{\bfc}{{\bf c}}
+\newcommand{\bfd}{{\bf d}}
+\newcommand{\bfe}{{\bf e}}
+\newcommand{\bff}{{\bf f}}
+\newcommand{\bfg}{{\bf g}}
+\newcommand{\bfh}{{\bf h}}
+\newcommand{\bfi}{{\bf i}}
+\newcommand{\bfj}{{\bf j}}
+\newcommand{\bfk}{{\bf k}}
+\newcommand{\bfl}{{\bf l}}
+\newcommand{\bfm}{{\bf m}}
+\newcommand{\bfn}{{\bf n}}
+\newcommand{\bfo}{{\bf o}}
+\newcommand{\bfp}{{\bf p}}
+\newcommand{\bfq}{{\bf q}}
+\newcommand{\bfr}{{\bf r}}
+\newcommand{\bfs}{{\bf s}}
+\newcommand{\bft}{{\bf t}}
+\newcommand{\bfu}{{\bf u}}
+\newcommand{\bfv}{{\bf v}}
+\newcommand{\bfw}{{\bf w}}
+\newcommand{\bfx}{{\bf x}}
+\newcommand{\bfy}{{\bf y}}
+\newcommand{\bfz}{{\bf z}}
+
+\newcommand{\mcA}{{\mathcal{A}}}
+\newcommand{\mcB}{{\mathcal{B}}}
+\newcommand{\mcC}{{\mathcal{C}}}
+\newcommand{\mcD}{{\mathcal{D}}}
+\newcommand{\mcE}{{\mathcal{E}}}
+\newcommand{\mcF}{{\mathcal{F}}}
+\newcommand{\mcG}{{\mathcal{G}}}
+\newcommand{\mcH}{{\mathcal{H}}}
+\newcommand{\mcI}{{\mathcal{I}}}
+\newcommand{\mcJ}{{\mathcal{J}}}
+\newcommand{\mcK}{{\mathcal{K}}}
+\newcommand{\mcL}{{\mathcal{L}}}
+\newcommand{\mcM}{{\mathcal{M}}}
+\newcommand{\mcN}{{\mathcal{N}}}
+\newcommand{\mcO}{{\mathcal{O}}}
+\newcommand{\mcP}{{\mathcal{P}}}
+\newcommand{\mcQ}{{\mathcal{Q}}}
+\newcommand{\mcR}{{\mathcal{R}}}
+\newcommand{\mcS}{{\mathcal{S}}}
+\newcommand{\mcT}{{\mathcal{T}}}
+\newcommand{\mcU}{{\mathcal{U}}}
+\newcommand{\mcV}{{\mathcal{V}}}
+\newcommand{\mcW}{{\mathcal{W}}}
+\newcommand{\mcX}{{\mathcal{X}}}
+\newcommand{\mcY}{{\mathcal{Y}}}
+\newcommand{\mcZ}{{\mathcal{Z}}}
+
+\newcommand{\bbA}{{\mathbb{A}}}
+\newcommand{\bbB}{{\mathbb{B}}}
+\newcommand{\bbC}{{\mathbb{C}}}
+\newcommand{\bbD}{{\mathbb{D}}}
+\newcommand{\bbE}{{\mathbb{E}}}
+\newcommand{\bbF}{{\mathbb{F}}}
+\newcommand{\bbG}{{\mathbb{G}}}
+\newcommand{\bbH}{{\mathbb{H}}}
+\newcommand{\bbI}{{\mathbb{I}}}
+\newcommand{\bbJ}{{\mathbb{J}}}
+\newcommand{\bbK}{{\mathbb{K}}}
+\newcommand{\bbL}{{\mathbb{L}}}
+\newcommand{\bbM}{{\mathbb{M}}}
+\newcommand{\bbN}{{\mathbb{N}}}
+\newcommand{\bbO}{{\mathbb{O}}}
+\newcommand{\bbP}{{\mathbb{P}}}
+\newcommand{\bbQ}{{\mathbb{Q}}}
+\newcommand{\bbR}{{\mathbb{R}}}
+\newcommand{\bbS}{{\mathbb{S}}}
+\newcommand{\bbT}{{\mathbb{T}}}
+\newcommand{\bbU}{{\mathbb{U}}}
+\newcommand{\bbV}{{\mathbb{V}}}
+\newcommand{\bbW}{{\mathbb{W}}}
+\newcommand{\bbX}{{\mathbb{X}}}
+\newcommand{\bbY}{{\mathbb{Y}}}
+\newcommand{\bbZ}{{\mathbb{Z}}}
+
+\newcommand{\mfa}{{\mathfrak{a}}}
+\newcommand{\mfb}{{\mathfrak{b}}}
+\newcommand{\mfc}{{\mathfrak{c}}}
+\newcommand{\mfd}{{\mathfrak{d}}}
+\newcommand{\mfe}{{\mathfrak{e}}}
+\newcommand{\mff}{{\mathfrak{f}}}
+\newcommand{\mfg}{{\mathfrak{g}}}
+\newcommand{\mfh}{{\mathfrak{h}}}
+\newcommand{\mfi}{{\mathfrak{i}}}
+\newcommand{\mfj}{{\mathfrak{j}}}
+\newcommand{\mfk}{{\mathfrak{k}}}
+\newcommand{\mfl}{{\mathfrak{l}}}
+\newcommand{\mfm}{{\mathfrak{m}}}
+\newcommand{\mfn}{{\mathfrak{n}}}
+\newcommand{\mfo}{{\mathfrak{o}}}
+\newcommand{\mfp}{{\mathfrak{p}}}
+\newcommand{\mfq}{{\mathfrak{q}}}
+\newcommand{\mfr}{{\mathfrak{r}}}
+\newcommand{\mfs}{{\mathfrak{s}}}
+\newcommand{\mft}{{\mathfrak{t}}}
+\newcommand{\mfu}{{\mathfrak{u}}}
+\newcommand{\mfv}{{\mathfrak{v}}}
+\newcommand{\mfw}{{\mathfrak{w}}}
+\newcommand{\mfx}{{\mathfrak{x}}}
+\newcommand{\mfy}{{\mathfrak{y}}}
+\newcommand{\mfz}{{\mathfrak{z}}}
+
+\newcommand{\mfA}{{\mathfrak{A}}}
+\newcommand{\mfB}{{\mathfrak{B}}}
+\newcommand{\mfC}{{\mathfrak{C}}}
+\newcommand{\mfD}{{\mathfrak{D}}}
+\newcommand{\mfE}{{\mathfrak{E}}}
+\newcommand{\mfF}{{\mathfrak{F}}}
+\newcommand{\mfG}{{\mathfrak{G}}}
+\newcommand{\mfH}{{\mathfrak{H}}}
+\newcommand{\mfI}{{\mathfrak{I}}}
+\newcommand{\mfJ}{{\mathfrak{J}}}
+\newcommand{\mfK}{{\mathfrak{K}}}
+\newcommand{\mfL}{{\mathfrak{L}}}
+\newcommand{\mfM}{{\mathfrak{M}}}
+\newcommand{\mfN}{{\mathfrak{N}}}
+\newcommand{\mfO}{{\mathfrak{O}}}
+\newcommand{\mfP}{{\mathfrak{P}}}
+\newcommand{\mfQ}{{\mathfrak{Q}}}
+\newcommand{\mfR}{{\mathfrak{R}}}
+\newcommand{\mfS}{{\mathfrak{S}}}
+\newcommand{\mfT}{{\mathfrak{T}}}
+\newcommand{\mfU}{{\mathfrak{U}}}
+\newcommand{\mfV}{{\mathfrak{V}}}
+\newcommand{\mfW}{{\mathfrak{W}}}
+\newcommand{\mfX}{{\mathfrak{X}}}
+\newcommand{\mfY}{{\mathfrak{Y}}}
+\newcommand{\mfZ}{{\mathfrak{Z}}}
+
+
+%===========================================================================================================
+
+
+\ifnatbibsort\RequirePackage[numbers,sort&compress]{natbib}\else\RequirePackage[numbers,compress]{natbib}\fi
+\RequirePackage{color}
+\RequirePackage[colorlinks=true
+,urlcolor=blue
+,anchorcolor=blue
+,citecolor=blue
+,filecolor=blue
+,linkcolor=blue
+,menucolor=blue
+,linktocpage=true
+,pdfproducer=medialab
+,pdfa=true
+]{hyperref}
+
+\def\@subheader{\@empty}
+\def\@keywords{\@empty}
+\def\@abstract{\@empty}
+\def\@xtum{\@empty}
+\def\@dedicated{\@empty}
+\def\@arxivnumber{\@empty}
+\def\@collaboration{\@empty}
+\def\@collaborationImg{\@empty}
+\def\@proceeding{\@empty}
+\def\@preprint{\@empty}
+
+\newcommand{\subheader}[1]{\gdef\@subheader{#1}}
+\newcommand{\keywords}[1]{\if!\@keywords!\gdef\@keywords{#1}\else%
+\PackageWarningNoLine{\jname}{Keywords already defined.\MessageBreak Ignoring last definition.}\fi}
+\renewcommand{\abstract}[1]{\gdef\@abstract{#1}}
+\newcommand{\dedicated}[1]{\gdef\@dedicated{#1}}
+\newcommand{\arxivnumber}[1]{\gdef\@arxivnumber{#1}}
+\newcommand{\proceeding}[1]{\gdef\@proceeding{#1}}
+\newcommand{\xtumfont}[1]{\textsc{#1}}
+\newcommand{\correctionref}[3]{\gdef\@xtum{\xtumfont{#1} \href{#2}{#3}}}
+\newcommand\jname{JHEP}
+\newcommand\acknowledgments{\section*{Acknowledgments}}
+\newcommand\notoc{\notoctrue}
+\newcommand\preprint[1]{\gdef\@preprint{\hfill #1}}
+
+
+
+%Equivalent to ``\footnote'', but can be used inside the \author macro
+% because it does not write the footnote mark
+% it has an optional argument that will be used as footnote mark when given
+% WARNING: when the optional argument is used, the footnotecounter is not increased
+% WARNING: the character ``!'' cannot be used.
+% If you really need it use somthing like [\relax !] as the optional arg.
+\newcommand\note[2][]{%
+\if!#1!%
+\stepcounter{footnote}\footnotetext{#2}%
+\else%
+{\renewcommand\thefootnote{#1}%
+\footnotetext{#2}}%
+\fi}
+
+
+
+%Use this if you want to try to keep some piece of the abstract on a
+%very long first page
+\newcommand\compress{%
+\renewcommand\afterProceedingsSpace{\bigskip}%
+\renewcommand\afterTitleSpace{\bigskip}%
+\renewcommand\afterRuleSpace{\bigskip\bigskip}
+\renewcommand\afterEmailSpace{\par\bigskip}}
+
+%authors and affiliations
+\newtoks\auth@toks
+\renewcommand{\author}[2][]{%
+ \if!#1!%
+ \auth@toks=\expandafter{\the\auth@toks#2\ }%
+ \else
+ \auth@toks=\expandafter{\the\auth@toks#2$^{#1}$\ }%
+ \fi
+}
+
+\newtoks\affil@toks\newif\ifaffil\affilfalse
+\newcommand{\affiliation}[2][]{%
+\affiltrue
+ \if!#1!%
+ \affil@toks=\expandafter{\the\affil@toks{\item[]#2}}%
+ \else
+ \affil@toks=\expandafter{\the\affil@toks{\item[$^{#1}$]#2}}%
+ \fi
+}
+
+%emails
+%automatically put a comma between emails
+\newtoks\email@toks\newcounter{email@counter}%
+\setcounter{email@counter}{0}%
+\newcommand{\emailAdd}[1]{%
+\emailaddtrue%
+\ifnum\theemail@counter>0\email@toks=\expandafter{\the\email@toks, \@email{#1}}%
+\else\email@toks=\expandafter{\the\email@toks\@email{#1}}%
+\fi\stepcounter{email@counter}}
+\newcommand{\@email}[1]{\href{mailto:#1}{\tt #1}}
+
+
+% Collaboration macros
+\newcommand*\collaboration[1]{\gdef\@collaboration{#1}}
+\newcommand*\collaborationImg[2][]{\gdef\@collaborationImg{#2}}
+
+%all pieces get a ``after'' spacing
+\newcommand\afterLogoSpace{\smallskip}
+\newcommand\afterSubheaderSpace{\vskip3pt plus 2pt minus 1pt}
+\newcommand\afterProceedingsSpace{\vskip21pt plus0.4fil minus15pt}
+\newcommand\afterTitleSpace{\vskip23pt plus0.06fil minus13pt}
+\newcommand\afterRuleSpace{\vskip23pt plus0.06fil minus13pt}
+\newcommand\afterCollaborationSpace{\vskip3pt plus 2pt minus 1pt}
+\newcommand\afterCollaborationImgSpace{\vskip3pt plus 2pt minus 1pt}
+\newcommand\afterAuthorSpace{\vskip5pt plus4pt minus4pt}
+\newcommand\afterAffiliationSpace{\vskip3pt plus3pt}
+\newcommand\afterEmailSpace{\vskip16pt plus9pt minus10pt\filbreak}
+\newcommand\afterXtumSpace{\par\bigskip}
+\newcommand\afterAbstractSpace{\vskip16pt plus9pt minus13pt}
+\newcommand\afterKeywordsSpace{\vskip16pt plus9pt minus13pt}
+\newcommand\afterArxivSpace{\vskip3pt plus0.01fil minus10pt}
+\newcommand\afterDedicatedSpace{\vskip0pt plus0.01fil}
+\newcommand\afterTocSpace{\bigskip\medskip}
+\newcommand\afterTocRuleSpace{\bigskip\bigskip}
+%this is the ``itemsep'' of the affiliations list
+\newlength{\affiliationsSep}\setlength{\affiliationsSep}{-3pt}
+%this hook is needed if the toc starts on the first page
+\newcommand\beforetochook{\pagestyle{myplain}\pagenumbering{roman}}
+
+\DeclareFixedFont\trfont{OT1}{phv}{b}{sc}{11}
+
+%first page
+\renewcommand\maketitle{
+%% First page
+\pagestyle{empty}
+\thispagestyle{titlepage}
+\newgeometry{marginparwidth=0pt,marginparsep=0pt,textwidth=.9\paperwidth,hoffset=0in,voffset=0in}
+\setcounter{page}{0}
+\noindent{\small\scshape\@fpheader}\@preprint\par
+\afterLogoSpace
+% Subheader
+\if!\@subheader!\else\noindent{\trfont{\@subheader}}\fi
+\afterSubheaderSpace
+% Proceedings
+\if!\@proceeding!\else\noindent{\sc\@proceeding}\fi
+\afterProceedingsSpace
+% Title
+{\LARGE\flushleft\sffamily\bfseries\@title\par}
+\afterTitleSpace
+% Rule
+\hrule height 1.5\p@%
+\afterRuleSpace
+% Collaboration
+\if!\@collaboration!\else
+{\Large\bfseries\sffamily\raggedright\@collaboration}\par
+\afterCollaborationSpace
+\fi
+%
+\if!\@collaborationImg!\else
+{\normalsize\bfseries\sffamily\raggedright\@collaborationImg}\par
+\afterCollaborationImgSpace
+%% I leave the size and font so that if there are two collaboration
+%% they can be linked with an 'and'
+\fi
+% Author
+{\bfseries\raggedright\sffamily\the\auth@toks\par}
+\afterAuthorSpace
+% Affiliation
+\ifaffil\begin{list}{}{%
+\setlength{\leftmargin}{0.28cm}%
+\setlength{\labelsep}{0pt}%
+\setlength{\itemsep}{\affiliationsSep}%
+\setlength{\topsep}{-\parskip}}
+\itshape\small%
+\the\affil@toks
+\end{list}\fi
+\afterAffiliationSpace
+% E-mail
+\ifemailadd %% if emailadd is true
+\noindent\hspace{0.28cm}\begin{minipage}[l]{.9\textwidth}
+\begin{flushleft}
+\textit{E-mail:} \the\email@toks
+\end{flushleft}
+\end{minipage}
+\else %% if emailaddfalse do nothing
+\PackageWarningNoLine{\jname}{E-mails are missing.\MessageBreak Plese use \protect\emailAdd\space macro to provide e-mails.}
+\fi
+\afterEmailSpace
+%Erratum or addendum
+\if!\@xtum!\else\noindent{\@xtum}\afterXtumSpace\fi
+% Abstract
+\if!\@abstract!\else\noindent{\renewcommand\baselinestretch{.9}\textsc{Abstract:}}\ \@abstract\afterAbstractSpace\fi
+% Keywords
+\if!\@keywords!\else\noindent{\textsc{Keywords:}} \@keywords\afterKeywordsSpace\fi
+% Arxivnumber
+\if!\@arxivnumber!\else\noindent{\textsc{ArXiv ePrint:}} \href{http://arxiv.org/abs/\@arxivnumber}{\@arxivnumber}\afterArxivSpace\fi
+% Dedication
+\if!\@dedicated!\else\vbox{\small\it\raggedleft\@dedicated}\afterDedicatedSpace\fi
+%
+\ifnotoc\else
+\iftoccontinuous\else\newpage\fi
+\beforetochook\hrule
+{\tableofcontents}
+\afterTocSpace
+\hrule
+\afterTocRuleSpace
+\fi
+\setcounter{footnote}{0}
+\restoregeometry
+\pagestyle{myplain}\pagenumbering{arabic}
+} % close the \renewcommand\maketitle{
+
+
+% Page layout
+\renewcommand{\baselinestretch}{1.15}\normalsize
+\setlength\lineskip{1\p@}
+\setlength\parindent{1.2\parindent}
+\setlength\normallineskip{1\p@}
+\setlength\parskip{0\p@ \@plus \p@}
+\@lowpenalty 51
+\@medpenalty 151
+\@highpenalty 301
+\widowpenalty 1000
+\clubpenalty 1000
+
+\setcounter{topnumber}{4}
+\renewcommand\topfraction{1}
+\setcounter{bottomnumber}{1}
+\renewcommand\bottomfraction{.6}
+\setcounter{totalnumber}{5}
+\renewcommand\textfraction{0}
+\renewcommand\floatpagefraction{1}
+\addtolength\textheight{\topskip}
+
+\marginparpush 6\p@
+\topmargin .05\paperheight
+
+\setlength\arraycolsep{2\p@}
+\setlength\tabcolsep{6\p@}
+\setlength\arrayrulewidth{.4\p@}
+\setlength\doublerulesep{2\p@}
+\setlength\tabbingsep{\labelsep}
+\skip\@mpfootins = \skip\footins
+\setlength\fboxsep{3\p@}
+\setlength\fboxrule{.4\p@}
+
+% No dots in the table of contents
+\renewcommand{\@dotsep}{10000}
+
+% Footer and header of the body
+% the command ``\pagestyle{myplain}'' must be inserted
+% just after ``\begin{document}''
+\newcommand\ps@myplain{
+\pagenumbering{arabic}
+\renewcommand\@oddfoot{\hfill-- \thepage\ --\hfill}
+\renewcommand\@oddhead{}}
+\let\ps@plain=\ps@myplain
+
+
+
+% no header or footer in the title page
+\newcommand\ps@titlepage{\renewcommand\@oddfoot{}\renewcommand\@oddhead{}}
+
+
+
+%number equations after the sections
+\renewcommand{\theequation}{\thesection.\arabic{equation}}
+\numberwithin{equation}{section}
+
+
+%headings style
+
+
+
+\renewcommand\section{\@startsection{section}{1}{\z@}%
+ {-3.5ex \@plus -1.3ex \@minus -.7ex}%
+ {2.3ex \@plus.4ex \@minus .4ex}%
+ {\sffamily\Large\bfseries}}
+\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
+ {-2.3ex\@plus -1ex \@minus -.5ex}%
+ {1.2ex \@plus .3ex \@minus .3ex}%
+ {\sffamily\large\bfseries}}
+\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+ {-2.3ex\@plus -1ex \@minus -.5ex}%
+ {1ex \@plus .2ex \@minus .2ex}%
+ {\sffamily\normalsize\bfseries}}
+\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
+ {1.75ex \@plus1ex \@minus.2ex}%
+ {-1em}%
+ {\sffamily\normalsize\bfseries}}
+\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
+ {1.75ex \@plus1ex \@minus .2ex}%
+ {-1em}%
+ {\sffamily\normalsize\bfseries}}
+
+
+%Caption of figure and table
+\def\fnum@figure{\textbf{\figurename\nobreakspace\thefigure}}
+\def\fnum@table{\textbf{\tablename\nobreakspace\thetable}}
+
+%redefining \@makecaption, to have captions with \small font size
+%taken from article.cls l.489--498
+%the only differences are the ``\small '' commands added on two lines
+\long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{\small #1. #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ \small #1. #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
+
+
+
+
+
+%apply some formatting on the biblio
+%without redefining the whole env
+\let\oldthebibliography=\thebibliography
+\let\endoldthebibliography=\endthebibliography
+\renewenvironment{thebibliography}[1]{%
+\begin{oldthebibliography}{#1}%
+\small%
+\raggedright%
+\setlength{\itemsep}{5pt plus 0.2ex minus 0.05ex}%
+}%
+{%
+\end{oldthebibliography}%
+} \ No newline at end of file