Bug ID: 115553
           Summary: [ENHANCEMENT]  Para/Char Styles in Writer: make
                    possible to toggle font attributes
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: Writer

In traditional typography, a way to highlight a portion of text is to typeset
it with the "complement" of an attribute. E.g. if main text is roman, this
portion will be italic and vice versa.

What is targeted here are the settings in the Font tab of style dialog and to a
lesser extent those in Font Effects.

It is presently impossible to follow this rule in Writer in an automatic way
and the attribute must be forced (either set or unset) in the linked style
according to what is set in the parent style. When the attribute is changed in
the parent style, the linked style(s) must be reviewed to negate the setting
wrt the parent.

That is a new possible value "toggle" must be added to the present ones "unset"
(as per the Standard button), "forced on" and "forced off".

The situation is even worse, considering the attribute is frequently non-binary
(e.g. font family Univers counts tens of values for bold, other families may
offer several slant angles for italics), which means "toggling" the attribute
is in fact a choice of another member of the family and not simply ticking a

When using direct formatting, toggling is easy but manual: just (un)press the
"B", "I', "U" or "S" (though many choices are possible in these two latter
cases) buttons in the toolbar.

How could this be accomplished in a style definition?

Things become complicated when you consider not independent paragraphs
(involving only paragraph styles) but highlighted words inside a paragraph.
Here you must prepare two character styles and apply one or the other, knowing
what is in the paragraph style. When the paragraph style is modified, you are
confronted to a huge task because you must drive the cursor across the
paragraph to discover which character styles were applied and see if they must
be swapped.

There we would need to specify that toggling does not apply to the parent
character style but to the "dynamic" paragraph style into which it occurs. To
avoid conflict with inheritance (which is also useful among character styles),
yet another value must be defined:
"toggle para" in addition to "unset", "forced on", "forced off" and "toggle

I have a particular use case where I modified Source Text built-in character
style to use a specific fixed-pitch font. However, its x-height was too large
for my font in Body Text paragraphs. To restore nice merging of highlighted
words in text, I had to force font size to 80%. But when I used Source Text in
footnotes, this was of course too large because the 80% applied to the default
font size, not that of Footnote. Defining as many derived Source Text as
possible contexts is not reasonable. So having a way to "toggle para" (in fact
"force para") for the font size would have done the job.

I see a general usefulness to this feature beyond ease of global styles design.
Document tuning would be greatly enhanced and maintenance made lighter.
Nevertheless there are many details to be discussed to see how it can be
integrated within the present Writer frame.

Steps to Reproduce:

Actual Results:  
This is new.

Expected Results:
New inheritance rules between para/para, char/char and char vs. para styles.

Reproducible: Always

User Profile Reset: No

Additional Info:

User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:58.0) Gecko/20100101

You are receiving this mail because:
You are the assignee for the bug.
Libreoffice-bugs mailing list

Reply via email to