Compare commits
2 commits
12601194c3
...
2247012aff
Author | SHA1 | Date | |
---|---|---|---|
2247012aff | |||
e100325c9f |
6 changed files with 1261 additions and 21 deletions
|
@ -18,6 +18,7 @@ COPY --chown=root:root \
|
||||||
# install pandoc templates
|
# install pandoc templates
|
||||||
COPY --chown=root:root \
|
COPY --chown=root:root \
|
||||||
src/lev-protokoll.latex \
|
src/lev-protokoll.latex \
|
||||||
|
src/lev-dokument.latex \
|
||||||
/usr/local/share/pandoc/templates
|
/usr/local/share/pandoc/templates
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
|
|
60
src/Beispiel_Dokument.dok.md
Normal file
60
src/Beispiel_Dokument.dok.md
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
---
|
||||||
|
title: Example PDF
|
||||||
|
author: Der Vorstand des Lenaisten e.V.
|
||||||
|
date: 30.11.2320
|
||||||
|
|
||||||
|
subject: "Markdown"
|
||||||
|
keywords: [Markdown, Example]
|
||||||
|
|
||||||
|
# header-includes:
|
||||||
|
# - \PassOptionsToPackage{showframe}{geometry}
|
||||||
|
...
|
||||||
|
|
||||||
|
# Vinaque sanguine metuenti cuiquam Alcyone fixus
|
||||||
|
|
||||||
|
## Aesculeae domus vincemur et Veneris adsuetus lapsum
|
||||||
|
|
||||||
|
Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab
|
||||||
|
esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias
|
||||||
|
commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros
|
||||||
|
hamos ire arceor mandere spicula, in licet aliquando.
|
||||||
|
|
||||||
|
```java
|
||||||
|
public class Example implements LoremIpsum {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
if(args.length < 2) {
|
||||||
|
System.out.println("Lorem ipsum dolor sit amet");
|
||||||
|
}
|
||||||
|
} // Obscura atque coniuge, per de coniunx
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur.
|
||||||
|
Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota
|
||||||
|
destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente
|
||||||
|
Pirithoi abstulit, lapides.
|
||||||
|
|
||||||
|
## Lydia caelo recenti haerebat lacerum ratae at
|
||||||
|
|
||||||
|
Te concepit pollice fugit vias alumno **oras** quam potest
|
||||||
|
[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis,
|
||||||
|
vel pede inter si.
|
||||||
|
|
||||||
|
1. De neque iura aquis
|
||||||
|
2. Frangitur gaudia mihi eo umor terrae quos
|
||||||
|
3. Recens diffudit ille tantum
|
||||||
|
|
||||||
|
\begin{equation}\label{eq:neighbor-propability}
|
||||||
|
p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)}
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae
|
||||||
|
adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me.
|
||||||
|
|
||||||
|
> Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et
|
||||||
|
[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas
|
||||||
|
nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque
|
||||||
|
dura.
|
||||||
|
|
||||||
|
- Permulcens flebile simul
|
||||||
|
- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum.
|
|
@ -48,6 +48,13 @@ convert_pdfa = /opt/pdfa/bin/gs-919-linux_x86_64 \
|
||||||
/opt/pdfa/PDFA_def.ps \
|
/opt/pdfa/PDFA_def.ps \
|
||||||
$(1)
|
$(1)
|
||||||
|
|
||||||
|
# convert markdown to LaTeX
|
||||||
|
# params:
|
||||||
|
# 1: input file
|
||||||
|
# 2: pandoc template
|
||||||
|
# 3: output file
|
||||||
|
md2tex = $(call compile_md,$(1),$(2),latex,$(3))
|
||||||
|
|
||||||
# convert markdown to PDF
|
# convert markdown to PDF
|
||||||
# params:
|
# params:
|
||||||
# 1: input file
|
# 1: input file
|
||||||
|
|
1140
src/lev-dokument.latex
Normal file
1140
src/lev-dokument.latex
Normal file
File diff suppressed because it is too large
Load diff
33
src/lev-dokument.mk
Normal file
33
src/lev-dokument.mk
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#%SRCPAT% \.dok\.md
|
||||||
|
|
||||||
|
include /opt/lenaisten/compile-md.mk
|
||||||
|
|
||||||
|
PANDOCVARS := \
|
||||||
|
colorlinks:true \
|
||||||
|
csquotes:true \
|
||||||
|
hyperrefoptions:pdfa \
|
||||||
|
lang:de-DE
|
||||||
|
|
||||||
|
mdFiles := $(wildcard *.dok.md)
|
||||||
|
mdSuffix = $(patsubst %.dok.md,%$(1),$(mdFiles))
|
||||||
|
|
||||||
|
pdfFiles := $(call mdSuffix,.pdf)
|
||||||
|
texFiles := $(call mdSuffix,.tex)
|
||||||
|
|
||||||
|
.PHONY: all autodoc
|
||||||
|
all: pdf tex
|
||||||
|
autodoc: pdf
|
||||||
|
|
||||||
|
.PHONY: pdf tex
|
||||||
|
pdf: $(pdfFiles)
|
||||||
|
tex: $(texFiles)
|
||||||
|
|
||||||
|
# pdf
|
||||||
|
|
||||||
|
%.pdf: %.dok.md
|
||||||
|
$(call md2pdfa,$<,lev-dokument,$@)
|
||||||
|
|
||||||
|
# tex
|
||||||
|
|
||||||
|
%.tex: %.dok.md
|
||||||
|
$(call md2tex,$<,lev-dokument,$@)
|
|
@ -589,33 +589,26 @@ $endif$
|
||||||
\TeXofficeMargin2cm
|
\TeXofficeMargin2cm
|
||||||
\TeXofficeResetmargins
|
\TeXofficeResetmargins
|
||||||
|
|
||||||
% footer
|
|
||||||
\AtBeginDocument{%
|
|
||||||
\TeXofficeAdjustfooter{%
|
|
||||||
\begin{minipage}[b]{.8\textwidth}%
|
|
||||||
\color{gray}\Lenafooter%
|
|
||||||
\end{minipage} \hfill%
|
|
||||||
\begin{minipage}[b]{.15\textwidth}%
|
|
||||||
\raggedleft $date$ \\ Seite \pagemark\ von \pageref*{LastPage}%
|
|
||||||
\end{minipage}%
|
|
||||||
}%
|
|
||||||
}
|
|
||||||
|
|
||||||
% number "section" tags
|
% number "section" tags
|
||||||
\setcounter{secnumdepth}{1}
|
\setcounter{secnumdepth}{1}
|
||||||
% include down to "subsection" in TOC
|
% include down to "subsection" in TOC
|
||||||
\setcounter{tocdepth}{2}
|
\setcounter{tocdepth}{2}
|
||||||
|
|
||||||
% titlepage fonts
|
% komascript fonts
|
||||||
\setkomafont{title}{\bfseries\scshape\huge}
|
\setkomafont{title}{\bfseries\scshape\huge}
|
||||||
\addtokomafont{author}{\color{gray}}
|
\addtokomafont{author}{\color{gray}}
|
||||||
\addtokomafont{date}{\color{gray}}
|
\addtokomafont{date}{\color{gray}}
|
||||||
|
|
||||||
% section title font
|
|
||||||
\setkomafont{section}{\huge}
|
\setkomafont{section}{\huge}
|
||||||
|
|
||||||
% section label format
|
% section label format
|
||||||
\renewcommand*{\sectionformat}{\normalfont\Large TOP\ \thesection:\ }
|
\renewcommand*{\sectionformat}{\normalfont\Large TOP\ \thesection:\ }
|
||||||
|
|
||||||
|
% links with icons
|
||||||
|
\let\oldhref\href
|
||||||
|
\renewcommand{\href}[2]{%
|
||||||
|
\oldhref{#1}{\faIcon{external-link-alt}\underline{#2}}%
|
||||||
|
}
|
||||||
|
|
||||||
% logo in top right
|
% logo in top right
|
||||||
\backgroundsetup{
|
\backgroundsetup{
|
||||||
scale=1,
|
scale=1,
|
||||||
|
@ -629,10 +622,16 @@ $endif$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
% links with icons
|
% footer
|
||||||
\let\oldhref\href
|
\AtBeginDocument{%
|
||||||
\renewcommand{\href}[2]{%
|
\TeXofficeAdjustfooter{%
|
||||||
\oldhref{#1}{\faIcon{external-link-alt}\underline{#2}}%
|
\begin{minipage}[b]{.8\textwidth}%
|
||||||
|
\color{gray}\Lenafooter%
|
||||||
|
\end{minipage} \hfill%
|
||||||
|
\begin{minipage}[b]{.15\textwidth}%
|
||||||
|
\raggedleft $date$ \\ Seite \pagemark\ von \pageref*{LastPage}%
|
||||||
|
\end{minipage}%
|
||||||
|
}%
|
||||||
}
|
}
|
||||||
|
|
||||||
%BOOKMARK end lenaisten pre
|
%BOOKMARK end lenaisten pre
|
||||||
|
@ -994,7 +993,7 @@ $endif$
|
||||||
\begin{center}%
|
\begin{center}%
|
||||||
% begin maketitle
|
% begin maketitle
|
||||||
\makeatletter%
|
\makeatletter%
|
||||||
\pdfbookmark[1]{$title$ $date$}{title}%
|
\pdfbookmark[1]{$title-meta$ $date$}{title}%
|
||||||
{\usekomafont{title}\@title\par}%
|
{\usekomafont{title}\@title\par}%
|
||||||
\vskip 1em%
|
\vskip 1em%
|
||||||
{\usekomafont{author}\@author\par}%
|
{\usekomafont{author}\@author\par}%
|
||||||
|
@ -1032,7 +1031,7 @@ $endif$
|
||||||
{%
|
{%
|
||||||
\renewcommand{\contentsname}{Tagesordnung}%
|
\renewcommand{\contentsname}{Tagesordnung}%
|
||||||
\hypersetup{hidelinks}%
|
\hypersetup{hidelinks}%
|
||||||
\pdfbookmark[1]{Tagesordnung}{toc}%
|
\pdfbookmark[1]{\contentsname}{toc}%
|
||||||
\tableofcontents%
|
\tableofcontents%
|
||||||
}%
|
}%
|
||||||
\newpage%
|
\newpage%
|
||||||
|
|
Loading…
Reference in a new issue