diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2021-01-15 13:49:02 +1100 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2021-01-15 13:49:02 +1100 |
commit | a248aa33967f034934c1ae97b188727294af1059 (patch) | |
tree | d69aa71a8fa8b2d73ec4a7aea4bea72b16f01a2d /tmac/troffrc-end | |
parent | 34ecb24b95edf60d231b71ef2782c5a8994098cb (diff) | |
download | groff-git-a248aa33967f034934c1ae97b188727294af1059.tar.gz |
tmac/troffrc{,-end}: Improve style.
Follow established idioms and make them consistent with each other.
* tmac/troffrc:
* tmac/troffrc-end:
+ Identify files in header comments as part of GNU troff.
* tmac/troffrc:
+ Clarify purpose of .do request.
+ Identify .X (set by groff -X) as a register, not a string.
+ Remove temporary registers one per line to make
synchronization with foregoing logic easier. Fixes name
space management nits: an undefined string troffrc!Xps was
being removed, and troffrc!{ascii,latin1,utf8,cp1047} were
not being removed despite being defined.
* tmac/troffrc-end:
+ Clarify that file is read after -m file arguments (not "all
macro sets", which can be loaded with .mso after this file
is processed).
+ Advise usage of .do for groff extensions.
+ Line-break one-off conditionals as troffrc does.
+ Add empty string comment to empty string definitions.
+ Add editor configuration comments.
Diffstat (limited to 'tmac/troffrc-end')
-rw-r--r-- | tmac/troffrc-end | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/tmac/troffrc-end b/tmac/troffrc-end index e8a3ba65b..41b4400df 100644 --- a/tmac/troffrc-end +++ b/tmac/troffrc-end @@ -1,28 +1,34 @@ -.\" -*- nroff -*- +.\" final startup file for GNU troff .\" -.\" final startup file for troff -. -.\" this file is parsed after all macro sets have been read +.\" This file is parsed after all -m file arguments have been read. +.\" +.\" Use .do for any groff extensions so that this file works with -C. . -.do if '\*[.T]'html' .do mso html-end.tmac +.do if '\*[.T]'html' \ +. do mso html-end.tmac . -.\" if we are running the postscript device for html images then load www.tmac -.do if r ps4html .do mso www.tmac +.\" Load www if we are running the PostScript driver for HTML images. +.do if r ps4html \ + .do mso www.tmac . -.\" for all other devices blank out these macros -.do if !d HTML-IMAGE-INLINE .do ds HTML-IMAGE-INLINE -.do if !d HTML-IMAGE .do ds HTML-IMAGE -.do if !d HTML-IMAGE-RIGHT .do ds HTML-IMAGE-RIGHT -.do if !d HTML-IMAGE-LEFT .do ds HTML-IMAGE-LEFT -.do if !d HTML-IMAGE-END .do ds HTML-IMAGE-END -.do if !d DEVTAG .do ds DEVTAG -.do if !d HTML-DO-IMAGE .do ds HTML-DO-IMAGE -.do if !d EQN-HTML-IMAGE-END .do ds EQN-HTML-IMAGE-END -.do if !d EQN-HTML-IMAGE .do ds EQN-HTML-IMAGE -.do if !d EQN-HTML-IMAGE-RIGHT .do ds EQN-HTML-IMAGE-RIGHT -.do if !d EQN-HTML-IMAGE-LEFT .do ds EQN-HTML-IMAGE-LEFT -.do if !d EQN-HTML-IMAGE-INLINE .do ds EQN-HTML-IMAGE-INLINE -.do if !d EQN-HTML-DO-IMAGE .do ds EQN-HTML-DO-IMAGE -.do if !d EQN-HTML-IMAGE-END .do ds EQN-HTML-IMAGE-END +.\" For all other devices, make these macros no-ops. +.do if !d HTML-IMAGE-INLINE .do ds HTML-IMAGE-INLINE \" empty +.do if !d HTML-IMAGE .do ds HTML-IMAGE \" empty +.do if !d HTML-IMAGE-RIGHT .do ds HTML-IMAGE-RIGHT \" empty +.do if !d HTML-IMAGE-LEFT .do ds HTML-IMAGE-LEFT \" empty +.do if !d HTML-IMAGE-END .do ds HTML-IMAGE-END \" empty +.do if !d DEVTAG .do ds DEVTAG \" empty +.do if !d HTML-DO-IMAGE .do ds HTML-DO-IMAGE \" empty +.do if !d EQN-HTML-IMAGE-END .do ds EQN-HTML-IMAGE-END \" empty +.do if !d EQN-HTML-IMAGE .do ds EQN-HTML-IMAGE \" empty +.do if !d EQN-HTML-IMAGE-RIGHT .do ds EQN-HTML-IMAGE-RIGHT \" empty +.do if !d EQN-HTML-IMAGE-LEFT .do ds EQN-HTML-IMAGE-LEFT \" empty +.do if !d EQN-HTML-IMAGE-INLINE .do ds EQN-HTML-IMAGE-INLINE \" empty +.do if !d EQN-HTML-DO-IMAGE .do ds EQN-HTML-DO-IMAGE \" empty +.do if !d EQN-HTML-IMAGE-END .do ds EQN-HTML-IMAGE-END \" empty . -.\" Don't let blank lines creep in here. +.\" Local Variables: +.\" mode: nroff +.\" fill-column: 72 +.\" End: +.\" vim: set filetype=groff textwidth=72: |