Browse Source

Issue 61: Added support for a logo on the title page.

pull/67/head
Wandmalfarbe 6 years ago
parent
commit
7f36404e0b
  1. 8
      README.md
  2. 9
      eisvogel.tex
  3. 9
      examples/build.sh
  4. 63
      examples/logo-titlepage/logo-titlepage.md
  5. BIN
      examples/logo-titlepage/logo-titlepage.pdf
  6. BIN
      examples/logo-titlepage/logo-titlepage.png
  7. BIN
      examples/logo-titlepage/logo.pdf
  8. 8
      examples/logo-titlepage/logo.svg

8
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

9
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}

9
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"

63
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.

BIN
examples/logo-titlepage/logo-titlepage.pdf

Binary file not shown.

BIN
examples/logo-titlepage/logo-titlepage.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

BIN
examples/logo-titlepage/logo.pdf

Binary file not shown.

8
examples/logo-titlepage/logo.svg

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="512" height="512" version="1.1" viewBox="0 0 135.467 135.467" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0,-161.535)" fill="#7137c8">
<path d="m2.64584 170.002c-18.5208 153.458 129.646 148.167 129.646 68.792-87.3127 68.791-129.646-34.396-129.646-68.792z"/>
<path d="m4.9879 167.66c153.458-18.521 148.167 129.646 68.792 129.646 68.7911-87.312-34.396-129.646-68.792-129.646z"/>
<circle cx="78.0523" cy="242.762" r="14.5521"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 512 B

Loading…
Cancel
Save