How can I maintain the page break view?

By default, documents in Writer seem to open with a gap displayed between pages, as if they were printed papers laid out on a table with a small space between the bottom of one sheet and the top of the next.

This gap can be collapsed by hovering the cursor over the gap and double clicking. Doing this hides the gap and the top/bottom margins, leaving only a thin line to indicate a page break.

However, after saving documents in this mode, and reopening them, the gap and margins are displayed again.

How can I set this so that docs open in the same view as when they were last saved?

What you do is equivalent to View>Hide Whitespace. This setting is probably not saved in the user profile, definitely not in the file.

Thanks, ajlittoz, this does seem to be the same thing as “Hide Whitespace”. So there’s no way to make it default to this setting, or maintain it when the doc is reopened, as there is in Word?

I found a solution:

I recorded a macro and set it to run on opening a document.

I learned how to do this from these sources: https://documentation.libreoffice.org

https://ask.libreoffice.org/en/questi

Here are the steps:

  1. Open a new document.
  2. Make sure macro recording is enabled by going to Tools > Options > LibreOffice > Advanced on the main menu bar and selecting the option Enable macro recording. By default, this feature is turned off when LibreOffice was installed on your computer.
  3. Go to Tools > Macros > Record Macro on the main menu bar to start recording a macro. A small dialog is displayed indicating that LibreOffice is recording a macro.
  4. Click View > Hide Whitespace.
  5. Click Stop Recording on the small Recording dialog to stop recording and the LibreOffice Basic Macros dialog opens.
    Open the library container My Macros.
  6. Find the library named Standard in My Macros. Note that every library container has a library named Standard.
    Select the Standard library and click New Module to create a new module to contain the macro. This opens the New Module dialog.
  7. Type a descriptive name for the new module, for example Recorded, and click OK to create the module. The LibreOffice Basic Macros dialog now displays the name of the new module in the Standard library.
  8. In the Macro name text box, type a name for the macro you have just recorded, for example HideWhitespace.
  9. Click Save to save the macro and close the LibreOffice Basic Macros dialog.
  10. Go back to the document and select the main menu Tools > Customize
  11. In the dialog that pops up, select the tab Events.
  12. Attach your macro to the “Document loading finished” event ( or “Open Document” , “Activate Document” , … )
  13. Be sure to do this for LibreOffice and not just the document if you want it to apply to all documents.