Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zint/docs/Makefile @ 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 # Makefile for generating "manual.txt" and "manual.pdf" from "manual.pmd" and "zint.1" from "zint.1.pmd" using pandoc | |
| 2 # Copyright (C) 2022-2024 <rstuart114@gmail.com> | |
| 3 # vim: set ts=4 sw=4 noet : | |
| 4 # | |
| 5 # Requires a recent version of pandoc, plus pandoc-tablenos, xelatex and various other packages - see "README" | |
| 6 # .svg images generated by "zint_images.sh" | |
| 7 | |
| 8 SOURCE = manual.pmd | |
| 9 OUT_PDF = manual.pdf | |
| 10 OUT_TXT = manual.txt | |
| 11 INC_HEADER_PDF = inc_header_pdf.tex | |
| 12 INC_BEFORE_BODY_PDF = inc_before_body_pdf.tex | |
| 13 INC_PDF = --include-in-header $(INC_HEADER_PDF) --include-before-body $(INC_BEFORE_BODY_PDF) | |
| 14 INCLUDES_TXT = inc_header_txt.tex | |
| 15 INC_TXT = --include-in-header $(INCLUDES_TXT) | |
| 16 SOURCE_MAN_PAGE = zint.1.pmd | |
| 17 OUT_MAN_PAGE = zint.1 | |
| 18 IMAGES = \ | |
| 19 images/zint.png \ | |
| 20 images/zint-qt.png \ | |
| 21 images/gui_main.png \ | |
| 22 images/gui_delete.png \ | |
| 23 images/gui_zap.png \ | |
| 24 images/gui_menus.png \ | |
| 25 images/gui_composite.png \ | |
| 26 images/gui_segs.png \ | |
| 27 images/gui_c25inter.png \ | |
| 28 images/gui_aztec.png \ | |
| 29 images/gui_appearance.png \ | |
| 30 images/gui_scaling.png \ | |
| 31 images/gui_set_printing_scale.png \ | |
| 32 images/gui_black_eye.png \ | |
| 33 images/gui_white_eye.png \ | |
| 34 images/gui_swap.png \ | |
| 35 images/gui_colour.png \ | |
| 36 images/gui_data_dialog.png \ | |
| 37 images/gui_sequence.png \ | |
| 38 images/gui_export.png \ | |
| 39 images/gui_cli_equivalent.png \ | |
| 40 images/tcl_demo.png \ | |
| 41 images/pdf417_heightperrow.svg \ | |
| 42 images/code128_box.svg \ | |
| 43 images/qrcode_box.svg \ | |
| 44 images/code128_green.svg \ | |
| 45 images/code128_green_alpha.svg \ | |
| 46 images/code128_rotate90.svg \ | |
| 47 images/datamatrix_euro.svg \ | |
| 48 images/datamatrix_big5.svg \ | |
| 49 images/qrcode_binary_utf8.svg \ | |
| 50 images/codeone_s_dotty.svg \ | |
| 51 images/aztec_segs.svg \ | |
| 52 images/datamatrix_structapp.svg \ | |
| 53 images/code128_small_bold.svg \ | |
| 54 images/code11.svg \ | |
| 55 images/c25standard.svg \ | |
| 56 images/c25iata.svg \ | |
| 57 images/c25ind.svg \ | |
| 58 images/c25inter.svg \ | |
| 59 images/c25logic.svg \ | |
| 60 images/itf14.svg \ | |
| 61 images/itf14_border0.svg \ | |
| 62 images/dpleit.svg \ | |
| 63 images/dpident.svg \ | |
| 64 images/upca.svg \ | |
| 65 images/upca_5.svg \ | |
| 66 images/upce.svg \ | |
| 67 images/eanx13.svg \ | |
| 68 images/eanx5.svg \ | |
| 69 images/eanx8_5.svg \ | |
| 70 images/isbnx.svg \ | |
| 71 images/plessey.svg \ | |
| 72 images/msi_plessey.svg \ | |
| 73 images/telepen.svg \ | |
| 74 images/telepen_num.svg \ | |
| 75 images/code39.svg \ | |
| 76 images/excode39.svg \ | |
| 77 images/code93.svg \ | |
| 78 images/pzn.svg \ | |
| 79 images/logmars.svg \ | |
| 80 images/code32.svg \ | |
| 81 images/hibc_39.svg \ | |
| 82 images/vin.svg \ | |
| 83 images/codabar.svg \ | |
| 84 images/pharma.svg \ | |
| 85 images/code128.svg \ | |
| 86 images/code128ab.svg \ | |
| 87 images/gs1_128.svg \ | |
| 88 images/ean14.svg \ | |
| 89 images/nve18.svg \ | |
| 90 images/hibc_128.svg \ | |
| 91 images/dpd.svg \ | |
| 92 images/upu_s10.svg \ | |
| 93 images/dbar_omn.svg \ | |
| 94 images/dbar_truncated.svg \ | |
| 95 images/dbar_ltd.svg \ | |
| 96 images/dbar_exp.svg \ | |
| 97 images/koreapost.svg \ | |
| 98 images/channel.svg \ | |
| 99 images/bc412.svg \ | |
| 100 images/code128_stacked.svg \ | |
| 101 images/code128_stacked_sep2.svg \ | |
| 102 images/codablockf.svg \ | |
| 103 images/code16k.svg \ | |
| 104 images/pdf417.svg \ | |
| 105 images/pdf417comp.svg \ | |
| 106 images/micropdf417.svg \ | |
| 107 images/dbar_stk.svg \ | |
| 108 images/dbar_omnstk.svg \ | |
| 109 images/dbar_expstk.svg \ | |
| 110 images/code49.svg \ | |
| 111 images/eanx_cc_a.svg \ | |
| 112 images/eanx_cc_b.svg \ | |
| 113 images/gs1_128_cc_c.svg \ | |
| 114 images/pharma_two.svg \ | |
| 115 images/postnet.svg \ | |
| 116 images/planet.svg \ | |
| 117 images/auspost.svg \ | |
| 118 images/ausroute.svg \ | |
| 119 images/ausreply.svg \ | |
| 120 images/ausredirect.svg \ | |
| 121 images/kix.svg \ | |
| 122 images/rm4scc.svg \ | |
| 123 images/mailmark_4s.svg \ | |
| 124 images/usps_imail.svg \ | |
| 125 images/japanpost.svg \ | |
| 126 images/hibc_dm.svg \ | |
| 127 images/mailmark_2d.svg \ | |
| 128 images/qrcode.svg \ | |
| 129 images/microqr.svg \ | |
| 130 images/rmqr.svg \ | |
| 131 images/upnqr.svg \ | |
| 132 images/maxicode.svg \ | |
| 133 images/aztec.svg \ | |
| 134 images/azrune.svg \ | |
| 135 images/codeone.svg \ | |
| 136 images/gridmatrix.svg \ | |
| 137 images/dotcode.svg \ | |
| 138 images/hanxin.svg \ | |
| 139 images/ultra.svg \ | |
| 140 images/fim.svg \ | |
| 141 images/flat.svg \ | |
| 142 images/daft_rm4scc.svg | |
| 143 MAIN_FONT = mainfont="TeX Gyre Pagella" | |
| 144 MONO_FONT = monofont="Liberation Mono" | |
| 145 CJK_FONT = CJKmainfont="WenQuanYi Micro Hei Mono" | |
| 146 PDF_OPTS = --pdf-engine=xelatex --filter pandoc-tablenos -M tablenos-warning-level=0 \ | |
| 147 --highlight-style=haddock -V colorlinks -V geometry:margin=20mm -V papersize=a4 -V csquotes=true --dpi=300 | |
| 148 TEX_MAN_PAGE = zint.1.tex | |
| 149 TXT_OPTS = --filter pandoc-tablenos -M tablenos-warning-level=0 --columns 80 --eol=lf -t plain | |
| 150 MAN_PAGE_OPTS = -s -t man | |
| 151 | |
| 152 all : $(OUT_PDF) $(OUT_TXT) $(OUT_MAN_PAGE) | |
| 153 | |
| 154 $(OUT_PDF) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) Makefile | |
| 155 pandoc $(SOURCE_MAN_PAGE) -f markdown \ | |
| 156 $(PDF_OPTS) \ | |
| 157 -o $(TEX_MAN_PAGE) | |
| 158 sed -i -e 's/section{/subsection{/' $(TEX_MAN_PAGE) # Convert man page sections to subsections | |
| 159 pandoc $(SOURCE) -f markdown $(INC_PDF) --toc --toc-depth=4 \ | |
| 160 -V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) -V block-headings \ | |
| 161 $(PDF_OPTS) \ | |
| 162 --include-after-body $(TEX_MAN_PAGE) \ | |
| 163 -o $(OUT_PDF) | |
| 164 | |
| 165 $(OUT_TXT) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INCLUDES_TXT) Makefile | |
| 166 pandoc $(SOURCE) $(SOURCE_MAN_PAGE) -f markdown $(INC_TXT) --toc --toc-depth=4 \ | |
| 167 -V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) \ | |
| 168 $(TXT_OPTS) \ | |
| 169 -o $(OUT_TXT) | |
| 170 # Indent Man Page sections in TOC, remove trailing spaces, echoed image tags, tbl: hashes | |
| 171 # & clean up Table captions | |
| 172 sed -i \ | |
| 173 -e 's/^\(- [A-Z][A-Z ]*\)$$/ \1/' \ | |
| 174 -e 's/ *$$//' \ | |
| 175 -e '/^\[.*\]$$/{N;N;s/\[\(.*\)\]\n\n\1/[\1]/;p;d}' \ | |
| 176 -e 's/ *{#tbl:[^}]*}//' \ | |
| 177 -e 's/: Table\xC2\xA0: \([^:]*\):/Table : \1/' \ | |
| 178 $(OUT_TXT) | |
| 179 # Wrap | |
| 180 sed -i '/.\{81\}/{s/.\{80\}/&\n/}' $(OUT_TXT) | |
| 181 | |
| 182 $(OUT_MAN_PAGE) : $(SOURCE_MAN_PAGE) Makefile | |
| 183 pandoc $(SOURCE_MAN_PAGE) -f markdown \ | |
| 184 $(MAN_PAGE_OPTS) \ | |
| 185 -o $(OUT_MAN_PAGE) | |
| 186 | |
| 187 # For debugging | |
| 188 | |
| 189 manual.tex : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) Makefile | |
| 190 pandoc $(SOURCE_MAN_PAGE) -f markdown \ | |
| 191 $(PDF_OPTS) \ | |
| 192 -o $(TEX_MAN_PAGE) | |
| 193 sed -i -e 's/section{/subsection{/' $(TEX_MAN_PAGE) # Convert man page sections to subsections | |
| 194 pandoc $(SOURCE) -f markdown $(INC_PDF) --toc --toc-depth=4 \ | |
| 195 -V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) -V block-headings \ | |
| 196 $(PDF_OPTS) \ | |
| 197 --include-after-body $(TEX_MAN_PAGE) \ | |
| 198 -s -o manual.tex | |
| 199 | |
| 200 # HTML one-page (uses modified "templates/styles.html", unchanged "templates/default.html") | |
| 201 | |
| 202 OUT_HTML = manual.html | |
| 203 HTML_OPTS = --filter pandoc-tablenos -M tablenos-warning-level=0 --highlight-style=haddock \ | |
| 204 --template=templates/default.html --eol=lf -s -t html | |
| 205 INC_BEFORE_BODY_HTML = inc_before_body_html.html | |
| 206 INC_HTML = --include-before-body $(INC_BEFORE_BODY_HTML) | |
| 207 TEMPLATES_HTML = templates/default.html templates/styles.html | |
| 208 | |
| 209 $(OUT_HTML) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_BEFORE_BODY_HTML) $(TEMPLATES_HTML) Makefile | |
| 210 pandoc $(SOURCE) $(SOURCE_MAN_PAGE) -f markdown+link_attributes $(INC_HTML) --toc --toc-depth=4 \ | |
| 211 -V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) \ | |
| 212 $(HTML_OPTS) \ | |
| 213 -o $(OUT_HTML) | |
| 214 # Indent Man Page sections in TOC, change Man Page sections h1 -> h2, remove Man Page meta, fix Table captions | |
| 215 sed -i \ | |
| 216 -e 's/\(Man Page ZINT(1)<\/a>\)<\/li>/\1<ul>/' \ | |
| 217 -e 's/\(AUTHORS<\/a><\/li>\)/\1<\/ul><\/li>/' \ | |
| 218 -e 's/^<h1\([^>]*>[A-Z][A-Z ]*<\/\)h1>$$/<h2\1h2>/' \ | |
| 219 -e 's/^<p>% ZINT(1)[^<]*<\/p>//' \ | |
| 220 -e 's/<caption><span>Table\(.:[^:]*\):/<caption><span>Table\1/' \ | |
| 221 $(OUT_HTML) |
