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

Adds an options to use listings for code highlighting in LaTeX #2349

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

BambOoxX
Copy link

@BambOoxX BambOoxX commented Nov 16, 2023

Fixes #2309

@mortenpi mortenpi changed the title 2309 listings Adds an options to use listings for code highlighting in LaTeX Dec 2, 2023
@mortenpi mortenpi added Type: Enhancement Format: LaTeX Related to the LaTeX / PDF output labels Dec 2, 2023
Copy link
Member

@mortenpi mortenpi left a 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.

src/latex/LaTeXWriter.jl Show resolved Hide resolved
@@ -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)
Copy link
Member

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.

Copy link
Author

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 ?

test/runtests.jl Outdated Show resolved Hide resolved
Co-authored-by: Morten Piibeleht <[email protected]>
@BambOoxX
Copy link
Author

BambOoxX commented Dec 1, 2024

@mortenpi I really did not have time to push this further so far... What can I do to revive this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Format: LaTeX Related to the LaTeX / PDF output Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch or at least support code listings in LaTeX using the listings package instead of minted
2 participants