Create a new Writer document from a tracked FODT without renaming the source
By ON Lab · Sources checked November 8, 2026
Use LibreOffice's -n launch option to treat a FODT source as a template for a new document. You can keep the source's flat-XML filename for version control and save the new document under a separate name. In our native Writer test, ordinary opening was bound to the source file, while -n created an untitled document with no saved-file URL.
A reader using version control wanted a diffable Writer template rather than a packaged OTT file. The discussion already mentions -n. We tested that route with an original two-paragraph FODT containing a custom paragraph style, compared it with ordinary opening, saved a separate edited clone, and reopened the clone to check its contents and style.
Keep file format and opening behavior separate
FODT is a flat-XML text-document format. A launcher option changes how LibreOffice opens a file; it does not transform XML into a packaged template or register a new file type. You do not need to rename the source to test the new-document route.
This workflow addresses creating a fresh document from a tracked source. It does not establish a dedicated flat-template extension, full Template Manager behavior, or preservation of every feature when converting another document into flat XML. The reader discussion also raises embedded scripts and customizations, which were outside our small fixture.
Launch a new document from the source
soffice -n "/path/to/template source #1.fodt"
Replace the example path and use the actual LibreOffice executable on your system. The command name soffice must be available to your shell; it is not guaranteed to be on your PATH. For a typical macOS application installation the executable is inside the application bundle:
"/Applications/LibreOffice.app/Contents/MacOS/soffice" -n "/path/to/template source #1.fodt"
The quotation marks keep a filename containing spaces together as one argument. Our native fixture also contained a hash character in its filename. We passed the filename as a single command argument and verified the loaded text. A filesystem argument and a percent-encoded file URL are different representations; do not replace one with the other just because a diagnostic log displays an encoded URL.
The official parameter documentation says the option applies to following file arguments until another file-opening treatment is selected. Keep this first test to a single source file so there is no ambiguity about which document you are inspecting.
What the comparison showed
| Observation | Ordinary opening | Opening with -n |
|---|---|---|
| Initial document title | Source filename | Untitled 1 |
| Initial saved-file URL | Source file URL | Empty |
| Original two paragraphs loaded | Yes | Yes |
| Custom paragraph style available | Yes | Yes |
| Source unchanged after saving to a separate clone | Yes in our test | Yes in our test |
We used LibreOffice 26.8.2.2 on macOS 27.2 arm64, launched headlessly from an official checksum-verified distribution with an isolated test profile. A local test macro inspected the document properties and saved the separate clone. This verifies native loading and saving, not clicks in the graphical template organizer or behavior on Windows and Linux.
Both test paths left the source unchanged because we explicitly saved the edited document to another filename. The important opening difference is that the ordinary document initially referred to the source, while the -n document was initially unsaved.
Save the new document deliberately
- Verify that the loaded text and intended styles are present before editing.
- Save the draft to a new filename in a separate output location.
- Choose the actual intended format in the save dialog; a filename suffix alone is not a format conversion.
- Close and reopen the saved result to inspect it.
- Check the tracked source separately before committing changes.
We added a short edit to the clone, saved it as FODT, then reopened it read-only through native Writer. Both paragraphs, the edit, and the custom style were present; the style's inspected weight property matched the source. The source's SHA-256 stayed identical before and after the experiment.
The launch option is not a file-permission barrier. Saving a new document under the source's existing path can still overwrite that path if you confirm it. Keep the tracked source and generated outputs separate rather than relying on the word “template” as automatic protection.
Do not equate flat XML with a noise-free diff
A text representation lets version-control tools display textual changes, but a save may also change metadata or serialized document details. Our experiment checked source preservation and clone contents; it did not prove byte-stable saves or eliminate the comparison-identifier noise discussed in the original thread.
Review the changed text, styles and document structure before accepting a diff. A successful new-document launch does not establish that embedded macros, complex templates or application customizations will round-trip through FODT.
If the result opens bound to the original instead of as a new draft, first record the actual version, executable and complete launch arguments. Test a small source through that same route before changing file associations or renaming your template collection.