Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbutuseless committed May 26, 2024
1 parent 73885e6 commit f9e4ed8
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 26 deletions.
18 changes: 13 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
Package: emphatic
Type: Package
Title: Highlight R Output
Version: 0.1.6.9014
Author: mikefc
Maintainer: mikefc <[email protected]>
Description: User-defined colour highlighting of data.frames and other R output.
Title: Tools for Exploratory Analysis of Tabular Data using Colour Highlighting
Version: 0.1.7
Authors@R: c(
person("Mike", "Cheng", role = c("aut", "cre", 'cph'), email = "[email protected]")
)
Maintainer: Mike Cheng <[email protected]>
Description: Tools for exploratory analysis of tabular data using colour
highlighting. By specifying a palette and row/column positions, data-dependent
colouring can be applied to data.frames in a pipe-friendly
manner. Highlighting is displayed in any console supporting ANSI
colouring. Quarto and Rmarkdown rendering are also supported. It is
also possible to add colour to regular expression matches and
highlight differences between two objects.
URL: https://coolbutuseless.github.io/package/emphatic/, https://github.com/coolbutuseless/emphatic
BugReports: https://github.com/coolbutuseless/emphatic/issues
License: MIT + file LICENSE
Expand Down
25 changes: 6 additions & 19 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@

# emphatic 0.1.6.9014 2024-05-26

* Removed `hl_mat()` and associated vignettes.
* function is not exported for now as the selection process is too
difficult to describe well. Needs a rethink
* Refactored colour handling for `hl_grep()` and `hl_diff()`
* Settled on `text`/`fill` nomenclature
* Refactored arguments to `hl()` for more clarity
* Added latex output so Quarto/Rmd will show emphatic objects when
rendered to PDF
* Remove `scale_mode` argument to `hl()`
* Support for output to `typst` in quarto docs
* Output to raw blocks in typst
* only character to be escaped is the backtick
* latex rendering now has better whitespace at start of line
* SVG anim support
* Excel export
* Refactor options for hl_grep and hl_diff
* html, typst, svg and latex output all now support font size argument
# emphatic 0.1.7 2024-05-26

* Support for conversion to `typst`, `latex`, `html`, `svg` and `Excel`
* Automatic conversion to appropriate type when knitting Rmarkdown and Quarto
* Internal refactor
* Removed `hl_mat()`

# emphatic 0.1.6 2024-04-27

Expand Down
1 change: 1 addition & 0 deletions R/core-html.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ escape_html <- function(x) {
#' "3em", "22px" etc.
#'
#' @return Character string containing HTML representation
#'
#' @export
#' @examples
#' hl_diff('hello', 'there') |>
Expand Down
1 change: 1 addition & 0 deletions R/core-latex.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ escape_latex <- function (x, newlines = FALSE, spaces = TRUE) {
#' Default: NULL.
#'
#' @return single character string containing a latex representation
#'
#' @export
#' @examples
#' hl_diff("hello", "there") |>
Expand Down
3 changes: 3 additions & 0 deletions R/core-svg.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#' @return character string containing an SVG snippet.
#'
#' @return Character string containing SVG representation
#'
#' @export
#' @examples
#' hl_diff('hello', 'there') |>
Expand Down Expand Up @@ -67,6 +68,7 @@ as_svg <- function(x, width = 1200, height = 900, ..., font_size = NULL,
#' @return Character string containing representation as an SVG group element
#' i.e. \code{<g>}. This result is suitable for combining with other
#' SVG elements into a custom SVG document.
#'
#' @export
#' @examples
#' hl_diff('hello', 'there') |>
Expand Down Expand Up @@ -145,6 +147,7 @@ make_animate_tag <- function(i, n, dur = 1, playback, svg_id) {
#'
#' @return Character string containing an animated SVG representation displaying
#' all elements sequentially
#'
#' @export
#' @examples
#' list(
Expand Down
1 change: 1 addition & 0 deletions R/core-typst.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ escape_typst <- function(x) {
#' @param line_spacing line spacing in \code{em} units. Default: 0.3
#'
#' @return Character string containing \code{typst} representation
#'
#' @export
#' @examples
#' hl_diff("hello", "there") |>
Expand Down
2 changes: 2 additions & 0 deletions R/core.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ print.emphatic <- function(x, ...) {
#' be represented in text. If you're in a terminal or console, then
#' choose 'ansi'.
#'
#' @return A character string of the requested mode
#'
#' @export
#' @examples
#' mtcars |>
Expand Down
2 changes: 2 additions & 0 deletions R/hl-dataframe.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ hl_inner <- function(.data, palette, row_ids, column, dest_col_ids, elem, show_l
#' Default: FALSE
#' @inheritParams hl_grep
#'
#' @return An emphatic object suitable to output to console (for example)
#'
#' @export
#' @examples
#' # Simple
Expand Down
2 changes: 1 addition & 1 deletion R/hl-diff.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' for no separation. Use the empty string to insert an empty line.
#' @inheritParams hl_grep
#'
#' @return list of 'emphatic' objects which could be rendered to ANSI or HTML
#' @return list of 'emphatic' objects which could be rendered to ANSI (for example)
#'
#' @importFrom grDevices col2rgb
#' @importFrom utils adist
Expand Down
2 changes: 2 additions & 0 deletions R/hl-grep.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#' @inheritParams hl_diff
#' @param opts create options list
#'
#' @return An emphatic object suitable to output to console (for example)
#'
#' @importFrom utils capture.output str
#' @export
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/knitr.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#'
#' @inheritParams as_html
#'
#' @return a character vector suitable for output during an rmarkdown render
#'
#' @export
#' @examples
#' mtcars |>
Expand Down
2 changes: 2 additions & 0 deletions R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ find_args <- function () {
#' @param text_contrast When \code{text_mode='contrast'} this numeric value in
#' range [0, 1] adjusts the visibility. Default: 1 (high contrast)
#'
#' @return named list of standard options
#'
#' @export
#' @examples
#' # Generate a standard set of options
Expand Down
3 changes: 3 additions & 0 deletions man/as.character.emphatic.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/hl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/hl_diff.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/hl_grep.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/hl_opts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/knit_print.emphatic.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f9e4ed8

Please sign in to comment.