Notes Te X
Notes Te X
Aditya Dhumuntarao
PhD. Student at the University of Minnesota
Website
Inspire-HEP
LinkedIn
GitHub
[email protected]
Contents
I Introduction 1
1 Required Packages 1
II Modifications 1
2 Features 1
3 Included Packages 2
4 Margins 2
5 amsthm Environments 3
6 Fullpage Environment 5
6.1 Known Issues with Fullpage 5
III Advanced 6
8 Page Dimensions 6
9 Fancyhdr Layout 6
11 License 7
–i–
PART
Introduction I
Section 1
Required Packages
The role of each packages is discussed in Part II. Briefly, the marginnote, sidenote,
titlesec, and tcolorbox packages are required to create the \part environment.
geometry is used globally to set the page width, page height, and margin width.
fancyhdr (overridden on the title, contents, and \part page) sets the header.
PART
Modifications II
Section 2
Features
NotesTeX inherits jhep formatting for sections, subsections, subsubsections, title page, Section 2. Features
contents page, and bibliography presets. Significant extensions include the following: Section 3. Included Packages
Section 4. Margins
Section 5. amsthm Environs.
1. Several mathematics and physics packages.
Section 7. Part Environment
Section 6. Fullpage Environ-
2. Margins and margin environments for tables, figures, and asides. ment
3. TEX shortcuts for various math scripts namely vector bold math, mathbb, mathfrak, Table 1. Contents for Part
and mathcal. II
4. amsthm integrations and special environments for theorems, lemmas, proofs, defi-
nitions, examples, and remarks.
1
Margins 2
Section 3
Margins
NotesTeX inherits all the margin commands that are used by sidenote and marginnote,
and two additional pre-configured commands known as \mn and \sn. The relevant
commands, and the packages they belong to, are
5. Lec: This environment appears in the left column and requires two inputs. The 1 4
Left Side example here is \lec{Left Side}{Some text goes here.}.
Some text
goes here. 6. Marginfigure: This environment requires the \begin{marginfigure} · · ·
\end{marginfigure} enclosings. The caption package is needed to caption the
figure.
7. Margintable: This environment requires the \begin{margintable} · · · 2 3
\end{margintable} enclosings. A table package, such as tabular, tabulary,
tabu, or tabularx is required. The caption package is needed to caption the
table. Figure 1. Marginfigure: Tikz
Remark Why use both marginnotes and sidenotes? Quite simply, marginnotes overlap
NotesTeX rocks!
each other if they are too close whereas sidenotes both numbers and dynamically aligns
all side notes, figures, and tables. However sidenotes cannot be used in equations, Table 3. Margintable
multicols, and with the tcolorbox4 environment. As the majority of the special 4
See 5 and 6 for more details.
environments from amsthm are modified to use tcolorbox, marginnotes becomes an
essential part of NotesTeX.
amsthm Environments 3
Section 5
amsthm Environments
Definition 1 The definition environment and the associated tcolorbox are provided by the
following code in NotesTeX.sty:
\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,
}
Theorem 1 The theorem environment and the associated tcolorbox are provided by the following
code in NotesTeX.sty:
\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,
}
Lemma 1 The lemma environment and the associated tcolorbox are provided by the following
code in NotesTeX.sty:
\tcolorboxenvironment{lemma}{
boxrule=0pt,
boxsep=0pt,
blanker,
amsthm Environments 4
borderline west={2pt}{0pt}{Red},
before skip=10pt,
after skip=10pt,
sharp corners,
left=12pt,
right=12pt,
breakable,
}
Proof The proof environment and the associated tcolorbox are provided by the following
code in NotesTeX.sty:
\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,
}
Example The example environment and the associated tcolorbox are provided by the following
code in NotesTeX.sty:
\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,
}
Remark The remark environment and the associated tcolorbox are provided by the following
code in NotesTeX.sty:5 5
Coexistence of amsthm environ-
ment and mn
\tcolorboxenvironment{remark}{
boxrule=0pt,
boxsep=0pt,
blanker,
borderline west={2pt}{0pt}{Green},
before skip=10pt,
after skip=10pt,
left=12pt,
right=12pt,
breakable,
}
The Part Environment 5
Section 6
Fullpage Environment
Remark Eliminating the \hrule in the code will remove the lines surrounding the fullpage
environment. Similarly, it is possible to change the vertical spacing after the fullpage
is over, by modifying the \vspace{} argument.
lec multicols may be used in conjunction with fullpage. I environment. The lec environment is compatible with
entry find it useful for formatting exercises in multiple columns multicols but sidenote, marginnote are not.
and it makes the text distinct from the rest of the fullpage
Subsection 6.1
Known Issues with Fullpage
Remark Since the fullpage environment uses a minipage, and minipages do not work over
multiple pages, one will need a new fullpage per page.
Remark If the twoside option is enabled in the documentclass header, then the fullpage is
known to bleed out beyond the margin.
Section 7
In the original Jhep format, the \part environment is not special and is set to the default
given by the article class. In NotesTeX, the part environment produces the following
image. Furthermore the code responsible is noted below.
PART
#
\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}
This combines the titlesec and the tcolorbox packages, placing the title of the
\part on the left hand side, and the \part number in the margin.
PART
Advanced III
For those wanting to adjust the margin sizes, or the fancyhdr layout, there are a few
comments that could be made here.
Section 8
Page Dimensions
NotesTeX relies on the geometry package to set its dimensions. The associated code is
the deceptively simple chunk of code given by
\geometry{paperheight=11in,paperwidth=8.5in,
marginparsep=.02\paperwidth,marginparwidth=.2\paperwidth,
inner=.11\paperwidth,voffset=-1in,headheight=.02\paperheight,
headsep=.03\paperheight,footskip=20pt,
textheight=.795\paperheight,textwidth=.62\paperwidth}
Ignoring most of the arguments, the \paperheight and \paperwidth are set to be the
standard 8.5×11 inches. All other options, with the exception of \voffset, inherit frac-
tions of \paperheight and \paperwidth, the most important being \marginparwidth.
Increasing \marginparwidth causes the margin to bleed off of the right side of the page.
In order to increase this value, \textwidth must be decreased accordingly.
Section 9
Fancyhdr Layout
As mentioned before, fancyhdr is overridden on the title page, the contents page, and
the \part page, and sets the header for all other pages through the code
\pagestyle{fancy}%
\newlength{\offset}%
\setlength{\offset}{\marginparwidth + \marginparsep}%
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}%
6
License 7
\renewcommand{\subsectionmark}[1]{\markright{#1}{}}%
\fancypagestyle{fancynotes}{%
\fancyhf{}%
\fancyheadoffset[rh]{\offset}%
\renewcommand{\headrulewidth}{0pt}%
\fancyhead[L]{\textsc{\leftmark}}%
\fancyhead[R]{\footnotesize \textit{\rightmark}~~~~ \thepage}%
}%
The header style is set so that it spans the width of the entire page as opposed to
just the \textwidth through the line \fancyheadoffset[rh]{\myoddoffset}. The
\sectionmark and \subsectionmark are set up so that the section appears on the left
and subsections appear on the right along with the page number, and this is given in
the last two lines of code.
Section 10
For languages written right to left, such as Persian, it is possible to use NotesTeX. A
complied example can be found in the legacy V1 version on Github. Suggestions are
welcome for a more comprehensive language integration.
Section 11
License
Aditya Dhumuntarao does not own the copyright to the original package, 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 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 found 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.1