Comments (4)
You can use the following:
---
title: "Habits"
output:
officedown::rdocx_document:
reference_docx: you-doc.docx
---
You can read https://bookdown.org/yihui/rmarkdown/word-document.html to learn more about this.
from officedown.
Hi,
officedown::rdocx_document
passes its arguments in ...
to rmarkdown::word_document
, so yes it should work to pass a reference doc to be used by pandoc. If it does not work it would be interesting to know what is going wrong.
did you try it already ?
from officedown.
from officedown.
After some more trials:
This works for word_doc output:
output:
word_document:
#reference_docx: ../styleref/undp_style-secnums.docx
#reference_docx: ../styleref/undp_style.docx
pandoc_args: --reference-doc=../styleref/undp_style.docx
So I am confident it is the correct pandoc_arg parameter
However in this scenario:
output:
officedown::rdocx_document
pandoc_args: --reference-doc=../styleref/undp_style.docx
there is and error:
Error in yaml::yaml.load(..., eval.expr = TRUE) :
Scanner error: mapping values are not allowed in this context at line 6, column 14
Calls: ... parse_yaml_front_matter -> yaml_load ->
Execution halted
from officedown.
Related Issues (20)
- Math font in rdocx_document HOT 1
- Add image to word doc header without using reference docx
- Error when using `knit_print_block` in loop HOT 6
- Header Problems concomitant with page numbering HOT 6
- number_section and markdown_document2: change of default behavior not possible HOT 5
- Math expression HOT 1
- The "flextalbe" Caption
- Help with using flextable in officedown HOT 10
- Import the figure as its original height/width ratio HOT 14
- (How to) Add footnotes through officedown HOT 1
- Fields Word document HOT 1
- Name for `tab.id` must not contain `_`? HOT 1
- `rpptx_document` does not use the assigned layout in code chunk HOT 3
- accessing different parts of word doc HOT 3
- how to add page numbers, title page and sections in word using officedown HOT 1
- Extra section break is created after MULTCOLUM stop HOT 5
- Option to output Word doc with line numbering HOT 5
- dml bg is always "white" in R Markdown HOT 2
- `block_pour_docx` but only for part of file to be poured
- Images in page headers of reference docx misplaced when using <!---BLOCK_LANDSCAPE_START---> <!---BLOCK_LANDSCAPE_STOP---> HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from officedown.