CVS log for mandoc/mandoc_html.3

[BACK] Up to [cvsweb.bsd.lv] / mandoc

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Fri Jun 24 11:15:53 2022 UTC (21 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +6 -2 lines
Diff to previous 1.23 (unified) to selected 1.20 (unified)

Improve accessibility of -T html -O toc output by using the <nav> element
in the DPUB-ARIA doc-toc role.
Patch from Anna Vyalkova <cyber at sysrq dot in> slightly tweaked by me.

This is hopefully the start of a collaboration to improve accessibility
of Unix manual pages using the WAI-ARIA, HTML-ARIA, and DPUB-ARIA standards.
Progress appears to be possible without changing *anything* with respect to
the way manual pages are written.  Instead, it seems sufficient to properly
translate semantic cues already implied by existing mdoc(7) markup into the
appropriate HTML elements and ARIA attributes.  Overall, the total length
of HTML output is likely to increase slightly, but not much.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Apr 24 13:13:06 2020 UTC (3 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_6
Changes since 1.22: +19 -2 lines
Diff to previous 1.22 (unified) to selected 1.20 (unified)

Resurrect the documentation of the print_otag() 's' attribute specifier,
reverting a minor part of rev. 1.21.  Contrary to what i thought, that
attribute *is* still supported for a small number of unusual cases.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Apr 19 15:16:56 2020 UTC (3 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +17 -16 lines
Diff to previous 1.21 (unified) to selected 1.20 (unified)

Correctly handle non-unique tags even when NODE_ID and NODE_HREF fall
apart, NODE_ID occurring earlier than NODE_HREF.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Apr 18 20:44:09 2020 UTC (3 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +137 -32 lines
Diff to previous 1.20 (unified)

Major update:
Complete includes, add several functions, no more <?xml?>,
no more style attributes, NODE_HREF flag, mention roff_html.c.

Revision 1.20 / (download) - annotate - [selected], Fri Mar 13 15:32:28 2020 UTC (4 years ago) by schwarze
Branch: MAIN
Changes since 1.19: +119 -18 lines
Diff to previous 1.19 (unified)

Split tagging into a validation part including prioritization
in tag.{h,c} and {mdoc,man}_validate.c
and into a formatting part including command line argument checking
in term_tag.{h,c}, html.c, and {mdoc|man}_{term|html}.c.

Immediate functional benefits include:
* Improved prioritization of automatic tags for .Em and .Sy.
* Avoiding bogus automatic tags when .Em, .Fn, or .Sy are explicitly tagged.
* Explicit tagging of .Er and .Fl now works in HTML output.
* Automatic tagging of .IP and .TP now works in HTML output.
But mainly, this patch provides clean earth to build further improvements on.

Technical changes:
* Main program: Write a tag file for ASCII and UTF-8 output only.
* All formatters: There is no more need to delay writing the tags.
* mdoc(7)+man(7) formatters: No more need for elaborate syntax tree inspection.
* HTML formatter: If available, use the "string" attribute as the tag.
* HTML formatter: New function to write permalinks, to reduce code duplication.

Style cleanup in the vicinity while here:
* mdoc(7) terminal formatter: To set up bold font for children,
defer to termp_bold_pre() rather than calling term_fontpush() manually.
* mdoc(7) terminal formatter: Garbage collect some duplicate functions.
* mdoc(7) HTML formatter: Unify <code> handling, delete redundant functions.
* Where possible, use switch statements rather than if cascades.
* Get rid of some more Yoda notation.

The necessity for such changes was first discussed with kn@, but i didn't
bother him with a request to review the resulting -673/+782 line patch.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jan 11 12:56:43 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.18: +2 -7 lines
Diff to previous 1.18 (unified) to selected 1.20 (unified)

Remove the HTML title= attributes which harmed accessibility and
violated the principle of separation of content and presentation.
Instead, implement the tooltips purely in CSS.
Thanks to John Gardner <gardnerjohng at gmail dot com> for
suggesting most of the styling in the new ::before rules.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Nov 26 01:38:23 2018 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +9 -1 lines
Diff to previous 1.17 (unified) to selected 1.20 (unified)

Support more than one style attribute one the same HTML element.
In fact, this is already required when a table uses non-default
horizontal and vertical alignment in the same cell.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 25 16:54:59 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4
Changes since 1.16: +4 -29 lines
Diff to previous 1.16 (unified) to selected 1.20 (unified)

Delete substantial amounts of code
now that we no longer use variable style= attributes.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 25 14:13:54 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.15: +1 -10 lines
Diff to previous 1.15 (unified) to selected 1.20 (unified)

Delete support for style=margin-left attributes, which are no longer used.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 25 14:00:28 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.14: +2 -26 lines
Diff to previous 1.14 (unified) to selected 1.20 (unified)

Delete support for style=width attributes, which are no longer used.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jun 25 13:26:57 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +2 -6 lines
Diff to previous 1.13 (unified) to selected 1.20 (unified)

Delete support for the style=text-indent attribute, which is no longer used.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jun 10 16:47:15 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +2 -6 lines
Diff to previous 1.12 (unified) to selected 1.20 (unified)

delete support for the HTML style=height property, which is no longer used

Revision 1.12 / (download) - annotate - [select for diffs], Tue May 29 02:10:10 2018 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +4 -12 lines
Diff to previous 1.11 (unified) to selected 1.20 (unified)

Delete support for the print_otag(sw) * and - modifiers,
which are no longer used because we write fewer style= attributes.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Apr 13 16:28:07 2018 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +17 -3 lines
Diff to previous 1.10 (unified) to selected 1.20 (unified)

preserve comments before .Dd and .TH (typically Copyright and license)
in full HTML output, but not with -Ofragment, e.g. in man.cgi(8);
suggested by Thomas Klausner <wiz at NetBSD>

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jul 15 17:57:51 2017 UTC (6 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_3, VERSION_1_14_2
Changes since 1.9: +8 -5 lines
Diff to previous 1.9 (unified) to selected 1.20 (unified)

In .Bl -tag and -hang, do not print a margin-left style attribute
for each individual item if the -width argument matches the default
of 6n.  Suggested by Steffen Nurpmeso <steffen at sdaoden dot eu>
on <groff at GNU dot org> in April 2017.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 14 16:06:44 2017 UTC (6 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +2 -15 lines
Diff to previous 1.8 (unified) to selected 1.20 (unified)

Handle .Bl -compact via CSS rather than writing individual style
attributes into .It blocks; suggested by Steffen Nurpmeso <steffen
at sdaoden dot eu> on <groff at GNU dot org> in April 2017.

Delete margin-bottom and margin-top style names and the 'v' argument
letter from print_otag() because they are no longer used.

Revision 1.8 / (download) - annotate - [select for diffs], Fri May 12 17:58:21 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +15 -7 lines
Diff to previous 1.7 (unified) to selected 1.20 (unified)

Make the tag column in .Bl -tag lists wider:
1. I forgot about the 2n padding between tag and body.
2. The factor 1.1 was too small for bold fold, make it *1.15 + 1n.
Ugliness spotted by tb@.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Mar 15 11:29:53 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.6: +30 -3 lines
Diff to previous 1.6 (unified) to selected 1.20 (unified)

Minimal support for deep linking into man(7) pages.
As the man(7) language does not provide semantic markup,
only .SH, .SS, and .UR become anchors for now.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Mar 13 19:01:38 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.5: +7 -2 lines
Diff to previous 1.5 (unified) to selected 1.20 (unified)

Print title="..." in addition to id="..." attributes for macro keys
that can be searched for by apropos(1), such that you see the
semantic function in a tooltip when hovering with the mouse.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Jan 28 22:36:38 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.4: +16 -5 lines
Diff to previous 1.4 (unified) to selected 1.20 (unified)

Simplify usage of print_otag() even more:
accept NULL to skip the attribute or format.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jan 25 02:14:43 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +5 -1 lines
Diff to previous 1.3 (unified) to selected 1.20 (unified)

Improve HTML formatting of .Bl -tag.

In particular, when using the style sheet, put the body on the same
line as the head for short heads, or on the next line for long
heads, in a way that preserves both correct indentation and correct
vertical spacing with and without -compact, and with one or more
heads per body (hi, Zaphod) - eight use cases so far - and with and
without -tag, and with and without -offset, 32 use cases grand total.

Using many ideas from zhuk@, from <David dot Dahlberg at fkie dot
fraunhofer dot de>, and from Benny Lofgren <bl dash lists at lofgren
dot biz>, and a few of my own.

This is an excellent demonstration that CSS is an extremely hostile
language, much more trapful and much harder to use than, say, C.
When matthew@ reported this in July 2014 (!), it was already a known
issue, and i no longer remember for how long.  My first serious
attempt at fixing it (in November 2015) failed miserably.  I'd love
to see simplifications of both the generated HTML code and of the
style sheet, but without breaking any of the 32 use cases, please.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 17 15:32:44 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +23 -27 lines
Diff to previous 1.2 (unified) to selected 1.20 (unified)

Completely delete the buf field of struct html and all the buf*()
interfaces.  Such a static buffer was a bad idea in the first place,
causing unfixable truncation that was only prevented by triggering
an assertion failure.  Instead, let the small number of remaining
users allocate and free their own, temporary dynamic buffers,
or for the case of .Xr and .In, pass the original data to be
assembled in print_otag().

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jan 17 01:47:51 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +114 -19 lines
Diff to previous 1.1 (unified) to selected 1.20 (unified)

Simplify the usage of print_otag() by making it accept a variable
number of arguments.

Delete struct htmlpair and all the PAIR_*() macros.
Delete enum htmlattr, handle that in print_otag() instead.

Minus 190 lines of code; no functional change except better ordering
of attributes (class before style) in three cases.

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jul 23 18:13:09 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4, VERSION_1_13_3, VERSION_1_13_2, VERSION_1_13_1, VERSION_1_12_4, VERSION_1_12
Diff to selected 1.20 (unified)

Partially document the core of the HTML formatter.
Stuff i learnt during my audit for XSS vulnerabilities.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb