mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-08 04:21:59 +00:00
manual: use modified "haddock.theme" for nicer syntax highlighting;
use `tcolorbox` instead of `framed` for latex code blocks, works much better, especially as now when using a background colour; reduce gap after figures and force footnotes to bottom of page; move most symbology figures to after some text to lessen chance of subsection headers being orphaned on their own at end of page: required a number of rewordings; use named barcodes in example commands, rather than numbered; fix "lua-crossrefs" filter to allow parentheses around references; various other fixes and rephrasings
This commit is contained in:
@@ -18,18 +18,16 @@
|
||||
\ifx\tmp\@nnil\originalitem\else\originalitem[#1]\hfill\par\fi}
|
||||
\makeatother
|
||||
|
||||
%% Text and background color for inline code
|
||||
%% Use the wonderful `tcolorbox` instead of `framed` for fenced code blocks
|
||||
\usepackage{tcolorbox}
|
||||
\tcbuselibrary{breakable}
|
||||
\renewenvironment{Shaded}{\begin{tcolorbox}[colframe=white,boxrule=0pt,boxsep=0.5mm,top=0mm,bottom=0mm,colback=shadecolor,breakable=true]}{\end{tcolorbox}}
|
||||
|
||||
%% Text color for inline code
|
||||
\usepackage{xcolor}
|
||||
\definecolor{icfg}{HTML}{331a33}
|
||||
\definecolor{icfg}{HTML}{351c35} % "text-color" in modified "haddock.theme"
|
||||
\let\oldtexttt\texttt
|
||||
\renewcommand{\texttt}[1]{\textcolor{icfg}{\oldtexttt{#1}}}
|
||||
%% Unfortunately this messes up wrapping TODO: fix
|
||||
%% Background color for inline code https://tex.stackexchange.com/a/507116
|
||||
%\definecolor{icbg}{HTML}{fafafa} % Same as modified pygments.theme
|
||||
%\newcommand{\code}[1]{%
|
||||
%\begingroup\setlength{\fboxsep}{1pt}
|
||||
%\colorbox{icbg}{\oldtexttt{\hspace*{0.1pt}\vphantom{A}#1\hspace*{0.1pt}}}\endgroup}
|
||||
%\renewcommand{\texttt}[1]{\textcolor{icfg}{\code{\oldtexttt{#1}}}}
|
||||
|
||||
%% Make level-4 headings standalone (not run-in) - for some reason "-V block-headings" doesn't seem to work, so do
|
||||
%% what it does manually here
|
||||
@@ -39,5 +37,9 @@
|
||||
%% PDF metadata - the values are set in "docs/inc_before_body_pdf.tex" (otherwise may get overridden)
|
||||
\usepackage{hyperref}
|
||||
|
||||
%% pandoc-lua-crossrefs: required package
|
||||
%% Reduce gap after figures
|
||||
\usepackage{caption}
|
||||
\captionsetup[figure]{belowskip=-6pt}
|
||||
|
||||
%% Make footnotes go to bottom of page
|
||||
\usepackage[bottom]{footmisc}
|
||||
|
||||
Reference in New Issue
Block a user