Table support in current DocBook XSL stylesheets [was: Latin-1 character 160 (nbsp) in manpages]
"Michael(tm) Smith" <[email protected]> Mon, 21 Aug 2006 05:01:42 +0200
| Newsgroups | gmane.text.refdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Markus Hoenicka <[email protected]>, 2006-08-18 22:20 +0200: > For the time being I've changed the driver file which RefDB uses to > process the man pages. That driver file should no longer be needed except for backward compatibility with older versions of the DocBook XSL stylesheets. The current version, 1.70.1, fully supports real table output using tbl(1) markup. See the attached example (refdbib.1). I've also attached a patch to the driver file. The patch causes the driver to check the value of the DocBook XSL stylesheets $VERSION param. If the middle part is 70 or greater, it uses the table-processing code in the stylesheets as-is; otherwise, it falls back to outputting the table rows in paragraphs. --Mike ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Refdb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/refdb-devel
refdbib.1
(text/plain, 14.9 KB)
.\" Title: refdbib
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
.\" Date: 2005.10.15
.\" Manual: RefDB Manual
.\" Source: 2005\-10\-15
.\"
.TH "REFDBIB" "1" "2005\-10\-15" "2005\-10\-15" "RefDB Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
refdbib \- the bibliography client of RefDB
.SH "SYNOPSIS"
.HP 8
\fBrefdbib\fR [\fB\-d\fR\ \fIdatabase\fR] [\fB\-D\fR\ \fIstylespec\-directory\fR] [\fB\-e\fR\ \fIlog\-destination\fR] [\fB\-E\fR\ \fIencoding\fR] [\fB\-f\fR\ \fIstdin\fR] [\fB\-h\fR] [\fB\-i\fR\ \fIIP\-address\fR] [\fB\-l\fR\ \fIlog\-level\fR] [\fB\-L\fR\ \fIlog\-file\fR] [\fB\-m\fR] [\fB\-n\fR] [\fB\-N\fR\ \fInumber\fR] [\fB\-p\fR\ \fIport\fR] [\fB\-q\fR] [\fB\-S\fR\ \fIstyle\fR] [\fB\-t\fR\ \fIoutput\-type\fR] [\fB\-T\fR\ \fItime\fR] [\fB\-u\fR\ \fIname\fR] [\fB\-v\fR] [\fB\-V\fR] [\fB\-w\fR\ \fIpassword\fR] [\fB\-y\fR\ \fIconfdir\fR] \fIfilename\fR
.SH "DESCRIPTION"
.PP
refdbib is a command\-line client to generate bibliographies with RefDB(7). refdbib reads the contents of
\fIfilename\fR, which contains a list of citations as an XML document according to
\fIcitationlistx.dtd\fR, and sends a bibliography in the requested format to stdout. If no input file is specified, refdbib tries to read the data from stdin. Unless suppressed, it also writes a style specification file (either a DSSSL or an XSLT stylesheet) and a CSS stylesheet for HTML output to your disk.
.PP
refdbib is a low\-level tool. It is advisable to use one of the wrappers shipped with RefDB. runbib(1) is a shell script which creates the list of citations, runs refdbib on this list, and transforms the document. refdbnd(1) is a Makefile\-based system that encapsulates the bibliography generation and document transformation conveniently.
.PP
This man page describes only the startup options of refdbib. Please consult the RefDB manual (see below) for a description of the input and output formats, as well as for post\-processing instructions that are required for some output types.
.SH "OPTIONS"
.TP 3n
\fB\-d\fR \fIdatabase\fR
The name of the default database. You can change the database anytime during an interactive session.
.TP 3n
\fB\-D\fR \fIstylespec\-directory\fR
Specify either a full path or
.
to use the current working directory for the output of the style specification and CSS files. The latter case is what you usually want if you run refdbib from the directory where your LaTeX or SMGL/XML document is stored. This is also the default if you do not specify a directory at all.
.TP 3n
\fB\-e\fR \fIlog\-destination\fR
log\-destination can have the values 0, 1, or 2, or the equivalent strings
\fIstderr\fR,
\fIsyslog\fR, or
\fIfile\fR, respectively. This value specifies where the log information goes to.
0
(zero) means the messages are sent to stderr. They are immediately available on the screen but they may interfere with command output.
1
will send the output to the syslog facility. Keep in mind that syslog must be configured to accept log messages from user programs, see the syslog(8) man page for further information. Unix\-like systems usually save these messages in
\fI/var/log/user.log\fR.
2
will send the messages to a custom log file which can be specified with the
\fB\-L\fR
option.
.TP 3n
\fB\-E\fR \fIencoding\fR
Select an output character encoding. If this option is not used, the bibliography data will use the character encoding of the database. See iconv_open(3) for a list of available encodings.
.TP 3n
\fB\-f\fR \fIstdin\fR
This is a crutch to make reading data from stdin possible on platforms that do not allow automatic detection of data on stdin, like Windows/Cygwin. On other platforms, refdbib automatically reads data from stdin if data are available.
.TP 3n
\fB\-h\fR
Displays help and usage screen, then exits.
.TP 3n
\fB\-i\fR \fIIP\-address\fR
Set the IP address of the box which is running the application server refdbd(1). Instead of the IP address you can also specify the hostname as long as it can be properly resolved by your system.
.TP 3n
\fB\-l\fR \fIlog\-level\fR
Specify the priority up to which events are logged. This is either a number between
0
and
7
or one of the strings
\fIemerg\fR,
\fIalert\fR,
\fIcrit\fR,
\fIerr\fR,
\fIwarning\fR,
\fInotice\fR,
\fIinfo\fR,
\fIdebug\fR, respectively (see also Log level definitions).
\fB\-1\fR
disables logging completely. A low log level like
0
means that only the most critical messages are logged. A higher log level means that less critical events are logged as well.
7
will include debug messages. The latter can be verbose and abundant, so you want to avoid this log level unless you need to track down problems.
.TP 3n
\fB\-L\fR \fIlog\-file\fR
Specify the full path to a log file that will receive the log messages. Typically this would be
\fI/var/log/refdba\fR.
.TP 3n
\fB\-m\fR
This switch turns errors caused by missing references (i.e. cited but not available in the database) into warnings, causing refdbib to return 0 instead of an error code.
.TP 3n
\fB\-n\fR
Instructs refdbib not to create style specification files. Use this option if you are sure that a current style specification file already exists. This saves about as much computing time as you need to key in this option.
.TP 3n
\fB\-N\fR \fInumber\fR
Use this option to specify where the numbering of the references is supposed to start. The default is 1. This option comes in handy if you need to cobble together composite bibliographies or per\-chapter bibliographies that still need to be numbered consecutively.
.TP 3n
\fB\-p\fR \fIport\fR
Set the port of the box which is running the application server.
.TP 3n
\fB\-q\fR
Start without reading the configuration files. The client will use the compile\-time defaults for all values that you do not set with command\-line switches.
.TP 3n
\fB\-R\fR \fIpdfroot\fR
Specify the root path of your collection of electronic offprints.
.TP 3n
\fB\-S\fR \fIstyle\fR
Specifies the bibliography style. This controls the formatting of the bibliography and the in\-text citations when the document is processed.
.TP 3n
\fB\-t\fR \fIoutput\-type\fR
Select the output type. Use
\fIdb31\fR
to generate DocBook SGML bibliographies,
\fIdb31x\fR
for DocBook XML bibliographies,
\fIteix\fR
for TEI XML bibliographies, and
\fIbibtex\fR
for BibTeX bibliographies. The type of output also determines the type of style specification file, if any, that will be generated in addition to the bibliography for formatting purposes. This is only a matter of concern if you want to process a DocBook XML document with the DSSSL stylesheets: In this case you should use
\fIdb31\fR
with this option. The SGML bibliography element is also a valid XML element, but you will get a DSSSL driver file instead of a XSL driver file when you use
\fIdb31x\fR. Note: In the current implementation, the
\fB\-t\fR
\fIteix\fR
option will also return a DocBook bibliography which needs to be transformed to a TEI bibliography with the
\fIbibdb2tei.xsl\fR
stylesheet.
.TP 3n
\fB\-T\fR \fItime\fR
Set the timeout for client/application server dialogue in seconds. A connection with unsuccessful read or write attempts will be considered as dead and taken down after this amount of time has elapsed.
.TP 3n
\fB\-u\fR \fIname\fR
Set the username for the database access. Note: This username need not be identical to the login name of the user. This is the username required to access the database server.
.TP 3n
\fB\-v\fR
Prints version and copyright information, then exits.
.TP 3n
\fB\-V\fR
Switches to verbose mode.
.TP 3n
\fB\-w\fR \fIpassword\fR
Set the password for the database access. Note: This password need not be identical to the login password of the user. This is the password required to access the database server.
.TP 3n
\fB\-y\fR \fIconfdir\fR
Specify the directory where the global configuration files are Note: By default, all RefDB applications look for their configuration files in a directory that is specified during the configure step when building the package. That is, you don't need the
\fB\-y\fR
option unless you use precompiled binaries in unusual locations, e.g. by relocating a rpm package.
.SH "DIAGNOSTICS"
.PP
The exit code is 0 if all went fine. It will be 1 if the command returned an error, or if there was a general error condition during startup like a lack of available memory.
.SH "CONFIGURATION"
.PP
refdbib evaluates the
\fIrefdbibrc\fR
configuration file at startup to initialize itself.
.PP
.B Table\ 1.\ refdbibrc
.sp -1n
.TS
allbox tab(:);
lB lB lB.
T{
Variable
T}:T{
Default
T}:T{
Comment
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l.
T{
refdblib
T}:T{
(none)
T}:T{
The path of a directory containing shareable files like DTDs, HTML templates etc.
T}
T{
logfile
T}:T{
/var/log/refdbib.log
T}:T{
The full path of a custom log file. This is used only if logdest is set appropriately.
T}
T{
logdest
T}:T{
1
T}:T{
The destination of the log information. 0 = print to stderr; 1 = use the syslog facility; 2 = use a custom logfile. The latter needs a proper setting of logfile.
T}
T{
loglevel
T}:T{
6
T}:T{
The log level up to which messages will be sent. A low setting (0) allows only the most important messages, a high setting (7) allows all messages including debug messages. \-1 means nothing will be logged.
T}
T{
outtype
T}:T{
db31
T}:T{
The type of output generated. Use \fIdb31\fR for DocBook SGML bibliographies, \fIdb31x\fR for DocBook XML bibliographies, \fIteix\fR for TEI XML bibliographies, and \fIbibtex\fR for BibTeX bibliographies.
T}
T{
outformat
T}:T{
(none)
T}:T{
The bibliographic style to be used for the output. This is the name of a style as it was previously added to the database.
T}
T{
stylespecdir
T}:T{
.
T}:T{
A path to a directory (including the trailing directory separator) that will receive the stylesheet driver files. The default setting will direct the driver files to the current working directory that most likely contains the input files. It should rarely be necessary to use a different setting.
T}
T{
startnumber
T}:T{
1
T}:T{
The number where the reference numbering starts at. This option is mostly useful for compiling advanced bibliographies or for C boneheads who insist that counting starts at zero.
T}
T{
toencoding
T}:T{
(the database encoding)
T}:T{
The character encoding for the bibliography output. If this is not specified, the data will use the same encoding as the database.
T}
T{
ignore_missing
T}:T{
f
T}:T{
If this is set to "f", missing references (i.e. cited but not in the database) will throw an error. If set to "t", you'll get a warning but missing references will not cause refdbib to return an error.
T}
T{
defaultdb
T}:T{
(none)
T}:T{
The default database. refdbib will use this database unless you specify the databases in the citation elements of your documents.
T}
T{
pager
T}:T{
stdout
T}:T{
The command line of a pager that accepts the output of refdb on stdin to allow scrolling and other nifty things. \(lqstdout\(rq sends the data to stdout.
T}
T{
passwd
T}:T{
*
T}:T{
The password which is used for authentication with the database server. It is potentially evil to store unencrypted passwords in disk files. At least make sure that the init file is not readable for anyone else. The default setting causes refdbib to ask for your password interactively.
T}
T{
port
T}:T{
9734
T}:T{
The port on which refdbd listens. Change this for all clients and the server if this value interferes with another program using this port.
T}
T{
serverip
T}:T{
127.0.0.1
T}:T{
The IP address or hostname of the machine where refdbd runs. Use the default (localhost) address if the clients and refdbd run on the same machine.
T}
T{
timeout
T}:T{
180
T}:T{
The timeout in seconds. After this time has elapsed, a stalled connection is taken down. Increase this value if you encounter frequent timeout errors due to high network traffic or refdbs overload.
T}
T{
username
T}:T{
login name
T}:T{
The username which is used for authentication with the database server. This may be different from the login name of the user.
T}
T{
verbose
T}:T{
f
T}:T{
Set this to t if you prefer verbose error messages.
T}
.TE
.sp
.SH "EXAMPLES"
.PP
The first example shows how to create a DocBook SGML bibliography file.
.sp
.RS 3n
.nf
$~
\fBrefdbib \-d myrefs \-S "Br.J.Pharmacol." \-t db31 \-D "." mypaper.id.xml > mypaper.bib.sgml\fR
.fi
.RE
.PP
This command will use the database
\(lqmyrefs\(rq
to retrieve the references defined in
\fImypaper.id.xml\fR. They will be formatted according to the bibliography style called
\(lqBr.J.Pharmacol.\(rq
and will be redirected into the bibliography file
\fImypaper.bib.sgml\fR. The DSSSL driver file (it will be automatically named after the bibliography style, that is
\fIBr.J.Pharmacol.dsl\fR) will be stored in the current working directory. For further information how to generate the citation listing in
\fImypaper.id.xml\fR, see
DocBook.
.PP
The second example shows how to create the BibTeX bibliography from your LaTeX document (it is assumed that you ran
\fBlatex\fR
at least once before this command. See
LaTeX/BibTeX
for further explanations).
.sp
.RS 3n
.nf
$~
\fBrefdbib \-d myrefs \-S "name" \-t bibtex mypaper.aux > mypaper.bib\fR
.fi
.RE
.PP
This command will use the database
\(lqmyrefs\(rq
to retrieve the references defined in
\fImypaper.aux\fR. The intermediate bibliography database will be stored in
\fImypaper.bib\fR
and will serve as an input file for
\fBbibtex\fR.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
.PP
For the sake of consistency with
\fBbibtex\fR, it is possible to specify the auxiliary file without the
\fI.aux\fR
extension (\fImypaper\fR
in the above example).
.PP
If you are working on a long document that cites the same references over and over again, it may be prudent to preprocess the
\fI.aux\fR
file in order to eliminate duplicates (duplicates do not confuse
\fBbibtex\fR
but they waste space):
.sp
.RS 3n
.nf
$~
\fBsort mypaper.aux | uniq | refdbib \-d myrefs \-S "name" \-t bibtex > mypaper.bib\fR
.fi
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
.PP
The
runbib
script does exactly this kind of preprocessing automatically.
.SH "FILES"
.TP 3n
\fI/usr/local/etc/refdb/refdbibrc\fR
The global configuration file of refdbib.
.TP 3n
\fI$HOME/.refdbibrc\fR
The user configuration file of refdbib.
.SH "SEE ALSO"
.PP
\fBRefDB\fR
(7),
\fBrefdbd\fR
(1),
\fBrunbib\fR
(1),
\fBrefdbnd\fR
(1),
\fBrefdba\fR
(1),
\fBrefdbc\fR
(1).
.PP
\fIRefDB manual (local copy) \fR
<prefix>/share/doc/refdb\-<version>/refdb\-manual/index.html
.PP
\fIRefDB manual (web) \fR
<[1]\&\fIhttp://refdb.sourceforge.net/manual/index.html\fR>
.PP
\fIRefDB on the web \fR
<[2]\&\fIhttp://refdb.sourceforge.net/\fR>
.SH "AUTHOR"
.PP
refdbib was written by Markus Hoenicka <[email protected]>.
.SH "REFERENCES"
.TP 3
1.\ http://refdb.sourceforge.net/manual/index.html
\%http://refdb.sourceforge.net/manual/index.html
.TP 3
2.\ http://refdb.sourceforge.net/
\%http://refdb.sourceforge.net/
patch
(text/plain, 1.6 KB)
Index: manual-man.xsl
===================================================================
--- manual-man.xsl (revision 127)
+++ manual-man.xsl (working copy)
@@ -21,28 +21,38 @@
table numbering
-->
- <xsl:template match="table">
- <xsl:apply-templates/>
+ <xsl:template match="table|informaltable">
+ <xsl:message><xsl:value-of select="substring($VERSION,3,2)"/></xsl:message>
+ <xsl:choose>
+ <xsl:when test="substring($VERSION,3,2) >= 70">
+ <xsl:apply-templates select="." mode="to.tbl">
+ <xsl:with-param name="source" select="ancestor::refentry/refnamediv[1]/refname[1]"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="to.pp"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
- <xsl:template match="table/title">
+ <xsl:template match="table/title" mode="to.pp">
<xsl:text> .PP \fBTable: </xsl:text>
<xsl:apply-templates/>
<xsl:text>\fR .PP </xsl:text>
</xsl:template>
- <xsl:template match="tbody">
- <xsl:apply-templates/>
+ <xsl:template match="tbody" mode="to.pp">
+ <xsl:apply-templates mode="to.pp"/>
</xsl:template>
- <xsl:template match="entry">
+ <xsl:template match="entry" mode="to.pp">
<xsl:apply-templates/>
<xsl:text> | </xsl:text>
</xsl:template>
- <xsl:template match="row">
+ <xsl:template match="row" mode="to.pp">
<xsl:text> .PP | </xsl:text>
- <xsl:apply-templates/>
+ <xsl:apply-templates mode="to.pp"/>
<xsl:text> .PP </xsl:text>
</xsl:template>
smime.p7s
(application/x-pkcs7-signature, 2.3 KB) - not displayed