version 1.11, 2019/04/09 16:57:29 |
version 1.17, 2019/05/02 12:40:42 |
|
|
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm docbook2mdoc |
.Nm docbook2mdoc |
.Op Fl W |
.Op Fl W |
|
.Op Fl s Ar section |
|
.Op Fl T Cm mdoc | tree | lint |
.Op Ar file |
.Op Ar file |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
The |
The |
|
|
.Xr eqn 7 . |
.Xr eqn 7 . |
If |
If |
.Ar file |
.Ar file |
is |
is omitted, standard input is used. |
.Sq Cm \- |
|
or omitted, standard input is used. |
|
.Pp |
.Pp |
The arguments are as follows: |
The options are as follows: |
.Bl -tag -width Ds |
.Bl -tag -width 2n |
|
.It Fl s |
|
Specify the manual page |
|
.Ar section |
|
to be used as the second argument of the |
|
.Ic \&Dt |
|
macro. |
|
Defaults to the content of the first |
|
.Eo < Ic manvolnum Ec > |
|
element in the first |
|
.Eo < Ic refmeta Ec > |
|
block, if any, or to |
|
.Qq 1 |
|
otherwise. |
|
.It Fl T |
|
Select the output mode. |
|
The following arguments are supported: |
|
.Bl -tag -width 4n |
|
.It Cm mdoc |
|
Translate the input to |
|
.Xr mdoc 7 . |
|
This is the default. |
|
.It Cm tree |
|
Dump a human-readable representation of the parse tree. |
|
Each output line shows one tree node. |
|
Child nodes are indented with respect to their parent node. |
|
The columns are: |
|
.Bl -enum -width 2n |
|
.It |
|
An asterisk if the node starts a new text line, |
|
or a hyphen if the node follows the previous node |
|
without intervening whitespace. |
|
.It |
|
The node type. |
|
.It |
|
For text nodes, the text contents. |
|
For other nodes, the attributes, if any. |
|
.El |
|
.It Cm lint |
|
Do not produce any output, only error messages. |
|
Can be combined with |
|
.Fl W . |
|
.El |
.It Fl W |
.It Fl W |
Report warnings on standard error output, and if any occur, raise the |
Report warnings on standard error output, and if any occur, raise the |
.Sx EXIT STATUS |
.Sx EXIT STATUS |
Line 72 Internal subset declaration to define an XML entity. |
|
Line 114 Internal subset declaration to define an XML entity. |
|
.Ec > |
.Ec > |
Internal subset declaration to define an XML entity using an external |
Internal subset declaration to define an XML entity using an external |
.Ar file . |
.Ar file . |
|
.It Eo <! |
|
.Ic DOCTYPE No ... |
|
.Bo |
|
.Eo " <!" Ic ENTITY No % Ar name Cm SYSTEM Qo Ar file Qc Ec > |
|
.Pf % Ar name No \& |
|
.Bc |
|
.Ec > |
|
Internal subset declaration to include an external |
|
.Ar file |
|
that is supposed to contain entity declarations. |
.It Eo < Ic mml : Ns ... Ec > |
.It Eo < Ic mml : Ns ... Ec > |
Elements from the MathML namespace. |
Elements from the MathML namespace. |
These are translated to |
These are translated to |
|
|
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv |
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv |
and |
and |
.An Ingo Schwarze Aq Mt schwarze@openbsd.org . |
.An Ingo Schwarze Aq Mt schwarze@openbsd.org . |
.Sh CAVEATS |
|
The |
|
.Nm |
|
utility is experimental. |
|
Many elements are not recognized yet. |
|
.Pp |
|
The output |
|
.Xr mdoc 7 |
|
could be much nicer: trailing spaces, superfluous space removal, |
|
new-line new-sentence, and other niceties are not used. |
|