Commit 2df4420ff5

2df4420ff51f7e97a9c06eacf814f64cdb5a4351

parent: 3f4fa24f74

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-20 16:36 UTC

Document native ODT export

Layout: unified · split

README.org +2 −2
@@ -36,8 +36,8 @@ Emacs tomorrow and nothing has been reformatted.
3636- *Tables.* Aligned as you type, with =#+TBLFM= formulas.
3737- *Code blocks.* Run source blocks and tangle them into files, as =org-babel-tangle=
3838 does.
39- *Export.* HTML, Markdown, PDF, Word, RTF, iCalendar and LaTeX built in; PDF through LaTeX,
40 ODT and more through Emacs when it is installed (download version only).
39- *Export.* HTML, Markdown, PDF, Word, RTF, ODT, iCalendar and LaTeX built in; PDF through
40 LaTeX and more through Emacs when it is installed (download version only).
4141- *Search.* Across file names, headings and text, plus Spotlight and Quick Look
4242 previews of =.org= files.
4343
docs/manual/guide/03-keys.org +1 −1
@@ -995,7 +995,7 @@ When a key appears in several rows, it runs the command whose condition holds at
995995| Copy as Rich Text (=app.copy-rich-text=) | — | — | — | Copies the selection, or the file, as HTML, RTF and plain text. |
996996| Export to PDF with Emacs (=app.export.pdf=) | =C-c C-e l p= | — | =SPC m e l p= (N) | Exports to PDF through Emacs (=org-latex-export-to-pdf=). |
997997| Export to LaTeX (=app.export.latex=) | =C-c C-e l l= | — | — | Exports to LaTeX without Emacs, as =org-latex-export-to-latex= does. |
998| Export to ODT with Emacs (=app.export.odt=) | =C-c C-e o o= | — | — | Exports to ODT through Emacs (=org-odt-export-to-odt=). |
998| Export to ODT (=app.export.odt=) | =C-c C-e o o= | — | — | Exports to OpenDocument text without Emacs, as =org-odt-export-to-odt= does. |
999999| Export to Plain Text with Emacs (=app.export.text=) | =C-c C-e t u= | — | — | Exports to plain text through Emacs (=org-ascii-export-to-ascii=). |
10001000| Export to iCalendar (=app.export.icalendar=) | =C-c C-e c f= | — | — | Exports to an =.ics= calendar (=org-icalendar-export-to-ics=). |
10011001| Export Agenda Files to iCalendar (=app.export.icalendar-agenda=) | =C-c C-e c a= | — | — | Writes an =.ics= beside each agenda file (=org-icalendar-export-agenda-files=). |
docs/manual/guide/12-export.org +23 −9
@@ -1,6 +1,6 @@
11#+TITLE: Export
2#+DESCRIPTION: Exporting Org files from orgstar to HTML, Markdown, PDF, Word, RTF, plain text, iCalendar and LaTeX, and to ODT and ASCII through Emacs; copying as rich text.
3#+LEDE: orgstar exports HTML, Markdown, PDF, Word, RTF, plain text, iCalendar and LaTeX itself, and the Mac download version hands ODT, ASCII and LaTeX-made PDF to Emacs.
2#+DESCRIPTION: Exporting Org files from orgstar to HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar and LaTeX, and to ASCII through Emacs; copying as rich text.
3#+LEDE: orgstar exports HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar and LaTeX itself, and the Mac download version hands ASCII and LaTeX-made PDF to Emacs.
44
55* Exporting a file
66
@@ -19,7 +19,7 @@ Export works on the file in the current editor, using its text as it is now, sav
1919| Plain text | Export to Plain Text | — | — | no |
2020| PDF through LaTeX | Export to PDF with Emacs | =C-c C-e l p= | =SPC m e l p=, =C-c C-e l p= | yes |
2121| LaTeX | Export to LaTeX | =C-c C-e l l= | =C-c C-e l l= | no |
22| ODT | Export to ODT with Emacs | =C-c C-e o o= | =C-c C-e o o= | yes |
22| ODT | Export to ODT | =C-c C-e o o= | =C-c C-e o o= | no |
2323| ASCII text | Export to Plain Text with Emacs | =C-c C-e t u= | =C-c C-e t u= | yes |
2424| iCalendar | Export to iCalendar | =C-c C-e c f= | =C-c C-e c f= | no |
2525| iCalendar, every agenda file | Export Agenda Files to iCalendar | =C-c C-e c a= | =C-c C-e c a= | no |
@@ -35,7 +35,7 @@ The [[file:../install.org][Mac App Store version]] has the eleven commands that
3535
3636*Export…* in the command palette, or =⇧⌘E= in the Mac preset, opens a dialog. The Emacs and Doom presets have no key for it; bind =app.export-dialog= in =keymap.toml= if you want one (see [[file:03-keys.org][Keys and commands]]). The dialog has:
3737
38- *Format*: HTML, Markdown, PDF, Word, Rich Text (RTF), Plain text, PDF via LaTeX (Emacs), ODT (Emacs), LaTeX, Plain text, ASCII (Emacs) or iCalendar. The App Store version lists LaTeX last.
38- *Format*: HTML, Markdown, PDF, Word, Rich Text (RTF), Plain text, PDF via LaTeX (Emacs), ODT, LaTeX, Plain text, ASCII (Emacs) or iCalendar. The App Store version lists LaTeX last.
3939- *Scope*: the whole file, or the subtree at the caret (Org's =C-s= in the dispatcher). A subtree is exported as a document of its own: its heading is the title, its text the body, and its child headings move up a level. iCalendar is the exception: there the subtree's heading is an entry like any other. The file's =#+= keywords still apply, and the heading's =EXPORT_TITLE=, =EXPORT_AUTHOR=, =EXPORT_DATE=, =EXPORT_EMAIL=, =EXPORT_OPTIONS=, =EXPORT_SELECT_TAGS=, =EXPORT_EXCLUDE_TAGS=, =EXPORT_HTML_HEAD= and =EXPORT_HTML_HEAD_EXTRA= properties override them. Its planning line and property drawer are left out. The choice is available when the caret is under a heading.
4040- *Body only*: leave out the title and the page around the text (Org's =C-b=). HTML is then the table of contents, the text and the footnotes, without =<html>=, =<head>= or the title; Markdown has no title heading. Not available for PDF, Word, RTF, plain text, ODT and iCalendar.
4141- *Destination*: where =#+EXPORT_FILE_NAME:= says, or the subtree's =EXPORT_FILE_NAME= property for a subtree, else beside the Org file. *Choose…* picks another place and name. Changing the format changes the extension.
@@ -46,7 +46,7 @@ The dialog remembers the format and the *Open after export* setting. The PDF set
4646
4747** On iOS
4848
49The Export menu offers HTML, Markdown, PDF, Word, Rich Text (RTF), Plain Text, iCalendar and LaTeX, and Copy as Rich Text. It is under More in the editor, and in the toolbar in the reader. Choosing one opens the share sheet with the exported file, named after the Org file or its =#+EXPORT_FILE_NAME:=. Send it to another app, or use Save to Files to keep it. The export is the same as on the Mac, except that LaTeX has no =\author= unless the file has =#+AUTHOR:=. ODT, ASCII and PDF through LaTeX are not available on iOS, nor are the agenda-file iCalendar exports.
49The Export menu offers HTML, Markdown, PDF, Word, Rich Text (RTF), Plain Text, ODT, iCalendar and LaTeX, and Copy as Rich Text. It is under More in the editor, and in the toolbar in the reader. Choosing one opens the share sheet with the exported file, named after the Org file or its =#+EXPORT_FILE_NAME:=. Send it to another app, or use Save to Files to keep it. The export is the same as on the Mac, except that LaTeX has no =\author= unless the file has =#+AUTHOR:=. ASCII and PDF through LaTeX are not available on iOS, nor are the agenda-file iCalendar exports.
5050
5151* HTML export
5252
@@ -248,6 +248,21 @@ For Org's own ASCII layout, with underlined headings and drawn tables, use Expor
248248
249249*Copy as Rich Text* (the command palette on the Mac, the Export menu on iOS) puts the selection, or the whole file when nothing is selected, on the clipboard as HTML, RTF and plain text. Paste it into Mail, Pages, Word or a web form to get the formatted text. On iOS it copies the whole file.
250250
251* ODT export
252
253Export to ODT writes an OpenDocument text file (=.odt=) for LibreOffice, Pages or Word. orgstar writes it itself, on the Mac and on iOS, the way Emacs's =ox-odt= does under =emacs -Q=: the same headings, paragraphs, lists, tables, links, notes and images, with ox-odt's style names, so a template that restyles ox-odt's output restyles this one too.
254
255- The title, subtitle (=#+SUBTITLE:=), author and date come first, then the table of contents and the text. Without =#+AUTHOR:=, the author is your account's full name, as =user-full-name= is in Emacs. Without =#+TITLE:= there is no title.
256- Headings are numbered by the word processor, to the depth =num= gives. Headings deeper than =H= become list items. =#+TOC: headlines= puts a table of contents where it is; =local= limits it to the section.
257- Footnotes are the word processor's own notes. A note referred to again shows its number.
258- Tables keep their header rows, alignment cookies, column groups and cell borders. A table inside a list item ends the list, sits indented below it, and the list carries on after it, as in ox-odt.
259- Images from =file:= links (PNG, JPEG, GIF and SVG) are put inside the file. Their size is their pixels at 96 to the inch, or =#+ATTR_ODT: :width=, =:length= (the height) or =:scale=, and no more than 17 by 20 cm. A caption or =#+NAME:= numbers figures, tables and source blocks, and a link to the name shows the number.
260- LaTeX fragments and environments are kept as written, in code style, as ox-odt does without a MathML converter. Source blocks are not colored.
261- =#+ODT:= lines, =#+BEGIN_EXPORT odt= blocks and =@@odt:...@@= snippets go in as they are.
262- The styles (=styles.xml=) are orgstar's own: A4 pages with 2 cm margins. =#+ODT_STYLES_FILE:= is not read.
263
264The export stops with a message, instead of writing something different from ox-odt, for: a link that leads nowhere, an image file that can't be read, inline tasks, table templates (=#+ATTR_ODT: :style=), a link without a description to a =<<target>>= or to a code line that isn't numbered, an inline source block exported as code, an annotation in a dated document, and =#+TOC:= with =:target=. ODT export is always the whole document: the export dialog's *Body only* doesn't apply.
265
251266* Markdown export
252267
253268Markdown export writes GitHub-flavored Markdown:
@@ -291,7 +306,7 @@ Differences from Org: diary sexps (=%%(…)= lines and =<%%(…)>= timestamps) a
291306
292307* Publishing
293308
294Publishing (=org-publish=) exports a folder of Org files to a folder of HTML, Markdown or LaTeX files, copies other files beside them, and can write a sitemap. Projects are =[[publish]]= tables in =config.toml=, as =org-publish-project-alist= entries are in Emacs:
309Publishing (=org-publish=) exports a folder of Org files to a folder of HTML, Markdown, LaTeX or ODT files, copies other files beside them, and can write a sitemap. Projects are =[[publish]]= tables in =config.toml=, as =org-publish-project-alist= entries are in Emacs:
295310
296311#+BEGIN_SRC toml
297312[[publish]]
@@ -324,7 +339,7 @@ components = "notes static"
324339| =recursive= | Files in subfolders too | =false= |
325340| =exclude= | An Emacs regexp on the file's path under =base-directory=; matching files are left out | |
326341| =include= | More files, relative to =base-directory=, separated by spaces | |
327| =publishing-function= | =org-html-publish-to-html=, =org-md-publish-to-md=, =org-latex-publish-to-latex= or =org-publish-attachment= (copied as they are), several separated by spaces | =org-html-publish-to-html= |
342| =publishing-function= | =org-html-publish-to-html=, =org-md-publish-to-md=, =org-latex-publish-to-latex=, =org-odt-publish-to-odt= or =org-publish-attachment= (copied as they are), several separated by spaces | =org-html-publish-to-html= |
328343| =body-only= | The export's body only | =false= |
329344| =auto-sitemap= | Write a sitemap into =base-directory= and publish it with the rest | =false= |
330345| =sitemap-filename= | The sitemap's name | ="sitemap.org"= |
@@ -350,12 +365,11 @@ A file whose published copy is newer than it is skipped, as Org skips files that
350365
351366* Exporting through Emacs
352367
353On the Mac, PDF, ODT and plain text exports are done by Emacs, with the =ox= functions Emacs's dispatcher uses:
368On the Mac, PDF and plain text exports are done by Emacs, with the =ox= functions Emacs's dispatcher uses:
354369
355370| Format | Function |
356371|------------+-----------------------------|
357372| PDF | =org-latex-export-to-pdf= |
358| ODT | =org-odt-export-to-odt= |
359373| Plain text | =org-ascii-export-to-ascii= |
360374
361375LaTeX goes to Emacs (=org-latex-export-to-latex=) only for a file orgstar's own LaTeX export can't write as Emacs would; see /LaTeX export/. The [[file:../install.org][Mac App Store version]] doesn't run Emacs and has none of these exports.
docs/manual/guide/14-ios.org +3 −3
@@ -329,9 +329,9 @@ The app icon's badge counts the entries in the agenda's Overdue section that are
329329
330330* Export
331331
332Export (in the reader's toolbar and the editor's More menu) offers HTML, Markdown, PDF, Word, Rich Text (RTF), Plain Text, iCalendar and LaTeX, and Copy as Rich Text. Each opens the share sheet with a file named after the org file, which you can send to another app or keep with Save to Files. The export reads the file's setup files and follows its export keywords, as the Mac's export does. For a file the LaTeX export can't write as Emacs would, the share sheet stops and "Can't export to LaTeX: " and the reason show at the bottom of the screen.
332Export (in the reader's toolbar and the editor's More menu) offers HTML, Markdown, PDF, Word, Rich Text (RTF), Plain Text, ODT, iCalendar and LaTeX, and Copy as Rich Text. Each opens the share sheet with a file named after the org file, which you can send to another app or keep with Save to Files. The export reads the file's setup files and follows its export keywords, as the Mac's export does. For a file the LaTeX export can't write as Emacs would, the share sheet stops and "Can't export to LaTeX: " and the reason show at the bottom of the screen.
333333
334PDF export follows =pdf-margin=, =pdf-font= and =pdf-page-numbers= in =config.toml=, and Word files get heading styles and the file's images, as on the Mac. ODT, ASCII and PDF through LaTeX aren't available on iOS. See [[file:12-export.org][Export]].
334PDF export follows =pdf-margin=, =pdf-font= and =pdf-page-numbers= in =config.toml=, and Word files get heading styles and the file's images, as on the Mac. ASCII and PDF through LaTeX aren't available on iOS. See [[file:12-export.org][Export]].
335335
336336* Code blocks and tables
337337
@@ -436,7 +436,7 @@ Quick Look in the Files app shows org files as the HTML export renders them.
436436* What the Mac has that iOS doesn't
437437
438438- In the download version: running code blocks in languages other than Emacs Lisp and JavaScript, Emacs Lisp beyond orgstar's interpreter, JavaScript that needs node, and tables that need Emacs.
439- Publishing, and in the download version ODT, ASCII and LaTeX-made PDF export.
439- Publishing, and in the download version ASCII and LaTeX-made PDF export.
440440- Idle detection while a clock runs.
441441- Import from Emacs of agenda folders.
442442- The Columns inspector, the buffer list and tab bar, and resizing panes by dragging their divider. The board and column view are there (see [[file:07-agenda.org][The agenda]] and [[file:04-outlines.org][Outlines]]).
docs/manual/guide/15-alongside-emacs.org +2 −2
@@ -120,9 +120,9 @@ Some features run Emacs in batch mode on the Mac. Everything else works without
120120| Emacs Lisp source blocks (=emacs-lisp=, =elisp=) | The block, in =emacs -Q --batch= |
121121| Table formulas outside what orgstar computes itself | =org-table-recalculate= on a copy of the file; the table's new text replaces the old one if the table didn't change meanwhile |
122122| Lisp table formulas that orgstar's Emacs Lisp interpreter can't evaluate | The same; orgstar first asks whether to run Lisp (yes, no, always) |
123| Export to PDF, ODT and plain text, and LaTeX orgstar can't write itself | =org-latex-export-to-pdf=, =org-odt-export-to-odt=, =org-ascii-export-to-ascii= or =org-latex-export-to-latex= |
123| Export to PDF and plain text, and LaTeX orgstar can't write itself | =org-latex-export-to-pdf=, =org-ascii-export-to-ascii= or =org-latex-export-to-latex= |
124124
125HTML, Markdown and LaTeX export don't use Emacs. See [[file:11-code-blocks.org][Code blocks]], [[file:10-tables.org][Tables]] and [[file:12-export.org][Export]].
125HTML, Markdown, ODT and LaTeX export don't use Emacs. See [[file:11-code-blocks.org][Code blocks]], [[file:10-tables.org][Tables]] and [[file:12-export.org][Export]].
126126
127127** How Emacs is found
128128
docs/manual/install.org +14 −14
@@ -7,7 +7,7 @@
77- macOS 26 or later.
88- Optional, for the download version: GNU Emacs, for the features that hand work to it
99 (Emacs Lisp code blocks that need full Emacs, Lisp table formulas the built-in
10 interpreter can't run, and export to PDF through LaTeX, ODT and ASCII). See
10 interpreter can't run, and export to PDF through LaTeX and ASCII). See
1111 [[file:guide/15-alongside-emacs.org][Working alongside Emacs and other tools]].
1212
1313* The Mac app
@@ -52,19 +52,19 @@ App Store version.
5252
5353** What it does differently
5454
55| Feature | Mac App Store version | Download version |
56|----------------------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------|
57| Code blocks | Emacs Lisp in orgstar's own interpreter, JavaScript in JavaScriptCore | Every language installed; Emacs Lisp in Emacs; JavaScript in node, or JavaScriptCore without it |
58| Sessions, graphics | JavaScript sessions; no graphics | Yes |
59| Tangling | Yes | Yes |
60| Table formulas | Those orgstar computes itself | The rest in Emacs as well |
61| Plots | Drawn with Swift Charts | gnuplot when installed, else Swift Charts |
62| Export | HTML, Markdown, PDF, Word, RTF, plain text, iCalendar, LaTeX; publishing | Also PDF through LaTeX, ODT and ASCII, in Emacs |
63| Settings | In the app's container, or a folder you choose | =~/.config/orgstar= |
64| Files outside your folders | After you grant access to their folder | Directly |
65| Attachments | Copied, or moved from inside your folders | Copied, moved, linked or symlinked |
66| Updates | The Mac App Store | Built in, or Homebrew |
67| orgstar+ | In-app purchase, shared with iPhone and iPad | License key |
55| Feature | Mac App Store version | Download version |
56|----------------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------|
57| Code blocks | Emacs Lisp in orgstar's own interpreter, JavaScript in JavaScriptCore | Every language installed; Emacs Lisp in Emacs; JavaScript in node, or JavaScriptCore without it |
58| Sessions, graphics | JavaScript sessions; no graphics | Yes |
59| Tangling | Yes | Yes |
60| Table formulas | Those orgstar computes itself | The rest in Emacs as well |
61| Plots | Drawn with Swift Charts | gnuplot when installed, else Swift Charts |
62| Export | HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar, LaTeX; publishing | Also PDF through LaTeX and ASCII, in Emacs |
63| Settings | In the app's container, or a folder you choose | =~/.config/orgstar= |
64| Files outside your folders | After you grant access to their folder | Directly |
65| Attachments | Copied, or moved from inside your folders | Copied, moved, linked or symlinked |
66| Updates | The Mac App Store | Built in, or Homebrew |
67| orgstar+ | In-app purchase, shared with iPhone and iPad | License key |
6868
6969A block in another language reports "/language/ blocks don't run in this version of
7070orgstar." An Emacs Lisp block that uses more than the interpreter has reports "This block uses