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
)
R Markdown output format to pass to render
Passed onto html_document
.
Overrides the default TRUE
for
html_document
to FALSE
as
LibreOffice hangs on long lines such as the base64
images included in the self-contained version.
The advanced mathjax does not work with with Word/LibreOffice.
No theme should be used for the output as the custom CSS should take care of everything.
By default turn off highlighting as scripts are difficult to import. This does though work somewhat OK when copy-pasting from the web-browser.
The CSS if other that the default within the package
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 TRUE
.
This is the formatting applied to any other
h elements not included to the first. Note: this is only applied
if LibreOffice_adapt is TRUE
.
TRUE
if <script></script> tags are
to be removed. These are usually not compatible with Word-processors
and should therefore in most cases be stripped from the document.
Since out.width and out.height remove the option of having captions this allows a workaround through some processing via the XML-package
The max width of the body element. Defaults to "40em" if not specified. Any CSS-compliant width format works.
Max Gordon
If you want to get equations into Word the currently best way is to
use the word_document
format.