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

LaTeX writer removes float number of meta #5838

Closed
Grandement opened this issue Oct 21, 2019 · 3 comments
Closed

LaTeX writer removes float number of meta #5838

Grandement opened this issue Oct 21, 2019 · 3 comments

Comments

@Grandement
Copy link

Hi,

Seems that the LaTeX writer and maybe other writers change the float number of a meta field to an integer when it's *.0
This is bad for document versioning where 1.0 would be a valid version number and 1 would look like a typo mistake. Is there a way to change this? I read the release notes and saw that the integer representation was introduced for ipynb. #5398

I do not really understand why this should be changed for writers like LaTeX. When I remember correctly the float number worked in the past.

@mb21
Copy link
Collaborator

mb21 commented Oct 21, 2019

Thank you for submitting a bug report. However, we cannot improve pandoc or help you unless you give us all of the following information:

  • the pandoc version (check using pandoc -v and try to reproduce the bug with the latest released version of pandoc, or even better: the development version or nightly build.)
  • the exact command line used
  • the exact input used
  • the output received
  • the output you expected instead

A small test case (just a few lines) is ideal. If your input is large, try to whittle it down to a minimum working example. (For binary input formats like docx, you should attach the minimum sample file.)

Finally, ask questions on pandoc-discuss and read the User's Guide.

@Grandement
Copy link
Author

Grandement commented Oct 21, 2019

pandoc 2.7.3
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.8.1
Default user data directory: ...\pandoc
Copyright (C) 2006-2019 John MacFarlane
Web: http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

minimal testcase:
markdown file with yaml meta only (content.md) :

---
VERSION1: 1.0
VERSION2: 1.1
---

latex template file (template.tex) :

$VERSION1$

$VERSION2$

pandoc call:
pandoc --template=template.tex -t latex -o output.tex content.md

Output result (output.tex) :

1

1.1

expected instead:

1.0

1.1

@jgm
Copy link
Owner

jgm commented Oct 21, 2019

This seems to be fixed already in the dev version!

 % pandoc --template my.templ -t latex -s
---
VERSION1: 1.0
VERSION2: 1.1
---
1.0

1.1

@jgm jgm closed this as completed Oct 21, 2019
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

3 participants