Skip to content

Commit e3fc52a

Browse files
committed
Fix several small issues with the template:
1. Fix links from the table of tables 2. Hide horizontal rules in tables 3. Fix overhang issue (note: this required disabling full-justification)
1 parent c828544 commit e3fc52a

File tree

4 files changed

+68
-26
lines changed

4 files changed

+68
-26
lines changed

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
FROM pandoc/latex:2.19
1+
FROM pandoc/latex:3.1.1
22

3-
COPY ./img/* /resources/img/
4-
COPY ./template/* /resources/templates/
5-
COPY ./filter/* /resources/filters/
6-
7-
RUN tlmgr list
83
RUN tlmgr update --self && \
94
tlmgr install \
105
merriweather \
@@ -37,7 +32,8 @@ RUN tlmgr update --self && \
3732
transparent \
3833
ulem \
3934
hardwrap \
40-
catchfile
35+
catchfile \
36+
ragged2e
4137

4238
RUN apk upgrade && apk add --no-cache \
4339
bash \
@@ -56,7 +52,7 @@ RUN pip install pandocfilters
5652
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
5753
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
5854

59-
RUN npm install --global --unsafe-perm [email protected] puppeteer@16.1.0 [email protected] [email protected] typescript@4.7.4
55+
RUN npm install --global --unsafe-perm [email protected] puppeteer@19.8.5 [email protected] [email protected] typescript@5.0.4
6056

6157
# Install latest pandiff, which has not been released in a while
6258
# This pre-release build has --reference-doc support for docx output
@@ -66,6 +62,10 @@ RUN cd /src/pandiff && git checkout d1d468b2c4d81c622ff431ef718b1bf0daaa03db
6662
RUN cd /src/pandiff && npm install @types/node --save-dev
6763
RUN npm install --global /src/pandiff
6864

65+
COPY ./img/* /resources/img/
66+
COPY ./template/* /resources/templates/
67+
COPY ./filter/* /resources/filters/
68+
6969
# mktexpk gets executed and needs a home dir, build one
7070
RUN mkdir -m 0777 /home/user
7171
ENV HOME="/home/user"

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ sed 's/```mermaid *{/```{.mermaid /g' "${input_file}" > "${build_dir}/${input_fi
242242
sed 's/^---$/\\newpage/g;1s/\\newpage/---/g' "${build_dir}/${input_file}.1" > "${build_dir}/${input_file}.2"
243243

244244
# Transform 3
245-
# Transform sections before the table of contents into addsec, which does not number them.
245+
# Transform sections before the table of contents into section*, which does not number them.
246246
# While we're doing this, transform the case to all-caps.
247-
sed '0,/\\tableofcontents/s/^# \(.*\)/\\addsec\{\U\1\}/g' "${build_dir}/${input_file}.2" > "${build_dir}/${input_file}.3"
247+
sed '0,/\\tableofcontents/s/^# \(.*\)/\\section*\{\U\1\}/g' "${build_dir}/${input_file}.2" > "${build_dir}/${input_file}.3"
248248

249249
# Grab the date from the front matter and generate the full date and year.
250250
DATE="$(grep date: "${input_file}" | head -n 1 | cut -d ' ' -f 2)"

sample1.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,52 @@ Table: Fantastic Table
138138
| **Column 1** | **Column 2** | **Column 3** |
139139
| ------------ | ------------ | ------------ |
140140
| AAAAAAAA | BBBBBBBB | CCCCCCCC |
141+
142+
> Table: Informative Table
143+
>
144+
> | **Column 1** | **Column 2** | **Column 3** |
145+
> | ------------ | ------------ | ------------ |
146+
> | AAAAAAAA | BBBBBBBB | CCCCCCCC |
147+
> | DDDDDDDD | EEEEEEEE | FFFFFFFF |
148+
>
149+
150+
# References
151+
152+
[1] Trusted Computing Group, "DICE Protection Environment," 2023. [Online].
153+
Available: https://trustedcomputinggroup.org.
154+
155+
[2] Trusted Computing Group, "DICE Certificate Profiles," 2020. [Online].
156+
Available: https://trustedcomputinggroup.org.
157+
158+
[3] Internet Engineering Task Force, "Cryptographic Message Syntax (CMS)," 2009. [Online].
159+
Avilable: https://www.ietf.org/rfc/rfc5652.txt
160+
161+
[4] Internet Engineering Task Force, "PKCS #10: Certification Request Syntax Specification Version 1.7," 2000. [Online].
162+
Avilable: https://www.ietf.org/rfc/rfc2986.txt
163+
164+
165+
Trusted Computing Group, "DICE Protection Environment," 2023. [Online].
166+
Available: https://trustedcomputinggroup.org.
167+
168+
Trusted Computing Group, "DICE Certificate Profiles," 2020. [Online].
169+
Available: https://trustedcomputinggroup.org.
170+
171+
Internet Engineering Task Force, "Cryptographic Message Syntax (CMS)," 2009. [Online].
172+
Avilable: https://www.ietf.org/rfc/rfc5652.txt
173+
174+
Internet Engineering Task Force, "PKCS #10: Certification Request Syntax Specification Version 1.7," 2000. [Online].
175+
Avilable: https://www.ietf.org/rfc/rfc2986.txt
176+
177+
>
178+
> Trusted Computing Group, "DICE Protection Environment," 2023. [Online].
179+
> Available: https://trustedcomputinggroup.org.
180+
>
181+
> Trusted Computing Group, "DICE Certificate Profiles," 2020. [Online].
182+
> Available: https://trustedcomputinggroup.org.
183+
>
184+
> Internet Engineering Task Force, "Cryptographic Message Syntax (CMS)," 2009. [Online].
185+
> Avilable: https://www.ietf.org/rfc/rfc5652.txt
186+
>
187+
> Internet Engineering Task Force, "PKCS #10: Certification Request Syntax Specification Version 1.7," 2000. [Online].
188+
> Avilable: https://www.ietf.org/rfc/rfc2986.txt
189+
>

template/eisvogel.latex

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,11 @@ $highlighting-macros$
342342
\usepackage{fvextra}
343343
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}}
344344

345+
% Left-justify the document.
346+
\usepackage[document]{ragged2e}
347+
\RaggedRight
348+
\sloppy
349+
345350
$endif$
346351
$if(tables)$
347352
\usepackage{longtable,booktabs,array}
@@ -366,20 +371,6 @@ $else$
366371
\makesavenoteenv{longtable}
367372
$endif$
368373
$endif$
369-
% Workaround for the fact that longtable increments the table counter
370-
% even when there is no caption.
371-
% Source: https://tex.stackexchange.com/a/106191
372-
\usepackage{etoolbox}
373-
\makeatletter
374-
\newif\ifLT@nocaption
375-
\preto\longtable{\LT@nocaptiontrue}
376-
\appto\endlongtable{%
377-
\ifLT@nocaption
378-
\addtocounter{table}{\m@ne}%
379-
\fi}
380-
\preto\LT@caption{%
381-
\noalign{\global\LT@nocaptionfalse}}
382-
\makeatother
383374
% add backlinks to footnote references, cf. https://tex.stackexchange.com/questions/302266/make-footnote-clickable-both-ways
384375
$if(footnotes-disable-backlinks)$
385376
$else$
@@ -709,7 +700,9 @@ $if(tables)$
709700
\definecolor{table-rule-color}{HTML}{FFFFFF}
710701

711702
\arrayrulecolor{table-rule-color} % color of \toprule, \midrule, \bottomrule
712-
\setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule
703+
\setlength\heavyrulewidth{0em} % thickness of \toprule, \bottomrule
704+
\setlength\lightrulewidth{0em} % thickness of \midrule
705+
\setlength\arrayrulewidth{0em} % thickness of array rules
713706
\renewcommand{\arraystretch}{1.3} % spacing (padding)
714707

715708
$if(table-use-row-colors)$
@@ -1117,7 +1110,7 @@ $if(beamer)$
11171110
$if(toc-title)$
11181111
\frametitle{$toc-title$}
11191112
$endif$
1120-
\tableofcontents[hideallsubsections]
1113+
\tableofcontents[hideallsubsections]
11211114
\end{frame}
11221115
$if(toc-own-page)$
11231116
\newpage

0 commit comments

Comments
 (0)