agents icon indicating copy to clipboard operation
agents copied to clipboard

1_lab1.ipynb - small conversion to properly render Latex in Markdown

Open LeRobert opened this issue 11 months ago • 0 comments

Nothing important, but still nice to see fully rendered :-) ..................................................................................................................

1_lab1.ipynb, cell 14 - content of converted_answer is in Markdown with Latex. To properly render Latex, we need to make a small conversion:

from IPython.display import Markdown, display
import re

# convert \[ ... \] to $$ ... $$, to properly render Latex
converted_answer = re.sub(r'\\[\[\]]', '$$', answer)

display(Markdown(converted_answer))

LeRobert avatar May 05 '25 20:05 LeRobert