summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorwlemb <wlemb>2004-06-30 11:35:24 +0000
committerwlemb <wlemb>2004-06-30 11:35:24 +0000
commit5f659ae16cbad14977838e9f8f0de74a3c26c7db (patch)
treedc243ed3d0fcd1c72eeafec77373b6014810ab34 /man
parent6e5ac034c3358b9519d887aa71233ddba406d1f9 (diff)
downloadgroff-5f659ae16cbad14977838e9f8f0de74a3c26c7db.tar.gz
Implement two new conditional operators `F <name>' and `S <name>'
which check whether <name> is a valid font or style, respectively. * src/libs/libgroff/font.cpp (text_file): Add `silent' member. (text_file::text_file): Updated. (text_file::error): Don't emit message if `silent' is set. (font::load_font): Add optional third argument (which is directly passed to `load'. (font::load): Add optional second argument to check the header of a font only, without emitting warning or error messages. * src/include/font.h (font): Updated. * src/roff/troff/input.cpp (do_if_request): Implement `S' and `F' conditionals. * src/roff/troff/node.cpp (mount_font_no_translate): Add optional fourth argument to check a font without mounting. (check_font, check_style): New functions. * src/roff/troff/node.h: Updated. * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: Updated.
Diffstat (limited to 'man')
-rw-r--r--man/groff.man13
-rw-r--r--man/groff_diff.man37
2 files changed, 40 insertions, 10 deletions
diff --git a/man/groff.man b/man/groff.man
index 0e08c332..6bd261d8 100644
--- a/man/groff.man
+++ b/man/groff.man
@@ -2,7 +2,7 @@
.ig
groff.man
-Last update: 27 Jun 2004
+Last update: 29 Jun 2004
This file is part of groff, the GNU roff type-setting system.
@@ -1015,6 +1015,17 @@ True if there is a register named
Formatter is
.BR troff .
.
+.TPx
+.BI F font
+True if there exists a font named
+.IR font .
+.
+.TPx
+.BI S style
+True if a style named
+.I style
+has been registered.
+.
.RE
.PD
.
diff --git a/man/groff_diff.man b/man/groff_diff.man
index b3ebc940..19e9a600 100644
--- a/man/groff_diff.man
+++ b/man/groff_diff.man
@@ -3,7 +3,7 @@
.ig
groff_diff.man
-Last update : 27 Jun 2004
+Last update : 29 Jun 2004
This file is part of groff, the GNU roff type-setting system.
It is the source of the man-page groff_diff(7).
@@ -1440,7 +1440,11 @@ Whenever a font named
.I f
is referred to in an
.B \[rs]f
-escape sequence, or in the
+escape sequence, in the
+.B F
+and
+.B S
+conditional operators, or in the
.BR ft ,
.BR ul ,
.BR bd ,
@@ -3079,6 +3083,26 @@ has been defined by the
.B char
request.
.
+.TP
+.BI .if\ F f
+True if font
+.I f
+exists.
+.
+.B f
+is handled as if it was opened with the
+.B ft
+request (this is, font translation and styles are applied), without
+actually mounting it.
+.
+.TP
+.BI .if\ S s
+True if style
+.I s
+has been registered.
+.
+Font translation is applied.
+.
.P
The
.B tr
@@ -3095,16 +3119,11 @@ Example:
.ne 6v+\n(.Vu
.ft CB
.nf
-.Text .de foo
-.Text . nop Hello, I'm `foo'.
-.Text . nop I will now define `bar'.
+.Text .if t \[rs]{\[rs]
.Text . de bar
.Text . nop Hello, I'm `bar'.
.Text . .
-.Text . nop Done.
-.Text ..
-.Text .foo
-.Text .bar
+.Text .\[rs]}
.fi
.
.