mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2025-02-21 01:51:18 +00:00
Closes #123, #17: Added the variable code-block-font-size
to change the font size for code blocks via the supplied LaTeX command.
This commit is contained in:
parent
7eff8ff442
commit
a24f339d6c
@ -150,6 +150,10 @@ This template defines some new variables to control the appearance of the result
|
||||
|
||||
enables row colors for tables. The default value is `false` because the coloring extends beyond the edge of the table and there is currently no way to change that.
|
||||
|
||||
- `code-block-font-size` (defaults to `\small`)
|
||||
|
||||
LaTeX command to change the font size for code blocks. The available values are `\tiny`, `\scriptsize`, `\footnotesize`, `\small`, `\normalsize`, `\large`, `\Large`, `\LARGE`, `\huge` and `\Huge`. This option will change the font size for default code blocks using the verbatim environment and for code blocks generated with listings.
|
||||
|
||||
## Examples
|
||||
|
||||
### Numbered Sections
|
||||
|
@ -320,7 +320,7 @@ $highlighting-macros$
|
||||
% the help of fvextra). Redefinition is necessary because it is unlikely that
|
||||
% pandoc includes fvextra in the default template.
|
||||
\usepackage{fvextra}
|
||||
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}}
|
||||
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}}
|
||||
|
||||
$endif$
|
||||
$if(tables)$
|
||||
@ -678,7 +678,7 @@ $else$
|
||||
framexleftmargin = 2.5em,
|
||||
$endif$
|
||||
backgroundcolor = \color{listing-background},
|
||||
basicstyle = \color{listing-text-color}\linespread{1.0}\small\ttfamily{},
|
||||
basicstyle = \color{listing-text-color}\linespread{1.0}$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$\ttfamily{},
|
||||
breaklines = true,
|
||||
frame = single,
|
||||
framesep = 0.19em,
|
||||
|
Loading…
x
Reference in New Issue
Block a user