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~]].
803 ** ~:footnote-definition-alist~
805 /Alist/ between footnote labels and their definition, as parsed
806 data. Only non-inline footnotes are represented in this /alist/.
807 Also, every definition isn't guaranteed to be referenced in the
808 parse tree. The purpose of this property is to preserve
809 definitions from oblivion – i.e. when the parse tree comes from
810 a part of the original buffer –, it isn't meant for direct use in
811 a back-end. To retrieve a definition relative to a reference, use
812 [[#get-footnote-definition][~org-export-get-footnote-definition~]] instead.
815 - type :: alist (STRING . LIST)
817 ** ~:headline-levels~
819 :CUSTOM_ID: headline-levels
822 Maximum level being exported as an headline. Comparison is done
823 with the relative level of headlines in the parse tree, not
824 necessarily with their actual level.
829 ** ~:headline-numbering~
831 Alist between headlines' beginning position and their numbering, as
832 a list of numbers – cf. [[#get-headline-number][~org-export-get-headline-number~]].
835 - type :: alist (INTEGER . LIST)
837 ** ~:headline-offset~
839 Difference between relative and real level of headlines in the
840 parse tree. For example, a value of -1 means a level 2 headline
841 should be considered as level 1 —
842 cf. [[#get-relative-level][~org-export-get-relative-level~]].
849 List of elements and objects that will be unconditionally ignored
853 - type :: list of elements
857 Alist between ID strings and destination file's path, relative to
861 - type :: alist (STRING . STRING)
865 Full path to input file, if any.
868 - type :: string or nil
872 List of keywords attached to data.
879 Default language used for translations.
886 Whole parse tree, available at any time during transcoding.
889 - type :: list (as returned by ~org-element-parse-buffer~)
891 ** ~:preserve-breaks~
893 Non-nil means transcoding should preserve all line breaks.
896 - type :: symbol (nil, t)
898 ** ~:section-numbers~
900 Non-nil means transcoding should add section numbers to headlines.
903 - type :: symbol (nil, t)
907 :CUSTOM_ID: select-tags
910 List of tags enforcing inclusion of sub-trees in transcoding. When
911 such a tag is present, sub-trees without it are /de facto/ excluded
912 from the process. See [[#use-select-tags][~:use-select-tags~]].
915 - type :: list of strings
919 List of targets raw names encountered in the parse tree. This is
920 used to partly resolve "fuzzy" links —
921 cf. [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
924 - type :: list of strings
926 ** ~:time-stamp-file~
928 Non-nil means transcoding should insert a time stamp in the output.
931 - type :: symbol (nil, t)
933 ** ~:translate-alist~
935 Alist between element and object types and transcoding functions
936 relative to the current back-end. Special keys ~template~ and
937 ~plain-text~ are also possible.
940 - type :: alist (SYMBOL . FUNCTION)
942 ** ~:use-select-tags~
944 :CUSTOM_ID: use-select-tags
947 When non-nil, a select tags has been found in the parse tree.
948 Thus, any headline without one will be filtered out. See
949 [[#select-tags][~:select-tags~]].
952 - type :: interger or nil
954 ** ~:with-archived-trees~
956 Non-nil when archived sub-trees should also be transcoded. If it
957 is set to the ~headline~ symbol, only the archived headline's name
961 - type :: symbol (nil, t, ~headline~)
965 Non-nil means author's name should be included in the output.
968 - type :: symbol (nil, t)
972 Non-nil means clock keywords should be exported.
975 - type :: symbol (nil, t)
979 Non-nil means a creation sentence should be inserted at the end of
980 the transcoded string. If the value is ~comment~, it should be
984 - type :: symbol (~comment~, nil, t)
988 Non-nil means drawers should be exported. If its value is a list
989 of names, only drawers with such names will be transcoded.
992 - type :: symbol (nil, t) or list of strings
996 Non-nil means output should contain author's email.
999 - type :: symbol (nil, t)
1001 ** ~:with-emphasize~
1003 Non-nil means emphasized text should be interpreted.
1005 - category :: option
1006 - type :: symbol (nil, t)
1008 ** ~:with-fixed-width~
1010 Non-nil if transcoder should interpret strings starting with
1011 a colon as a fixed-with — verbatim — area.
1013 - category :: option
1014 - type :: symbol (nil, t)
1016 ** ~:with-footnotes~
1018 Non-nil if transcoder should interpret footnotes.
1020 - category :: option
1021 - type :: symbol (nil, t)
1023 ** ~:with-plannings~
1025 Non-nil means transcoding should include planning info.
1027 - category :: option
1028 - type :: symbol (nil, t)
1032 Non-nil means transcoding should include priority cookies.
1034 - category :: option
1035 - type :: symbol (nil, t)
1037 ** ~:with-smart-quotes~
1039 Non-nil means activate smart quotes during export.
1041 - category :: option
1042 - type :: symbol (nil ,t)
1044 ** ~:with-special-strings~
1046 Non-nil means transcoding should interpret special strings in plain
1049 - category :: option
1050 - type :: symbol (nil, t)
1052 ** ~:with-sub-superscript~
1054 Non-nil means transcoding should interpret subscript and
1055 superscript. With a value of ~{}~, only interpret those using
1058 - category :: option
1059 - type :: symbol (nil, ~{}~, t)
1063 Non-nil means transcoding should interpret tables.
1065 - category :: option
1066 - type :: symbol (nil, t)
1070 Non-nil means transcoding should keep tags in headlines.
1071 A ~not-in-toc~ value will remove them from the table of contents,
1072 if any, nonetheless.
1074 - category :: option
1075 - type :: symbol (nil, t, ~not-in-toc~)
1079 Non-nil means transcoding should include headlines with a TODO
1080 keyword. A ~todo~ value will only include headlines with a TODO
1081 type keyword while a ~done~ value will do the contrary. If a list
1082 of strings is provided, only tasks with keywords belonging to that
1085 - category :: option
1086 - type :: symbol (t, ~todo~, ~done~, nil) or list of strings
1088 ** ~:with-timestamps~
1090 Non-nil means transcoding should include time stamps. Special
1091 value ~active~ (resp. ~inactive~) ask to export only active
1092 (resp. inactive) timestamps. Otherwise, completely remove them.
1094 - category :: option
1095 - type :: symbol: (~active~, ~inactive~, t, nil)
1099 Non-nil means that a table of contents has to be added to the
1100 output. An integer value limits its depth.
1102 - category :: option
1103 - type :: symbol (nil, t or integer)
1105 ** ~:with-todo-keywords~
1107 Non-nil means transcoding should include TODO keywords.
1109 - category :: option
1110 - type :: symbol (nil, t)
1114 :CUSTOM_ID: filter-system
1117 Filters sets are lists of functions. They allow to pre-process
1118 parse tree before export and to post-process output of each
1119 transcoded object or element.
1121 Each function in a set must accept three arguments: a string (or
1122 a parse tree as a special case), a symbol representing the current
1123 back-end, and the communication channel, as a plist.
1125 From the developer side, filters sets can be installed using
1126 ~:filters-alist~ keyword while defining the back-end with
1127 ~org-export-define-derived-backend~. Each association has a key
1128 among the following symbols and a function or a list of functions as
1131 - ~:filter-babel-call~
1133 - ~:filter-center-block~
1137 - ~:filter-comment-block~
1139 - ~:filter-dynamic-block~
1141 - ~:filter-example-block~
1142 - ~:filter-export-block~
1143 - ~:filter-export-snippet~
1144 - ~:filter-final-output~
1145 - ~:filter-fixed-width~
1146 - ~:filter-footnote-definition~
1147 - ~:filter-footnote-reference~
1148 - ~:filter-headline~
1149 - ~:filter-horizontal-rule~
1150 - ~:filter-inline-babel-call~
1151 - ~:filter-inline-src-block~
1152 - ~:filter-inlinetask~
1156 - ~:filter-latex-environment~
1157 - ~:filter-latex-fragment~
1158 - ~:filter-line-break~
1161 - ~:filter-paragraph~
1162 - ~:filter-parse-tree~
1163 - ~:filter-plain-list~
1164 - ~:filter-plain-text~
1165 - ~:filter-planning~
1166 - ~:filter-property-drawer~
1167 - ~:filter-quote-block~
1168 - ~:filter-quote-section~
1169 - ~:filter-radio-target~
1171 - ~:filter-special-block~
1172 - ~:filter-src-block~
1173 - ~:filter-strike-through~
1174 - ~:filter-statistics-cookie~
1175 - ~:filter-subscript~
1176 - ~:filter-superscript~
1178 - ~:filter-table-cell~
1179 - ~:filter-table-row~
1181 - ~:filter-timestamp~
1182 - ~:filter-underline~
1183 - ~:filter-verbatim~
1184 - ~:filter-verse-block~
1187 For example, =e-ascii= back-end implements a filter that makes sure
1188 headlines end with two blank lines:
1190 #+BEGIN_SRC emacs-lisp
1191 (org-export-define-backend e-ascii
1193 :filters-alist ((:filter-headline . org-e-ascii-filter-headline-blank-lines)
1194 (:filter-section . org-e-ascii-filter-headline-blank-lines)))
1196 (defun org-e-ascii-filter-section-blank-lines (headline back-end info)
1197 "Filter controlling number of blank lines after a section."
1198 (if (not (eq back-end 'e-ascii)) headline
1199 (let ((blanks (make-string 2 ?\n)))
1200 (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline))))
1208 A whole set of tools is available to help build new exporters. Any
1209 function general enough to have its use across a couple of back-ends
1212 Many of them are high-level access to properties from the
1213 communication channel. As such, they should be preferred to
1214 straight access to communication channel, when possible.
1216 ** ~org-element-adopt-element~
1218 :CUSTOM_ID: adopt-element
1221 Add an element to the contents of another element.
1223 See also: [[#set-element][~org-element-set-element~]]
1225 ** ~org-element-set-element~
1227 :CUSTOM_ID: set-element
1230 Replace an element with another in the parse tree.
1232 See also: [[#adopt-element][~org-element-adopt-element~]].
1234 ** ~org-export-activate-smart-quotes~
1236 :CUSTOM_ID: activate-smart-quotes
1239 Transform quotes and apostrophes into their "smart" counterpart in
1242 It should be used after a check against ~:with-smart-quotes~ value
1243 in communication channel.
1245 Since this function needs the original string, it may be useful to
1246 apply others transformations (i.e. characters protection) on a copy
1247 of that string and provide the pristine original string as the
1250 For example, in ~e-html~ back-end, it is necessary to protect "<",
1251 ">" and "&" characters before calling this function. Here's an
1252 excerpt of the ~plain-text~ transcoder:
1254 #+BEGIN_SRC emacs-lisp
1255 (let ((output text))
1256 ;; Protect following characters: <, >, &.
1257 (setq output (org-e-html-encode-plain-text output))
1258 ;; Handle smart quotes. Be sure to provide original string since
1259 ;; OUTPUT may have been modified.
1260 (when (plist-get info :with-smart-quotes)
1261 (setq output (org-export-activate-smart-quotes output :html info text)))
1267 ** ~org-export-collect-figures~
1269 :CUSTOM_ID: collect-figures
1272 Return a list of all exportable figures in parse tree.
1274 Used to build a table of figures.
1276 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1277 [[#collect-tables][~org-export-collect-tables~]], [[#collect-listings][~org-export-collect-listings~]].
1279 ** ~org-export-collect-footnote-definitions~
1281 :CUSTOM_ID: collect-footnote-definitions
1284 List actually used footnotes definitions in order to add footnote
1285 listings throughout the transcoded data.
1287 Feed it with the whole parse tree to get the full footnote listing.
1288 Feed it with the current headline to get partial footnote listing
1289 relative to that headline.
1291 Number, label, if any, and definition are provided.
1293 See also: [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1294 [[#get-footnote-definition][~org-export-get-footnote-definition~]],
1295 [[#get-footnote-number][~org-export-get-footnote-number~]].
1297 ** ~org-export-collect-headlines~
1299 :CUSTOM_ID: collect-headlines
1302 Return a list of all exportable headlines, possibly limited to
1305 Used to build a table of contents.
1307 See also: [[#collect-tables][~org-export-collect-tables~]],
1308 [[#collect-figures][~org-export-collect-figures~]], [[#collect-listings][~org-export-collect-listings~]].
1310 ** ~org-export-collect-listings~
1312 :CUSTOM_ID: collect-listings
1315 Return a list of all exportable source blocks with a caption or
1316 a name in parse tree.
1318 Used to build a table of listings.
1320 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1321 [[#collect-tables][~org-export-collect-tables~]], [[#collect-figures][~org-export-collect-figures~]].
1322 ** ~org-export-collect-tables~
1324 :CUSTOM_ID: collect-tables
1327 Return a list of all exportable tables with a caption or a name in
1330 Used to build a table of tables.
1332 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1333 [[#collect-figures][~org-export-collect-figures~]], [[#collect-listings][~org-export-collect-listings~]].
1335 ** ~org-export-data~
1340 Transcode a given element, object, secondary string or string using
1343 It is used primarily to transcode secondary strings, like ~:title~.
1344 For example =e-beamer= back-end uses the following:
1346 #+BEGIN_SRC emacs-lisp
1347 (defun org-e-beamer-template (contents info)
1348 (let ((title (org-export-data (plist-get info :title) info)))
1352 ** ~org-export-first-sibling-p~
1354 :CUSTOM_ID: first-sibling-p
1357 Non-nil if an headline is the first of its siblings.
1359 Used to know when to start a list if headline's relative level is
1360 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1362 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1363 [[#number-to-roman][~org-export-number-to-roman~]], [[#last-sibling-p][~org-export-last-sibling-p~]].
1365 ** ~org-export-footnote-first-reference-p~
1367 :CUSTOM_ID: footnote-first-reference-p
1370 Non-nil when a footnote reference if the first reference relative
1373 Used when a back-end needs to attach the footnote definition only
1374 to the first occurrence of the corresponding label.
1376 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1377 [[#get-footnote-definition][~org-export-get-footnote-definition~]],
1378 [[#get-footnote-number][~org-export-get-footnote-number~]].
1380 ** ~org-export-format-code-default~
1382 :CUSTOM_ID: format-code-default
1385 Return contents of a =src-block= or =example-block= element in
1386 a format suited for raw text or verbatim output. More
1387 specifically, it takes care of line numbering and labels
1388 integration depending of element's switches, but no formatting is
1389 otherwise applied to source code.
1391 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1393 ** ~org-export-format-code~
1395 :CUSTOM_ID: format-code
1398 Helper function to format source code. It applies a given function
1399 on each line of the code, passing current line number and
1400 associated code reference label, if any, as arguments.
1402 See also: [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]],
1403 [[#unravel-code][~org-export-unravel-code~]].
1405 ** ~org-export-get-caption~
1407 :CUSTOM_ID: get-caption
1410 Return the caption of a given element, as a secondary string. With
1411 an optional argument, return the short caption instead.
1413 As an example, =e-ascii= back-end, when creating a list of
1414 listings, uses the following:
1416 #+BEGIN_SRC emacs-lisp
1417 (defun org-e-ascii--list-listings (keyword info)
1418 (let ((title (org-e-ascii--translate "List of Listings" info)))
1424 ;; Use short name in priority, if available.
1425 (let ((caption (or (org-export-get-caption src-block t)
1426 (org-export-get-caption src-block))))
1427 (org-export-data caption info)
1429 (org-export-collect-listings info) "\n"))))
1432 See also: [[#read-attribute][~org-export-read-attribute~]].
1434 ** ~org-export-get-coderef-format~
1436 :CUSTOM_ID: get-coderef-format
1439 Return an appropriate format string for code reference links.
1441 See also: [[#resolve-coderef][~org-export-resolve-coderef~]].
1443 ** ~org-export-get-footnote-definition~
1445 :CUSTOM_ID: get-footnote-definition
1448 Retrieve the footnote definition relative to a given footnote
1451 If the footnote definition in inline, it is returned as a secondary
1452 string. Otherwise, it is full Org data.
1454 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1455 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1456 [[#get-footnote-number][~org-export-get-footnote-number~]].
1458 ** ~org-export-get-footnote-number~
1460 :CUSTOM_ID: get-footnote-number
1463 Return the ordinal attached to a footnote reference or definition.
1465 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1466 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1467 [[#get-footnote-definition][~org-export-get-footnote-definition~]].
1469 ** ~org-export-get-genealogy~
1471 :CUSTOM_ID: get-genealogy
1474 Return flat list of current object or element's parents from
1475 closest to farthest, along with their contents.
1477 See also: [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1478 [[#get-parent-headline][~org-export-get-parent-headline~]],
1479 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1480 [[#get-previous-element][~org-export-get-previous-element~]].
1482 ** ~org-export-get-headline-number~
1484 :CUSTOM_ID: get-headline-number
1487 Return the section number of an headline, as a list of integers.
1489 See also: [[#headline-numbered-p][~org-export-headline-numbered-p~]],
1490 [[#number-to-roman][~org-export-number-to-roman~]].
1492 ** ~org-export-get-loc~
1497 Return count of accumulated lines of code from previous
1498 line-numbered =example-block= and =src-block= elements, according
1499 to current element's switches.
1501 In other words, the first line of code in the current block is
1502 supposed to be numbered as the returned value plus one, assuming
1503 its ~:number-lines~ properties is non-nil.
1505 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1507 ** ~org-export-get-next-element~
1509 :CUSTOM_ID: get-next-element
1512 Return element (resp. object or string) after an element
1513 (resp. object), or nil.
1515 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1516 [[#get-parent-headline][~org-export-get-parent-headline~]],
1517 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1518 [[#get-previous-element][~org-export-get-previous-element~]].
1520 ** ~org-export-get-ordinal~
1522 :CUSTOM_ID: get-ordinal
1525 Associate a sequence number to any object or element. It is meant
1526 to be used to build captions.
1528 Also, it could be applied on a fuzzy link's destination, since such
1529 links are expected to be replaced with the sequence number of their
1530 destination, provided they have no description.
1532 Taken from =e-ascii= back-end, the following example shows how
1533 fuzzy links could be handled :
1535 #+BEGIN_SRC emacs-lisp :exports code
1536 (let ((type (org-element-property :type link)))
1539 ;; Do not apply a special syntax on fuzzy links pointing to targets.
1540 ((string= type "fuzzy")
1541 (let ((destination (org-export-resolve-fuzzy-link link info)))
1542 ;; Ignore invisible "#+TARGET: path".
1543 (unless (eq (org-element-type destination) 'keyword)
1544 ;; If link has a description, use it.
1545 (if (org-string-nw-p desc) desc
1547 (let ((number (org-export-get-ordinal destination info)))
1549 (if (atom number) (number-to-string number)
1550 (mapconcat 'number-to-string number ".")))))))))
1554 See also : [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]]
1556 ** ~org-export-get-parent-element~
1558 :CUSTOM_ID: get-parent-paragraph
1561 Return the first element containing provided object, if any.
1562 Return nil otherwise.
1564 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1565 [[#get-parent-headline][~org-export-get-parent-headline~]],
1566 [[#get-previous-element][~org-export-get-previous-element~]], [[#get-next-element][~org-export-get-next-element~]].
1568 ** ~org-export-get-parent-headline~
1570 :CUSTOM_ID: get-parent-headline
1573 Return the headline containing provided element or object, if any.
1574 Return nil otherwise.
1576 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1577 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1578 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1579 [[#get-previous-element][~org-export-get-previous-element~]].
1581 ** ~org-export-get-parent~
1583 :CUSTOM_ID: get-parent
1586 Return closest element containing current element or object, if
1587 any. Return nil otherwise.
1589 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1590 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1591 [[#get-parent-headline][~org-export-get-parent-headline~]],
1592 [[#get-previous-element][~org-export-get-previous-element~]].
1594 ** ~org-export-get-previous-element~
1596 :CUSTOM_ID: get-previous-element
1599 Return element (resp. object or string) before an element
1600 (resp. object), or nil.
1602 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1603 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1604 [[#get-parent-headline][~org-export-get-parent-headline~]],
1605 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]].
1607 ** ~org-export-get-relative-level~
1609 :CUSTOM_ID: get-relative-level
1612 Return headline level, relatively to the lower headline level in
1613 the parsed tree. It is meant to be used over ~:level~ headline's
1616 See also:[[#first-sibling-p][~org-export-first-sibling-p~]],
1617 [[#get-headline-number][~org-export-get-headline-number~]],[[#headline-numbered-p][~org-export-headline-numbered-p~]],
1618 [[#last-sibling-p][~org-export-last-sibling-p~]].
1620 ** ~org-export-get-table-cell-at~
1622 :CUSTOM_ID: get-table-cell-at
1625 Return exportable cell object at a given position, or nil. Hence,
1626 position ~(0 . 0)~ will always point to the first exportable cell
1629 See also: [[#table-cell-address][~org-export-table-cell-address~]],
1630 [[#table-dimensions][~org-export-table-dimensions~]].
1632 ** ~org-export-get-tags~
1634 :CUSTOM_ID: get-tags
1637 Return list of exportable tags attached to a given headline or
1640 In particular, it removes select tags and exclude tags. The
1641 function also accepts an arbitrary list of tags for further
1644 For example, =e-latex= back-end uses the following snippet in the
1645 inlinetask transcode function.
1647 #+BEGIN_SRC emacs-lisp
1648 (let ((title (org-export-data (org-element-property :title inlinetask) info))
1649 (todo (and (plist-get info :with-todo-keywords)
1650 (let ((todo (org-element-property :todo-keyword inlinetask)))
1651 (and todo (org-export-data todo info)))))
1652 (todo-type (org-element-property :todo-type inlinetask))
1653 (tags (and (plist-get info :with-tags)
1654 (org-export-get-tags inlinetask info)))
1655 (priority (and (plist-get info :with-priority)
1656 (org-element-property :priority inlinetask))))
1660 ** ~org-export-headline-numbered-p~
1662 :CUSTOM_ID: headline-numbered-p
1665 Non nil when a given headline should be numbered.
1667 See also: [[#get-headline-number][~org-export-get-headline-number~]],
1668 [[#get-relative-level][~org-export-get-relative-level~]].
1670 ** ~org-export-inline-image-p~
1672 :CUSTOM_ID: inline-image-p
1675 Non-nil when the link provided should be considered as an inline
1676 image. Note that it always return nil when the link has
1679 It accepts an optional set of rules in order to tweak the
1680 definition of an inline image, which is, by default, any link
1681 targetting a local file whose extension is either "png", "jpeg",
1682 "jpg", "gif", "tiff", "tif", "xbm", "xpm", "pbm", "pgm" or "ppm".
1684 A set of rules consists in an alist whose key is a type of link, as
1685 a string, and whose value is a regexp matching link's path. As an
1686 example, =e-html= back-end uses the following rules:
1688 #+BEGIN_SRC emacs-lisp
1689 '(("file" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1690 ("http" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1691 ("https" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'"))
1694 See also: [[#solidify-link-text][~org-export-solidify-link-text~]],
1695 [[#get-coderef-format][~org-export-get-coderef-format~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
1697 ** ~org-export-last-sibling-p~
1699 :CUSTOM_ID: last-sibling-p
1702 Non-nil if an headline is the last of its siblings.
1704 Used to know when to close a list if headline's relative level is
1705 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1707 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1708 [[#number-to-roman][~org-export-number-to-roman~]], [[#first-sibling-p][~org-export-first-sibling-p~]].
1710 ** ~org-export-number-to-roman~
1712 :CUSTOM_ID: number-to-roman
1715 Convert numbers to roman numbers. It can be used to provide roman
1716 numbering for headlines and numbered lists.
1718 See also: [[#get-headline-number][~org-export-get-headline-number~]].
1720 ** ~org-export-read-attribute~
1722 :CUSTOM_ID: read-attribute
1725 Read a property from a given element as a plist. It can be used to
1726 normalize affiliated keywords' syntax. For example, the following
1727 affiliated keywords:
1730 ,#+ATTR_HTML: :width 10 :height 5
1731 ,#+ATTR_HTML: :file "filename.ext"
1734 would be returned as:
1736 #+BEGIN_SRC emacs-lisp
1737 '(:width 10 :height 5 :file "filename.ext")
1740 See also: [[#get-caption][~org-export-get-caption~]].
1742 ** ~org-export-resolve-coderef~
1744 :CUSTOM_ID: resolve-coderef
1747 Search for a code reference within ~src-block~ and ~example-block~
1748 elements. Return corresponding --possibly accumulated-- line
1749 number, or reference itself, depending on container's switches.
1751 See also : [[#get-coderef-format][~org-export-get-coderef-format~]],
1752 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1753 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1755 ** ~org-export-resolve-fuzzy-link~
1757 :CUSTOM_ID: resolve-fuzzy-link
1760 Search destination of a fuzzy link — i.e. it has a ~fuzzy~ ~:type~
1761 attribute – within the parsed tree, and return that element,
1764 See also: [[#get-ordinal][~org-export-get-ordinal~]], [[#resolve-coderef][~org-export-resolve-coderef~]],
1765 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1766 [[#solidify-link-text][~org-export-solidify-link-text~]].
1768 ** ~org-export-resolve-id-link~
1770 :CUSTOM_ID: resolve-id-link
1773 Search headline targetted by an id link --- i.e. it has a ~id~ or
1774 ~custom-id~ ~:type~ attribute --- within the parse tree. Return
1775 the matching headline in the tree, the name of the external file,
1776 as a string, or nil.
1778 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1779 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1780 [[#solidify-link-text][~org-export-solidify-link-text~]].
1782 ** ~org-export-resolve-radio-link~
1784 :CUSTOM_ID: resolve-radio-link
1787 Return first radio target object matching a radio link --- that is
1788 with a ~radio~ ~:type~ attribute --- in the parse tree, or nil.
1790 Typically, target's contents are exported through ~org-export-data~
1791 and used as link description, as in the following excerpt from
1794 #+BEGIN_SRC emacs-lisp
1795 (defun org-e-latex-link (link desc info)
1796 (let* ((type (org-element-property :type link))
1800 ((string= type "radio")
1801 (let ((destination (org-export-resolve-radio-link link info)))
1803 (format "\\hyperref[%s]{%s}"
1804 (org-export-solidify-link-text path)
1805 (org-export-data (org-element-contents destination) info)))))
1809 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1810 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1811 [[#solidify-link-text][~org-export-solidify-link-text~]].
1813 ** ~org-export-solidify-link-text~
1815 :CUSTOM_ID: solidify-link-text
1818 Normalize a string, replacing most non-standard characters with
1821 Used to turn targets names into safer versions for links.
1823 See also: [[#inline-image-p][~org-export-inline-image-p~]],
1824 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]],
1825 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1827 ** ~org-export-table-cell-address~
1829 :CUSTOM_ID: table-cell-address
1832 Return row and column of a given cell object. Positions are
1833 0-indexed and only exportable rows and columns are considered. The
1834 function returns nil if called on a non-exportable cell.
1836 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1837 [[#table-dimensions][~org-export-table-dimensions~]].
1839 ** ~org-export-table-cell-alignment~
1841 :CUSTOM_ID: table-cell-alignment
1844 Return expected alignment for the contents of a given cell object.
1845 It can be either ~left~, ~right~ or ~center~.
1847 See also: [[#table-cell-borders][~org-export-table-cell-borders~]],
1848 [[#table-cell-width][~org-export-table-cell-width~]].
1850 ** ~org-export-table-cell-borders~
1852 :CUSTOM_ID: table-cell-borders
1855 Indicate expected borders for a given cell object. When non-nil,
1856 return value is a list of symbols among ~top~, ~bottom~, ~above~,
1857 ~below~, ~left~ and ~right~.
1859 Special values ~top~ and ~bottom~ only happen for cells in,
1860 respectively, the first and the last exportable rows.
1862 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1863 [[#table-cell-width][~org-export-table-cell-width~]].
1865 ** ~org-export-table-cell-ends-colgroup-p~
1867 :CUSTOM_ID: table-cell-ends-colgroup-p
1870 Non-nil when a table cell object ends a column group.
1872 See also: [[#table-cell-starts-colgroup-p][~org-export-table-cell-starts-colgroup-p~]].
1874 ** ~org-export-table-cell-starts-colgroup-p~
1876 :CUSTOM_ID: table-cell-starts-colgroup-p
1879 Non-nil when a table cell object starts a column group.
1881 See also: [[#table-cell-ends-colgroup-p][~org-export-table-cell-ends-colgroup-p~]].
1883 ** ~org-export-table-cell-width~
1885 :CUSTOM_ID: table-cell-width
1888 Return expected width for contents of a given cell object.
1890 Only width specified explicitely through meta-data is considered.
1891 If no such information can be found, return nil instead.
1893 Some back-end may still need to know the actual width of exported
1894 cell's contents in order to compute column's width. In that case,
1895 every cell in the column must be transcoded in order to find the
1896 widest one. The snippet below, extracted from =org-e-ascii.el=
1897 illustrates a possible implementation.
1899 #+BEGIN_SRC emacs-lisp
1900 (or (org-export-table-cell-width table-cell info)
1901 (let* ((max-width 0)
1902 (table (org-export-get-parent-table table-cell info))
1903 (specialp (org-export-table-has-special-column-p table))
1904 (col (cdr (org-export-table-cell-address table-cell info))))
1908 ;; For each exportable row, get the cell at column COL and
1909 ;; transcode its contents. Then compare its length with
1910 ;; MAX-WIDTH and keep the greater of two.
1914 (org-element-contents
1915 (elt (if specialp (car (org-element-contents row))
1916 (org-element-contents row))
1924 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1925 [[#table-cell-borders][~org-export-table-cell-borders~]].
1927 ** ~org-export-table-dimensions~
1929 :CUSTOM_ID: table-dimensions
1932 Return the number of exportable rows and columns in a given table.
1934 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1935 [[#table-cell-address][~org-export-table-cell-address~]].
1937 ** ~org-export-table-has-header-p~
1939 :CUSTOM_ID: table-has-header-p
1942 Non-nil when table has at least two row groups.
1944 See also: [[#table-has-special-column-p][~org-export-table-has-special-column-p~]],
1945 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1947 ** ~org-export-table-has-special-column-p~
1949 :CUSTOM_ID: table-has-special-column-p
1952 Non-nil when first column in the table only contains meta-data.
1954 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
1955 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1957 ** ~org-export-table-row-ends-header-p~
1959 :CUSTOM_ID: table-row-ends-header-p
1962 Non-nil when a table row element ends table's header.
1964 See also: [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1965 [[#table-row-group][~org-export-table-row-group~]],
1966 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1967 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1969 ** ~org-export-table-row-ends-rowgroup-p~
1971 :CUSTOM_ID: table-row-ends-rowgroup-p
1974 Non-nil when a a table row element ends a rowgroup, header
1977 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1978 [[#table-row-group][~org-export-table-row-group~]],
1979 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1980 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1982 ** ~org-export-table-row-group~
1984 :CUSTOM_ID: table-row-group
1987 Return row group number for a given table row element.
1989 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1990 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1991 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1992 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1994 ** ~org-export-table-row-is-special-p~
1996 :CUSTOM_ID: table-row-is-special-p
1999 Non-nil a given table row element only contains meta-data.
2001 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
2002 [[#table-has-special-column-p][~org-export-table-has-special-column-p~]].
2004 ** ~org-export-table-row-starts-header-p~
2006 :CUSTOM_ID: table-row-starts-header-p
2009 Non-nil when a table row element starts table's header.
2011 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2012 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2013 [[#table-row-group][~org-export-table-row-group~]],
2014 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
2016 ** ~org-export-table-row-starts-rowgroup-p~
2018 :CUSTOM_ID: table-row-starts-rowgroup-p
2021 Non-nil when a table row element starts a rowgroup, header
2024 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2025 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2026 [[#table-row-group][~org-export-table-row-group~]],
2027 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]].
2029 ** ~org-export-translate~
2031 Translate a string, i.e. "Table of Contents", according to language
2034 Refer to ~org-export-dictionary~ variable for the list of all
2037 ** ~org-export-unravel-code~
2039 :CUSTOM_ID: unravel-code
2042 Clean source code from an =example-block= or a =src-block= element
2043 and extract code references out of it.
2045 Its purpose is to allow to transform raw source code first and then
2046 integrate line numbers or references back into the final output.
2047 That final task can be achieved with the help of
2048 ~org-export-format-code~ function.
2050 See also: [[#format-code][~org-export-format-code~]],
2051 [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]].
2055 # sentence-end-double-space: t