Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zint/docs/inc_header_pdf.tex @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 %% For pandoc --include-in-header | |
| 2 %% | |
| 3 %% Start sections on new pages | |
| 4 \usepackage{sectsty} | |
| 5 \sectionfont{\clearpage} | |
| 6 | |
| 7 %% Place figures "here" (i.e. immediately, don't move them around) | |
| 8 \usepackage{graphicx} | |
| 9 \usepackage{float} | |
| 10 \floatplacement{figure}{H} | |
| 11 | |
| 12 %% For glossary definition list | |
| 13 %% https://github.com/jgm/pandoc/wiki/Pandoc-Tricks#definition-list-terms-on-their-own-line-in-latex | |
| 14 \let\originalitem\item | |
| 15 \makeatletter | |
| 16 \renewcommand{\item}[1][\@nil]{% | |
| 17 \def\tmp{#1} | |
| 18 \ifx\tmp\@nnil\originalitem\else\originalitem[#1]\hfill\par\fi} | |
| 19 \makeatother | |
| 20 | |
| 21 %% Text and background color for inline code | |
| 22 \usepackage{xcolor} | |
| 23 \definecolor{icfg}{HTML}{331a33} | |
| 24 \let\oldtexttt\texttt | |
| 25 \renewcommand{\texttt}[1]{\textcolor{icfg}{\oldtexttt{#1}}} | |
| 26 %% Unfortunately this messes up wrapping TODO: fix | |
| 27 %% Background color for inline code https://tex.stackexchange.com/a/507116 | |
| 28 %\definecolor{icbg}{HTML}{fafafa} % Same as modified pygments.theme | |
| 29 %\newcommand{\code}[1]{% | |
| 30 %\begingroup\setlength{\fboxsep}{1pt} | |
| 31 %\colorbox{icbg}{\oldtexttt{\hspace*{0.1pt}\vphantom{A}#1\hspace*{0.1pt}}}\endgroup} | |
| 32 %\renewcommand{\texttt}[1]{\textcolor{icfg}{\code{\oldtexttt{#1}}}} | |
| 33 | |
| 34 %% Make level-4 headings standalone (not run-in) - for some reason "-V block-headings" doesn't seem to work, so do | |
| 35 %% what it does manually here | |
| 36 \let\oldparagraph\paragraph | |
| 37 \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} | |
| 38 | |
| 39 %% https://github.com/tomduck/pandoc-tablenos | |
| 40 %% As using --include-in-header (this file), need to manually include the following (displayed by setting | |
| 41 %% "-M tablenos-warning-level=2"): | |
| 42 | |
| 43 %% PDF metadata - the values are set in "docs/inc_before_body.tex" (otherwise may get overridden) | |
| 44 \usepackage{hyperref} | |
| 45 | |
| 46 %% pandoc-tablenos: required package | |
| 47 \usepackage{caption} | |
| 48 | |
| 49 %% pandoc-tablenos: environment to disable table caption prefixes | |
| 50 \makeatletter | |
| 51 \newcounter{tableno} | |
| 52 \newenvironment{tablenos:no-prefix-table-caption}{ | |
| 53 \caption@ifcompatibility{}{ | |
| 54 \let\oldthetable\thetable | |
| 55 \let\oldtheHtable\theHtable | |
| 56 \renewcommand{\thetable}{tableno:\thetableno} | |
| 57 \renewcommand{\theHtable}{tableno:\thetableno} | |
| 58 \stepcounter{tableno} | |
| 59 \captionsetup{labelformat=empty} | |
| 60 } | |
| 61 }{ | |
| 62 \caption@ifcompatibility{}{ | |
| 63 \captionsetup{labelformat=default} | |
| 64 \let\thetable\oldthetable | |
| 65 \let\theHtable\oldtheHtable | |
| 66 \addtocounter{table}{-1} | |
| 67 } | |
| 68 } | |
| 69 \makeatother | |
| 70 | |
| 71 %% pandoc-tablenos: environment for tagged tables | |
| 72 \newenvironment{tablenos:tagged-table}[1][]{ | |
| 73 \let\oldthetable\thetable | |
| 74 \let\oldtheHtable\theHtable | |
| 75 \renewcommand{\thetable}{#1} | |
| 76 \renewcommand{\theHtable}{#1} | |
| 77 }{ | |
| 78 \let\thetable\oldthetable | |
| 79 \let\theHtable\oldtheHtable | |
| 80 \addtocounter{table}{-1} | |
| 81 } |
