Open hasibagen opened 2 weeks ago
The docx you shared has some borders
PDF has more
But this is due to which Table is used in word document and how it is configured. You can change the default, but changing the style using a reference document. https://quarto.org/docs/output-formats/ms-word-templates.html
I see that Style in your docx you shared
Hope it helps
The docx you shared has some borders
PDF has more
But this is due to which Table is used in word document and how it is configured. You can change the default, but changing the style using a reference document. https://quarto.org/docs/output-formats/ms-word-templates.html
I see that Style in your docx you shared
Hope it helps
Thank you very much for your suggestion. I have modified the table style in the word template as you said, using libreoffice. However, after using the template to generate word, the exported word table is still dotted. I would like to ask why this is? I also tried to use word and wps to modify the word template, but it seems that the result is the same, there is no table border. This is my modified code and word template. Looking forward to your reply.
A few things:
You need to provide a docx file as reference doc. I don't know what LibreOffice is creating, but I believe Pandoc expect a recent docx format document, same as what it is producing. The document in the zip you provided do not seem to be latest docx format as when I opened an modify it in words, it will ask me for compatibility checker which means older version to newer.
I don't know how you modified styling, so let me be more precise.
See what we explain for other styles in our doc: https://quarto.org/docs/output-formats/ms-word-templates.html#sec-docx-create-template
It works for me when I do this (though I am on Windows with Word to use docx files)
Changing default Table styles in something that Pandoc still needs to support for Quarto to be able to benefit from it
So for now, one need to follow exactly how reference doc template works with Pandoc to be able to customize a Quarto docx output
Hope it helps
Bug description
I encountered an issue where a table generated with pd.to_markdown in Jupyter Lab loses its borders when exported to Word using Quarto. The borders appear correctly in the PDF output.
How can I resolve the issue of missing table borders in the Word output? How can I adjust the table style, such as center alignment, when generating Word documents? I am aware of the capabilities of knitr in R Markdown but need a solution entirely in Python.
Thank you for your assistance.
Steps to reproduce
import seaborn as sns from IPython.display import Markdown, display mpg = sns.load_dataset("mpg").head(3) display(Markdown(mpg.to_markdown(index = False)))
: Demonstration of pipe table syntax
bug_demo.zip
Expected behavior
Expected: The table should have borders in both PDF and Word outputs.
Actual behavior
Actual: The table has borders in the PDF output but lacks borders in the Word output.
Your environment
Operating System: Ubuntu 22.04 Jupyter Lab Version: IPython : 8.18.1 ipykernel : 6.29.4 ipywidgets : 8.1.2 jupyter_client : 8.6.1 jupyter_core : 5.7.2 jupyter_server : 2.14.0 jupyterlab : 4.1.8 nbclient : 0.10.0 nbconvert : 7.16.4 nbformat : 5.10.4 notebook : 7.1.3 qtconsole : 5.5.2 traitlets : 5.14.3
Quarto check output