Git Product home page Git Product logo

Comments (6)

davidgohel avatar davidgohel commented on September 21, 2024

I am trying to understand what DOES NOT work for you

---
output: officedown::rdocx_document
---

This is a [formatted text with style StringTok]{custom-style="StringTok"}

::: {custom-style="Author"}
This is a custom paragraph
:::

This is producing what I was expecting:

Capture d’écran 2020-06-26 à 14 16 59

Can you be more specific about what is not working? Could you provide an example?

Also, what is the result of rmarkdown::pandoc_version()?

thanks

from officedown.

alherca73 avatar alherca73 commented on September 21, 2024

The first option:
This is a [formatted text with style StringTok]{custom-style="StringTok"}

NEVER works for me. Whenever I try to use a predefined style in my Reference Word Document, what it does is it creates a new style with the same name but it does not customize the text, it is always normal format.

The custom paragraph ALWAYS works.

::: {custom-style="Author"}
This is a custom paragraph
:::

This is what I got
rmarkdown::pandoc_version()
[1] ‘2.7.3’

Thanks for your help.

from officedown.

davidgohel avatar davidgohel commented on September 21, 2024

Thanks

I am really confused because I can not reproduce and my colleague neither.

Could you post an image of the result you are getting and sessionInfo() results?

from officedown.

alherca73 avatar alherca73 commented on September 21, 2024

Sure. Thanks. Here are some:

For instance, this shows that it works. I applied a paragraph custom style and it produces what I want:
Screen Shot 2020-06-26 at 10 49 07 AM
Screen Shot 2020-06-26 at 10 49 15 AM

Here I apply to text within a paragraph and what it does is just creates a new style:

Screen Shot 2020-06-26 at 10 49 29 AM
Screen Shot 2020-06-26 at 10 49 45 AM

So, for some reason, only the paragraph option works.

from officedown.

alherca73 avatar alherca73 commented on September 21, 2024

It looks like if I used one of the pre-defined styles in the Word document reference, then it DOES work. However, when I try to add a completely NEW style, and try to use it in the *.RMD it does NOT work. Not sure what are the requirements of new styles in the word document reference to work. For now I guess I can use some of the predefined styles.
Thanks.

from officedown.

davidgohel avatar davidgohel commented on September 21, 2024

thanks,

The style you are using are supposed to exist in the template (or the default pandoc template). That why you had the impression it does not work. You can save styles in a Word document and reuse them by using reference-doc argument.

I am closing that issue as it is related to pandoc usage.

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.