i'm using pandoc (2.2.1) to convert an html page to pdf (or also markdown, org, plain text, etc. whatever works really).

this is the page: https://www.exclassics.com/pamphlets/pamph004.htm

pandoc returns the best output when i just use the -s flag and the default pdf engine (ie via latex rather than direct).

but it doesn't preserve the centered text at the beginning of the pamphlet. is is it possible to preserve this formatting? or workaround of some kind? anything better than converting to latex, manually centering it all, then converting again?

i'm new to pandoc so sorry if this is obvious. i searched and found nothing.

  • The centering, for the most part, is via CSS (style="text-align:center") - not much Pandoc can do about CSS.
    – muru
    May 5, 2020 at 17:17
  • 2
    @muru thx, your comment taught me two things at once. am also astonished to see how controversial centering is in markdown land!
    – mooseface
    May 10, 2020 at 19:45


You must log in to answer this question.

Browse other questions tagged .