-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Custom page header in ODT documents #1505
Comments
Editing the text of the page header in LibreOffice is trivially simple. You just click it and type what you want. So I don't really see the need here. But sure, making it a text box in the Build Tool isn't a big deal either. Adding an option to include/exclude it from first page, as well as alignment, is also straightforward. I'm not sure about the Arabic/Roman bit. The page numbers are generated by LibreOffice, not novelWriter. |
The difficult bit with the custom header is most certainly not actually creating it, nor on which page it needs to start. The difficult bit is things like this: title - author - page number. The point being that the page count should start with 1, on page 2 (or whatever other page), while including the string. I have wrestled with LO over this and lost my sanity. Now, I could start wrestling with page styles and include it that way, but I have not figured out how to get what I want that way as it's also not trivial. |
Ah, I see. The problem here is, as I indicated, that novelWriter doesn't actually do any of that. It's all in the word processor. OpenDocument is an open standard, as implied by the name, so I cannot tailor it for LibreOffice either. It's compatible with a bunch of office apps. If there is a way to tune some of this that is part of the actual standard, then maybe I can add some more features. However, this takes a bit of research. The standard schema is available here. |
You can export a sample document as fodt, and manually edit the XML file and test. It's basically how I built the entire ODT feature of novelWriter from scratch 😄 |
Ok, adding <office:master-styles>
<style:master-page style:name="Standard" style:page-layout-name="PM1">
<style:header>
<text:p text:style-name="Header">Sample Project / Jane Smith / <text:page-number text:select-page="current" text:page-adjust="-1">2</text:page-number></text:p>
</style:header>
<style:header-first>
<text:p text:style-name="Header" />
</style:header-first>
</style:master-page>
</office:master-styles> |
I've considered before to make a proper set of cover page options, which wasn't really possible until the new build tool redesign. Perhaps it's time to add a "Cover Page" tab to the build settings. I could start with adding the points listed here: |
I have my reservations about messing with LO files, because I don't know how LO will respond to fun things like typos or missing elements. It would be great if there's an option to create a front page of the manuscript. It would be even better if you can tweak it in all kinds of ways. F.e.: author info top left or top right? What to include with author info? |
By editing the Open Document files, I meant in order to figure out how to make it do what you want it to do, so I can implement it in novelWriter. I did not mean as a way to create the desired result. The way novelWriter creates ODT and FODT docs is by generating the raw XML according to the document standard. The standard is hard to read and follow, so the easiest way is to experiment. You can do it on a sample document. |
It appears novelwriter is already doing what I asked for. Except for 1) page numbering should start with "1", no matter which page the page numbering actually starts on; and 2) some customization options for this would be nice. I sincerely apologize for not doing my homework. |
novelWriter doesn't do any numbering as I've said. The current scheme is the default, and I only hide it from the first page, as is customary. To change which page is number 1 you have to change what number the counter starts on to -1 or -2, depending on what result you want. I'll try and add some more customisation options. |
PR #1675 adds the following two options to the Manuscript Build Settings dialog on the Output page: I believe this solves the request. |
Submitted manuscripts usually have a front page which lists the author's contact details, word count, and the name of the novel, below which is the author's name.
On the second page, the page count usually is expected to start (by editors, agents, and the like). They usually expect the page header to look a certain way. They are very specific about this and the odds of rejection increase if you do not comply with their specific requirements.
Would it be possible to have the build tool create a custom page heading when exporting to LibreOffice format?
In LibreOffice getting a custom heading involving done, which starts on another page than the first page is usually quite the nightmare to get done involving page styles, messing extensively with headers. Woe thee when you make one mistake. If I could tell the project builder to generate one for me, that would spare me a lot of frustration in LO later on.
The interface could be something like a simple textbox where I enter some text with a checkbox (whether or not it's wanted for inclusion), perhaps a drop down list for alignment (left, right, or middle) and a text box for a page number where the first heading should start appearing.
You could even have multiple (a Roman numeral section and a Arabic numeral section, for example). If you do this, a per item numeric type would be handy.
The text was updated successfully, but these errors were encountered: