section_class for add_markdown fixed

This commit is contained in:
Nicolas 2025-09-09 23:55:16 +02:00 committed by Nicolas Kruse
parent c7123e23d9
commit 4c396cd5b3
3 changed files with 9 additions and 5 deletions

View File

@ -633,8 +633,7 @@ class DocumentWriter():
return html
def render_to_latex() -> str:
html = _markdown_to_html(
self._equation_embedding_reescaping(norm_text))
html = render_to_html()
return latex.from_html(html)
self._doc.append([render_to_html, render_to_latex])

View File

@ -24,8 +24,8 @@
% Define fine print environment
\newenvironment{fineprint}
{\begin{quote}\footnotesize\color{gray}}
{\end{quote}}
{\par\vspace{0.5\baselineskip}\noindent\footnotesize\color{gray}}
{\par\vspace{0.5\baselineskip}}
% Geometry Settings
\geometry{margin=1in} % 1-inch margins

View File

@ -81,7 +81,12 @@ def make_document():
doc.add_table(df.style.hide(axis="index"), 'This is a example table', 'example1')
doc.add_text("This is a fine print test text section. It uses smaller text and uses grey color.", section_class='fineprint')
doc.add_text("This is a fine print test text section. It uses smaller text and uses grey color. This is a fine print test"
"text section. It uses smaller text and uses grey color.", section_class='fineprint')
doc.add_text("Standard text section. This is normal text without any special formatting. It uses the default text size and color.")
doc.add_markdown("This is a **fine print** test text section. It uses **smaller text** and uses **grey** color.", section_class='fineprint')
return doc