Closed atanasj closed 6 years ago
If I remove also the filters "pandoc-newpage.pl" and "pandoc-docx-pagebreak", and remove all "@" characters from paths, converting the following "minimal.md" works without a hitch:
---
pandocomatic_:
use-template:
- docx-refs
---
this is a test
Can you do the following using pandocomatic:
Thanks for your response.
Right, so. I gave it a crack. I had to really strip back on a lot of things that were both in the pandocomatic.yaml
file, as well as the YAML
header. Using your header:
---
pandocomatic_:
use-template:
- docx-xnos
---
And re-working the pandocomatic.yaml
file to be:
# These are pandocomatic templates.
settings:
recursive: true
follow-symlinks: false
skip: ['.*', 'pandocomatic.yaml']
templates:
##############################################################################
##############################################################################-citation-links
##############################################################################
link:
pandoc:
metadata:
link-citations: true
##############################################################################
##############################################################################-crossreferencing
##############################################################################
xnos:
pandoc:
filter:
- 'pandoc-tablenos'
- 'pandoc-fignos'
- 'pandoc-eqnos'
tablenos-capitalise: On # pandoc-tablenos
tablenos-caption-name: Table # pandoc-tablenos
tablenos-cleveref: On # pandoc-tablenos
fignos-plus-name: Figure
fignos-capitalise: On # pandoc-fignos
fignos-cleveref: On # pandoc-fignos
##############################################################################
refs:
setup: []
preprocessors: []
pandoc:
standalone: true
filter: 'pandoc-citeproc' # process citations
bibliography: "MyLib.bib"
csl: "csl/apa-old-doi-prefix.csl"
metadata:
notes-after-punctuation: false
postprocessors: []
cleanup: []
##############################################################################
##############################################################################—DOCX
##############################################################################
docx:
extends: ['refs']
pandoc:
from: markdown+smart+implicit_figures+table_captions+multiline_tables+compact_definition_lists+subscript+superscript+yaml_metadata_block+line_blocks+backtick_code_blocks+fenced_code_attributes+tex_math_dollars+native_spans
to: docx
standalone: true
filter:
- 'pandoc-newpage.pl' # command \newpage
- 'pandoc-docx-pagebreak' # commands PAGEBREAK & PAGEBREAKLANDSCAPE
reference-doc: "_templates/reference.docx" #templates/custom.docx
dpi: 300
toc: false
##############################################################################
docx-xnos:
extends: ['link','xnos','docx']
##############################################################################
docx-changes:
extends: ['docx']
preprocessors: ['preprocessors/criticmarkup'] #process criticmarkup to HTML that pandoc can use
##############################################################################
##############################################################################
##############################################################################
This seems to work now. I tried to insert another section in the .yaml
file, such as:
##############################################################################
crossref:
padnoc:
filter:
- 'pandoc-crossref'
linkReferences: true # pandoc-crossref
nameInLink: true # pandoc-crossref
tblPrefix: # pandoc-crossref
- Table # pandoc-crossref
- Tables # pandoc-crossref
figPrefix: # pandoc-crossref
- Figure # pandoc-crossref
- Figures # pandoc-crossref
listing: True # pandoc-crossref
lofTitle: "# List of Figures" # pandoc-crossref
lotTitle: "# List of Tables" # pandoc-crossref
##############################################################################
To have as an option, but all tests failed - even when I did not call the template. Do you know why? I have removed for now.
@atanasj - there is a spelling mistake of padnoc and you cannot mix metadata into your filter list I think...
Also, off topic but you do not need to explicitly enable the pandoc extensions, i.e. from: markdown+...
— most of these are already enabled, you only need to enable the non-standard extensions.
I wonder if the problem was with the \@ sign in the path in the end? What happens if with your no-working pandocomatic.yaml you now go back to reference-doc: '@templates/reference.docx'
?
@iandol is correct in observing that mixing filters and metadata in the filter property is not allowed. So, in your latest question:
This seems to work now. I tried to insert another section in the .yaml file, such as:
############################################################################## crossref: padnoc: filter: - 'pandoc-crossref' linkReferences: true # pandoc-crossref nameInLink: true # pandoc-crossref tblPrefix: # pandoc-crossref - Table # pandoc-crossref - Tables # pandoc-crossref figPrefix: # pandoc-crossref - Figure # pandoc-crossref - Figures # pandoc-crossref listing: True # pandoc-crossref lofTitle: "# List of Figures" # pandoc-crossref lotTitle: "# List of Tables" # pandoc-crossref ##############################################################################
To have as an option, but all tests failed - even when I did not call the template. Do you know why? I have removed for now
You could rewrite that example to
crossref:
pandoc:
filter:
- 'pandoc-crossref'
metadata:
linkReferences: true # pandoc-crossref
nameInLink: true # pandoc-crossref
tblPrefix: # pandoc-crossref
- Table # pandoc-crossref
- Tables # pandoc-crossref
figPrefix: # pandoc-crossref
- Figure # pandoc-crossref
- Figures # pandoc-crossref
listing: True # pandoc-crossref
lofTitle: "# List of Figures" # pandoc-crossref
lotTitle: "# List of Tables" # pandoc-crossref
Note the difference between the pandoc.filter
property and the metadata
property. Pandocomatic is quite strict where you can put what: each property needs to be in the correct section.
Thanks so much @htdebeer and @iandol for your help. The suggested changes / tips have got it all back purring again.
Hi,
I am getting the following error with
pandocomatic
when trying to export fromScrivener
using @iandolScrivomatic
workflow.YAML front matter is:
The relevant sections of my
pandocomatic.yaml
file are:Please note, that I have hashed out some of the filters as I thought these could be causing the issue, but it still failed. The error log is below:
I have tested the underlying
pandoc
,pandoc-citeproc
,pandoc-fignos
andpandoc-tablenos
on themd
file, and it works as expected. The terminal command I used to test this is:The relevant package version numbers are:
Please let me know if you need more info. Thanks in advance---both for your help, and for a very useful package.