old-www/HOWTO/Howtos-with-LinuxDoc-11.html

60 lines
3.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>: Appendix</TITLE>
<LINK HREF="Howtos-with-LinuxDoc-10.html" REL=previous>
<LINK HREF="Howtos-with-LinuxDoc.html#toc11" REL=contents>
</HEAD>
<BODY>
Next
<A HREF="Howtos-with-LinuxDoc-10.html">Previous</A>
<A HREF="Howtos-with-LinuxDoc.html#toc11">Contents</A>
<HR>
<H2><A NAME="s11">11.</A> <A HREF="Howtos-with-LinuxDoc.html#toc11">Appendix</A></H2>
<H2><A NAME="esc_seqs"></A> <A NAME="ss11.1">11.1</A> <A HREF="Howtos-with-LinuxDoc.html#toc11.1">Old Problem of Escape Sequences in Text Output</A>
</H2>
<P>Prior to version 0.9.21-0.8 there was a bug for the case of text
output. For sgml2txt, the option --pass="-P-cbou" was needed to get
pure text output since otherwise if you used the -f option, you got
text output which put emphasis on words and letters by the use of
escape sequences and overstriking. An example of a bullet made by
overstriking is +^Ho which on a printer would type +, then backspace
(^H), and then type o over the existing +. This doesn't seem to work
on display terminals (they can't overstrike). Note that even if you
have the most recent version, you'll still get this unwanted output if
you fail to use the -f option.</P>
<P>In case you are interested, the --pass passes the -P-cbou option to the
groff program (used by sgml2txt) and the -P option of groff passes the
-cbou options to grotty (a post-processor for groff) forcing grotty to
generate just plain text output. See the grotty man page. In brief:
-c avoids escape sequences but allows overstrikes but -bou prohibits
overstrikes when the -c option is used. The result is no overstrikes
and no escape sequences in the output. -b prohibits overstrikes to
make a character look bold; -u prevents overstrikes for underlining;
and -o prohibits other kinds of overstrikes like the bullet example
above. An alternate way to eliminate overstrikes is to use the -f
option with sgml2txt but you still have to pass the -c option to
grotty to eliminate escape sequences unless you have the newer
version.</P>
<P>What a mess it was! The default should probably be plain text so that
all of this passing of options wouldn't be needed. I've finally got
them to fix this so after about mid-2007 you can use just the -f
option instead of --pass="-P-cbou". If you get these escape sequences
and overstrikes in your output file but use the Linux "cat" command to
display the text, it looks great. But using pagers or editors on the
text output file usually results in the escape characters being eaten
so you see a bunch of unwanted characters in your text that were
supposed to be part of escape sequences. In some cases, pagers can
display certain overstrikes OK but editors (like vim) don't. So
eliminating all overstrikes permits you to use any editor or pager to
read it.</P>
<HR>
Next
<A HREF="Howtos-with-LinuxDoc-10.html">Previous</A>
<A HREF="Howtos-with-LinuxDoc.html#toc11">Contents</A>
</BODY>
</HTML>