File: TeX.Rd

package info (click to toggle)
r-cran-plotly 4.9.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 26,616 kB
  • sloc: javascript: 137,775; sh: 20; makefile: 6
file content (26 lines) | stat: -rw-r--r-- 688 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mathjax.R
\name{TeX}
\alias{TeX}
\title{Render TeX in a plotly graph using MathJax}
\usage{
TeX(x)
}
\arguments{
\item{x}{a character vector}
}
\description{
This function makes it slightly easier to render TeX in a plotly graph --
it ensures that MathJax is included with the final result and also
ensures the provided string is surrounded with \code{$} (this is what plotly.js
uses to declare a string as TeX).
}
\examples{

plot_ly(x = c(1, 2, 3, 4), y = c(1, 4, 9, 16)) \%>\%
  layout(title = TeX("\\\\text{Some mathjax: }\\\\alpha+\\\\beta x")) \%>\%
  config(mathjax = "cdn")
}
\seealso{
\link{config}
}