req H*title eol output-control "html title"

req H*header parse-num x eol output-control "html header $1"
req H*header*end eol output-control "html header-end"

req H*para eol output-control "html para"

req H*disp eol output-control "html display" font CW
req H*disp*end eol font R output-control "html display-end"
req H*disp*indent parse-num x eol output-control "html display-indent $1"

req H*bq eol output-control "html blockquote"
req H*bq*end eol output-control "html blockquote-end"

req H*list eol output-control "html list"
req H*list*end eol output-control "html list-end"
req H*list*item eol output-control "html list-item"

req H*dterm eol output-control "html definition-term"
req H*ddesc eol output-control "html definition-desc"

req H*shift*right eol output-control "html shift-right"
req H*shift*left eol output-control "html shift-left"

# anchor macros:
# .H*ahref URL		-> <A HREF="URL">
# .H*aname LABEL	-> <A NAME="LABEL">
# .H*atoc N		-> begin level-N TOC entry (generates <A NAME> tag)
# .H*aend		-> </A>

req H*ahref parse-macro-args eol output-control 'html anchor-href "$1"'
req H*aname parse-macro-args eol output-control 'html anchor-name "$1"'
req H*atoc parse-num x eol output-control 'html anchor-toc $1'
req H*aend eol output-control 'html anchor-end'

# For the TOC title, reset any justification/centering that may be in effect.
# If there is a second argument, make the location marker advisory only
req H*toc*title parse-macro-args eol \
		break fill adjust b \
		push-string ".H*header 2\n$1\n.H*header*end\n" \
		push-string ".ds H*tmp\n.if !'$2'' .ds H*tmp , MAYBE\n" \
		push-string '.H*toc*marker "<!-- INSERT TOC HERE\\*[H*tmp] -->\n'

req H*toc*marker parse-macro-args eol output-control "pass $1"

# .Html stuff	-> pass stuff straight through to output, no interpretation
req Html parse-macro-args eol output-control 'pass $*'
