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
Michael Smith [Fri, 24 Jun 2005 07:20:40 +0000 (07:20 +0000)]
Added initial, EXPERIMENTAL support for generating content for
HTML "title" attributes from content of the Alt element.
This change adds support for generating HTML "title" attributes
for the following inline elements only (all inlines -- support for
block elements will need to wait for later).
abbrev accel acronym action application authorinitials beginpage
citation citerefentry citetitle city classname code command
comment computeroutput constant country database email envar
errorcode errorname errortext errortype exceptionname fax
filename firstname firstterm foreignphrase function glossterm
guibutton guiicon guilabel guimenu guimenuitem guisubmenu
hardware honorific interface interfacedefinition interfacename
keycap keycode keysym lineage lineannotation literal markup
medialabel methodname mousebutton option optional otheraddr
othername package parameter personname phone pob postcode
productname productnumber prompt property quote refentrytitle
remark replaceable returnvalue sgmltag shortcut state street
structfield structname subscript superscript surname symbol
systemitem tag termdef token trademark type uri userinput
varname wordasword
Implemented by creating a new named template, generate.html.title.
That is is currently called in eleven places only, in the
inline.xsl file. But it's called by all the inline.* templates
(e.g., inline.boldseq), which in turn are called by other
(element) templates, so it results, currently, in supporting
generation of the HTML "title" attribute for a total of about 93
elements (the list above).
Michael Smith [Fri, 24 Jun 2005 03:08:34 +0000 (03:08 +0000)]
Added support for chunking revhistory into separate file (similar
to the support for doing same with legalnotice). Patch from Thomas
Schraitle (closes #1096574). Controlled through new
generate.revhistory.link parameter.
Michael Smith [Thu, 23 Jun 2005 06:01:19 +0000 (06:01 +0000)]
Changed default for man.output.encoding to UTF-8. Because
character-map processing depends on it. Also added note saying
that changing the value to another encoding my break character-map
processing, so set man.charmap.enabled to 0 in that case.
Michael Smith [Thu, 23 Jun 2005 03:28:56 +0000 (03:28 +0000)]
Added several parameters for manpages output.
I have chosen to use a man.* naming strategy for all man-only
params (which these all are), even though in some cases the params
are basically the same as existing params (man.alignment and
man.hyphenate are basically same as the corresponding FO params,
man.output.encoding is same thing as chunker.output.encoding,
man.output.quietly is same as chunk.quietly).
One reason I went with create new params instead of reusing
existing ones is that this allows default values to be used for
manpages output that are different than the ones for whatever
other output format. For example, I set default for man.alignment
to "left" and man.hyphenation to "false". The corresponding FO
params have defaults of "justify" and "true".
And, as far as the man.* naming strategy, yeah, I guess it it
redundant. If, for example, all the HTML-only params started with
html.*, I guess it might not be so great idea. Or maybe it would
be. Anyway, I don't think there will probably ever be more than 30
man.* params total (god help us). And for developers at least, I
think it is helpful to be able to sort params by prefix if they
want to. Because, well, we now have 434 separate files in the
params/ directory. Going through those to find, say, just the
ones that relate to manpages output is a whole lot easier if they
all start with the same prefix.
Michael Smith [Sat, 18 Jun 2005 08:54:41 +0000 (08:54 +0000)]
Added initial versions of replace-chars-with-strings() and
apply-character-map() functions. These are intended mainly for use
in the manpages stylesheets but may be useful elsewhere too.
I need to fix the logic in the manpages stylesheet so that the
character-map file is read only once per document. The way it is
now, the character map is read each time a refentry is found,
which is a big waste.
Michael Smith [Fri, 17 Jun 2005 12:50:02 +0000 (12:50 +0000)]
Incorporated slides and website stylesheets into the build.
Note: This currently only affects the "distrib" (doc) build. So if
you don't need to build distrib/doc, you won't be affected by this
change. If you DO need to build distrib/doc, it will break unless
you use the xsl/Makefile from the "build" branch instead of from
the head.
This build alters the distrib build such that:
- an xsl/slides directory is created by copying over the
contents of the slides/xsl
- an xsl/website directory is created by copying over the
contents of the website/xsl directory
- the reference.html part of the doc build now adds the slides
and website param reference doc
This is an experiment. If we decide to go ahead with it in the
release build, and everything is found to be OK when it gets out
to users and they test it, then the next step would be to ask SF
admin to move the website/xsl and slides/xsl CVS directory into
xsl/ to create xsl/slides and xsl/website, and they would be
maintained in the xsl/ CVS going forward.
Michael Smith [Fri, 17 Jun 2005 03:46:44 +0000 (03:46 +0000)]
Refined doc build.
- Changed makefiles in docsrc/fo, docsrc/html, and
docsrc/manpages dirs to depend on corresponding params.xsl
instead of on param.xweb. Rationale is that param.xsl gets
rebuilt any time param.xweb changes. In addition, param.xsl
gets rebuild any time any included params/*.xml file is
changed. So making docsrc/* builds depend on param.xsl
effectively makes them depend on both the param.xweb changes
on on the actual param changes.
- Changed doc/Makefile so that reference.html is rebuilt only
when docsrc/reference.xml changes, not when any of its
included files change. Rationale is that, because we chunk
output for the doc build, reference.html is simply a sort of
TOC page that doesn't need to get remade if the included files
change. Because output of those included files goes to
separate fo, html, and manpages subdirs, and that output gets
generated by seperate make targets.