Variable: org-latex-engraved-preamble
org-latex-engraved-preamble is a customizable variable defined in
ox-latex.el.gz.
Value
"\\usepackage{fvextra}\n\n[FVEXTRA-SETUP]\n\n% Make line numbers smaller and grey.\n\\renewcommand\\theFancyVerbLine{\\footnotesize\\color{black!40!white}\\arabic{FancyVerbLine}}\n\n\\usepackage{xcolor}\n\n% In case engrave-faces-latex-gen-preamble has not been run.\n\\providecolor{EfD}{HTML}{f7f7f7}\n\\providecolor{EFD}{HTML}{28292e}\n\n% Define a Code environment to prettily wrap the fontified code.\n\\usepackage[breakable,xparse]{tcolorbox}\n\\DeclareTColorBox[]{Code}{o}%\n{colback=EfD!98!EFD, colframe=EfD!95!EFD,\n fontupper=\\footnotesize\\setlength{\\fboxsep}{0pt},\n colupper=EFD,\n IfNoValueTF={#1}%\n {boxsep=2pt, arc=2.5pt, outer arc=2.5pt,\n boxrule=0.5pt, left=2pt}%\n {boxsep=2.5pt, arc=0pt, outer arc=0pt,\n boxrule=0pt, leftrule=1.5pt, left=0.5pt},\n right=2pt, top=1pt, bottom=0.5pt,\n breakable}\n\n[LISTINGS-SETUP]"
Documentation
Preamble content injected when using engrave-faces-latex for source blocks.
This is relevant when org-latex-src-block-backend is set to engraved.
There is quite a lot of flexibility in what this preamble can be,
as long as it:
- Loads the fvextra package.
- Loads the package xcolor (if it is not already loaded elsewhere).
- Defines a "Code" environment (note the capital C), which all
"Verbatim" environments (provided by fvextra) will be wrapped with.
In the default value the colors "EFD" and "EfD" are provided as they are respectively the foreground and background colors, just in case they aren't provided by the generated preamble, so we can assume they are always set.
Within this preamble there are two recognized macro-like placeholders:
[FVEXTRA-SETUP]
[LISTINGS-SETUP]
Unless you have a very good reason, both of these placeholders should be included in the preamble.
FVEXTRA-SETUP sets fvextra's defaults according to
org-latex-engraved-options, and LISTINGS-SETUP creates the
listings environment used for captioned or floating code blocks,
as well as defining \listoflistings.
This variable was added, or its default value changed, in Org version
9.6.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-latex.el.gz
(defcustom org-latex-engraved-preamble
"\\usepackage{fvextra}
[FVEXTRA-SETUP]
% Make line numbers smaller and grey.
\\renewcommand\\theFancyVerbLine{\\footnotesize\\color{black!40!white}\\arabic{FancyVerbLine}}
\\usepackage{xcolor}
% In case engrave-faces-latex-gen-preamble has not been run.
\\providecolor{EfD}{HTML}{f7f7f7}
\\providecolor{EFD}{HTML}{28292e}
% Define a Code environment to prettily wrap the fontified code.
\\usepackage[breakable,xparse]{tcolorbox}
\\DeclareTColorBox[]{Code}{o}%
{colback=EfD!98!EFD, colframe=EfD!95!EFD,
fontupper=\\footnotesize\\setlength{\\fboxsep}{0pt},
colupper=EFD,
IfNoValueTF={#1}%
{boxsep=2pt, arc=2.5pt, outer arc=2.5pt,
boxrule=0.5pt, left=2pt}%
{boxsep=2.5pt, arc=0pt, outer arc=0pt,
boxrule=0pt, leftrule=1.5pt, left=0.5pt},
right=2pt, top=1pt, bottom=0.5pt,
breakable}
[LISTINGS-SETUP]"
"Preamble content injected when using engrave-faces-latex for source blocks.
This is relevant when `org-latex-src-block-backend' is set to `engraved'.
There is quite a lot of flexibility in what this preamble can be,
as long as it:
- Loads the fvextra package.
- Loads the package xcolor (if it is not already loaded elsewhere).
- Defines a \"Code\" environment (note the capital C), which all
\"Verbatim\" environments (provided by fvextra) will be wrapped with.
In the default value the colors \"EFD\" and \"EfD\" are provided
as they are respectively the foreground and background colors,
just in case they aren't provided by the generated preamble, so
we can assume they are always set.
Within this preamble there are two recognized macro-like placeholders:
[FVEXTRA-SETUP]
[LISTINGS-SETUP]
Unless you have a very good reason, both of these placeholders
should be included in the preamble.
FVEXTRA-SETUP sets fvextra's defaults according to
`org-latex-engraved-options', and LISTINGS-SETUP creates the
listings environment used for captioned or floating code blocks,
as well as defining \\listoflistings."
:group 'org-export-latex
:type 'string
:package-version '(Org . "9.6"))