[Solved] Creating new styles

Discuss the word processor
Post Reply
philwynk
Posts: 9
Joined: Fri Nov 15, 2013 8:37 pm

[Solved] Creating new styles

Post by philwynk »

I'm having a little trouble creating custom styles. Perhaps somebody here can point out where I'm going wrong.

I've written a couple of books using MS Word. Now I find myself using Open Office Writer.

My general approach is to create styles particular to the book I'm writing, and to use only those styles while composing the book. I prepend a few letters to the beginning of the style name so I can distinguish them from styles I used for other books. For example, my current working title is "The Bible From 40,000 Feet." Styles I want to create will have the prefix "B4F."

So, I create a new document for chapter 1, I create a paragraph style called "B4Fdefault" with the font, margins, and spacing I want, and then I save the document.

Then I create a new document for chapter 2 (I'll unite them all later), and I go looking for my "B4Fdefault" style. It isn't there.

In the new document I found "All styles" and "Custom styles" under the Styles and formatting box, but when I select those I still don't see my B4F style. In the chapter 1 document I'm looking around for a "save styles" function but not finding it. Apparently there's something I have to do to register that the new, custom style exists in the world of all styles, but I haven't found it yet.

Anybody? I'm sure this is simple, beginner stuff, but I could use a quick pointer. Thanks in advance.
Last edited by philwynk on Sat Feb 20, 2021 8:28 pm, edited 2 times in total.
OOo 4.1.3
Windows 10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Creating new styles

Post by Villeroy »

1) Call menu:File>Templates>Save... and give a name to your book template.
2) Call menu:File>New>Templates... to create a new book from template. [Ctrl+Shift+N]
3) Call menu:File>Templates>Organize to organize templates created in step 1). One of the options is to create one default template which is used for ever new Writer document (or Calc or Impress or Draw respectively) when you call menu:File>New [Ctrl+N]
4) menu:File>Templates>Edit lets you edit an existing template.

There is no "Normal.dot" as in Word. Things are simpler here. Unless you work with templates, any brand new document comes with factory settings.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Creating new styles

Post by Hagar Delest »

In addition, there is an extension (template changer) that is very useful if you already have several files that need to be linked to a template. There are several steps to link the document but the code can be easily tweaked with the hard coding of the path so that it gets the things done in one single click.

Personally, I add a period to the name of my custom styles so that they appear at the top of the list like ".B4F_Default" for example.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the *EDIT button if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Creating new styles

Post by RoryOF »

If one uses the Stylist (/Format /Styles and Formatting, or F11 key) the bottom bar has a dropdown where one can select Applied Styles, which shows only the Styles actually in use. One may have to switch that selector to Custom Styles or All Styles for first selection of a style in a document, but thereafter, in that document, Applied Styles will show it.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
philwynk
Posts: 9
Joined: Fri Nov 15, 2013 8:37 pm

Re: Solved: Creating new styles

Post by philwynk »

This has all been helpful, folks, and you've pointed me in the right direction. I will proceed to become a Templates Jedi or equivalent. Thanks.
OOo 4.1.3
Windows 10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Creating new styles

Post by Villeroy »

One more thing. Open Document Text templates are just normal documents with name suffix .ott. You can save them anywhere you want. When you open them you get a new document ("Untitled 1").
However, the templates that are stored and accessible through the template organizer have a little extra functionality. Let's assume you created "Catcher_In_The_Rye.odt" from template "My Book". Now you have applied some changes to the template styles and open "Catcher_In_The_Rye.odt" another time. The office suite will prompt you if the changes in the template should be applied to the document which is derived from this template. For this functionality getting to work, you need 2 things:
1) The document needs to be derived from a template that is visible in the organizer.
2) You have to provide name and initials in the options dialog (Tools>Options>User Data) in order to distinguish you as an editor from any co-editors. The user data are saved for local purposes only. They are not sent anywhere.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] Creating new styles

Post by Hagar Delest »

Well, I may be wrong but with LO, the portable version on my Win 10 machine, I've put my template in a special folder in my documents (thus, not in the profile) and all documents derived from it prompt me to update when I edit that template. It is not declared in the template organizer.
When you look at the meta information of the documents, the full path is stored. So no wonder it can check the template even if not declared in the organizer.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Creating new styles

Post by Villeroy »

I opened an arbitrary template file from my documents folder with LibreOffice 7 and saved it. File name, path,, date, time, author name are displayed but not the template's pathname. However, that template resides in a folder which is not registered anywhere in the office suite.
File properties of text from unregistered template
File properties of text from unregistered template
When I do the same with a template that is stored in one of the template paths, the document properties dialog shows the name of the template file ("Protocol" without .ott) but not the path.

As far as I know (I may be wrong), the template organizer merges all templates that are found in the template paths that are declared in the path settings (Tools>Options>Paths)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] Creating new styles

Post by Hagar Delest »

Very strange. I may be on a corner case.
I opened my standard template and saved it under another name, still as a template (.ott) in my documents.
I created a document from it and saved it, then reopened it. In its properties, the Title of the initial template appears. However in the meta.xml file, the link point to the new one just created. To make sure, I changed that new template. Upon reopening the document created from it, it correctly asks to update.
Then, I edited again the new template, to change its Title in the Description dialog. And THEN, new documents created from it have just no template attached! Be it in the properties or in the meta.xml file.
The initial document still displays in its properties the initial title and in the meta.xml the new path.
To make sure, I edited again the new template to restore the initial Title. Then documents created from it show the template title in their properties, with the link to the new template.

So, it seems that as long as the Title of a template is identical to the Title of a template declared in the Organizer, then, it works, wherever the new template is located!
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Creating new styles

Post by Villeroy »

Could be related to the portable version you are using.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] Creating new styles

Post by Hagar Delest »

No, I forgot to say that my trials yesterday were made on my Xubuntu box with the standard installation.
The trigger seems to be the Title of the template. Not sure what happens if there is no description at all.
Strange that the template has to be declared in the Organizer. If it can make the check in my special case, then what prevents the application to do that anytime a template is set in the document, whatever its location.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Post Reply