From 2835b2c808e87f26f06bd8ec3a2c581923777902 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 6 Oct 2011 22:29:12 +0000 Subject: If -Tman is specified and input is -man, echo the preprocessed (`so' replaced by file) input. This replaces earlier behaviour of doing nothing, which I found unexpected (mandoc should always output). This requires a buffer in read.c that saves the input lines before being parsed, with a special hook if `so' is invoked. This buffer is just flushed to output if -mman is the input. While mucking around doing this, I also alpha-ordered the mandoc.h functions. Ok schwarze@, with no screaming when the polished patch was published. --- mandoc.1 | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'mandoc.1') diff --git a/mandoc.1 b/mandoc.1 index 8f842e96..cfe230f3 100644 --- a/mandoc.1 +++ b/mandoc.1 @@ -176,11 +176,11 @@ Encode output using the current locale. See .Sx Locale Output . .It Fl T Ns Cm man -Produce output in +Produce .Xr man 7 -format; only useful when applied to -.Fl m Ns Cm doc -input. +format output. +See +.Sx Man Output . .It Fl T Ns Cm pdf Produce PDF output. See @@ -311,6 +311,26 @@ will fall back to See .Sx ASCII Output for font style specification and available command-line arguments. +.Ss Man Output +Translate input format into +.Xr man 7 +output format. +This is useful for distributing manual sources to legancy systems +lacking +.Xr mdoc 7 +formatters. +.Pp +If +.Xr mdoc 7 +is passed as input, it is translated into +.Xr man 7 ; +if the input format is +.Xr man 7 , +it is parsed and re-outputted. +In either case, the +.Xr roff 7 +.Sq so +macros are processed prior to producing output. .Ss PDF Output PDF-1.1 output may be generated by .Fl T Ns Cm pdf . -- cgit