diff --git a/docs/source/tagging.rst b/docs/source/tagging.rst index 0f0d955..cc70b85 100644 --- a/docs/source/tagging.rst +++ b/docs/source/tagging.rst @@ -114,13 +114,13 @@ a list of words The following commands are available: -pagesize `(letter|legal|a4)` +page $SIZE=`(letter|legal|a4)` Sets the PDF page size for the output. -font -n `name` -p `path` +font {NAME=`name`} {PATH=`path`} Sets the primary font for the output. -sub [-t `tag`] -t `text_to_replace` `replacement text` +sub `replacement text` {FOR=`text_to_replace`} {IN=`tag`} Declares a substitution. Whereever text_to_replace is encountered in the document it will be replaced with "replacement text". diff --git a/ptulsconv/docparser/tagged_string_parser_visitor.py b/ptulsconv/docparser/tagged_string_parser_visitor.py index f247978..5f12cd5 100644 --- a/ptulsconv/docparser/tagged_string_parser_visitor.py +++ b/ptulsconv/docparser/tagged_string_parser_visitor.py @@ -23,7 +23,7 @@ tag_grammar = Grammar( tag_junk = word word_sep? word = ~r"[^ \[\{\$][^ ]*" word_sep = ~r" +" - modifier = ("@" / "&") word_sep? + modifier = ("@" / "&" / "!") word_sep? """ )