summaryrefslogtreecommitdiff
path: root/tmac/html.tmac
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-01-17 14:17:18 +0000
committerwlemb <wlemb>2001-01-17 14:17:18 +0000
commita701afffed51dcf73ae7bf7d9cbdef5529da9fe9 (patch)
tree2c7a7eebc9bbd098b3d60de93780bc224de45c0b /tmac/html.tmac
parent57e44dadb9786a2587694197dccbf58ad7a03790 (diff)
downloadgroff-a701afffed51dcf73ae7bf7d9cbdef5529da9fe9.tar.gz
First cut of the new html device driver. Changes to pre-html and
the new grohtml are too numerous to be documented here. Stuff related to `html' has been renamed to `html-old' and `html2' stuff has been renamed to `html' (including directories). The new html device driver is therefore invoked as `-Thtml'. Added new `O' escape to suppress output (needed by html driver). Added functions and code to pass info about input-level commands (`.in', `.fl', etc.) to html driver. Three new functions (.html-begin, .html-end, and .html-image) for better html handling: `html-begin' will execute the remaining line if at the outermost nesting level, increasing an internal counter. `html-end' does the same but decreases the internal counter. `html_image' puts its arguments into a special node (suppress_node) to define an image region. The `output' request has been removed. * tmac/html-tags.tmac: Removed. * tmac/arkup.tmac: Updated and renamed to ... * tmac/www.tmac: New file. * tmac/markup.tmac Updated and renamed to ... * tmac/mwww.tmac: New file. * tmac/Makefile.sub: Updated. * tmac/an-old.tmac: Updated. * tmac/eqnrc: Updated. * tmac/groff_man.man * tmac/groff_markup.man: Updated and renamed to ... * tmac/groff_mwww.man: New file. * tmac/groff_tmac.man: Updated. * tmac/html-old.tmac: Updated and Renamed from html.tmac. * tmac/html.tmac: Updated and renamed from html2.tmac. * tmac/pspic.tmac: Updated html support. * tmac/s.tmac: Added html output support. * tmac/troffrc, tmac/troffrc-end: Updated. * Makefile.in, doc/Makefile: Updated. * doc/groff.texinfo: Added info about new `O' escape. * doc/homepage.ms: Use `MAILTO' macro. * font/devhtml/DESC.proto: Add `C' font. * font/devhtml/Makefile.sub: Updated. * font/devhtml/R.proto: Minor fixes. * font/devhtml-old/Makefile.sub: Updated. * src/devices/grohtml-old/Makefile.sub: Updated. * src/libs/libdriver/printer.cc (printer::get_font_from_index): New method. * src/libs/libgroff/htmlindicate.cc (html_begin_suppress, graphic_start): Add `inline' parameter. Update. (html_end_suppress, graphic_end): Update. * src/include/html-strings.h: New file. * src/include/htmlindicate.h: Comments updated. * src/include/printer.h: Updated. * src/preproc/eqn/main.cc (do_file, main): Updated. * src/preproc/pic/troff.cc (troff_output::start_picture, troff_output::finish_picture): Updated. * src/preproc/tbl/main.cc (process_input_file): Updated. * src/roff/groff/groff.cc (main): Updated. Pass device arguments to predrivers also. Use `ps' device for `eqn' preprocessor if `-Thtml' is given. * src/roff/troff/env.h (environment): Updated. New elements `need_eol' and `ignore_next_eol' (for html output). * src/roff/troff/env.cc (environment::environment): Add initializers for `need_eol' and `ignore_next_eol'. (environment::add_html_tag_eol, environment::add_html_tag_tabs): New functions. (point_size, fill, no_fill, center, right_justify, line_length, indent, temporary_indent, break_request, handle_tab): Use `add_html_tag()'. (set_tabs): Use `add_html_tag_tabs()'. (environment::add_html_tag): Updated. (environment::do_break): Updated. * src/roff/troff/div.cc (space_request, flush_output): Use `environment::add_html_tag()'. * src/roff/troff/input.cc: Updated. New variable `html_level' to indicate nested `html-begin' requests. (file_iterator::fill): Use `environment::add_html_tag_eol()'. (non_interpreted_char_node, token_node, non_interpreted_node): Add `force_tprint()' method. (token::next): Handle `O'. (do_suppress): Implement it. (html_begin, html_end, html_image): New functions. (init_output_requests): Renamed to ... (init_html_requests): this. (main): Use it. (macro::append_str, macro::append_unsigned, macro::append_int): New methods. New variable `output_low_mark_miny' to limit minimal value of y. (reset_output_registers): Use it. (output_request): Removed. (get_output_registers): New function. * src/roff/troff/node.h (node): Make `force_tprint()' virtual. (*_node): Added `force_tprint()' if necessary. (special_node): New elements `tf' and `get_tfont()'. (suppress_node): New class. * src/roff/troff/node.cc: New global variables `image_no' and `suppress_start_page'. (real_output_file): New method `is_on()'. (troff_output_file): New method `start_special(tfont)'. (troff_output_file::really_print_line): Use `tprint' conditionally. (real_output_file::print_line): Updated. (real_output_file::on): Updated. (*_node): Added `force_tprint()'. (special_node::special_node): Initializer updated. (special_node::same, special_node::copy, special_node::tprint_start): Updated. (get_reg_int, get_reg_str): New functions. (suppress_node::*): New methods. New global variables last_position, last_image_filename; (min): New inline function. * src/roff/troff/reg.h, src/roff/troff/request.h, src/roff/troff/troff.h: Updated.
Diffstat (limited to 'tmac/html.tmac')
-rw-r--r--tmac/html.tmac42
1 files changed, 14 insertions, 28 deletions
diff --git a/tmac/html.tmac b/tmac/html.tmac
index 05457807..199245b1 100644
--- a/tmac/html.tmac
+++ b/tmac/html.tmac
@@ -10,13 +10,6 @@
.ftr HO HI
.ftr HX HBI
.ftr NX NBI
-.char \(ru \D'l .5m 0'
-.char \(ul \v'.25m'\D'l .5m 0'\v'-.25m'
-.char \(br \v'.25m'\D'l 0 -1m'\v'.75m'
-.char \(rn \v'-.75m'\D'l .5m 0'\v'.75m'
-.\" .char ~ \v'-.55m'\\s[\\n(.s/2u]\v'.2m'\(ti\v'-.2m'\s0\v'.55m'
-.\" .char ^ \v'-.55m'\\s[\\n(.s/2u]\v'.3m'\(ha\v'-.3m'\s0\v'.55m'
-.if !c\(va .char \(va \o'\(ua\(da'
.if !c\(em .char \(em --
.if !c\(en .char \(en \-
.if !c\(fi .char \(fi fi
@@ -24,39 +17,32 @@
.if !c\(ff .char \(ff ff
.if !c\(Fi .char \(Fi ffi
.if !c\(Fl .char \(Fl ffl
-.if !c\(ci .char \(ci \v'-.25m'\h'.05m'\D'c .5m'\h'.05m'\v'.25m'
-.if !c\(sq .char \(sq \h'.05m'\D'l .5m 0'\D'l 0 -.5m'\D'l -.5m 0'\D'l 0 .5m'\h'.55m'
-.if !c\(ga .char \(ga \Z'\v'-.7m'\D'l .22m .18m''\h'.33m'
-.if !c\(dg .char \(dg \Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\
-\D'l .39m 0''\h'.5m'
-.if !c\(dd .char \(dd \Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\
-\D'l .39m 0'\v'.4m'\D'l -.39m 0''\h'.5m'
.if !c\(lq .char \(lq ``
.if !c\(rq .char \(rq ''
.if !c\(Bq .char \(bq ,,
-.if !c\(OE .char \(OE O\h'-.25m'E
-.if !c\(oe .char \(oe o\h'-.14m'e
-.if !c\(ah .char \(ah \v'-.55m'\s[\En[.s]/2u]v\s0\v'.55m'
-.if !c\(ao .char \(ao \v'-.55m'\s[\En[.s]*6u/10u]\D'c .25m'\s0\v'.55m'
-.if !c\(ho .char \(ho \s[\En[.s]/2u]\v'.4m'c\v'-.4m'\s0
+.if !c\(OE .char \(OE OE
+.if !c\(oe .char \(oe oe
.if !c\(lh .char \(lh <-
.if !c\(rh .char \(rh ->
.if !c\(bq .tr \(bq,
.if !c\(aq .tr \(aq'
-.if '\*(.T'html' .char \[radicalex] \h'-\w'\(sr'u'\[radicalex]\h'\w'\(sr'u'
.if !\n(_C .mso pspic.tmac
.cp \n(_C
.\" now turn off all headers and footers for ms, me and mm macro sets
-.if d EF .EF '''
-.if d EH .EH '''
-.if d OF .OF '''
-.if d OH .OH '''
-.if d ef .ef '''
-.if d of .of '''
-.if d oh .oh '''
-.if d eh .eh '''
+.if d EF .EF ''''
+.if d EH .EH ''''
+.if d OF .OF ''''
+.if d OH .OH ''''
+.if d ef .ef ''''
+.if d of .of ''''
+.if d oh .oh ''''
+.if d eh .eh ''''
+.tl ''''
.\" it doesn't make sense to use hyphenation with html, so we turn it off.
+.\" avoid line breaks after hyphen-like characters.
.hy 0
.nr HY 0
.\" avoid line breaks after hyphen-like characters.
.cflags 0 -\(hy\(em\(en\[shc]
+.pl 99999
+.\" eof of file, make sure this is the last time