-
Markdown images without explicit dimensions now obtain their size using
flextable::as_image(), allowingflextable::save_as_image()to render them (#109). Automatic sizing requires the optional magick package. -
Use resolved Quarto execution metadata for citations in books and other documents when available (Quarto 1.8 or later; #112).
-
Fix Markdown list items being joined without separators (#115). Lists now use bullet or decimal markers, preserve inline formatting, and indent nested items.
-
Fix math rendering with Pandoc 3.11 by explicitly requesting plain HTML math.
-
Use the Pandoc executable selected by rmarkdown for math rendering.
-
Fix
colformat_mdto applymd_extensionswhenpart = "all"(#110, thanks @astrochemx)
- Fix broken markdown rendering from a change in flextable 0.9.5 (#103)
- Fix disappearance of spaces on markdown rendering caused by a change in R 4.4 (#106)
- Require flextable>=0.9.5 to fix broken
colformat_md(#101)
- Avoid error from using horizontal rule (#98)
-
Deprecated functions masking the corresponding ones from the flextable package (#95)
-
Renamed
separate_headertosplit_header(#95) -
Fixed a wrong escape regex in the
sepparameter ofsplit_header,span_header, andseparate_header(#95)
-
Fix
footnote_optionsnot controlling reference symbols correctly. Formerly, only symbols in the cells used theprefixand thesuffixarguments. Now, footnote texts also respects them (#88). -
Support fine controls on footnote symbols in two ways. See
?footnote_optionsfor the details (#90).prefixandsuffixlabels by passing the corresponding arguments tofootnote_options- finest controls by passing a function to
footnote_options(ref = ...).
-
Fix
as_flextable.grouped_dfwhich broke second and subsequent group variables. Also, this function gainsgroups_arrangeargument. The default value isNULLwhich impliesFALSEfor the backward-compatibility. In the next version,NULLremains the default but becomes deprecated. Then,TRUEbecomes the default in the subsequent release (thanks, @eitsupi, #76). -
as_paragraph_mdandcolformat_mdgains themetadataargument with the default valuermarkdown::metadata(#78). -
as_flextable.grouped_dfusesdplyr::group_varsto get names of grouping variables, and remove an internal synonym (#79). -
as_paragraph_mdandcolformat_mddisables two Pandoc extentions,raw_htmlandraw_attribute. Previously, these synstaxes raised errors on formatting (#80). -
mention ftExtra respects
cslfield in the YAML front matter (#83). -
Fix a performance issue on
colformat_mdwhen using footnotes (#85). -
separate_headerandspan_headernow refers toflextable::get_flextable_defaults()to find default value fortheme_fun(#86).
as_paragraph_mdsupports empty string,"", as an input (#68).colformat_mdapplies on actual content of flextable rather than input dataset (#72).- Improved support for the underline syntax in Pandoc's Markdown (#73).
colformat_mdandas_paragraph_mdgainsreplace_na = ""as a new default parameter. Previously,NAare printed as"NA"(#63).
- Support tidyr 1.2.0 (thanks, @DavisVaughan, #66)
- Drop supports for Pandoc versions < 2.0.6 in order to reduce maintenance costs. (#59).
colformat_mdsupports multiple paragraphs by collapsing them with a separator given to the.separgument (default: `"\n\n") (#43).colformat_mdcan now automatically add citations to reference on R Markdown (#48).colformat_mdcan now contain cells with multiple footnotes. In addition, footnote keys are placed exactly the same place of source. The previous implementation moved the keys to the end of corresponding cells (#51).as_paragraph_mdsupports variety of input formats by checking enabled extensions (#54).
- Fix
colformat_md(pandoc_args = c("--bibliography", "example.bib"))should work even if bibliography field is missing from the YAML front matter (#41).
- Drop jpeg package from suggests, which is formerly used in a vignette (#42).
colformat_mdconverts cells to Pandoc's AST by a single call of Pandoc. Previously it called pandoc for each cell. This change improves performance around 15X faster (#46). Note that #46 broken support for some input formats (e.g., commonmark) and old Pandoc (< 2.0.6), but the regression is already fixed (#53, #57).as_paragraph_md()internally usesflextable::chunk_dataframe()in order to avoid potential problems if the flextable package changes the chunk structure in the future (#56, thanks @davidgohel).
- Fix math not rendered on Windows with Pandoc < 2.10 (#33)
math.luarequires Pandoc >= 2.7.3 (#35)- Fix Pandoc < 2.7.3 raising error message "option --lua-filter requires an argument SCRIPTPATH". This is a regression from #35 (#37)
- Fix CRAN warning, "file 'https://www.r-project.org/logo/Rlogo.png' can not be found." (#38)
- Support markdown footnote with
colformat_md. Currently, one footnote per a cell is allowed, and it must be located at the end of the cell content (#22). - Add
footnote_options()to configure options for footnotes (#23). - Support formatting markdown texts on header with
colformat_md(part = "header")(#23). - Support single- and double-quotes by a lua filter (dfc82e0).
- Support attributes with Span, Link, and Code. Useful attributes include the
.underlineclass and thecolor,shading.color, andfont.familyattributes (#24). - Support inline code (#25).
- Add the
md_extensionsandpandoc_argsarguments tocolformat_md()andas_paragraph_md()(#26, #29). - Support citation. Bibliography can be inherited from YAML front matter of an Rmd file (#27, #29).
- Support math on macOS and Linux (#30), and on Windows (#31).
- Fix character corruptions on Windows by forcing UTF8 (#31).
- Use pandoc citeproc when YAML frontmatter contains the bibliography field (#31).
- Patched to pass "CRAN Package Check Results for Package" where
r-patched-solaris-x86fails because of missing pandoc.
- Markdown parser
- supports more syntax
- Links
- Inline images
- Soft line breaks
- Hard line breaks (e.g.,
colformat_md(as_flextable(data.frame('a\\\nb', stringsAsFactors = FALSE)))).
- stops with error if there are multiple paragraphs or block elements other than the paragraph.
- supports more syntax
colformat_md()- controls colors of links for example by
colformat_md(auto_color_link = 'red'). - gains
.fromargument to specify Pandoc's--fromargument. - gains
jargument so that users can choose which columns to be treated as markdown based ondplyr::select()'s semantics.
- controls colors of links for example by
- Add
as_paragraph_mdwhich parses markdown texts on selected cells rather than selected columns. Use this function withinflextable::compose.
- Add
colformat_md()which parses markdown text in the body of the flextable object. - Add
separate_header()which separates header into multiple rows based on regular expression. - Add
span_header()which separates header into multiple rows based on regular expression, and spans them if the adjacent values share the same value. - Add
with_blanks()which inserts blank columns based on the semantics ofdplyr::select. - Add
as_flextable.data.frameto convert data frames to flextable. - Add
as_flextable.grouped_dfto convert grouped data frames to flextable.