How to properly format a multiple choice test document using LO Writer

Hi, I need some help with this problem. Thanks in advance.

I need to write many, and long, multiple choice test documents. To handle them efficiently, I’ve designed two different LO Styles: one for questions and another one for answers.

These are my conditions for a proper multiple choice test formatting:

(1) Question paragraph should not split when it happens a page break (which happens often when questions are long). This can be achieved by: Styles → Edit style → Text Flow → unset “Allow to split paragraph”. OK

(2) Question paragraph should be glued with its (following) first answer paragraph → This can be achieved by: Styles → Edit style → Text Flow → set “Keep with next paragraph”. OK

(3) Answer paragraphs should stay all together: the 3 (or 4, or 5) different answers paragraphs should stay together when a page break is happening. But i don’t know how to achieve this. In the answers style, I could set something like “Keep with next paragraph” but it doesn’t work (and I guess it would favour potential dangers when to keep the whole document consistent). So eventually, when a question is near the bottom of the page and its answers are split, I manually add some blank lines before the question to let the question land on the following page and keep the question glued with its answers (this could be achieved with a manual page break as well). See question 7 in the example document: its answers are split in 2+1.

(4) Answers should be always a, b, c. To achieve this, the Answer paragraph is a numbered list style, to begin each line with a letter, following the sequence (a), (b), (c). This works for the first question. The second question, as expected, starts with (d). To avoid that, it can be achieved with: Right click → List → Restart numbering. Ok, this works. BUT it is a lot of work to navigate the whole document and do this for every first answer. I guess there could be a way to do it automatically using Styles, but I couldn’t find a way. See questions 3 and following in the example document: it starts with (d).

So, issues (1) and (2) are easy to solve, but issues (3) and (4) are not yet solved. Any hints?

LO version information:

Version: 24.2.7.2 (X86_64) / LibreOffice Community
Environment: CPU threads: 8; OS; Linux 6.17
User interface: UI render: default; VCL: gtk3
Locale: es-ES (en_GB.UTF-8); UI: en-GB
Misc: Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.4

Calc: threaded

Example document:
zexample_multiple_choice_test.odt (84.3 KB)

You could use a table to keep the question together, don’t allow the row to split. You can then add a column to total the marks.
zexample_multiple_choice_test132739EA.odt (34.7 KB)

There isn’t, see tdf#51373

To make Restart Numbering easier to use, you can assign it to a keyboard shortcut:

  1. Click Tools > Customise > Keyboard
  2. Under Functions type “restart” until you can see Restart Numbering. Select it.
  3. In the Shortcut Keys pane, click a suitable, empty key combination, e.g. Ctrl+Shift+N
  4. Click Assign and OK
1 Like

You already designed/configured two different styles for question and answers and set the text flow parameters. Unfortunately, working with 2 styles only locks together the whole document. You need to break sequences at end of answers.

This can be done with a third style for the last answer. This style differs from the answer one only by Keep with next paragraph which is unticked.

This is a common technique with lists where you can have three styles involved: first item (e.g. for increased space above to better separate the list from discourse paragraphs), running item and last item (e.g. for increased space below to highlight the end of the list).

As suggested by @EarnestAl, you can assign keyboard shortcuts to styles to speed up typing.

1 Like

Thank you both for your quick and precise response!!! Both answers provide solution, but I clicked on the first and now I cannot click on the second. I don’t know if this is the proper way of appreciate your work!!!