[BACK]Return to texi2mdoc.1 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / texi2mdoc

File: [cvsweb.bsd.lv] / texi2mdoc / texi2mdoc.1 (download)

Revision 1.16, Tue Nov 13 08:45:29 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +14 -2 lines

Add the -d option to specify the .Dd date,
and fall back to the mtime before resorting to the current time.
Patch from Michael Forney <mforney at mforney dot org>
with minimal tweaks by me.

While here, fix the date format, "%F" is wrong for mdoc(7).
Change it to "%B %e, %Y" which isn't perfect due to the
spurious blank before single-digit day numbers, but closer.

.\"	$Id: texi2mdoc.1,v 1.16 2018/11/13 08:45:29 schwarze Exp $
.\"
.\" Copyright (c) 2015 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: November 13 2018 $
.Dt TEXI2MDOC 1
.Os
.Sh NAME
.Nm texi2mdoc
.Nd convert texinfo documents to mdoc
.Sh SYNOPSIS
.Nm texi2mdoc
.Op Fl C Ar dir
.Op Fl d Ar date
.Op Fl I Ar dirs
.Op Ar file
.Sh DESCRIPTION
The
.Nm
utility converts
.%B GNU Texinfo
documents to
.Xr mdoc 7
mixed with
.Xr tbl 7
.Pq if applicable .
By default,
.Nm
reads from standard input.
Its arguments are as follows:
.Bl -tag -width Ds
.It Fl C Ar prefix
Instead of producing a single document, break apart the input into
node-level documents placed within
.Ar dir ,
which must exist.
These are created as
.Pa prefix-NNN.7 .
.It Fl d Ar date
Set the output document date in the
.Ic \&Dd
macro to
.Ar date ,
to be specified in the format
.Dq Ar Month Day , Year .
If unspecified,
.Nm
uses the file modification date
or the current date when reading from standard input.
.It Fl I Ar dirs
Colon-separated directories to search for
.Li @include
files.
.It Ar file
A Texinfo input file.
If specified, the directory of
.Ar file
is prepended to the list of
.Fl I
directories.
.El
.Pp
.Nm
can understand a significant subset of the texinfo language.
It recognises itself as a
.Em plaintext
formatter.
The produced document's title is set to the
.Ar file
filename and the description is set to the
.Li @settitle
command's contents.
.\" .Sh CONTEXT
.\" For section 9 functions only.
.\" .Sh IMPLEMENTATION NOTES
.\" Not used in OpenBSD.
.\" .Sh RETURN VALUES
.\" For sections 2, 3, and 9 function return values only.
.\" .Sh ENVIRONMENT
.\" For sections 1, 6, 7, and 8 only.
.\" .Sh FILES
.Sh EXIT STATUS
.Ex -std
.\" .Sh EXAMPLES
.\" .Sh DIAGNOSTICS
.\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only.
.\" .Sh ERRORS
.\" For sections 2, 3, 4, and 9 errno settings only.
.Sh SEE ALSO
.Xr mdoc 7 ,
.Xr tbl 7
.Rs
.%B GNU Texinfo
.%U http://www.gnu.org/software/texinfo/manual/texinfo
.Re
.\" .Xr foobar 1
.\" .Sh STANDARDS
.\" .Sh HISTORY
.Sh AUTHORS
The
.Nm
utility was written by
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
.Sh CAVEATS
The output consists of superfluous
.Sq \&Pp
that cause
.D1 % mandoc -Tlint
to complain.
.Pp
Many commands that might contain useful information (such as
.Li @footnote )
are thrown away.
.Pp
The comma in Texinfo macro arguments may at times be escaped with a backslash.
This is
.Em not
supported.
.\" .Sh BUGS
.Sh SECURITY CONSIDERATIONS
As a security precaution,
.Nm
does not allow the inclusion (via
.Li @include
or
.Li @verbatiminclude )
of absolute paths or paths with
.Li \&..
as directory components.