[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] -Txhtml
From: |
Gaius Mulley |
Subject: |
Re: [Groff] -Txhtml |
Date: |
10 Apr 2007 23:13:26 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Werner LEMBERG <address@hidden> writes:
> > here are some proposed patches which introduce the xhtml device.
>
> The patches look fine! I ask you for two things:
>
> . Please provide the patch with `diff -u ...'
>
> . Please provide a ChangeLog entry too.
>
>
> Werner
Hi Werner,
here is the ChangeLog for the patches:
2007-04-10 Gaius Mulley <address@hidden>
* doc/groff.texinfo: Document new .O register and add cross
reference entries.
* src/devices/grohtml/grohtml.man: Document new -V and -y options.
* src/devices/grohtml/html-table.cpp: Modified <table> and related
tags to comply with xhtml 1.1.
(emit_colspan, emit_td): New methods.
(emit_col): Use emit_td.
(emit_table_header): Use emit_colspan if dialect xhtml is
specified.
* src/devices/grohtml/html-table.h: Declare emit_colspan, emit_td.
* src/devices/grohtml/html-text.cpp: Add new variable (dialect).
Modified tags to comply with xhtml if this dialect was requested.
* src/devices/grohtml/html-text.h: Declare html_dialect enum and
allow it to be passed into the constructor html_text.
* src/devices/grohtml/post-html.cpp: Add variables (valid_flag,
groff_sig, dialect). Modify header tag to be xhtml compliant.
(handle_valid_flag, do_math, write_html_anchor,
write_xhtml_anchor): Added methods to html_printer.
(emit_line, emit_raw, do_check_center, write_title,
write_rule, writeHeadMetaStyle): Altered to be xhtml compliant.
(insert_split_file, do_file_components): 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.
(handle_valid_flag): New method.
(main): Added options, x, V and y.
(troff_tag): Call do_math.
(do_math): New method.
* 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 device xhtml specified.
(toplevel): Prefix the output of an equation by the
.MATHML macro.
(output_string): Suppress \n if xhtml was specified.
* src/preproc/eqn/main.cpp: Introduce xhtml 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: Declare xhtml flag as external.
* src/preproc/eqn/text.cpp: Fix typo, added ';' to 'nu'.
* src/preproc/html/pre-html.cpp: Define (html_dialect,
eqn_flag).
(html_system): Improve debugging support.
(alterDeviceTo): Test for -Txhtml when altering device
to the image device and reset to -Txhtml.
(addZ, addArg): Renamed addZ to addArg and introduced a
general parameter.
(print_args): New debugging function.
(run_output_filter): Use print_args and addArg rather
than addZ.
(do_html): 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: (clear_name) New method.
(main): Set eflag is -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. (PIMG), (MPIMG), (HR) use xhtml
compliant syntax.
(www-emit-ltag): New macro.
(ULS): Ensure that tags are balanced in order by use of
www-emit-ltag.
(ULE): Likewise uses www-emit-ltag and shuts down
paragraphs in order.
(OLS, OLE, DLS, DLE): Ditto.
Define EQ and EN to EQN-HTML-IMAGE and EQN-HTML-IMAGE-END
respectively.
(EQN-HTML-IMAGE): New macro.
(EQN-HTML-IMAGE-RIGHT): New macro.
(EQN-HTML-IMAGE-LEFT): New macro.
(EQN-HTML-IMAGE-INLINE): New macro.
(EQN-HTML-DO-IMAGE): New macro.
(EQN-HTML-IMAGE-END): New macro.
(MATHML): New macro.
and here are the patches compressed
latest_patch_10.gz
Description: patch for -Txhtml
regards,
Gaius