Needs option for max table width
See original GitHub issueWhat is the problem?
Not possible to set max width on table format.
Example, when formatting a table like this:
| H1 | H2 | H3 |
| :------------- | :------------------------- | :---- |
| Bar | Some very<br>long line of<br>text Some very<br>long line of<br>textSome very<br>long line of<br>text Some very<br>long line of<br>text | Foo |
it will format it into something like this:
| H1 | H2 | H3 |
| :----------------- | :------------------------------------------------------------------------------------------------------------------------------------- | :-- |
| Bar | Some very<br>long line of<br>text Some very<br>long line of<br>textSome very<br>long line of<br>text Some very<br>long line of<br>text | Foo |
I would like a setting to set the max amount of dashes (“-” in “| :— |”) since Pandoc will use number of dashes to set the rendered table width in html.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Setting the maximum width of a table - html - Stack Overflow
If you want to make your max-width to work, you need to set the CSS property table-layout: fixed; on the table and use...
Read more >max-width - CSS: Cascading Style Sheets - MDN Web Docs
The max-width CSS property sets the maximum width of an element. It prevents the used value of the width property from becoming larger...
Read more >Should I set maximum table width? - UX Stack Exchange
One important consideration is which unit to use for the maximum width. rem or em might be the best choice. – CodesInChaos. Jan...
Read more >DataTable Width & Column Width - Dash Plotly
It is not possible to set a max-height. All of the cells need to be the same height. Subscribe to plotly/dash-table#737 for updates...
Read more >Resize a table, column, or row - Microsoft Support
On the Layout tab, in the Cell Size group, click AutoFit. Shows the options in the Cell Size group. Do one of the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks for the information.
I will leave this (option for max cell width) as a feature request. Let’s see whether there are other people having the same issue.
I will add the support for
DocumentRangeFormattinglater. (Probably next weekend as I am away this week)I’ve tried it out and spaces is not taken into account by Pandoc. However, I would prefer not to pad with spaces since the whole idea is to have a small/neat table in the markdown file and just a few rows that stand out from the rest of the table.
No, its not meaningless, I usually have a few tables that have one or two rows that are long and but I still want to format the rest of the tables.
Like this:
If you don’t think this is a good idea, can you at least consider an option to only format the table the cursor is at? Because now, all tables in the whole file are formatted when
Alt-Shift-F. Then I could format the tables with long rows myself.I don’t think it’s possible to set the width of tables in Pandoc in an easy way. Maybe with html tags and css inside the markdown but that is too much effort.
PS: Seems like I accidentally closed the issue.