Learn R Programming

slackr (version 3.3.1)

slackr_tex: Post a tex output to a Slack channel

Description

Unlike the slackr_dev() function, this one takes a tex object, eliminating the need write to pdf and convert to png to pass to slack.

Usage

slackr_tex(
  obj,
  channels = Sys.getenv("SLACK_CHANNEL"),
  token = Sys.getenv("SLACK_TOKEN"),
  ext = "png",
  path = NULL,
  title = NULL,
  initial_comment = NULL,
  thread_ts = NULL,
  ...
)

Value

httr response object (invisibly)

Arguments

obj

character object containing tex to compile.

channels

Comma-separated list of channel names or IDs where the file will be shared.

token

Authentication token bearing required scopes.

ext

character, type of format to return, can be tex, pdf, or any image device, Default: 'png'.

path

character, path to save tex_preview outputs, if NULL then tempdir is used, Default: NULL.

title

Title of file.

initial_comment

The message text introducing the file in specified channels.

thread_ts

Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.

...

other arguments passed to texPreview::tex_preview(), see Details

Author

Jonathan Sidi (aut)

Details

Please make sure texPreview package is installed before running this function. For TeX setup refer to the Setup notes on LaTeX.

See Also

texPreview::tex_preview()