From ce5180dd95394daa1fafef03a867e2dcbeb8c3d0 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 15 Apr 2020 15:02:42 +0100 Subject: [PATCH] Make quotes look better in pandoc template --- pandoc/.pandoc/templates/default.latex | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/pandoc/.pandoc/templates/default.latex b/pandoc/.pandoc/templates/default.latex index 2b58ba57..367b7f9c 100644 --- a/pandoc/.pandoc/templates/default.latex +++ b/pandoc/.pandoc/templates/default.latex @@ -348,6 +348,38 @@ $if(logo)$ $endif$ $endif$ + + +\usepackage{framed} + +% \let\oldquote\quote +% \let\oldendquote\endquote +% \def\quote{\leftbar \oldquote} +% \def\endquote{\oldendquote\endleftbar} + +\newlength{\leftbarwidth} +\setlength{\leftbarwidth}{5pt} +\newlength{\leftbarsep} +\setlength{\leftbarsep}{2pt} + +\newcommand*{\leftbarcolorcmd}{\color{leftbarcolor}}% as a command to be more flexible +\colorlet{leftbarcolor}{gray} + +\renewenvironment{leftbar}{% + \def\FrameCommand{{\leftbarcolorcmd{\vrule width \leftbarwidth\relax\hspace {\leftbarsep}}}}% + \MakeFramed {\advance \hsize -\width \FrameRestore }% + \noindent +}{% + \endMakeFramed +} + +\renewenvironment{quote} +{\vspace{7pt} \leftbar\list{}{\rightmargin\leftmargin}% +\item\vspace{-5pt}\relax} + {\endlist\endleftbar} + + + \begin{document} $if(title)$ $if(beamer)$