Suggestion: multiple styles

Request For Enhancement, User feedback candidates for wiki
Post Reply
User avatar
CannedMan
Posts: 224
Joined: Wed Aug 04, 2010 12:06 am

Suggestion: multiple styles

Post by CannedMan »

My suggestion is simple (but might turn out to be very complicated to solve technically). In HTML, when desiring multiple classes for a single tag, one only needs to list all the desired classes, and all are applied. A feature such as this would be really powerful in OpenOffice/LibreOffice. Using an example from my own templates, I often-times am in need of both the character style for a language and the character style for creating small-caps; the only way to solve that now (to the best of my knowledge), is to create a new style doing both, though this style can then of course only inherit one style. If I then need to do the same in the footnotes, I would need to create yet another style for this. This quickly becomes incredibly messy. If it were possible to simply multiclick (Ctrl + click or Shift + click) the styles one desires to apply to an area of text (I can see this as useful for both character styles, paragraph styles, list styles and frame styles, but I doubt the usability of this for page styles), not only would it make style usage easier, but it would further demonstrate both how OOo/LO’s style handling is far superior to that of MS Office (in my personal opinion), but also make it follow style handling in other aspects of tech, such as the above-mentioned example from web design.

What say ye? Is it feasible? Is it perhaps already done via some extension? I will really be looking forward to hearing the community’s input on this, and then maybe (with hope) this can then be forwarded to the dev team and implemented in a future update.
Apache OpenOffice 4.1.5 / LibreOffice 7.0.0.3 on Windows 10 (x64)
User avatar
Hagar Delest
Moderator
Posts: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Suggestion: multiple styles

Post by Hagar Delest »

I agree this would be great. Maybe there is already an enhancement request filed for that. I'm quite surprised this has not come up before.
There may be an issue when 2 styles have different settings for the same parameter but it may be a minor issue compared to the gains of such feature.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
CannedMan
Posts: 224
Joined: Wed Aug 04, 2010 12:06 am

Re: Suggestion: multiple styles

Post by CannedMan »

How does one then go about forwarding this from the forum and to the developers? Or do the developers monitor the forum (especially this section)?
Apache OpenOffice 4.1.5 / LibreOffice 7.0.0.3 on Windows 10 (x64)
User avatar
Hagar Delest
Moderator
Posts: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Suggestion: multiple styles

Post by Hagar Delest »

LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Suggestion: multiple styles

Post by Villeroy »

The Open Document standard might be the biggest obstacle. It determines that each element has one distinct style.
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
CannedMan
Posts: 224
Joined: Wed Aug 04, 2010 12:06 am

Re: Suggestion: multiple styles

Post by CannedMan »

Given that, one would assume that there are only two options: Either the Open Document standard needs to change (which would not be done overnight), or they would have to break the standard. It seems the first option is the best, but that sounds like a much bigger hurdle to jump than merely reporting a suggestion.
Apache OpenOffice 4.1.5 / LibreOffice 7.0.0.3 on Windows 10 (x64)
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Suggestion: multiple styles

Post by Villeroy »

I think, this would be a major change in the document standard. The style property of a given object would be an array of names and every ODF capable application should be able to handle these arrays one way or the other. There are dozends of ODF capable applications.
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
CannedMan
Posts: 224
Joined: Wed Aug 04, 2010 12:06 am

Re: Suggestion: multiple styles

Post by CannedMan »

Considering the changes that have been done to the PDF standard, take just the headings (was it just four levels that PDF 1 supported?), it is possible. I think it is desirable, and you guys – and let’s be straight here: you are true giants of veterans here – seem to quite clearly agree with that. Then the question becomes: How?
Apache OpenOffice 4.1.5 / LibreOffice 7.0.0.3 on Windows 10 (x64)
User avatar
Hagar Delest
Moderator
Posts: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Suggestion: multiple styles

Post by Hagar Delest »

There must be a focal point for the OASIS group that handle the ODF (IIRC). Else, reporting this enhancement (if not done yet) may ring a bell at AOO/LO. They certainly have some members participating in the ODF discussions who could inform about such request (would be done in the bug report).

Well, I made a quick search and found the relevant one for LibreOffice: Bug 115311 - UI missing for nesting character styles.
In a comment of a duplicate report, someone said: I understand Emphasize and Quoted as character styles, which should become combined. The open document format allows to do that, it could be realized as multi-selection of character styles or like paragraph styles with a hierarchy.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Suggestion: multiple styles

Post by Villeroy »

Bug #115311 discusses hierarchical character styles and page styles. Hierarchical styles are not the same as a free combination of styles. Let's say you have 4 styles for upper, lower, right, left border and other styles for colours (yes, I'm thinking of Calc's cell styles right now), a free combination of styles would allow for any combination of color and border (apply left border style and red color style) whereas the current style hierarchy requires that you define bordered substyles for each color or coloured substyles for each border.
A free combination of styles would obsolete any style hierarchy.
See also [Dropped] Conditional formatting which preserves borders
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: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Suggestion: multiple styles

Post by Hagar Delest »

But Bug 128553 seems to be the feature requested and it has been marked duplicate of #115311.
Even if there seems to be different opinions (Mike's vs. Regina's), it seems to be the closest.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Suggestion: multiple styles

Post by Villeroy »

I don't think they are duplicates to each other. One is about hierarchical styles that are not hierarchical yet. This seems to be ODF compatible. The other one describes overlaping styles. This one would not be ODF compatible, I'm afraid.
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: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Suggestion: multiple styles

Post by Hagar Delest »

I agree, the 128553 should remain separate. The overlapping is better than the mere nesting of styles. Since direct formatting can do that, maybe there is a trick to do the same with character styles.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
CannedMan
Posts: 224
Joined: Wed Aug 04, 2010 12:06 am

Re: Suggestion: multiple styles

Post by CannedMan »

Is this then something one of you guys will do? Or should I do it? I have never done it before, so any quick notes on how and where would be most helpful.
Apache OpenOffice 4.1.5 / LibreOffice 7.0.0.3 on Windows 10 (x64)
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Suggestion: multiple styles

Post by Villeroy »

https://bugs.documentfoundation.org/sho ... ?id=115311
The feature is implemented like an easter egg with an undocumented Shift+Dbl-click. In the attached file the first sentence is formatted with the hyperlink char style and with "strong emphasis". The second sentence is hyperlink only. The third one is strong emphasis only.
This is how I formatted the first sentence:
1. Select text
2. Double-click first char style
3. Click second style
4. Shift+Double-click the second style.
Attachments
StyleOverlap.odt
(14.59 KiB) Downloaded 343 times
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
CannedMan
Posts: 224
Joined: Wed Aug 04, 2010 12:06 am

Re: Suggestion: multiple styles

Post by CannedMan »

Holy diver! How did you figure that out? I tried it both in your document and in a document of mine, and it to my surprise actually works. ‘By the power of open-source! I have the power!’
Apache OpenOffice 4.1.5 / LibreOffice 7.0.0.3 on Windows 10 (x64)
User avatar
Hagar Delest
Moderator
Posts: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Suggestion: multiple styles

Post by Hagar Delest »

It is explained in the bug report comments.
Only one character style is displayed in the Stylist (the last one it seems). I've tried with 4 layers of styles and it works. A change in one of the style does not necessarily updates the rendering in the text however.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
bestjim
Posts: 1
Joined: Tue Jan 15, 2019 12:47 pm

Re: Suggestion: multiple styles

Post by bestjim »

CannedMan wrote:My suggestion is simple (but might turn out to be very complicated to solve technically). In HTML, when desiring multiple classes for a single tag, one only needs to list all the desired classes, and all are applied. A feature such as this would be really powerful in OpenOffice/LibreOffice. Using an example from my own templates, I often-times am in need of both the character style for a language and the character style for creating small-caps; the only way to solve that now (to the best of my knowledge), is to create a new style doing both, though this style can then of course only inherit one style. If I then need to do the same in the footnotes, I would need to create yet another style for this. This quickly becomes incredibly messy. If it were possible to simply multiclick (Ctrl + click or Shift + click) the styles one desires to apply to an area of text (I can see this as useful for both character styles, paragraph styles, list styles and frame styles, but I doubt the usability of this for page styles), not only would it make style usage easier, but it would further demonstrate both how OOo/LO’s style handling is far superior to that of MS Office (in my personal opinion), but also make it follow style handling in other aspects of tech, such as the above-mentioned example from web design.

What say ye? Is it feasible? Is it perhaps already done via some extension? I will really be looking forward to hearing the community’s input on this, and then maybe (with hope) this can then be forwarded to the dev team and implemented in a future update.

I think it will be a great feature. +1 from me
OpenOffice 4.1.6 Windows 7
Bill
Volunteer
Posts: 8929
Joined: Sat Nov 24, 2007 6:48 am

Re: Suggestion: multiple styles

Post by Bill »

Submitted in 2008--no comments since then:

Issue 91794 - Apply character styles cumulative
AOO 4.1.14 on Ubuntu MATE 22.04
Post Reply