Skip to content

Commit 76d2350

Browse files
authored
Tpm cleanups (#48)
* add breaking sample of & in tcgnote * move draft text up, widen toc numbers as needed, and delete tcgnote/example * move toc fixes * squelch the draft text * move toc hacks * spell accsupp properly * minor changes to draft watermark * try using draftwatermark * commit file that didn't get committed * move draftwatermark * tweak draft watermark options * lighter
1 parent 3d8d7de commit 76d2350

File tree

3 files changed

+20
-41
lines changed

3 files changed

+20
-41
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ RUN tlmgr update --self && \
4242
newunicodechar \
4343
tocloft \
4444
tools \
45-
changepage
45+
changepage \
46+
draftwatermark
4647

4748
RUN apk upgrade && apk add --no-cache \
4849
bash \

sample1.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,6 @@ int main() {
125125
}
126126
```
127127

128-
\begin{tcgnote}
129-
some notes, bla bla bla bla bla bla, hello bla, hello bla. this is some words,
130-
watch out for this thing. you have to know about it. thanks for reading this note!
131-
\end{tcgnote}
132-
133-
\begin{tcgexample}
134-
do it this way
135-
\end{tcgexample}
136-
137128
## Another Couple Tables
138129

139130
Uncaptioned table:

template/eisvogel.latex

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
%%
3535

3636
%% Enable useful error output.
37-
\errorcontextlines=10000
37+
\errorcontextlines 10000
3838

3939
%%
4040
% This template has been heavily customized for Trusted Computing Group.
@@ -124,6 +124,15 @@ $endif$
124124

125125
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
126126

127+
% Clean up the TOC a bit by ensuring that long section numbers don't overlap.
128+
% https://tex.stackexchange.com/questions/64115/table-of-contents-chapter-number-width
129+
\usepackage{tocloft}
130+
\makeatletter
131+
\renewcommand{\numberline}[1]{
132+
\@cftbsnum #1\@cftasnum~\@cftasnumb
133+
}
134+
\makeatother
135+
127136
% PDF metadata
128137
\hypersetup{
129138
$if(title-meta)$
@@ -192,17 +201,6 @@ $endif$
192201
\RaggedRight{}
193202
\sloppy
194203

195-
% Define some special environments for TPM spec style NOTE and EXAMPLE
196-
\usepackage{changepage}
197-
\newenvironment{tcgnote}
198-
{\begin{adjustwidth}{6em}{}
199-
\makebox[0pt][r]{\makebox[6em][l]{NOTE:}}\ignorespaces}
200-
{\end{adjustwidth}}
201-
\newenvironment{tcgexample}
202-
{\begin{adjustwidth}{6em}{}
203-
\makebox[0pt][r]{\makebox[6em][l]{EXAMPLE:}}\ignorespaces}
204-
{\end{adjustwidth}}
205-
206204
% Customizations to the behavior of tables
207205
$if(tables)$
208206
\usepackage{longtable,booktabs,array}
@@ -584,20 +582,8 @@ $else$
584582

585583
\fancypagestyle{eisvogel-header-footer}{
586584
\fancyhead{}
587-
\fancyhead[C]
588-
{
589-
\ifthenelse{\equal{\detokenize{$status$}}{\detokenize{DRAFT}}}
590-
{
591-
\begin{textblock*}{8.5in}(-0.3in,0.4in)
592-
\fontsize{300}{360}{
593-
\begin{turn}{50}
594-
\textsf{\textcolor{gray}{\transparent{0.1}{DRAFT}}}
595-
\end{turn}
596-
}
597-
\end{textblock*}
598-
}
599-
{}
600-
} \fancyfoot{}
585+
\fancyhead[C]{}
586+
\fancyfoot{}
601587
\fancyfoot[C]
602588
{
603589
\begin{textblock*}{8.5in}(0in,10.7in)
@@ -727,11 +713,12 @@ $if(template)$
727713
{}
728714
$endif$
729715

730-
% Clean up the TOC a bit by ensuring that long section numbers don't overlap.
731-
% \usepackage[titles]{tocloft}
732-
% \renewcommand*{\cftsecnumwidth}{10em}
733-
% \renewcommand*{\cftsubsecnumwidth}{10em}
734-
% \renewcommand*{\cftsubsubsecnumwidth}{10em}
716+
\ifthenelse{\equal{\detokenize{$status$}}{\detokenize{DRAFT}}}
717+
{
718+
\usepackage[scale=2, colorspec=0.95]{draftwatermark}
719+
}
720+
{}
721+
735722
\begin{document}
736723

737724
%%

0 commit comments

Comments
 (0)