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 containing objects and recursive objects
143 will also have ~:contents-begin~ and ~:contents-end~ properties to
146 In addition to these properties, each element can optionally get
147 some more from affiliated keywords, namely: ~:attr_ascii~,
148 ~:attr_docbook~, ~:attr_html~, ~:attr_latex~, ~:attr_odt~,
149 ~:caption~, ~:header~, ~:name~, ~:plot~, and ~:results~.
151 At the lowest level, a ~:parent~ property is also attached to any
152 string, as a text property.
154 Other properties, specific to each element or object, are listed
161 - ~:info~ :: Information about function being called, as returned
162 by ~ob-babel-lob-get-info~ (string).
167 No specific property.
173 - ~:hiddenp~ :: Non-nil if the block is hidden (boolean).
179 - ~:duration~ :: Clock duration for a closed clock, or nil (string
181 - ~:status~ :: Status of current clock (symbol: ~closed~ or
183 - ~:value~ :: Timestamp associated to clock keyword (timestamp
190 - ~:value~ :: Contents (string).
196 - ~:value~ :: Comments, with pound signs (string).
202 - ~:value~ :: Comments, without block's boundaries (string).
203 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
209 - ~:value~ :: Full Sexp (string).
215 - ~:drawer-name~ :: Drawer's name (string).
216 - ~:hiddenp~ :: Non-nil if the drawer is hidden (boolean).
218 /Note relative to export:/ The idea behind drawers is that they are
219 transparent export-wise. By default, they should return their
226 - ~:arguments~ :: Block's parameters (string).
227 - ~:block-name~ :: Block's name (string).
228 - ~:drawer-name~ :: Drawer's name (string).
229 - ~:hiddenp~ :: Non-nil if the block is hidden (boolean).
235 - ~:ascii~ :: Entity's ASCII representation (string).
236 - ~:html~ :: Entity's HTML representation (string).
237 - ~:latex~ :: Entity's LaTeX representation (string).
238 - ~:latex-math-p~ :: Non-nil if entity's LaTeX representation
239 should be in math mode (boolean).
240 - ~:latin1~ :: Entity's Latin-1 encoding representation (string).
241 - ~:name~ :: Entity's name, without backslash nor brackets
243 - ~:use-brackets-p~ :: Non-nil if entity is written with optional
244 brackets in original buffer (boolean).
245 - ~:utf-8~ :: Entity's UTF-8 encoding representation (string).
251 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
252 - ~:label-fmt~ :: Format string used to write labels in current
253 block, if different from
254 ~org-coderef-label-format~ (string or nil).
255 - ~:language~ :: Language of the code in the block, if specified
257 - ~:number-lines~ :: Non-nil if code lines should be numbered.
258 A ~new~ value starts numbering from 1 wheareas ~continued~
259 resume numbering from previous numbered block (symbol: ~new~,
261 - ~:options~ :: Block's options located on the block's opening line
263 - ~:parameters~ :: Optional header arguments (string or nil).
264 - ~:preserve-indent~ :: Non-nil when indentation within the block
265 mustn't be modified upon export (boolean).
266 - ~:retain-labels~ :: Non-nil if labels should be kept visible upon
268 - ~:switches~ :: Optional switches for code block export (string or
270 - ~:use-labels~ :: Non-nil if links to labels contained in the
271 block should display the label instead of the
272 line number (boolean).
273 - ~:value~ :: Contents (string).
279 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
280 - ~:type~ :: Related back-end's name (string).
281 - ~:value~ :: Contents (string).
287 - ~:back-end~ :: Relative back-end's name (string).
288 - ~:value~ :: Export code (string).
294 - ~:value~ :: Contents, with colons (string).
296 ** Footnote Definition
300 - ~:label~ :: Label used for references (string).
302 ** Footnote Reference
306 - ~:inline-definition~ :: Footnote's definition, when inlined
307 (secondary string or nil).
308 - ~:label~ :: Footnote's label, if any (string or nil).
309 - ~:raw-definition~ :: Uninterpreted footnote's definition, when
310 inlined (string or nil).
311 - ~:type~ :: Determine whether reference has its definition inline,
312 or not (symbol: ~inline~, ~standard~).
318 In addition to the following list, any property specified in
319 a property drawer attached to the headline will be accessible as an
320 attribute (with underscores replaced with hyphens and a lowercase
321 name, i.e. ~:custom-id~).
323 - ~:archivedp~ :: Non-nil if the headline has an archive tag
325 - ~:clockedp~ :: Non-nil when headline is currently being clocked
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 - ~:clockedp~ :: Non-nil when inlinetask is currently being clocked
391 - ~:closed~ :: Inlinetask's CLOSED reference, if any (timestamp
393 - ~:deadline~ :: Inlinetask's DEADLINE reference, if any (timestamp
395 - ~:hiddenp~ :: Non-nil if the headline is hidden (boolean).
396 - ~:level~ :: Reduced level of the inlinetask (integer).
397 - ~:priority~ :: Headline's priority, as a character (integer).
398 - ~:raw-value~ :: Raw inlinetask's text, without the stars and the
400 - ~:scheduled~ :: Inlinetask's SCHEDULED reference, if any
401 (timestamp object or nil).
402 - ~:tags~ :: Inlinetask's tags, if any (list of strings).
403 - ~:title~ :: Parsed inlinetask's text, without the stars and the
404 tags (secondary string).
405 - ~:todo-keyword~ :: Inlinetask's TODO keyword, if any (string or
407 - ~:todo-type~ :: Type of inlinetask's TODO keyword, if any
408 (symbol: ~done~, ~todo~).
414 No specific property.
420 - ~:bullet~ :: Item's bullet (string).
421 - ~:checkbox~ :: Item's check-box, if any (symbol: ~on~, ~off~,
423 - ~:counter~ :: Item's counter, if any. Literal counters become
425 - ~:raw-tag~ :: Uninterpreted item's tag, if any (string or nil).
426 - ~:tag~ :: Parsed item's tag, if any (secondary string or nil).
427 - ~:hiddenp~ :: Non-nil if item is hidden (boolean).
428 - ~:structure~ :: Full list's structure, as returned by
429 ~org-list-struct~ (alist).
435 - ~:key~ :: Keyword's name (string).
436 - ~:value~ :: Keyword's value (string).
438 /Note relative to export:/ Each back-end should, as far as
439 possible, support a number of common keywords. These include:
441 - Back-end relative keyword (i.e. "LATEX" for =e-latex=), which
442 should always return its value as-is.
444 - "TARGET" keyword, which should always return a nil value.
446 - "TOC" keyword. It accepts four common values: "headlines",
447 "tables", "figures", "listings". Also, "headlines" value can
448 have an optional numeric argument to specify depth of the
451 See [[#collect-headlines][~org-export-collect-headlines~]], [[#collect-tables][~org-export-collect-tables~]],
452 [[#collect-figures][~org-export-collect-figures~]] and [[#collect-listings][~org-export-collect-listings~]].
460 - ~:begin~ :: Buffer position at first affiliated keyword or at the
461 beginning of the first line of environment (integer).
462 - ~:end~ :: Buffer position at the first non-blank line after last
463 line of the environment, or buffer's end (integer).
464 - ~:post-blank~ :: Number of blank lines between last environment's
465 line and next non-blank line or buffer's end
467 - ~:value~ :: LaTeX code (string).
473 - ~:value~ :: LaTeX code (string).
479 No specific property.
485 - ~:application~ :: Name of application requested to open the link
486 in Emacs (string or nil). It only applies to
488 - ~:path~ :: Identifier for link's destination. It is usually the
489 link part with type, if specified, removed (string).
490 - ~:raw-link~ :: Uninterpreted link part (string).
491 - ~:search-option~ :: Additional information for file location
492 (string or nil). It only applies to "file" type links.
493 - ~:type~ :: Link's type. Possible types (string) are:
494 - ~coderef~ :: Line in some source code,
495 - ~custom-id~ :: Specific headline's custom-id,
496 - ~file~ :: External file,
497 - ~fuzzy~ :: Target, target keyword, a named element or an
498 headline in the current parse tree,
499 - ~id~ :: Specific headline's id,
500 - ~radio~ :: Radio-target.
501 It can also be any ~org-link-types~ element.
504 /Notes relative to export:/
506 - A fuzzy link leading to a target keyword should be ignored during
507 export: it's an invisible target.
509 - A fuzzy link with no description should display the
510 cross-reference number of its target. This number can be:
512 - If link's destination is a target object within a footnote, it
513 will be footnote's number.
515 - If link's destination is a target object in a list, it will be
518 - If link leads to a named element, it will be the sequence number
519 of that element among named elements of the same type.
521 - Otherwise, it will be the number of the headline containing
524 See [[#get-ordinal][~org-export-get-ordinal~]] function.
530 - ~:args~ :: Arguments passed to the macro (list of strings).
531 - ~:key~ :: Macro's name (string).
532 - ~:value~ :: Replacement text (string).
534 /Note relative to export:/ Macro expansion takes place before
535 buffer parsing. As such, export back-ends don't have to handle:
536 they'll never see them.
540 Element containing objects.
542 No specific property.
548 - ~:structure~ :: Full list's structure, as returned by
549 ~org-list-struct~ (alist).
550 - ~:type~ :: List's type (symbol: ~descriptive~, ~ordered~,
557 - ~:closed~ :: Timestamp associated to closed keyword, if any
558 (timestamp object or nil).
559 - ~:deadline~ :: Timestamp associated to deadline keyword, if any
560 (timestamp object or nil).
561 - ~:scheduled~ :: Timestamp associated to scheduled keyword, if any
562 (timestamp object or nil).
568 - ~:hiddenp~ :: Non-nil if drawer is hidden (boolean).
569 - ~:properties~ :: Properties defined in the drawer (alist).
575 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
581 - ~:value~ :: Quoted text (string).
587 - ~:raw-value~ :: Uninterpreted contents (string).
593 No specific property.
599 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
600 - ~:type~ :: Block's name (string).
606 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
607 - ~:label-fmt~ :: Format string used to write labels in current
608 block, if different from
609 ~org-coderef-label-format~ (string or nil).
610 - ~:language~ :: Language of the code in the block, if specified
612 - ~:number-lines~ :: Non-nil if code lines should be numbered.
613 A ~new~ value starts numbering from 1 wheareas ~continued~
614 resume numbering from previous numbered block (symbol: ~new~,
616 - ~:parameters~ :: Optional header arguments (string or nil).
617 - ~:preserve-indent~ :: Non-nil when indentation within the block
618 mustn't be modified upon export (boolean).
619 - ~:retain-labels~ :: Non-nil if labels should be kept visible upon
621 - ~:switches~ :: Optional switches for code block export (string or
623 - ~:use-labels~ :: Non-nil if links to labels contained in the
624 block should display the label instead of the
625 line number (boolean).
626 - ~:value~ :: Source code (string).
632 - ~:value~ :: Full cookie (string).
638 No specific property.
644 - ~:use-brackets-p~ :: Non-nil if contents are enclosed in curly
651 - ~:use-brackets-p~ :: Non-nil if contents are enclosed in curly
658 - ~:tblfm~ :: Formulas associated to the table, if any (string or
660 - ~:type~ :: Table's origin (symbol: ~table.el~, ~org~).
661 - ~:value~ :: Raw ~table.el~ table or nil (string or nil).
667 No specific property.
671 Element containing objects.
673 - ~:type~ :: Row's type (symbol: ~standard~, ~rule~).
679 - ~:value~ :: Target's ID (string).
682 Notes relatives to export:
684 - Target should become an anchor, if back-end permits it.
685 - Target's ID shouldn't be visible on export.
691 - ~:day-end~ :: Day part from timestamp end. If no ending date is
692 defined, it defaults to start day part (integer).
693 - ~:day-start~ :: Day part from timestamp start (integer).
694 - ~:hour-start~ :: Hour part from timestamp end. If no ending date
695 is defined, it defaults to start hour part, if
696 any (integer or nil).
697 - ~:hour-start~ :: Hour part from timestamp start, if specified
699 - ~:minute-start~ :: Minute part from timestamp end. If no ending
700 date is defined, it defaults to start minute part, if any
702 - ~:minute-start~ :: Minute part from timestamp start, if specified
704 - ~:month-end~ :: Month part from timestamp end. If no ending date
705 is defined, it defaults to start month part
707 - ~:month-start~ :: Month part from timestamp start (integer).
708 - ~:raw-value~ :: Raw timestamp (string).
709 - ~:repeater-type~ :: Type of repeater, if any (symbol: ~catch-up~,
710 ~restart~, ~cumulate~ or nil)
711 - ~:repeater-unit~ :: Unit of shift, if a repeater is defined
712 (symbol: ~year~, ~month~, ~week~, ~day~, ~hour~ or nil).
713 - ~:repeater-value~ :: Value of shift, if a repeater is defined
715 - ~:type~ :: Type of timestamp (symbol: ~active~, ~active-range~,
716 ~diary~, ~inactive~, ~inactive-range~).
717 - ~:year-end~ :: Year part from timestamp end. If no ending date
718 is defined, it defaults to start year part
720 - ~:year-start~ :: Year part from timestamp start (integer).
726 No specific property.
732 - ~:value~ :: Contents (string).
736 Element containing objects.
738 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
740 * The Communication Channel
742 :CUSTOM_ID: communication
745 This is the full list of properties available during transcode
746 process, with their category (~option~ or ~tree~) and their value
758 Current back-end used for transcoding.
765 String to write as creation information.
772 String to use as date.
779 Description text for the current data.
793 Tags for exclusion of sub-trees from export process.
796 - type :: list of strings
800 Hash table used to memoize results from [[#data][~org-export-data~]].
805 ** ~:footnote-definition-alist~
807 /Alist/ between footnote labels and their definition, as parsed
808 data. Only non-inline footnotes are represented in this /alist/.
809 Also, every definition isn't guaranteed to be referenced in the
810 parse tree. The purpose of this property is to preserve
811 definitions from oblivion – i.e. when the parse tree comes from
812 a part of the original buffer –, it isn't meant for direct use in
813 a back-end. To retrieve a definition relative to a reference, use
814 [[#get-footnote-definition][~org-export-get-footnote-definition~]] instead.
817 - type :: alist (STRING . LIST)
819 ** ~:headline-levels~
821 :CUSTOM_ID: headline-levels
824 Maximum level being exported as an headline. Comparison is done
825 with the relative level of headlines in the parse tree, not
826 necessarily with their actual level.
831 ** ~:headline-numbering~
833 Alist between headlines' beginning position and their numbering, as
834 a list of numbers – cf. [[#get-headline-number][~org-export-get-headline-number~]].
837 - type :: alist (INTEGER . LIST)
839 ** ~:headline-offset~
841 Difference between relative and real level of headlines in the
842 parse tree. For example, a value of -1 means a level 2 headline
843 should be considered as level 1 —
844 cf. [[#get-relative-level][~org-export-get-relative-level~]].
851 List of elements and objects that will be unconditionally ignored
855 - type :: list of elements
859 Alist between ID strings and destination file's path, relative to
863 - type :: alist (STRING . STRING)
867 Full path to input file, if any.
870 - type :: string or nil
874 List of keywords attached to data.
881 Default language used for translations.
888 Whole parse tree, available at any time during transcoding.
891 - type :: list (as returned by ~org-element-parse-buffer~)
893 ** ~:preserve-breaks~
895 Non-nil means transcoding should preserve all line breaks.
898 - type :: symbol (nil, t)
900 ** ~:section-numbers~
902 Non-nil means transcoding should add section numbers to headlines.
905 - type :: symbol (nil, t)
909 :CUSTOM_ID: select-tags
912 List of tags enforcing inclusion of sub-trees in transcoding. When
913 such a tag is present, sub-trees without it are /de facto/ excluded
914 from the process. See [[#use-select-tags][~:use-select-tags~]].
917 - type :: list of strings
921 List of targets raw names encountered in the parse tree. This is
922 used to partly resolve "fuzzy" links —
923 cf. [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
926 - type :: list of strings
928 ** ~:time-stamp-file~
930 Non-nil means transcoding should insert a time stamp in the output.
933 - type :: symbol (nil, t)
935 ** ~:translate-alist~
937 Alist between element and object types and transcoding functions
938 relative to the current back-end. Special keys ~template~ and
939 ~plain-text~ are also possible.
942 - type :: alist (SYMBOL . FUNCTION)
944 ** ~:use-select-tags~
946 :CUSTOM_ID: use-select-tags
949 When non-nil, a select tags has been found in the parse tree.
950 Thus, any headline without one will be filtered out. See
951 [[#select-tags][~:select-tags~]].
954 - type :: interger or nil
956 ** ~:with-archived-trees~
958 Non-nil when archived sub-trees should also be transcoded. If it
959 is set to the ~headline~ symbol, only the archived headline's name
963 - type :: symbol (nil, t, ~headline~)
967 Non-nil means author's name should be included in the output.
970 - type :: symbol (nil, t)
974 Non-nil means clock keywords should be exported.
977 - type :: symbol (nil, t)
981 Non-nil means a creation sentence should be inserted at the end of
982 the transcoded string. If the value is ~comment~, it should be
986 - type :: symbol (~comment~, nil, t)
990 Non-nil means drawers should be exported. If its value is a list
991 of names, only drawers with such names will be transcoded.
994 - type :: symbol (nil, t) or list of strings
998 Non-nil means output should contain author's email.
1000 - category :: option
1001 - type :: symbol (nil, t)
1003 ** ~:with-emphasize~
1005 Non-nil means emphasized text should be interpreted.
1007 - category :: option
1008 - type :: symbol (nil, t)
1010 ** ~:with-fixed-width~
1012 Non-nil if transcoder should interpret strings starting with
1013 a colon as a fixed-with — verbatim — area.
1015 - category :: option
1016 - type :: symbol (nil, t)
1018 ** ~:with-footnotes~
1020 Non-nil if transcoder should interpret footnotes.
1022 - category :: option
1023 - type :: symbol (nil, t)
1025 ** ~:with-plannings~
1027 Non-nil means transcoding should include planning info.
1029 - category :: option
1030 - type :: symbol (nil, t)
1034 Non-nil means transcoding should include priority cookies.
1036 - category :: option
1037 - type :: symbol (nil, t)
1039 ** ~:with-smart-quotes~
1041 Non-nil means activate smart quotes during export.
1043 - category :: option
1044 - type :: symbol (nil ,t)
1046 ** ~:with-special-strings~
1048 Non-nil means transcoding should interpret special strings in plain
1051 - category :: option
1052 - type :: symbol (nil, t)
1054 ** ~:with-sub-superscript~
1056 Non-nil means transcoding should interpret subscript and
1057 superscript. With a value of ~{}~, only interpret those using
1060 - category :: option
1061 - type :: symbol (nil, ~{}~, t)
1065 Non-nil means transcoding should interpret tables.
1067 - category :: option
1068 - type :: symbol (nil, t)
1072 Non-nil means transcoding should keep tags in headlines.
1073 A ~not-in-toc~ value will remove them from the table of contents,
1074 if any, nonetheless.
1076 - category :: option
1077 - type :: symbol (nil, t, ~not-in-toc~)
1081 Non-nil means transcoding should include headlines with a TODO
1082 keyword. A ~todo~ value will only include headlines with a TODO
1083 type keyword while a ~done~ value will do the contrary. If a list
1084 of strings is provided, only tasks with keywords belonging to that
1087 - category :: option
1088 - type :: symbol (t, ~todo~, ~done~, nil) or list of strings
1090 ** ~:with-timestamps~
1092 Non-nil means transcoding should include time stamps. Special
1093 value ~active~ (resp. ~inactive~) ask to export only active
1094 (resp. inactive) timestamps. Otherwise, completely remove them.
1096 - category :: option
1097 - type :: symbol: (~active~, ~inactive~, t, nil)
1101 Non-nil means that a table of contents has to be added to the
1102 output. An integer value limits its depth.
1104 - category :: option
1105 - type :: symbol (nil, t or integer)
1107 ** ~:with-todo-keywords~
1109 Non-nil means transcoding should include TODO keywords.
1111 - category :: option
1112 - type :: symbol (nil, t)
1116 :CUSTOM_ID: filter-system
1119 Filters sets are lists of functions. They allow to pre-process
1120 parse tree before export and to post-process output of each
1121 transcoded object or element.
1123 Each function in a set must accept three arguments: a string (or
1124 a parse tree as a special case), a symbol representing the current
1125 back-end, and the communication channel, as a plist.
1127 From the developer side, filters sets can be installed using
1128 ~:filters-alist~ keyword while defining the back-end with
1129 ~org-export-define-derived-backend~. Each association has a key
1130 among the following symbols and a function or a list of functions as
1133 - ~:filter-babel-call~
1135 - ~:filter-center-block~
1139 - ~:filter-comment-block~
1141 - ~:filter-dynamic-block~
1143 - ~:filter-example-block~
1144 - ~:filter-export-block~
1145 - ~:filter-export-snippet~
1146 - ~:filter-final-output~
1147 - ~:filter-fixed-width~
1148 - ~:filter-footnote-definition~
1149 - ~:filter-footnote-reference~
1150 - ~:filter-headline~
1151 - ~:filter-horizontal-rule~
1152 - ~:filter-inline-babel-call~
1153 - ~:filter-inline-src-block~
1154 - ~:filter-inlinetask~
1158 - ~:filter-latex-environment~
1159 - ~:filter-latex-fragment~
1160 - ~:filter-line-break~
1163 - ~:filter-paragraph~
1164 - ~:filter-parse-tree~
1165 - ~:filter-plain-list~
1166 - ~:filter-plain-text~
1167 - ~:filter-planning~
1168 - ~:filter-property-drawer~
1169 - ~:filter-quote-block~
1170 - ~:filter-quote-section~
1171 - ~:filter-radio-target~
1173 - ~:filter-special-block~
1174 - ~:filter-src-block~
1175 - ~:filter-strike-through~
1176 - ~:filter-statistics-cookie~
1177 - ~:filter-subscript~
1178 - ~:filter-superscript~
1180 - ~:filter-table-cell~
1181 - ~:filter-table-row~
1183 - ~:filter-timestamp~
1184 - ~:filter-underline~
1185 - ~:filter-verbatim~
1186 - ~:filter-verse-block~
1189 For example, =e-ascii= back-end implements a filter that makes sure
1190 headlines end with two blank lines:
1192 #+BEGIN_SRC emacs-lisp
1193 (org-export-define-backend e-ascii
1195 :filters-alist ((:filter-headline . org-e-ascii-filter-headline-blank-lines)
1196 (:filter-section . org-e-ascii-filter-headline-blank-lines)))
1198 (defun org-e-ascii-filter-section-blank-lines (headline back-end info)
1199 "Filter controlling number of blank lines after a section."
1200 (if (not (eq back-end 'e-ascii)) headline
1201 (let ((blanks (make-string 2 ?\n)))
1202 (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline))))
1210 A whole set of tools is available to help build new exporters. Any
1211 function general enough to have its use across a couple of back-ends
1214 Many of them are high-level access to properties from the
1215 communication channel. As such, they should be preferred to
1216 straight access to communication channel, when possible.
1218 ** ~org-element-adopt-element~
1220 :CUSTOM_ID: adopt-element
1223 Add an element to the contents of another element.
1225 See also: [[#set-element][~org-element-set-element~]]
1227 ** ~org-element-set-element~
1229 :CUSTOM_ID: set-element
1232 Replace an element with another in the parse tree.
1234 See also: [[#adopt-element][~org-element-adopt-element~]].
1236 ** ~org-export-activate-smart-quotes~
1238 :CUSTOM_ID: activate-smart-quotes
1241 Transform quotes and apostrophes into their "smart" counterpart in
1244 It should be used after a check against ~:with-smart-quotes~ value
1245 in communication channel.
1247 Since this function needs the original string, it may be useful to
1248 apply others transformations (i.e. characters protection) on a copy
1249 of that string and provide the pristine original string as the
1252 For example, in ~e-html~ back-end, it is necessary to protect "<",
1253 ">" and "&" characters before calling this function. Here's an
1254 excerpt of the ~plain-text~ transcoder:
1256 #+BEGIN_SRC emacs-lisp
1257 (let ((output text))
1258 ;; Protect following characters: <, >, &.
1259 (setq output (org-e-html-encode-plain-text output))
1260 ;; Handle smart quotes. Be sure to provide original string since
1261 ;; OUTPUT may have been modified.
1262 (when (plist-get info :with-smart-quotes)
1263 (setq output (org-export-activate-smart-quotes output :html info text)))
1269 ** ~org-export-collect-figures~
1271 :CUSTOM_ID: collect-figures
1274 Return a list of all exportable figures in parse tree.
1276 Used to build a table of figures.
1278 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1279 [[#collect-tables][~org-export-collect-tables~]], [[#collect-listings][~org-export-collect-listings~]].
1281 ** ~org-export-collect-footnote-definitions~
1283 :CUSTOM_ID: collect-footnote-definitions
1286 List actually used footnotes definitions in order to add footnote
1287 listings throughout the transcoded data.
1289 Feed it with the whole parse tree to get the full footnote listing.
1290 Feed it with the current headline to get partial footnote listing
1291 relative to that headline.
1293 Number, label, if any, and definition are provided.
1295 See also: [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1296 [[#get-footnote-definition][~org-export-get-footnote-definition~]],
1297 [[#get-footnote-number][~org-export-get-footnote-number~]].
1299 ** ~org-export-collect-headlines~
1301 :CUSTOM_ID: collect-headlines
1304 Return a list of all exportable headlines, possibly limited to
1307 Used to build a table of contents.
1309 See also: [[#collect-tables][~org-export-collect-tables~]],
1310 [[#collect-figures][~org-export-collect-figures~]], [[#collect-listings][~org-export-collect-listings~]].
1312 ** ~org-export-collect-listings~
1314 :CUSTOM_ID: collect-listings
1317 Return a list of all exportable source blocks with a caption or
1318 a name in parse tree.
1320 Used to build a table of listings.
1322 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1323 [[#collect-tables][~org-export-collect-tables~]], [[#collect-figures][~org-export-collect-figures~]].
1324 ** ~org-export-collect-tables~
1326 :CUSTOM_ID: collect-tables
1329 Return a list of all exportable tables with a caption or a name in
1332 Used to build a table of tables.
1334 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1335 [[#collect-figures][~org-export-collect-figures~]], [[#collect-listings][~org-export-collect-listings~]].
1337 ** ~org-export-data~
1342 Transcode a given element, object, secondary string or string using
1345 It is used primarily to transcode secondary strings, like ~:title~.
1346 For example =e-beamer= back-end uses the following:
1348 #+BEGIN_SRC emacs-lisp
1349 (defun org-e-beamer-template (contents info)
1350 (let ((title (org-export-data (plist-get info :title) info)))
1354 ** ~org-export-first-sibling-p~
1356 :CUSTOM_ID: first-sibling-p
1359 Non-nil if an headline is the first of its siblings.
1361 Used to know when to start a list if headline's relative level is
1362 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1364 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1365 [[#number-to-roman][~org-export-number-to-roman~]], [[#last-sibling-p][~org-export-last-sibling-p~]].
1367 ** ~org-export-footnote-first-reference-p~
1369 :CUSTOM_ID: footnote-first-reference-p
1372 Non-nil when a footnote reference if the first reference relative
1375 Used when a back-end needs to attach the footnote definition only
1376 to the first occurrence of the corresponding label.
1378 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1379 [[#get-footnote-definition][~org-export-get-footnote-definition~]],
1380 [[#get-footnote-number][~org-export-get-footnote-number~]].
1382 ** ~org-export-format-code-default~
1384 :CUSTOM_ID: format-code-default
1387 Return contents of a =src-block= or =example-block= element in
1388 a format suited for raw text or verbatim output. More
1389 specifically, it takes care of line numbering and labels
1390 integration depending of element's switches, but no formatting is
1391 otherwise applied to source code.
1393 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1395 ** ~org-export-format-code~
1397 :CUSTOM_ID: format-code
1400 Helper function to format source code. It applies a given function
1401 on each line of the code, passing current line number and
1402 associated code reference label, if any, as arguments.
1404 See also: [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]],
1405 [[#unravel-code][~org-export-unravel-code~]].
1407 ** ~org-export-get-caption~
1409 :CUSTOM_ID: get-caption
1412 Return the caption of a given element, as a secondary string. With
1413 an optional argument, return the short caption instead.
1415 As an example, =e-ascii= back-end, when creating a list of
1416 listings, uses the following:
1418 #+BEGIN_SRC emacs-lisp
1419 (defun org-e-ascii--list-listings (keyword info)
1420 (let ((title (org-e-ascii--translate "List of Listings" info)))
1426 ;; Use short name in priority, if available.
1427 (let ((caption (or (org-export-get-caption src-block t)
1428 (org-export-get-caption src-block))))
1429 (org-export-data caption info)
1431 (org-export-collect-listings info) "\n"))))
1434 See also: [[#read-attribute][~org-export-read-attribute~]].
1436 ** ~org-export-get-coderef-format~
1438 :CUSTOM_ID: get-coderef-format
1441 Return an appropriate format string for code reference links.
1443 See also: [[#resolve-coderef][~org-export-resolve-coderef~]].
1445 ** ~org-export-get-footnote-definition~
1447 :CUSTOM_ID: get-footnote-definition
1450 Retrieve the footnote definition relative to a given footnote
1453 If the footnote definition in inline, it is returned as a secondary
1454 string. Otherwise, it is full Org data.
1456 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1457 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1458 [[#get-footnote-number][~org-export-get-footnote-number~]].
1460 ** ~org-export-get-footnote-number~
1462 :CUSTOM_ID: get-footnote-number
1465 Return the ordinal attached to a footnote reference or definition.
1467 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1468 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1469 [[#get-footnote-definition][~org-export-get-footnote-definition~]].
1471 ** ~org-export-get-genealogy~
1473 :CUSTOM_ID: get-genealogy
1476 Return flat list of current object or element's parents from
1477 closest to farthest, along with their contents.
1479 See also: [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1480 [[#get-parent-headline][~org-export-get-parent-headline~]],
1481 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1482 [[#get-previous-element][~org-export-get-previous-element~]].
1484 ** ~org-export-get-headline-number~
1486 :CUSTOM_ID: get-headline-number
1489 Return the section number of an headline, as a list of integers.
1491 See also: [[#headline-numbered-p][~org-export-headline-numbered-p~]],
1492 [[#number-to-roman][~org-export-number-to-roman~]].
1494 ** ~org-export-get-loc~
1499 Return count of accumulated lines of code from previous
1500 line-numbered =example-block= and =src-block= elements, according
1501 to current element's switches.
1503 In other words, the first line of code in the current block is
1504 supposed to be numbered as the returned value plus one, assuming
1505 its ~:number-lines~ properties is non-nil.
1507 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1509 ** ~org-export-get-next-element~
1511 :CUSTOM_ID: get-next-element
1514 Return element (resp. object or string) after an element
1515 (resp. object), or nil.
1517 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1518 [[#get-parent-headline][~org-export-get-parent-headline~]],
1519 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1520 [[#get-previous-element][~org-export-get-previous-element~]].
1522 ** ~org-export-get-ordinal~
1524 :CUSTOM_ID: get-ordinal
1527 Associate a sequence number to any object or element. It is meant
1528 to be used to build captions.
1530 Also, it could be applied on a fuzzy link's destination, since such
1531 links are expected to be replaced with the sequence number of their
1532 destination, provided they have no description.
1534 Taken from =e-ascii= back-end, the following example shows how
1535 fuzzy links could be handled :
1537 #+BEGIN_SRC emacs-lisp :exports code
1538 (let ((type (org-element-property :type link)))
1541 ;; Do not apply a special syntax on fuzzy links pointing to targets.
1542 ((string= type "fuzzy")
1543 (let ((destination (org-export-resolve-fuzzy-link link info)))
1544 ;; Ignore invisible "#+TARGET: path".
1545 (unless (eq (org-element-type destination) 'keyword)
1546 ;; If link has a description, use it.
1547 (if (org-string-nw-p desc) desc
1549 (let ((number (org-export-get-ordinal destination info)))
1551 (if (atom number) (number-to-string number)
1552 (mapconcat 'number-to-string number ".")))))))))
1556 See also : [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]]
1558 ** ~org-export-get-parent-element~
1560 :CUSTOM_ID: get-parent-paragraph
1563 Return the first element containing provided object, if any.
1564 Return nil otherwise.
1566 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1567 [[#get-parent-headline][~org-export-get-parent-headline~]],
1568 [[#get-previous-element][~org-export-get-previous-element~]], [[#get-next-element][~org-export-get-next-element~]].
1570 ** ~org-export-get-parent-headline~
1572 :CUSTOM_ID: get-parent-headline
1575 Return the headline containing provided element or object, if any.
1576 Return nil otherwise.
1578 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1579 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1580 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1581 [[#get-previous-element][~org-export-get-previous-element~]].
1583 ** ~org-export-get-parent~
1585 :CUSTOM_ID: get-parent
1588 Return closest element containing current element or object, if
1589 any. Return nil otherwise.
1591 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1592 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1593 [[#get-parent-headline][~org-export-get-parent-headline~]],
1594 [[#get-previous-element][~org-export-get-previous-element~]].
1596 ** ~org-export-get-previous-element~
1598 :CUSTOM_ID: get-previous-element
1601 Return element (resp. object or string) before an element
1602 (resp. object), or nil.
1604 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1605 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1606 [[#get-parent-headline][~org-export-get-parent-headline~]],
1607 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]].
1609 ** ~org-export-get-relative-level~
1611 :CUSTOM_ID: get-relative-level
1614 Return headline level, relatively to the lower headline level in
1615 the parsed tree. It is meant to be used over ~:level~ headline's
1618 See also:[[#first-sibling-p][~org-export-first-sibling-p~]],
1619 [[#get-headline-number][~org-export-get-headline-number~]],[[#headline-numbered-p][~org-export-headline-numbered-p~]],
1620 [[#last-sibling-p][~org-export-last-sibling-p~]].
1622 ** ~org-export-get-table-cell-at~
1624 :CUSTOM_ID: get-table-cell-at
1627 Return exportable cell object at a given position, or nil. Hence,
1628 position ~(0 . 0)~ will always point to the first exportable cell
1631 See also: [[#table-cell-address][~org-export-table-cell-address~]],
1632 [[#table-dimensions][~org-export-table-dimensions~]].
1634 ** ~org-export-get-tags~
1636 :CUSTOM_ID: get-tags
1639 Return list of exportable tags attached to a given headline or
1642 In particular, it removes select tags and exclude tags. The
1643 function also accepts an arbitrary list of tags for further
1646 For example, =e-latex= back-end uses the following snippet in the
1647 inlinetask transcode function.
1649 #+BEGIN_SRC emacs-lisp
1650 (let ((title (org-export-data (org-element-property :title inlinetask) info))
1651 (todo (and (plist-get info :with-todo-keywords)
1652 (let ((todo (org-element-property :todo-keyword inlinetask)))
1653 (and todo (org-export-data todo info)))))
1654 (todo-type (org-element-property :todo-type inlinetask))
1655 (tags (and (plist-get info :with-tags)
1656 (org-export-get-tags inlinetask info)))
1657 (priority (and (plist-get info :with-priority)
1658 (org-element-property :priority inlinetask))))
1662 ** ~org-export-headline-numbered-p~
1664 :CUSTOM_ID: headline-numbered-p
1667 Non nil when a given headline should be numbered.
1669 See also: [[#get-headline-number][~org-export-get-headline-number~]],
1670 [[#get-relative-level][~org-export-get-relative-level~]].
1672 ** ~org-export-inline-image-p~
1674 :CUSTOM_ID: inline-image-p
1677 Non-nil when the link provided should be considered as an inline
1678 image. Note that it always return nil when the link has
1681 It accepts an optional set of rules in order to tweak the
1682 definition of an inline image, which is, by default, any link
1683 targetting a local file whose extension is either "png", "jpeg",
1684 "jpg", "gif", "tiff", "tif", "xbm", "xpm", "pbm", "pgm" or "ppm".
1686 A set of rules consists in an alist whose key is a type of link, as
1687 a string, and whose value is a regexp matching link's path. As an
1688 example, =e-html= back-end uses the following rules:
1690 #+BEGIN_SRC emacs-lisp
1691 '(("file" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1692 ("http" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1693 ("https" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'"))
1696 See also: [[#solidify-link-text][~org-export-solidify-link-text~]],
1697 [[#get-coderef-format][~org-export-get-coderef-format~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
1699 ** ~org-export-last-sibling-p~
1701 :CUSTOM_ID: last-sibling-p
1704 Non-nil if an headline is the last of its siblings.
1706 Used to know when to close a list if headline's relative level is
1707 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1709 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1710 [[#number-to-roman][~org-export-number-to-roman~]], [[#first-sibling-p][~org-export-first-sibling-p~]].
1712 ** ~org-export-number-to-roman~
1714 :CUSTOM_ID: number-to-roman
1717 Convert numbers to roman numbers. It can be used to provide roman
1718 numbering for headlines and numbered lists.
1720 See also: [[#get-headline-number][~org-export-get-headline-number~]].
1722 ** ~org-export-read-attribute~
1724 :CUSTOM_ID: read-attribute
1727 Read a property from a given element as a plist. It can be used to
1728 normalize affiliated keywords' syntax. For example, the following
1729 affiliated keywords:
1732 ,#+ATTR_HTML: :width 10 :height 5
1733 ,#+ATTR_HTML: :file "filename.ext"
1736 would be returned as:
1738 #+BEGIN_SRC emacs-lisp
1739 '(:width 10 :height 5 :file "filename.ext")
1742 See also: [[#get-caption][~org-export-get-caption~]].
1744 ** ~org-export-resolve-coderef~
1746 :CUSTOM_ID: resolve-coderef
1749 Search for a code reference within ~src-block~ and ~example-block~
1750 elements. Return corresponding --possibly accumulated-- line
1751 number, or reference itself, depending on container's switches.
1753 See also : [[#get-coderef-format][~org-export-get-coderef-format~]],
1754 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1755 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1757 ** ~org-export-resolve-fuzzy-link~
1759 :CUSTOM_ID: resolve-fuzzy-link
1762 Search destination of a fuzzy link — i.e. it has a ~fuzzy~ ~:type~
1763 attribute – within the parsed tree, and return that element,
1766 See also: [[#get-ordinal][~org-export-get-ordinal~]], [[#resolve-coderef][~org-export-resolve-coderef~]],
1767 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1768 [[#solidify-link-text][~org-export-solidify-link-text~]].
1770 ** ~org-export-resolve-id-link~
1772 :CUSTOM_ID: resolve-id-link
1775 Search headline targetted by an id link --- i.e. it has a ~id~ or
1776 ~custom-id~ ~:type~ attribute --- within the parse tree. Return
1777 the matching headline in the tree, the name of the external file,
1778 as a string, or nil.
1780 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1781 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1782 [[#solidify-link-text][~org-export-solidify-link-text~]].
1784 ** ~org-export-resolve-radio-link~
1786 :CUSTOM_ID: resolve-radio-link
1789 Return first radio target object matching a radio link --- that is
1790 with a ~radio~ ~:type~ attribute --- in the parse tree, or nil.
1792 Typically, target's contents are exported through ~org-export-data~
1793 and used as link description, as in the following excerpt from
1796 #+BEGIN_SRC emacs-lisp
1797 (defun org-e-latex-link (link desc info)
1798 (let* ((type (org-element-property :type link))
1802 ((string= type "radio")
1803 (let ((destination (org-export-resolve-radio-link link info)))
1805 (format "\\hyperref[%s]{%s}"
1806 (org-export-solidify-link-text path)
1807 (org-export-data (org-element-contents destination) info)))))
1811 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1812 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1813 [[#solidify-link-text][~org-export-solidify-link-text~]].
1815 ** ~org-export-solidify-link-text~
1817 :CUSTOM_ID: solidify-link-text
1820 Normalize a string, replacing most non-standard characters with
1823 Used to turn targets names into safer versions for links.
1825 See also: [[#inline-image-p][~org-export-inline-image-p~]],
1826 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]],
1827 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1829 ** ~org-export-table-cell-address~
1831 :CUSTOM_ID: table-cell-address
1834 Return row and column of a given cell object. Positions are
1835 0-indexed and only exportable rows and columns are considered. The
1836 function returns nil if called on a non-exportable cell.
1838 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1839 [[#table-dimensions][~org-export-table-dimensions~]].
1841 ** ~org-export-table-cell-alignment~
1843 :CUSTOM_ID: table-cell-alignment
1846 Return expected alignment for the contents of a given cell object.
1847 It can be either ~left~, ~right~ or ~center~.
1849 See also: [[#table-cell-borders][~org-export-table-cell-borders~]],
1850 [[#table-cell-width][~org-export-table-cell-width~]].
1852 ** ~org-export-table-cell-borders~
1854 :CUSTOM_ID: table-cell-borders
1857 Indicate expected borders for a given cell object. When non-nil,
1858 return value is a list of symbols among ~top~, ~bottom~, ~above~,
1859 ~below~, ~left~ and ~right~.
1861 Special values ~top~ and ~bottom~ only happen for cells in,
1862 respectively, the first and the last exportable rows.
1864 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1865 [[#table-cell-width][~org-export-table-cell-width~]].
1867 ** ~org-export-table-cell-ends-colgroup-p~
1869 :CUSTOM_ID: table-cell-ends-colgroup-p
1872 Non-nil when a table cell object ends a column group.
1874 See also: [[#table-cell-starts-colgroup-p][~org-export-table-cell-starts-colgroup-p~]].
1876 ** ~org-export-table-cell-starts-colgroup-p~
1878 :CUSTOM_ID: table-cell-starts-colgroup-p
1881 Non-nil when a table cell object starts a column group.
1883 See also: [[#table-cell-ends-colgroup-p][~org-export-table-cell-ends-colgroup-p~]].
1885 ** ~org-export-table-cell-width~
1887 :CUSTOM_ID: table-cell-width
1890 Return expected width for contents of a given cell object.
1892 Only width specified explicitely through meta-data is considered.
1893 If no such information can be found, return nil instead.
1895 Some back-end may still need to know the actual width of exported
1896 cell's contents in order to compute column's width. In that case,
1897 every cell in the column must be transcoded in order to find the
1898 widest one. The snippet below, extracted from =org-e-ascii.el=
1899 illustrates a possible implementation.
1901 #+BEGIN_SRC emacs-lisp
1902 (or (org-export-table-cell-width table-cell info)
1903 (let* ((max-width 0)
1904 (table (org-export-get-parent-table table-cell info))
1905 (specialp (org-export-table-has-special-column-p table))
1906 (col (cdr (org-export-table-cell-address table-cell info))))
1910 ;; For each exportable row, get the cell at column COL and
1911 ;; transcode its contents. Then compare its length with
1912 ;; MAX-WIDTH and keep the greater of two.
1916 (org-element-contents
1917 (elt (if specialp (car (org-element-contents row))
1918 (org-element-contents row))
1926 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1927 [[#table-cell-borders][~org-export-table-cell-borders~]].
1929 ** ~org-export-table-dimensions~
1931 :CUSTOM_ID: table-dimensions
1934 Return the number of exportable rows and columns in a given table.
1936 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1937 [[#table-cell-address][~org-export-table-cell-address~]].
1939 ** ~org-export-table-has-header-p~
1941 :CUSTOM_ID: table-has-header-p
1944 Non-nil when table has at least two row groups.
1946 See also: [[#table-has-special-column-p][~org-export-table-has-special-column-p~]],
1947 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1949 ** ~org-export-table-has-special-column-p~
1951 :CUSTOM_ID: table-has-special-column-p
1954 Non-nil when first column in the table only contains meta-data.
1956 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
1957 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1959 ** ~org-export-table-row-ends-header-p~
1961 :CUSTOM_ID: table-row-ends-header-p
1964 Non-nil when a table row element ends table's header.
1966 See also: [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1967 [[#table-row-group][~org-export-table-row-group~]],
1968 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1969 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1971 ** ~org-export-table-row-ends-rowgroup-p~
1973 :CUSTOM_ID: table-row-ends-rowgroup-p
1976 Non-nil when a a table row element ends a rowgroup, header
1979 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1980 [[#table-row-group][~org-export-table-row-group~]],
1981 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1982 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1984 ** ~org-export-table-row-group~
1986 :CUSTOM_ID: table-row-group
1989 Return row group number for a given table row element.
1991 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1992 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1993 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1994 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1996 ** ~org-export-table-row-is-special-p~
1998 :CUSTOM_ID: table-row-is-special-p
2001 Non-nil a given table row element only contains meta-data.
2003 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
2004 [[#table-has-special-column-p][~org-export-table-has-special-column-p~]].
2006 ** ~org-export-table-row-starts-header-p~
2008 :CUSTOM_ID: table-row-starts-header-p
2011 Non-nil when a table row element starts table's header.
2013 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2014 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2015 [[#table-row-group][~org-export-table-row-group~]],
2016 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
2018 ** ~org-export-table-row-starts-rowgroup-p~
2020 :CUSTOM_ID: table-row-starts-rowgroup-p
2023 Non-nil when a table row element starts a rowgroup, header
2026 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2027 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2028 [[#table-row-group][~org-export-table-row-group~]],
2029 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]].
2031 ** ~org-export-translate~
2033 Translate a string, i.e. "Table of Contents", according to language
2036 Refer to ~org-export-dictionary~ variable for the list of all
2039 ** ~org-export-unravel-code~
2041 :CUSTOM_ID: unravel-code
2044 Clean source code from an =example-block= or a =src-block= element
2045 and extract code references out of it.
2047 Its purpose is to allow to transform raw source code first and then
2048 integrate line numbers or references back into the final output.
2049 That final task can be achieved with the help of
2050 ~org-export-format-code~ function.
2052 See also: [[#format-code][~org-export-format-code~]],
2053 [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]].
2057 # sentence-end-double-space: t