docs/manual/guide/12-export.org

a15753a827b5ab7a0ccf3a0873890771c2979ee7
orgstar/docs/manual/guide/12-export.org

567 lines · 65799 bytes

  1#+TITLE: Export
  2#+DESCRIPTION: Exporting Org files from orgstar to HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar, LaTeX, ASCII and reveal.js slides, and to PDF through LaTeX with Emacs; copying as rich text; presenting a file as slides.
  3#+LEDE: orgstar exports HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar, LaTeX, ASCII and reveal.js slides itself, and the Mac download version hands LaTeX-made PDF to Emacs.
  4
  5* Exporting a file
  6
  7Export works on the file in the current editor, using its text as it is now, saved or not. It applies to Org files only; in any other file the command says "Not an org file". Source blocks are never run during export. Results already in the file are exported as they are; see [[file:11-code-blocks.org][Code blocks]].
  8
  9** On the Mac
 10
 11| Format             | Command                          | Emacs preset  | Doom                          | Needs Emacs |
 12|--------------------+----------------------------------+---------------+-------------------------------+-------------|
 13| HTML               | Export to HTML                   | =C-c C-e h h= | =SPC m e h h=, =C-c C-e h h= | no          |
 14| HTML, then open it | Export to HTML and Open          | =C-c C-e h o= | =SPC m e h o=, =C-c C-e h o= | no          |
 15| Markdown           | Export to Markdown               | =C-c C-e m m= | =SPC m e m m=, =C-c C-e m m= | no          |
 16| PDF                | Export to PDF                    | —             | —                             | no          |
 17| Word               | Export to Word                   | —             | —                             | no          |
 18| RTF                | Export to RTF                    | —             | —                             | no          |
 19| Plain text         | Export to Plain Text             | —             | —                             | no          |
 20| 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         |
 21| LaTeX              | Export to LaTeX                  | =C-c C-e l l= | =C-c C-e l l=                 | no          |
 22| ODT                | Export to ODT                    | =C-c C-e o o= | =C-c C-e o o=                 | no          |
 23| ASCII text         | Export to Plain Text (ASCII)     | =C-c C-e t u= | =C-c C-e t u=                 | no          |
 24| reveal.js slides   | Export to reveal.js              | =C-c C-e v v= | =C-c C-e v v=                 | no          |
 25| reveal.js slides, then open them | Export to reveal.js and Open | =C-c C-e v b= | =C-c C-e v b=   | no          |
 26| iCalendar          | Export to iCalendar              | =C-c C-e c f= | =C-c C-e c f=                 | no          |
 27| iCalendar, every agenda file | Export Agenda Files to iCalendar | =C-c C-e c a= | =C-c C-e c a=       | no          |
 28| iCalendar, agenda files in one | Combine Agenda Files into iCalendar | =C-c C-e c c= | =C-c C-e c c=  | no          |
 29
 30The keys follow Emacs's export dispatcher (=org-export-dispatch=). =C-c C-e= on its own is only a prefix: pause after it and the key hints list the formats. The =SPC m e= keys work in normal state; the =C-c C-e= keys work in every Doom state. The Mac preset has no keys for the single formats; its =⇧⌘E= opens the export dialog.
 31
 32All sixteen commands are in File ▸ Export and in the command palette. They write the export beside the Org file, with the same name and the format's extension: =.html=, =.md=, =.pdf=, =.docx=, =.rtf=, =.tex=, =.odt=, =.txt= or =.ics= (=.html= for reveal.js). The two agenda-file commands are the exceptions; see [[*iCalendar export][iCalendar export]]. =#+EXPORT_FILE_NAME:= names it instead, as in Org: relative to the Org file's folder (or absolute, or starting with =~=), with its extension replaced by the format's, so =#+EXPORT_FILE_NAME: out/report= writes =out/report.html=. A file already there is replaced. The message area shows "Exported to /name/", or "Exported the subtree to /name/", "Exported the body to /name/" or "Exported the subtree's body to /name/" when the export was not the whole file as a whole document.
 33
 34The fourteen commands that export the current file export the whole file as a whole document, unless the file is set otherwise. Two commands set it, as =C-s= and =C-b= do in Org's dispatcher:
 35
 36| Command                         | Emacs preset and Doom | Effect on the file's export commands                              |
 37|---------------------------------+-----------------------+-------------------------------------------------------------------|
 38| Turn Subtree Export On or Off   | =C-c C-e C-s=         | They export the subtree at the caret; see /Scope/ below.          |
 39| Turn Body-Only Export On or Off | =C-c C-e C-b=         | They leave out the title and the page; see /Body only/ below.     |
 40
 41Both are in the command palette, and the message area says what is now on. The choice is kept for the file, and it is the same one the export dialog shows as /Scope/ and /Body only/, so setting it in the dialog sets it for the commands too. With subtree export on and the caret before the first heading, a command says "Not in a subtree" and writes nothing. With body-only export on, a command for PDF, Word, RTF, plain text, ODT, iCalendar or reveal.js says "This format has no body-only export. Turn body-only export off for this file first." and writes nothing. The two agenda-file commands follow neither.
 42
 43The [[file:../install.org][Mac App Store version]] has the fifteen commands that don't need Emacs; File ▸ Export, the export dialog and the command palette leave out Export to PDF with Emacs, and a key bound to it runs Export to PDF. When the export file, or an =#+INCLUDE:= or =#+SETUPFILE:=, is outside your folders, orgstar first asks for access to its folder; for the export file, Save Elsewhere… instead picks another place. See [[file:../install.org][Install]].
 44
 45** The export dialog
 46
 47*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:
 48
 49- *Format*: HTML, Markdown, PDF, Word, Rich Text (RTF), Plain text, PDF via LaTeX (Emacs), ODT, LaTeX, Plain text, ASCII, iCalendar or reveal.js slides. The App Store version lists LaTeX, Plain text, ASCII and reveal.js slides last.
 50- *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.
 51- *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; ASCII has no title block or table of contents. Not available for PDF, Word, RTF, plain text, ODT, iCalendar and reveal.js slides.
 52- *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.
 53- *Margins*, *Font* and *Page numbers*, for PDF: see /PDF export/.
 54- *Open after export*: opens the file in its default app when the export finishes.
 55
 56The dialog keeps the format, scope, body-only and *Open after export* settings for each file, by the file's path, in orgstar's preferences; nothing is written to the Org file, and a renamed or moved file starts again. They are saved when you click Export. A file exported for the first time starts with the format and *Open after export* setting last used, the whole file, and body only off. When the kept scope is the subtree and the caret is before the first heading, the dialog exports the whole file. The destination is not kept. The PDF settings are =config.toml= settings, and apply to every PDF export.
 57
 58** On iOS
 59
 60The Export menu offers HTML, Markdown, PDF, Word, Rich Text (RTF), Plain Text, ODT, iCalendar, LaTeX, Plain Text (ASCII) and reveal.js, 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, ODT and ASCII have no author unless the file has =#+AUTHOR:=. PDF through LaTeX is not available on iOS.
 61
 62Body Only in the Export menu leaves out the title and the page around the text, as in the Mac's export dialog, and is kept for each file. While it is on, PDF, Word, Rich Text (RTF), Plain Text, ODT, iCalendar and reveal.js say "This format has no body-only export. Turn body-only export off for this file first." Turn Body-Only Export On or Off, in Commands or on =C-c C-e C-b= with a hardware keyboard, changes the same setting. Export Subtree…, in the editor's Export menu, lists the formats for the subtree at the caret, and follows Body Only too. There is no subtree setting on iOS: the menu's formats always export the whole file.
 63
 64Print… in the Export menu prints the file; see [[*Printing][Printing]]. The Export menu also has Export Agenda Files to iCalendar and Combine Agenda Files into iCalendar (see [[*iCalendar export][iCalendar export]]). Export to HTML and Open, in Commands or on =C-c C-e h o= with a hardware keyboard, shows the HTML export in Quick Look, with the file's images in the page; nothing is written beside the Org file; it follows Body Only. Copy as Rich Text is in Commands too.
 65
 66* HTML export
 67
 68orgstar writes a complete HTML page: a small built-in stylesheet that follows the system's light or dark appearance, the title, an author and date line, the table of contents, then the document. It does not use Emacs, and its output is close to, but not the same as, =ox-html=.
 69
 70** Title, author and date
 71
 72| Keyword    | Effect                                                                   |
 73|------------+--------------------------------------------------------------------------|
 74| =#+TITLE:= | The page title and a top heading. Without one, the file's name is used.  |
 75| =#+AUTHOR:=| Shown under the title.                                                   |
 76| =#+DATE:=  | Shown under the title, after the author, as written.                     |
 77| =#+LANGUAGE:= | The page's =lang=, and the language of the words the export writes: the table of contents heading, =Figure N:= captions and the footnotes' label, as Org's =org-export-dictionary= translates them. Without one, =org-export-default-language= (=en=). |
 78
 79Keywords in files named by =#+SETUPFILE:= count, as they do in Org.
 80
 81** =#+OPTIONS=
 82
 83| Option  | Values                                | Default | Effect                                                                 |
 84|---------+---------------------------------------+---------+------------------------------------------------------------------------|
 85| =toc=   | =t=, =nil=, a number                  | =t=     | Table of contents, to the given depth. =t= goes to =H=.                |
 86| =num=   | =t=, =nil=, a number                  | =t=     | Section numbers, to the given depth. =t= goes to =H=.                  |
 87| =H=     | a number                              | =3=     | The deepest heading level the table of contents and numbering count.   |
 88| =tags=  | =t=, =nil=, =not-in-toc=              | =t=     | Heading tags; =not-in-toc= leaves them out of the table of contents.   |
 89| =todo=  | =t=, =nil=                            | =t=     | TODO keywords in headings.                                             |
 90| =pri=   | =t=, =nil=                            | =nil=   | Priority cookies in headings.                                          |
 91| =^=     | =t=, =nil=, ={}=                      | =t=     | =_= and =^= as subscripts and superscripts; ={}= only when braced, as in =x_{1}=. |
 92| =tex=   | =t=, =nil=                            | =t=     | LaTeX fragments and environments; =nil= drops them.                    |
 93| =title= | =t=, =nil=                            | =t=     | The title heading.                                                     |
 94| =author=| =t=, =nil=                            | =t=     | The author.                                                            |
 95| =date=  | =t=, =nil=                            | =t=     | The date.                                                              |
 96
 97A depth for =toc= or =num= larger than =H= is cut to =H=. Any value other than =nil= turns an option on. Other =#+OPTIONS= keys are ignored by HTML export. iCalendar export also reads =<= (see /iCalendar/ below) and =-=, which is on by default and turns =---=, =--= and =...= into dashes and an ellipsis in the text it writes.
 98
 99#+BEGIN_SRC org
100,#+TITLE: Field notes
101,#+AUTHOR: Sam
102,#+OPTIONS: toc:2 num:nil pri:t ^:{}
103#+END_SRC
104
105** Which headings are exported
106
107- A heading tagged with one of =#+EXCLUDE_TAGS= (=noexport= by default) is left out, with everything under it.
108- A heading whose title starts with =COMMENT= is left out.
109- A heading tagged =ARCHIVE= is exported as the heading alone, without its contents.
110- If any heading has one of =#+SELECT_TAGS= (=export= by default), only those headings, their ancestors and everything under them are exported.
111
112Each heading gets an =id= for links: its =CUSTOM_ID= property, or a slug made from its title. Headings are one level down from Org's: a top-level heading is an =<h2>=, since the title is the =<h1>=.
113
114** The page head
115
116Each =#+HTML_HEAD:= and =#+HTML_HEAD_EXTRA:= line goes into the page's =<head>= as written, in order. Use them for stylesheets and scripts:
117
118#+BEGIN_SRC org
119,#+HTML_HEAD: <link rel="stylesheet" href="notes.css">
120#+END_SRC
121
122The built-in stylesheet is always included first. Other =#+HTML_…= keywords are not used.
123
124** Math
125
126LaTeX fragments (=\(…\)=, =\[…\]=, =$…$=, =$$…$$=) and LaTeX environments are left in the page for MathJax. When the page has any, orgstar adds MathJax 3 from =cdn.jsdelivr.net=, so the page needs a network connection to show math. PDF export uses a copy of MathJax that comes with orgstar instead, so math in a PDF needs no network connection. Entities such as =\alpha= become their characters.
127
128** Includes
129
130=#+INCLUDE:= inserts another file before export, as =org-export-expand-include-keyword= does. Paths are relative to the Org file.
131
132| Form                                          | Effect                                                    |
133|-----------------------------------------------+-----------------------------------------------------------|
134| =#+INCLUDE: "part.org"=                       | The file's contents, read as Org; its includes are expanded too, up to eight levels. |
135| =#+INCLUDE: "part.org::*Heading"=             | Only the subtree with that heading.                        |
136| =#+INCLUDE: "part.org::#custom-id"=           | Only the subtree with that =CUSTOM_ID=.                    |
137| =#+INCLUDE: "code.sh" src sh=                 | The file in a source block.                                |
138| =#+INCLUDE: "log.txt" example=                | The file in an example block.                              |
139| =#+INCLUDE: "page.html" export html=          | The file in an export block.                               |
140| =quote=, =verse=, =center=, =comment=         | The file in a block of that kind.                          |
141| =:lines "5-10"=                               | Only those lines; either end may be left out.              |
142| =:minlevel 2=                                 | Shift the included headings so the shallowest is at that level. |
143
144A file that cannot be read is replaced by an empty line. In a file included as Org from another folder, relative =file:= links are rewritten relative to the Org file, as Org does: =[[file:pic.png]]= in =sub/part.org= becomes =[[file:sub/pic.png]]=. A link written without =file:=, such as =[[./pic.png]]=, comes back as =[[sub/pic.png]]=, which Org then reads as a link to a heading.
145
146** Macros
147
148={{{name(arguments)}}}= is replaced before export (=org-macro-replace-all=).
149
150| Macro                        | Replaced by                                                          |
151|------------------------------+----------------------------------------------------------------------|
152| =#+MACRO: name text=         | =text=, with =$1=, =$2=… replaced by the arguments.                   |
153| ={{{title}}}=, ={{{author}}}=, ={{{date}}}=, ={{{email}}}= | That keyword's value.                     |
154| ={{{keyword(NAME)}}}=        | The value of =#+NAME:=.                                               |
155| ={{{input-file}}}=           | The Org file's name.                                                  |
156| ={{{property(NAME)}}}=       | The value of property =NAME= of the entry the macro is in; =ITEM= gives the heading's title. Empty before the first heading. |
157| ={{{property(NAME,SEARCH)}}}= | The same for the entry =SEARCH= finds in this file: =*Title=, =#custom-id= or a title. |
158| ={{{n}}}=, ={{{n(name)}}}=   | A counter, increased at each use. =n(name,-)= repeats the current value; =n(name,5)= sets it to 5. |
159| ={{{time(format)}}}=         | The current time, formatted as =format-time-string= does.             |
160
161Arguments are separated by commas; write =\,= for a literal comma. Macros defined with =(eval …)=, and macros orgstar does not know, become empty. =#+MACRO:= definitions in setup files count.
162
163** Footnotes
164
165Footnote references, named or inline (=[fn:: text]=), become numbered superscript links. The notes are collected in a Footnotes section at the end, numbered in the order they are first referenced, each with a link back. A reference without a definition is exported as written.
166
167** Tables
168
169An Org table becomes an HTML =<table>=. If it has rules, the rows before the first rule are the header (=<thead>=) and the rest the body. =#+CAPTION:= gives the table a caption. =#+TBLFM:= lines are not exported.
170
171A table.el table (one drawn with =+=, =-= and =|=) becomes a table with each cell's =colspan= and =rowspan=, and the lines in a cell joined with line breaks. If its drawing is not a well-formed table, it is exported as preformatted text.
172
173** Images and links
174
175A link to an image file without a description becomes an =<img>=. The image types are =png=, =jpg=, =jpeg=, =gif=, =svg=, =webp=, =bmp=, =tif=, =tiff= and =avif=. =#+ATTR_HTML:= before the paragraph adds attributes (=:width 300 :alt "Map"=); without an =:alt=, the file name is used.
176
177An =attachment:= link is exported as a =file:= link to the file in its entry's attachment folder, with its full path, as Org's =org-attach-expand-links= does; when the entry has no attachment folder, to that name in the Org file's folder. An attached image therefore shows as an image.
178
179An image paragraph with =#+CAPTION:= or =#+ATTR_HTML:= becomes a =<figure>=; a caption is numbered "Figure 1:", "Figure 2:" and so on.
180
181Links to =.org= files point to the =.html= file of the same name. Links to headings (=[[*Heading]]=), to =CUSTOM_ID= targets and to radio targets point to the heading's or target's =id= on the page. =id:= links point to =#= and the ID. Other links are written as they are.
182
183** Source blocks and their results
184
185A source block is exported as =<pre><code class="language-LANG">=, with the code escaped and its common indentation removed. Code in a language the editor highlights is colored as the editor colors it: each token is a =<span>= with the class Emacs's htmlize gives its face (=org-keyword=, =org-string=, =org-comment=, =org-function-name=, =org-type=, =org-constant=, =org-property-name=, =org-variable-name=), and the page's stylesheet colors them with the theme's =syntax-= colors, light and dark. Other languages are exported plain; the =language-= class lets a script or stylesheet in =#+HTML_HEAD= highlight them. Noweb references are shown as written. Code references are covered in [[file:09-links.org][Links]]: labels come off the lines, =-n= and =+n= number them, and =[[(name)]]= links to the labelled line.
186
187The block's =:exports= header argument decides what appears. orgstar resolves it as running the block would: from the =#+begin_src= line, =#+HEADER:= lines, =header-args= properties and =#+PROPERTY:= lines (see [[file:11-code-blocks.org][Code blocks]]). Without one, it is =results= for =dot=, =plantuml=, =ditaa=, =gnuplot=, =latex= and =lilypond= blocks, as their Org defaults set it, and =code= for other languages.
188
189| =:exports=       | Exported                                  |
190|------------------+-------------------------------------------|
191| =code=           | The code.                                 |
192| =results=        | The block's existing =#+RESULTS:=.        |
193| =both=           | The code, then the results.               |
194| =none=           | Nothing.                                  |
195
196A =#+CALL:= line exports its existing results, never the call itself; =:exports code= or =none= on the call, or in the =header-args= properties where the call is, exports nothing. An inline =src_= block has =:exports results= by default: the ={{{results(…)}}}= after it is exported and its code is not. With =:exports code= the code is exported in =<code>= and the results are not; with =both=, both. An inline =call_= never appears itself, and the ={{{results(…)}}}= after it is always exported, whatever =:exports= says, as in Org.
197
198** Other blocks and elements
199
200| Org                              | HTML                                            |
201|----------------------------------+-------------------------------------------------|
202| =#+begin_example=                | =<pre>=                                         |
203| =: = lines                       | =<pre class="example">=                         |
204| =#+begin_quote=                  | =<blockquote>=                                  |
205| =#+begin_center=                 | =<div class="center">=                          |
206| =#+begin_verse=                  | =<p class="verse">=, lines and indentation kept |
207| =#+begin_export html=            | Its contents, as they are                       |
208| =#+begin_export= other formats   | Nothing                                         |
209| =#+begin_comment=                | Nothing                                         |
210| =#+begin_NAME=, any other name   | =<div class="NAME">= (a special block)          |
211| =@@html:…@@=                     | Its contents, as they are; other back-ends' snippets are dropped |
212| Plain, numbered and description lists | =<ul>=, =<ol>=, =<dl>=; checkboxes as =[X]=, =[-]=, =[ ]= |
213| Timestamps                       | =<time datetime="…">=                           |
214| Inline tasks                     | =<div class="inlinetask">= with the title in bold |
215| Dynamic blocks                   | Their contents                                  |
216| =-----=                          | =<hr>=                                          |
217
218Comments, drawers, property drawers, planning lines, clock lines and keywords are not exported.
219
220** Citations
221
222HTML and Markdown export handle citations the same way; see Citations below.
223
224* reveal.js export
225
226Export to reveal.js writes a slide deck for [[https://revealjs.com][reveal.js]], as Emacs's org-re-reveal package writes one (=org-re-reveal-export-to-html=), without Emacs, on the Mac and iOS. It writes a =.html= file, like HTML export, so the two replace each other unless =#+EXPORT_FILE_NAME:= tells them apart. Like PDF export, it needs [[file:../install.org][orgstar+]].
227
228The deck is one file that works without a network connection: reveal.js 6.0.2, its stylesheet, the theme and the plugins come with orgstar and are put in the page, and so are the images the file links to and the slides' background images. Open it in a browser and share it as it is. With =#+REVEAL_ROOT:=, the deck links to reveal.js there instead, as org-re-reveal does, and images stay links: =#+REVEAL_ROOT: https://cdn.jsdelivr.net/npm/reveal.js@6.0.2= uses a CDN, and a relative path a copy of reveal.js beside the deck. The files are read from reveal.js 6's =dist= folder (=dist/reveal.js=, =dist/theme/black.css=, =dist/plugin/notes.js=).
229
230The slides:
231
232- A title slide first, with the title, =#+SUBTITLE:=, the author and the date (=#+OPTIONS: author:nil= and the rest leave them out).
233- A table of contents slide, as for HTML export; =#+OPTIONS: toc:nil= leaves it out, as most decks do. Section numbers are as for HTML export; =num:nil= leaves them out.
234- A slide for each heading down to =H= (3 unless =#+OPTIONS: H:n= says otherwise). First-level headings go across; their children go down from them, as reveal.js's vertical slides. =#+REVEAL_HLEVEL: 2= puts second-level headings across too. Deeper headings are part of their slide, as HTML export writes them.
235- Text before the first heading, other than keywords, on a slide of its own after the title.
236- The footnotes on a last slide.
237
238Inside a slide, everything is as HTML export writes it: lists, tables, colored code, images, links, math (MathJax, put in the page when reveal.js is), and =#+BEGIN_EXPORT html= and =@@html:…@@= with their =reveal= forms. Headings tagged =noexport= and COMMENT headings are left out.
239
240| In the file | Effect |
241|-------------+--------|
242| =#+BEGIN_NOTES= … =#+END_NOTES= | Speaker notes, which reveal.js shows on =S=. |
243| =#+ATTR_REVEAL: :frag appear= | The next paragraph, list, table or block appears on its own step; any reveal.js fragment style, or =t= for =#+REVEAL_DEFAULT_FRAG_STYLE:= (plain =fragment= without one). |
244| =#+ATTR_REVEAL: :frag (appear)= | Before a list: each item on its own step. Several styles, =(grow shrink none)=, go to the items in order, the last one for the rest; =none= is no step. |
245| =:frag_idx 2=, =:frag_idx (3 2 1)= | The step's =data-fragment-index=; =-= is none. |
246| =#+REVEAL: split= | Starts a new slide with the same heading's settings. |
247| =#+REVEAL_HTML: …= | HTML put in the slide as written. |
248| =#+REVEAL_ROOT:= | Links to reveal.js there instead of putting it in the page. |
249| =#+REVEAL_THEME:= | One of reveal.js's themes (=black=, the default, =white=, =league=, =beige=, =night=, =serif=, =simple=, =sky=, =solarized=, =blood=, =moon=, =dracula=, =black-contrast=, =white-contrast=), or a stylesheet's path or URL ending in =.css=. |
250| =#+REVEAL_TRANS:=, =#+REVEAL_SPEED:= | The transition (=convex= by default) and its speed. |
251| =#+REVEAL_PLUGINS:= | The plugins, as a list: =(notes search zoom)= is the default. In a deck with reveal.js in the page, notes, search, zoom and math are available; others (markdown, highlight) need =#+REVEAL_ROOT:=. |
252| =#+REVEAL_INIT_OPTIONS:= | Options for =Reveal.initialize=, as JavaScript: =width: 1200, height: 800, margin: 0.1=. Several lines add up; they win over the defaults. |
253| =#+REVEAL_MARGIN:=, =#+REVEAL_MIN_SCALE:=, =#+REVEAL_MAX_SCALE:= | The same reveal.js options, as numbers. |
254| =#+REVEAL_TITLE_SLIDE:= | =nil= for no title slide, or HTML with =%t= (title), =%s= (subtitle), =%a= (author), =%e= (email, with =email:t=), =%d= (date), =%A= (=#+REVEAL_ACADEMIC_TITLE:=), =%m= (=#+REVEAL_MISCINFO:=) and =%%=. =#+OPTIONS: reveal_title_slide:nil= leaves it out too. |
255| =#+REVEAL_TITLE_SLIDE_BACKGROUND:= | Its background: a color, an image or a URL; =_SIZE=, =_POSITION=, =_REPEAT= and =_TRANSITION= variants as in org-re-reveal. |
256| =#+REVEAL_EXTRA_CSS:= | A stylesheet of one's own, put in the page when it can be read, else linked. |
257| =#+REVEAL_HEAD_PREAMBLE:=, =#+REVEAL_PREAMBLE:=, =#+REVEAL_POSTAMBLE:= | HTML in the head, before the slides and after them. |
258| =#+OPTIONS: reveal_control:nil= | Also =reveal_progress=, =reveal_history=, =reveal_center=, =reveal_slide_number= (=nil=, =t= or a format such as =c/t=), =reveal_rolling_links=, =reveal_keyboard=, =reveal_mousewheel=, =reveal_fragmentinurl=, =reveal_overview= and =reveal_pdfseparatefragments=, with org-re-reveal's defaults. |
259
260A heading's properties set its slide: =REVEAL_BACKGROUND= (a color, an image or a URL), =REVEAL_BACKGROUND_SIZE=, =REVEAL_BACKGROUND_POSITION=, =REVEAL_BACKGROUND_REPEAT=, =REVEAL_BACKGROUND_TRANS=, =REVEAL_BACKGROUND_OPACITY=, =REVEAL_BACKGROUND_IFRAME=, =REVEAL_BACKGROUND_VIDEO=, =REVEAL_DATA_TRANSITION=, =REVEAL_DATA_STATE=, =HTML_CONTAINER_CLASS= (its =class=) and =REVEAL_EXTRA_ATTR= (attributes as written).
261
262Code keeps the editor theme's colors: the dark ones on a dark reveal.js theme (black, league, night, moon, blood, dracula, black-contrast), the light ones on the others.
263
264On the Mac, Export to reveal.js (=C-c C-e v v= in the Emacs preset and Doom) and Export to reveal.js and Open (=C-c C-e v b=) are in File ▸ Export and the command palette, and the export dialog has /reveal.js slides/. On iOS, reveal.js is in the Export menu. Publishing writes decks with =publishing-function = "org-re-reveal-publish-to-reveal"=.
265
266Differences from org-re-reveal:
267
268- Without =#+REVEAL_ROOT:= the deck has reveal.js in it, where org-re-reveal links to =./reveal.js= (or puts it in the page with =reveal_single_file:t=).
269- The files linked under =#+REVEAL_ROOT:= are reveal.js 6's (=dist/plugin/notes.js=), not reveal.js 4's (=plugin/notes/notes.js=).
270- The default plugins are notes, search and zoom; org-re-reveal's list also has markdown.
271- Slide ids are =slide-= and the heading's id as HTML export makes it (=slide-introduction=), not =slide-org…= ids that change with each export. Links to headings go to their slides.
272- Headings below =H= are headings, as in orgstar's HTML export, not list items.
273- Not read: =#+REVEAL_EXTRA_JS:=, =#+REVEAL_SLIDE_HEADER:= and =#+REVEAL_SLIDE_FOOTER:=, =#+REVEAL_INIT_SCRIPT:=, =#+REVEAL_HIGHLIGHT_CSS:=, =#+REVEAL_MULTIPLEX_…=, =#+REVEAL_TOC_SLIDE_…=, =:code_attribs= and other =#+ATTR_REVEAL= attributes than =:frag= and =:frag_idx=, and =org-re-reveal='s customizable variables.
274
275* Presenting
276
277Present shows the file one heading at a time, full screen, as org-present and org-tree-slide show it in Emacs. Each slide is a heading's line, without its stars and tags, and its text, in the editor's theme at a size that fills the screen; its children are the slides after it. A title slide comes first when the file has =#+TITLE:=, =#+AUTHOR:= or =#+DATE:=, or text before the first heading. Planning lines, drawers, keywords and comments don't show; image links on lines of their own show as images; =#+BEGIN_NOTES= blocks are the slide's notes. Headings tagged =noexport= and COMMENT headings are left out, with their children. A slide too long for the screen scrolls. Present needs no orgstar+, and nothing is written.
278
279On the Mac, View ▸ Present (=⌃⌘P=), also in the command palette, opens the slides in a full-screen window at the heading the caret is in.
280
281| Key | Does |
282|-----+------|
283| =→=, =↓=, Space, Page Down, Return | Next slide |
284| =←=, =↑=, Delete, Page Up | Previous slide |
285| Home, End | First and last slide |
286| Escape | Leave, as Done does |
287
288On iOS, Present is in the editor's Commands, starting at the caret's heading, and in the reader's, starting at the beginning. Tap the right two thirds of the screen or swipe left for the next slide, tap the left third or swipe right for the previous one, and tap Done to leave. With a hardware keyboard the keys above work too.
289
290On an iPad with an external display and Stage Manager off, the slide shows on the display, and the iPad shows the next slide, the current slide's notes, the slide number, Previous and Next. With Stage Manager on, the display is an extended desktop and shows windows, not the slide.
291
292* PDF export
293
294Export to PDF makes the HTML export into a PDF, laid out and split into pages by the system's web engine as printing does. It needs neither Emacs nor TeX, and works on iOS. The PDF has what the HTML export has: the title, the byline, the table of contents, colored code, tables, images and math (MathJax, which comes with orgstar and needs no network connection). For the page:
295
296- Colors are always the light ones, whatever the system's appearance.
297- Pages are US Letter where that is the usual size and A4 elsewhere; on the Mac, the paper size set for printing.
298- Code blocks, tables, figures and quotes are kept on one page when they fit, and a heading is not left at the bottom of a page.
299- Margins are 50 points on every side (=pdf-margin= under =[orgstar]= in =config.toml=; Margins in the Export dialog).
300- The text is in the export's own font, or the family =pdf-font= names (Font in the dialog). Code stays monospaced.
301- Each page's number is centred in its bottom margin (=pdf-page-numbers=; Page numbers in the dialog). The numbers are annotations on the pages, so the table of contents and other links keep working.
302
303For typeset output with LaTeX's classes and packages, use Export to PDF with Emacs instead (see /Exporting through Emacs/).
304
305* Printing
306
307Printing makes the same pages as Export to PDF, with its margins, font and page numbers, and hands them to the system's print panel, which shows a preview and the printer's own choices. Pages that don't fit the paper chosen there are scaled down to fit. Like PDF export, printing a file needs [[file:../install.org][orgstar+]], since the print panel can save a PDF; printing the agenda doesn't (see [[file:07-agenda.org][Agenda]]).
308
309| Command          | Prints                                                                                                   |
310|------------------+----------------------------------------------------------------------------------------------------------|
311| Print…           | The whole file.                                                                                          |
312| Print Subtree…   | The subtree at the caret, as a document of its own, as the export dialog's /Scope/ exports it. "Not in a subtree" before the first heading. |
313| Print Selection… | The selected text, under the file's title and with its =#+= keywords. "No text is selected" without a selection. |
314
315On the Mac the three are in the File menu and the command palette; Print… is =⌥⌘P=, since =⌘P= is Quick Open. File ▸ Page Setup… sets the paper size and orientation the pages are laid out for. Body Only and the file's subtree export setting don't apply to printing.
316
317On iOS, Print… is in the Export menu and prints the whole file; Export Subtree… has Print… for the subtree; all three commands are in Commands, where Print Selection… is greyed without a selection. The pages are US Letter or A4, as for PDF export, and the system's print sheet scales them to the paper.
318
319The text printed is the editor's, saved or not, as for export. An entry encrypted with =crypt= prints as its encrypted message unless it has been decrypted in the file (Decrypt Entry in File…); one only opened with Decrypt Entry… stays encrypted in the print. See [[file:04-outlines.org][Outlines]].
320
321* LaTeX export
322
323Export to LaTeX writes the =.tex= file that Emacs's =org-latex-export-to-latex= writes under =emacs -Q= (Org 9.8.7), without Emacs, on the Mac and iOS. It has the same preamble, sectioning, lists, tables, verbatim source blocks, figures, footnotes, links and escaping. Two things differ: the =\label= keys are made from the document, so they stay the same between exports, where Emacs picks new random ones each time; and =\author= is the name of the Mac's user account, which is what =user-full-name= usually is, unless the file has =#+AUTHOR:=.
324
325It reads:
326
327| Keyword                  | Effect                                                                   |
328|--------------------------+--------------------------------------------------------------------------|
329| =#+LATEX_CLASS:=         | =article= (the default), =report= or =book=, with Org's default sectioning |
330| =#+LATEX_CLASS_OPTIONS:= | Replaces =[11pt]= in =\documentclass=                                    |
331| =#+LATEX_HEADER:=        | Lines added after the packages                                           |
332| =#+LATEX_HEADER_EXTRA:=  | Lines added after those                                                   |
333| =#+LATEX_COMPILER:=      | =pdflatex= (the default), =xelatex= or =lualatex=: the packages for that engine |
334| =#+ATTR_LATEX:=          | On tables (=:environment=, =:align=, =:width=, =:float=, =:placement=, =:center=, =:font=, =:caption=, =:options=), images (=:width=, =:height=, =:scale=, =:options=, =:float=, =:placement=, =:center=), lists, quote, example and special blocks |
335
336=#+TITLE=, =#+SUBTITLE=, =#+AUTHOR=, =#+DATE=, =#+KEYWORDS=, =#+DESCRIPTION=, =#+LANGUAGE= and =#+OPTIONS= work as in Emacs, as do the tags and =COMMENT= that leave headings out (see /Which headings are exported/). Body-only and subtree export are in the export dialog. In a subtree export, the heading's =EXPORT_LATEX_CLASS=, =EXPORT_LATEX_CLASS_OPTIONS=, =EXPORT_LATEX_HEADER=, =EXPORT_LATEX_HEADER_EXTRA=, =EXPORT_LATEX_COMPILER=, =EXPORT_SUBTITLE=, =EXPORT_KEYWORDS=, =EXPORT_DESCRIPTION= and =EXPORT_LANGUAGE= properties replace the file's keywords. As in Emacs, a =PROPERTY+= line adds its value to the property's, after a space.
337
338A file with something this export doesn't handle stops with "Can't export to LaTeX: " and what it was, rather than giving a =.tex= that differs from Emacs's: a LaTeX class other than the three, Babel or Polyglossia in the header, citations, radio targets, inline tasks, table.el tables, inline source blocks and calls, =#+CALL=, source blocks exported with their results, footnote definitions of several paragraphs, footnotes in headings, tables or item tags, =:mode math= and long tables, =UNNUMBERED= and =ALT_TITLE=, =tex:verbatim=, a quote or center block whose first line holds only spaces and whose second line is not blank, a keyword such as =#+SUBTITLE= repeated with an empty value, plain (unbracketed) links of types it doesn't write, such as =id:= and =info:=, plain links to images, a plain link that runs on into markup such as =shell:a_b=, and =#+OPTIONS= items other than =toc=, =num=, =H=, =tags=, =todo=, =pri=, =^=, =tex=, =title=, =author=, =date=, =-= and =timestamp= set to something other than Org's default. A link Emacs can't resolve stops the export in both, including a link to a heading, target or named element the export leaves out. On iOS the share sheet stops and the message shows at the bottom of the screen. Publishing to LaTeX stops with the file's name in the message. In the download version, when Emacs is installed, such a file is exported by Emacs instead (see /Exporting through Emacs/).
339
340* Word, RTF and plain text
341
342Export to Word, Export to RTF and Export to Plain Text make the HTML export into a document of that kind, as the system reads HTML: headings, emphasis, links, colored keywords and code, lists, and tables. Word files (=.docx=) are written by orgstar itself, so tables come through as Word tables; RTF keeps them too on the Mac. On iOS, where the system's HTML reader keeps no tables, Word's tables are made from the HTML export's tables, with header cells bold and the cells' text without its styles; RTF and plain text there have the cells' text but no table. Plain text is the same text without its styles: list bullets and table cells are kept, separated by tabs. Fonts are Helvetica Neue for text and Menlo for code, and the colors are the light ones.
343
344In Word files, the title has Word's Title style and headings have its Heading 1 to Heading 6 styles, so Word's navigation pane, outline view and contents fields find them. Images from =file:= links come through as pictures, as wide as their pixels at 96 to the inch, scaled to =#+ATTR_HTML: :width= when it is set, and no wider than the page. PNG, JPEG and GIF go in as they are; other formats the system can read, such as HEIC, WebP and TIFF, go in as PNG. SVG and images at web addresses are left out. RTF and plain text have no images.
345
346For Org's own ASCII layout, with underlined headings and drawn tables, use Export to Plain Text (ASCII); see /ASCII export/.
347
348** Copying as rich text
349
350*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.
351
352* ODT export
353
354Export 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.
355
356- The title, subtitle (=#+SUBTITLE:=), author and date come first, then the table of contents and the text. On the Mac, without =#+AUTHOR:=, the author is your account's full name, as =user-full-name= is in Emacs. Without =#+TITLE:= there is no title.
357- Headings are numbered by the word processor, to the depth =num= gives (=num:t= numbers every level). Headings deeper than =H= become list items. =#+TOC: headlines= puts a table of contents where it is; =local= limits it to the section, counts the depth from there and leaves out the title.
358- Footnotes are the word processor's own notes, numbered as ox-odt numbers them: those referred to in the text first, then those referred to only from other notes. A note referred to again shows its number.
359- 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.
360- 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.
361- LaTeX fragments and environments are kept as written, in code style, as ox-odt does without a MathML converter. Source blocks are not colored; a language Emacs has no mode for gets ox-odt's plain code style.
362- Without =:exports=, every source block exports its code, =dot=, =plantuml=, =ditaa=, =gnuplot=, =latex= and =lilypond= included: =emacs -Q= loads no Babel library to give them =results=, so their =#+RESULTS:= are left out, with or without =:file=. With =:exports results= or =both=, the =#+RESULTS:= already in the file are exported as they are. A line of only spaces in a source block is exported empty, unless =-i= keeps the indentation.
363- Of the =#+OPTIONS=, =\n=, =f=, =|=, =e= and =d= (=t= or =nil=) are read, along with those every export reads.
364- =#+ODT:= lines, =#+BEGIN_EXPORT odt= blocks and =@@odt:...@@= snippets go in as they are.
365- The styles (=styles.xml=) are orgstar's own: A4 pages with 2 cm margins. =#+ODT_STYLES_FILE:= is not read.
366
367The 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, a table in a quote or other block inside a list, an annotation in a dated document, =#+TOC:= with =:target=, and these =#+OPTIONS= at other than their default: =p=, =c=, =prop=, =broken-links=, =:=, =*=, =stat=, =tasks=, =<=, =arch=, =email=, ='=, =tex= other than =t= or =nil=, and =d= with a list of drawers. ODT export is always the whole document: the export dialog's *Body only* doesn't apply.
368
369* ASCII export
370
371Export to Plain Text (ASCII) writes the =.txt= file that Emacs's =org-ascii-export-to-ascii= writes under =emacs -Q= (Org 9.8.7), without Emacs, on the Mac and iOS: a centered title block, a table of contents, numbered headings underlined by level, paragraphs filled to 72 columns, links listed at the end of their section, and footnotes at the end. It uses Org's default =ascii= charset (=org-ascii-charset=), so bullets, rules and table borders are plain ASCII characters. Without =#+AUTHOR:=, the author on the Mac is your account's full name, as =user-full-name= is in Emacs.
372
373=#+TITLE=, =#+SUBTITLE=, =#+AUTHOR=, =#+DATE=, =#+LANGUAGE=, =#+TOC: headlines=, =#+ASCII:= lines, =#+BEGIN_EXPORT ascii= blocks, =@@ascii:...@@= snippets, =#+ATTR_ASCII: :width= on horizontal rules, and the =center=, =justifyleft= and =justifyright= blocks work as in Emacs, as do the tags and =COMMENT= that leave headings out (see /Which headings are exported/). Body-only and subtree export are in the export dialog. In a subtree export, the heading's =EXPORT_TITLE=, =EXPORT_SUBTITLE=, =EXPORT_AUTHOR=, =EXPORT_DATE=, =EXPORT_LANGUAGE=, =EXPORT_OPTIONS=, =EXPORT_SELECT_TAGS= and =EXPORT_EXCLUDE_TAGS= properties replace the file's keywords. Leading tabs in a source block become spaces, as in Emacs.
374
375A file with something this export doesn't handle stops with "Can't export to plain text: " and what it was, rather than giving a =.txt= that differs from Emacs's: citations and =#+BIBLIOGRAPHY=, radio targets, inline tasks, table.el tables, diary sexps, inline source blocks and calls, =#+CALL=, source blocks exported with their results, =#+RESULTS= without a source block, wide or combining characters (such as CJK text, emoji and combining accents), also in the =#+LANGUAGE= words for captions, for section references in footnotes, and for a link's note when they take a line past the text width, tabs outside source and example blocks or in the indentation of an indented source block, footnote definitions of several paragraphs, footnotes in headings, keywords, captions or other footnotes, =UNNUMBERED= and =ALT_TITLE=, tables with special columns or column groups, empty list items, alphabetical counters, affiliated keywords in list items, blocks whose first line is blank, headings inside blocks, numbered source blocks inside other blocks, verse blocks with more than text, links inside link descriptions, =doi=, =info=, =irc=, =attachment=, =docview=, =bbdb=, =bibtex=, =gnus=, =rmail=, =mhe=, =w3m= and =eww= links, plain links other than =http=, =https=, =mailto= and =file= in any case, links to =<<targets>>= and named elements, short or repeated captions, unknown entities, a keyword such as =#+SUBTITLE= repeated with an empty value, =#+TOC:= other than =headlines= or with =local= or =:target=, and =#+OPTIONS= items other than =toc=, =num=, =H=, =tags=, =todo=, =pri=, =^=, =tex=, =title=, =author=, =date=, =-=, =<= and =timestamp= set to something other than Org's default. A link Emacs can't resolve stops the export in both, including a link to a heading the export leaves out, as does a described link to a heading with =#+LANGUAGE: sl=. On iOS the share sheet stops and the message shows at the bottom of the screen. Publishing to plain text stops with the file's name in the message. In the download version, when Emacs is installed, such a file is exported by Emacs instead (see /Exporting through Emacs/).
376
377* Markdown export
378
379Markdown export writes GitHub-flavored Markdown:
380
381- =#+TITLE:= becomes a top =#= heading. Org headings are one level down: =*= is =##=. TODO keywords stay in the heading text, and tags are shown as inline code. Priority cookies are left out unless =#+OPTIONS= has =pri:t=.
382- Source blocks become fenced code blocks with the language; example blocks, =: = lines and table.el tables become fenced blocks without one.
383- Tables become pipe tables. A rule after the first row makes it the header; otherwise the header row is empty.
384- Checkboxes become task-list items (=- [x]=, =- [ ]=).
385- Footnotes become =[^1]= references with the notes at the end.
386- Quotes become =>= blocks. Verse lines end with two spaces.
387- Images become =![](path)=. Links to =.org= files, with or without =file:=, point to the =.md= file of the same name; a search option after =::= is dropped.
388- =#+begin_export= blocks for =markdown=, =md= or =html=, and =@@html:…@@= snippets, are copied as they are.
389- Underline, subscripts and superscripts are written as HTML tags.
390- =:exports= is handled as in HTML export.
391- Citations are handled as in HTML export.
392
393As in HTML export, =#+INCLUDE:= lines are expanded and macros replaced first, and =#+EXCLUDE_TAGS=, =#+SELECT_TAGS=, =COMMENT= headings and =ARCHIVE= tags decide which headings are exported (see /Which headings are exported/). Of the =#+OPTIONS=, Markdown export reads =todo=, =pri=, =tags=, =^= and =title=; the others do not apply. It writes no author or date.
394
395* iCalendar export
396
397iCalendar export writes the =.ics= file =org-icalendar-export-to-ics= writes, for calendar apps to read or subscribe to. Each heading can give:
398
399- a =VEVENT= for its =DEADLINE= and one for its =SCHEDULED= date, as =org-icalendar-use-deadline= and =org-icalendar-use-scheduled= say. Their summaries start with =DL: = and =S: =;
400- a =VEVENT= for each other timestamp in its title and text, active ones only unless =#+OPTIONS= has =<:t= or =<:inactive=;
401- a =VTODO= for a task, as =org-icalendar-include-todo= says. Its =DTSTART= is the scheduled date (with =todo-start= in =org-icalendar-use-scheduled=), its =DUE= the deadline (with =todo-due= in =org-icalendar-use-deadline=); without a scheduled date, a deadline with a =+= repeater starts its warning period before it. =STATUS= is =NEEDS-ACTION= or =COMPLETED=, and =PRIORITY= maps =A= to 1, =B= to 5 and =C= to 9.
402
403| Setting                              | Values                                                                                        | Default                        |
404|--------------------------------------+-----------------------------------------------------------------------------------------------+--------------------------------|
405| =org-icalendar-use-deadline=         | =event-if-not-todo=, =event-if-todo=, =event-if-todo-not-done=, =todo-due=, separated by spaces | ="event-if-not-todo todo-due"= |
406| =org-icalendar-use-scheduled=        | the same, with =todo-start= for =todo-due=                                                    | ="todo-start"=                 |
407| =org-icalendar-include-todo=         | =nil=, =t= (tasks not done), =all=, =unblocked= (not done, without unfinished children, and not after an unfinished sibling under an =ORDERED= parent), or TODO keywords separated by spaces | ="nil"= |
408| =org-icalendar-combined-agenda-file= | the file Combine Agenda Files into iCalendar writes                                           | ="~/org.ics"=                  |
409
410The summary is the heading's title, or its =SUMMARY= property. The description is the heading's text as Org's ASCII export writes it, filled to 70 columns, or its =DESCRIPTION= property; =LOCATION=, =CLASS=, =TIMEZONE= and =APPT_WARNTIME= (an alarm, minutes before a timed event) are read too. =CATEGORIES= lists the heading's tags and its category. An =ID= property is the =UID=; a heading without one gets a new random =UID= each time, as in Org with =org-icalendar-store-UID= nil. Repeaters become =RRULE= lines. Times are local times without a zone, as Org writes them by default; a =TIMEZONE= property of =UTC= writes them in UTC, and any other value names the zone (=TZID=).
411
412=#+ICALENDAR_EXCLUDE_TAGS:= lists tags whose subtrees are left out; =#+EXCLUDE_TAGS:= doesn't apply, so =noexport= subtrees are exported unless listed. =#+SELECT_TAGS=, =COMMENT= headings and =ARCHIVE= tags apply as in the other exports. =#+ICAL-TTL:= sets =X-PUBLISHED-TTL=, the refresh period, such as =PT1H=. The calendar is named after the file, its description is =#+TITLE:=, and its owner =#+AUTHOR:= or your full name. Lines longer than 75 characters are folded and lines end in CRLF, as RFC 5545 asks.
413
414Export Agenda Files to iCalendar writes an =.ics= beside each agenda file (see [[file:07-agenda.org][The agenda]]). Combine Agenda Files into iCalendar writes all their entries to one calendar named =OrgMode= at =org-icalendar-combined-agenda-file=. On iOS, the Export menu's iCalendar shares the current file's calendar, Export Agenda Files to iCalendar writes beside each agenda file as on the Mac, and Combine Agenda Files into iCalendar opens the share sheet with the combined calendar, named as =org-icalendar-combined-agenda-file= is; from Commands it opens in Quick Look, whose share button saves or sends it.
415
416Differences from Org: diary sexps (=%%(…)= lines and =<%%(…)>= timestamps) are left out, as they need Emacs's =icalendar.el=. The other =org-icalendar-*= variables keep Org's defaults: alarms only from =APPT_WARNTIME=, categories =(local-tags category)=, the whole body as the description, and local times. Descriptions of tables with column groups or alignment cookies, center blocks and links to targets can differ from Org's in layout.
417
418* Publishing
419
420Publishing (=org-publish=) exports a folder of Org files to a folder of HTML, Markdown, LaTeX, ODT, plain text or reveal.js 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:
421
422#+BEGIN_SRC toml
423[[publish]]
424name = "notes"
425base-directory = "~/notes"
426publishing-directory = "~/public_html"
427recursive = true
428auto-sitemap = true
429sitemap-title = "Notes"
430
431[[publish]]
432name = "static"
433base-directory = "~/notes"
434base-extension = "css\\|png\\|jpg"
435recursive = true
436publishing-directory = "~/public_html"
437publishing-function = "org-publish-attachment"
438
439[[publish]]
440name = "site"
441components = "notes static"
442#+END_SRC
443
444| Key                    | Value                                                                                       | Default                     |
445|------------------------+---------------------------------------------------------------------------------------------+-----------------------------|
446| =name=                 | The project's name                                                                          | required                    |
447| =base-directory=       | The folder of files to publish: absolute, =~/…=, or relative to the first folder in the sidebar | required                |
448| =publishing-directory= | Where the published files go, the same way                                                  | required                    |
449| =base-extension=       | The extension of the files to publish, an Emacs regexp such as ="css\\|png"=, or =any=   | ="org"=                     |
450| =recursive=            | Files in subfolders too                                                                     | =false=                     |
451| =exclude=              | An Emacs regexp on the file's path under =base-directory=; matching files are left out      |                             |
452| =include=              | More files, relative to =base-directory=, separated by spaces                              |                             |
453| =publishing-function=  | =org-html-publish-to-html=, =org-md-publish-to-md=, =org-latex-publish-to-latex=, =org-odt-publish-to-odt=, =org-ascii-publish-to-ascii=, =org-re-reveal-publish-to-reveal= or =org-publish-attachment= (copied as they are), several separated by spaces | =org-html-publish-to-html= |
454| =body-only=            | The export's body only                                                                      | =false=                     |
455| =auto-sitemap=         | Write a sitemap into =base-directory= and publish it with the rest                          | =false=                     |
456| =sitemap-filename=     | The sitemap's name                                                                          | ="sitemap.org"=             |
457| =sitemap-title=        | Its =#+TITLE=                                                                               | ="Sitemap for project NAME"= |
458| =sitemap-style=        | =tree= (folders nest) or =list=                                                             | ="tree"=                    |
459| =sitemap-sort-files=   | =alphabetically= (by title), =chronologically= or =anti-chronologically= (by =#+DATE=, else the file's date), or =nil= | ="alphabetically"= |
460| =sitemap-sort-folders= | In a =list= sitemap: =ignore= (no folders), =first=, =last= or =nil= (mixed)               | ="ignore"=                  |
461| =sitemap-ignore-case=  | Sort titles ignoring case                                                                   | =false=                     |
462| =components=           | For a project of projects: the projects' names, separated by spaces                        |                             |
463
464Files whose names start with a dot are left out. An Org file publishes to the same path under =publishing-directory=, named by =#+EXPORT_FILE_NAME= when it has one, with links to other =.org= files pointing to their =.html=. The sitemap lists each file as a link with its =#+TITLE= (or its name), as Org's default sitemap does.
465
466On the Mac, File ▸ Publish has the commands, which are also in the command palette. On iOS they are in Commands in the editor; Publish Project… lists the projects to choose from. As with the iOS share sheet, LaTeX, ODT and plain text published on iOS have no author unless the file has =#+AUTHOR:=.
467
468| Command                 | Emacs preset  | What it does                                               |
469|-------------------------+---------------+------------------------------------------------------------|
470| Publish Project…        | =C-c C-e P x= | Asks for a project and publishes it (=org-publish=)        |
471| Publish All Projects    | =C-c C-e P a= | =org-publish-all=                                          |
472| Publish Current File    | =C-c C-e P f= | The current file, in the first project that has it (=org-publish-current-file=) |
473| Publish Current Project | =C-c C-e P p= | The first project that has the current file (=org-publish-current-project=) |
474
475A file whose published copy is newer than it is skipped, as Org skips files that haven't changed; delete the copy to publish it again. The message area says how many files were published and how many were up to date. Differences from Org: preparation and completion functions, =:makeindex=, custom sitemap functions and the export options a project can set (=:with-toc=, =:html-head= and the rest) aren't read; set those with =#+OPTIONS= and the other keywords in the files, or a =#+SETUPFILE=.
476
477On iOS, orgstar can write only inside the folders you added. A relative =base-directory= or =publishing-directory= is read from the first folder. For a project whose =publishing-directory= is outside your folders, orgstar asks for a folder the first time it publishes the project ("Choose the folder /name/ publishes to"), and publishes there from then on. A project whose =base-directory= can't be read stops with "Can't read /name/'s base-directory".
478
479* Exporting through Emacs
480
481On the Mac, PDF through LaTeX is done by Emacs, with =org-latex-export-to-pdf=, the function Emacs's dispatcher uses.
482
483LaTeX and plain text go to Emacs (=org-latex-export-to-latex=, =org-ascii-export-to-ascii=) only for a file orgstar's own export can't write as Emacs would; see /LaTeX export/ and /ASCII export/. The [[file:../install.org][Mac App Store version]] doesn't run Emacs and has none of these exports.
484
485orgstar runs =emacs -Q --batch= in the Org file's folder. It opens the file, replaces its contents with the editor's current text without saving, and calls the function. Emacs writes the result beside the file, as it would itself; with a destination chosen in the export dialog, orgstar then moves it there. The message area shows "Exporting with Emacs…" and then "Exported to /name/".
486
487What you need:
488
489- Emacs, at =ORGSTAR_EMACS= or one of =/opt/homebrew/bin/emacs=, =/usr/local/bin/emacs=, =/Applications/Emacs.app/Contents/MacOS/Emacs=, =/run/current-system/sw/bin/emacs= or =/usr/bin/emacs=. Without it the export fails with "Emacs isn't installed, so this format can't be exported."
490- For PDF, a TeX installation that Emacs's LaTeX export can run. Emacs runs with your =PATH= plus =/opt/homebrew/bin=, =/usr/local/bin=, =/Library/TeX/texbin=, =/usr/bin= and =/bin=, the same as code blocks get, so =latexmk= and =pdflatex= from MacTeX or Homebrew are found when orgstar was opened from the Dock.
491
492Things to know:
493
494- =-Q= means Emacs does not load your init file. Your LaTeX classes, export settings and packages from it are not used; the export uses Org's defaults and what the file itself sets.
495- File-local variables are applied only when Emacs considers them safe.
496- =org-export-use-babel= is off, so no source blocks run.
497- An export that takes more than two minutes is stopped with "Emacs took too long to export."
498- Edit ▸ Cancel Running Task (=⌘.=) stops the export and shows "Export canceled". Starting another export or table recalculation in Emacs cancels the one that is running.
499- If Emacs fails, the message area shows the last line of its error output.
500
501To use your own Emacs configuration, or formats orgstar does not list, export from Emacs itself; see [[file:15-alongside-emacs.org][Alongside Emacs]].
502
503* Citations
504
505HTML and Markdown export process citations as Org's =basic= citation processor does (=oc-basic=).
506
507#+BEGIN_SRC org
508,#+bibliography: refs.bib
509,#+cite_export: basic author-year
510
511As shown in [cite:@smith2020], and again [cite/t:@smith2020; see @lee2019 p. 4].
512
513,#+print_bibliography:
514#+END_SRC
515
516** Bibliography files
517
518Each =#+bibliography:= line names one file, relative to the Org file, optionally in quotes. A file ending in =.json= is read as CSL-JSON; anything else is read as BibTeX, with =@string= abbreviations expanded and =@comment= and =@preamble= skipped. You can have several =#+bibliography:= lines; for a key in more than one file, the first file wins. The files of =org-cite-global-bibliography= (see [[file:13-configuration.org][Configuration]]) come after the file's own. Inserting and following citations are in [[file:09-links.org][Links]].
519
520** =#+cite_export:=
521
522=#+cite_export: PROCESSOR [BIBLIOGRAPHY-STYLE [CITATION-STYLE]]=.
523
524- With no =#+cite_export:=, or with =basic=, citations are processed.
525- With any other processor, such as =csl= or =biblatex=, orgstar leaves citations as they are written.
526- The citation style, which may include a variant (=text/bare=), is the default for citations that do not name one.
527
528** Citation styles
529
530A citation is =[cite:…]= or =[cite/style:…]= or =[cite/style/variant:…]=, holding one or more =@key= references separated by =;=. Each reference may have its own prefix and suffix, and the whole citation a common prefix and suffix.
531
532| Style                         | Output                                                                  |
533|-------------------------------+-------------------------------------------------------------------------|
534| default (none given)          | =(Author, Year)=                                                        |
535| =author=, =a=                 | =Author=                                                                |
536| =noauthor=, =na=              | =(Year)=                                                                |
537| =text=, =t=                   | =Author (Year)=                                                         |
538| =note=, =ft=                  | A footnote holding the =text= form                                      |
539| =numeric=, =nb=               | =(1)=, numbered by the cited works sorted by author; three or more in a row as =1-3= |
540| =nocite=, =n=                 | Nothing; the work is still listed in the bibliography                   |
541
542| Variant              | Effect                                     |
543|----------------------+--------------------------------------------|
544| =bare=, =b=          | No parentheses                             |
545| =caps=, =c=          | Capitalized author                         |
546| =bare-caps=, =bc=    | Both                                       |
547
548Works by the same author in the same year get =a=, =b=, … after the year. A key not found in any bibliography file shows as =??= and =????=. Citations in the title are dropped.
549
550For =note= citations, the blank before the citation is removed and punctuation right after it moves in front of the footnote mark, as =org-cite-adjust-note= does.
551
552** The bibliography
553
554=#+print_bibliography:= is replaced by an entry for every cited work, sorted by author. The bibliography style from =#+cite_export:= sets the form:
555
556| Bibliography style     | Entry                                                    |
557|------------------------+----------------------------------------------------------|
558| default                | =Author (Year). /Title/, Publisher.=                     |
559| =plain=                | =Surnames. Title, Publisher, Year.=                      |
560| =numeric=              | =[1] Author, /Title/, Publisher, Year.=                  |
561
562The publisher part comes from the =publisher=, =journal=, =institution= or =school= field. Without =#+print_bibliography:= no bibliography is written.
563
564* What export does not do
565
566- There is no asynchronous export.
567- Source blocks are not run, and noweb references are not expanded.
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form