1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-18 02:17:06 +00:00
Files
zint/docs/inc_header_pdf.tex
gitlost a3cca33f32 general: suppress clang-tidy-21/22 warnings;
some code fiddling on affected files
manual: use new lua filter "lua-crossrefs.lua" hacked from
  https://github.com/rnwst/pandoc-lua-crossrefs as replacement for
  tablenos which broke with pandoc 2.8.2 (get nicer output anyway);
  fix "excode39.svg" data $ -> # to avoid shell processing;
  document `ZBarcode_HaveGS1SyntaxEngine()`
2025-10-08 12:21:29 +01:00

44 lines
1.5 KiB
TeX

%% For pandoc --include-in-header
%%
%% Start sections on new pages
\usepackage{sectsty}
\sectionfont{\clearpage}
%% Place figures "here" (i.e. immediately, don't move them around)
\usepackage{graphicx}
\usepackage{float}
\floatplacement{figure}{H}
%% For glossary definition list
%% https://github.com/jgm/pandoc/wiki/Pandoc-Tricks#definition-list-terms-on-their-own-line-in-latex
\let\originalitem\item
\makeatletter
\renewcommand{\item}[1][\@nil]{%
\def\tmp{#1}
\ifx\tmp\@nnil\originalitem\else\originalitem[#1]\hfill\par\fi}
\makeatother
%% Text and background color for inline code
\usepackage{xcolor}
\definecolor{icfg}{HTML}{331a33}
\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
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
%% PDF metadata - the values are set in "docs/inc_before_body_pdf.tex" (otherwise may get overridden)
\usepackage{hyperref}
%% pandoc-lua-crossrefs: required package
\usepackage{caption}