List: Preserve the first word format

Hi :slight_smile:

There is a way to have, automatically, the first word of each element of a list with the same format of the first word of the previous element (i.e. bold format)? An example:

  • GSD-I (glucose-6-phosphatase)
  • GSD-II (…)
  • GSD-III (…)

Thanks in advance :slight_smile:

1 Like

Hi,
I don’t know how to transfer “first word of paragraph format” to the following format.


My workaround:
Try out FIND&REPLACE (activate Regular Expressions)
FIND or FIND ALL or CURRENT SELECTION ONLY

^[A-Za-z0-9-]+

In a paragraph it finds leading…

  • words (without tailing space characters) including digits (e.g. 7UP)

  • single words of a paragraph

  • words connected with hyphens and/or alphabetic characters/digits

Be advised that a leading space character doesn’t cause any selection in the paragraph.


What to do next:
When found (FIND ALL) apply the character style Strong Emphasis. (Hard formatting is possible as well.)

Cheers

1 Like

Writer formatting does not proceed through some “enter & mimick” process. As an author, you mark up a text to tell significance or “morphological elements”, i.e. paragraphs, words, pages, frames, … The markup is implemented in Writer as styles.

The first level of styling is paragraph styles where you classify paragraphs into headings, ordinary text, notes, comments, list items, … Then you configure the styles to give them distinctive attributes as font face, size, weight, indents, spacing above and below, alignment, …

Of course, some words (or even sentences) in a paragraph do not fit in the general significance and need emphasis or difference of formatting. You do this be applying a character style which will confer a different significance to the words. Again, you customise the style so that readers have visual cues about the change in significance (e.g. italics for emphasis or foreign words, bold for strong emphasis or first appearance of a word needing special attention, …).

In your case, I’d use one specific paragraph style for the list item (perhaps one with name Reactive). Within this list item, a character style (like Standardised designation) would be applied onto the abbreviation and you’d make this character style bold.

With such methodic styling, you can afterwards tune the appearance of your paper without caring for what you’ve written. Changing Standardised designation would impact only the designated abbreviations without interfering with strong emphasis elsewhere.

If you direct format your text with Ctrl+B, this is absolutely impossible and you must painfully review you document to manually adjust everything.

This doesn’t directly answer your question but give you clues about Writer good practice and “automation” (where this word can’t be understood in the sense you asked for).

If you haven’t done so yet, I recommend you read the Writer Guide, notably the chapters dedicated to styles. This is not a tutorial; it will not give you ready-to-be-used solutions. You’ll have to practice a bit before designing your best personal solution. Then, store your style collection in a template and base all your articles on this template.

1 Like

The feature hoped-for by the questioner surely is by far too specialized. However, a harmonized way of emphasizing specific parts of specific paragraphs (paragraph sequences) may sometimes be useful.
For a possible concept to create a solution by user code see attachment.
disask79614emphasizeHarmonizeFirstWordOfParagraphbyStyle.odt (25.6 KB)

1 Like

Basically, a solution could be implemented tdf#70180, allowing 1-line-heigh drop caps.

2 Likes

…as long as the paragraph do have only one line, because Lines option begin with 2.

By the way, I don’t see applied the character style selected for the drop caps.
LibreOffice 7.2.3.2.