Different styles in same paragraph

I have a style for a type of speech (an italic I call ‘minding’ style) and text body style and want to achieve this:
John replied, Ok we’ll do that.
The speech in the example should look like italic. Otherwise I will have to put the different styles on separate lines which is odd. I am trying to avoid character styles but not sure if I should.
Advice appreciated.

A paragraph style applies to all text in a paragraph. A character style applies to part or parts of a paragraph: single characters or words, or even complete sentences. They are exactly the thing that you need for your purpose.

Add-on

I cannot agree more. When you start seriously working with styles, remember that you mean business. Remember that shortcuts make long delays, so it’s really better to do all the style defining in the style definition dialog box. You can, of course, start with a blank document, try things with direct formatting to your heart’s content and when you are satisfied, modify the styles that you need accordingly, then delete all content and save as a template, or start your document in the again blank document.

1 Like

Yes, thanks. But if I restyle ‘John replied’ using style-New Style From Selection the whole para changes to that style. I need a Style to select in the Style list. How do I do that? Thanks.

If you use the button while paragraph styles are selected in the side style pane, you’ll effectively change the current paragraph styles. You must first display the character styles by clicking on the seconf icon from left in the small sidepane toolbar.

Better: create your own character style with name Minding. The only attribute to set is italic in Font tab. You have an equivalent built-in style named Emphasis, but I encourage you to create your own because “Emphasis” is not what you mean.

1 Like

Sorry, but that doesn’t seem to work in 7.4.1.2. Selecting New style from selection always gives me a new paragraph style.

In addition to @anon87010807 ,

Professional text composition with Writer

You must select first the Character Styles button.
imagen

Version: 7.4.1.2 (x86) / LibreOffice Community
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: es-MX (es_MX); UI: es-ES
Calc: threaded

That’s what I did and it didn’t work. EDIT Didn’t read that properly, my bad.

Corruption of user profile? Just tested with version 7.3.3.1 on Linux, and it works.

I doubt it, as I recently reset the user profile for 7.4 and I don’t use Libre very often, so it’s hard to believe that it would have become corrupted already. I tested it in 7.2.5.2 minutes ago, and there the same thing happens. It does work only when you use the styles actions button on the far right of the Styles list. I’d say that having two commands with the same name, one in the Styles menu and one on the Styles list, but with totally different workings, is not exactly transparent or “intuitive”, whatever that is.

EDIT Filed enhancement request, see https://bugs.documentfoundation.org/show_bug.cgi?id=151563

1 Like

So well: it turns out to work exactly as @ajlittoz wrote initially (using the button on the Styles sidebar). The different behavior of the command in the Styles menu is a different thing :wink:

Lol, in all the years that I have worked with OpenOffice and LibreOffice, I never noticed that extra set of commands at the far right of the styles list. I merely assumed that the command in the menu would do the same thing. I’ll file an enhancement request for the inconsistency.

Character styles are designed to do what you are trying to do.

Open the Sidebar by going to View>Sidebar. At the right of the Sidebar, click on the icon with the capital A and the paintbrush. This will open the Styles deck.

At the top of the Styles deck, click on the second icon from the left (the one with the capital A and the paintbrush). This opens the Character Styles area.

Right click on No Character Style and select New…. This will open a dialog.

In the Organizer tab, Name this style _minding. The underscore will place this style near the top of the list of Character Styles.

Go to the Font tab. Under Style, select Italic. Click OK.

The new _minding character style will now be available. If you delete all the text in the editing area of the document, you can save the file as a template.

When you open a new file, use this template – which you can set as your default template if you like – and the _minding character style will be available without having to be recreated.

Type your sentence using whatever paragraph style you prefer. Then, select the words you want to have the _minding character style. Double click on _minding in the Sidebar and you will have what you want.

I recommend keeping the Sidebar open and becoming accustomed to using it since it is so powerful for many purposes.

However, you can set up a keyboard shortcut for your _minding character style. Go to Tools>Customize…. In the Keyboard tab, select Styles>Character in the Category area. Select _minding in the Function area. In the Shortcut Keys area above, select a shortcut such as Alt + M. Click the Modify button at the right. Alt + M should appear in the Keys area in the lower right. Click OK to close the dialog.

Now, type: John replied, Ok we’ll do that. Select Ok we’ll do that and click Alt + M. Ok we’ll do that should appear in italics.

Alternately, you could type John replied, hit Alt + M, type Ok we’ll do that. Then, hit Alt + 0 (the zero key) to return to No Character Style.

1 Like

I have no View-Sidebar but had it collapsed on the right side. Had to click the T with a triangle (I have no capital A with paintbrush) then tap on ‘No Character Style’ (weird name!) then define a new style. Worked thanks all.