Header and Paragraph on Text on Same Line

Discuss the word processor
Post Reply
swordams
Posts: 1
Joined: Sat May 09, 2015 2:50 pm

Header and Paragraph on Text on Same Line

Post by swordams »

I am editing some bylaws for an organization I work with. I'm attempting to use styles to allow me to create a TOC. However, the format of the bylaws is presenting some problems.
Each paragraph within an Article begins with a section title (H2). This is the text I'd like to see in the TOC. The section title is followed immediately by the paragraph text, like this:

Section 1.1 - Section Title. The paragraph text for the section begins here.

However, if I try to highlight just the title and apply a style, the entire paragraph inherits the style. How do I assign a style to just a portion of a line of text, so that only the title shows in the TOC?

Thank you,
Adam
OpenOffice 4.1.0
Windows 8.1
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Header and Paragraph on Text on Same Line

Post by acknak »

Greetings and welcome to the community forum!

Sorry, Writer does not support "in-line" headings. The simplest approach is to abandon that format and stick to headings as separate paragraphs.

If you can't do that, you can try working around it by putting the heading in a frame, but I'm not sure what effect that will have on the ToC and other document structure issues. Frames (in some situations) are outside the document's text flow.

Or, I suppose you could abandon the heading numbering and paragraph styles and just do the numbering yourself and use a character style for the heading format.
AOO4/LO5 • Linux • Fedora 23
User avatar
RoryOF
Moderator
Posts: 35080
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Header and Paragraph on Text on Same Line

Post by RoryOF »

From memory a previous solution was to apply the Heading style to a separate line, having adjusted the font size to 2pt (the minimum OO will accept) and the print colour to white. By careful adjustment of the inter paragraph spacing this 2 pt line appears to take up no space and doesn't print. Then the article can follow, with the pseudo header text formatted using a Character Style. The only problem I can see is concerning numbering - as I don't do numbering (writing only narrative text) it will need someone else to consider the problem.
 Edit: One might perhaps do something with User defined Variables. 
 Edit: Edit2. From memory this arose in connection with required formatting for US Patent Application. A search on the term patent using the Forum search (top right of Forum window) might be helpful. 
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
User avatar
floris v
Volunteer
Posts: 4573
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Header and Paragraph on Text on Same Line

Post by floris v »

RGB found a way: viewtopic.php?f=71&t=709
LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Header and Paragraph on Text on Same Line

Post by acknak »

Ack! Good catch! I forgot about that one.
AOO4/LO5 • Linux • Fedora 23
Post Reply