How can I save a document but not include the included sections? We have a large writer document, main.fodt, that includes sections from over 1000 different sub documents. We would like to be able to save the main document without including all the sections from the sub documents into the saved file. We have observed that if the sections are included the main document becomes too large and libreoffice has trouble loading it. Also we are hosting the documents on GitHub so it is necessary to keep the size of the documents as small as possible.
To reproduce: To observe what happens when a document that includes a section from another document is saved, follow this steps:
- Create two empty files: main.fodt, child.fodt
- In child.fodt: Insert a header line: “The start of the child doc”, then insert a section “Section1” below that: Position the cursor where you want the section to appear, then from the menu: Insert->Section and Type in “Section1” under the “New Section” input field. Then press “Insert” button. Then move the cursor inside the inserted section, and type “This is Section1 from the child doc”. Then save child.fodt.
- In main.fodt: Insert a header line: “The start of main”, then insert a section “Section1” below that: Position the cursor where you want the section to appear, then from the menu: Insert->Section and Type in “Section1” under the “New Section” input field. Then click the “Link” radio button in the right pane. Then in the “File name” text field, type in the absolute location of the child.fodt document, for example: “file:///home/hakon/child.fodt”. In the “Section” text field type in “Section1”. Then press the “Insert” button.
- Save main.fodt
- Check that main.fodt contains the section from child.fodt, e.g. run
grep "This is Section1 from the child" main.fodt