Is here common source format to produce mdoc and MarkDown?

Lev Serebryakov lev at FreeBSD.org
Sun Feb 7 16:24:35 UTC 2021


On 07.02.2021 15:30, Mateusz Piotrowski wrote:

>>>    Maybe, mdoc to MarkDown converter? It is not best way, as mdoc is very tedious to edit, but better than nothing.
>> See mandoc(1) and -T markdown.  No idea if it's any good.
> 
> It is pretty good.
  It is awful. Good MarkDown should be readable as simple txt, without any render at all. And output of `mandoc -T markdown` is complete mess. It is rendered my MarkDown parser semi-right (IMHO, it is still ugly, but tolerable), but it is unreadable as-is.

  For me, MarkDown is format to be used both with fancy renderer (i.e GitHub presentation of README.md) and without one (`more README.md` at local console). Output of `mandoc` is not any good for second use case, and for first one only (effectively reading in browser) it us better to render HTML directly, without MarkDown as intermediate format.

> There is also Pandoc, which as far as I remember allows you to convert Markdown documents into manual pages.

  I'll look at it, but I don't have high hopes, as mdoc is semantic format and MarkDown is (almost) not. There is no notion of "option with optional argument" in MarkDown.


-- 
// Lev Serebryakov


More information about the freebsd-doc mailing list