tomduck / pandoc-tablenos

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

Table caption has tag in title #12

Closed amichuda closed 5 years ago

amichuda commented 5 years ago

Hi,

I'm using an Arch Linux distribution. I installed pandoc from pandoc == 2.7.2 pandoc-tablenos == 1.3.0 pandoc-fignos == 1.3.0

When I add the caption after a markdown table:

Table: Imputed Yield Reduction based on the literature. {#tbl:yieldred}

The HTML output works fine, but the pdf caption is:

Table 3: Imputed Yield Reduction based on the literature.
{#tbl:yieldred}

As well as my cross-references in the text show as *(???) (This is also true for fignos, although I don't get the caption problem).

Am I missing a dependency or I'm at the wrong version?

Thank you!

tomduck commented 5 years ago

Thanks for your feedback, Aleksandr. Can you please provide me with a minimum working example that demonstrates the problem?

amichuda commented 5 years ago

Hi,

Thank you for the reply and sorry for the late reply! Here's a minimal example that works in HTML and doesn't in a PDF.

---
title: My Title
author: Me
output: pdf_document
---

## Introduction

We use yield reductions based on microsclerotia levels in *@tbl:yloss.

| **Treatment ($\mu S$)** | **Mean Cumulative Yield (kg/plant)** | **Yield Reduction (%)** |
| --- | --- | --- |
| _Control_ | 0.84 +/- 0.07 | 0.00 |
| _1_ | 0.80 +/- 0.07 | 5.39 |
| _3_ | 0.72 +/- 0.07 | 14.49 |
| _5_ | 0.64 +/- 0.06 | 24.32 |
| _10_ | 0.44 +/- 0.05 | 47.40 |
| _15_ | 0.37 +/- 0.03 | 56.29 |
| _20_ | 0.42 +/- 0.05 | 50.22 |
| _30_ | 0.31 +/- 0.04 | 63.16 |
Table: Table_name
{#tbl:yloss}
amichuda commented 5 years ago

Sorry, it turns out it's not a problem with the library but with my VS Code extension. Thank you!

tomduck commented 5 years ago

No worries. I'm glad it worked out!

Cheers, Tom