-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
The align parameter in functions such as new_paragraph has no effect on tables.
To Reproduce
All three tables printed below are center-aligned. This is not the desired behavior.
import subprocess
from mdutils.mdutils import MdUtils
from mdutils import Html
import pandas as pd
mdFile = MdUtils(file_name="Example_Markdown", title="Markdown File Example")
mdFile.new_header(level=1, title="Overview") # style is set 'atx' format by default.
d = {"col1": [1, 2], "col2": [3, 4]}
df = pd.DataFrame(data=d)
mdFile.new_paragraph(df.to_markdown(index=False))
mdFile.new_paragraph()
mdFile.new_paragraph(df.to_markdown(index=False), align="center")
mdFile.new_paragraph()
mdFile.new_paragraph(df.to_markdown(index=False), align="left")
mdFile.create_md_file()
subprocess.run(
"pandoc Example_Markdown.md -o Example_Markdown.pdf",
shell=True,
check=False,
)Expected behavior
I expect left alignment with align="left". I'm not sure what the behavior for the default parameter "" should be.
Screenshots
/
Desktop (please complete the following information):
- OS: Ubuntu 22.04
- Version: mdutils 1.6.0
Additional context
/
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers