-
Notifications
You must be signed in to change notification settings - Fork 479
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
Adds an options to use listings
for code highlighting in LaTeX
#2349
base: master
Are you sure you want to change the base?
Conversation
listings
for code highlighting in LaTeX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach looks fine. Code needs a few cleanup things, and I would love to get the showcase build with listings passing on CI before merging.
@@ -266,15 +282,15 @@ end | |||
# as the top-level blocks of a page, or somewhere deeper in the AST. | |||
istoplevel(n::Node) = !isnothing(n.parent) && isa(n.parent.element, MarkdownAST.Document) | |||
|
|||
latex(io::Context, node::Node) = latex(io, node, node.element) | |||
latex(io::Context, node::Node, e) = error("$(typeof(e)) not implemented: $e") | |||
latex(io::Context, node::Node; settings::LaTeX=LaTeX()) = latex(io, node, node.element; settings=settings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to pass things through via the keyword arguments. That's what the Context
object it for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, I am not sure I see what you mean. I don't see how a Context
can be used to pass the compiler options or else. Could you elaborate ?
Co-authored-by: Morten Piibeleht <[email protected]>
@mortenpi I really did not have time to push this further so far... What can I do to revive this ? |
Fixes #2309