question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to add latex algorithms ?

See original GitHub issue

I was wondering if there is a way to add pseudocode algorithms with latex equations in jupyter book. I don’t believe so, but maybe you have a magical method 😃

The only ways I see of doing:

  • generating it in latex and pasting a figure
  • using the usual mardown syntax but that does not allow math symbols

For making a pdf output with markdown text, I would use latex’s algorithm2e package (see https://tex.stackexchange.com/questions/452552/algorithm-pseudocode-in-markdown) which will be converted using pandoc. I was wondering whether there was any equivalent in jupyter book ?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jstaccommented, Aug 4, 2020

I require the same thing and also thing algorithm2e is a good default.

There might be a variety of ways to do this but it would be good to have a default method supported with documentation.

The QuantEcon project will have need for this, so CCing @AakashGfude and @mmcky .

0reactions
AakashGfudecommented, Oct 12, 2021

@YannDubs let us know if you need any particular macro, typography support apart from what sphinx-proof’s algorithm can do: https://sphinx-proof.readthedocs.io/en/latest/syntax.html#algorithms . You can bold, italicize keywords using markdown syntax. So, that’s taken care of.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Algorithms - Overleaf, Online LaTeX Editor
The algorithm package can be used with algorithmic / algcompatible to add numbered captions to the algorithms. Open a full example on Overleaf....
Read more >
LaTeX/Algorithms - Wikibooks, open books for an open world
LaTeX has several packages for typesetting algorithms in form of "pseudocode". They provide stylistic enhancements over a uniform style (i.e., ...
Read more >
How to write algorithm in Latex - Shanto Roy
It can be done so easily using the algorithm or algorithm2e package in article documentclass. Some demo codes including the loops, functions and ......
Read more >
Write pseudo code in latex - TeX
How can i write the pseudo code Algorithm in Latex? 1 · Vertical line for pseudo code · 2 · How to write...
Read more >
How to write algorithm and pseudocode in Latex ...
We must use the following packages \usepackagealgorithm \usepackagealgorithmic Here is an exemple: \beginalgorithm \captionCalculate $y ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found