summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--doc/groff.texinfo5
-rw-r--r--src/devices/grohtml/post-html.cpp12
-rw-r--r--src/roff/troff/input.cpp5
-rw-r--r--tmac/Makefile.sub2
5 files changed, 19 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 1563afe6..b83a3be6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-03-27 Gaius Mulley <gaius@glam.ac.uk>
+
+ * src/roff/troff/input.cpp (encode_char): Emit special characters
+ for -Thtml as `\[...]'.
+ * src/devices/grohtml/post-html.cpp (page::add_and_encode): Updated.
+
+ * doc/groff.texinfo (\X): Updated.
+
2006-03-27 Werner LEMBERG <wl@gnu.org>
* tmac/Makefile.sub (NORMALFILES, SPECIALFILES): Add various missing
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index 8322c0a2..3a568ab7 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -13110,9 +13110,8 @@ backslash) cause an error.
@pindex DESC@r{, and @code{use_charnames_in_special}}
@cindex @code{\X}, and special characters
If the @samp{use_charnames_in_special} keyword is set in the @file{DESC}
-file, special characters no longer cause an error; the name @var{xx} is
-represented as @samp{\(@var{xx}\)} in the @w{@samp{x X}} output command.
-Additionally, the backslash is represented as @code{\\}.
+file, special characters no longer cause an error; they are simply output
+verbatim. Additionally, the backslash is represented as @code{\\}.
@samp{use_charnames_in_special} is currently used by @code{grohtml} only.
@endDefesc
diff --git a/src/devices/grohtml/post-html.cpp b/src/devices/grohtml/post-html.cpp
index 5bd7fc7d..3b5ee28a 100644
--- a/src/devices/grohtml/post-html.cpp
+++ b/src/devices/grohtml/post-html.cpp
@@ -1379,9 +1379,9 @@ static char *to_unicode (unsigned int ch)
* add_and_encode - adds a special string to the page, it translates the string
* into html glyphs. The special string will have come from x X html:
* and can contain troff character encodings which appear as
- * \(char\). A sequence of \\ represents \.
+ * \[char]. A sequence of \\ represents \.
* So for example we can write:
- * "cost = \(Po\)3.00 file = \\foo\\bar"
+ * "cost = \[Po]3.00 file = \\foo\\bar"
* which is translated into:
* "cost = &pound;3.00 file = \foo\bar"
*/
@@ -1399,15 +1399,15 @@ void page::add_and_encode (style *s, const string &str,
if (s->f == NULL)
return;
while (i < str.length()) {
- if ((i+1<str.length()) && (str.substring(i, 2) == string("\\("))) {
+ if ((i+1<str.length()) && (str.substring(i, 2) == string("\\["))) {
// start of escape
- i += 2; // move over \(
+ i += 2; // move over \[
int a = i;
- while ((i+1<str.length()) && (str.substring(i, 2) != string("\\)"))) {
+ while ((i<str.length()) && (str.substring(i, 1) != string("]"))) {
i++;
}
int n = i;
- if ((i+1<str.length()) && (str.substring(i, 2) == string("\\)")))
+ if ((i<str.length()) && (str.substring(i, 1) == string("]")))
i++;
else
n = -1;
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index f7c01c98..804c2f0b 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -5185,14 +5185,13 @@ static void encode_char(macro *mac, char c)
const char *s = ci->get_symbol()->contents();
if (s[0] != (char)0) {
mac->append('\\');
- mac->append('(');
+ mac->append('[');
int i = 0;
while (s[i] != (char)0) {
mac->append(s[i]);
i++;
}
- mac->append('\\');
- mac->append(')');
+ mac->append(']');
}
}
else if (tok.stretchable_space()
diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
index 8131cb17..1dcbc3de 100644
--- a/tmac/Makefile.sub
+++ b/tmac/Makefile.sub
@@ -32,7 +32,7 @@ NORMALFILES=\
trans.tmac \
hyphen.us hyphenex.us \
fr.tmac hyphen.fr \
- sv.tmac hyphen.sv \
+ sv.tmac hyphen.sv
SPECIALFILES=an.tmac man.tmac s.tmac ms.tmac www.tmac
STRIPFILES=e.tmac doc.tmac doc-old.tmac
MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms