summaryrefslogtreecommitdiff
path: root/tmac/s.tmac
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-03-16 15:48:30 +0000
committerwlemb <wlemb>2001-03-16 15:48:30 +0000
commit239e9ceb46c1f27d205552a0d798c29a70fed22f (patch)
tree141aad6d1561b15b9185d4311ea1f8cf3aabd2fa /tmac/s.tmac
parente8ba685419d4a0741a0fcde4a313d9d88ca5d1a7 (diff)
downloadgroff-239e9ceb46c1f27d205552a0d798c29a70fed22f.tar.gz
Introduced simple html tables to implement indentation.
* src/devices/grohtml/html.h (word, word_list): New structures. (simple_output): Use it. * src/devices/grohtml/post-html.cc: Add `INDENTATION'. (html_printer): Improve indentation handling. (html_printer::emit_raw): Set `in_table' element. Handle indentation if set. (html_printer::write_header): Move conditional downwards. Don't allow whitespace in tags. (html_printer::do_linelength): Handle line length and indentation conditionally. (html_printer::do_pageoffset): Handle indentation conditionally. (html_printer::do_indentation): Ditto. (html_printer::do_tempindent): New function member. (html_printer::do_fill): Take care of indentation. (html_printer::do_flush): Finish table. (html_printer::do_links): Ditto. (html_printer::do_break): New function for handling `.br' and `.ti'. (html_printer::troff_tag): Use it. Handle `.ti'. (html_printer::flush_globs): Fix. (html_printer::flush_page): Finish table. (html_printer::html_printer): Fix error message. Set up `linelength'. (html_printer::add_to_sbuf): Remove special handling of character code 255. (to_unicode): Remove `stop()'. (html_printer::write_title): Cleanup. (html_printer::begin_page): Use `put_string()'. Handle indentation. (html_printer::~html_printer): Flush text and end the line. Use `put_string()'. * src/devices/grohtml/html_text.h: Add more *_TAG enum values. * src/devices/grohtml/html_text.cc (html_text::end_tag): Fix emission of tags. (html_text::start_tag): Disable newlines. (html_text::table_is_void): New function. (html_text::issue_table_begin): Ditto. (html_text::issue_table_end): Ditto. (html_text::push_para): Better table handling. (html_text::do_indent): New function. (html_text::do_table): Ditto. (html_text::done_table): Ditto. (html_text::do_tt): Handle PRE_TAG. (html_text::is_in_table): New function. (html_text::check_emit_text): Handle tables. (html_text::do_emittext): Use `nl()'. (html_text::do_para): Handle table. (html_text::remove_def): New function. * src/devices/grohtml/output.cc (word, word_list): Implement methods. (simple_output::end_line): Flush last word. (simple_output::simple_comment): Ditto. (simple_output::begin_comment): Recoded. (simple_output::end_comment): Ditto. (simple_output::comment_arg): Removed. (simple_output::check_newline): Improve test and flush last word. (simple_output::space_or_newline): Improved. (simple_output::write_newline): Replaced with... (simple_output::nl): This. (simple_output::put_raw_char): Flush last word. (simple_output::check_space): Removed. (simple_output::put_translated_string): Ditto. (simple_output::put_string): Simplified. (simple_output::put_number): Updated. (simple_output::put_float): Ditto. (simple_output::put_symbol): Removed. (simple_output::enable_newlines): Add `check_newline()'. (simple_output::flush_last_word): New function. * src/roff/troff/enc.cc (no_fill): Remove call to add_html_tag(). * src/roff/troff/div.cc (page_offset): Add call to add_html_tag(). * tmac/s.tmac (@PP, @IP): Add html conditional code. * tmac/an-old.tmac (TP): Ditto. * mdate.sh: Make it POSIX compliant.
Diffstat (limited to 'tmac/s.tmac')
-rw-r--r--tmac/s.tmac15
1 files changed, 11 insertions, 4 deletions
diff --git a/tmac/s.tmac b/tmac/s.tmac
index 9a8d65e9..076a4775 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -1132,7 +1132,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.de @PP
.par*start 0 0
.nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
-.ti +\\n[\\n[.ev]:ai]u
+.if !'\*(.T'html' .ti +\\n[\\n[.ev]:ai]u
..
.de @QP
.nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
@@ -1153,11 +1153,18 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
. par*pop-tag-env
. di
. chop par*label
-. ti -\\n[\\n[.ev]:ai]u
-. ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c
+. ie '\*(.T'html' \{\
+. ti -\\n[\\n[.ev]:ai]u
+\\*[par*label]
+. br
+. \}
. el \{\
+. ti -\\n[\\n[.ev]:ai]u
+. ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c
+. el \{\
\\*[par*label]
-. br
+. br
+. \}
. \}
. rm par*label
.\}