Added github like styling for block quotations. Listing line numbers are now inside the box.

This commit is contained in:
Wandmalfarbe 2017-11-03 18:16:11 +01:00
parent 45336e0e10
commit fce1ea1282
3 changed files with 17 additions and 3 deletions

View File

@ -139,6 +139,10 @@ A green title page | Code blocks styled with listings
:-------------------------:|:-------------------------:
[![A green title page](examples/green-titlepage/green-titlepage.png)](examples/green-titlepage/green-titlepage.pdf) | [![Code blocks styled with listings](examples/listings/listings.png)](examples/listings/listings.pdf)
## Credits
- This template includes code for styling block quotations from [pandoc-letter](https://github.com/aaronwolen/pandoc-letter) by [Aaron Wolen](https://github.com/aaronwolen).
## License
This project is open source licensed under the BSD 3-Clause License. Please see the [LICENSE file](LICENSE) for more information.

View File

@ -468,6 +468,16 @@ $endif$
\usepackage[font={small,it}]{caption}
\newcommand{\imglabel}[1]{\textbf{\textit{(#1)}}}
%
% blockquote
%
\definecolor{blockquote-border}{RGB}{221,221,221}
\definecolor{blockquote-text}{RGB}{119,119,119}
\usepackage{mdframed}
\newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=blockquote-border,skipabove=\parskip]{customblockquote}
\renewenvironment{quote}{\begin{customblockquote}\list{}{\rightmargin=0em\leftmargin=0em}%
\item\relax\color{blockquote-text}\ignorespaces}{\unskip\unskip\endlist\end{customblockquote}}
%
% Source Sans Pro as the de­fault font fam­ily
% Source Code Pro for monospace text
@ -535,13 +545,13 @@ $if(listings)$
numbers = left,
backgroundcolor = \color{listing-background},
basicstyle = \color{listing-text-color}\small\ttfamily{}\linespread{1.15}, % print whole listing small
xleftmargin = 0.8em,
xleftmargin = 2.7em,
breaklines = true,
frame = single,
framesep = 0.6mm,
rulecolor = \color{listing-rule},
frameround = ffff,
framexleftmargin = 0.4em,
framexleftmargin = 2.5em,
tabsize = 4,
numberstyle = \color{listing-numbers},
aboveskip = 1.0em,

View File

@ -47,7 +47,7 @@ vel pede inter si.
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
> 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.