Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Add handling of page breaks #13

Open
ekothe opened this issue Dec 3, 2018 · 3 comments
Open

Add handling of page breaks #13

ekothe opened this issue Dec 3, 2018 · 3 comments
Labels
compatibility Addressing in this issue will require coordination and maybe changes in other packages enhancement New feature or request

Comments

@ekothe
Copy link

ekothe commented Dec 3, 2018

redoc does not currently render page breaks when converting to word such that the \newpage latex command is ignored when creating the rdocx output.

It would be helpful to implement a filter as per (https://stackoverflow.com/a/49415018/9449563) to add page breaks created using \newpage to the .docx output (and ideally to convert page breaks added in word back to \newpage

@noamross
Copy link
Owner

noamross commented Dec 4, 2018

New pages are right now not supported in markdown or in pandoc's conversion format, but adding richer features such as page breaks is a parallel project. Right now such features live in https://github.com/davidgohel/worded. We're coordinating closely so that redoc will eventually handle all the features in that format.

The most likely will be implemented by making such features R code with something like:

This text will be followed by a break page. `doc_pagebreak()`

@noamross noamross added compatibility Addressing in this issue will require coordination and maybe changes in other packages enhancement New feature or request labels Dec 4, 2018
@tarleb
Copy link

tarleb commented Dec 4, 2018

This might be helpful when converting to docx, but the reverse direction would be a problem.

@ekothe
Copy link
Author

ekothe commented Dec 4, 2018

Ideally the same underlying markdown could be built as PDF (e.g. using papaja) or word (using redoc) by changing the output format in the YAML. It looks like @tarleb's option would allow that but @noamross's doc_pagebreak() probably would not. However, I can understand that coordinating with worded might constrain implementation.

(FWIW I've tested redoc on a papaja paper doing just this and the page breaks and styles are really the only major issues).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compatibility Addressing in this issue will require coordination and maybe changes in other packages enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants