discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Evan Silberman <evan@jklol.net>
To: discuss@mandoc.bsd.lv
Subject: pandoc now supports mdoc(7) input
Date: Mon, 27 Jan 2025 23:04:46 -0800	[thread overview]
Message-ID: <39RAST4PH9CF9.248OVT065QPA7@silby.fyi> (raw)

hi all,

I contributed an mdoc(7) reader to pandoc (https://pandoc.org) which
shipped in version 3.6 last month. It was fun to work on and it
successfully parses nearly every mdoc-format manual shipping with
OpenBSD base into pandoc's internal format, whence it can be converted
to any of pandoc's output formats.

Since pandoc's internal format is in most relevant aspects less rich
than mdoc(7)'s, there's some semantics that are lost in translation, and
overall mandoc -T html probably produces more accurate and useful HTML
output than pandoc can; on the other hand, you can now use pandoc to,
for example, produce reasonably attractive PDFs of mdoc manuals via
LaTeX or typst without much configuration, for those who are itching to
give their departmental printers a workout and bring back the binder
era.

I wrote about my experience writing the code
(https://duckrabbit.tech/articles/mdoc.html), but for readers of this
list I hope mostly that you will take pandoc's mdoc reader for a spin
from time to time and let me know by email or submit a Github issue to
pandoc if you can get it to produce egregious interpretations (or parse
failures) on reasonable mdoc(7) input. (As I discuss in my article I
avoided resolving many questions about what to do with unreasonable
input.)

An mdoc(7) output mode for pandoc is a less promising project because of
the limitations of pandoc's internal representation but it's something I
might try someday to see if it can produce useful output in some cases.

Happy to answer any questions about this project!

Evan Silberman
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


                 reply	other threads:[~2025-01-28  7:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39RAST4PH9CF9.248OVT065QPA7@silby.fyi \
    --to=evan@jklol.net \
    --cc=discuss@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).