Git Product home page Git Product logo

Comments (8)

davidgohel avatar davidgohel commented on June 20, 2024 1

thanks @cderv

I will work on that soon!

from officedown.

Pindar777 avatar Pindar777 commented on June 20, 2024 1

@cderv Thank you for the hint to "number_section"!

from officedown.

davidgohel avatar davidgohel commented on June 20, 2024

Hi,

Thanks, are you sure this is the entire sessionInfo()? I think section other attached packages: is missing. You have many loaded namespace but no attached packages.

from officedown.

davidgohel avatar davidgohel commented on June 20, 2024

Also could you post a minimal reproducible example? I only have bits in your original post.

See guidelines when you open an issue: https://github.com/davidgohel/officedown/blob/master/.github/ISSUE_TEMPLATE/bug_report.md

from officedown.

Pindar777 avatar Pindar777 commented on June 20, 2024

Hi there,
I am struggling with this issue, too.

IMHO It's caused by a combination of "word headline style with numbering" and the auto-numbering feature of officedown.
The latter I could not disable, @davidgohel Is there a boolean to switch it off?
The workaround is to write headlines followed by {-}.
I need a specific style of numbering, auto-numbering only uses the arabic numbers shown in the screenshot of @katerinabc

from officedown.

Pindar777 avatar Pindar777 commented on June 20, 2024

@katerinabc I guess your pandoc version changed between August 2020 an January 2021, or?

from officedown.

cderv avatar cderv commented on June 20, 2024

Here is a reproducible example:

---
title: "Test number section"
output:
 bookdown::markdown_document2:
    base_format: officedown::rdocx_document
    toc: true
---

## Header 1

## Header 2

You see this behavior of two numbering in section header because bookdown format gains a working number_sections argument in version 0.21 which default to TRUE.

If you deactivate number_sections in bookdown::markdown_document2, then it won't be passed to the base format rdocx_document, and you will have only one numbering!

---
title: "Test number section"
output:
 bookdown::markdown_document2:
    number_sections: FALSE
    base_format: officedown::rdocx_document
    toc: true
---

## Header 1

## Header 2

@davidgohel if rdocx_document takes care of section numbering, you may want to make sure than number_sections is set to FALSE in rmarkdown::word_document (which is the default, but not in bookdown::word_document2 which markdown_document2(base_format = rmarkdown::word_document).

It is the same if I set number_sections: TRUE in rdocx_document

---
title: "Test number section"
output:
 officedown::rdocx_document:
   number_section: TRUE
---

## Header 1

## Header 2

Hope it helps

from officedown.

davidgohel avatar davidgohel commented on June 20, 2024

I just pushed a fix for this issue. rdocx_document now set number_sections to FALSE when bookdown::markdown_document2 is used to avoid sections numbered twice.

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.