[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with
From: |
Daiki Ueno |
Subject: |
Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces |
Date: |
Mon, 13 Dec 2010 11:57:06 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Werner LEMBERG <address@hidden> writes:
> Any progress on the docs?
Please find below a patch to the docs. Sorry for the delay.
diff --git a/NEWS b/NEWS
index c5028c4..8b5f17e 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,10 @@ o There is a new warning category `file', enabled by
default. The `mso'
request emits warnings in this category when the requested macro file does
not exist.
+o The new `class' request assignes a short name to a set of
+ characters, which can be referred to in `cflags' request to control
+ line-breaking and hyphenation rules in CJK languages.
+
Tbl
---
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index ae2ac6e..4a4f318 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -8726,6 +8726,7 @@ special symbols (Greek, mathematics).
* Font Families::
* Font Positions::
* Using Symbols::
+* Character Classes::
* Special Fonts::
* Artificial Fonts::
* Ligatures and Kerning::
@@ -9122,7 +9123,7 @@ this is font 1 again
@c ---------------------------------------------------------------------
address@hidden Using Symbols, Special Fonts, Font Positions, Fonts and Symbols
address@hidden Using Symbols, Character Classes, Font Positions, Fonts and
Symbols
@subsection Using Symbols
@cindex using symbols
@cindex symbols, using
@@ -9458,7 +9459,9 @@ width, depth, and height, nothing else. All
manipulations with the
modified with the @code{cflags} request. The first argument is the sum
of the desired flags and the remaining arguments are the characters or
symbols to have those properties. It is possible to omit the spaces
-between the characters or symbols.
+between the characters or symbols. Also you can use the character class
+references here with the escape @code{\C'address@hidden'} (see
address@hidden Classes} for more details).
@table @code
@item 1
@@ -9639,7 +9642,56 @@ The request @code{rfschar} removes glyph definitions
defined with
@c ---------------------------------------------------------------------
address@hidden Special Fonts, Artificial Fonts, Using Symbols, Fonts and Symbols
address@hidden Character Classes, Special Fonts, Using Symbols, Fonts and
Symbols
address@hidden Character Classes
address@hidden character classes
address@hidden classes, character
+
+A @dfn{class} (aka ``character class'') is a set of characters,
+grouped by some user aspect. The request @code{class} defines classes
+so that other requests can refer to characters belonging to a class,
+with a short class name.
+
+Classes are particularly useful for East Asian languages such as
+Chinese, Japanese, and Korean, where there is a much larger set of
+characters than in European languages.
+
+A @code{class} request takes a class name followed by a list of
+characters. For example:
+
address@hidden
+.class [prepunct] , : ; > @}
address@hidden
+
+To access the contents of a class, use the escape
address@hidden'address@hidden'}. With the escape, you can define nested
+classes. Also, you can use the character range notation (a starting
+character code point, followed by a @samp{-} and an ending character
+code point), to avoid enumerating characters explicitly. Here is more
+complex example:
+
address@hidden
+.class [CJKprepunct] \C'[prepunct]' \[u2013]-\[u2016] ...
address@hidden
+
+The class @samp{CJKprepunct} contains the contents of the class
address@hidden, i.e. @samp{, : ; > @}}, and characters in the range
+between @code{U+2013} and @code{U+2016}.
+
+Typical usage of the @code{class} request is to control line-breaking
+and hyphenation rules together with the @code{cflags}. For example,
+to inhibit line-break before the characters belonging to the
address@hidden, you can write:
+
address@hidden
+.cflags 2 \C'[CJKprepunct]'
address@hidden
+
+See the @code{cflags} request in @ref{Using Symbols}, for more details.
+
address@hidden
---------------------------------------------------------------------
+
address@hidden Special Fonts, Artificial Fonts, Character Classes, Fonts and
Symbols
@subsection Special Fonts
@cindex special fonts
@cindex fonts, special
diff --git a/man/groff_diff.man b/man/groff_diff.man
index 115c6d2..3bdfa47 100644
--- a/man/groff_diff.man
+++ b/man/groff_diff.man
@@ -1093,6 +1093,17 @@ This is useful for removing the newline from the end of
diversions
that are to be interpolated as strings.
.
.TP
+.BI .class\ name\ c1\ c2\|.\|.\|.\&
+Assign a short name
+.IR name
+to a set of characters
+.IR c1 ,
+.IR c2 ,\|.\|.\|.\&
+so that they can be referred to from the other requests easily.
+This is useful to assign properties to a large set of characters (using
+.BR .cflags ).
+.
+.TP
.BI .close\ stream
Close the stream named
.IR stream ;
Regards,
--
Daiki Ueno
- [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces, Colin Watson, 2010/12/04
- Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces, Werner LEMBERG, 2010/12/06
- Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces, Daiki Ueno, 2010/12/07
- Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces, Werner LEMBERG, 2010/12/08
- Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces, Werner LEMBERG, 2010/12/12
- Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces,
Daiki Ueno <=
- Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces, Werner LEMBERG, 2010/12/13
- Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces, Daiki Ueno, 2010/12/14
- Re: [Groff] Re: Bug#552201: groff-base: Japanese manpages are shown with too wide spaces, Werner LEMBERG, 2010/12/18