Skip to content

Fix: LaTeX Error: No counter 'none' defined when using tables #28

Description

@webwurst9000

Hi! I encountered an error when trying to compile the example invoice.md file containing a table using this template.

The Error: ! LaTeX Error: No counter 'none' defined. l.168 \begin{longtable}[]{@{}llll@{}}

The Cause: When Pandoc generates a longtable without a caption, it passes an empty argument []. In the scrlttr2 class, this triggers a search for a default counter that isn't initialized.

The Fix: Adding \newcounter{none} to the LaTeX template resolves the conflict.

In letter.latex, I added it after the table packages:

\usepackage{longtable,booktabs}
\newcounter{none}

This allows table in the example invoice.md to compile correctly into the PDF.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions