[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.12, Wed Feb 25 14:37:17 2015 UTC (9 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_0_1_2
Changes since 1.11: +3 -9 lines

Completely re-write @value and @macro handling to work exactly as Texinfo
specifies and not how I really want it to work.
In a word, macros and values are pasted into the text: they're not self-
contained bodies that can be recursively executed.

In other words,
  @macro hello{}
  @ifset foo
  @end macro
  @hello
  @end ifset
...is completely valid.

While here, stop paying attention to the manual's lies about macro newlines.
The terminal newline (i.e., before "@end macro") is part of the macro, which
is why so many macros are @r{}@c -- to swallow the newline.

This required a significant mechanical change to get the buffer pointer and
size out of all arguments, as the buffer can now be reallocated.

.\"	$Id: texi2mdoc.1,v 1.12 2015/02/25 14:37:17 kristaps 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: February 25 2015 $
.Dt TEXI2MDOC 1
.Os
.Sh NAME
.Nm texi2mdoc
.Nd convert texinfo documents to mdoc
.Sh SYNOPSIS
.Nm texi2mdoc
.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 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.