Skip to content

Custom Pygments Formatter #2172

Answered by facelessuser
bblanchon asked this question in Q&A
Sep 10, 2023 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

You could also use any built-in formatters, such as ImageFormatter.

There are a number of Pygments formats, and there are also many that make absolutely no sense to use in the context of Markdown parsing. Pygments has formatters for all sorts of environments, like terminal out for instance. I guess, it could be argued there are some niche cases, like your own, that may prefer LaTeX, but those are pretty rare.

It could certainly be done with a custom fence via SuperFences as you could override and call Pygments directly and handle it however you want. Right now we are very much geared towards HTML output. I'm sure some features we support also don't translate to LaTeX (or other formats) …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@facelessuser
Comment options

@bblanchon
Comment options

@facelessuser
Comment options

Answer selected by bblanchon
@bblanchon
Comment options

@facelessuser
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants