Skip to content

Improve TOC indentation, add equations and references to samples #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 16, 2023
Merged
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ COPY ./filter/* /resources/filters/
RUN mkdir -m 0777 /home/user
ENV HOME="/home/user"

COPY ./filter/pandoc-crossref.yaml /home/user/.pandoc-crossref/config.yaml

COPY build.sh /usr/bin/build.sh
ENTRYPOINT ["/usr/bin/build.sh"]
CMD ["--help"]
4 changes: 4 additions & 0 deletions filter/pandoc-crossref.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
figPrefix: "Figure"
eqnPrefix: "Equation"
tblPrefix: "Table"
secPrefix: "Clause"
2 changes: 1 addition & 1 deletion filter/parse-html.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function RawBlock (raw)

function RawInline (raw)
return raw.format:match 'html'
and pandoc.RawInline(raw.text, 'html')
and pandoc.RawInline('html', raw.text)
or raw
end

22 changes: 17 additions & 5 deletions sample1.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Draft specification, with a list of tables and a list of figures.
> Informative text 2: here is a block of
> informative text.

## Details
## Details {#sec:details}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
Expand All @@ -73,21 +73,31 @@ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.

00 01 02 03 04<sub>16</sub>
### Hidden details {.unlisted}

a<sup>n</sup> + b<sup>n</sup> = c<sup>n</sup>
An inline bit of math is here: $00 01 02 03 04_{16}$

Here is an equation:

$$a^n + b^n = c^n$$ {#eq:FermatsLastTheorem}

As @eq:FermatsLastTheorem demonstrates, math is hard.

## Figures

### Computer

![a computer](computer.jpg){#fig:computer}

as @fig:computer shows: computers are.

Remember from @sec:details

## Tables

### Mandatory Algorithms

Table: List of Mandatory Algorithms
Table: List of Mandatory Algorithms {#tbl:algorithms}

| **Algorithm ID** | **M/R/O/D** | **Comments** |
| ---------------- | ----------- | --------------------------------------------- |
Expand All @@ -111,6 +121,8 @@ Table: List of Mandatory Algorithms

### Mandatory Curves

This table is a lot like @tbl:algorithms.

Table: List of Mandatory Curves

| **Curve Identifier** | **M/R/O/D** | **Comments** |
Expand Down Expand Up @@ -203,4 +215,4 @@ Internet Engineering Task Force, "PKCS #10: Certification Request Syntax Specifi

4. Internet Engineering Task Force,
"PKCS #10: Certification Request Syntax Specification Version 1.7," 2000.
[Online]. Avilable: <https://www.ietf.org/rfc/rfc2986.txt>.
[Online]. Avilable: <https://www.ietf.org/rfc/rfc2986.txt>.
3 changes: 3 additions & 0 deletions sample3.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ Table: List of Mandatory Curves

This section contains a Grid Table.

Table: Temperatures

+---------------------+-----------------------+
| Location | Temperature 1961-1990 |
| | in degree Celsius |
Expand All @@ -153,6 +155,7 @@ This section contains a Grid Table.
This section contains an HTML Table.

<table>
<caption>HTML Table</caption>
<colgroup>
<col style="width: 13%" />
<col style="width: 86%" />
Expand Down
6 changes: 4 additions & 2 deletions template/eisvogel.latex
Original file line number Diff line number Diff line change
Expand Up @@ -666,19 +666,21 @@ $endif$
\RedeclareSectionCommand[
runin=false,
afterindent=false,
tocnumwidth=3em,
tocnumwidth=1.5em,
beforeskip=\baselineskip,
afterskip=0em]{section}
\RedeclareSectionCommand[
runin=false,
afterindent=false,
tocindent=1.5em,
tocnumwidth=3em,
beforeskip=.75\baselineskip,
afterskip=0em]{subsection}
\RedeclareSectionCommand[
runin=false,
afterindent=false,
tocnumwidth=3em,
tocindent=4.5em,
tocnumwidth=4em,
beforeskip=.5\baselineskip,
afterskip=0em]{subsubsection}
\RedeclareSectionCommand[
Expand Down