summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclean.sh2
-rwxr-xr-xdoc.pdfbin32549 -> 31010 bytes
-rwxr-xr-xdoc.tex72
-rwxr-xr-xmicrostructure.cls105
-rwxr-xr-xtemplate.pdfbin53510 -> 53582 bytes
-rwxr-xr-xtemplate.tex20
6 files changed, 104 insertions, 95 deletions
diff --git a/clean.sh b/clean.sh
index 935d96b..0be1003 100755
--- a/clean.sh
+++ b/clean.sh
@@ -1,3 +1,3 @@
#!/bin/sh -e
-rm *.aux *.log *.out *.gz
+rm -f *.aux *.gz *.log *.out
diff --git a/doc.pdf b/doc.pdf
index 9e63ceb..ee1ba03 100755
--- a/doc.pdf
+++ b/doc.pdf
Binary files differ
diff --git a/doc.tex b/doc.tex
index 14b63d0..34bedb6 100755
--- a/doc.tex
+++ b/doc.tex
@@ -2,9 +2,11 @@
\author{DistressNetwork°}
+\newcommand{\cmd}[1]{\mono{\textbackslash #1}}
+
\begin{document}
-\section{Microstructure Documentation}
+\resetv{-3\unit}\section{Microstructure Documentation}
\hr
@@ -20,36 +22,36 @@
\subsection{Commands}
\begin{itemize}
- \item Preamble: \mono{\textbackslash author\{\}} defines the author name in the page header.
+ \item Preamble: \cmd{author\{\}} defines the author name in the page header.
\end{itemize}
\subsubsection{Inline Elements}
\begin{table}{x x}
-\bold{Command} & \bold{Output/Description} \\
+\bold{Command} & \bold{Output/Description} \\
\cline{1-2}
-\mono{\textbackslash bold\{\}} & \bold{Bold Weight} \\
-\mono{\textbackslash italic\{\}} & \italic{Italic Style} \\
-\mono{\textbackslash sout\{\}} & \sout{Strikethrough} \\
-\mono{\textbackslash mono\{\}} & \mono{Monospace Font} \\
-\mono{\textbackslash inmath\{\}} & \inmath{\mathrm{Inline\ Math}} \\
-\mono{\textbackslash link\{\}\{\}} & \link{https://en.wikipedia.org/wiki/Hyperlink}{Link} \\
-\mono{\textbackslash footnote\{\}} & Footnote Reference \\
-\mono{\textbackslash case} & Enable Case-Sensitive Forms
+\cmd{bold\{\}} & \bold{Bold Weight} \\
+\cmd{italic\{\}} & \italic{Italic Style} \\
+\cmd{sout\{\}} & \sout{Strikethrough} \\
+\cmd{mono\{\}} & \mono{Monospace Font} \\
+\cmd{inmath\{\}} & \inmath{\mathrm{Inline\ Math}} \\
+\cmd{link\{\}\{\}} & \link{https://en.wikipedia.org/wiki/Hyperlink}{Link} \\
+\cmd{footnote\{\}} & Footnote Reference \\
+\cmd{case} & Enable Case-Sensitive Forms
\end{table}
\newpage
-\subsubsection{Block Elements}
+\resetv{-2.5\unit}\subsubsection{Block Elements}
\begin{table}{x x}
-\bold{Command} & \bold{Output/Description} \\
+\bold{Command} & \bold{Output/Description} \\
\cline{1-2}
-\mono{\textbackslash section\{\}} & Header Level One \\
-\mono{\textbackslash subsection\{\}} & Header Level Two \\
-\mono{\textbackslash subsubsection\{\}} & Header Level Three \\
-\mono{\textbackslash hr} & Horizontal Rule \\
-\mono{\textbackslash inputblock\{\}} & Code block from external file \\
-\mono{\textbackslash inputblockenum\{\}} & Code block from external file with line numbering \\
-\mono{\textbackslash reset} & Reset baseline grid alignment
+\cmd{section\{\}} & Header Level One \\
+\cmd{subsection\{\}} & Header Level Two \\
+\cmd{subsubsection\{\}} & Header Level Three \\
+\cmd{hr} & Horizontal Rule \\
+\cmd{inputblock\{\}} & Code block from external file \\
+\cmd{inputblockenum\{\}} & Code block from external file with line numbering \\
+\cmd{reset}, (\cmd{resetv\{\}}) & Reset baseline grid alignment (with vertical offset height) \\
\end{table}
\reset
@@ -60,28 +62,24 @@
\item[description] Description list (arbitrary levels)
\item[codeblock] Verbatim code block
\item[codeblockenum] Verbatim code block with line numbering
- \item[mathblock] Math mode alignment block, similar to \mono{amsmath}'s \mono{align*}
+ \item[math] Math mode alignment block, equivalent to \mono{amsmath}'s \mono{align*}
\end{description}
\subsubsection{Tables}
-The \mono{table} environment's column specification parameter has two defined symbols: `\mono{x}' for left-aligned paragraphs, and `\mono{X}' for justified paragraphs. Horizontal separators should be specified using \mono{\textbackslash cline\{\}} rather than \mono{\textbackslash hline}.
+The \mono{table} environment's column specification parameter has two defined symbols: `\mono{x}' for left-aligned paragraphs, and `\mono{X}' for justified paragraphs. Horizontal separators should be specified using \cmd{cline\{\}} rather than \cmd{hline}.
\subsubsection{Figures}
-The \mono{figure} environment may contain:
-\begin{itemize}
- \item One or more instances of \mono{\textbackslash includegraphics\{\}},
- \item Zero or more instances of \mono{\textbackslash caption\{\}}.
-\end{itemize}
+The \mono{figure} environment may contain one or more instances of \cmd{includegraphics\{\}} and zero or more instances of \cmd{caption\{\}}.
\newpage
-\section{Usage Notes}
+\resetv{-3\unit}\section{Usage Notes}
\reset
\subsection{Dependencies}
\begin{itemize}
- \item The XeLaTeX typesetting software system.
+ \item The XeLaTeX typesetting software system
\item The following typefaces:
\begin{itemize}
\item Neue Haas Grotesk Display
@@ -92,30 +90,26 @@ The \mono{figure} environment may contain:
\begin{itemize}
\item \mono{amsmath, amssymb, datetime2, enumitem, eso-pic, fancyhdr,\\
footmisc, geometry, graphicx, hyperref, lastpage, listings,\\
- mathspec, microtype, realscripts, tabularx, tikz, ulem}
- \end{itemize}
- \item The following packages which are not included in the \mono{texlive} distribution:
- \begin{itemize}
- \item \mono{returntogrid}
+ mathspec, microtype, realscripts, returntogrid, tabularx, \\
+ tikz, ulem}
\end{itemize}
\end{itemize}
\subsection{Grid Alignment}
-\addfontfeature{Fractions=On} The positioning and spacing of all document elements are strictly defined in terms of a length of 1/6 of an inch, referred to internally as the \italic{unit}. Document elements are to remain aligned with an implicit 1/2-unit grid spanning the entire page. In order to ensure this alignment is preserved surrounding elements of variable height, it is possible to issue a \mono{\textbackslash reset} command immediately preceding paragraphs or block elements to be realigned. It is recommended to temporarily enable the \mono{debug} class option in order to verify consistent alignment during the document preparation process.
+\addfontfeature{Fractions=On} The positioning and spacing of all document elements are strictly defined in terms of a length of 1/6 of an inch, referred to internally as the \italic{unit}. Document elements are to remain aligned with an implicit 1/2-unit grid spanning the entire page. In order to ensure that this alignment is preserved surrounding elements of variable height, it is possible to issue a \cmd{reset} command immediately preceding paragraphs or block elements to be realigned. It is recommended to temporarily enable the \mono{debug} class option in order to verify consistent alignment during the document preparation process.
\subsection{Caveats}
\begin{itemize}
- \item Correct realignment of document elements via the \mono{\textbackslash reset} command may require multiple recompilations.
+ \item Correct realignment of document elements via the \cmd{reset} command may require multiple recompilations.
\item Correct typesetting of page numbers and the debug grid may require multiple recompilations.
- \item Grid alignments of tables are not well defined and must be corrected manually.
- \item Grid alignments of the uppermost element of each page are as of yet unable to be corrected.
+ \item Grid alignments of tables are not well-defined and must be corrected manually.
\end{itemize}
\newpage
-\section{Implementation}
+\resetv{-3\unit}\section{Implementation}
\reset (In progress.)
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
diff --git a/template.pdf b/template.pdf
index c871a12..ea132b4 100755
--- a/template.pdf
+++ b/template.pdf
Binary files differ
diff --git a/template.tex b/template.tex
index 6469ad4..3a4f1db 100755
--- a/template.tex
+++ b/template.tex
@@ -4,9 +4,9 @@
\begin{document}
-\section{Header Level One}
+\resetv{-3\unit}\section{Header Level One}
-\reset\subsection{Header Level Two}
+\subsection{Header Level Two}
\subsubsection{Header Level Three}
@@ -59,14 +59,14 @@ int main() {
}
\end{codeblock}
-\begin{mathblock}
-f(s) = \int_{0}^{\infty}\left[\mathrm{Math\ Block}\right]\, e^{-st}\end{mathblock}
+\begin{math}
+f(s) = \int_{0}^{\infty}\left[\mathrm{Math\ Block}\right]\, e^{-st}\, dt
+\end{math}
\newpage
-\section{Paragraph Test}
+\resetv{-3\unit}\section{Paragraph Test}
-\reset
In mathematics, computer science, and linguistics, a \bold{formal language} consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules. The alphabet of a formal language consist of symbols, letters, or tokens that concatenate into strings of the language. Each string concatenated from symbols of this alphabet is called a word, and the words that belong to a particular formal language are sometimes called \italic{well-formed words} or \italic{well-formed formulas}. A formal language is often defined by means of a formal grammar such as a regular grammar or context-free grammar, which consists of its formation rules.
The field of \bold{formal language theory} studies primarily the purely syntactical aspects of such languages---that is, their internal structural patterns. Formal language theory sprang out of linguistics, as a way of understanding the syntactic regularities of natural languages. In computer science, formal languages are used among others as the basis for defining the grammar of programming languages and formalized versions of subsets of natural languages in which the words of the language represent concepts that are associated with particular meanings or semantics.
@@ -74,7 +74,7 @@ The field of \bold{formal language theory} studies primarily the purely syntacti
\section{Table Test}
\begin{table}{x x x}
-\bold{Header 1} & \bold{Header 2} & \bold{Header 3} \\
+\bold{Header 1} & \bold{Header 2} & \bold{Header 3} \\
\cline{1-3}
And blood-black nothingness began to spin, & A system of cells interlinked within & Cells interlinked within cells interlinked \\
Within one stem; and dreadfully distinct & Against the dark, a tall white fountain played. & \italic{(Nabokov, 1962)}
@@ -99,11 +99,11 @@ One \> Two \> Three \> Four
\newpage
-\section{Image Test}
+\resetv{-3\unit}\section{Image Test}
\begin{figure}
-\reset\includegraphics{image.png}
+\reset\includegraphics[height=3.5in]{image.png}
\caption{Image Caption}
\end{figure}
-\end{document} \ No newline at end of file
+\end{document}