r7rs-small-texinfo

Unnamed repository; edit this file 'description' to name the repository.
git clone https://kaka.farm/~git/r7rs-small-texinfo
Log | Files | Refs | README

commit 11da2435e4bc7a31fb40f15e5ff3736f865460be
parent cb6f0da472a616974133fd6a1ea2bd69e3c4ab20
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date:   Wed,  7 Feb 2024 16:36:03 -0500

build: Add HTML math option; rework usage info.

Diffstat:
Mdoc/r7rs-small/build.sh | 20+++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/doc/r7rs-small/build.sh b/doc/r7rs-small/build.sh @@ -23,16 +23,19 @@ # THE SOFTWARE. usage () { - printf 'Usage: %s [-s] <target>\n' "$(basename $0)" 1>&2 + printf 'Usage: %s [OPTION]... [TARGET]\n' "$(basename $0)" 1>&2 echo cat 1>&2 <<EOF -Helper script for building R7RS-small from Texinfo. Currently -supported targets are 'html' and 'pdf'. +Helper script for building R7RS-small from Texinfo. -The default target is 'html'. +Options: + -s Split output files. + -m METHOD Use METHOD for HTML math output (default: mathjax) + METHODs include 'mathjax', 't4h', and 'l2h'. See + the texinfo manual for more information. + -h Show this text. -Output splitting is controlled by the -s flag. Set it if you -want split files. Default output is unsplit. +TARGETs are 'info', 'html', and 'pdf'. The default is 'html'. The command contained in the MAKEINFO environment variable (or 'makeinfo' if it is empty) will be used. Additional options @@ -47,9 +50,12 @@ makeinfo_cmd="${MAKEINFO:-makeinfo}" makeinfo_flags="$MAKEINFOFLAGS" html_math="mathjax" # TODO: CLI option for this. -while getopts hs opt +while getopts hm:s opt do case "$opt" in + m) html_math="$OPTARG" + shift 2 + ;; s) split=yes shift ;;