View source: R/docx_document.R
docx_document | R Documentation |
html_document
, facilitates easier porting to docxThis function adds the option of having adaptations needed for seemless integration with
MS Word for importing html-documents in the .docx-format. The advantage of html documents is
the ability to create advanced formatting frequently needed in medical publications
and that is available in the htmlTable
function. You can view
the series
for more details regarding how to achieve
fast-track-publishing (ftp) together with knitr.
docx_document(
...,
self_contained = FALSE,
mathjax = NULL,
theme = NULL,
highlight = NULL,
css = "rmarkdown/docx.css",
h1_style = "margin: 24pt 0pt 0pt 0pt;",
other_h_style = "margin: 10pt 0pt 0pt 0pt;",
remove_scripts = TRUE,
force_captions = FALSE,
css_max_width
)
... |
Passed onto |
self_contained |
Overrides the default |
mathjax |
The advanced mathjax does not work with with Word/LibreOffice. |
theme |
No theme should be used for the output as the custom CSS should take care of everything. |
highlight |
By default turn off highlighting as scripts are difficult to import. This does though work somewhat OK when copy-pasting from the web-browser. |
css |
The CSS if other that the default within the package |
h1_style |
You can choose any css style formatting here that you
want to be applied to all h1 elements. Note: this is only applied
if LibreOffice_adapt is |
other_h_style |
This is the formatting applied to any other
h elements not included to the first. Note: this is only applied
if LibreOffice_adapt is |
remove_scripts |
|
force_captions |
Since out.width and out.height remove the option of having captions this allows a workaround through some processing via the XML-package |
css_max_width |
The max width of the body element. Defaults to "40em" if not specified. Any CSS-compliant width format works. |
If you want to get equations into Word the currently best way is to
use the word_document
format.
R Markdown output format to pass to render
Max Gordon
# Possible yaml configuration at the top of the Rmd doc
## Not run:
---
title: "Test"
author: "Max Gordon"
output:
Gmisc::docx_document
---
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.