-
Notifications
You must be signed in to change notification settings - Fork 572
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 base.tex.j2 for macro compatibility with newer versions of Pandoc #2196
base: main
Are you sure you want to change the base?
Conversation
Added the macro \pandocbounded that is used by newer versions of pandoc.
Sorry about closing the previous PR on accident. Opened a new one. |
@PetalAdrift thank you! How can we test this PR? Is there a test that you could add to ensure this is tested on CI? |
@krassowski Sorry, I am not too familiar with the terminology (or Git, actually). Is there a link to relevant documentation on tests used for nbconvert? |
When is this going to be implemented? It's been months, and nbconvert for latex still only works with pandoc 3.2 or older. |
For now you can just make the change to your files locally. |
That is fine for me, but I have about a hundred students each semester that have to setup jupyter to successfully convert a notebook to a pdf via latex. I'd hate to redo my setup process only for the solution to finally have been implemented later. |
I guess one solution is to just just pandoc. It doesn't look as nice (subjective opinion), but it gets the job done. |
@PetalAdrift Maybe I can help a bit to write a simple test. I have not tried it, but you would have to add in @onlyif_cmds_exist("pandoc")
def test_template_contains_pandocbounded(self):
"""
Does the template contain the pandocbounded command for compatibility with pandoc >= 3.2.1?
"""
(output, resources) = LatexExporter().from_filename(self._get_notebook())
assert r"\newcommand*\pandocbounded" in output Either follow the instructions to test it locally before committing or commit and let CI test it. In the CI test output, you should see about here a new test named @krassowski Would that simple test be enough for you? It is actually just testing that the code, which this PR adds, is there. So it does not make much sense. Maybe it would be better to add e.g. |
Added the macro \pandocbounded that is used by newer versions of pandoc.