Custom list styles in template, a template for master and all sub-documents

On my desk (among others) few following things:

  • the last lesson learned - direct formatting makes template to child document linking broken
  • own commitment to follow the trail of styles usage - for text and document styling automation
  • own commitment to use master and sub-documents based on one single (registered :)) template
  • the aim to have custom list styles in template

One observation was made short time ago:
List style created in template then a link from custom paragraph style to that list style was created. That leads to automatic creation of direct formatting in paragraph where mentioned paragraph style is used.
Won’t it again drive me into problems of broken link template-document?

By the way (maybe it matters too) I plan to have in template only style definitions but none content located on document’s pages. Due to :

  • one single template is going to be used for master and all sub-documents
  • as well as the whole write-up is going to be lengthy if it concerns its final form
    it doesn’t seem to be reasonable to look for common document content which could be provided template level already.

Wrong!
When you associate a paragraph style with a list style, this is style configuration. An item upon which said paragraph style is applied becomes automatically a list item. This is not direct formatting. It is styling.

But, if you apply any list style with toolbar buttons on the paragraph, you create direct formatting overriding what is configured in the style.

Paragraph styles associated with a list are “self-sufficient”, don’t manually add anything else. Otherwise you revert into the nightmare of direct formatting and this case is a very difficult one to detct.

A master document is created with File>New>Master Document which does not give you the possibility to base the master on some existing templates.

Don’t worry! Install TemplateChanger extension. As soon as you have created the master, use the extension to assign the template to the master. Save and reopen the master for the styles to take effect.

Trigger/Source of my plan/proceeding: Writer Guide 7.5 > chapter 16 > Figure 1, I see a link master to template that figure. One common template for all subs and the master. I also find “Starting with master document template” same source.

That track was followed in this case: Custom paragraph style dialog > Outline and Lists > Apply List Style

Subsequently that one custom paragraph style applied to one paragraph on template’s page*. Let that paragraph be the current one for a minute. Go to Style Inspector. Latter one says there is character direct formatting as for current paragraph. If to remove list style from custom paragraph style the Style Inspector doesn’t more report it.

*) Myself committed to single-page single-paragraph template however I didn’t learn to create new custom styles/modify existing ones in other ways than WYSIWYG. Hence there are time periods that my templates do have content visible for reader. But template in its final form isn’t going to do that.

The figure you refer to is factually exact but there is no “official” UI to set the template for a master. This is why I suggest to install “Template Changer” extension which will add the UI for it.

The Style Inspector is quite experimental. It erroneously reports any list style application as direct formatting. See for example what happens when you enable Tools>Heading Numbering which definitely is not direct formatting.

Thanks for hint and… Good to know. I believe you it to be as you state without conducting additional experiments.

Quite experimental, while in troubleshooting well fundamental :slight_smile:

@ajlittoz
Is there a way to check whole template (single yet blank page and paragraph template) for presence of any direct formatting still be there but to have accomplished it in a productive way?
Question’s reason - right now have got template and one derivative document. Fair portion of hard work was put in order to remove direct formatting from template before creating mentioned document. Document on its opening still doesn’t detect the changes made newly in template.
Document properties communicate document to be still linked to template.
Alternative question Other means exist by which the link can become broken?

There is one blank (almost blank, one blank paragraph seems to be the minimum for each page) yet single page in template - that hasn’t lot of potential for embedding direct formatting unless any editor tool amalgamations author to not be aware of.

EDIT
Bit more history - no idea if it matters here. Content of two first pages was edited in template but in the end author doesn’t want to have it in template. Hence following the creation of derivative document pages content was removed from template.

If your page is blank, the only direct formatting(s) can be those on paragraph and perhaps character. These can be cleared with Ctrl+M with the exception of parameters related to `Text Flow’ (e.g. manually added breaks). Application of list styles won’t be cleared (because technically the notion of list style direct formatting is not clear). Page direct formatting won’t be cleared.

Except for list style, you can rely on the Style Inspector.

But checking DF with the style inspector is rather tedious because you must move the cursor over all text positions to get information about character styles.

A simple check can be made by selecting the visible portion of the document (you can select all but you won’t see what happens outside the screen) and pressing Ctrl+M. If somrthing changes, then you have DF. Press Ctrl+Z to restore the state of your text and investigate.

Template has one sigle paragraph. Should DF be paragraph or character level me expects to see it using Style Inspector. Unfortunately this is not the case, no DF according to SI yet it is not possible to make other paragraph active for a check as there are no other paragraphs this template.

I really try to refrain from doing DF. Page style is custom page style as set in paragraph style text flow of this page first and only paragraph. Got confirmation for this to be true from Style Inspector. I don’t dare to use Page Styles side bar to set page style to Default Page Style.
Display Hidden Text and Hidden Paragraph are enabled in Writer Options. I don’t find page breaks in presentation of page view. Toggle Formatting Marks is ON - I see only one single end of paragraph symbol and Text Boundaries (as those in menu View).

Character style “No Character Style”

Then you have no DF in your template.

However bound document doesn’t get notified (on its opening) about modifications made in template.

Attach your “bound” document and the template so that I can have a look.

My .odt file is problematic for forum software, this message editor. Attaching it to message never completes “Processing uploades…”. Doesn’t matter if this threat, or PM.

No problems to attach .ott. No idea on my side what’s wrong.

My .odt file unfortunately doen’t upload here. Upload process never completes. It failed several hours ago yet it fails right now. I don’t know what may be the reason. Size of file is about 13kB.

If to abstract from DF be breaking the link template to document what are other possible reasons for that connection to not work?

Removing DF never breaks links. There is probably something in your configuration. See my proposal in your AskLO private mail.

In my mind is if DF is present it is the first suspect for broken link template-document as it was here.

@mikekaganski
Could you have a look at these two files or hand them over to an available developer?
tmplt01.ott (10.1 KB)
writeup-A.odt (10.1 KB)

After a change to the template, the style update dialog does not show up. However, if I play my favourite trick:

  1. save the .odt as .fodt
  2. open the .fodt with a text editor and change template time stamp in metadata (here I went one month back); save
  3. open the patched .fodt with LO

then the style update dialog shows up.

I tried to check metadata in the .ott and it looks like its timestamp is not changed (but not 100% sure about it). Could there be some circumstances where this timestamp is not updated?

By “timestamp” I mean what is recorded in metadata, not OS last changed date.

I had this kind of problem a couple of years ago and solved it with the trick above (not very friendly). However the issue didn’t occur again after some time.

My LO release is 7.6.4.1 (quite up-to-date). I don’t think OS is relevant. I am Fedora 39 and OP Win 10 or 11.

One of former discussions provides me with further hint - template relative path stored to .odt must land to template real path. This can be the reason in my case here - mismatching template path in my .odt.

No. To avoid this kind of problem, I used TemplateChanger to make sure template link pointed on the correct file. I even experimented with a manually changed path in metadata to discard any relative path misinterpretation. I could get the style update dialog only after I changed the timestamp reference for the template in the .odt.