-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retaining leading space in as_paragraph_md() #88
Comments
Thank you for using ftExtra. Anyway, ftExtra uses Pandoc's Markdown, so you can literally use spaces by escaping it with backslashes. library(ftExtra)
data.frame(
package = "ftExtra",
description = "Extensions for 'Flextable'^[\\ Supports of footnotes]",
stringsAsFactors = FALSE
) %>%
as_flextable() %>%
colformat_md(
.footnote_options = ftExtra::footnote_options()
) %>%
flextable::autofit(add_w = 0.5) BTW, your suggestion is absolutely true that providing option is better. |
Thank you so much, and sorry for the long example! Escaping the leading space with footnote(i = c(1, 3), j = 1,
value = as_paragraph_md(c(footnotes$ITT_a, footnotes$CMC_b)),
ref_symbols = c(" a", " b"),
part = "body")
# Revised code escaping leading space
footnotes <- list(ITT_a = "\\ For the ITT model, results were pooled across bootstrap samples in which all parameters converged, and the posterior disribution in each bootstrap sample was based on 10,000 MCMC sampling iterations (after 10,000 burn-in iterations). Emp. *M* = *M* of empirical *M*s across bootstrap samples; Emp. *SD* = *SD* of empirical *M*s across bootstrap samples; Avg. *SD* = *M* of empirical *SD*s across bootstrap samples; PB CI = percentile bootstrap confidence interval.",
CMC_b = "\\ For the CMC models, the posterior distribution was based on 500,000 MCMC sampling iterations (after 500,000 burn-in iterations). Emp. *M* = empirical *M*; Emp. *SD* = empirical *SD*; HPD CI = Highest Posterior Density Credible Interval.") |
Thank you for the response. |
Thank you for this wonderful package!
It seems that
as_paragraph_md()
automatically strips leading space. See below for comparison withas_paragraph()
fromflextable
.Is there a way to retain leading space when using
as_paragraph_md()
? Maybe an argument for this option can be added?This would be useful when a space is desired between the footnote symbol and the footnote text in the footer of a flextable. I am trying to do this in my code below, but no space is displayed between the footnote symbol and footnote text.
Sample Code
Sample Table
The code above yields this table. You can see that there is no space in the footer between "a" and "For the ITT model..." or between "b" and "For the CMC models..."
The text was updated successfully, but these errors were encountered: