mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2025-02-21 01:51:18 +00:00
Added support for background images on the title page.
This commit is contained in:
parent
86bf7c0d97
commit
be52c88c08
54
eisvogel.tex
54
eisvogel.tex
@ -512,6 +512,9 @@ $endif$
|
||||
$if(titlepage)$
|
||||
\usepackage{pagecolor}
|
||||
\usepackage{afterpage}
|
||||
$if(titlepage-background)$
|
||||
\usepackage{tikz}
|
||||
$endif$
|
||||
$endif$
|
||||
|
||||
%
|
||||
@ -804,11 +807,18 @@ $if(beamer)$
|
||||
$else$
|
||||
$if(titlepage)$
|
||||
\begin{titlepage}
|
||||
$if(titlepage-background)$
|
||||
\newgeometry{top=2cm, right=4cm, bottom=3cm, left=4cm}
|
||||
$else$
|
||||
\newgeometry{left=6cm}
|
||||
$endif$
|
||||
$if(titlepage-color)$
|
||||
\definecolor{titlepage-color}{HTML}{$titlepage-color$}
|
||||
\newpagecolor{titlepage-color}\afterpage{\restorepagecolor}
|
||||
$endif$
|
||||
$if(titlepage-background)$
|
||||
\tikz[remember picture,overlay] \node[inner sep=0pt] at (current page.center){\includegraphics[width=\paperwidth,height=\paperheight]{$titlepage-background$}};
|
||||
$endif$
|
||||
\newcommand{\colorRule}[3][black]{\textcolor[HTML]{#1}{\rule{#2}{#3}}}
|
||||
\begin{flushleft}
|
||||
\noindent
|
||||
@ -818,25 +828,45 @@ $endif$
|
||||
\par
|
||||
\noindent
|
||||
|
||||
{ \setstretch{1.4}
|
||||
\vfill
|
||||
\noindent {\huge \textbf{\textsf{$title$}}}
|
||||
$if(subtitle)$
|
||||
\vskip 1em
|
||||
{\Large \textsf{$subtitle$}}
|
||||
$endif$
|
||||
\vskip 2em
|
||||
\noindent
|
||||
{\Large \textsf{$for(author)$$author$$sep$, $endfor$}
|
||||
\vfill
|
||||
$if(titlepage-background)$
|
||||
% The titlepage with a background image has other text spacing and text size
|
||||
{
|
||||
\setstretch{2}
|
||||
\vfill
|
||||
\vskip -8em
|
||||
\noindent {\huge \textbf{\textsf{$title$}}}
|
||||
$if(subtitle)$
|
||||
\vskip 1em
|
||||
{\Large \textsf{$subtitle$}}
|
||||
$endif$
|
||||
\vskip 2em
|
||||
\noindent {\Large \textsf{$for(author)$$author$$sep$, $endfor$} \vskip 0.6em \textsf{$date$}}
|
||||
\vfill
|
||||
}
|
||||
$else$
|
||||
{
|
||||
\setstretch{1.4}
|
||||
\vfill
|
||||
\noindent {\huge \textbf{\textsf{$title$}}}
|
||||
$if(subtitle)$
|
||||
\vskip 1em
|
||||
{\Large \textsf{$subtitle$}}
|
||||
$endif$
|
||||
\vskip 2em
|
||||
\noindent {\Large \textsf{$for(author)$$author$$sep$, $endfor$}}
|
||||
\vfill
|
||||
}
|
||||
$endif$
|
||||
|
||||
$if(logo)$
|
||||
\noindent
|
||||
\includegraphics[width=$if(logo-width)$$logo-width$$else$100$endif$pt, left]{$logo$}
|
||||
$endif$
|
||||
|
||||
\textsf{$date$}}
|
||||
$if(titlepage-background)$
|
||||
$else$
|
||||
\textsf{$date$}
|
||||
$endif$
|
||||
\end{flushleft}
|
||||
\end{titlepage}
|
||||
\restoregeometry
|
||||
|
@ -7,6 +7,12 @@ echo "# Building examples"
|
||||
echo "##"
|
||||
echo ""
|
||||
|
||||
echo "- titlepage-background"
|
||||
cd "titlepage-background"
|
||||
pandoc "titlepage-background.md" -o "titlepage-background.pdf" --from markdown --template "../../eisvogel.latex" --listings
|
||||
pdftoppm -r 150 -png "titlepage-background.pdf" > "titlepage-background.png"
|
||||
cd ".."
|
||||
|
||||
echo "- basic-example"
|
||||
pandoc "basic-example/basic-example.md" -o "basic-example/basic-example.pdf" --from markdown --template "../eisvogel.latex" --listings
|
||||
pdftoppm -r 150 -png "basic-example/basic-example.pdf" > "basic-example/basic-example.png"
|
||||
|
70
examples/titlepage-background/background.pdf
Normal file
70
examples/titlepage-background/background.pdf
Normal file
@ -0,0 +1,70 @@
|
||||
%PDF-1.5
|
||||
%µí®û
|
||||
3 0 obj
|
||||
<< /Length 4 0 R
|
||||
/Filter /FlateDecode
|
||||
>>
|
||||
stream
|
||||
xœeŽAÂ@E÷s
|
||||
. Ã#¸°í¢.¬÷OœÑ¤©iØ<69>Ïÿïó*c¶®w‚ù]B#XŠ;\~‚Ãö€©JMá„îbš}‰j’: {¦1<wEÃ1½Á
|
||||
´_WXÊ91:"¤ZíVªFN ˜ªÝ¤,È\¨ìÑû}šÙ›}<7D>MÜ<06>=°ËÀ¤HœÝz„œ+–rNLåV>±mB
|
||||
endstream
|
||||
endobj
|
||||
4 0 obj
|
||||
162
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/ExtGState <<
|
||||
/a0 << /CA 1 /ca 1 >>
|
||||
>>
|
||||
>>
|
||||
endobj
|
||||
5 0 obj
|
||||
<< /Type /Page
|
||||
/Parent 1 0 R
|
||||
/MediaBox [ 0 0 595.275574 841.889771 ]
|
||||
/Contents 3 0 R
|
||||
/Group <<
|
||||
/Type /Group
|
||||
/S /Transparency
|
||||
/I true
|
||||
/CS /DeviceRGB
|
||||
>>
|
||||
/Resources 2 0 R
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<< /Type /Pages
|
||||
/Kids [ 5 0 R ]
|
||||
/Count 1
|
||||
>>
|
||||
endobj
|
||||
6 0 obj
|
||||
<< /Creator (cairo 1.14.8 (http://cairographics.org))
|
||||
/Producer (cairo 1.14.8 (http://cairographics.org))
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<< /Type /Catalog
|
||||
/Pages 1 0 R
|
||||
>>
|
||||
endobj
|
||||
xref
|
||||
0 8
|
||||
0000000000 65535 f
|
||||
0000000576 00000 n
|
||||
0000000276 00000 n
|
||||
0000000015 00000 n
|
||||
0000000254 00000 n
|
||||
0000000348 00000 n
|
||||
0000000641 00000 n
|
||||
0000000768 00000 n
|
||||
trailer
|
||||
<< /Size 8
|
||||
/Root 7 0 R
|
||||
/Info 6 0 R
|
||||
>>
|
||||
startxref
|
||||
820
|
||||
%%EOF
|
60
examples/titlepage-background/titlepage-background.md
Normal file
60
examples/titlepage-background/titlepage-background.md
Normal file
@ -0,0 +1,60 @@
|
||||
---
|
||||
title: "Example PDF"
|
||||
author: [Author]
|
||||
date: 2019-08-04
|
||||
subject: "Markdown"
|
||||
keywords: [Markdown, Example]
|
||||
lang: "en"
|
||||
titlepage: true,
|
||||
titlepage-rule-color: "360049"
|
||||
titlepage-background: "background.pdf"
|
||||
...
|
||||
|
||||
# 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/titlepage-background/titlepage-background.pdf
Normal file
BIN
examples/titlepage-background/titlepage-background.pdf
Normal file
Binary file not shown.
BIN
examples/titlepage-background/titlepage-background.png
Normal file
BIN
examples/titlepage-background/titlepage-background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 256 KiB |
Loading…
x
Reference in New Issue
Block a user