Set Default Page Template?

It’s a new year, so I was spending a bit of time revising my defaults before the semester gets rolling. I hadn’t realized until recently that a lot of outdated crud (wrong instrument ranges, old fonts, etc.) had been carried around in my main default file, so I am trying to streamline and do as much with the Library Manager, by exporting libraries, and/or using doricolib files as possible. Ideally, it would be great if File/New could basically start with all my defaults but I’m not sure how possible it is to get close to that.

One hang up is with Page Templates. There’s no way to save a Page Template as default is there? Importing Page Templates isn’t really desirable as it duplicates a whole bunch of Paragraph Styles, so I’d like to avoid that if possible. I tried exporting a Page Template, then adding the code from pagePairDefinitionSets to my userlibrary.xml, and tried adding the code to DefaultLibraryAdditions, but neither of those seemed to work.

Is there anyway to modify the default Page Templates, and then always have them start from the modified defaults?

1 Like

No, not in any proper sense.

1 Like

How about in an improper sense? :joy: I’m not opposed to some code hackery, I just haven’t been able to figure out where/how to do it.

Dorico apparently thinks my Page Template is crap LOL

I think I’ve at least figured out how to edit these in a way so the Paragraph Styles aren’t duplicated upon import. Still fiddling with them though.

2 Likes

For what it’s worth, I have recently done some work on importing page template sets that should eliminate or at least greatly reduce the likelihood of ending up with duplicate paragraph styles. That improvement will be included in the next major version of the software.

7 Likes

Would knowing the entityIDs of the default page templates allow the user to set the default templates with a doricolib file? I obviously have no idea if the default templates work that way, or if they are simply hardwired in somehow, but if that would possibly work and is something you’re comfortable disclosing, I’d love to try it!

Figured it out for the Full Score set at least:
fullscore

You could take the page templates you have exported from one project and put that .doricolib file into the DefaultLibraryAdditions folder, then use the appropriate pageset.user… ID in the layoutOptions_scores.xml and layoutOptions_parts.xml files that contain your saved layout options.

The line in question looks like this:

<pagePairSetEntityID>string: &quot;pageset.fullscore&quot;</pagePairSetEntityID>

You would need to replace only the pageset.fullscore segment.

3 Likes

Got it, thanks! And I guess the corresponding Part line would be:

For anyone who wants to attempt this, it’s actually really easy. Since we are only modifying doricolib files and not system files, it seems pretty “safe” too. It depends slightly if you want to add your sets as additional options, or simply have your sets be the new defaults. Instructions for having your sets as defaults are below as that’s the easiest, although you can modify these to add additional sets too.

  1. Take a file containing Page Templates that you are satisfied with, then export both the Full Score and Part Template Sets as doricolib files.
  2. Open your Full Score doricolib file, scroll down to pagePairDefinitionSets, and change the entryID from “pageset.user.xxxxxxxxxxxxx” to “pageset.fullscore”
  3. Do the same for the Part doricolib file, but change the entryID to “pageset.part”
  4. In Windows, copy the doricolib files to Users\yournamehere\AppData\Roaming\Steinberg\Dorico 4\DefaultLibraryAdditions

That’s basically it! The catch is that there may now be duplicate Paragraph Styles. You can correct for these manually in the doricolib file by editing the paragraphStyleID and have it match the correct entityID as found in your userlibrary.xml, but honestly I found it easier to just stick to the main Paragraph Styles that ship with Dorico and then modify size, style, as needed in the template. A list of the shipping Paragraph Styles can be found here. All those modifications easily save in the doricolib file and then there’s no additional editing needed, and no duplicate styles.

5 Likes

Brilliant Todd.

Jesper

1 Like

@FredGUnn
I made an addition to my fullscore page template set and tried this process to again make it the default (in the Dorico 5 DefaultLibraryAdditions folder), but unlike my experience doing the same, I am not getting the desired result. Any thoughts where I might be going wrong?

CustomFullScore MasterPages.zip (4.9 KB)

(Had to zip the file to post it here)

You can’t add additional sets, as I think Dorico will only look for pageset.fullscore and pageset.part. You have:

Does it work correctly if you rename that to pageset.fullscore?

Fred,
Thank you: I see where I went wrong.
You advice has enabled me to fix the situation.

1 Like

That’s a shame. It would be nice to have a bunch of sets. We can always use Project Templates, I suppose.

3 Likes

I would highly appreciate to have different page template sets, i.e. my own and the default one at startup of a new document. I guess it’s not possible, right?

I’m quite confident you should be able to do that, using the DefaultLibraryAdditions (but I still need to try it to confirm). Or creating a file template with all those page templates in it.
One other thing that is really useful is to take advantage of the Library Manager. If you know which file has all the templates that you want, it’s easy to import them thanks to the library manager.
[Edit] I’ve just read Todd’s post before and, well, he must be right, so I assume I was too much confident on my first thought! But the Library manager is still working :wink:

1 Like

Yeah, as of 5.0.2 you don’t seem to be able to add additional sets other than pageset.fullscore and pageset.part. Obviously the ability to additional sets would be a cool feature have in the future, but as I don’t really have much need for the factory default sets, and just use my own, I’m ok with the current situation too.

Some sort of template set management could be quite useful too, so the user could by default already have sets for different clients/situations loaded and switch with just a click, rather than importing them.

3 Likes

@dspreadbury
Back here again, I am afraid.
At some point the footers in my Page Templates started appearing in the wrong font and centered instead of being respectively left and right aligned.
Whereas before I had adapted the Header Paragraph style and changed the alignment, I decided to create custom Paragraph Styles for the differently aligned footer fields. I based each on Default Text and then mandated font, size, style, and alignment. But creating a new file did not reflect the styles or (in the case of the RH field) the alignment.
In addition, when I went back to check the Paragraph Styles, I found they were appearing in triplicate, some with different parameters, and with the Delete trash can icon grayed out.
Help? :scream:
paragraphStyle_MT_errors.dorico (495.5 KB)

In case you need these files:
CustomParts MasterPages.zip (10.3 KB)

Fred,

I keep having difficulties with this. I noted that you cautioned against using custom paragraph styles, so I changed the footers in my Page Template Full Score ProjectCopyist and ProjectPublisher to Default Text, but my FullScore page template does not hold the formatting I gave it regarding font size, style (for the Copyist), or alignment (for Publisher). See the template for First Page Without Page Numbers. Any thoughts would be appreciated.

pageTemplateError.dorico (539.4 KB)