tomduck / pandoc-tablenos

A pandoc filter for numbering tables and table references.
GNU General Public License v3.0
108 stars 8 forks source link

Differing outputs for HTML5 and xelatexPDF #27

Closed kleinbottle closed 3 years ago

kleinbottle commented 3 years ago

I get differing outputs from the same source file for HTML5 and PDF via xelatex table-nos-html table-nos-xelatex-pdf

. The file is a little involved and the PDF error messages are

pandoc-fignos: Wrote the following blocks to header-includes.  If you
use pandoc's --include-in-header option then you will need to manually
include these yourself.

    %% pandoc-fignos: required package
    \usepackage[capitalise]{cleveref}

    %% pandoc-fignos: change cref names
    \crefname{figure}{Figure}{figs.}

[WARNING] Citeproc: citation tbl:formats not found
    Pango version: 1.48.3

pandoc-fignos: Wrote the following blocks to header-includes.  If you
use pandoc's --include-in-header option then you will need to manually
include these yourself.

    %% pandoc-fignos: required package
    \usepackage[capitalise]{cleveref}

    %% pandoc-fignos: change cref names
    \crefname{figure}{Figure}{figs.}

[WARNING] Citeproc: citation tbl:formats not found

Screenshots of the resulting HTML and PDF are attached.

kleinbottle commented 3 years ago

Sorry for the false alarm.

The issue arose because pandoc-tablenos was not explicitly added as a filter in .yaml metadata file. Once it was added, the discrepancies between HTML and PDF vanished as did the error messages.

Moreover, I had a line in header-includes that said

\usepackage[margins=raggedright]{floatrow}

It left-aligned tables, and commenting it out solved remaining outstanding issues.

Cheers!