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

opendocument writer prevents complicated templates #2520

Closed
ghost opened this issue Nov 13, 2015 · 1 comment
Closed

opendocument writer prevents complicated templates #2520

ghost opened this issue Nov 13, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 13, 2015

(The title of this issue isn't great, sorry.)

The basic problem

The office:automatic-styles tag can only be used once (that is, subsequent uses override rather than append) in LibreOffice, and because the opendocument writer already uses it, a template can't separately set it.

Suggested solution

My suggestion would be to change the opendocument default template to change to look like <office:automatic-styles>$automatic-styles$</office:automatic-styles> and the writer to write styles between the tags instead of actually writing the tags. This would allow templates which set automatic styles.

Further explanation and thoughts for the future

Setting automatic styles might sound a bit crazy, but it is necessary to trigger a different page style for the title page, etc. This might also be possible by directly editing the reference odt's xml, that is yet another layer of complication.

The ideal situation for the future, in my opinion, would be a template.odt incorporating what is currently split between the reference.odt and the opendocument template and making use of built in features such as author field using the author from the metadata, etc. Such a template would be easier to customise for end users, but would probably require a massive rewrite of the writer and would break existing workflows.

@jgm jgm closed this as completed in 420c86b Nov 15, 2015
@ghost
Copy link
Author

ghost commented Nov 15, 2015

Thanks - I can get rid of some post processing sed :)

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

0 participants