Reputation: 2268
I think the margins in the .odt
documents I export with Emacs and org-mode
are too big.
How can I change them? Is there a special #+OPTION
that org-mode
provides for this?
Thank you.
Upvotes: 2
Views: 1689
Reputation: 5280
According to the relevant section of the org-mode
manual, you can customize the default layout for .odt
documents by following these steps:
Create a new .org
file (e.g. styles.org
) with the following contents:
#+OPTIONS: H:10 num:t
... and export it to ODT.
Open the file in LibreOffice Writer and bring up the "Styles and Formatting" window (by pressing F11 or by clicking on "Format" and then on "Styles and Formatting").
Customize the styles to your liking. For changing the page margins, navigate to the "Page Styles" tab:
... right click "Default Style" and choose "Modify". In the window that comes up, navigate to the "Page" tab:
... and adjust the "Inner" and "Outer" margins to your liking. Click "OK" when you are done.
Save the file as an .odt
or .ott
file.
Add the following line to the top of the .org
file for which you want the ODT exporter to use your custom styles:
#+ODT_STYLES_FILE: "/path/to/exported/styles.odt"
You can also tell org-mode
to make your styles the default for every document you export to ODT by adding the following to your Emacs configuration:
(setq org-odt-styles-file "/path/to/exported/styles.odt")
Upvotes: 5