Ask Your Question

Why is "inherit from" style grayed out [closed]

asked 2018-01-22 20:21:21 +0100

catbill gravatar image

updated 2020-07-29 00:27:15 +0100

Alex Kemp gravatar image

When editing a style, "inherit from" is sometimes grayed out on the Organizer page. Why is that? If I want the style to inherit another style, is there a way to do that?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-07-29 00:27:26.670088


There are many classes of styles in a 'Writer' document.
A paragraph style e.g. can only inherit from a paragraph style.
For page styles inheritatage is not implemented. The respective field in the organizer is disabled.
Please give mor details concerning your questions.

Lupp gravatar imageLupp ( 2018-01-22 20:36:58 +0100 )edit

Hi Lupp,

From what you are saying, it sounds like the 6 styles (with the exception of pages) can only inherit from the same style. That certainly makes sense.

I created a list style called "Bulleted List in Table." I want it to inherit from another list style, but the option to do so is grayed out.

This happens from time to time with other styles so I mainly want to understand the general rules that prevent a style from inheriting from another style.

Thanks for your help.

catbill gravatar imagecatbill ( 2018-01-24 05:04:54 +0100 )edit

Do LO developers follow this forum? If so, here goes.

I really, really want to inherit page styles. I work on four-abreast pages on my 24" monitor. I get this by taking a 6x9 trade paperback size but cutting off the left and right margins while I write. I use about ten different page styles. With inheritance, I could just change 'default page' from 4.2 by 9, no side margins to 6x9, with margins. As is I have to modify ten page styles individually.

BTW, that's a great answer, ajlittoz.

MartinRinehart gravatar imageMartinRinehart ( 2018-08-15 12:37:39 +0100 )edit

Feature requests are to post here in the same way as bug reports using "enhancement" for the Severity.

Lupp gravatar imageLupp ( 2018-08-15 19:31:50 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2018-01-24 09:11:34 +0100

ajlittoz gravatar image

updated 2018-01-24 23:34:58 +0100

From my experience, paragraph, character and frame styles can inherit from any one of the same category. Page, list and table styles can't inherit.

Inheritance is statically based on "declarations" within the same category.

  • Paragraph styles ultimately are all derived from Default style. Use hierarchical view in the list side pane to see the other intermediate parents as defined in out-of-the box configuration. You can customise it to fit your needs.

    This makes sense and is the most useful.

  • Character styles have the same inheritance rule as paragraph styles but by default have no hierarchy (they have no common ancestors). Among built-in styles, some are "special":

    • Default Style is not a real style (and you can't modify it! it is protected): it is used to reset all attributes to their state in the current paragraph style

    • Internet Link and Visited Internet Link behave like ordinary styles but are not exclusive to another character style: they are applied over the current style and set (or rather not-reset) attributes override those of the other character style. They are used to confer the link property to the underlying text.

    • There may be other special styles but I have not discovered them, not having the need to study them.

    In my opinion, these inheritance rules are easy to implement from a developer's point of view but are not the most appropriate for the user. A user defines a character style for two usages.

    The first one I call absolute sets unconditionally attributes (e.g. a monospaced font like in Source Text because the style reflects a specific semantic intent).

    The second one I call relative or contextual can't be defined in LibreO. In this usage, I'd like to modify an attribute defined in the paragraph style, which is a different category. For example, consider how a word is highlighted in traditional typography: you type set in italics in a roman paragraph and vice versa. Presently, you must define two styles and choose them explicitly knowing what is set in the paragraph style. Toggling the attribute in the paragraph style compells you to chase the character styles and change them for the other one.

Talking about toggling, I do regret that this possibility is missing from currently implemented paragraph and character inheritance rules. An attribute has only two values: reset (i.e. does not change value from "parent" style) and forcing. Toggle would definitely be useful.

Inheritance comes very handy when you define a hierarchy of styles, such as Heading x. They all inherit from Heading but you can customise this inheritance by having "H1" as "H2" parent, "H2" as "H3" parent, etc. With headings, it is common to define font sizes relative to the parent with %-unit (e.g. Heading 1 is set to 24pt, Heading 2 to 80%, converted to 19.2pt). The magic of it is that when I change Heading 1 to 18pt, Heading 2 automatically changes to 14.4pt. This makes relative font sizes not ... (more)

edit flag offensive delete link more


Wow. Thank you for taking the time to write all of this information. It will be useful for when I run into inheritance questions again.

catbill gravatar imagecatbill ( 2018-01-24 19:50:28 +0100 )edit

You're welcome

ajlittoz gravatar imageajlittoz ( 2018-01-24 20:47:10 +0100 )edit

answered 2019-09-15 13:31:09 +0100

Like @MartinRinehart, I really would like to use inheritance for page styles. I used it a lot for text styles, but I also absolutely need it for page styles. For instance, the default page format here is A4. I often work on booklets that are in A5 format. So I duplicate the default page style into one that I change to A5 with a specific left/right layout and margins. But every time I need to create a new page style, for instance one for a page feed that starts automatically on the next right-side page, I have to redefine all the layout and margins manually because I can't inherit these settings from my "Booklet" page style. This also means that whenever I do a slight change on the margins, I have to replicate the same change to all dependent page styles because there is no notion of dependence or inheritance for page styles. Some of these page styles have really one different setting compared to the original "Booklet" style. I store these styles in templates, but it does not solve this specific issue, some booklets have unique layouts.

I don't know if page style inheritance will ever be implemented (it would be great), but at the minimum, the GUI should tell the user that inheritance does not work for page styles, for instance via a tooltip on this grayed out option, instead of forcing the user to spend an hour trying to figure out what they are doing wrong (nothing), trying again in different ways, and finally looking up for explanations and finding this thread after many others that are not relevant. ;( Right now, the user is completely let down, it is a double frustration, that the feature does not work, and that nothing says why.

edit flag offensive delete link more


There is an open bug (enhancement request) concerning page style inheritance for about 8 years now:
Comment #14 there by Regina Henschel is shedding additional light on the issue by hinting to a specific flaw (if not there are other hidden problems impacting on the topic / Also see explanations by @ajlittoz above.) in the definition of the ODF file format.

Lupp gravatar imageLupp ( 2019-09-15 14:04:24 +0100 )edit

I utterly miss page style inheritance too, for the exact reasons you mention.

ajlittoz gravatar imageajlittoz ( 2019-09-15 15:08:37 +0100 )edit

Just for triggering a notification:

Lupp gravatar imageLupp ( 2019-09-15 15:56:26 +0100 )edit

By The Way:
Who is user @regina ?
Why is a link to Regina (first letter in upper case!) changed to @regina. The first one is a valuable contributor, the second one is an all-zero-user.

Lupp gravatar imageLupp ( 2019-09-15 16:01:22 +0100 )edit

Question Tools

1 follower


Asked: 2018-01-22 20:21:21 +0100

Seen: 769 times

Last updated: Sep 15 '19