Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_odt discards sections headers? #25

Open
MatthieuStigler opened this issue Jun 10, 2023 · 0 comments
Open

read_odt discards sections headers? #25

MatthieuStigler opened this issue Jun 10, 2023 · 0 comments

Comments

@MatthieuStigler
Copy link

Thanks for the package, that sounds very promising!

I notice that using read_odt, section titles formatted through the styles such as Heading 1, etc, don't appear?

See reprex below (using rmarkdown but problem hapened also with my original plain odt), where headers Section1 and Sub-section A have disappeared?

Thanks!

library(rmarkdown)

writeLines("# Section1\n## Sub-section A \n This is some text", "file.Rmd")
render("file.Rmd", odt_document())
#> processing file: file.Rmd
#> output file: file.knit.md
#> /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/pandoc +RTS -K512m -RTS file.knit.md --to odt --from markdown+autolink_bare_uris+tex_math_single_backslash --output file.odt --lua-filter /usr/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua
#> 
#> Output created: file.odt

library(textreadr)
read_odt("file.odt")
#> [1] "This is some text"
file.remove(c("file.Rmd", "file.odt"))
#> [1] TRUE TRUE

Created on 2023-06-10 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant