mirror of https://github.com/Nonannet/pyladoc.git
section_class for add_markdown fixed
This commit is contained in:
parent
c7123e23d9
commit
4c396cd5b3
|
@ -633,8 +633,7 @@ class DocumentWriter():
|
||||||
return html
|
return html
|
||||||
|
|
||||||
def render_to_latex() -> str:
|
def render_to_latex() -> str:
|
||||||
html = _markdown_to_html(
|
html = render_to_html()
|
||||||
self._equation_embedding_reescaping(norm_text))
|
|
||||||
return latex.from_html(html)
|
return latex.from_html(html)
|
||||||
|
|
||||||
self._doc.append([render_to_html, render_to_latex])
|
self._doc.append([render_to_html, render_to_latex])
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
|
|
||||||
% Define fine print environment
|
% Define fine print environment
|
||||||
\newenvironment{fineprint}
|
\newenvironment{fineprint}
|
||||||
{\begin{quote}\footnotesize\color{gray}}
|
{\par\vspace{0.5\baselineskip}\noindent\footnotesize\color{gray}}
|
||||||
{\end{quote}}
|
{\par\vspace{0.5\baselineskip}}
|
||||||
|
|
||||||
% Geometry Settings
|
% Geometry Settings
|
||||||
\geometry{margin=1in} % 1-inch margins
|
\geometry{margin=1in} % 1-inch margins
|
||||||
|
|
|
@ -81,7 +81,12 @@ def make_document():
|
||||||
|
|
||||||
doc.add_table(df.style.hide(axis="index"), 'This is a example table', 'example1')
|
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
|
return doc
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue