summaryrefslogtreecommitdiff
path: root/doc.tex
blob: 14b63d0cb5d65fea8810997e84d5f79a8558473b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
\documentclass{microstructure}

\author{DistressNetwork°}

\begin{document}

\section{Microstructure Documentation}

\hr

\mono{microstructure} is a document class for the XeLaTeX typesetting software system. It aims to provide a well-defined and consistent visual and typographical style, as a print-oriented adaptation of the graphical style of the DistressNetwork° website.\footnote{DistressNetwork. ``Style Template.'' \url{https://distress.network/meta/styletest}.} This document describes its defined features, usage, and annotated implementation.

\subsection{Class Options}
\begin{description} \addfontfeature{Fractions=On}
	\item[debug] Prints a 1/2-unit (1/12 in) square grid on every page of output, for monitoring the positioning of document elements.
	\item[fleqn] Aligns math block elements to the left, as in the \mono{article} class.
	\item[nohf] Suppresses page header and footer generation.
\end{description}

\subsection{Commands}

\begin{itemize}
	\item Preamble: \mono{\textbackslash author\{\}} defines the author name in the page header.
\end{itemize}

\subsubsection{Inline Elements}
\begin{table}{x x}
\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
\end{table}

\newpage

\subsubsection{Block Elements}
\begin{table}{x x}
\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
\end{table}

\reset
\subsection{Environments}
\begin{description}[labelwidth=\dimexpr1.5in-\labelsep]
	\item[itemize] Unordered list (three levels)
	\item[enumerate] Ordered list (three levels)
	\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*}
\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}.

\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}

\newpage

\section{Usage Notes}

\reset
\subsection{Dependencies}

\begin{itemize}
	\item The XeLaTeX typesetting software system.
	\item The following typefaces:
	\begin{itemize}
		\item Neue Haas Grotesk Display
		\item Neue Haas Grotesk Text
		\item JetBrains Mono
	\end{itemize}
	\item The following packages which are included in the \mono{texlive} distribution:
	\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}
	\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.

\subsection{Caveats}

\begin{itemize}
	\item Correct realignment of document elements via the \mono{\textbackslash 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.
\end{itemize}

\newpage

\section{Implementation}

\reset (In progress.)

%\inputblockenum{microstructure.cls}[firstline=x,lastline=x]

\end{document}