Closed ltcamara closed 1 year ago
Thanks a lot, that is very useful - I will try to fix soon.
I just had another idea, that may be helpful.
Maybe \cline
is easier to adapt than \hhline
for this? Just an idea.
Exchanging the relevant line in the generated .tex code:
leads to the desired result:
It should be fixed now. It was hard. Thanks for the clues you gave, it was very helpful.
cline
can not be used when there is a background color; in that case, hhline
is used. Now both can be used by flextable.hhline
and |
are difficult to manage when cells are vertically merged. However, now many display issues related to 'flextable' and latex borders are fixed (and it feels good).
One issue remains with your test case when the table has a background color. I hope to fix it later, not sure if I can.
Thanks a lot, David.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
The following RMarkdown example reproduces the problem that I have. It can directly be used and encircles the problem I am facing in my current use case.
Description of the problem Since flextable translates hline into the "\hhline" command of LaTex, it does it by making use of the tilde "~" for cells without a line and for the cell with a line it assigns the corresponding element. In my case, this translates to the following, in LaTex:
\hhline{~~~>{\arrayrulecolor[HTML]{FF0000}\global\arrayrulewidth=1pt}-~~}
The issue: It chips away vertical lines from the other columns as the circles in the executed markdown illustrate.Potential solution If the lines are converted to
\hhline{~|~|~>{\arrayrulecolor[HTML]{FF0000}\global\arrayrulewidth=1pt}-|~|~}
the problem will go away. Issue here: it needs to be known where the "|" must be set.