Domanda

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?

Margin of exported document in LibreOffice

Thank you.

È stato utile?

Soluzione

According to the relevant section of the org-mode manual, you can customize the default layout for .odt documents by following these steps:

  1. Create a new .org file (e.g. styles.org) with the following contents:

     #+OPTIONS: H:10 num:t
    

    ... and export it to ODT.

  2. 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").

  3. Customize the styles to your liking. For changing the page margins, navigate to the "Page Styles" tab:

    Styles and Formatting window, Page Styles tab

    ... right click "Default Style" and choose "Modify". In the window that comes up, navigate to the "Page" tab:

    Page tab

    ... and adjust the "Inner" and "Outer" margins to your liking. Click "OK" when you are done.

  4. Save the file as an .odt or .ott file.

  5. 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") 
    
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top