Create a document template?

Bi
Biff
Posts: 365
Joined: Mon Jan 16, 2017 7:59 am
Platform: Windows

Wed Jan 25, 2017 9:31 am Post

How could I create a template (with e.g. special formattings) I can use for documents / folders (not projects) like one can do with Word? So instead of creating a new default document / folder shown in the editor when pressing STRG+N I want to open such a template being opened in the editor.
Windows 10, 64bit

User avatar
AmberV
Posts: 24641
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Wed Jan 25, 2017 1:52 pm Post

Yes, Scrivener supports a form of document template (I wouldn’t compare it to anything near so complicated as a Word DOT file, but the principle is similar). You’ll find complete documentation in §7.5, Document Templates, starting on pg. 68.

In very basic terms:

  1. Create a new folder in the binder (anywhere is fine).
  2. Select it and use the Project/Set Selection as Templates Folder menu command.
  3. Drag a prototype document into this folder.
  4. Check the Project/New From Template/ sub-menu (not the first template will get a dedicated shortcut).
Note that based upon how Scrivener cleans up empty files or never creates files where it doesn’t need to, if you wish to establish default formatting you’ll need a little sample text in the prototype file.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Bi
Biff
Posts: 365
Joined: Mon Jan 16, 2017 7:59 am
Platform: Windows

Wed Jan 25, 2017 6:22 pm Post

Many thanks.

After having done step 4 suddenly Scrivener did not work again any more ("No response" all the time), I cannot access the template folder to delete it, may that is the cause. Is there another way to remove that folder?

Note that based upon how Scrivener cleans up empty files or never creates files where it doesn’t need to, if you wish to establish default formatting you’ll need a little sample text in the prototype file.

Sorry, Scrivener cleans empty files or never creates files where...? What does that mean? The formatting - a listing, enumeration - is gone when I open the document copied to the template folder, may be there is a connection with a sample text? But, a sample text where no text should be?

Many thanks again
Windows 10, 64bit

User avatar
AmberV
Posts: 24641
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Wed Jan 25, 2017 8:56 pm Post

If it is related to that feature it’s not a universal problem, I had no difficulty following those steps over here. Maybe something to do with one of the files placed in the folder? At any rate to disable the feature you select the template folder in the binder and use the Project/Clear Templates Folder menu command.

Sorry, Scrivener cleans empty files or never creates files where…? What does that mean? The formatting - a listing, enumeration - is gone when I open the document copied to the template folder, may be there is a connection with a sample text?

I haven’t tried just a list, all by itself with no text typed into at least one line might qualify as “empty formatting”.

By cleaning I mean on the disk—if you leave an empty file in the binder the software automatically removes any RTF files that may have been used to store the data you typed into that file in the binder. Formatting all by itself doesn’t count as content.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Bi
Biff
Posts: 365
Joined: Mon Jan 16, 2017 7:59 am
Platform: Windows

Wed Jan 25, 2017 9:18 pm Post

Suddenly Scrivener works again without removing the template folder, any idea why, sometimes it runs well, sometimes there is no response.

I haven’t tried just a list, all by itself with no text typed into at least one line might qualify as “empty formatting”.

Hmmm, somehow sounds like a strange behavior for a template. Well, alright, so I will just add some text.

By cleaning I mean on the disk—if you leave an empty file in the binder the software automatically removes any RTF files that may have been used to store the data you typed into that file in the binder. Formatting all by itself doesn’t count as content.

OK, so one does not notice such a removing at all, I guess.

Many thanks
Windows 10, 64bit

User avatar
AmberV
Posts: 24641
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Wed Jan 25, 2017 11:00 pm Post

It’s not so much the intended behaviour for a template, it’s just that a file with nothing but say “bold” formatting inside and no text is not worth keeping 99.99999% of the time. It would just be disk clutter to keep files like that, so they get cleaned up behind the scenes.

Thus, if you want special formatting in a template, you just need a little text to “hold” the formatting. Hope that makes more sense.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Bi
Biff
Posts: 365
Joined: Mon Jan 16, 2017 7:59 am
Platform: Windows

Wed Jan 25, 2017 11:25 pm Post

Hmmm, well, well, yes, yes, of course, thank you, I do not have any idea of programming and such...so just one activity more to delete the text (a single character appears to be enough) after creating a new item from a template...obviously just exclude the template folder / its content from being cleaned is not possible. I understand.

Many thanks
Windows 10, 64bit

User avatar
MSO
Posts: 28
Joined: Thu Jun 16, 2016 7:27 am
Platform: Windows
Contact:

Sun Jan 29, 2017 1:28 pm Post

Biff:

Search internet and/or Google+ for "Scrivener Templates" and you can see some in action.

Good Luck
Image
“Do not despair: one of the thieves was saved. Do not presume: one of the thieves was damned.”
—— Falsely attributed to St. Augustine by Samuel Beckett
http://MichaelOBryan.com

Bi
Biff
Posts: 365
Joined: Mon Jan 16, 2017 7:59 am
Platform: Windows

Sun Jan 29, 2017 1:37 pm Post

Many thanks for that advice. At the moment I am still wondering what a template could help in this case.

Thanks again
Windows 10, 64bit