How do you start a nested list on the same line as the parent list item?

Like this:

  1. List item
  2. a. Hello

b. Goodbye

Workaround (valid if you only use a two level list!):

  1. Insert the first level list in your document
  2. Insert → Frame → Frame: set the properties
  • Anchor it “As Character”
  • Set its width and uncheck its borders
  1. Within the frame, insert the second level list
  2. Press Esc and, with the frame still selected, use Alt+arrow keys to control the vertical positioning of the frame.

And yes, you’ll have trouble at page breaks. You know, it’s a workaround, it cannot be perfect.

Thanks. I think I tried that once but it is a bit tricky and I need a solution that can work in a template that lots of people will use and I don’t want to explain complicated procedures to them!

There is a workaround, though it will appear a bit no-standard. It will address the issue to some extent. See, if you like it.

  • Modify a style, say List 1, for Outline
    and Numbering. Select a Numbering 1.
  • Go to the List Styles under Styles
    and Formatting. Modify Numbering 1 style. The level 1 be kept as it is. Click
    on Level 2. Change the Number: to ‘a
    b c …’. Then change the start at:
    to ‘b’. or any letter you want.
  • Now, come to the document. You have many
    Paragraphs.
  • Para-1, apply List 1.
  • Para-2, apply List 1. Type 'a. ’ (a
    dot space) just at the beginning of
    the para.
  • Para-3, apply List 1. Push
    it to level 2. (It can be done by
    putting the cursor at the beginning
    and pressing tab once. Or, on the
    Numbering toolbar, you will find arrows for that.) When, you make it as Level 2, you will find that it begins will letter ‘b’ or any letter you have set.

Caution: Once Numbering 1 is modified and Level 2 is set to begin with letter ‘b’, all other places wherever you have Numbering 1 applied will be affected. You may create a new numbering style and use it for this purpose.


Why they don’t provide the feature you expected? You have two paragraphs with number as 1 and 2. However, para 2 doesn’t have any text but it has the sub-items directly. You want to pull the sub-item 1 directly inline with the para 2. The point is, if para 2 doesn’t have any text but the items then, how come it is para 2? There can be some text and then the sub-items must begin. This seems to be developers view.(?) But, I agree with you that, in practice, there are situation where one feels to set the numbering as desired by you. However, numbering being the property of para, there can’t be two numberings for one para.

Would love to know what you felt of the workaround.

Thanks, pretty clever. It is probably the easiest way, and it is better than having to type all the letters of the sublist manually. It is good in that it can mostly rely on the use of styles. With the frames method I would probably want to set up an autotext or something too, in order to make it easier.

This can be done through a trick but OP specification is not precise enough. I can achieve:

1. First level-1 item
   2.a. First level-2 item
   2.b. Second level-2 item
3. Third level-1 item

or:

1. First level-1 item
2.a. First level-2 item
2.b. Second level-2 item
3. Third level-1 item

The difference is only in the level indents. OP didn’t specify exactly which indents where expected (and this question is now 5 years old).

Associate paragraph style Numbering 1 with list style Numbering 123. Numbering 1 will be used to style the list. Configure Numbering 123 for the required indents and numbering schema.

  1. type “First level-1 item” and style it Numbering 1
  2. when you hit Enter, you get a second level-1 item; type “Dummy”; hit Enter
  3. press Tab to promote the new item to level 2
  4. type the rest of the list as usual

The trick is now to make “2. Dummy” invisible but keep it so that it correctly increments the counter for level 1.

  1. Select item text of “2. dummy” (the number itself is not part of the selection)
  2. apply a character style you’ve created with attribute Hidden or direct format (if this is only the single occurrence in your document) with Format>Character; go to Font Effects tab and tick Hidden.

This is the general idea. Tune to fit your needs.

2 Likes

Interesting method, but it works. I had to reduce the font size of the character style Dummy so there wasn’t an unusual gap between line 1. and line 2.a.

I have no gap here (LO 7.5.3.2, Fedora 38) though I didn’t include the paragraph mark in the Hidden run. I feared that the number (which is also not flagged Hidden) would cause some distortion but it has no effect, contrary to headings where the paragraph font size and spacings have to be reduced.
@EarnestAl Could you attach your sample file so that I can see the difference with mine?

Thanks for offer. On re-opening my test file the lines were even so I set Dummy character style to not hidden, then back to hidden and the uneveness came back. File attached which will be evenly spaced
NestedListSameLine2.odt (11.5 KB)

This is what I get on changing style and then back until I close and re-open.

NestedListSameLine

Very strange: your file is OK here. I then followed your stance with Dummy character style and document still OK when style reverted to Hidden.
Could it be a subtle difference between Windows and Linux versions? (You are under W, aren’t you?)
EDIT: forgot to mention I zero-out the vertical spacing to better see any uneveness. There is none, but is 0 spacing special? Could you check on your side?

I had set 0.10 below paragraph spacing for some reason; if I set it to 0 it seems OK.
If I set it back 0.10 the unevenness recurs.
Clicking Print Preview clears the unevenness.
I might change to latest version as my test version. First I see there is a Windows update I can download.

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-NZ (en_NZ); UI: en-GB
Calc: CL threaded

[Edit]
After Windows update and restart, still same. Installed 7.5.5.1 parallel still the same. I tested on another Windows 11 computer (LO 7.3.6.2) and same thing so your guess that it is a Windows thing is probably correct.
Toggling Formatting Marks solves the problem.

It might be useful to file a bug report to have the opinion of developers.

Done, tdf#156123

Note that since v.7.2 (tdf#64222, commit 5ba30f588d6e41a13d68b1461345fca7a7ca61ac), Writer supports special formatting of “paragraph mark”, to be interoperable with Word. This means, among other things, that paragraph make may be hidden - basically, making a series of paragraphs to not break lines. And that allows to create the wanted effect.

Since 7.5 (tdf#155238), the way how this is stored in ODF has changed, to use a special attribute.

But all this still has no UI in Writer, so only possible by directly editing ODF.

@mikekaganski Could you explain how to set this special formating? I’d like to experiment as this could be a solution to the “inline heading” recurrent question.

@ajlittoz sw/qa/extras/odfexport/data/ParagraphMarkerMarkup.fodt - core - Gitiles is an example of a FODT with such a markup (since v.5.4). The loext:marker-style-name attribute of a paragraph points to an autostyle (i.e., DF), and that autostyle is just a normal autostyle, pointing to a proper style (or a default if missing), and adding more.

@mikekaganski If I read correctly th ODF (I am no expert), the mark should turn red. With 7.5.3.2, it remains blue. However, its size is smaller than the others on the Text Body lines I added.

This is no problem, since this reference can be made to point to a named character style so that this style can be manipulated in the GUI as usual. A “template paragraph” could be stored as initial contents in a template or as an AutoText entry so that it can be reused without the need to go tweaking the ODF.

Heh, I see I made a thinko (I forgot to type “7.” when I wrote “since v.5.4” - I intended to write “since 7.5.4”).

OK, thanks. I’ll keep an eye on the feature.

There’s no such option.