retext-project / retext

ReText: Simple but powerful editor for Markdown and reStructuredText
GNU General Public License v2.0
1.89k stars 196 forks source link

Tables print different from preview, alignment breaks print #629

Closed terrancewong closed 1 year ago

terrancewong commented 1 year ago

Markkdown

# table1

|   | x | y | z |
|:--|--:|--:|--:|
| a | 2 | 7 | 6 |
| b | 9 | 5 | 1 |
| c | 4 | 3 | 8 |

# table2

|   | x | y | z |
|---|---|---|---|
| a | 2 | 7 | 6 |
| b | 9 | 5 | 1 |
| c | 4 | 3 | 8 |

style sheet

th {
   white-space: nowrap;
}

table, th, td {
   padding: 6px 13px;
   border: 1px solid #DDD;
   border-collapse: collapse;
   border-spacing: 0px;
}

preview is ok, when print/print preview, table 1 has no lines.

mitya57 commented 1 year ago

It is the same issue as #608 — unfortunately it's a bug in Qt that I have little control of.

But there is good news: you can use export to PDF. That will use Qt WebEngine renderer, which will the same way as the Preview pane, i.e. include the borders.