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

Update Pandoc to 2.10 #354

Closed
wants to merge 3 commits into from
Closed

Update Pandoc to 2.10 #354

wants to merge 3 commits into from

Conversation

dhimmel
Copy link
Member

@dhimmel dhimmel commented Jul 2, 2020

Update other dependencies that aren't held back due to weasyprint/
ciaro to latest on 2020-07-02

https://github.com/jgm/pandoc/releases/tag/2.10

Update other dependencies that aren't held back due to weasyprint/
ciaro to latest on 2020-07-02
@AppVeyorBot
Copy link

AppVeyor build 1.0.146 for commit 4631c4d failed.

@dhimmel
Copy link
Member Author

dhimmel commented Jul 2, 2020

Looking through the Pandoc changes at https://github.com/jgm/pandoc/releases/tag/2.10

HTML writer:

  • Use CSS in favor of <br> for display math (#6372) Some CSS to ensure that display math is displayed centered and on a new line is now included in the default HTML-based templates; this may be overridden if the user wants a different behavior.
  • Docx writer:
  • Enable column and row bands for tables (#6371). This change will not have any effect with the default style. However, it enables users to use a style (via a reference.docx) that turns on row and/or column bands.

@vincerubinetti do any of those sound problematic?

@dhimmel
Copy link
Member Author

dhimmel commented Jul 2, 2020

Failed due to a pandoc-fignos error (the AST must have changed):

[INFO] Running filter pandoc-fignos
Traceback (most recent call last):
  File "/usr/share/miniconda3/envs/manubot/bin/pandoc-fignos", line 8, in <module>
    sys.exit(main())
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/pandoc_fignos.py", line 645, in main
    altered)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/pandoc_fignos.py", line 642, in <lambda>
    altered = functools.reduce(lambda x, action: walk(x, action, fmt, meta),
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/pandocfilters.py", line 111, in walk
    item['c'] if 'c' in item else None, format, meta)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/pandocxnos/core.py", line 844, in process_refs
    _process_refs(value[-5], pattern, labels)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/pandocxnos/core.py", line 92, in wrapper
    ret = func(*args, **kwargs)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/pandocxnos/core.py", line 746, in _process_refs
    if v['t'] == 'Cite' and len(v['c']) == 2:
TypeError: string indices must be integers
Error running filter pandoc-fignos:
Filter returned error status 1

See tomduck/pandoc-fignos#81 and tomduck/pandoc-xnos#16

@lierdakil
Copy link

FWIW, pandoc-crossref was updated to support pandoc 2.10. Saying this so you know you have options in case pandoc-xnos doesn't update in the near future.

@dhimmel
Copy link
Member Author

dhimmel commented Jul 29, 2020

pandoc-xnos should be updated soon as per tomduck/pandoc-xnos#16 (comment).

Linking to sergiocorreia/panflute#142, which has a bunch of info about how the Pandoc AST changed for 2.10. Once we can produce HTML output, we should check that our javascript plugins still work.

FWIW, pandoc-crossref was updated to support pandoc 2.10

@lierdakil thanks for the info. Peeked at lierdakil/pandoc-crossref@aeef943. I see that pandoc-crossref can now be installed with conda. This makes it more feasible for us to include it.

@AppVeyorBot
Copy link

AppVeyor build 1.0.147 for commit ba63370 failed.

@AppVeyorBot
Copy link

AppVeyor build 1.0.148 for commit 375980b failed.

@dhimmel
Copy link
Member Author

dhimmel commented Jul 30, 2020

Upgraded pandoc-xnos in ba63370, but now am running into an error from panflute:

[INFO] Running filter pandoc-manubot-cite
Traceback (most recent call last):
  File "/usr/share/miniconda3/envs/manubot/bin/pandoc-manubot-cite", line 8, in <module>
    sys.exit(main())
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/manubot/pandoc/cite_filter.py", line 214, in main
    doc = pf.load(input_stream=args.input)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/panflute/io.py", line 59, in load
    doc = json.load(input_stream, object_pairs_hook=from_json)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/json/__init__.py", line 361, in loads
    return cls(**kw).decode(s)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/panflute/elements.py", line 1532, in from_json
    raise Exception('unknown tag: ' + tag)
Exception: unknown tag: Caption
Error running filter pandoc-manubot-cite:
Filter returned error status 1
##[error]Process completed with exit code 83.

I think sergiocorreia/panflute#142 is the issue to monitor for this being fixed upstream.

@dhimmel
Copy link
Member Author

dhimmel commented Oct 31, 2020

panflute still hasn't been upgraded. ported some of the non-pandoc environment updates to #383.

@dhimmel
Copy link
Member Author

dhimmel commented Nov 10, 2020

sergiocorreia/panflute#142 is closed with https://pypi.org/project/panflute/2.0.3/ released to support Pandoc 2.11. I am going to close this PR and open a new one for pandoc 2.11 support.

@dhimmel dhimmel closed this Nov 10, 2020
@dhimmel dhimmel deleted the pandoc-2.10 branch November 10, 2020 02:16
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

Successfully merging this pull request may close these issues.

None yet

3 participants