summaryrefslogtreecommitdiff
path: root/tmac/s.tmac
diff options
context:
space:
mode:
authorwl <wl>2007-09-19 14:55:54 +0000
committerwl <wl>2007-09-19 14:55:54 +0000
commite4f206b8a3104ee734b913a2d50980bf5bdf3634 (patch)
tree814cb9652b873192c9648453480aa48f37c41271 /tmac/s.tmac
parente128c4d2011e4dce3bb8db70fdeb59816f839c40 (diff)
downloadgroff-e4f206b8a3104ee734b913a2d50980bf5bdf3634.tar.gz
* doc/groff.texinfo: Document new .O register and add cross
reference entries. * NEWS: Updated. * src/devices/grohtml/grohtml.man: Document new -V and -y options. * src/devices/grohtml/html-table.cpp: Add support for XHTML 1.1. (html_table:: emit_colspan, html_table::emit_td): New methods. (html_table::emit_col): Use html_table::emit_td. (html_table::emit_table_header): Use html_table::emit_colspan if dialect xhtml is specified. (html_table::finish_row): Updated. * src/devices/grohtml/html-table.h (html_table): Declare emit_colspan, emit_td. * src/devices/grohtml/html-text.cpp: Modified tags to comply with xhtml if this dialect was requested. * src/devices/grohtml/html-text.h (html_dialect): New enumeration. (html_text): Add new variable `dialect'. * src/devices/grohtml/post-html.cpp: Modify header tags to be XHTML compliant. (valid_flag, groff_sig, dialect): New global variables. (html_printer::handle_valid_flag, html_printer::do_math, html_printer::write_html_anchor, html_printer::write_xhtml_anchor, html_printer::do_math, html_printer::handle_valid_flag): New methods. (html_printer::emit_line, html_printer::emit_raw, html_printer::do_check_center, html_printer::write_title, write_rule, html_printer::writeHeadMetaStyle, generate_img_src, html_printer::begin_page): Altered to be XHTML compliant. (html_printer::write_header): Updated. (html_printer::troff_tag): Call do_math. (html_printer::insert_split_file, html_printer::do_file_components, html_printer::write_navigation): Create XHTML file components if necessary and also produces a groff signature if requested. (~html_printer): Call writeHeadMetaStyle at appropriate places depending upon html_dialect. (html_printer::special): Handle new tags `html<?p>' and `math<?p>'. (main): Added options -x, -V, and -y. (usage): Updated. * src/preproc/eqn/box.cpp: Create a distinction between the MathML device and the XHTML device. (do_text): Issue a newline at the end of the equation if XHTML was specified. (box::top_level): Prefix the output of an equation by the .MATHML macro. (output_string): Suppress \n if XHTML was specified. * src/preproc/eqn/main.cpp (xhtml): New global flag. (inline_equation): Skip leading spaces after inline equation for XHTML device. (main): Set `xhtml' flag if `-Tmathml:xhtml' is specified. * src/preproc/eqn/eqn.h (xhtml): New external flag. * src/preproc/eqn/text.cpp (entity_table): Fix typo. * src/preproc/html/pre-html.cpp (html_dialect): New enumeration. (dialect, eqn_flag): New global variables. (html_system): Improve debugging support. (alterDeviceTo): Test for -Txhtml when altering device to the image device and reset to -Txhtml. (addZ): Renamed to... (addArg): This. Introducea a general parameter. (print_args): New debugging function. (char_buffer::run_output_filter): Use print_args and addArg rather than addZ. (char_buffer::do_html, char_buffer::do_image): Add -rxhtml=1 command line parameter as an argument to the html generation of text when xhtml is needed. Include -e on the command line if mathml is required. (scanArguments): Allow -e, -V, -y and -x options. -V, -y are handled by the back end. -e sets `eqn_flag'. -x determines HTML dialect. * src/roff/groff/groff.cpp (possible_command): New method `clear_name'. (main): Set eflag if -e is present on command line. Set is_xhtml if -Txhtml is present. Pass `-x x' to the HTML pre and post processors. Pass `-e' to the HTML pre processor if required. Pass `-Tmathml:xhtml' to eqn if XHTML is requested. * src/roff/troff/input.cpp (init_input_requests): Introduce new number register `\n[.O]'. * tmac/s.tmac: (LP): Use .nop for semantic sugar. (cov*ab-init) reformat. (@EQ): Use EQN-HTML-IMAGE and friends rather than HTML-IMAGE. (CHECK-FOOTER-AND-KEEP): Define FS, FE such that they use <cite></cite> for the html device rather than generate images for footnotes. * tmac/troffrc-end: Define EQN-HTML-IMAGE, EQN-HTML-IMAGE-END, EQN-HTML-IMAGE-RIGHT, EQN-HTML-IMAGE-LEFT, EQN-HTML-IMAGE-INLINE, EQN-HTML-DO-IMAGE, EQN-HTML-IMAGE-END as null strings. * tmac/www.tmac: (HTML<?p>): New macro. (MATH<?p>): New macro. (IMG, PIMG, MPIMG, HR): Use XHTML compliant syntax. (www-emit-ltag): New macro. (www-push-li): Updated. (ULS): Ensure that tags are balanced in order by use of www-emit-ltag. (ULE): Likewise: Use www-emit-ltag and shut down paragraphs in order. (OLS, OLE, DLS, DLE): Ditto. <global>: Define EQ and EN to EQN-HTML-IMAGE and EQN-HTML-IMAGE-END respectively. (www-li-ul, www-li-ol, www-li-dl): Updated. (EQN-HTML-IMAGE, EQN-HTML-IMAGE-RIGHT, EQN-HTML-IMAGE-LEFT, EQN-HTML-IMAGE-INLINE, EQN-HTML-DO-IMAGE, EQN-HTML-IMAGE-END, MATHML): New macros.
Diffstat (limited to 'tmac/s.tmac')
-rw-r--r--tmac/s.tmac63
1 files changed, 27 insertions, 36 deletions
diff --git a/tmac/s.tmac b/tmac/s.tmac
index ba392797..c873e158 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -221,6 +221,7 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
. ps \\n[PS]
.\}
..
+.
.de LP
.if !'\\n[.z]'' \{\
. br
@@ -229,8 +230,9 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
.br
.cov*ab-init
.cov*print
-\\*[\\$0]\\
+.nop \\*[\\$0]\\
..
+.
.als IP LP
.als PP LP
.als XP LP
@@ -241,6 +243,7 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
.als MC LP
.als RT LP
.als XS LP
+.
.de cov*ab-init
.als cov*ab-init @nop
.als LP @LP
@@ -265,6 +268,7 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
.als AI par@AI
.als TL par@TL
..
+.
.de @AB
.if !'\\n(.z'' \{\
. br
@@ -342,7 +346,7 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
.cov*tl-au-print
.sp 3
.if d cov*ab-div \{\
-. if !'\*(.T'html' . nf
+. if !'\*(.T'html' .nf
. cov*ab-div
.\}
.sp 3
@@ -1691,12 +1695,12 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
.\}
.di eqn*div
.in 0
-.if \\n[eqn*type]=0 .HTML-IMAGE-LEFT
+.if \\n[eqn*type]=0 .EQN-HTML-IMAGE-LEFT
.if \\n[eqn*type]=1 \{\
. if '\*(.T'html' .RS
-. HTML-IMAGE-INLINE
+.EQN-HTML-IMAGE-INLINE
.\}
-.if \\n[eqn*type]=2 .HTML-IMAGE
+.if \\n[eqn*type]=2 .EQN-HTML-IMAGE
.nf
..
.de @div-end!eqn*div
@@ -1744,20 +1748,21 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
. \}
. el \{
.\" must terminate empty equations in html and ps4html as they contain
-.\" the HTML-IMAGE-END suppression nodes
+.\" the EQN-HTML-IMAGE-END suppression nodes
. if \\n[dl] .chop eqn*div
. if '\*(.T'html' \\*[eqn*div]
. if r ps4html \\*[eqn*div]
. \}
. if !'\*(.T'html' .fi
-. if \\n[eqn*type]=0 .HTML-IMAGE-END
+. if \\n[eqn*type]=0 .EQN-HTML-IMAGE-END
. if \\n[eqn*type]=1 \{\
-. HTML-IMAGE-END
+. EQN-HTML-IMAGE-END
. if '\*(.T'html' .RE
. \}
-. if \\n[eqn*type]=2 .HTML-IMAGE-END
+. if \\n[eqn*type]=2 .EQN-HTML-IMAGE-END
.\}
..
+.
.\" ****************************
.\" ******** module tbl ********
.\" ****************************
@@ -2065,35 +2070,21 @@ Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
.ds ! \(r!\" upside down !
..
.de CHECK-FOOTER-AND-KEEP
-.\" it might be better to als FS -> B1 and FE -> B2
-.\" however this produced wierd results, so I've moved back to a more reliable
-.\" but less interesting solution --fixme--
-. if '\*(.T'html' \{\
-. rm KF
-. als KF KS
-. rm FS
-. de FS
-. br
-. HTML-IMAGE
-\\..
-. rm FE
-. de FE
-. br
-. HTML-IMAGE-END
-\\..
-. \}
-. if r ps4html \{\
-. rm FS
-. de FS
-. br
-. HTML-IMAGE
+.if '\*(.T'html' \{\
+. rm KF
+. als KF KS
+.
+. rm FS
+. de FS
+. sp
+. HTML-NS <cite>
\\..
-. rm FE
-. de FE
-. br
-. HTML-IMAGE-END
+. rm FE
+. de FE
+. HTML-NS </cite>
+. sp
\\..
-. \}
+.\}
..
.par@load-init
.\" ****************************