Zulip Chat Archive

Stream: general

Topic: Presenting Lean code in LaTeX


James Palmer (Aug 19 2020 at 13:48):

Hi everyone, I appreciate this question probably gets asked all the time - but what is the best way to present Lean code in LaTeX?

Many thanks :)

Alex J. Best (Aug 19 2020 at 13:50):

There is a style file and some instructions at https://github.com/leanprover-community/lean/tree/master/extras/latex

James Palmer (Aug 19 2020 at 14:07):

thank you very much!

James Palmer (Aug 19 2020 at 16:29):

@Alex J. Best does this work with Overleaf or do I need to actually download LaTeX Editor & the github code onto my laptop to use it?

Alex J. Best (Aug 19 2020 at 16:31):

I think it should work on overleaf, just upload the file lstlean.tex to your overleaf project as a separate file? I'll try it quick and let you know

James Palmer (Aug 19 2020 at 16:32):

Thank you very much!

Alex J. Best (Aug 19 2020 at 16:35):

Yeah it works for me, I clicked the upload button in the left file menu, then upload from external url and pasted https://raw.githubusercontent.com/leanprover-community/lean/master/extras/latex/lstlean.tex in

Alex J. Best (Aug 19 2020 at 16:35):

Then I copied the sample article tex to the article and it compiled fine!

James Palmer (Aug 19 2020 at 16:37):

amazing, thank you very much!


Last updated: Dec 20 2023 at 11:08 UTC