summaryrefslogtreecommitdiffstatshomepage
path: root/roff.7
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-16 22:28:33 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-16 22:28:33 +0000
commitce6c60c32bf1ef48cae539a850d142548b24d8ad (patch)
tree67f9314d3b2e5e1ccf9a2d368b8eadbe6eba8879 /roff.7
parentf34d66a2879319e93c3b35ed619dbb00a3a7885f (diff)
downloadmandoc-ce6c60c32bf1ef48cae539a850d142548b24d8ad.tar.gz
mandoc-ce6c60c32bf1ef48cae539a850d142548b24d8ad.tar.zst
mandoc-ce6c60c32bf1ef48cae539a850d142548b24d8ad.zip
`ig' support in all its glory. Try
.ig ig asdf .ig fdsa .. or .ig if asdf .if n \ foo for a laugh. It all works. Lots of regression tests supporting this and documentation for the same.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.772
1 files changed, 66 insertions, 6 deletions
diff --git a/roff.7 b/roff.7
index 069d58cc..42e6e7e9 100644
--- a/roff.7
+++ b/roff.7
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.1 2010/05/16 19:08:11 kristaps Exp $
+.\" $Id: roff.7,v 1.2 2010/05/16 22:28:33 kristaps Exp $
.\"
.\" Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -76,6 +76,10 @@ BODY...
.Ed
.Bd -literal -offset indent -compact
\&.if COND \e{ BODY
+BODY... \e}
+.Ed
+.Bd -literal -offset indent -compact
+\&.if COND \e{ BODY
BODY...
\&.\e}
.Ed
@@ -112,15 +116,71 @@ The scope of a conditional is always parsed, but only executed if the
conditional evaluates to true.
.Pp
Note that text subsequent a
+.Sq \&.\e}
+macro is discarded.
+Furthermore, if an explicit closing sequence
.Sq \e}
-is discarded.
+is specified in a free-form line, the entire line is accepted within the
+scope of the prior macro, not only the text preceding the close.
.Ss \&ig
-Ignore input until a
-.Sq \.\.
+Ignore input.
+Accepts the following syntax:
+.Pp
+.Bd -literal -offset indent -compact
+\&.ig
+BODY...
+\&..
+.Ed
+.Bd -literal -offset indent -compact
+\&.ig END
+BODY...
+\&.END
+.Ed
+.Pp
+In the first case, input is ignored until a
+.Sq \&..
macro is encountered on its own line.
-Note that text subsequent the
-.Sq \.\.
+In the second case, input is ignored until a
+.Sq \&.END
+is encountered.
+Text subsequent the
+.Sq \&.END
+or
+.Sq \&..
is discarded.
+.Pp
+Do not use the escape
+.Sq \e
+anywhere in the definition of END.
+It causes very strange behaviour.
+Furthermore, if you redefine a
+.Nm
+macro, such as
+.Pp
+.D1 \&.ig if
+.Pp
+the subsequent invocation of
+.Sx \&if
+will first signify the end of comment, then be invoked as a macro.
+This behaviour really shouldn't be counted upon.
+.Sh COMPATIBILITY
+This section documents compatibility between mandoc and other other
+troff implementations, at this time limited to GNU troff
+.Pq Qq groff .
+The term
+.Qq historic groff
+refers to groff versions before the
+.Pa doc.tmac
+file re-write
+.Pq somewhere between 1.15 and 1.19 .
+.Pp
+.Bl -dash -compact
+.It
+Historic groff did not accept white-space buffering the custom END tag
+for the
+.Sx \&ig
+macro.
+.El
.Sh AUTHORS
The
.Nm