Michael Smith [Wed, 6 Jul 2005 05:16:18 +0000 (05:16 +0000)]
(internal) Added support for TDG hyperlinking with <tag> (instead
of just <sgmltag>. Also added support for ignoring <tag>s and
<sgmltag>s that have a "namespace" attribute whose value contains
"http://docbook.sf.net/" or "http://docbook.sourceforge.net/"
(that is, those don't get turned into TDG hyperlinks).
(Note: This change has no effect on the behavior of the DocBook XSL
stylesheets; it only affects the build used to create the actual)
DocBook XSL releases.)
Michael Smith [Tue, 5 Jul 2005 09:19:17 +0000 (09:19 +0000)]
Implemented capability for users to customize "refentry metadata
gathering" by specifying XPath expressions to use as "info
profiles" for gathering the data, and, in some cases, to suppress
parts of the data collected.
Michael Smith [Tue, 5 Jul 2005 03:49:25 +0000 (03:49 +0000)]
Added the following substitutions:
<!-- * non-breaking space
<substitution oldstring=" " newstring="\ "/>
<!-- * copyright sign
<substitution oldstring="©" newstring="\(co"/>
<!-- * registered sign
<substitution oldstring="®" newstring="\(rg"/>
<!-- * left double quote
<substitution oldstring="“" newstring="\(lq"/>
<!-- * right double quote
<substitution oldstring="”" newstring="\(rq"/>
<!-- * left single quote
<substitution oldstring="‘" newstring="\(oq"/>
<!-- * right single quote
<substitution oldstring="’" newstring="\(cq"/>
The reason is that those are all characters that the DocBook XSL
stylesheets themselves generate under certain circumstances; so
dealing with them in man.string.subst.map ensures they will always
be replaced, even if man.charmap.enabled is zero.
Michael Smith [Tue, 5 Jul 2005 02:49:13 +0000 (02:49 +0000)]
Did some reorganizing.
- Moved prepare.manpage.contents template out of general.xsl file
and into other.xsl; general.xsl templates are now all templates
that are called multiple times for each refentry, while
templates in other.xsl are called only once per each refentry.
- Removed get.metadata template; refentry metadata gathering is
now done by common/refentry.xsl in a way that is independent of
the final output format; so the common/refentry.xsl templates
can be called not just by manpages stylesheets, but by
stylesheets for any other output format
- Added a write.man.file template. This is basically just a
wrapper around the write.text.chunk template; it takes "name"
and "section" params, assembles those into a filename, then
passes that filename to write.text.chunk
Michael Smith [Tue, 5 Jul 2005 00:22:21 +0000 (00:22 +0000)]
Added trademark/productname template.
This template causes true Unicode characters to be output for the
"copyright" and "registered" symbols (which be default then get
replaced by the apply-string-subst-map template). It outputs the
string "(TM)" for trademark (because roff "\(tm" output is not
good) and "(SM)" for servicemark.
Michael Smith [Mon, 4 Jul 2005 23:51:51 +0000 (23:51 +0000)]
Initial add.
This file provides templates for gathering refentry metadata. The
templates are currently only called by the manpages stylesheets,
but they are designed to be generally useful.
Michael Smith [Fri, 1 Jul 2005 13:24:49 +0000 (13:24 +0000)]
Checkpointing. In the middle of tinkering with composition of the
.TH title line. Started pulling at thread and unwound things. This
works as-is now (not broken) but is not finished.
Michael Smith [Thu, 30 Jun 2005 13:22:10 +0000 (13:22 +0000)]
First updates for 1.69.0 release.
So far, only includes descriptions of the manpages changes. Sorry,
that is all I could managed to get done so far. If anybody else
has time to add descriptions for the HTML and FO stylesheets,
please do. Otherwise, I will get back to work on them later
tonight my time.
Michael Smith [Thu, 30 Jun 2005 13:19:25 +0000 (13:19 +0000)]
Set LANG=C when generating RELEASE-NOTES.txt
The LANG value in my environment is EUC-JP, and running w3m with
that causes it to use some special EUC-JP characters for bullets
and such. So, need to set LANG=C to get it to use ASCII bullets
(a.k.a. asterisks)
Michael Smith [Wed, 29 Jun 2005 09:57:39 +0000 (09:57 +0000)]
Removed unnecessary additional linebreak that was getting added
after each varlistentry. Also, in a couple places that needed it,
added check for *info/title (instead of just title). Also, added
support of processing title or *info/title on Refsynopsisdiv
(still falls back to gentext SYNOPSIS title if no hard-coded title
found.
Michael Smith [Wed, 29 Jun 2005 06:48:11 +0000 (06:48 +0000)]
Added man.subheading.divider param, for enabling addition of
divider around section titles in source. This doesn't show up in
rendered man page -- it is just there to help make the source more
readable.
Michael Smith [Wed, 29 Jun 2005 05:55:34 +0000 (05:55 +0000)]
Added support for man.justify, man.hyphenate,
man.break.after.slash, and an.th.title.max.length parameters.
Also switch to using locale-safe "string-upper" function to
uppercase the TH title. So manpages output is now
internationalized/localizable in all respects where is can be made
so at this point.
Michael Smith [Wed, 29 Jun 2005 04:18:54 +0000 (04:18 +0000)]
Added man.break.after.slash parameter.
Default is zero, which disables line-breaking after slashes.
Setting a non-zero value enables line-breaking after slashes.
This option is potentially usefull for causing long URLs and/or
pathnames to be wrapped or broken-up across lines.
Michael Smith [Tue, 28 Jun 2005 18:39:21 +0000 (18:39 +0000)]
Support man.justify and man.hyphenate params. (closes #1229225).
Note that default for the both of those is zero (off), because
justified text looks good only when it is also hyphenated; to
quote the "Hypenation" node from the groff info page:
Since the odds are not great for finding a set of words, for
every output line, which fit nicely on a line without inserting
excessive amounts of space between words, `gtroff' hyphenates
words so that it can justify lines without inserting too much
space between words.
The problem is that groff is not particularly smart about how it
does hyphenation; it can end up hyphenating a lot of things that
you don't want hyphenated (names of symbols, for example), and it
is difficult and tiresome work to prevent it from doing that. So,
disabling both justification and hyphenation ensures that hyphens
won't get inserted where you don't want to them, and you don't end
up with lines containing excessive amounts of space between words.
Yes, these default settings run counter to how most existing man
pages are formatted. But there are some notable exceptions, such
as the perl man pages.
Bob Stayton [Tue, 28 Jun 2005 18:37:59 +0000 (18:37 +0000)]
Moved the fo:basic-link for page refs to the page.citation template
so it can be more easily customized.
Fixed bug in using page keyword in role used as xrefstyle.
Michael Smith [Tue, 28 Jun 2005 14:41:58 +0000 (14:41 +0000)]
Replace hyphens with "\-".
<sigh/> Although the old-school gnomes who maintain groff
apparently don't figure it's necessary to document this anywhere,
there is apparently only one reliable way to make a non-breaking
hyphen in groff: with "\-". At least that it what testing in my
environment seems to indicate.
And because groff is not at all smart in the way it breaks things
at hyphens (it will, for example, break command arguments across
lines if they contain hyphens), we must globally replace all
hyphens with "\-".
God in heaven, please let me live to see a day when roff and all
is (r)offspring have disappeared from the face of the earth.
Michael Smith [Tue, 28 Jun 2005 12:38:39 +0000 (12:38 +0000)]
"clean" target now deletes $(SOURCES) xml files instead of doing a
blanket "rm -f *.xml", which was causing hte l10n.xml file to be
deleted. That file is under version control, so deleting it was
forcing you to do a "cvs update" after you run "make clean". if
you forget, it screws up the build.
Michael Smith [Tue, 28 Jun 2005 11:01:24 +0000 (11:01 +0000)]
"clean" target no longer deletes html/profile-chunk.xsl or
html/profile-onechunk.xsl
Those files are under version control, not made. So they should
not be deleted by the build.
Michael Smith [Tue, 28 Jun 2005 07:49:51 +0000 (07:49 +0000)]
Added support for generating <rx:meta-field creator="foo"/> field
for XEP. Also, added support for picking up and using contents of
<corpauthor> for XEP <rx:meta-field author="foo"/> field.
Michael Smith [Mon, 27 Jun 2005 10:56:02 +0000 (10:56 +0000)]
Implemented "character map" system for replacing Unicode
characters. (closes #1226009).
::PROBLEM:
The existing manpages mechanism for replacing Unicode symbols and
special characters with roff equivalents is not scalable and not
anywhere near as complete as it should be.
For example, the mechanism currently only handles a (somewhat
arbitrary) selection of less than 20 or so Unicode characters.
But there are potentially more than _800_ Unicode special
characters that have some groff equivalent they can be mapped to.
And there are about 34 symbols in the Latin-1 (ISO-8859-1) block
alone. Users might reasonably expect that if they include any of
those Latin-1 characters in their DocBook source documents, they
will get correctly convered to known roff equivalents in output.
In addition to those common symbols, certain users may have a need
to use symbols from other Unicode blocks.
Say, somebody who is documenting an application related to math
might need to use a bunch of symbols from the "Mathematical
Operators" Unicode block (there are about 65 characters in that
block that have reasonable roff equivalents).
Or somebody else might really like Dingbats -- such as the
checkmark character (I like that one myself) and so might use a
bunch of things from the "Dingbat" block (141 characters in that
that have roff equivalents or that can at least be "degraded"
somewhat gracefully into roff).
So we need a mechanism that is capable of handling all those 800
Unicode characters that have roff equivalents -- and/or of
allowing users to choose which Unicode blocks to use (through
tuning the value of a parameter or something).
::FIX:
Replaced the current Unicode character-substitution mechanism
(replace-entities template) with a completely different
character-substitution mechanism that is based on use of a
"character map" (in a format compliant with the XSLT 2.0 spec and
therefore completely "forward compatible" with XSLT 2.0).
By default, the new "character map" mechanism does replacement of
all Latin-1 symbols, along with most special spaces, dashes, and
quotes (about 75 characters by default, compared to the less than
20 special characters that were handled previously). And the
"full" character map provides support for converting about 800
characters.
The mechanism is controlled through the following parameters:
- man.charmap.enabled:
turns character-map support on/off
- man.charmap.use.subset.xml
specifies that a subset of the character map is used instead
of the full character map
- man.charmap.subset.profile.xml
specifies profile of character-map subset
- man.charmap.uri.xml
specifies an alternate character map to use instead of the
"standard" character map provided in the distribution
Michael Smith [Mon, 27 Jun 2005 08:01:58 +0000 (08:01 +0000)]
Added "man.string.subst.map" parameter for controlling roff string
substitution performed just before applying character map. The
value of this parameter is not really intended to be monkeyed
with, but adding it as a param just in case.
Michael Smith [Mon, 27 Jun 2005 00:50:16 +0000 (00:50 +0000)]
Added an "apply-string-subst-map" function (template). Only
difference is that in the map that it expects, "oldstring" and
"newstring" attributes are used instead of "character" and
"string" attributes.
Michael Smith [Sun, 26 Jun 2005 07:10:38 +0000 (07:10 +0000)]
Checkpointing before coding and committing final character-map changes.
This change fully implements character-map support. I'll write up
a longer description of that in a later commit. But the brief
description is: The old Unicode character replacement mechanism
(replace-entities template) has been removed; a completely
different character-replacement mechanism is now used instead.
By default, it does replacement of all Latin-1 symbols, along with
most special spaces, dashes, and quotes (about 75 characters by
default, compared to the less than 20 special characters that were
handled previously). And the "full" character map provides support
for converting about 800 characters. The mechanism use a
"character map" (in a format compliant with the XSLT 2.0 spec and
therefore completely "forward compatible" with XSLT 2.0.
Other changes made for this commit:
- Changed default output encoding to UTF-8.
THIS DOES NOT MEAN THAT MAN PAGES ARE OUTPUT IN RAW UTF-8,
because the character-map is applied before final output,
causing all UTF-8 characters covered in the map to be
converted to roff equivalents.
- Removed code for adding backslashes before periods/dots and
before hyphens (-); here's why:
* Backslashes in front of periods/dots are needed only in the
very rare case where a period is the very first character in
a line, without any space in front of it. A better way to
deal with that rare case is for authors to add a zero-width
space in front of the offending dot(s) in their source
* Backslashes in front of (-/-) are needed... when?
Myself, I don't know, so the current stylesheet does not add
backslashes in front of them, ever. If there is a specific
case where they are necessary or desirable, then we need to
add code for that case, not just do a blanket conversion.
And, anyway, my understanding from reading the groff docs is
that \- is, specifically, a _minus sign_. So if you have a
place where you want a minus sign to be output instead of
(-), then you should use (−/−) in your
source instead. And if you have a place where you want an
en dash, (–/–). Or if there are places where
the stylesheets are internally generating (-) where they
should be generating − or –, then we need to fix
those, not just do blanket conversion.
- Consolidated all bold and italic formatting so that it is done
by applying the mode="bold" and mode="italic" templates.
- Consolidated handling of all instances where we want to
prevent line breaking; they are all now processed using the
prevent.line.breaking template.
- Removed "quote" template. In output, this was causing anything
marked up with the <quote> element to be preceded by two
backticks and followed by two apostrophes -- that is, that
old-school hack for generating "curly" quotes in Emacs and in
X-Windows fonts. While Emacs still seems to support that,
I don't think X-Windows has for a long time now. And, anyway,
it looks (and has always looked) like complete crap when
viewed on a normal tty/console