Giter Club home page Giter Club logo

Comments (3)

mpacer avatar mpacer commented on July 20, 2024

Adding link: #110

from nbconvert.

mpacer avatar mpacer commented on July 20, 2024

So in looking into this, it's easy enough to use the code linked in #110 to create an example for the purposes of testing for these particular tokens, but that seems to test for a bandaid that will only be ripped off when the token list is updated next. The changing token list has already been a problem for LaTeX template.

Looking at the preamble to the LaTeX base template, it seems that the set of tokens has changed during the course of nbconvert's development. Some of them e.g., \BuiltInTok is defined on both lines 74 and 104 in https://github.com/jupyter/nbconvert/blob/master/nbconvert/templates/latex/base.tplx (in fact, given that they both were declared with \newcommand and not \renewcommand I'm surprised it didn't throw a warning).

I've hunted down the source of the token names to be the highlighting-kate syntax highlighting engine either through pygments or pandoc. I have a hunch it's pandoc, but @jhamrick suggested it might be happening via pygments and I haven't figured out which yet… but in either case, I think we should be able to extract a list of all standard token types(regardless of the chosen style) on the fly.

And that leads my to my current question. The easiest thing to do is just run nbconvert on a notebook that happens to contain those token types, for now. The more robust solution would be to generate valid LaTeX that surely contains all the token types that can be generated by nbconvert (after extracting them directly from highlighting-kate), and ensure that that compiles.

I feel like for a test, the robust solution is preferable, but I'm not sure if that fits the goal of this issue.

from nbconvert.

Carreau avatar Carreau commented on July 20, 2024

Simply a notebook that fail conversion would be fine for now, which should not be too hard as the conversion is just failing to PDF. Though installing latex might be too heavy.

Go for the easier to do.

from nbconvert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.