Page 1 of 1

[Solved] Numbering A Series of Paragraphs

Posted: Fri Sep 29, 2017 2:50 pm
by beau
I have an .odt file with hundreds of quotations in sequence like this:

a loving heart is the beginning of all knowledge.
~Thomas Carlyle

a poem begins in delight and ends in wisdom.
~Robert Frost

no one sees what is before his feet. we all gaze at the stars.
~Cicero

if you wished to be loved, love.
~Lucius Annaeus Seneca

Here's how it's formatted:
quote formatting.png
I'd like to add sequential numbers to each quote, like this:
1
a loving heart is the beginning of all knowledge.
~Thomas Carlyle
2
a poem begins in delight and ends in wisdom.
~Robert Frost
3
no one sees what is before his feet. we all gaze at the stars.
~Cicero
4
if you wished to be loved, love.
~Lucius Annaeus Seneca


Is there any way to automate the adding of numbers? I've got hundreds of quotes and I'd hate to have to number them all manually!! :knock:

Re: Numbering A Series of Paragraphs

Posted: Fri Sep 29, 2017 4:35 pm
by Zizi64
Plase upload your ODF type sample file here. Are those ~ signs as pure characters in your text, or they are special bullet signs in the applied paragraph style?

Re: Numbering A Series of Paragraphs

Posted: Fri Sep 29, 2017 5:00 pm
by beau
I'm not familiar with ODF files so I've just researched it, still not sure if what I've attached (sample-quotes-as-odt.odt) is the right thing. If what I've uploaded isn't right, please tell me what to do. Thanks!
I haven't uploaded to this forum before, hope I've done it correctly!

The "~" is a tilde (most upper left key on standard keyboards) but I can make the tildes asterisks or # or any other special character if necessary.

Re: Numbering A Series of Paragraphs

Posted: Fri Sep 29, 2017 5:17 pm
by acknak
Do you want the numbers on a separate line, as you showed?

To number the quotations, try this:

Edit > Find & Replace
Search for: ^[^~]
Options/Regular expressions: ON

Click Find All

Click the "Numbering on/off" button on the toolbar (icon shows paragraphs with Roman numerals)

To remove the indent before the numbers, click to the left of the FIRST quotation, then press Shift+Tab.

If you want the numbering on a separate line, it will take an extra step or two. Just ask if that's what you need.

Re: Numbering A Series of Paragraphs

Posted: Fri Sep 29, 2017 5:29 pm
by beau
Thanks so much. Unfortunately I've got to leave the office now and I won't be able to get back to you until Monday, my apologies for the delay.
I'll of course study up on your suggestions before replying.

Re: Numbering A Series of Paragraphs

Posted: Wed Jan 17, 2018 4:51 pm
by beau
Hello acknak ~
I want to apologize for having never replied to your very useful answer. This forum has responded so very helpfully to my many questions, it galls me to know that I've abused your efforts. In all my other questions I've added the [Solved] note to each, and I'll do so with this one as well at the appropriate time.

I have two more questions, and I'll post them one at a time.
You said
<<If you want the numbering on a separate line, it will take an extra step or two.>>
I do need to ask that now. What additional step(s) should I take so it looks like this:
Image

Re: Numbering A Series of Paragraphs

Posted: Wed Jan 17, 2018 7:57 pm
by acknak
No apology needed. Good to know it worked for you.

The most straightforward plan would be to have the numbering include a line break (Shift+Enter) between the number and the start of the paragraph. While OO will accept that in the document data, there's no universal way to configure it from the normal user interface: the dialog windows (generally) don't accept entry of a line break. Even if you copy/paste one, it may be ignored or changed to a plain space. So, you have to resort to workarounds like editing the document xml code.

Another approach is to configure the numbering (Format > Bullets & Numbering> Position ...) to use a very wide tab after the numbering, something like 8" (or as wide as the paper/margins. That forces the following content onto the next line.

Re: Numbering A Series of Paragraphs

Posted: Fri Jan 19, 2018 4:11 pm
by beau
Great! I'm ready to go to town! :bravo: