GithubHelp home page GithubHelp logo

Template file about officedown HOT 4 CLOSED

davidgohel avatar davidgohel commented on June 18, 2024
Template file

from officedown.

Comments (4)

davidgohel avatar davidgohel commented on June 18, 2024 1

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.

cderv avatar cderv commented on June 18, 2024

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.

ramonskovitch avatar ramonskovitch commented on June 18, 2024

from officedown.

ramonskovitch avatar ramonskovitch commented on June 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.