Empty \title{}
in LaTeX output will be removed
(along with \maketitle
).
highlight.js is loaded from https://www.jsdelivr.com/package/gh/highlightjs/cdn-release by default now. This means more languages are supported (not only R), but also means syntax-highlighting will not work offline at the moment (it will be improved in future).
MathJax failed to load in the previous version. The bug has been fixed now.
Removed the function markdownExtensions()
.
Switched the underlying Markdown rendering engine from the C library sundown (which has been deprecated for a decade) to the R package commonmark (thanks, @jeroen, yihui/knitr#1329).
The functions renderMarkdown()
and
markdownToHTML()
have been renamed to mark()
and mark_html()
, respectively. The old names are still kept
in this package for backward-compatibility.
Removed the arguments stylesheet
and
fragment.only
in mark_html()
. For
stylesheet
, please use the argument
meta = list(css = ...)
to provide the CSS stylesheet. For
fragment.only
, please use
mark_html(options = '-standalone')
instead of
fragment.only = TRUE
. Currently these old arguments are
still accepted internally, but may be deprecated and dropped in the long
run.
The file
argument of mark()
and
mark_html()
can also take a character vector of Markdown
text now.
Removed functions rendererExists()
,
rendererOutputType()
, and
registeredRenderer()
. They were primarily for internal
use.
Deprecated the function markdownExtensions()
. All
extensions should be specified via the options
argument of
functions like mark()
, e.g.,
mark(options = '+table+tasklist')
. See all options on the
help page ?markdown::markdown_options
.
Renamed markdownHTMLOptions()
to
markdown_options()
.
The default value of the encoding argument of renderMarkdown() and markdownToHTML() has been changed from getOption(“encoding”) to “UTF-8”. The encoding of the input file will always be assumed to be UTF-8.
markdownToHTML() will return a character vector encoded in UTF-8 (instead of the system’s native encoding) when not writing to an output file.
renderMarkdown() works now even if text = character(0) or “”
added an encoding
argument to renderMarkdown() since
multi-byte characters in renderMarkdown() did not work on Windows
(thanks, Kohske Takahashi, #63)
fixed #64: invalid ‘n’ argument in rpubsUpload() (thanks, Wouter van Atteveldt)
images that have already been base64 encoded will not be encoded again (#61)
the URL of the MathJax CDN was updated to cdn.mathjax.org
fixed #60: MathJax may be included even if it is unnecessary when syntax highlighting is enabled (thanks, @aoles)
fixed a bug which may hang R when building R Markdown vignettes in a wrong locale (thanks, Dan Tenenbaum, yihui/knitr#782)
if both the ‘file’ and ‘text’ arguments are provided but file = NULL, e.g. markdownToHTML(file = NULL, text = ?), markdownToHTML() can throw an error indicating the file is invalid (thanks, Tyler Rinker, hadley/staticdocs#66)
markdownToHTML(text = ?, output = ?) was broken (#54)
added ‘mathjax_embed’ to HTML options for embedding the MathJax JavaScript in the HTML document rather than linking to it online. Note the JavaScript code is read from the http instead of https MathJax URL. Contributed by Henrik Bengtsson.
added another vignette to show the HTML output of the original vignette (see browseVignettes(‘markdown’))
the default CSS style was tweaked (major changes include: page width is at most 800px, more line height, slightly larger fonts, and a different syntax highlighting theme)
added a new argument ‘template’ to markdownToHTML() so that we can customize the HTML template (by default, it uses the template ‘resources/markdown.html’ in this package); thanks, Nacho Caballero
the options markdown.HTML.stylesheet and markdown.HTML.header used in markdownToHTML() can be character vectors (they will be processed by paste(x, collapse = ‘’)
fixed #25 and #27: minor documentation problems
fixed #26: the HTML output file will be written relative to the current working directory now when it contains images that need to be base64 encoded
fixed #28: the image URL should be decoded before the image is based64 encoded
the markdown extension ‘ingore_math’ was replaced with ‘latex_math’.
users can now use the markdown.HTML.stylesheet option to override the package default stylesheet.
setting the fragment_only rendering option or the fragment.only parameter to markdownToHTML will base64 encode images if applicable. version 0.5.1 did not.
fixed a GUIDgenerator bug; for escaping math equations before markdown parsing begins.
image encoding was fixed for the case when there are more than one included in a markdown document.
added fragment.only parameter to markdownToHTML
added new html rendering options base64_images, fragment_only, mathjax, and highlight_code
added new markdown extension ignore_math
removed safelink from default html rendering options
the default html rendering options are now hard_wrap, use_xhtml, smartypants, and base64_images.
added support for post-processing HTML using smartypants filter
added optional support for rendering a table of contents
changed exported C functions to use an rmd_ prefix (eliminating potential symbol conflicts with other packages)
changed default html rendering options to use_xhtml, hard_wrap, safelink, and smartypants