diff --git a/.gitignore b/.gitignore index b903bb2..3f9109d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# LaTeX +*.aux +*.out + # From Reveal.js .idea/ *.iml diff --git a/css/theme/latex.css b/css/theme/latex.css index 37e91a5..0662ae5 100644 --- a/css/theme/latex.css +++ b/css/theme/latex.css @@ -79,9 +79,17 @@ body { body .layout-preview img { width: auto; height: auto; - max-width: 90%; - max-height: 90%; + max-width: 90vw; + max-height: 90vh; box-shadow: 0.2em 0.2em 0.5em 0 rgba(0, 0, 0, 0.3); } + body .layout-preview img[src$="-crop.svg"] { + background: white; + padding: calc(var(--margin) * var(--square)); + object-fit: contain; + width: calc(0.7 * var(--square)); } + body .layout-preview img[src$="-orig.svg"] { + background: white; + object-fit: contain; } body .layout-preview figcaption { position: absolute; background: rgba(0, 0, 0, 0.5); diff --git a/css/theme/source/latex.scss b/css/theme/source/latex.scss index 149568f..d0f26f2 100644 --- a/css/theme/source/latex.scss +++ b/css/theme/source/latex.scss @@ -112,9 +112,19 @@ body { img { width: auto; height: auto; - max-width: 90%; - max-height: 90%; + max-width: 90vw; + max-height: 90vh; box-shadow: .2em .2em .5em 0 rgba(0, 0, 0, .3); + &[src$="-crop.svg"] { + background: white; + padding: calc(var(--margin) * var(--square)); + object-fit: contain; + width: calc(0.7 * var(--square)); + } + &[src$="-orig.svg"] { + background: white; + object-fit: contain; + } } figcaption { position: absolute; diff --git a/sections/german/03/03.md b/sections/german/03/03.md index bbe5165..2a11835 100644 --- a/sections/german/03/03.md +++ b/sections/german/03/03.md @@ -3,3 +3,95 @@

Grundstruktur eines LATEX-Dokuments

+ +--- + +
+
+

Präambel

+

TODO

+
+
+ +--- + +
+
+

Absätze

+
Einfache Zeilenumbrüche
+im Code werden
+ignoriert.
+
+Leerzeilen erzeugen einen neuen Absatz, 
+standardmäßig mit Einzug. 
+Manuelle Zeilenumbrüche können mit 
+zwei Backslashes erzwungen werden, \\\\
+haben in Fließtext aber eigentlich 
+nichts verloren.
+
+
+ +
+
+ +--- + +
+
+

Abschnitte und Kapitel

+

Texte werden durch Überschriften in Abschnitte und Kapitel unterteilt. Immer verfügbar:

+
\section{Ebene 1}
+\subsection{Ebene 2}
+\subsubsection{Ebene 3}
+\paragraph{Ebene 4}
+\subparagraph{Ebene 5}
+

Je nach Dokumentenklasse zusätzlich:

+
\chapter{Kapitel}
+\part{Teil}
+
+
+ +
+
+ +--- + +
+
+

Titel

+

TODO

+
+
+ +--- + +
+
+

Inhaltsverzeichnis

+

TODO

+
+
+ +--- + +
+
+

Weitere Verzeichnisse

+

TODO

+
+
+ +--- + +
+
+

Spielwiese

+

TODO:

+ +
+
+ + diff --git a/sections/german/03/abschnitte-crop.svg b/sections/german/03/abschnitte-crop.svg new file mode 100644 index 0000000..ac7ce4e --- /dev/null +++ b/sections/german/03/abschnitte-crop.svg @@ -0,0 +1,1207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sections/german/03/abschnitte-orig.svg b/sections/german/03/abschnitte-orig.svg new file mode 100644 index 0000000..fbb23d3 --- /dev/null +++ b/sections/german/03/abschnitte-orig.svg @@ -0,0 +1,1207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sections/german/03/abschnitte.tex b/sections/german/03/abschnitte.tex new file mode 100644 index 0000000..4c9122b --- /dev/null +++ b/sections/german/03/abschnitte.tex @@ -0,0 +1,14 @@ +\documentclass[a4paper]{article} +\usepackage{lmodern} +\usepackage{amssymb,amsmath} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{hyperref} +\begin{document} +\thispagestyle{empty} +\section{Ebene 1} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. +\subsection{Ebene 2} At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +\subsubsection{Ebene 3} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. +\paragraph{Ebene 4} At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +\subparagraph{Ebene 5} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. +\end{document} diff --git a/sections/german/03/absätze-crop.svg b/sections/german/03/absätze-crop.svg new file mode 100644 index 0000000..5817023 --- /dev/null +++ b/sections/german/03/absätze-crop.svg @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sections/german/03/absätze-orig.svg b/sections/german/03/absätze-orig.svg new file mode 100644 index 0000000..0973b3d --- /dev/null +++ b/sections/german/03/absätze-orig.svg @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sections/german/03/absätze.tex b/sections/german/03/absätze.tex new file mode 100644 index 0000000..8658ff9 --- /dev/null +++ b/sections/german/03/absätze.tex @@ -0,0 +1,16 @@ +\documentclass[a4paper]{article} +\usepackage{lmodern} +\usepackage{amssymb,amsmath} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{hyperref} +\begin{document} +\thispagestyle{empty} +\section*{Absätze} +Einfache Zeilenumbrüche im Code werden ignoriert. + +Leerzeilen erzeugen einen neuen Absatz, standardmäßig mit Einzug. +Manuelle Zeilenumbrüche können mit zwei Backslashes erzwungen werden, +\textbackslash{}\textbackslash{} haben in Fließtext aber eigentlich +nichts verloren. +\end{document} diff --git a/sections/german/04/04.md b/sections/german/04/04.md index 01c80e4..c90646b 100644 --- a/sections/german/04/04.md +++ b/sections/german/04/04.md @@ -24,10 +24,8 @@

Hauptdatei 👑

@@ -35,6 +33,7 @@ \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} +\title{Ein Titel} \begin{document} \maketitle \tableofcontents @@ -43,7 +42,7 @@ \end{document}
- ![](sections/german/04/projekt_dokument.png) + ![](sections/german/04/main-orig.svg)
--- @@ -61,7 +60,7 @@ Inhalt von Abschnitt 1.

- ![](sections/german/04/projekt_dokument.png) + ![](sections/german/04/main-orig.svg)
diff --git a/sections/german/04/main-crop.svg b/sections/german/04/main-crop.svg new file mode 100644 index 0000000..6b9b575 --- /dev/null +++ b/sections/german/04/main-crop.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sections/german/04/main-orig.svg b/sections/german/04/main-orig.svg new file mode 100644 index 0000000..04e6159 --- /dev/null +++ b/sections/german/04/main-orig.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sections/german/04/main.tex b/sections/german/04/main.tex new file mode 100644 index 0000000..91c2e6a --- /dev/null +++ b/sections/german/04/main.tex @@ -0,0 +1,15 @@ +\documentclass{article} +\usepackage[ngerman]{babel} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\title{Ein Titel} +\begin{document} + \maketitle + \tableofcontents + \section{Dies ist Abschnitt 1} +Hier ein Absatz zum +Inhalt von Abschnitt 1. + \section{Dies ist Abschnitt 2} +Hier ein Absatz zum +Inhalt von Abschnitt 2. +\end{document} diff --git a/tex2svg b/tex2svg new file mode 100755 index 0000000..231a9bd --- /dev/null +++ b/tex2svg @@ -0,0 +1,19 @@ +#!/usr/bin/ruby + +0.upto(7) do |i| + Dir.chdir "sections/german/0#{i}" + `ls -1 *.tex`.split("\n").map { |file| file.sub(/\.tex$/, '')}.each do |file| + `pdflatex #{file}.tex` + `pdfcrop #{file}.pdf` + `pdf2svg #{file}.pdf #{file}-orig.svg` + `pdf2svg #{file}-crop.pdf #{file}-crop.svg` + `rm #{file}.aux` + `rm #{file}.log` + `rm #{file}.out` + `rm #{file}.pdf` + `rm #{file}.svg` + `rm #{file}.toc` + `rm #{file}-crop.pdf` + end + Dir.chdir "../../.." +end