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-category~
1443 :CUSTOM_ID: get-category
1446 Return category associated to a given element or object. Unlike to
1447 the ~:category~ property from headlines and inlinetasks, this
1448 function handles inheritance and ~CATEGORY~ keywords. Therefore,
1449 it should be the preferred way to retrieve a category during
1452 See also: [[#get-node-property][~org-export-get-node-property~]].
1454 ** ~org-export-get-coderef-format~
1456 :CUSTOM_ID: get-coderef-format
1459 Return an appropriate format string for code reference links.
1461 See also: [[#resolve-coderef][~org-export-resolve-coderef~]].
1463 ** ~org-export-get-footnote-definition~
1465 :CUSTOM_ID: get-footnote-definition
1468 Retrieve the footnote definition relative to a given footnote
1471 If the footnote definition in inline, it is returned as a secondary
1472 string. Otherwise, it is full Org data.
1474 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1475 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1476 [[#get-footnote-number][~org-export-get-footnote-number~]].
1478 ** ~org-export-get-footnote-number~
1480 :CUSTOM_ID: get-footnote-number
1483 Return the ordinal attached to a footnote reference or definition.
1485 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1486 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1487 [[#get-footnote-definition][~org-export-get-footnote-definition~]].
1489 ** ~org-export-get-genealogy~
1491 :CUSTOM_ID: get-genealogy
1494 Return flat list of current object or element's parents from
1495 closest to farthest, along with their contents.
1497 See also: [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1498 [[#get-parent-headline][~org-export-get-parent-headline~]],
1499 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1500 [[#get-previous-element][~org-export-get-previous-element~]].
1502 ** ~org-export-get-headline-number~
1504 :CUSTOM_ID: get-headline-number
1507 Return the section number of an headline, as a list of integers.
1509 See also: [[#headline-numbered-p][~org-export-headline-numbered-p~]],
1510 [[#number-to-roman][~org-export-number-to-roman~]].
1512 ** ~org-export-get-loc~
1517 Return count of accumulated lines of code from previous
1518 line-numbered =example-block= and =src-block= elements, according
1519 to current element's switches.
1521 In other words, the first line of code in the current block is
1522 supposed to be numbered as the returned value plus one, assuming
1523 its ~:number-lines~ properties is non-nil.
1525 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1527 ** ~org-export-get-next-element~
1529 :CUSTOM_ID: get-next-element
1532 Return element (resp. object or string) after an element
1533 (resp. object), or nil.
1535 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1536 [[#get-parent-headline][~org-export-get-parent-headline~]],
1537 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1538 [[#get-previous-element][~org-export-get-previous-element~]].
1540 ** ~org-export-get-node-property~
1542 :CUSTOM_ID: get-node-property
1545 Return the node property associated to an element or object. If
1546 the element is an headline, this is equivalent to reading the
1547 property with ~org-element-property~.
1549 Though, this function can optionally handle inheritance.
1551 See also: [[#get-category][~org-export-get-category~]].
1553 ** ~org-export-get-ordinal~
1555 :CUSTOM_ID: get-ordinal
1558 Associate a sequence number to any object or element. It is meant
1559 to be used to build captions.
1561 Also, it could be applied on a fuzzy link's destination, since such
1562 links are expected to be replaced with the sequence number of their
1563 destination, provided they have no description.
1565 Taken from =e-ascii= back-end, the following example shows how
1566 fuzzy links could be handled :
1568 #+BEGIN_SRC emacs-lisp :exports code
1569 (let ((type (org-element-property :type link)))
1572 ;; Do not apply a special syntax on fuzzy links pointing to targets.
1573 ((string= type "fuzzy")
1574 (let ((destination (org-export-resolve-fuzzy-link link info)))
1575 ;; Ignore invisible "#+TARGET: path".
1576 (unless (eq (org-element-type destination) 'keyword)
1577 ;; If link has a description, use it.
1578 (if (org-string-nw-p desc) desc
1580 (let ((number (org-export-get-ordinal destination info)))
1582 (if (atom number) (number-to-string number)
1583 (mapconcat 'number-to-string number ".")))))))))
1587 See also : [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]]
1589 ** ~org-export-get-parent-element~
1591 :CUSTOM_ID: get-parent-paragraph
1594 Return the first element containing provided object, if any.
1595 Return nil otherwise.
1597 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1598 [[#get-parent-headline][~org-export-get-parent-headline~]],
1599 [[#get-previous-element][~org-export-get-previous-element~]], [[#get-next-element][~org-export-get-next-element~]].
1601 ** ~org-export-get-parent-headline~
1603 :CUSTOM_ID: get-parent-headline
1606 Return the headline containing provided element or object, if any.
1607 Return nil otherwise.
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-paragraph][~org-export-get-parent-paragraph~]],
1612 [[#get-previous-element][~org-export-get-previous-element~]].
1614 ** ~org-export-get-parent~
1616 :CUSTOM_ID: get-parent
1619 Return closest element containing current element or object, if
1620 any. Return nil otherwise.
1622 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1623 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1624 [[#get-parent-headline][~org-export-get-parent-headline~]],
1625 [[#get-previous-element][~org-export-get-previous-element~]].
1627 ** ~org-export-get-previous-element~
1629 :CUSTOM_ID: get-previous-element
1632 Return element (resp. object or string) before an element
1633 (resp. object), or nil.
1635 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1636 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1637 [[#get-parent-headline][~org-export-get-parent-headline~]],
1638 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]].
1640 ** ~org-export-get-relative-level~
1642 :CUSTOM_ID: get-relative-level
1645 Return headline level, relatively to the lower headline level in
1646 the parsed tree. It is meant to be used over ~:level~ headline's
1649 See also:[[#first-sibling-p][~org-export-first-sibling-p~]],
1650 [[#get-headline-number][~org-export-get-headline-number~]],[[#headline-numbered-p][~org-export-headline-numbered-p~]],
1651 [[#last-sibling-p][~org-export-last-sibling-p~]].
1653 ** ~org-export-get-table-cell-at~
1655 :CUSTOM_ID: get-table-cell-at
1658 Return exportable cell object at a given position, or nil. Hence,
1659 position ~(0 . 0)~ will always point to the first exportable cell
1662 See also: [[#table-cell-address][~org-export-table-cell-address~]],
1663 [[#table-dimensions][~org-export-table-dimensions~]].
1665 ** ~org-export-get-tags~
1667 :CUSTOM_ID: get-tags
1670 Return list of exportable tags attached to a given headline or
1671 inlinetask element. With an optional argument, tags are inherited
1672 from parent headlines and ~FILETAGS~ keywords.
1674 In particular, it removes select tags and exclude tags. The
1675 function also accepts an arbitrary list of tags for further
1678 For example, =e-latex= back-end uses the following snippet in the
1679 inlinetask transcode function.
1681 #+BEGIN_SRC emacs-lisp
1682 (let ((title (org-export-data (org-element-property :title inlinetask) info))
1683 (todo (and (plist-get info :with-todo-keywords)
1684 (let ((todo (org-element-property :todo-keyword inlinetask)))
1685 (and todo (org-export-data todo info)))))
1686 (todo-type (org-element-property :todo-type inlinetask))
1687 (tags (and (plist-get info :with-tags)
1688 (org-export-get-tags inlinetask info)))
1689 (priority (and (plist-get info :with-priority)
1690 (org-element-property :priority inlinetask))))
1694 ** ~org-export-headline-numbered-p~
1696 :CUSTOM_ID: headline-numbered-p
1699 Non nil when a given headline should be numbered.
1701 See also: [[#get-headline-number][~org-export-get-headline-number~]],
1702 [[#get-relative-level][~org-export-get-relative-level~]].
1704 ** ~org-export-inline-image-p~
1706 :CUSTOM_ID: inline-image-p
1709 Non-nil when the link provided should be considered as an inline
1710 image. Note that it always return nil when the link has
1713 It accepts an optional set of rules in order to tweak the
1714 definition of an inline image, which is, by default, any link
1715 targetting a local file whose extension is either "png", "jpeg",
1716 "jpg", "gif", "tiff", "tif", "xbm", "xpm", "pbm", "pgm" or "ppm".
1718 A set of rules consists in an alist whose key is a type of link, as
1719 a string, and whose value is a regexp matching link's path. As an
1720 example, =e-html= back-end uses the following rules:
1722 #+BEGIN_SRC emacs-lisp
1723 '(("file" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1724 ("http" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1725 ("https" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'"))
1728 See also: [[#solidify-link-text][~org-export-solidify-link-text~]],
1729 [[#get-coderef-format][~org-export-get-coderef-format~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
1731 ** ~org-export-last-sibling-p~
1733 :CUSTOM_ID: last-sibling-p
1736 Non-nil if an headline is the last of its siblings.
1738 Used to know when to close a list if headline's relative level is
1739 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1741 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1742 [[#number-to-roman][~org-export-number-to-roman~]], [[#first-sibling-p][~org-export-first-sibling-p~]].
1744 ** ~org-export-number-to-roman~
1746 :CUSTOM_ID: number-to-roman
1749 Convert numbers to roman numbers. It can be used to provide roman
1750 numbering for headlines and numbered lists.
1752 See also: [[#get-headline-number][~org-export-get-headline-number~]].
1754 ** ~org-export-read-attribute~
1756 :CUSTOM_ID: read-attribute
1759 Read a property from a given element as a plist. It can be used to
1760 normalize affiliated keywords' syntax. For example, the following
1761 affiliated keywords:
1764 ,#+ATTR_HTML: :width 10 :height 5
1765 ,#+ATTR_HTML: :file "filename.ext"
1768 would be returned as:
1770 #+BEGIN_SRC emacs-lisp
1771 '(:width 10 :height 5 :file "filename.ext")
1774 See also: [[#get-caption][~org-export-get-caption~]].
1776 ** ~org-export-resolve-coderef~
1778 :CUSTOM_ID: resolve-coderef
1781 Search for a code reference within ~src-block~ and ~example-block~
1782 elements. Return corresponding --possibly accumulated-- line
1783 number, or reference itself, depending on container's switches.
1785 See also : [[#get-coderef-format][~org-export-get-coderef-format~]],
1786 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1787 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1789 ** ~org-export-resolve-fuzzy-link~
1791 :CUSTOM_ID: resolve-fuzzy-link
1794 Search destination of a fuzzy link — i.e. it has a ~fuzzy~ ~:type~
1795 attribute – within the parsed tree, and return that element,
1798 See also: [[#get-ordinal][~org-export-get-ordinal~]], [[#resolve-coderef][~org-export-resolve-coderef~]],
1799 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1800 [[#solidify-link-text][~org-export-solidify-link-text~]].
1802 ** ~org-export-resolve-id-link~
1804 :CUSTOM_ID: resolve-id-link
1807 Search headline targetted by an id link --- i.e. it has a ~id~ or
1808 ~custom-id~ ~:type~ attribute --- within the parse tree. Return
1809 the matching headline in the tree, the name of the external file,
1810 as a string, or nil.
1812 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1813 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1814 [[#solidify-link-text][~org-export-solidify-link-text~]].
1816 ** ~org-export-resolve-radio-link~
1818 :CUSTOM_ID: resolve-radio-link
1821 Return first radio target object matching a radio link --- that is
1822 with a ~radio~ ~:type~ attribute --- in the parse tree, or nil.
1824 Typically, target's contents are exported through ~org-export-data~
1825 and used as link description, as in the following excerpt from
1828 #+BEGIN_SRC emacs-lisp
1829 (defun org-e-latex-link (link desc info)
1830 (let* ((type (org-element-property :type link))
1834 ((string= type "radio")
1835 (let ((destination (org-export-resolve-radio-link link info)))
1837 (format "\\hyperref[%s]{%s}"
1838 (org-export-solidify-link-text path)
1839 (org-export-data (org-element-contents destination) info)))))
1843 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1844 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1845 [[#solidify-link-text][~org-export-solidify-link-text~]].
1847 ** ~org-export-solidify-link-text~
1849 :CUSTOM_ID: solidify-link-text
1852 Normalize a string, replacing most non-standard characters with
1855 Used to turn targets names into safer versions for links.
1857 See also: [[#inline-image-p][~org-export-inline-image-p~]],
1858 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]],
1859 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1861 ** ~org-export-table-cell-address~
1863 :CUSTOM_ID: table-cell-address
1866 Return row and column of a given cell object. Positions are
1867 0-indexed and only exportable rows and columns are considered. The
1868 function returns nil if called on a non-exportable cell.
1870 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1871 [[#table-dimensions][~org-export-table-dimensions~]].
1873 ** ~org-export-table-cell-alignment~
1875 :CUSTOM_ID: table-cell-alignment
1878 Return expected alignment for the contents of a given cell object.
1879 It can be either ~left~, ~right~ or ~center~.
1881 See also: [[#table-cell-borders][~org-export-table-cell-borders~]],
1882 [[#table-cell-width][~org-export-table-cell-width~]].
1884 ** ~org-export-table-cell-borders~
1886 :CUSTOM_ID: table-cell-borders
1889 Indicate expected borders for a given cell object. When non-nil,
1890 return value is a list of symbols among ~top~, ~bottom~, ~above~,
1891 ~below~, ~left~ and ~right~.
1893 Special values ~top~ and ~bottom~ only happen for cells in,
1894 respectively, the first and the last exportable rows.
1896 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1897 [[#table-cell-width][~org-export-table-cell-width~]].
1899 ** ~org-export-table-cell-ends-colgroup-p~
1901 :CUSTOM_ID: table-cell-ends-colgroup-p
1904 Non-nil when a table cell object ends a column group.
1906 See also: [[#table-cell-starts-colgroup-p][~org-export-table-cell-starts-colgroup-p~]].
1908 ** ~org-export-table-cell-starts-colgroup-p~
1910 :CUSTOM_ID: table-cell-starts-colgroup-p
1913 Non-nil when a table cell object starts a column group.
1915 See also: [[#table-cell-ends-colgroup-p][~org-export-table-cell-ends-colgroup-p~]].
1917 ** ~org-export-table-cell-width~
1919 :CUSTOM_ID: table-cell-width
1922 Return expected width for contents of a given cell object.
1924 Only width specified explicitely through meta-data is considered.
1925 If no such information can be found, return nil instead.
1927 Some back-end may still need to know the actual width of exported
1928 cell's contents in order to compute column's width. In that case,
1929 every cell in the column must be transcoded in order to find the
1930 widest one. The snippet below, extracted from =org-e-ascii.el=
1931 illustrates a possible implementation.
1933 #+BEGIN_SRC emacs-lisp
1934 (or (org-export-table-cell-width table-cell info)
1935 (let* ((max-width 0)
1936 (table (org-export-get-parent-table table-cell info))
1937 (specialp (org-export-table-has-special-column-p table))
1938 (col (cdr (org-export-table-cell-address table-cell info))))
1942 ;; For each exportable row, get the cell at column COL and
1943 ;; transcode its contents. Then compare its length with
1944 ;; MAX-WIDTH and keep the greater of two.
1948 (org-element-contents
1949 (elt (if specialp (car (org-element-contents row))
1950 (org-element-contents row))
1958 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1959 [[#table-cell-borders][~org-export-table-cell-borders~]].
1961 ** ~org-export-table-dimensions~
1963 :CUSTOM_ID: table-dimensions
1966 Return the number of exportable rows and columns in a given table.
1968 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1969 [[#table-cell-address][~org-export-table-cell-address~]].
1971 ** ~org-export-table-has-header-p~
1973 :CUSTOM_ID: table-has-header-p
1976 Non-nil when table has at least two row groups.
1978 See also: [[#table-has-special-column-p][~org-export-table-has-special-column-p~]],
1979 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1981 ** ~org-export-table-has-special-column-p~
1983 :CUSTOM_ID: table-has-special-column-p
1986 Non-nil when first column in the table only contains meta-data.
1988 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
1989 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1991 ** ~org-export-table-row-ends-header-p~
1993 :CUSTOM_ID: table-row-ends-header-p
1996 Non-nil when a table row element ends table's header.
1998 See also: [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1999 [[#table-row-group][~org-export-table-row-group~]],
2000 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
2001 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
2003 ** ~org-export-table-row-ends-rowgroup-p~
2005 :CUSTOM_ID: table-row-ends-rowgroup-p
2008 Non-nil when a a table row element ends a rowgroup, header
2011 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2012 [[#table-row-group][~org-export-table-row-group~]],
2013 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
2014 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
2016 ** ~org-export-table-row-group~
2018 :CUSTOM_ID: table-row-group
2021 Return row group number for a given table row element.
2023 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2024 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2025 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
2026 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
2028 ** ~org-export-table-row-is-special-p~
2030 :CUSTOM_ID: table-row-is-special-p
2033 Non-nil a given table row element only contains meta-data.
2035 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
2036 [[#table-has-special-column-p][~org-export-table-has-special-column-p~]].
2038 ** ~org-export-table-row-starts-header-p~
2040 :CUSTOM_ID: table-row-starts-header-p
2043 Non-nil when a table row element starts table's header.
2045 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2046 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2047 [[#table-row-group][~org-export-table-row-group~]],
2048 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
2050 ** ~org-export-table-row-starts-rowgroup-p~
2052 :CUSTOM_ID: table-row-starts-rowgroup-p
2055 Non-nil when a table row element starts a rowgroup, header
2058 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2059 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2060 [[#table-row-group][~org-export-table-row-group~]],
2061 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]].
2063 ** ~org-export-translate~
2065 Translate a string, i.e. "Table of Contents", according to language
2068 Refer to ~org-export-dictionary~ variable for the list of all
2071 ** ~org-export-unravel-code~
2073 :CUSTOM_ID: unravel-code
2076 Clean source code from an =example-block= or a =src-block= element
2077 and extract code references out of it.
2079 Its purpose is to allow to transform raw source code first and then
2080 integrate line numbers or references back into the final output.
2081 That final task can be achieved with the help of
2082 ~org-export-format-code~ function.
2084 See also: [[#format-code][~org-export-format-code~]],
2085 [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]].
2089 # sentence-end-double-space: t