diff --git a/README.md b/README.md index 0ef1f90..fd9cf32 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,13 @@ This template defines some new variables to control the appearance of the title the text on the right side of the footer - `book` (defaults to `false`) - typeset as book. + typeset as book +- `logo` + + path to an image that will be displayed on the title page. The path is always relative to where pandoc is executed. The option `--resource-path` has no effect. +- `logo-width` (defaults to `100`) + + the width of the logo (in points) ## Examples diff --git a/eisvogel.tex b/eisvogel.tex index f8f6fdc..e479081 100644 --- a/eisvogel.tex +++ b/eisvogel.tex @@ -245,6 +245,10 @@ $if(geometry)$ $else$ \usepackage[margin=2.5cm,includehead=true,includefoot=true,centering]{geometry} $endif$ +$if(logo)$ +\usepackage[export]{adjustbox} +\usepackage{graphicx} +$endif$ $if(beamer)$ \newif\ifbibliography $endif$ @@ -704,6 +708,11 @@ $endif$ \vfill } +$if(logo)$ +\noindent +\includegraphics[width=$if(logo-width)$$logo-width$$else$100$endif$pt, left]{$logo$} +$endif$ + \textsf{$date$}} \end{flushleft} \end{titlepage} diff --git a/examples/build.sh b/examples/build.sh index 4501f03..ba13ace 100644 --- a/examples/build.sh +++ b/examples/build.sh @@ -36,3 +36,12 @@ pdftoppm -r 150 -png "book/book.pdf" > "book/book.png" pandoc "images-and-tables/images-and-tables.md" -o "images-and-tables/images-and-tables.pdf" --from markdown --template "../eisvogel.latex" --listings --resource-path "./images-and-tables/" pdftoppm -r 150 -png "images-and-tables/images-and-tables.pdf" > "images-and-tables/images-and-tables.png" + +# Important: Since the logo is a manually included image, the option "--resource-path" can't be used for specifying its location. +# The location of the logo has to be relative to where pandoc is executed, so we cd into the directory with the logo. +cd "logo-titlepage" +pandoc "logo-titlepage.md" -o "logo-titlepage.pdf" --from markdown --template "../../eisvogel.latex" --listings +pdftoppm -r 150 -png "logo-titlepage.pdf" > "logo-titlepage.png" +cd ".." + +rm "../eisvogel.latex" \ No newline at end of file diff --git a/examples/logo-titlepage/logo-titlepage.md b/examples/logo-titlepage/logo-titlepage.md new file mode 100644 index 0000000..ad6c16a --- /dev/null +++ b/examples/logo-titlepage/logo-titlepage.md @@ -0,0 +1,63 @@ +--- +title: "Vinaque sanguine metuenti cuiquam Alcyone fixus" +author: [Author Name] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +subtitle: "Aesculeae domus vincemur et Veneris adsuetus lapsum" +titlepage: true +titlepage-text-color: "7137C8" +titlepage-rule-color: "7137C8" +titlepage-rule-height: 2 +logo: "logo.pdf" +logo-width: 120 +... + +# 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. \ No newline at end of file diff --git a/examples/logo-titlepage/logo-titlepage.pdf b/examples/logo-titlepage/logo-titlepage.pdf new file mode 100644 index 0000000..aa7dca6 Binary files /dev/null and b/examples/logo-titlepage/logo-titlepage.pdf differ diff --git a/examples/logo-titlepage/logo-titlepage.png b/examples/logo-titlepage/logo-titlepage.png new file mode 100644 index 0000000..efb9711 Binary files /dev/null and b/examples/logo-titlepage/logo-titlepage.png differ diff --git a/examples/logo-titlepage/logo.pdf b/examples/logo-titlepage/logo.pdf new file mode 100644 index 0000000..f6804f3 Binary files /dev/null and b/examples/logo-titlepage/logo.pdf differ diff --git a/examples/logo-titlepage/logo.svg b/examples/logo-titlepage/logo.svg new file mode 100644 index 0000000..6fe84b7 --- /dev/null +++ b/examples/logo-titlepage/logo.svg @@ -0,0 +1,8 @@ + + + + + + + +