-
Notifications
You must be signed in to change notification settings - Fork 7
/
template.pdf.p
72 lines (57 loc) · 2.21 KB
/
template.pdf.p
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
◊(require racket/file racket/system)
◊(define latex-source ◊string-append{
\documentclass[a4paper,12pt]{article}
\usepackage[ngerman]{babel}
\usepackage{geometry}
\usepackage{fancyhdr} %Paket fuer selbstgestaltete Kopfzeilen
\usepackage[table]{xcolor}
\usepackage{framed}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{xltabular}
%\usepackage{ltablex}
\usepackage{lmodern}
\usepackage{fontspec}
\usepackage[onehalfspacing]{setspace}
\setmainfont{Overpass}
\pagestyle{fancy} %Seitenstil der mit fancyhdr benutzt werden muss
\geometry{a4paper,right=2.5cm,left=2.5cm,top=1cm,bottom=6cm}
\setlength{\headheight}{3.5cm} %Groesse des Seitenkopfes
\setlength{\headwidth}{1\textwidth}
\renewcommand{\headrulewidth}{0cm} %Strichdicke unter dem Seitenkopf
\renewcommand{\arraystretch}{1.2}
\usepackage{hyperref}
\definecolor{hsblue}{HTML}{17a2b8}
\definecolor{hsgrey}{HTML}{415365}
\definecolor{shadecolor}{HTML}{1e1e1e}
\definecolor{codecolor}{HTML}{d4d4d4}
\definecolor{comment}{HTML}{6a9955}
\definecolor{keyword}{HTML}{569cd6}
\definecolor{class}{HTML}{9cdcfe}
\definecolor{string}{HTML}{ce9178}
\definecolor{regex}{HTML}{d16969}
\definecolor{number}{HTML}{b5cea8}
\begin{document}
\shorthandoff{"}
\color{hsgrey}
%\tableofcontents
{\chead{\textcolor{hsgrey}
%{\flushright {\includegraphics[width=0.12\textwidth]{../source/images/hacker-school-logo-1.png}}
%\qquad \huge \bf Title \\
%{\textcolor{hsblue}{\rule[0.5em]{\textwidth}{1.2pt}}}
%\\}
}}
{\cfoot{\textcolor{hsgrey}{\thepage}}}
◊(latex-replace (apply string-append (cdr doc)))
\shorthandon{"}
\end{document}})
◊(define working-directory
(make-temporary-file "pollen-latex-work-~a" 'directory))
◊(define temp-ltx-path (build-path working-directory "temp.ltx"))
◊(display-to-file latex-source temp-ltx-path #:exists 'replace)
◊(define command (format "lualatex -output-directory ~a ~a"
working-directory temp-ltx-path))
◊(unless (system command) (error "pdflatex: rendering error"))
◊(let ([pdf (file->bytes (build-path working-directory "temp.pdf"))])
(delete-directory/files working-directory)
pdf)