Tables in WebHelp from Markdown files
Post here questions and problems related to editing and publishing DITA content.
-
susannecm
- Posts: 121
- Joined: Wed Mar 17, 2010 1:04 pm
Tables in WebHelp from Markdown files
I am working on an API documentation that uses Markdown files in a DITAMAP..
So far, I have been using my normal DITA output transformation to create WebHelp from this content.
However, I do not like the appearance of the tables in the output. They only have a single separator line between the header and the rest of the table.
I assume that this is because the Markdown table is converted to a DITA CALS table that lacks rowsep and colsep attributes.
How can I change this without affecting the output for the remaining documentation?
I appreciate your help.
Susanne
So far, I have been using my normal DITA output transformation to create WebHelp from this content.
However, I do not like the appearance of the tables in the output. They only have a single separator line between the header and the rest of the table.
I assume that this is because the Markdown table is converted to a DITA CALS table that lacks rowsep and colsep attributes.
How can I change this without affecting the output for the remaining documentation?
I appreciate your help.
Susanne
-
julien_lacour
- Posts: 737
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Tables in WebHelp from Markdown files
Post by julien_lacour »
Hello Susanne,
You can easily customize the tables using custom CSS rules, such as:
For more information about how to customize WebHelp Responsive output using CSS, please refer to this topic.
Regards,
Julien
You can easily customize the tables using custom CSS rules, such as:
Code: Select all
*[class ~= "topic/table"] {
border: 1px solid black;
border-collapse: collapse;
}
.table th[class ~= 'topic/entry'],
.table td[class ~= 'topic/entry'] {
border: 1px solid black;
}
Regards,
Julien
-
Prinnybod
- Posts: 1
- Joined: Thu Nov 13, 2025 12:07 pm
Re: Tables in WebHelp from Markdown files
I’ve been struggling with Markdown-to-DITA table formatting too. I wonder if there’s a way to apply a specific style only when the source file is Markdown, without changing the rest of the DITA content.
-
susannecm
- Posts: 121
- Joined: Wed Mar 17, 2010 1:04 pm
Re: Tables in WebHelp from Markdown files
Yes, that is also my problem. I want to apply CSS styles selectively.
For example, when the output is generated, could Oxygen apply an outputclass to these tables on conversion from Markdown to DITA?
For example, when the output is generated, could Oxygen apply an outputclass to these tables on conversion from Markdown to DITA?
-
julien_lacour
- Posts: 737
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Tables in WebHelp from Markdown files
Post by julien_lacour »
Hello,
If you need a style for Markdown tables and another for DITA CALS tables, you can add attributes, for example:
Then match the new class (copied from the outputclass) in the final output:
Regards,
Julien
If you need a style for Markdown tables and another for DITA CALS tables, you can add attributes, for example:
Code: Select all
| Header | Header |
|---|---|
| Cell | Cell |
| Cell | Cell |
{outputclass="md-table"}
Code: Select all
.md-table {
border: 1px solid black;
border-collapse: collapse;
}
.md-table th[class ~= 'topic/entry'],
.md-table td[class ~= 'topic/entry'] {
border: 1px solid black;
}
Julien
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service