-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
merge yaml no longer working in version 2.7.3+; issues working with latex templates and yaml blocks #5873
Comments
I don't see any obvious problems with the command line. But we can't help diagnose your problem unless you give enough information to fully reproduce it. That means we need to see |
@jgm thanks! giving more info to facilitate its reproducibility
pandoc 1.17.2 and 2.2.1 works pandoc 2.7.3 does not work (it fails to show the varfile.yml
templatefile.tex
|
As for As for the missing element, apparently HsYAML (the library we use to parse YAML in recent versions) is not handling the Can you point to documentation in the YAML spec for this syntactic form: |
|
Seems like HsYAML is parsing the
|
thanks @jgm this is alias, anchor and merge concept. https://stackoverflow.com/questions/41063361/what-is-the-double-left-arrow-syntax-in-yaml-called-and-wheres-it-specced/41065222 -> https://yaml.org/type/merge.html looks like is a draft for yaml 1.1 that was not included in the specification but lots of libraries included it: http://blogs.perl.org/users/tinita/2019/05/reusing-data-with-yaml-anchors-aliases-and-merge-keys.html do you know an alternative way to achieve mostly the same with current pandoc's library? in my example, I had only one variable, but the real case looks like this: |
thanks to this conversation with @jgm I discovered that the merge feature is not part of the specification, so I used what I found here https://yaml.org/spec/1.2/spec.html#id2761803 varfile.ymlchanges -<<: *variables
+env: *variables new file
templatefile.texchanges -importedtext: $importedtext$
+importedtext: $env.importedtext$ new file
|
Okay, that helps. I suppose we could manually implement the merge syntax in pandoc, but I am reluctant to depart from official YAML spec. Glad you found a way to work around it. |
I am using a particular use case since debian 9 (pandoc 1.17.2?): Latex templates with variables defined in a yaml file.
Specifically for a project based on invoice-boilerplate. In 2.7.3 (installed using .deb available here) the yaml file is ignored. In the internet there are different sites pointing to use pandoc in this direction and I'm sure more people is experiencing the same and most probably this is duplicated (sorry):
so while this is not solved, I am reverting to pandoc 2.2.1 included in debian 10
The text was updated successfully, but these errors were encountered: