Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify usage of parameters when using CSV from file #65

Open
mfhepp opened this issue Mar 13, 2022 · 0 comments
Open

Clarify usage of parameters when using CSV from file #65

mfhepp opened this issue Mar 13, 2022 · 0 comments

Comments

@mfhepp
Copy link

mfhepp commented Mar 13, 2022

It seems pantable understands parameters like caption, alignment, etc. in combination with CSV from a file only if they are in the markup or in the file, not in the element meta-data.

As putting them into the file will make the file unusable for most other tools, this is a bit unfortunate.

Approach 3, i.e. putting the meta-data including the include parameter into the code block is actually fine, but it should be documented more clearly if possible. Thanks!

This works: Approach 1

```{.table include="data/csv_example_with_header.csv"}
```

File: csv_example_with_header.csv

---
caption: '*Awesome* **Markdown** Table from `pantable`'
alignment: RC
table-width: 2/3
markdown: True
---
prefix, city_or_region, comments, Status
'030', 'Berlin', 'My comment', True
'069', 'Frankfurt', , False
'089', 'Munich', 'Another comment', True

This does not work (caption etc. missing): Approach 2

```{.table include="data/csv_example.csv" alignment="RC" caption="A cool CSV Table"}
```

This also works: Approach 3

```table
---
caption: '*Awesome* **Markdown** Table from `pantable`'
alignment: RC
table-width: 2/3
markdown: True
include: "data/csv_example.csv"
---
```

File: csv_example.csv

prefix, city_or_region, comments, Status
'030', 'Berlin', 'My comment', True
'069', 'Frankfurt', , False
'089', 'Munich', 'Another comment', True

Environment:

pandoc                    2.17.0.1             
pandoc-crossref           0.3.12.2           
pantable                  0.14.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant