1 #+TITLE: Org Export Reference Documentation
2 #+AUTHOR: Nicolas Goaziou
3 #+EMAIL: n.goaziou AT gmail DOT com
4 #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
5 #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate
6 #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
7 #+TAGS: Write(w) Update(u) Fix(f) Check(c) NEW(n)
12 [[file:../index.org][{Back to Worg's index}]]
14 This document is aimed at back-end developers for the generic export
15 engine =org-export.el=. It assumes a good understanding of Org
16 syntax --- as specified by /Org Elements/ --- from the reader.
18 It covers [[#back-end][back-end creation]] process, all [[#attributes][attributes]] associated to each
19 element or object type, properties offered by the [[#communication][communication
20 channel]] during export, the [[#filter-system][filter system]] internals and [[#toolbox][tools]] provided
26 A back-end is defined with ~org-export-define-backend~ macro. It
27 requires two mandatory arguments: the back-end name and its
28 translation table, an alist that associates element and object types
29 to translator functions. According to the macro doc-string:
32 These functions should return a string without any trailing space,
33 or nil. They must accept three arguments: the object or element
34 itself, its contents or nil when it isn't recursive and the property
35 list used as a communication channel.
37 Contents, when not nil, are stripped from any global indentation
38 (although the relative one is preserved). They also always end with
39 a single newline character.
41 If, for a given type, no function is found, that element or object
42 type will simply be ignored, along with any blank line or white
43 space at its end. The same will happen if the function returns the
44 nil value. If that function returns the empty string, the type will
45 be ignored, but the blank lines or white spaces will be kept.
47 In addition to element and object types, one function can be
48 associated to the ~template~ symbol and another one to the
51 The former returns the final transcoded string, and can be used to
52 add a preamble and a postamble to document's body. It must accept
53 two arguments: the transcoded string and the property list
54 containing export options.
56 The latter, when defined, is to be called on every text not
57 recognized as an element or an object. It must accept two
58 arguments: the text string and the information channel. It is an
59 appropriate place to protect special chars relative to the back-end.
62 Optionally, the macro can set-up back-end specific properties (like
63 values from specific buffer keywords) accessible from every
64 translator function with the ~:options-alist~ keyword. See
65 ~org-export-options-alist~ for details on the structure of the
68 As an example, the following excerpt from =e-latex= back-end
69 definition introduces three new buffer keywords (and their
70 headline's property counterpart), and redefine ~DATE~ default value:
72 #+BEGIN_SRC emacs-lisp
73 (org-export-define-backend e-latex
75 :options-alist ((:date "DATE" nil org-e-latex-date-format t)
76 (:latex-class "LATEX_CLASS" nil org-e-latex-default-class t)
77 (:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
78 (:latex-header-extra "LATEX_HEADER" nil nil newline)))
81 It is also possible, with ~:export-block~ keyword, to associate
82 given block names to the ~export-block~ type. Such blocks can
83 contain raw code that will be directly inserted in the output, as
84 long as the corresponding translator function says so.
86 In the following example, in the ~e-html~ back-end, =HTML= blocks
87 are export blocks. The associated translator function inserts their
88 contents as-is, and ignores any other export block.
90 #+BEGIN_SRC emacs-lisp
91 (org-export-define-backend e-html
93 (export-block . org-e-html-export-block)
97 (defun org-e-html-export-block (export-block contents info)
98 "Transcode a EXPORT-BLOCK element from Org to HTML.
99 CONTENTS is nil. INFO is a plist used as a communication
101 (when (string= (org-element-property :type export-block) "HTML")
102 (org-element-property :value export-block)))
105 Eventually ~org-export-define-backend~ allows to define back-ends
106 specific filters. Refer to [[#filter-system][The Filter System]] section for more
109 If the new back-end shares most properties with another one,
110 ~org-export-define-derived-backend~ macro can be used to simplify
111 the process. In the example below, we implement a new back-end
112 which behaves like =e-latex= excepted for headlines and the
115 #+BEGIN_SRC emacs-lisp
116 (org-export-define-derived-backend my-latex e-latex
117 :translate-alist ((headline . custom-headline-translator)
118 (template . custom-template)))
121 Back-ends defined with either function can be registered in the
122 export dispatcher using special keyword =:menu-entry= (and also
123 =:sub-menu-entry= for a derived back-end). See macros docstrings
124 for more information.
126 * Elements Attributes
128 :CUSTOM_ID: attributes
131 Element attributes are accessed with ~org-element-property~
132 function. Other accessors relative to elements are
133 ~org-element-type~ and ~org-element-contents~.
135 Each greater element, element and object has a fixed set of
136 properties attached to it. Among them, four are shared by all
137 types: ~:begin~ and ~:end~, which refer to the beginning and ending
138 buffer positions of the considered element or object, ~:post-blank~,
139 which holds the number of blank lines, or white spaces, at its end
140 and ~:parent~ which refers to the element or object containing it.
142 Greater elements, elements and objects containing objects will have
143 ~:contents-begin~ and ~:contents-end~ properties to delimit
144 contents. Greater elements and elements accepting affiliated
145 keywords will also have a ~:post-affiliated~ property, referring to
146 the buffer position after any affiliated keyword, when applicable.
148 In addition to these properties, each element can optionally get
149 some more from affiliated keywords, namely: ~:attr_ascii~,
150 ~:attr_docbook~, ~:attr_html~, ~:attr_latex~, ~:attr_odt~,
151 ~:caption~, ~:header~, ~:name~, ~:plot~, and ~:results~.
153 At the lowest level, a ~:parent~ property is also attached to any
154 string, as a text property.
156 Other properties, specific to each element or object, are listed
163 - ~:info~ :: Information about function being called, as returned
164 by ~ob-babel-lob-get-info~ (string).
169 No specific property.
175 - ~:hiddenp~ :: Non-nil if the block is hidden (boolean).
181 - ~:duration~ :: Clock duration for a closed clock, or nil (string
183 - ~:status~ :: Status of current clock (symbol: ~closed~ or
185 - ~:value~ :: Timestamp associated to clock keyword (timestamp
192 - ~:value~ :: Contents (string).
198 - ~:value~ :: Comments, with pound signs (string).
204 - ~:value~ :: Comments, without block's boundaries (string).
205 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
211 - ~:value~ :: Full Sexp (string).
217 - ~:drawer-name~ :: Drawer's name (string).
218 - ~:hiddenp~ :: Non-nil if the drawer is hidden (boolean).
220 /Note relative to export:/ The idea behind drawers is that they are
221 transparent export-wise. By default, they should return their
228 - ~:arguments~ :: Block's parameters (string).
229 - ~:block-name~ :: Block's name (string).
230 - ~:drawer-name~ :: Drawer's name (string).
231 - ~:hiddenp~ :: Non-nil if the block is hidden (boolean).
237 - ~:ascii~ :: Entity's ASCII representation (string).
238 - ~:html~ :: Entity's HTML representation (string).
239 - ~:latex~ :: Entity's LaTeX representation (string).
240 - ~:latex-math-p~ :: Non-nil if entity's LaTeX representation
241 should be in math mode (boolean).
242 - ~:latin1~ :: Entity's Latin-1 encoding representation (string).
243 - ~:name~ :: Entity's name, without backslash nor brackets
245 - ~:use-brackets-p~ :: Non-nil if entity is written with optional
246 brackets in original buffer (boolean).
247 - ~:utf-8~ :: Entity's UTF-8 encoding representation (string).
253 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
254 - ~:label-fmt~ :: Format string used to write labels in current
255 block, if different from
256 ~org-coderef-label-format~ (string or nil).
257 - ~:language~ :: Language of the code in the block, if specified
259 - ~:number-lines~ :: Non-nil if code lines should be numbered.
260 A ~new~ value starts numbering from 1 wheareas ~continued~
261 resume numbering from previous numbered block (symbol: ~new~,
263 - ~:options~ :: Block's options located on the block's opening line
265 - ~:parameters~ :: Optional header arguments (string or nil).
266 - ~:preserve-indent~ :: Non-nil when indentation within the block
267 mustn't be modified upon export (boolean).
268 - ~:retain-labels~ :: Non-nil if labels should be kept visible upon
270 - ~:switches~ :: Optional switches for code block export (string or
272 - ~:use-labels~ :: Non-nil if links to labels contained in the
273 block should display the label instead of the
274 line number (boolean).
275 - ~:value~ :: Contents (string).
281 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
282 - ~:type~ :: Related back-end's name (string).
283 - ~:value~ :: Contents (string).
289 - ~:back-end~ :: Relative back-end's name (string).
290 - ~:value~ :: Export code (string).
296 - ~:value~ :: Contents, with colons (string).
298 ** Footnote Definition
302 - ~:label~ :: Label used for references (string).
304 ** Footnote Reference
308 - ~:inline-definition~ :: Footnote's definition, when inlined
309 (secondary string or nil).
310 - ~:label~ :: Footnote's label, if any (string or nil).
311 - ~:raw-definition~ :: Uninterpreted footnote's definition, when
312 inlined (string or nil).
313 - ~:type~ :: Determine whether reference has its definition inline,
314 or not (symbol: ~inline~, ~standard~).
320 In addition to the following list, any property specified in
321 a property drawer attached to the headline will be accessible as an
322 attribute (with underscores replaced with hyphens and a lowercase
323 name, i.e. ~:custom-id~).
325 - ~:archivedp~ :: Non-nil if the headline has an archive tag
327 - ~:closed~ :: Headline's CLOSED reference, if any (timestamp
329 - ~:commentedp~ :: Non-nil if the headline has a comment keyword
331 - ~:deadline~ :: Headline's DEADLINE reference, if any (timestamp
333 - ~:footnote-section-p~ :: Non-nil if the headline is a footnote
335 - ~:hiddenp~ :: Non-nil if the headline is hidden (boolean).
336 - ~:level~ :: Reduced level of the headline (integer).
337 - ~:pre-blank~ :: Number of blank lines between the headline and
338 the first non-blank line of its contents
340 - ~:priority~ :: Headline's priority, as a character (integer).
341 - ~:quotedp~ :: Non-nil if the headline contains a quote keyword
343 - ~:raw-value~ :: Raw headline's text, without the stars and the
345 - ~:scheduled~ :: Headline's SCHEDULED reference, if any (timestamp
347 - ~:tags~ :: Headline's tags, if any, without the archive
348 tag. (list of strings).
349 - ~:title~ :: Parsed headline's text, without the stars and the
350 tags (secondary string).
351 - ~:todo-keyword~ :: Headline's TODO keyword without quote and
352 comment strings, if any (string or nil).
353 - ~:todo-type~ :: Type of headline's TODO keyword, if any (symbol:
360 No specific property.
366 - ~:info~ :: Information about function called, as returned by
367 ~org-babel-lob-get-info~ (list).
369 /Note relative to export:/ Since Babel related blocks are expanded
370 before parsing, these can safely be ignored by back-ends.
376 - ~:language~ :: Language of the code in the block (string).
377 - ~:parameters~ :: Optional header arguments (string or nil).
378 - ~:value~ :: Source code (string).
384 In addition to the following list, any property specified in
385 a property drawer attached to the headline will be accessible as an
386 attribute (with underscores replaced with hyphens and a lowercase
387 name, i.e. ~:custom-id~).
389 - ~:closed~ :: Inlinetask's CLOSED reference, if any (timestamp
391 - ~:deadline~ :: Inlinetask's DEADLINE reference, if any (timestamp
393 - ~:hiddenp~ :: Non-nil if the headline is hidden (boolean).
394 - ~:level~ :: Reduced level of the inlinetask (integer).
395 - ~:priority~ :: Headline's priority, as a character (integer).
396 - ~:raw-value~ :: Raw inlinetask's text, without the stars and the
398 - ~:scheduled~ :: Inlinetask's SCHEDULED reference, if any
399 (timestamp object or nil).
400 - ~:tags~ :: Inlinetask's tags, if any (list of strings).
401 - ~:title~ :: Parsed inlinetask's text, without the stars and the
402 tags (secondary string).
403 - ~:todo-keyword~ :: Inlinetask's TODO keyword, if any (string or
405 - ~:todo-type~ :: Type of inlinetask's TODO keyword, if any
406 (symbol: ~done~, ~todo~).
412 No specific property.
418 - ~:bullet~ :: Item's bullet (string).
419 - ~:checkbox~ :: Item's check-box, if any (symbol: ~on~, ~off~,
421 - ~:counter~ :: Item's counter, if any. Literal counters become
423 - ~:raw-tag~ :: Uninterpreted item's tag, if any (string or nil).
424 - ~:tag~ :: Parsed item's tag, if any (secondary string or nil).
425 - ~:hiddenp~ :: Non-nil if item is hidden (boolean).
426 - ~:structure~ :: Full list's structure, as returned by
427 ~org-list-struct~ (alist).
433 - ~:key~ :: Keyword's name (string).
434 - ~:value~ :: Keyword's value (string).
436 /Note relative to export:/ Each back-end should, as far as
437 possible, support a number of common keywords. These include:
439 - Back-end relative keyword (i.e. "LATEX" for =e-latex=), which
440 should always return its value as-is.
442 - "TARGET" keyword, which should always return a nil value.
444 - "TOC" keyword. It accepts four common values: "headlines",
445 "tables", "figures", "listings". Also, "headlines" value can
446 have an optional numeric argument to specify depth of the
449 See [[#collect-headlines][~org-export-collect-headlines~]], [[#collect-tables][~org-export-collect-tables~]],
450 [[#collect-figures][~org-export-collect-figures~]] and [[#collect-listings][~org-export-collect-listings~]].
458 - ~:begin~ :: Buffer position at first affiliated keyword or at the
459 beginning of the first line of environment (integer).
460 - ~:end~ :: Buffer position at the first non-blank line after last
461 line of the environment, or buffer's end (integer).
462 - ~:post-blank~ :: Number of blank lines between last environment's
463 line and next non-blank line or buffer's end
465 - ~:value~ :: LaTeX code (string).
471 - ~:value~ :: LaTeX code (string).
477 No specific property.
483 - ~:application~ :: Name of application requested to open the link
484 in Emacs (string or nil). It only applies to
486 - ~:path~ :: Identifier for link's destination. It is usually the
487 link part with type, if specified, removed (string).
488 - ~:raw-link~ :: Uninterpreted link part (string).
489 - ~:search-option~ :: Additional information for file location
490 (string or nil). It only applies to "file" type links.
491 - ~:type~ :: Link's type. Possible types (string) are:
492 - ~coderef~ :: Line in some source code,
493 - ~custom-id~ :: Specific headline's custom-id,
494 - ~file~ :: External file,
495 - ~fuzzy~ :: Target, target keyword, a named element or an
496 headline in the current parse tree,
497 - ~id~ :: Specific headline's id,
498 - ~radio~ :: Radio-target.
499 It can also be any ~org-link-types~ element.
502 /Notes relative to export:/
504 - A fuzzy link leading to a target keyword should be ignored during
505 export: it's an invisible target.
507 - A fuzzy link with no description should display the
508 cross-reference number of its target. This number can be:
510 - If link's destination is a target object within a footnote, it
511 will be footnote's number.
513 - If link's destination is a target object in a list, it will be
516 - If link leads to a named element, it will be the sequence number
517 of that element among named elements of the same type.
519 - Otherwise, it will be the number of the headline containing
522 See [[#get-ordinal][~org-export-get-ordinal~]] function.
528 - ~:args~ :: Arguments passed to the macro (list of strings).
529 - ~:key~ :: Macro's name (string).
530 - ~:value~ :: Replacement text (string).
532 /Note relative to export:/ Macro expansion takes place before
533 buffer parsing. As such, export back-ends don't have to handle:
534 they'll never see them.
538 Element containing objects.
540 No specific property.
546 - ~:structure~ :: Full list's structure, as returned by
547 ~org-list-struct~ (alist).
548 - ~:type~ :: List's type (symbol: ~descriptive~, ~ordered~,
555 - ~:closed~ :: Timestamp associated to closed keyword, if any
556 (timestamp object or nil).
557 - ~:deadline~ :: Timestamp associated to deadline keyword, if any
558 (timestamp object or nil).
559 - ~:scheduled~ :: Timestamp associated to scheduled keyword, if any
560 (timestamp object or nil).
566 - ~:hiddenp~ :: Non-nil if drawer is hidden (boolean).
567 - ~:properties~ :: Properties defined in the drawer (alist).
573 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
579 - ~:value~ :: Quoted text (string).
585 - ~:raw-value~ :: Uninterpreted contents (string).
591 No specific property.
597 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
598 - ~:type~ :: Block's name (string).
604 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
605 - ~:label-fmt~ :: Format string used to write labels in current
606 block, if different from
607 ~org-coderef-label-format~ (string or nil).
608 - ~:language~ :: Language of the code in the block, if specified
610 - ~:number-lines~ :: Non-nil if code lines should be numbered.
611 A ~new~ value starts numbering from 1 wheareas ~continued~
612 resume numbering from previous numbered block (symbol: ~new~,
614 - ~:parameters~ :: Optional header arguments (string or nil).
615 - ~:preserve-indent~ :: Non-nil when indentation within the block
616 mustn't be modified upon export (boolean).
617 - ~:retain-labels~ :: Non-nil if labels should be kept visible upon
619 - ~:switches~ :: Optional switches for code block export (string or
621 - ~:use-labels~ :: Non-nil if links to labels contained in the
622 block should display the label instead of the
623 line number (boolean).
624 - ~:value~ :: Source code (string).
630 - ~:value~ :: Full cookie (string).
636 No specific property.
642 - ~:use-brackets-p~ :: Non-nil if contents are enclosed in curly
649 - ~:use-brackets-p~ :: Non-nil if contents are enclosed in curly
656 - ~:tblfm~ :: Formulas associated to the table, if any (string or
658 - ~:type~ :: Table's origin (symbol: ~table.el~, ~org~).
659 - ~:value~ :: Raw ~table.el~ table or nil (string or nil).
665 No specific property.
669 Element containing objects.
671 - ~:type~ :: Row's type (symbol: ~standard~, ~rule~).
677 - ~:value~ :: Target's ID (string).
680 Notes relatives to export:
682 - Target should become an anchor, if back-end permits it.
683 - Target's ID shouldn't be visible on export.
689 - ~:day-end~ :: Day part from timestamp end. If no ending date is
690 defined, it defaults to start day part (integer).
691 - ~:day-start~ :: Day part from timestamp start (integer).
692 - ~:hour-start~ :: Hour part from timestamp end. If no ending date
693 is defined, it defaults to start hour part, if
694 any (integer or nil).
695 - ~:hour-start~ :: Hour part from timestamp start, if specified
697 - ~:minute-start~ :: Minute part from timestamp end. If no ending
698 date is defined, it defaults to start minute part, if any
700 - ~:minute-start~ :: Minute part from timestamp start, if specified
702 - ~:month-end~ :: Month part from timestamp end. If no ending date
703 is defined, it defaults to start month part
705 - ~:month-start~ :: Month part from timestamp start (integer).
706 - ~:raw-value~ :: Raw timestamp (string).
707 - ~:repeater-type~ :: Type of repeater, if any (symbol: ~catch-up~,
708 ~restart~, ~cumulate~ or nil)
709 - ~:repeater-unit~ :: Unit of shift, if a repeater is defined
710 (symbol: ~year~, ~month~, ~week~, ~day~, ~hour~ or nil).
711 - ~:repeater-value~ :: Value of shift, if a repeater is defined
713 - ~:type~ :: Type of timestamp (symbol: ~active~, ~active-range~,
714 ~diary~, ~inactive~, ~inactive-range~).
715 - ~:year-end~ :: Year part from timestamp end. If no ending date
716 is defined, it defaults to start year part
718 - ~:year-start~ :: Year part from timestamp start (integer).
724 No specific property.
730 - ~:value~ :: Contents (string).
734 Element containing objects.
736 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
738 * The Communication Channel
740 :CUSTOM_ID: communication
743 This is the full list of properties available during transcode
744 process, with their category (~option~ or ~tree~) and their value
756 Current back-end used for transcoding.
763 String to write as creation information.
770 String to use as date.
777 Description text for the current data.
791 Tags for exclusion of sub-trees from export process.
794 - type :: list of strings
798 Hash table used to memoize results from [[#data][~org-export-data~]].
805 List of global tags for buffer. Used by [[#get-tags][~org-export-get-tags~]] to
806 get tags with inheritance.
808 - type :: list of strings
810 ** ~:footnote-definition-alist~
812 /Alist/ between footnote labels and their definition, as parsed
813 data. Only non-inline footnotes are represented in this /alist/.
814 Also, every definition isn't guaranteed to be referenced in the
815 parse tree. The purpose of this property is to preserve
816 definitions from oblivion – i.e. when the parse tree comes from
817 a part of the original buffer –, it isn't meant for direct use in
818 a back-end. To retrieve a definition relative to a reference, use
819 [[#get-footnote-definition][~org-export-get-footnote-definition~]] instead.
822 - type :: alist (STRING . LIST)
824 ** ~:headline-levels~
826 :CUSTOM_ID: headline-levels
829 Maximum level being exported as an headline. Comparison is done
830 with the relative level of headlines in the parse tree, not
831 necessarily with their actual level.
836 ** ~:headline-numbering~
838 Alist between headlines' beginning position and their numbering, as
839 a list of numbers – cf. [[#get-headline-number][~org-export-get-headline-number~]].
842 - type :: alist (INTEGER . LIST)
844 ** ~:headline-offset~
846 Difference between relative and real level of headlines in the
847 parse tree. For example, a value of -1 means a level 2 headline
848 should be considered as level 1 —
849 cf. [[#get-relative-level][~org-export-get-relative-level~]].
856 List of elements and objects that will be unconditionally ignored
860 - type :: list of elements
864 Alist between ID strings and destination file's path, relative to
868 - type :: alist (STRING . STRING)
872 Full path to input file, if any.
875 - type :: string or nil
879 List of keywords attached to data.
886 Default language used for translations.
893 Whole parse tree, available at any time during transcoding.
896 - type :: list (as returned by ~org-element-parse-buffer~)
898 ** ~:preserve-breaks~
900 Non-nil means transcoding should preserve all line breaks.
903 - type :: symbol (nil, t)
905 ** ~:section-numbers~
907 Non-nil means transcoding should add section numbers to headlines.
910 - type :: symbol (nil, t)
914 :CUSTOM_ID: select-tags
917 List of tags enforcing inclusion of sub-trees in transcoding. When
918 such a tag is present, sub-trees without it are /de facto/ excluded
919 from the process. See [[#use-select-tags][~:use-select-tags~]].
922 - type :: list of strings
926 List of targets raw names encountered in the parse tree. This is
927 used to partly resolve "fuzzy" links —
928 cf. [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
931 - type :: list of strings
933 ** ~:time-stamp-file~
935 Non-nil means transcoding should insert a time stamp in the output.
938 - type :: symbol (nil, t)
940 ** ~:translate-alist~
942 Alist between element and object types and transcoding functions
943 relative to the current back-end. Special keys ~template~ and
944 ~plain-text~ are also possible.
947 - type :: alist (SYMBOL . FUNCTION)
949 ** ~:use-select-tags~
951 :CUSTOM_ID: use-select-tags
954 When non-nil, a select tags has been found in the parse tree.
955 Thus, any headline without one will be filtered out. See
956 [[#select-tags][~:select-tags~]].
959 - type :: interger or nil
961 ** ~:with-archived-trees~
963 Non-nil when archived sub-trees should also be transcoded. If it
964 is set to the ~headline~ symbol, only the archived headline's name
968 - type :: symbol (nil, t, ~headline~)
972 Non-nil means author's name should be included in the output.
975 - type :: symbol (nil, t)
979 Non-nil means clock keywords should be exported.
982 - type :: symbol (nil, t)
986 Non-nil means a creation sentence should be inserted at the end of
987 the transcoded string. If the value is ~comment~, it should be
991 - type :: symbol (~comment~, nil, t)
995 Non-nil means drawers should be exported. If its value is a list
996 of names, only drawers with such names will be transcoded.
999 - type :: symbol (nil, t) or list of strings
1003 Non-nil means output should contain author's email.
1005 - category :: option
1006 - type :: symbol (nil, t)
1008 ** ~:with-emphasize~
1010 Non-nil means emphasized text should be interpreted.
1012 - category :: option
1013 - type :: symbol (nil, t)
1015 ** ~:with-fixed-width~
1017 Non-nil if transcoder should interpret strings starting with
1018 a colon as a fixed-with — verbatim — area.
1020 - category :: option
1021 - type :: symbol (nil, t)
1023 ** ~:with-footnotes~
1025 Non-nil if transcoder should interpret footnotes.
1027 - category :: option
1028 - type :: symbol (nil, t)
1030 ** ~:with-plannings~
1032 Non-nil means transcoding should include planning info.
1034 - category :: option
1035 - type :: symbol (nil, t)
1039 Non-nil means transcoding should include priority cookies.
1041 - category :: option
1042 - type :: symbol (nil, t)
1044 ** ~:with-smart-quotes~
1046 Non-nil means activate smart quotes during export.
1048 - category :: option
1049 - type :: symbol (nil ,t)
1051 ** ~:with-special-strings~
1053 Non-nil means transcoding should interpret special strings in plain
1056 - category :: option
1057 - type :: symbol (nil, t)
1059 ** ~:with-sub-superscript~
1061 Non-nil means transcoding should interpret subscript and
1062 superscript. With a value of ~{}~, only interpret those using
1065 - category :: option
1066 - type :: symbol (nil, ~{}~, t)
1070 Non-nil means transcoding should interpret tables.
1072 - category :: option
1073 - type :: symbol (nil, t)
1077 Non-nil means transcoding should keep tags in headlines.
1078 A ~not-in-toc~ value will remove them from the table of contents,
1079 if any, nonetheless.
1081 - category :: option
1082 - type :: symbol (nil, t, ~not-in-toc~)
1086 Non-nil means transcoding should include headlines with a TODO
1087 keyword. A ~todo~ value will only include headlines with a TODO
1088 type keyword while a ~done~ value will do the contrary. If a list
1089 of strings is provided, only tasks with keywords belonging to that
1092 - category :: option
1093 - type :: symbol (t, ~todo~, ~done~, nil) or list of strings
1095 ** ~:with-timestamps~
1097 Non-nil means transcoding should include time stamps. Special
1098 value ~active~ (resp. ~inactive~) ask to export only active
1099 (resp. inactive) timestamps. Otherwise, completely remove them.
1101 - category :: option
1102 - type :: symbol: (~active~, ~inactive~, t, nil)
1106 Non-nil means that a table of contents has to be added to the
1107 output. An integer value limits its depth.
1109 - category :: option
1110 - type :: symbol (nil, t or integer)
1112 ** ~:with-todo-keywords~
1114 Non-nil means transcoding should include TODO keywords.
1116 - category :: option
1117 - type :: symbol (nil, t)
1121 :CUSTOM_ID: filter-system
1124 Filters sets are lists of functions. They allow to pre-process
1125 parse tree before export and to post-process output of each
1126 transcoded object or element.
1128 Each function in a set must accept three arguments: a string (or
1129 a parse tree as a special case), a symbol representing the current
1130 back-end, and the communication channel, as a plist.
1132 From the developer side, filters sets can be installed using
1133 ~:filters-alist~ keyword while defining the back-end with
1134 ~org-export-define-derived-backend~. Each association has a key
1135 among the following symbols and a function or a list of functions as
1138 - ~:filter-babel-call~
1140 - ~:filter-center-block~
1144 - ~:filter-comment-block~
1146 - ~:filter-dynamic-block~
1148 - ~:filter-example-block~
1149 - ~:filter-export-block~
1150 - ~:filter-export-snippet~
1151 - ~:filter-final-output~
1152 - ~:filter-fixed-width~
1153 - ~:filter-footnote-definition~
1154 - ~:filter-footnote-reference~
1155 - ~:filter-headline~
1156 - ~:filter-horizontal-rule~
1157 - ~:filter-inline-babel-call~
1158 - ~:filter-inline-src-block~
1159 - ~:filter-inlinetask~
1163 - ~:filter-latex-environment~
1164 - ~:filter-latex-fragment~
1165 - ~:filter-line-break~
1168 - ~:filter-paragraph~
1169 - ~:filter-parse-tree~
1170 - ~:filter-plain-list~
1171 - ~:filter-plain-text~
1172 - ~:filter-planning~
1173 - ~:filter-property-drawer~
1174 - ~:filter-quote-block~
1175 - ~:filter-quote-section~
1176 - ~:filter-radio-target~
1178 - ~:filter-special-block~
1179 - ~:filter-src-block~
1180 - ~:filter-strike-through~
1181 - ~:filter-statistics-cookie~
1182 - ~:filter-subscript~
1183 - ~:filter-superscript~
1185 - ~:filter-table-cell~
1186 - ~:filter-table-row~
1188 - ~:filter-timestamp~
1189 - ~:filter-underline~
1190 - ~:filter-verbatim~
1191 - ~:filter-verse-block~
1194 For example, =e-ascii= back-end implements a filter that makes sure
1195 headlines end with two blank lines:
1197 #+BEGIN_SRC emacs-lisp
1198 (org-export-define-backend e-ascii
1200 :filters-alist ((:filter-headline . org-e-ascii-filter-headline-blank-lines)
1201 (:filter-section . org-e-ascii-filter-headline-blank-lines)))
1203 (defun org-e-ascii-filter-section-blank-lines (headline back-end info)
1204 "Filter controlling number of blank lines after a section."
1205 (if (not (eq back-end 'e-ascii)) headline
1206 (let ((blanks (make-string 2 ?\n)))
1207 (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline))))
1215 A whole set of tools is available to help build new exporters. Any
1216 function general enough to have its use across a couple of back-ends
1219 Many of them are high-level access to properties from the
1220 communication channel. As such, they should be preferred to
1221 straight access to communication channel, when possible.
1223 ** ~org-element-adopt-element~
1225 :CUSTOM_ID: adopt-element
1228 Add an element to the contents of another element.
1230 See also: [[#set-element][~org-element-set-element~]]
1232 ** ~org-element-set-element~
1234 :CUSTOM_ID: set-element
1237 Replace an element with another in the parse tree.
1239 See also: [[#adopt-element][~org-element-adopt-element~]].
1241 ** ~org-export-activate-smart-quotes~
1243 :CUSTOM_ID: activate-smart-quotes
1246 Transform quotes and apostrophes into their "smart" counterpart in
1249 It should be used after a check against ~:with-smart-quotes~ value
1250 in communication channel.
1252 Since this function needs the original string, it may be useful to
1253 apply others transformations (i.e. characters protection) on a copy
1254 of that string and provide the pristine original string as the
1257 For example, in ~e-html~ back-end, it is necessary to protect "<",
1258 ">" and "&" characters before calling this function. Here's an
1259 excerpt of the ~plain-text~ transcoder:
1261 #+BEGIN_SRC emacs-lisp
1262 (let ((output text))
1263 ;; Protect following characters: <, >, &.
1264 (setq output (org-e-html-encode-plain-text output))
1265 ;; Handle smart quotes. Be sure to provide original string since
1266 ;; OUTPUT may have been modified.
1267 (when (plist-get info :with-smart-quotes)
1268 (setq output (org-export-activate-smart-quotes output :html info text)))
1274 ** ~org-export-collect-figures~
1276 :CUSTOM_ID: collect-figures
1279 Return a list of all exportable figures in parse tree.
1281 Used to build a table of figures.
1283 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1284 [[#collect-tables][~org-export-collect-tables~]], [[#collect-listings][~org-export-collect-listings~]].
1286 ** ~org-export-collect-footnote-definitions~
1288 :CUSTOM_ID: collect-footnote-definitions
1291 List actually used footnotes definitions in order to add footnote
1292 listings throughout the transcoded data.
1294 Feed it with the whole parse tree to get the full footnote listing.
1295 Feed it with the current headline to get partial footnote listing
1296 relative to that headline.
1298 Number, label, if any, and definition are provided.
1300 See also: [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1301 [[#get-footnote-definition][~org-export-get-footnote-definition~]],
1302 [[#get-footnote-number][~org-export-get-footnote-number~]].
1304 ** ~org-export-collect-headlines~
1306 :CUSTOM_ID: collect-headlines
1309 Return a list of all exportable headlines, possibly limited to
1312 Used to build a table of contents.
1314 See also: [[#collect-tables][~org-export-collect-tables~]],
1315 [[#collect-figures][~org-export-collect-figures~]], [[#collect-listings][~org-export-collect-listings~]].
1317 ** ~org-export-collect-listings~
1319 :CUSTOM_ID: collect-listings
1322 Return a list of all exportable source blocks with a caption or
1323 a name in parse tree.
1325 Used to build a table of listings.
1327 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1328 [[#collect-tables][~org-export-collect-tables~]], [[#collect-figures][~org-export-collect-figures~]].
1329 ** ~org-export-collect-tables~
1331 :CUSTOM_ID: collect-tables
1334 Return a list of all exportable tables with a caption or a name in
1337 Used to build a table of tables.
1339 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1340 [[#collect-figures][~org-export-collect-figures~]], [[#collect-listings][~org-export-collect-listings~]].
1342 ** ~org-export-data~
1347 Transcode a given element, object, secondary string or string using
1350 It is used primarily to transcode secondary strings, like ~:title~.
1351 For example =e-beamer= back-end uses the following:
1353 #+BEGIN_SRC emacs-lisp
1354 (defun org-e-beamer-template (contents info)
1355 (let ((title (org-export-data (plist-get info :title) info)))
1359 ** ~org-export-first-sibling-p~
1361 :CUSTOM_ID: first-sibling-p
1364 Non-nil if an headline is the first of its siblings.
1366 Used to know when to start a list if headline's relative level is
1367 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1369 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1370 [[#number-to-roman][~org-export-number-to-roman~]], [[#last-sibling-p][~org-export-last-sibling-p~]].
1372 ** ~org-export-footnote-first-reference-p~
1374 :CUSTOM_ID: footnote-first-reference-p
1377 Non-nil when a footnote reference if the first reference relative
1380 Used when a back-end needs to attach the footnote definition only
1381 to the first occurrence of the corresponding label.
1383 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1384 [[#get-footnote-definition][~org-export-get-footnote-definition~]],
1385 [[#get-footnote-number][~org-export-get-footnote-number~]].
1387 ** ~org-export-format-code-default~
1389 :CUSTOM_ID: format-code-default
1392 Return contents of a =src-block= or =example-block= element in
1393 a format suited for raw text or verbatim output. More
1394 specifically, it takes care of line numbering and labels
1395 integration depending of element's switches, but no formatting is
1396 otherwise applied to source code.
1398 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1400 ** ~org-export-format-code~
1402 :CUSTOM_ID: format-code
1405 Helper function to format source code. It applies a given function
1406 on each line of the code, passing current line number and
1407 associated code reference label, if any, as arguments.
1409 See also: [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]],
1410 [[#unravel-code][~org-export-unravel-code~]].
1412 ** ~org-export-get-caption~
1414 :CUSTOM_ID: get-caption
1417 Return the caption of a given element, as a secondary string. With
1418 an optional argument, return the short caption instead.
1420 As an example, =e-ascii= back-end, when creating a list of
1421 listings, uses the following:
1423 #+BEGIN_SRC emacs-lisp
1424 (defun org-e-ascii--list-listings (keyword info)
1425 (let ((title (org-e-ascii--translate "List of Listings" info)))
1431 ;; Use short name in priority, if available.
1432 (let ((caption (or (org-export-get-caption src-block t)
1433 (org-export-get-caption src-block))))
1434 (org-export-data caption info)
1436 (org-export-collect-listings info) "\n"))))
1439 See also: [[#read-attribute][~org-export-read-attribute~]].
1441 ** ~org-export-get-coderef-format~
1443 :CUSTOM_ID: get-coderef-format
1446 Return an appropriate format string for code reference links.
1448 See also: [[#resolve-coderef][~org-export-resolve-coderef~]].
1450 ** ~org-export-get-footnote-definition~
1452 :CUSTOM_ID: get-footnote-definition
1455 Retrieve the footnote definition relative to a given footnote
1458 If the footnote definition in inline, it is returned as a secondary
1459 string. Otherwise, it is full Org data.
1461 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1462 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1463 [[#get-footnote-number][~org-export-get-footnote-number~]].
1465 ** ~org-export-get-footnote-number~
1467 :CUSTOM_ID: get-footnote-number
1470 Return the ordinal attached to a footnote reference or definition.
1472 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1473 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1474 [[#get-footnote-definition][~org-export-get-footnote-definition~]].
1476 ** ~org-export-get-genealogy~
1478 :CUSTOM_ID: get-genealogy
1481 Return flat list of current object or element's parents from
1482 closest to farthest, along with their contents.
1484 See also: [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1485 [[#get-parent-headline][~org-export-get-parent-headline~]],
1486 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1487 [[#get-previous-element][~org-export-get-previous-element~]].
1489 ** ~org-export-get-headline-number~
1491 :CUSTOM_ID: get-headline-number
1494 Return the section number of an headline, as a list of integers.
1496 See also: [[#headline-numbered-p][~org-export-headline-numbered-p~]],
1497 [[#number-to-roman][~org-export-number-to-roman~]].
1499 ** ~org-export-get-loc~
1504 Return count of accumulated lines of code from previous
1505 line-numbered =example-block= and =src-block= elements, according
1506 to current element's switches.
1508 In other words, the first line of code in the current block is
1509 supposed to be numbered as the returned value plus one, assuming
1510 its ~:number-lines~ properties is non-nil.
1512 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1514 ** ~org-export-get-next-element~
1516 :CUSTOM_ID: get-next-element
1519 Return element (resp. object or string) after an element
1520 (resp. object), or nil.
1522 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1523 [[#get-parent-headline][~org-export-get-parent-headline~]],
1524 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1525 [[#get-previous-element][~org-export-get-previous-element~]].
1527 ** ~org-export-get-ordinal~
1529 :CUSTOM_ID: get-ordinal
1532 Associate a sequence number to any object or element. It is meant
1533 to be used to build captions.
1535 Also, it could be applied on a fuzzy link's destination, since such
1536 links are expected to be replaced with the sequence number of their
1537 destination, provided they have no description.
1539 Taken from =e-ascii= back-end, the following example shows how
1540 fuzzy links could be handled :
1542 #+BEGIN_SRC emacs-lisp :exports code
1543 (let ((type (org-element-property :type link)))
1546 ;; Do not apply a special syntax on fuzzy links pointing to targets.
1547 ((string= type "fuzzy")
1548 (let ((destination (org-export-resolve-fuzzy-link link info)))
1549 ;; Ignore invisible "#+TARGET: path".
1550 (unless (eq (org-element-type destination) 'keyword)
1551 ;; If link has a description, use it.
1552 (if (org-string-nw-p desc) desc
1554 (let ((number (org-export-get-ordinal destination info)))
1556 (if (atom number) (number-to-string number)
1557 (mapconcat 'number-to-string number ".")))))))))
1561 See also : [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]]
1563 ** ~org-export-get-parent-element~
1565 :CUSTOM_ID: get-parent-paragraph
1568 Return the first element containing provided object, if any.
1569 Return nil otherwise.
1571 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1572 [[#get-parent-headline][~org-export-get-parent-headline~]],
1573 [[#get-previous-element][~org-export-get-previous-element~]], [[#get-next-element][~org-export-get-next-element~]].
1575 ** ~org-export-get-parent-headline~
1577 :CUSTOM_ID: get-parent-headline
1580 Return the headline containing provided element or object, if any.
1581 Return nil otherwise.
1583 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1584 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1585 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1586 [[#get-previous-element][~org-export-get-previous-element~]].
1588 ** ~org-export-get-parent~
1590 :CUSTOM_ID: get-parent
1593 Return closest element containing current element or object, if
1594 any. Return nil otherwise.
1596 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1597 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1598 [[#get-parent-headline][~org-export-get-parent-headline~]],
1599 [[#get-previous-element][~org-export-get-previous-element~]].
1601 ** ~org-export-get-previous-element~
1603 :CUSTOM_ID: get-previous-element
1606 Return element (resp. object or string) before an element
1607 (resp. object), or nil.
1609 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1610 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1611 [[#get-parent-headline][~org-export-get-parent-headline~]],
1612 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]].
1614 ** ~org-export-get-relative-level~
1616 :CUSTOM_ID: get-relative-level
1619 Return headline level, relatively to the lower headline level in
1620 the parsed tree. It is meant to be used over ~:level~ headline's
1623 See also:[[#first-sibling-p][~org-export-first-sibling-p~]],
1624 [[#get-headline-number][~org-export-get-headline-number~]],[[#headline-numbered-p][~org-export-headline-numbered-p~]],
1625 [[#last-sibling-p][~org-export-last-sibling-p~]].
1627 ** ~org-export-get-table-cell-at~
1629 :CUSTOM_ID: get-table-cell-at
1632 Return exportable cell object at a given position, or nil. Hence,
1633 position ~(0 . 0)~ will always point to the first exportable cell
1636 See also: [[#table-cell-address][~org-export-table-cell-address~]],
1637 [[#table-dimensions][~org-export-table-dimensions~]].
1639 ** ~org-export-get-tags~
1641 :CUSTOM_ID: get-tags
1644 Return list of exportable tags attached to a given headline or
1645 inlinetask element. With an optional argument, tags are inherited
1646 from parent headlines and ~FILETAGS~ keywords.
1648 In particular, it removes select tags and exclude tags. The
1649 function also accepts an arbitrary list of tags for further
1652 For example, =e-latex= back-end uses the following snippet in the
1653 inlinetask transcode function.
1655 #+BEGIN_SRC emacs-lisp
1656 (let ((title (org-export-data (org-element-property :title inlinetask) info))
1657 (todo (and (plist-get info :with-todo-keywords)
1658 (let ((todo (org-element-property :todo-keyword inlinetask)))
1659 (and todo (org-export-data todo info)))))
1660 (todo-type (org-element-property :todo-type inlinetask))
1661 (tags (and (plist-get info :with-tags)
1662 (org-export-get-tags inlinetask info)))
1663 (priority (and (plist-get info :with-priority)
1664 (org-element-property :priority inlinetask))))
1668 ** ~org-export-headline-numbered-p~
1670 :CUSTOM_ID: headline-numbered-p
1673 Non nil when a given headline should be numbered.
1675 See also: [[#get-headline-number][~org-export-get-headline-number~]],
1676 [[#get-relative-level][~org-export-get-relative-level~]].
1678 ** ~org-export-inline-image-p~
1680 :CUSTOM_ID: inline-image-p
1683 Non-nil when the link provided should be considered as an inline
1684 image. Note that it always return nil when the link has
1687 It accepts an optional set of rules in order to tweak the
1688 definition of an inline image, which is, by default, any link
1689 targetting a local file whose extension is either "png", "jpeg",
1690 "jpg", "gif", "tiff", "tif", "xbm", "xpm", "pbm", "pgm" or "ppm".
1692 A set of rules consists in an alist whose key is a type of link, as
1693 a string, and whose value is a regexp matching link's path. As an
1694 example, =e-html= back-end uses the following rules:
1696 #+BEGIN_SRC emacs-lisp
1697 '(("file" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1698 ("http" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1699 ("https" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'"))
1702 See also: [[#solidify-link-text][~org-export-solidify-link-text~]],
1703 [[#get-coderef-format][~org-export-get-coderef-format~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
1705 ** ~org-export-last-sibling-p~
1707 :CUSTOM_ID: last-sibling-p
1710 Non-nil if an headline is the last of its siblings.
1712 Used to know when to close a list if headline's relative level is
1713 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1715 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1716 [[#number-to-roman][~org-export-number-to-roman~]], [[#first-sibling-p][~org-export-first-sibling-p~]].
1718 ** ~org-export-number-to-roman~
1720 :CUSTOM_ID: number-to-roman
1723 Convert numbers to roman numbers. It can be used to provide roman
1724 numbering for headlines and numbered lists.
1726 See also: [[#get-headline-number][~org-export-get-headline-number~]].
1728 ** ~org-export-read-attribute~
1730 :CUSTOM_ID: read-attribute
1733 Read a property from a given element as a plist. It can be used to
1734 normalize affiliated keywords' syntax. For example, the following
1735 affiliated keywords:
1738 ,#+ATTR_HTML: :width 10 :height 5
1739 ,#+ATTR_HTML: :file "filename.ext"
1742 would be returned as:
1744 #+BEGIN_SRC emacs-lisp
1745 '(:width 10 :height 5 :file "filename.ext")
1748 See also: [[#get-caption][~org-export-get-caption~]].
1750 ** ~org-export-resolve-coderef~
1752 :CUSTOM_ID: resolve-coderef
1755 Search for a code reference within ~src-block~ and ~example-block~
1756 elements. Return corresponding --possibly accumulated-- line
1757 number, or reference itself, depending on container's switches.
1759 See also : [[#get-coderef-format][~org-export-get-coderef-format~]],
1760 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1761 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1763 ** ~org-export-resolve-fuzzy-link~
1765 :CUSTOM_ID: resolve-fuzzy-link
1768 Search destination of a fuzzy link — i.e. it has a ~fuzzy~ ~:type~
1769 attribute – within the parsed tree, and return that element,
1772 See also: [[#get-ordinal][~org-export-get-ordinal~]], [[#resolve-coderef][~org-export-resolve-coderef~]],
1773 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1774 [[#solidify-link-text][~org-export-solidify-link-text~]].
1776 ** ~org-export-resolve-id-link~
1778 :CUSTOM_ID: resolve-id-link
1781 Search headline targetted by an id link --- i.e. it has a ~id~ or
1782 ~custom-id~ ~:type~ attribute --- within the parse tree. Return
1783 the matching headline in the tree, the name of the external file,
1784 as a string, or nil.
1786 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1787 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1788 [[#solidify-link-text][~org-export-solidify-link-text~]].
1790 ** ~org-export-resolve-radio-link~
1792 :CUSTOM_ID: resolve-radio-link
1795 Return first radio target object matching a radio link --- that is
1796 with a ~radio~ ~:type~ attribute --- in the parse tree, or nil.
1798 Typically, target's contents are exported through ~org-export-data~
1799 and used as link description, as in the following excerpt from
1802 #+BEGIN_SRC emacs-lisp
1803 (defun org-e-latex-link (link desc info)
1804 (let* ((type (org-element-property :type link))
1808 ((string= type "radio")
1809 (let ((destination (org-export-resolve-radio-link link info)))
1811 (format "\\hyperref[%s]{%s}"
1812 (org-export-solidify-link-text path)
1813 (org-export-data (org-element-contents destination) info)))))
1817 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1818 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1819 [[#solidify-link-text][~org-export-solidify-link-text~]].
1821 ** ~org-export-solidify-link-text~
1823 :CUSTOM_ID: solidify-link-text
1826 Normalize a string, replacing most non-standard characters with
1829 Used to turn targets names into safer versions for links.
1831 See also: [[#inline-image-p][~org-export-inline-image-p~]],
1832 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]],
1833 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1835 ** ~org-export-table-cell-address~
1837 :CUSTOM_ID: table-cell-address
1840 Return row and column of a given cell object. Positions are
1841 0-indexed and only exportable rows and columns are considered. The
1842 function returns nil if called on a non-exportable cell.
1844 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1845 [[#table-dimensions][~org-export-table-dimensions~]].
1847 ** ~org-export-table-cell-alignment~
1849 :CUSTOM_ID: table-cell-alignment
1852 Return expected alignment for the contents of a given cell object.
1853 It can be either ~left~, ~right~ or ~center~.
1855 See also: [[#table-cell-borders][~org-export-table-cell-borders~]],
1856 [[#table-cell-width][~org-export-table-cell-width~]].
1858 ** ~org-export-table-cell-borders~
1860 :CUSTOM_ID: table-cell-borders
1863 Indicate expected borders for a given cell object. When non-nil,
1864 return value is a list of symbols among ~top~, ~bottom~, ~above~,
1865 ~below~, ~left~ and ~right~.
1867 Special values ~top~ and ~bottom~ only happen for cells in,
1868 respectively, the first and the last exportable rows.
1870 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1871 [[#table-cell-width][~org-export-table-cell-width~]].
1873 ** ~org-export-table-cell-ends-colgroup-p~
1875 :CUSTOM_ID: table-cell-ends-colgroup-p
1878 Non-nil when a table cell object ends a column group.
1880 See also: [[#table-cell-starts-colgroup-p][~org-export-table-cell-starts-colgroup-p~]].
1882 ** ~org-export-table-cell-starts-colgroup-p~
1884 :CUSTOM_ID: table-cell-starts-colgroup-p
1887 Non-nil when a table cell object starts a column group.
1889 See also: [[#table-cell-ends-colgroup-p][~org-export-table-cell-ends-colgroup-p~]].
1891 ** ~org-export-table-cell-width~
1893 :CUSTOM_ID: table-cell-width
1896 Return expected width for contents of a given cell object.
1898 Only width specified explicitely through meta-data is considered.
1899 If no such information can be found, return nil instead.
1901 Some back-end may still need to know the actual width of exported
1902 cell's contents in order to compute column's width. In that case,
1903 every cell in the column must be transcoded in order to find the
1904 widest one. The snippet below, extracted from =org-e-ascii.el=
1905 illustrates a possible implementation.
1907 #+BEGIN_SRC emacs-lisp
1908 (or (org-export-table-cell-width table-cell info)
1909 (let* ((max-width 0)
1910 (table (org-export-get-parent-table table-cell info))
1911 (specialp (org-export-table-has-special-column-p table))
1912 (col (cdr (org-export-table-cell-address table-cell info))))
1916 ;; For each exportable row, get the cell at column COL and
1917 ;; transcode its contents. Then compare its length with
1918 ;; MAX-WIDTH and keep the greater of two.
1922 (org-element-contents
1923 (elt (if specialp (car (org-element-contents row))
1924 (org-element-contents row))
1932 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1933 [[#table-cell-borders][~org-export-table-cell-borders~]].
1935 ** ~org-export-table-dimensions~
1937 :CUSTOM_ID: table-dimensions
1940 Return the number of exportable rows and columns in a given table.
1942 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1943 [[#table-cell-address][~org-export-table-cell-address~]].
1945 ** ~org-export-table-has-header-p~
1947 :CUSTOM_ID: table-has-header-p
1950 Non-nil when table has at least two row groups.
1952 See also: [[#table-has-special-column-p][~org-export-table-has-special-column-p~]],
1953 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1955 ** ~org-export-table-has-special-column-p~
1957 :CUSTOM_ID: table-has-special-column-p
1960 Non-nil when first column in the table only contains meta-data.
1962 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
1963 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1965 ** ~org-export-table-row-ends-header-p~
1967 :CUSTOM_ID: table-row-ends-header-p
1970 Non-nil when a table row element ends table's header.
1972 See also: [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1973 [[#table-row-group][~org-export-table-row-group~]],
1974 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1975 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1977 ** ~org-export-table-row-ends-rowgroup-p~
1979 :CUSTOM_ID: table-row-ends-rowgroup-p
1982 Non-nil when a a table row element ends a rowgroup, header
1985 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1986 [[#table-row-group][~org-export-table-row-group~]],
1987 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1988 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1990 ** ~org-export-table-row-group~
1992 :CUSTOM_ID: table-row-group
1995 Return row group number for a given table row element.
1997 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1998 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1999 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
2000 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
2002 ** ~org-export-table-row-is-special-p~
2004 :CUSTOM_ID: table-row-is-special-p
2007 Non-nil a given table row element only contains meta-data.
2009 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
2010 [[#table-has-special-column-p][~org-export-table-has-special-column-p~]].
2012 ** ~org-export-table-row-starts-header-p~
2014 :CUSTOM_ID: table-row-starts-header-p
2017 Non-nil when a table row element starts table's header.
2019 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2020 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2021 [[#table-row-group][~org-export-table-row-group~]],
2022 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
2024 ** ~org-export-table-row-starts-rowgroup-p~
2026 :CUSTOM_ID: table-row-starts-rowgroup-p
2029 Non-nil when a table row element starts a rowgroup, header
2032 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2033 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2034 [[#table-row-group][~org-export-table-row-group~]],
2035 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]].
2037 ** ~org-export-translate~
2039 Translate a string, i.e. "Table of Contents", according to language
2042 Refer to ~org-export-dictionary~ variable for the list of all
2045 ** ~org-export-unravel-code~
2047 :CUSTOM_ID: unravel-code
2050 Clean source code from an =example-block= or a =src-block= element
2051 and extract code references out of it.
2053 Its purpose is to allow to transform raw source code first and then
2054 integrate line numbers or references back into the final output.
2055 That final task can be achieved with the help of
2056 ~org-export-format-code~ function.
2058 See also: [[#format-code][~org-export-format-code~]],
2059 [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]].
2063 # sentence-end-double-space: t