-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Hi David,
Thank you for your excellent work on flextable, officer, and ftextra. These tools have become essential to my R workflow for producing high-quality Word documents.
I'd like to submit a feature request for strikethrough formatting support, in two related areas:
1. Strikethrough via Markdown in colformat_md() (from ftextra)
Currently, colformat_md() supports bold and italic Markdown syntax:
df <- data.frame(text = "**Bold**, *Italic*, and ~~Strikethrough~~")
flextable(df) %>% colformat_md()In this example, the bold and italic parts are rendered correctly in the resulting Word table, but Strikethrough is either ignored or shown as plain text.
Request: Please add support for parsing text syntax into Word-compatible strikethrough formatting within colformat_md(). This would greatly expand the expressive power of Markdown-based formatting in R-to-Word pipelines.
- Native strikethrough support in fp_text() / ftext()
Currently, the fp_text() function supports the following formatting: bold, italic, underlined, color, font.size, etc., but does not have a strikeout or strikethrough argument.
This makes it difficult to apply strikethrough formatting via compose() or set_flextable_content().
Request: Please consider extending the fp_text() API to include a strikeout = TRUE (or strikethrough = TRUE) argument to enable native strikethrough styling in custom-formatted text.
Use Case
These two enhancements would allow dynamic generation of Word tables where deprecated values, removed terms, or replaced statuses can be visually struck through, improving clarity and auditability in reports.
Let me know if there's a reason this isn't currently supported (e.g., Word rendering limitations or OOXML restrictions), but if it's feasible, it would be a welcome and widely useful addition.
Thanks again for all the amazing work you've done across this suite of packages!
Best,
Jeff Cavanagh