Michael Smith [Wed, 5 Mar 2008 15:16:10 +0000 (15:16 +0000)]
Made reporting of missing refentry metadata more quiet:
- we no longer report anything if usable-but-not-preferred
metadata is found; we just quietly use whatever we manage to
find
- we now only report missing "source" metadata if the refentry
is missing BOTH "source name" and "version" metadata; if it
has one but not the other, we use whichever one it has and
don't report anything as missing
The above changes were made because testing with some "real world"
source reveals that some authors are intentionally choosing to use
"non preferred" markup for some metadata, and also choosing to
omit "source name" or "version" metadata in there DocBook XML. So
it does no good to give them pedantic reminders about what they
already know...
Also, changed code to cause "fixme" text to be inserted in output
in particular cases:
- if we can't manage to find any "source" metadata at all, we
now put fixme text into the output
- if we can't manage to find any "manual" metadata a all, we
now put fixme text into the output
The "source" and "manual" metadata is necessary information, so
buy putting the fixme stuff in the output, we alert users to the
need problem of it being missing.
Michael Smith [Wed, 5 Mar 2008 10:19:29 +0000 (10:19 +0000)]
for a para or simpara that is the first child of a callout,
suppress the .sp or .PP that would normally be output (because in
those cases, the output goes into a table cell, and the .sp or .PP
markup causes a spurious linebreak before it when displayed
Michael Smith [Wed, 5 Mar 2008 10:13:59 +0000 (10:13 +0000)]
Added support for rendering co callouts and calloutlist instances.
So you can now use simple callouts -- marking up programlisting
and such with co instances -- and have the callouts displayed in
man-page output. ("simple callouts" means using co@id and
callout@arearefs pointing to co@id instances; in man/roff output,
we can't/don't support markup that uses areaset and area)
Michael Smith [Tue, 4 Mar 2008 10:40:21 +0000 (10:40 +0000)]
When generating manpages output, we no longer report anything if
the refentry source is missing date or pubdate content. In
practice, many users intentionally omit the date from the source
because they explicitly want it to be generated.
Michael Smith [Tue, 4 Mar 2008 07:07:43 +0000 (07:07 +0000)]
Made refinements/fixes to output of orderedlist and itemizedlist
-- in part, to get mysql man pages to display correctly. This
change causes a "\c" continuation marker to be added between
listitem markers and contents (to ensure that the content remains
on the same line as the marker when displayed)
Michael Smith [Tue, 4 Mar 2008 04:20:37 +0000 (04:20 +0000)]
Deal with case of verbatim environments that have a linebreak
after the opening tag. Assumption is that users generally don't
want that linebreak to appear in output, so we do some groff
hackery to mess with vertical spacing and close the space.
Michael Smith [Tue, 4 Mar 2008 03:27:47 +0000 (03:27 +0000)]
convert no-break space character to groff "\ \&" (instead of just
"\ "). the reason is that if a space occurs at the end of a line,
our processing causes it to be eaten. a real-world case of this is
the mysql(1) man page. appending the "\&" prevents that
Mauritz Jeanson [Mon, 3 Mar 2008 21:19:02 +0000 (21:19 +0000)]
Copy over the libxslt README too (currently there is no other documentation).
Do not delete the extensions directory when cleaning; only delete (non-dot) files in it.
Mauritz Jeanson [Mon, 3 Mar 2008 15:59:40 +0000 (15:59 +0000)]
Changed the name of the script file back to "xslt.py". Using "libxslt.py"
leads to a name clash since the script contains a "import libxslt" statement.
Michael Smith [Mon, 3 Mar 2008 05:07:39 +0000 (05:07 +0000)]
output "sp" before simpara output, not after it (outputting it
after results in undesirable whitespace in particular cases; for
example, in the hg/mercurial docs
Michael Smith [Sat, 1 Mar 2008 08:11:54 +0000 (08:11 +0000)]
Reworked output for admonitions (caution, important, note, tip,
warning). In TTY output, admonitions now get indented. In non-TTY
output, a colored marker (yellow) is displayed next to them.
Michael Smith [Sat, 1 Mar 2008 08:06:05 +0000 (08:06 +0000)]
created make.bold.title template by moving title-bolding part out
from nested-section-title template. This allows the bolding to
also be used by the template for formatting admonitions
Michael Smith [Fri, 29 Feb 2008 12:41:18 +0000 (12:41 +0000)]
Added the man.charmap.subset.profile.english parameter and refined
the handling of charmap subsets to differentiate between English
and non-English source.
This way charmap subsets are now handled is this:
If the value of the man.charmap.use.subset parameter is non-zero,
and your DocBook source is not written in English (that is, if its
lang or xml:lang attribute has a value other than en), then the
character-map subset specified by the man.charmap.subset.profile
parameter is used instead of the full roff character map.
Otherwise, if the lang or xml:lang attribute on the root element
in your DocBook source or on the first refentry element in your
source has the value en or if it has no lang or xml:lang
attribute, then the character-map subset specified by the
man.charmap.subset.profile.english parameter is used instead of
man.charmap.subset.profile.
The difference between the two subsets is that
man.charmap.subset.profile provides mappings for characters in
Western European languages that are not part of the Roman
(English) alphabet (ASCII character set).
Michael Smith [Fri, 29 Feb 2008 09:08:53 +0000 (09:08 +0000)]
Various updates, mainly related to uppercasing SH titles:
- added a "Language: " metadata line to the top comment area of
output man pages, to indicate the language the page is in
- added a "toupper" macro of doing locale-aware uppercasing of
SH titles and cross-references to SH titles; the mechanism
relies on the uppercase.alpha and lowercase.alpha DocBook
gentext keys to do locale-aware uppercasing based on the
language the page is written in
- added a "string.shuffle" template, which provides a library
function for "shuffling" two strings together into a single
string; it takes the first character for the first string, the
first character from second string, etc. The only current use
for it is to generate the argument for the groff tr request
that does string uppercasing.
- added make.tr.uppercase.arg and make.tr.normalcase.arg named
templates for use in generating groff code for uppercasing and
"normal"-casing SH titles
- made the BB/BE "background drawing" macros have effect only in
non-TTY output
Michael Smith [Fri, 29 Feb 2008 08:51:42 +0000 (08:51 +0000)]
To create the name(s) for each man page, we now replace any spaces
in the refname(s) with underscores. This ensures that tools like
lexgrog(1) will be able to parse the name (lexgrog won't parse
names that contain spaces).
Michael Smith [Fri, 29 Feb 2008 08:49:53 +0000 (08:49 +0000)]
Put a comment into source of man page to indicate where the main
content starts. (We now have a few of macro definitions at the
start of the source, so putting this comment in helps those that
might be viewing the source.)
Michael Smith [Wed, 27 Feb 2008 07:24:20 +0000 (07:24 +0000)]
Added zcaron, Zcaron, scaron, and Scaron to the groff character map.
This means that generated Finnish man pages will no longer contain
any raw accented characters -- they'll instead by marked up with
groff escapes.
Michael Smith [Wed, 27 Feb 2008 07:12:05 +0000 (07:12 +0000)]
Added to default charmap used by manpages:
- the "letters" part of the 'C1 Controls And Latin-1 Supplement
(Latin-1 Supplement)' Unicode block
- Latin Extended-A block (but not all of the characters from
that block have mappings in groff, so some of them are still
passed through as-is)
The effects of this change are that in man pages generated for
most Western European languages and for Finnish, all characters
not part of the Roman alphabet are (e.g., "accented" characters)
are converted to groff escapes.
Previously, by default we passed through those characters as is
(and users needed to use the full charmap if they wanted to have
those characters converted).
As a result of this change, man pages generated for Western
European languages will be viewable in some environments in which
they are not viewable if the "raw" non-Roman characters are in them.
Michael Smith [Tue, 26 Feb 2008 11:51:32 +0000 (11:51 +0000)]
corrected a regression I introduced about a year ago that caused
dots to be output just as "\." -- instead needs to be "\&." (which
is what it will be now, after this change)
Michael Smith [Tue, 26 Feb 2008 10:09:01 +0000 (10:09 +0000)]
Changed backend handling for generating titles for SH sections and
for cross-references to those sections. This should have no effect
on TTY output (behavior should remain the same hopefully) but
results in titles in normal case (instead of uppercase) in PS
output.
Michael Smith [Tue, 26 Feb 2008 09:55:32 +0000 (09:55 +0000)]
Initial checkin of some changes related to making PS/PDF output
from "man -l -Tps" look better. The current changes:
- render synopsis and verbatim sections in a monospace/code font
- put a light-grey background behind all programlisting, screen,
and literallayout instances
- prevent SH heads in PS output from being rendered in uppercase
(as they are in console output)
- also display xrefs to SH heads in PS output in normal case
(instead of uppercase)
- draw a line under SH heads in PS output
The changes made to the code to support the above features were:
- added some embedded/custom macros: one for conditionally
upper-casing SH x-refs, one for redefining the SH macro
itself, with some conditional handling for PS output, and
finally a macro for putting a background/screen (filled box)
around a block of text (e.g., a program listing) in PS output
- added utility templates for wrapping blocks of text in code
font; also templates for inline code font
Mauritz Jeanson [Thu, 21 Feb 2008 17:25:57 +0000 (17:25 +0000)]
Added preliminary README information for libxslt extensions.
The adjustColumnWidths() function works well for me (tested on
Windows XP with Python 2.5).
Michael Smith [Thu, 21 Feb 2008 08:40:47 +0000 (08:40 +0000)]
Fixed alignment of first lined of text for each listitem in
orderedlist output for TTY. Existing code seemed to have been
causing an extra undesirable space to appear.
Michael Smith [Thu, 21 Feb 2008 08:37:13 +0000 (08:37 +0000)]
Wrapped some roff conditionals around roff markup for orderedlist
and itemizedlist output, so that the lists look acceptable in PS
output as well as TTY.
Michael Smith [Thu, 21 Feb 2008 04:10:17 +0000 (04:10 +0000)]
Simplified and streamlined handling of output for ANSI-style
funcprototype output, to correct a problem that was causing type
data to be lost in the output parameter definitions. For example,
for an instance like this:
<paramdef>void *<parameter>dataptr</parameter>[]</paramdef>
... the brackets (indicating an array type) were being dropped.
Michael Smith [Wed, 20 Feb 2008 16:49:45 +0000 (16:49 +0000)]
Changed HTML handling of K&R-style paramdef output. The parameter
definitions are no longer output in a table (though the prototype
still is). The reason for the change is that the
kr-tabular-funcsynopsis-mode template was causing type data to be
lost in the output parameter definitions. For example, for an
instance like this:
<paramdef>void *<parameter>dataptr</parameter>[]</paramdef>
... the brackets (indicating an array type) were being dropped.
The easiest way to deal with the problem is to not try to chop up
the parameter definitions and display them in table format, but to
instead just output them as-is. May not look quite as pretty, but
at least we can be sure no information is being lost...
Michael Smith [Wed, 20 Feb 2008 11:42:45 +0000 (11:42 +0000)]
Added the man.funcsynopsis.style parameter. Has the same effect in
manpages output as the funcsynopsis.style parameter has in HTML
output -- except that its default value is 'ansi' instead of 'kr'.
Michael Smith [Wed, 20 Feb 2008 07:00:18 +0000 (07:00 +0000)]
Reworked handling of K&R funcprototype output. It no longer relies
on the HTML kr-tabular templates, but instead just does direct
transformation to roff. For K&R output, it displays the paramdef
output in an indented list following the prototype.
Michael Smith [Mon, 18 Feb 2008 03:38:38 +0000 (03:38 +0000)]
Properly integrated handling for K&R output into manpages
stylesheet. The choice between K&R output and ANSI output is
currently controlled through use of the (HTML) funcsynopsis.style
parameter. Note that because the mechanism does currently rely on
funcsynopsis.style, the default in manpages output is now K&R
(because that's the default of that param). But I suppose I ought
to create a man.funcsynopsis.style and make the default for that
ANSI (to preserve the existing default behavior).