-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown tables to LibreOffice tables #32
Comments
Hello again! A possible solution would be to count the |
Hey! To answer your question, I think column count is done by table because column tags are children of a table tag, and common for every rows. But maybe I don't understand correctly. I want to share with you a result that I have, because I'm currently stuck on a problem: only the first column of my tables appear in the final .odt document. In the following files, you will find:
Opening Maybe you will see something I am missing in markdown_text.txt edit: here is a link to the xml standard description of tables. |
The only difference I note is that my column tags are at the end of the table content, below definition of rows. I thought tags order was not important in XML, but it appears that order could be interpreted. I saw this in Frame description:
I'll try to put column description at the beginning of the table content, before rows description. |
I would like to see the code you wrote for handling markdown tables. |
It finally works ! As I'm a noob with Github, the best way I found for you to see my code is to fork your repo and push my commits on my own repo, you can find it there: https://github.com/RomainTT/secretary Important note: as I did not know if style creation was important or not, I manually created a specific style for each table, column and cell. But actually it does not matter, I tried to remove any style creation and it still worked. |
Awesome! I was checking your code and noticed you also included image support in the markdown filter. That's great! I must confess I have my reserves because it relieves on PIL, which in some scenarios can be problematic. I'm now thinking in how keeping the image support avoiding the issues with PIL. Thank you for this job! |
I'm glad you like it. I don't know what kind of issues we can have with PIL, I just discovered this module. If you can get something better that's great. The image management is far from perfection right now:
One good point however is that you can have files with or without extension (.jpg, etc.) it will always work. |
I held a previous discussion on image support on PR #24. Have a look into that. |
Hello (me again!)
Current markdown filter does not convert markdown tables. I tried to modify the code myself but without success...
There are 4 main steps to achieve this if I understand correctly:
mardown(markdown_text, extras=['tables'])
table
,tr
, andtd
must be added tomarkdown_map.py
, I think it looks like this:text:p
child totd
elements : the exact same thing that is already done forli
tag, line 728 insecretary.py
<table:table-column table:style-name="TestListTable.A"/>
lines in the table header.The text was updated successfully, but these errors were encountered: