summaryrefslogtreecommitdiff
path: root/microstructure.cls
diff options
context:
space:
mode:
Diffstat (limited to 'microstructure.cls')
-rwxr-xr-xmicrostructure.cls105
1 files changed, 60 insertions, 45 deletions
diff --git a/microstructure.cls b/microstructure.cls
index 1f3674f..50c92e7 100755
--- a/microstructure.cls
+++ b/microstructure.cls
@@ -3,7 +3,7 @@
\RequirePackage[letterpaper]{geometry}
\geometry{
- top = 1in,
+ top = 1in,
bottom = 1in,
left = 1in,
right = 1in
@@ -20,28 +20,39 @@
\renewcommand{\normalsize}{\fontsize{12bp}{18bp}\selectfont}
\newcommand{\footnotesize}{\fontsize{9bp}{12bp}\selectfont}
+\newcommand{\tiny}{\normalsize}
+\newcommand{\scriptsize}{\normalsize}
+\newcommand{\small}{\normalsize}
+\newcommand{\large}{\normalsize}
+\newcommand{\Large}{\normalsize}
+\newcommand{\LARGE}{\normalsize}
+\newcommand{\huge}{\normalsize}
+\newcommand{\Huge}{\normalsize}
+
\RequirePackage[quiet]{mathspec}
\RequirePackage{realscripts}
\RequirePackage{microtype}
\defaultfontfeatures{
- Language = English,
- Script = Latin
+ Language = English,
+ Script = Latin
}
\newcommand{\case}{\addfontfeature{Letters=Uppercase}}
-\setmainfont{Neue Haas Grotesk Text Pro 55 Roman}[
- BoldFont = Neue Haas Grotesk Text Pro 75 Bold,
- ItalicFont = Neue Haas Grotesk Text Pro 56 Italic,
- Mapping = tex-text,
+\setmainfont{Neue Haas Grotesk Text Pro}[
+ BoldFont = NHaasGroteskTXPro-75Bd,
+ ItalicFont = NHaasGroteskTXPro-56It,
+ Mapping = tex-text,
StylisticSet = {1,3},
- Contextuals = Alternate
+ Contextuals = Alternate
]
-\newfontfamily\display{Neue Haas Grotesk Display Pro 75 Bold}[
- Mapping = tex-text,
+\newfontfamily\display{Neue Haas Grotesk Display Pro}[
+ BoldFont = NHaasGroteskDSPro-75Bd,
+ ItalicFont = NHaasGroteskDSPro-56It,
+ Mapping = tex-text,
StylisticSet = {1,3},
- Contextuals = Alternate
+ Contextuals = Alternate
]
\setmonofont{JetBrains Mono}
-\setmathfont(Latin)[Uppercase=Plain,Lowercase=Plain,Arabic=Plain]{Times New Roman}
+\setmathfont(Latin)[Uppercase=Plain,Lowercase=Plain,Arabic=Plain]{Neue Haas Grotesk Text Pro}
\renewcommand{\bold}[1]{{\bfseries #1}}
\newcommand{\italic}[1]{{\itshape #1}}
\newcommand{\mono}[1]{{\ttfamily #1}}
@@ -52,20 +63,21 @@
offset = 0bp
}
\newcommand{\reset}{\returntogrid}
+\newcommand{\resetv}[1]{\rule{0bp}{0bp}\vspace{#1}\reset}
\renewcommand{\ULthickness}{1bp}
\newcommand{\inmath}[1]{{\fontsize{15bp}{12bp}\selectfont $#1$}}
-\newcommand{\section}[1]{{\fontsize{32bp}{36bp}\selectfont \display #1 \par}}
-\newcommand{\subsection}[1]{{\fontsize{24bp}{24bp}\selectfont \display #1 \par}}
-\newcommand{\subsubsection}[1]{{\fontsize{16bp}{18bp}\selectfont \display #1 \par}}
+\newcommand{\section}[1]{{\fontsize{32bp}{36bp}\selectfont \bfseries \display #1 \par}}
+\newcommand{\subsection}[1]{{\fontsize{24bp}{24bp}\selectfont \bfseries \display #1 \par}}
+\newcommand{\subsubsection}[1]{{\fontsize{16bp}{18bp}\selectfont \bfseries \display #1 \par}}
\newcommand{\hr}{\vspace{-1.5\unit}\reset\rule{\textwidth}{0.5bp}\vspace{-0.5\unit}\par}
\@ifundefined{thepage}{\def\thepage{\arabic{page}}}{}
\RequirePackage[hidelinks]{hyperref}
-\newcommand{\link}[2]{{\bfseries\href{#1}{#2}}{{\ttfamily\textsuperscript ↗}}}
+\newcommand{\link}[2]{{\bfseries\href{#1}{#2}}{{\ttfamily\textsuperscript* ↗}}}
\RequirePackage[hang,multiple]{footmisc}
\renewcommand\footnoterule{\smash{\rule[4bp]{2in}{0.5bp}}}
@@ -98,26 +110,26 @@
\RequirePackage{listings}
\lstdefinestyle{code}{
- basicstyle = \ttfamily,
- tabsize = 4,
+ basicstyle = \ttfamily,
+ tabsize = 4,
breaklines, breakatwhitespace,
- breakindent = 0bp,
- aboveskip = \dimexpr1.5\unit-1.5bp,
- belowskip = 0bp,
- frame = single,
- xleftmargin = \unit,
+ breakindent = 0bp,
+ aboveskip = \dimexpr1.5\unit-1.5bp,
+ belowskip = 0bp,
+ frame = single,
+ xleftmargin = \unit,
xrightmargin = \unit,
- framesep = 0bp,
+ framesep = 0bp,
framextopmargin = \dimexpr\unit-0.5bp,
framexbottommargin = \dimexpr0.5\unit+0.5bp,
framexleftmargin = \unit,
framexrightmargin = \unit,
- framerule = 0.5bp
+ framerule = 0.5bp
}
\lstdefinestyle{enum}{
- numbers = right,
- numbersep = -0.5\unit,
- numberstyle = {\textsuperscript}
+ numbers = right,
+ numbersep = -0.5\unit,
+ numberstyle = {\textsuperscript}
}
\lstnewenvironment{codeblock}[1][]{\lstset{style=code,#1}}{}
\lstnewenvironment{codeblockenum}[1][]{\lstset{style=code,style=enum,#1}}{}
@@ -126,7 +138,7 @@
\setlength{\abovedisplayskip}{0bp}
\setlength{\belowdisplayskip}{0bp}
-\newenvironment{mathblock}{
+\renewenvironment{math}{
\begingroup
\fontsize{15bp}{12bp}\selectfont
\setlength{\jot}{\unit}
@@ -155,7 +167,7 @@
height = \dimexpr\textheight-6\unit,
keepaspectratio
}
-\renewcommand{\caption}[1]{{\footnotesize\italic{#1}}\vspace{1.5\unit}}
+\renewcommand{\caption}[1]{\\{\footnotesize\italic{#1}}\vspace{1.5\unit}}
\newenvironment{figure}{
\setlength{\parskip}{1.5\unit}\centering
}{
@@ -167,25 +179,26 @@
\pagestyle{fancy}
\DTMnewdatestyle{yyyymmdd}{\renewcommand{\DTMdisplaydate}[4]{\number##1\DTMtwodigits{##2}\DTMtwodigits{##3}}}
\DTMsetdatestyle{yyyymmdd}
-\fancyhead[R]{\case\footnotesize \today--\hspace{0bp}--\hspace{0bp}--\hspace{0bp}--\@author}
-\fancyfoot[C]{}
-\fancyfoot[R]{\case\footnotesize \thepage/\pageref{LastPage}}
-\renewcommand{\headrule}{}
-\renewcommand{\footrule}{}
-\setlength{\headheight}{1.5\unit}
+\renewcommand{\headruleskip}{2bp}
+\renewcommand{\footruleskip}{0bp}
+\renewcommand{\headrulewidth}{0bp}
+\renewcommand{\footrulewidth}{0bp}
+\setlength{\headheight}{\unit}
\setlength{\headsep}{\unit}
-\setlength{\topmargin}{\dimexpr -1\headsep-\headheight}
+\setlength{\topmargin}{\dimexpr 0bp-\headsep-\headheight}
\setlength{\footskip}{\dimexpr \headsep+0.5\unit}
+\fancyhead[R]{\raisebox{0.666667bp}{\case\footnotesize \today--\hspace{0bp}--\hspace{0bp}--\hspace{0bp}--\@author}}
+\fancyfoot[C]{}
+\fancyfoot[R]{\case\footnotesize \thepage/\pageref{LastPage}}
\RequirePackage{tikz,eso-pic}
\DeclareOption{debug}{
- \AddToShipoutPicture{
- \begin{tikzpicture}[overlay,remember picture]
- \draw[black!30!white,thin,shift={(current page.north west)}]
- (current page.north west) grid[step=0.5\unit]
- (current page.south east);
- \end{tikzpicture}
-} }
+ \AddToShipoutPicture{\begin{tikzpicture}[overlay,remember picture]
+ \draw[black!30!white,thin,shift={(current page.north west)}]
+ (current page.north west) grid[step=0.5\unit]
+ (current page.south east);
+ \end{tikzpicture}}
+}
\DeclareOption{fleqn}{
\AtBeginDocument{\@mathmargin1.5\unit\relax}
}
@@ -193,4 +206,6 @@
\fancyhead[L,C,R]{}
\fancyfoot[L,C,R]{}
}
-\ProcessOptions\relax \ No newline at end of file
+\ProcessOptions\relax
+
+% vim:ft=tex