mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Remove bitmap_byte_length
member from zint_symbol
(was only set on BMP output to length of BMP pixel array) EXCODE39: change to display check digit in HRT by default CODE39/EXCODE39/LOGMARS: new hidden check digit option (`option_2 = 2`) qr.c: suppress bogus gcc-13 warning (only appears on optimize) GUI: move some symbology-specific options into Data Tab so separate tab unnecessary (those with few options and no Composite/ECI), namely: all C25XXX, CODE39/EXCODE39/LOGMARS, MSI_PLESSEY, CODABAR, DAFT, DPD, MAILMARK_2D, ITF-14, PZN, UPNQR, CHANNEL, CODE93 and VIN, adjusting grp uis. change Data dialog button (ellipsis) QToolButton -> QPushButton & vice versa zap/clear/eye/swap/scale buttons QPushButton -> QToolButton for better mac compat (also makes sense); remove some mac hacks that no longer seem necessary; use folder icon for Export dialog directory button manual: document new Symbology-specific groupbox & CODE39/etc hidden check digit option; add annexes on Qt and Tcl backends; narrow some tables for better txt output; remove echoed image tags in txt (pandoc 3.1.5 regression?); add one-page HTML output to Makefile; also tex output (debug); add class attributes to images to aid HTML styling; various other fiddlings
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# Makefile for generating "manual.txt" and "manual.pdf" from "manual.pmd" using pandoc
|
||||
# Copyright (C) 2022 <rstuart114@gmail.com>
|
||||
# Makefile for generating "manual.txt" and "manual.pdf" from "manual.pmd" and "zint.1" from "zint.1.pmd" using pandoc
|
||||
# Copyright (C) 2022-2023 <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"
|
||||
@ -9,7 +9,6 @@ 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)
|
||||
@ -24,6 +23,7 @@ IMAGES = \
|
||||
images/gui_menus.png \
|
||||
images/gui_composite.png \
|
||||
images/gui_segs.png \
|
||||
images/gui_c25inter.png \
|
||||
images/gui_aztec.png \
|
||||
images/gui_appearance.png \
|
||||
images/gui_scaling.png \
|
||||
@ -36,6 +36,7 @@ IMAGES = \
|
||||
images/gui_sequence.png \
|
||||
images/gui_export.png \
|
||||
images/gui_cli_equivalent.png \
|
||||
images/tcl_demo.png \
|
||||
images/pdf417_heightperrow.svg \
|
||||
images/code128_box.svg \
|
||||
images/qrcode_box.svg \
|
||||
@ -149,7 +150,7 @@ MAN_PAGE_OPTS = -s -t man
|
||||
|
||||
all : $(OUT_PDF) $(OUT_TXT) $(OUT_MAN_PAGE)
|
||||
|
||||
$(OUT_PDF) : $(SOURCE) $(SOURCE_MAN_PAGE) $(HIGHLIGHT_THEME) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) Makefile
|
||||
$(OUT_PDF) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) Makefile
|
||||
pandoc $(SOURCE_MAN_PAGE) -f markdown \
|
||||
$(PDF_OPTS) \
|
||||
-o $(TEX_MAN_PAGE)
|
||||
@ -165,13 +166,52 @@ $(OUT_TXT) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INCLUDES_TXT) Makefile
|
||||
-V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) \
|
||||
$(TXT_OPTS) \
|
||||
-o $(OUT_TXT)
|
||||
# Indent Man Page sections in TOC and remove trailing spaces
|
||||
# Indent Man Page sections in TOC, remove trailing spaces and echoed image tags
|
||||
sed -i \
|
||||
-e 's/^\(- [A-Z][A-Z ]*\)$$/ \1/' \
|
||||
-e 's/ *$$//' \
|
||||
-e '/^\[.*\]$$/{N;N;s/\[\(.*\)\]\n\n\1/[\1]/;p;d}' \
|
||||
$(OUT_TXT)
|
||||
# Wrap
|
||||
sed -i '/.\{81\}/{s/.\{80\}/&\n/}' $(OUT_TXT)
|
||||
|
||||
$(OUT_MAN_PAGE) : $(SOURCE_MAN_PAGE) Makefile
|
||||
pandoc $(SOURCE_MAN_PAGE) -f markdown \
|
||||
$(MAN_PAGE_OPTS) \
|
||||
-o $(OUT_MAN_PAGE)
|
||||
|
||||
# For debugging
|
||||
|
||||
manual.tex : $(SOURCE) $(SOURCE_MAN_PAGE) $(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
|
||||
pandoc $(SOURCE) -f markdown $(INC_PDF) --toc --toc-depth=4 \
|
||||
-V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) -V block-headings \
|
||||
$(PDF_OPTS) \
|
||||
--include-after-body $(TEX_MAN_PAGE) \
|
||||
-s -o manual.tex
|
||||
|
||||
# HTML one-page (uses modified "templates/styles.html", unchanged "templates/default.html")
|
||||
|
||||
OUT_HTML = manual.html
|
||||
HTML_OPTS = --filter pandoc-tablenos -M tablenos-warning-level=0 --highlight-style=haddock \
|
||||
--template=templates/default.html --eol=lf -s -t html
|
||||
INC_BEFORE_BODY_HTML = inc_before_body_html.html
|
||||
INC_HTML = --include-before-body $(INC_BEFORE_BODY_HTML)
|
||||
TEMPLATES_HTML = templates/default.html templates/styles.html
|
||||
|
||||
$(OUT_HTML) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_BEFORE_BODY_HTML) $(TEMPLATES_HTML) Makefile
|
||||
pandoc $(SOURCE) $(SOURCE_MAN_PAGE) -f markdown+link_attributes $(INC_HTML) --toc --toc-depth=4 \
|
||||
-V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) \
|
||||
$(HTML_OPTS) \
|
||||
-o $(OUT_HTML)
|
||||
# Indent Man Page sections in TOC, change Man Page sections h1 -> h2, remove Man Page meta, fix Table captions
|
||||
sed -i \
|
||||
-e 's/\(Man Page ZINT(1)<\/a>\)<\/li>/\1<ul>/' \
|
||||
-e 's/\(AUTHORS<\/a><\/li>\)/\1<\/ul><\/li>/' \
|
||||
-e 's/^<h1\([^>]*>[A-Z][A-Z ]*<\/\)h1>$$/<h2\1h2>/' \
|
||||
-e 's/^<p>% ZINT(1)[^<]*<\/p>//' \
|
||||
-e 's/<caption><span>Table\(.:[^:]*\):/<caption><span>Table\1/' \
|
||||
$(OUT_HTML)
|
||||
|
Reference in New Issue
Block a user