[Workaround] Set Heading style for first word of a line

Discuss the word processor
Post Reply
finnmap
Posts: 4
Joined: Thu Aug 17, 2023 5:31 pm

[Workaround] Set Heading style for first word of a line

Post by finnmap »

For a heading, I want to select the first word of the line, not the whole line. Can this be done?

 Edit: Changed subject, was Headings - selecting part of a line 
Make your post understandable by others 
-- MrProgrammer, forum moderator 
Last edited by MrProgrammer on Sun Aug 27, 2023 4:37 pm, edited 2 times in total.
Reason: Workaround provided -- MrProgrammer, forum moderator
OpenOffice 4.1.14 on Win 10
FJCC
Moderator
Posts: 9284
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Headings - selecting part of a line

Post by FJCC »

With the mouse, double clicking on a word selects the entire word. With the keyboard, pressing CTRL + Shift + Right Arrow selects from the current position to the beginning of the next word.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
finnmap
Posts: 4
Joined: Thu Aug 17, 2023 5:31 pm

Re: Headings - selecting part of a line

Post by finnmap »

Selecting the word, or number, is not the problem. When I select the first word, then select 'heading', it applies the heading to the whole line. I would like the heading just on the first word or character.
Example:
9 I, John, your brother and companion in the suffering and kingdom and patient endurance that are ours in Jesus, was on the island of Patmos because of the word of God and the testimony of Jesus.

When I select the '9', then apply a heading, the whole sentence is marked as the 'heading'.
I just want the '9' as the heading.
OpenOffice 4.1.14 on Win 10
JeJe
Volunteer
Posts: 2785
Joined: Wed Mar 09, 2016 2:40 pm

Re: Headings - selecting part of a line

Post by JeJe »

It sounds like you are applying a paragraph style - which sets the format for the whole paragraph - when perhaps a character style does what you want?

https://wiki.openoffice.org/wiki/Docume ... _to_Styles
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
RoryOF
Moderator
Posts: 34619
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Headings - selecting part of a line

Post by RoryOF »

Perhaps a better way to do this would be to use a two column table, with the numbering in the first column (perhaps applied by the numbering methods of OpenOffice) and the verse in the second column. The table spacings and borders can be adjusted as suits the intended style - note that the cell borders can be turned off if required.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
finnmap
Posts: 4
Joined: Thu Aug 17, 2023 5:31 pm

Re: Headings - selecting part of a line

Post by finnmap »

RoryOF - I don't think I want to do columns. Seems a little too much for a simple heading assign. I will have a lot of these to do by the time I finish this document. Thanks for the idea, tho.

JeJe - I tried setting a 'character style' for the first character of the line. Also set a character style for the entire line. But neither one let me assign a heading to the first character. Seemed promising but I couldn't make it work.

I am a new OpenOffice user. My version of Microsoft is very old. I wanted to update it until I saw the prices. Yikes! I am definitely NOT interested in going the subscription route.

Thanks all for the input. I'll keep poking along and see what I can find.
Right now, I just keep the character on it's own line and CR the rest of the verse.
Oh, I tried doing just that (works to set the heading to the one character) but when I delete the CR, the whole line gets the heading applied to it.

THanks again.
OpenOffice 4.1.14 on Win 10
User avatar
LastUnicorn
Posts: 559
Joined: Sat Mar 29, 2008 2:41 am
Location: Scotland

Re: Headings - selecting part of a line

Post by LastUnicorn »

finnmap wrote: Fri Aug 18, 2023 6:21 pm I am a new OpenOffice user. My version of Microsoft is very old. I wanted to update it until I saw the prices. Yikes! I am definitely NOT interested in going the subscription route.
If you are entirely new to OpenOffice then you might want to switch to LibreOffice. There are several good reasons to do so some of which are mentioned here: [Tutorial] Considering a Switch from OpenOffice to LibreOffice? Some Useful Information Start on the right foot is the best way to go.
Windows 10 Pro. x64
LibreOffice (Still) 7.6.5.2 (x64) Fully installed to system
LibreOffice (Still) Portable 7.6.5.2 (x86) [PortableApps]
JeJe
Volunteer
Posts: 2785
Joined: Wed Mar 09, 2016 2:40 pm

Re: Headings - selecting part of a line

Post by JeJe »

I don't understand what you're asking. Perhaps you're not a native English speaker and there's something going wrong with the translation of the word "Heading"?

Do you want something like this where the 9 is marked as special in some way - such as bold like this?
9 I, John, your brother and co...
Or do you want 9 on a separate line?
9
I, John, your brother and co...
Or both?
9
I, John, your brother and co...
Or what exactly are you trying to get?
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
JeJe
Volunteer
Posts: 2785
Joined: Wed Mar 09, 2016 2:40 pm

Re: Headings - selecting part of a line

Post by JeJe »

Your name hints you might be Finnish... so using google translate... "Heading" becomes "otsikko" but reversed "otsikko" becomes "title" something very different.

Heading in OO means a type of paragraph style

(This may all be completely wrong guessing...)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: Headings - selecting part of a line

Post by Bill »

finnmap wrote: Fri Aug 18, 2023 6:21 pm RoryOF - I don't think I want to do columns. Seems a little too much for a simple heading assign. I will have a lot of these to do by the time I finish this document.
Headings are paragraphs. If you want a heading to be only part of a line, there must be two paragraphs in the line, one paragraph for the heading and one for the rest of the line. That can only be done by using columns.

In OpenOffice, headings are used to automatically create a table of contents for a document. The heading text would be displayed in the TOC, but in your example a TOC would only have numbers. Is that what you want?
Last edited by Bill on Fri Aug 18, 2023 8:11 pm, edited 2 times in total.
AOO 4.1.14 on Ubuntu MATE 22.04
finnmap
Posts: 4
Joined: Thu Aug 17, 2023 5:31 pm

Re: Headings - selecting part of a line

Post by finnmap »

JeJe - I am of Finnish heritage but born and raised American.

I want to assign 'Heading' to be part of a Table Of Contents.
Like this:
Revelation 1:7-16 15
7 15
8 16
9 16
10 16

The 7,8,9,etc. would be the verse number with the 15,16,etc. being the page number

I can get just the verse number by putting the verse on a separate line, but I'd rather have it all on the same line just not in the TOC.

With Microsoft Word it's a piece of cake. Just highlight the number and assign a 'heading' to it.

Was hoping to do the same in OpenOffice.


I do appreciate all the responses! THanks!
OpenOffice 4.1.14 on Win 10
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: Headings - selecting part of a line

Post by Bill »

For the verse numbers, use the automatic numbering of headings instead of typing the verse numbers manually. Use Tools > Outline Numbering to set up the automatic numbering. When you set up the TOC, you can set up the entries to display only the automatic number (verse number) without the verse text.
AOO 4.1.14 on Ubuntu MATE 22.04
JeJe
Volunteer
Posts: 2785
Joined: Wed Mar 09, 2016 2:40 pm

Re: Headings - selecting part of a line

Post by JeJe »

If you can't do Bill's suggestion another (tedious) way would be to untick "Protected against manual changes" in the TOC and then hide what you don't want to appear to using Format menu/Character/font effects tab/hidden

Edit: though there's probably a regex search which would make selecting what you want to hide in the TOC while leaving the numbers a bit less tedious.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
RoryOF
Moderator
Posts: 34619
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Headings - selecting part of a line

Post by RoryOF »

Revelations (KJV) has 22 Chapters and a total of 404 verses (just checked); an Index, positioned at the start of your document, might be a better structure than a Table of Contents.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Hagar Delest
Moderator
Posts: 32670
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Workaround] Set Heading style for first word of a line

Post by Hagar Delest »

LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Post Reply