diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-04-02 17:54:51 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-04-02 17:54:51 +0200 |
| commit | 9290152847286962f4c9c65ee01dfb9c6a367fcc (patch) | |
| tree | 5e5666f2a3b16b304bbd2a79e32bd7a0295bfa48 /latex | |
| parent | 3e0fcaf2bea7864235ec415895ecd7b788a1531c (diff) | |
| download | unterricht-9290152847286962f4c9c65ee01dfb9c6a367fcc.tar.gz unterricht-9290152847286962f4c9c65ee01dfb9c6a367fcc.zip | |
add my math lesson for composite solid objects
Ignore all files in 'Copyrighted/' directories.
Search the common image directory 'latex/images/' when generating
pdfs with pandoc.
Use a pandoc filter for the custom '.center' class to generated centered
images when converting from markdown beamer to pdf.
Diffstat (limited to 'latex')
| -rw-r--r-- | latex/images/geogebra.jpeg | bin | 0 -> 15497 bytes | |||
| -rw-r--r-- | latex/pandoc_center_img.lua | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/latex/images/geogebra.jpeg b/latex/images/geogebra.jpeg Binary files differnew file mode 100644 index 00000000..2d20d547 --- /dev/null +++ b/latex/images/geogebra.jpeg diff --git a/latex/pandoc_center_img.lua b/latex/pandoc_center_img.lua new file mode 100644 index 00000000..18782725 --- /dev/null +++ b/latex/pandoc_center_img.lua @@ -0,0 +1,20 @@ +-- Based on: +-- https://pandoc.org/lua-filters.html#center-images-in-latex-and-html-output +-- Licensed under MIT License found at: +-- https://github.com/TomBener/pandoc-templates/blob/05aba224519d8a2b037108948bde0d820860b786/LICENSE + +-- Filter images with this function if the target format is LaTeX. +if FORMAT:match('beamer') then + function Image(elem) + -- Surround all images with the 'center' class with image-centering raw LaTeX. + if elem.classes[1] == "center" then + return { + pandoc.RawInline('latex', '\\hfill\\break{\\centering'), + elem, + pandoc.RawInline('latex', '\\par}') + } + else + return elem + end + end +end |
