# The groff 1.21 'info' documentation for if-else \{\ ... \} contains an
# example which is incorrect.  To see the example, run "info make"
# and type /Escape: \\\{
#
# Here it is:
#
# [begin quote]
# -- Escape: \{
# -- Escape: \}
#     In many cases, an if (or if-else) construct needs to execute more
#     than one request.  This can be done using the `\{' and `\}'
#     escapes.  The following example shows the possible ways to use
#     these escapes (note the position of the opening and closing
#     braces).
#
#          .ie t \{\
#          .    ds lq ``
#          .    ds rq ''
#          .\}
#          .el \
#          .\{\
#          .    ds lq "
#          .    ds rq "\}
#
# [endquote]
#
# The above code doesn't work because the double-quotes in the else
# clause introduce literal strings.  Running it under nroff produces
# a run-time error and does not set lq and rq correctly, and the \} is not recognized.

nroff  >/dev/null <<'EOF'
.ie t \{\
.    ds lq ``
.    ds rq ''
.\}
.el \
.\{\
.    ds lq "
.    ds rq "\}
.
.tm RESULT: lq=\*(lq rq=\*(rq
EOF
# <standard input>:6: name expected (got `\{'): treated as missing
# RESULT: lq= rq=\}

Attachment: groffbug.sh
Description: application/shellscript

_______________________________________________
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff

Reply via email to