2022-05-19 21:17:51 +12:00
|
|
|
# Makefile for generating "manual.txt" and "manual.pdf" from "manual.pmd" using pandoc
|
|
|
|
# Copyright (C) 2022 <rstuart114@gmail.com>
|
|
|
|
#
|
|
|
|
# Requires a recent version of pandoc, plus pandoc-tablenos, xelatex and various other packages - see "README"
|
|
|
|
# .svg images generated by "zint_images.sh"
|
|
|
|
|
|
|
|
SOURCE = manual.pmd
|
|
|
|
OUT_PDF = manual.pdf
|
|
|
|
OUT_TXT = manual.txt
|
|
|
|
INC_HEADER_PDF = inc_header_pdf.tex
|
|
|
|
INC_BEFORE_BODY_PDF = inc_before_body_pdf.tex
|
|
|
|
INCLUDES_PDF = $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF)
|
|
|
|
INC_PDF = --include-in-header $(INC_HEADER_PDF) --include-before-body $(INC_BEFORE_BODY_PDF)
|
|
|
|
INCLUDES_TXT = inc_header_txt.tex
|
|
|
|
INC_TXT = --include-in-header $(INCLUDES_TXT)
|
2022-05-23 08:33:45 +12:00
|
|
|
SOURCE_MAN_PAGE = zint.1.pmd
|
|
|
|
OUT_MAN_PAGE = zint.1
|
2022-05-19 21:17:51 +12:00
|
|
|
IMAGES = \
|
|
|
|
images/zint.png \
|
|
|
|
images/zint-qt.png \
|
|
|
|
images/gui_main.png \
|
|
|
|
images/gui_menus.png \
|
|
|
|
images/gui_composite.png \
|
|
|
|
images/gui_segs.png \
|
|
|
|
images/gui_aztec.png \
|
|
|
|
images/gui_appearance.png \
|
|
|
|
images/gui_colour.png \
|
|
|
|
images/gui_data_dialog.png \
|
|
|
|
images/gui_sequence.png \
|
|
|
|
images/gui_export.png \
|
|
|
|
images/gui_cli_equivalent.png \
|
RMQR: update to ISO/IEC 23941:2022 - R13x77 numeric cclens change 8 -> 7
QRCODE: use stricter interpretation of ZINT_FULL_MULTIBYTE, excluding
certain trailing bytes
libzint: fix some confusing error messages introduced by segment stuff
general: new escape chars \U, \d and \o
backend_qt: fudge rendering of border rectangles due to scaling/translation
rounding errors TODO: better fudge
GUI: foreground/background colours -> text boxes and icon buttons, add swap
button, independently movable picker (NULL parent), preview colour changes,
preview Data Window changes, add clear data (del) buttons, add zap button
and Factory Reset menu option, various other fixes
libzint: remove STATIC_UNLESS_ZINT_TEST, use wrappers
CMake: add find package QtSvg, remove QtXml
manual: split symbology and general specs and sort, move DAFT to 4-state,
UPC/EAN -> EAN/UPC, DataBar -> GS1 DataBar always, expand MAILMARK info,
various other fiddlings
man page: options or -> |, expand MSI Plessey check digit options
README.linux: add packages info
license: add SPDX-License-Identifier to touched files
2022-06-10 08:52:02 +12:00
|
|
|
images/gui_black_eye.png \
|
|
|
|
images/gui_white_eye.png \
|
|
|
|
images/gui_swap.png \
|
2022-05-19 21:17:51 +12:00
|
|
|
images/pdf417_heightperrow.svg \
|
|
|
|
images/code128_box.svg \
|
|
|
|
images/qrcode_box.svg \
|
|
|
|
images/code128_green.svg \
|
|
|
|
images/code128_green_alpha.svg \
|
|
|
|
images/code128_rotate90.svg \
|
|
|
|
images/datamatrix_euro.svg \
|
|
|
|
images/datamatrix_big5.svg \
|
|
|
|
images/qrcode_binary_utf8.svg \
|
|
|
|
images/codeone_s_dotty.svg \
|
|
|
|
images/aztec_segs.svg \
|
|
|
|
images/datamatrix_structapp.svg \
|
|
|
|
images/code128_small_bold.svg \
|
|
|
|
images/code11.svg \
|
|
|
|
images/c25standard.svg \
|
|
|
|
images/c25iata.svg \
|
|
|
|
images/c25ind.svg \
|
|
|
|
images/c25inter.svg \
|
|
|
|
images/c25logic.svg \
|
|
|
|
images/itf14.svg \
|
|
|
|
images/itf14_border0.svg \
|
|
|
|
images/dpleit.svg \
|
|
|
|
images/dpident.svg \
|
|
|
|
images/upca.svg \
|
|
|
|
images/upca_5.svg \
|
|
|
|
images/upce.svg \
|
|
|
|
images/eanx13.svg \
|
|
|
|
images/eanx5.svg \
|
|
|
|
images/eanx8_5.svg \
|
|
|
|
images/isbnx.svg \
|
|
|
|
images/plessey.svg \
|
|
|
|
images/msi_plessey.svg \
|
|
|
|
images/telepen.svg \
|
|
|
|
images/telepen_num.svg \
|
|
|
|
images/code39.svg \
|
|
|
|
images/excode39.svg \
|
|
|
|
images/code93.svg \
|
|
|
|
images/pzn.svg \
|
|
|
|
images/logmars.svg \
|
|
|
|
images/code32.svg \
|
|
|
|
images/hibc_39.svg \
|
|
|
|
images/vin.svg \
|
|
|
|
images/codabar.svg \
|
|
|
|
images/pharma.svg \
|
|
|
|
images/code128.svg \
|
|
|
|
images/code128b.svg \
|
|
|
|
images/gs1_128.svg \
|
|
|
|
images/ean14.svg \
|
|
|
|
images/nve18.svg \
|
|
|
|
images/hibc_128.svg \
|
|
|
|
images/dpd.svg \
|
|
|
|
images/dbar_omn.svg \
|
|
|
|
images/dbar_truncated.svg \
|
|
|
|
images/dbar_ltd.svg \
|
|
|
|
images/dbar_exp.svg \
|
|
|
|
images/koreapost.svg \
|
|
|
|
images/channel.svg \
|
|
|
|
images/code128_stacked.svg \
|
|
|
|
images/code128_stacked_sep2.svg \
|
|
|
|
images/codablockf.svg \
|
|
|
|
images/code16k.svg \
|
|
|
|
images/pdf417.svg \
|
|
|
|
images/pdf417comp.svg \
|
|
|
|
images/micropdf417.svg \
|
|
|
|
images/dbar_stk.svg \
|
|
|
|
images/dbar_omnstk.svg \
|
|
|
|
images/dbar_expstk.svg \
|
|
|
|
images/code49.svg \
|
|
|
|
images/eanx_cc_a.svg \
|
|
|
|
images/eanx_cc_b.svg \
|
|
|
|
images/gs1_128_cc_c.svg \
|
|
|
|
images/pharma_two.svg \
|
|
|
|
images/postnet.svg \
|
|
|
|
images/planet.svg \
|
|
|
|
images/auspost.svg \
|
|
|
|
images/ausroute.svg \
|
|
|
|
images/ausreply.svg \
|
|
|
|
images/ausredirect.svg \
|
|
|
|
images/kix.svg \
|
|
|
|
images/rm4scc.svg \
|
|
|
|
images/mailmark.svg \
|
|
|
|
images/usps_imail.svg \
|
|
|
|
images/japanpost.svg \
|
|
|
|
images/hibc_dm.svg \
|
|
|
|
images/qrcode.svg \
|
|
|
|
images/microqr.svg \
|
|
|
|
images/rmqr.svg \
|
|
|
|
images/upnqr.svg \
|
|
|
|
images/maxicode.svg \
|
|
|
|
images/aztec.svg \
|
|
|
|
images/azrune.svg \
|
|
|
|
images/codeone.svg \
|
|
|
|
images/gridmatrix.svg \
|
|
|
|
images/dotcode.svg \
|
|
|
|
images/hanxin.svg \
|
|
|
|
images/ultra.svg \
|
|
|
|
images/fim.svg \
|
|
|
|
images/flat.svg \
|
|
|
|
images/daft_rm4scc.svg
|
|
|
|
MAIN_FONT = mainfont="TeX Gyre Pagella"
|
|
|
|
MONO_FONT = monofont="Liberation Mono"
|
|
|
|
CJK_FONT = CJKmainfont="WenQuanYi Micro Hei Mono"
|
2022-05-23 08:33:45 +12:00
|
|
|
PDF_OPTS = --pdf-engine=xelatex --filter pandoc-tablenos -M tablenos-warning-level=0 \
|
2022-07-20 04:11:33 +12:00
|
|
|
--highlight-style=haddock -V colorlinks -V geometry:margin=20mm -V papersize=a4 -V csquotes=true --dpi=300
|
2022-05-23 08:33:45 +12:00
|
|
|
TEX_MAN_PAGE = zint.1.tex
|
2022-05-24 11:21:44 +12:00
|
|
|
TXT_OPTS = --filter pandoc-tablenos -M tablenos-warning-level=0 --columns 80 --eol=lf -t plain
|
2022-05-23 08:33:45 +12:00
|
|
|
MAN_PAGE_OPTS = -s -t man
|
2022-05-19 21:17:51 +12:00
|
|
|
|
2022-05-23 08:33:45 +12:00
|
|
|
all : $(OUT_PDF) $(OUT_TXT) $(OUT_MAN_PAGE)
|
2022-05-19 21:17:51 +12:00
|
|
|
|
2022-05-23 08:33:45 +12:00
|
|
|
$(OUT_PDF) : $(SOURCE) $(SOURCE_MAN_PAGE) $(HIGHLIGHT_THEME) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) Makefile
|
|
|
|
pandoc $(SOURCE_MAN_PAGE) -f markdown \
|
|
|
|
$(PDF_OPTS) \
|
|
|
|
-o $(TEX_MAN_PAGE)
|
|
|
|
sed -i -e 's/section{/subsection{/' $(TEX_MAN_PAGE) # Convert man page sections to subsections
|
2022-05-19 21:17:51 +12:00
|
|
|
pandoc $(SOURCE) -f markdown $(INC_PDF) --toc --toc-depth=4 \
|
2022-05-23 08:33:45 +12:00
|
|
|
-V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) -V block-headings \
|
2022-05-19 21:17:51 +12:00
|
|
|
$(PDF_OPTS) \
|
2022-05-23 08:33:45 +12:00
|
|
|
--include-after-body $(TEX_MAN_PAGE) \
|
2022-05-19 21:17:51 +12:00
|
|
|
-o $(OUT_PDF)
|
|
|
|
|
2022-05-23 08:33:45 +12:00
|
|
|
$(OUT_TXT) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INCLUDES_TXT) Makefile
|
|
|
|
pandoc $(SOURCE) $(SOURCE_MAN_PAGE) -f markdown $(INC_TXT) --toc --toc-depth=4 \
|
2022-05-19 21:17:51 +12:00
|
|
|
-V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) \
|
|
|
|
$(TXT_OPTS) \
|
|
|
|
-o $(OUT_TXT)
|
2022-05-23 08:33:45 +12:00
|
|
|
# Indent Man Page sections in TOC and remove trailing spaces
|
|
|
|
sed -i \
|
|
|
|
-e 's/^\(- [A-Z][A-Z ]*\)$$/ \1/' \
|
|
|
|
-e 's/ *$$//' \
|
|
|
|
$(OUT_TXT)
|
|
|
|
|
|
|
|
$(OUT_MAN_PAGE) : $(SOURCE_MAN_PAGE) Makefile
|
|
|
|
pandoc $(SOURCE_MAN_PAGE) -f markdown \
|
|
|
|
$(MAN_PAGE_OPTS) \
|
|
|
|
-o $(OUT_MAN_PAGE)
|