Closed jr1234567 closed 1 year ago
rtf gets the least love. This should fix it. Let me know if that works. Also, I noticed the lancet style has issues with the centered decimal. Do you see this on your end?
Many thanks. The duplicated "N=" is resolved. Indeed there are other issues: -With the lancet style the duplicated decimal gives a weird "Â" -With the Hmisc style, the "/" is missing, whereas the "*" are duplicated -With the nejm style, the dash is replaced by "0—"
These are all UTF+8 character handling. I need to look into what's required for this in RTF. The RTF spec was designed before unicode. I changed the title. Hopefully there's just some escaping required.
https://www.oreilly.com/library/view/rtf-pocket-guide/9781449302047/ch01.html#unicode_in_rtf
I experimented with this. I can write a transformer I think.
There's also some Markdown not handled properly after the refactor. In particular, bold.
I've realigned this with the recent refactor. Should be able to move onto UTF+8 handling next.
Try this version.
The hmisc "*" missing is intended. It should be bold now.
I'll check on the lancet. That was working on my side. The centered decimal is in the lower code space of UTF-8 which of course requires different handling.
I've duplicated the · on a different machine. Trying to solve.
It works for me now with all three cases. The only thing I see odd is the left column in 'nejm' is centered instead of left justified.
new tests:
Why do you want the "*" rendered? It's a bold directive. I switched it to be consistent with the other styles and made it a bold.
Ah OK ! I misunderstood that,.
I only mentioned them for consistency reason as that they do appear as such when viewing a table in Rstudio
This is indeed way better not to have them
The / is useful though for numerator / denominator
I think this leaves rtf in good shape now.
Everything is beautiful Many thanks for this great job
Hello Many thanks for this great package I noticed that the rtf() function seems to add an extra "N=" string in table header of generated rtf file, as exemplified in the following example: