Add pretty print and latin truth values support

This commit is contained in:
2024-09-10 22:19:43 -07:00
parent c86b38db09
commit edd4f53a68
3 changed files with 139 additions and 57 deletions

View File

@ -24,7 +24,9 @@
(implicit-and t)
multi-char-names
include-intermediate
(include-vars t))
(include-vars t)
pretty-print
latin-truths)
"Evaluate and then typeset PROP-STRS as a table, which is a list of
proposition strings. For a description of the key parameters, see each of the
functions involved in evaluating and typesetting."
@ -44,7 +46,9 @@ functions involved in evaluating and typesetting."
exps vars
:include-intermediate include-intermediate
:include-vars include-vars)))
(return (typeset-table-to-format table format)))))
(return (typeset-table-to-format table format
:pretty-print pretty-print
:latin-truths latin-truths)))))
(defparameter *command-line-spec*
'((#\h "help" help nil "print this message, then exit")
@ -53,7 +57,9 @@ functions involved in evaluating and typesetting."
(#\s "subexps" subexps nil "include sub-expressions in the output table")
(#\n "no-vars" no-vars nil "do not include variables in the output table")
(#\m "multi-char" multi-char nil "allow multi-character variable names")
(#\i "no-implicit" no-implicit nil "do not use implicit 'and' operations"))
(#\i "no-implicit" no-implicit nil "do not use implicit 'and' operations")
(#\p "pretty" pretty nil "pretty print latex, html, etc. output")
(#\l "latin" latin nil "use the Latin T and F characters for truth values"))
"Specification for `parse-command-line'. This is of the format:
(short long symbol has-arg-p desc).")
@ -93,7 +99,9 @@ arguments."
:implicit-and (not (option-value 'no-implicit opts))
:multi-char-names (option-value 'multi-char opts)
:include-vars (not (option-value 'no-vars opts))
:include-intermediate (option-value 'subexps opts)))
:include-intermediate (option-value 'subexps opts)
:pretty-print (option-value 'pretty opts)
:latin-truths (option-value 'latin opts)))
(terpri))))))))
(defun toplevel ()