Skip to content

v0.4.0

Compare
Choose a tag to compare
@rich-iannone rich-iannone released this 15 Feb 17:29
· 5724 commits to master since this release
e521dcf

New features

  • We now have the ability to display row group labels as a column in the stub (as an alternative to these grouping labels appearing as header rows). This is made possible with the new option row_group.as_column in tab_options() (the default keeps the preexisting behavior) (#291). (#855)

  • The table footer (which can contain footnotes and source notes) now has numerous layout options in tab_options(): footnotes.multiline, footnotes.sep, source_notes.multiline, and source_notes.sep. With the *.multline options, we can control whether notes span across separate lines (TRUE, the default) or are kept together as a paragraph (FALSE). For the latter layout option, we can control the separation between consecutive notes with the *.sep options (the default is " "). The work done here also fixes long-standing issues with footer output in the LaTeX and RTF formats (#593, #833). (#864)

  • The fmt_fraction() formatter was added, allowing for flexible formatting of numerical values to mixed fractions of configurable accuracy (#402). (#753)

  • Added the opt_horizontal_padding() and opt_vertical_padding() functions to easily expand or contract an HTML table in the horizontal and vertical directions (#868). (#882)

  • There is now a locale argument in the gt() function. If set, formatter functions like fmt_number() will automatically use this global locale while formatting. There also remains the the option to override the global locale with any non-NULL value set for locale within a fmt_*() call (#682). (#866)

Minor improvements and bug fixes

  • There is now more flexibility, improved documentation, and more testing/reliability for the date/time formatting functions (fmt_date(), fmt_time(), and fmt_datetime()). Now, Date and POSIXct columns are allowed to be formatted with these functions. With fmt_datetime(), we can even supply a format code for generation of custom dates/times (#612, #775, #800). (#801)

  • Footnote marks for HTML tables now have an improved appearance. They are slightly larger, set better against the text they follow, and, asterisks are specially handled such that their sizing is consistent with other marks (#511). (#876)

  • Further improving support for color value inputs, gt now allows shorthand hexadecimal color values (like #333) and the use of the transparent CSS color keyword (#839, #856). (#870)

  • The rendering of percent signs in HTML output was changed from the problematic HTML entity % to simply %. This solves issues with tables incorrectly rendering percent signs in some situations (#657, #686). (#871)

  • All values supplied within cells_title() are now checked more rigorously, erroring and providing actionable messaging when stopping does occur (#424). (#783)

  • Added a missing column entry in the documentation for the gtcars dataset. Thanks, @luisDVA for providing this fix! (#883)