diff options
Diffstat (limited to 'graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty')
-rw-r--r-- | graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty b/graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty index 710f370f0c..777cedba6e 100644 --- a/graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty +++ b/graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty @@ -58,13 +58,17 @@ \RequirePackage[bitstream-charter]{mathdesign} \let\hrulefill\hrulefillx \RequirePackage[hang,flushmargin,bottom]{footmisc} - \RequirePackage[colorlinks=true,breaklinks=true,allcolors=themecolor]{hyperref} + \RequirePackage{footnotehyper} + \makesavenoteenv{tcolorbox} + \RequirePackage[all]{nowidow} + \RequirePackage[colorlinks=true,breaklinks=true,allcolors=themecolor,hyperfootnotes=false]{hyperref} } \RequirePackage[T1]{fontenc} \RequirePackage{xspace} \RequirePackage{inconsolata}% mono font with bold, but italic is missing % \RequirePackage[scale=0.85]{cascadia-code} % \AddToHook{cmd/ttfamily/before}{\fontseries{sl}} +\RequirePackage{iexec} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -72,12 +76,12 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage[ - cachedir=./build/ + cachedir=$TMPDIR/minted/ ]{minted} % smuggling custom pygmentize style in cache folder % (a real pygmentise style would need installtion in some python folder) -\begin{filecontents*}[noheader]{./build/sam.pygstyle} +\begin{filecontents*}[noheader]{./sam.pygstyle} \makeatletter \def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax% \let\PYG@ul=\relax \let\PYG@tc=\relax% @@ -122,6 +126,8 @@ \makeatother \end{filecontents*} +\iexec{mkdir -p $TMPDIR/minted && mv sam.pygstyle $TMPDIR/minted/.} + \usemintedstyle{sam} \setminted{ breaksymbolleft={}, @@ -140,18 +146,28 @@ \tcbuselibrary{minted} \tcbset{% colframe=themecolor, - arc=2mm, fonttitle=\bfseries, sidebyside, center lower, righthand width=5.7cm, bottom=2pt, top=2pt, + left=3pt, + right=3pt, sidebyside gap=10pt, lower separated=false, listing engine=minted, minted language=latex, - colback=themecolor!10 + colback=themecolor!10, + sharp corners, + boxrule=0pt, + before title={\strut} +} + +% avoid page breaks right in front of the tcolorbox +\@ifclassloaded{beamer}{}{ + \tcbuselibrary{hooks} + \tcbset{before pre={\nopagebreak[4]}} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |