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 - ~:status~ :: Status of current clock (symbol: ~closed~ or
181 - ~:value~ :: Timestamp associated to clock keyword (string).
182 - ~:time~ :: Clock duration for a closed clock, or nil (string or
189 - ~:value~ :: Contents (string).
195 - ~:value~ :: Comments, with pound signs (string).
201 - ~:value~ :: Comments, without block's boundaries (string).
202 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
208 - ~:value~ :: Full Sexp (string).
214 - ~:drawer-name~ :: Drawer's name (string).
215 - ~:hiddenp~ :: Non-nil if the drawer is hidden (boolean).
217 /Note relative to export:/ The idea behind drawers is that they are
218 transparent export-wise. By default, they should return their
225 - ~:arguments~ :: Block's parameters (string).
226 - ~:block-name~ :: Block's name (string).
227 - ~:drawer-name~ :: Drawer's name (string).
228 - ~:hiddenp~ :: Non-nil if the block is hidden (boolean).
234 - ~:ascii~ :: Entity's ASCII representation (string).
235 - ~:html~ :: Entity's HTML representation (string).
236 - ~:latex~ :: Entity's LaTeX representation (string).
237 - ~:latex-math-p~ :: Non-nil if entity's LaTeX representation
238 should be in math mode (boolean).
239 - ~:latin1~ :: Entity's Latin-1 encoding representation (string).
240 - ~:name~ :: Entity's name, without backslash nor brackets
242 - ~:use-brackets-p~ :: Non-nil if entity is written with optional
243 brackets in original buffer (boolean).
244 - ~:utf-8~ :: Entity's UTF-8 encoding representation (string).
250 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
251 - ~:label-fmt~ :: Format string used to write labels in current
252 block, if different from
253 ~org-coderef-label-format~ (string or nil).
254 - ~:language~ :: Language of the code in the block, if specified
256 - ~:number-lines~ :: Non-nil if code lines should be numbered.
257 A ~new~ value starts numbering from 1 wheareas ~continued~
258 resume numbering from previous numbered block (symbol: ~new~,
260 - ~:options~ :: Block's options located on the block's opening line
262 - ~:parameters~ :: Optional header arguments (string or nil).
263 - ~:preserve-indent~ :: Non-nil when indentation within the block
264 mustn't be modified upon export (boolean).
265 - ~:retain-labels~ :: Non-nil if labels should be kept visible upon
267 - ~:switches~ :: Optional switches for code block export (string or
269 - ~:use-labels~ :: Non-nil if links to labels contained in the
270 block should display the label instead of the
271 line number (boolean).
272 - ~:value~ :: Contents (string).
278 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
279 - ~:type~ :: Related back-end's name (string).
280 - ~:value~ :: Contents (string).
286 - ~:back-end~ :: Relative back-end's name (string).
287 - ~:value~ :: Export code (string).
293 - ~:value~ :: Contents, with colons (string).
295 ** Footnote Definition
299 - ~:label~ :: Label used for references (string).
301 ** Footnote Reference
305 - ~:inline-definition~ :: Footnote's definition, when inlined
306 (secondary string or nil).
307 - ~:label~ :: Footnote's label, if any (string or nil).
308 - ~:raw-definition~ :: Uninterpreted footnote's definition, when
309 inlined (string or nil).
310 - ~:type~ :: Determine whether reference has its definition inline,
311 or not (symbol: ~inline~, ~standard~).
317 In addition to the following list, any property specified in
318 a property drawer attached to the headline will be accessible as an
319 attribute (with underscores replaced with hyphens and a lowercase
320 name, i.e. ~:custom-id~).
322 - ~:archivedp~ :: Non-nil if the headline has an archive tag
324 - ~:category~ :: Headline's category (string).
325 - ~:clock~ :: Headline's CLOCK reference, if any (string or nil).
326 - ~:commentedp~ :: Non-nil if the headline has a comment keyword
328 - ~:deadline~ :: Headline's DEADLINE reference, if any (string or
330 - ~:footnote-section-p~ :: Non-nil if the headline is a footnote
332 - ~:hiddenp~ :: Non-nil if the headline is hidden (boolean).
333 - ~:level~ :: Reduced level of the headline (integer).
334 - ~:pre-blank~ :: Number of blank lines between the headline and
335 the first non-blank line of its contents
337 - ~:priority~ :: Headline's priority, as a character (integer).
338 - ~:quotedp~ :: Non-nil if the headline contains a quote keyword
340 - ~:raw-value~ :: Raw headline's text, without the stars and the
342 - ~:scheduled~ :: Headline's SCHEDULED reference, if any (string or
344 - ~:tags~ :: Headline's tags, if any, without the archive
345 tag. (list of strings).
346 - ~:timestamp~ :: Headline's TIMESTAMP reference, if any (string or
348 - ~:title~ :: Parsed headline's text, without the stars and the
349 tags (secondary string).
350 - ~:todo-keyword~ :: Headline's TODO keyword without quote and
351 comment strings, if any (string or nil).
352 - ~:todo-type~ :: Type of headline's TODO keyword, if any (symbol:
359 No specific property.
365 - ~:info~ :: Information about function called, as returned by
366 ~org-babel-lob-get-info~ (list).
368 /Note relative to export:/ Since Babel related blocks are expanded
369 before parsing, these can safely be ignored by back-ends.
375 - ~:language~ :: Language of the code in the block (string).
376 - ~:parameters~ :: Optional header arguments (string or nil).
377 - ~:value~ :: Source code (string).
383 In addition to the following list, any property specified in
384 a property drawer attached to the headline will be accessible as an
385 attribute (with underscores replaced with hyphens and a lowercase
386 name, i.e. ~:custom-id~).
388 - ~:clock~ :: Inlinetask's CLOCK reference, if any (string or nil).
389 - ~:deadline~ :: Inlinetask's DEADLINE reference, if any (string or
391 - ~:hiddenp~ :: Non-nil if the headline is hidden (boolean).
392 - ~:level~ :: Reduced level of the inlinetask (integer).
393 - ~:priority~ :: Headline's priority, as a character (integer).
394 - ~:raw-value~ :: Raw inlinetask's text, without the stars and the
396 - ~:scheduled~ :: Inlinetask's SCHEDULED reference, if any (string
398 - ~:tags~ :: Inlinetask's tags, if any (list of strings).
399 - ~:timestamp~ :: Inlinetask's TIMESTAMP reference, if any (string
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
557 - ~:deadline~ :: Timestamp associated to deadline keyword, if any
559 - ~:scheduled~ :: Timestamp associated to scheduled keyword, if any
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 - ~:range-end~ :: Timestamp ending the date range, if any (string
691 - ~:type~ :: Type of timestamp (symbol: ~active~, ~active-range~,
692 ~diary~, ~inactive~, ~inactive-range~).
693 - ~:value~ :: Timestamp (string).
699 No specific property.
705 - ~:value~ :: Contents (string).
709 Element containing objects.
711 - ~:hiddenp~ :: Non-nil if block is hidden (boolean).
713 * The Communication Channel
715 :CUSTOM_ID: communication
718 This is the full list of properties available during transcode
719 process, with their category (~option~ or ~tree~) and their value
731 Current back-end used for transcoding.
738 String to write as creation information.
745 String to use as date.
752 Description text for the current data.
766 Tags for exclusion of sub-trees from export process.
769 - type :: list of strings
773 Hash table used to memoize results from [[#data][~org-export-data~]].
778 ** ~:footnote-definition-alist~
780 /Alist/ between footnote labels and their definition, as parsed
781 data. Only non-inline footnotes are represented in this /alist/.
782 Also, every definition isn't guaranteed to be referenced in the
783 parse tree. The purpose of this property is to preserve
784 definitions from oblivion – i.e. when the parse tree comes from
785 a part of the original buffer –, it isn't meant for direct use in
786 a back-end. To retrieve a definition relative to a reference, use
787 [[#get-footnote-definition][~org-export-get-footnote-definition~]] instead.
790 - type :: alist (STRING . LIST)
792 ** ~:headline-levels~
794 :CUSTOM_ID: headline-levels
797 Maximum level being exported as an headline. Comparison is done
798 with the relative level of headlines in the parse tree, not
799 necessarily with their actual level.
804 ** ~:headline-numbering~
806 Alist between headlines' beginning position and their numbering, as
807 a list of numbers – cf. [[#get-headline-number][~org-export-get-headline-number~]].
810 - type :: alist (INTEGER . LIST)
812 ** ~:headline-offset~
814 Difference between relative and real level of headlines in the
815 parse tree. For example, a value of -1 means a level 2 headline
816 should be considered as level 1 —
817 cf. [[#get-relative-level][~org-export-get-relative-level~]].
824 List of elements and objects that will be unconditionally ignored
828 - type :: list of elements
832 Alist between ID strings and destination file's path, relative to
836 - type :: alist (STRING . STRING)
840 Full path to input file, if any.
843 - type :: string or nil
847 List of keywords attached to data.
854 Default language used for translations.
861 Whole parse tree, available at any time during transcoding.
864 - type :: list (as returned by ~org-element-parse-buffer~)
866 ** ~:preserve-breaks~
868 Non-nil means transcoding should preserve all line breaks.
871 - type :: symbol (nil, t)
873 ** ~:section-numbers~
875 Non-nil means transcoding should add section numbers to headlines.
878 - type :: symbol (nil, t)
882 :CUSTOM_ID: select-tags
885 List of tags enforcing inclusion of sub-trees in transcoding. When
886 such a tag is present, sub-trees without it are /de facto/ excluded
887 from the process. See [[#use-select-tags][~:use-select-tags~]].
890 - type :: list of strings
894 List of targets raw names encountered in the parse tree. This is
895 used to partly resolve "fuzzy" links —
896 cf. [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
899 - type :: list of strings
901 ** ~:time-stamp-file~
903 Non-nil means transcoding should insert a time stamp in the output.
906 - type :: symbol (nil, t)
908 ** ~:translate-alist~
910 Alist between element and object types and transcoding functions
911 relative to the current back-end. Special keys ~template~ and
912 ~plain-text~ are also possible.
915 - type :: alist (SYMBOL . FUNCTION)
917 ** ~:use-select-tags~
919 :CUSTOM_ID: use-select-tags
922 When non-nil, a select tags has been found in the parse tree.
923 Thus, any headline without one will be filtered out. See
924 [[#select-tags][~:select-tags~]].
927 - type :: interger or nil
929 ** ~:with-archived-trees~
931 Non-nil when archived sub-trees should also be transcoded. If it
932 is set to the ~headline~ symbol, only the archived headline's name
936 - type :: symbol (nil, t, ~headline~)
940 Non-nil means author's name should be included in the output.
943 - type :: symbol (nil, t)
947 Non-nil means clock keywords should be exported.
950 - type :: symbol (nil, t)
954 Non-nil means a creation sentence should be inserted at the end of
955 the transcoded string. If the value is ~comment~, it should be
959 - type :: symbol (~comment~, nil, t)
963 Non-nil means drawers should be exported. If its value is a list
964 of names, only drawers with such names will be transcoded.
967 - type :: symbol (nil, t) or list of strings
971 Non-nil means output should contain author's email.
974 - type :: symbol (nil, t)
978 Non-nil means emphasized text should be interpreted.
981 - type :: symbol (nil, t)
983 ** ~:with-fixed-width~
985 Non-nil if transcoder should interpret strings starting with
986 a colon as a fixed-with — verbatim — area.
989 - type :: symbol (nil, t)
993 Non-nil if transcoder should interpret footnotes.
996 - type :: symbol (nil, t)
1000 Non-nil means transcoding should include planning info.
1002 - category :: option
1003 - type :: symbol (nil, t)
1007 Non-nil means transcoding should include priority cookies.
1009 - category :: option
1010 - type :: symbol (nil, t)
1012 ** ~:with-smart-quotes~
1014 Non-nil means activate smart quotes during export.
1016 - category :: option
1017 - type :: symbol (nil ,t)
1019 ** ~:with-special-strings~
1021 Non-nil means transcoding should interpret special strings in plain
1024 - category :: option
1025 - type :: symbol (nil, t)
1027 ** ~:with-sub-superscript~
1029 Non-nil means transcoding should interpret subscript and
1030 superscript. With a value of ~{}~, only interpret those using
1033 - category :: option
1034 - type :: symbol (nil, ~{}~, t)
1038 Non-nil means transcoding should interpret tables.
1040 - category :: option
1041 - type :: symbol (nil, t)
1045 Non-nil means transcoding should keep tags in headlines.
1046 A ~not-in-toc~ value will remove them from the table of contents,
1047 if any, nonetheless.
1049 - category :: option
1050 - type :: symbol (nil, t, ~not-in-toc~)
1054 Non-nil means transcoding should include headlines with a TODO
1055 keyword. A ~todo~ value will only include headlines with a TODO
1056 type keyword while a ~done~ value will do the contrary. If a list
1057 of strings is provided, only tasks with keywords belonging to that
1060 - category :: option
1061 - type :: symbol (t, ~todo~, ~done~, nil) or list of strings
1063 ** ~:with-timestamps~
1065 Non-nil means transcoding should include time stamps. Special
1066 value ~active~ (resp. ~inactive~) ask to export only active
1067 (resp. inactive) timestamps. Otherwise, completely remove them.
1069 - category :: option
1070 - type :: symbol: (~active~, ~inactive~, t, nil)
1074 Non-nil means that a table of contents has to be added to the
1075 output. An integer value limits its depth.
1077 - category :: option
1078 - type :: symbol (nil, t or integer)
1080 ** ~:with-todo-keywords~
1082 Non-nil means transcoding should include TODO keywords.
1084 - category :: option
1085 - type :: symbol (nil, t)
1089 :CUSTOM_ID: filter-system
1092 Filters sets are lists of functions. They allow to pre-process
1093 parse tree before export and to post-process output of each
1094 transcoded object or element.
1096 Each function in a set must accept three arguments: a string (or
1097 a parse tree as a special case), a symbol representing the current
1098 back-end, and the communication channel, as a plist.
1100 From the developer side, filters sets can be installed using
1101 ~:filters-alist~ keyword while defining the back-end with
1102 ~org-export-define-derived-backend~. Each association has a key
1103 among the following symbols and a function or a list of functions as
1106 - ~:filter-babel-call~
1108 - ~:filter-center-block~
1112 - ~:filter-comment-block~
1114 - ~:filter-dynamic-block~
1116 - ~:filter-example-block~
1117 - ~:filter-export-block~
1118 - ~:filter-export-snippet~
1119 - ~:filter-final-output~
1120 - ~:filter-fixed-width~
1121 - ~:filter-footnote-definition~
1122 - ~:filter-footnote-reference~
1123 - ~:filter-headline~
1124 - ~:filter-horizontal-rule~
1125 - ~:filter-inline-babel-call~
1126 - ~:filter-inline-src-block~
1127 - ~:filter-inlinetask~
1131 - ~:filter-latex-environment~
1132 - ~:filter-latex-fragment~
1133 - ~:filter-line-break~
1136 - ~:filter-paragraph~
1137 - ~:filter-parse-tree~
1138 - ~:filter-plain-list~
1139 - ~:filter-plain-text~
1140 - ~:filter-planning~
1141 - ~:filter-property-drawer~
1142 - ~:filter-quote-block~
1143 - ~:filter-quote-section~
1144 - ~:filter-radio-target~
1146 - ~:filter-special-block~
1147 - ~:filter-src-block~
1148 - ~:filter-strike-through~
1149 - ~:filter-statistics-cookie~
1150 - ~:filter-subscript~
1151 - ~:filter-superscript~
1153 - ~:filter-table-cell~
1154 - ~:filter-table-row~
1156 - ~:filter-timestamp~
1157 - ~:filter-underline~
1158 - ~:filter-verbatim~
1159 - ~:filter-verse-block~
1162 For example, =e-ascii= back-end implements a filter that makes sure
1163 headlines end with two blank lines:
1165 #+BEGIN_SRC emacs-lisp
1166 (org-export-define-backend e-ascii
1168 :filters-alist ((:filter-headline . org-e-ascii-filter-headline-blank-lines)
1169 (:filter-section . org-e-ascii-filter-headline-blank-lines)))
1171 (defun org-e-ascii-filter-section-blank-lines (headline back-end info)
1172 "Filter controlling number of blank lines after a section."
1173 (if (not (eq back-end 'e-ascii)) headline
1174 (let ((blanks (make-string 2 ?\n)))
1175 (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline))))
1183 A whole set of tools is available to help build new exporters. Any
1184 function general enough to have its use across a couple of back-ends
1187 Many of them are high-level access to properties from the
1188 communication channel. As such, they should be preferred to
1189 straight access to communication channel, when possible.
1191 ** ~org-element-adopt-element~
1193 :CUSTOM_ID: adopt-element
1196 Add an element to the contents of another element.
1198 See also: [[#set-element][~org-element-set-element~]]
1200 ** ~org-element-set-element~
1202 :CUSTOM_ID: set-element
1205 Replace an element with another in the parse tree.
1207 See also: [[#adopt-element][~org-element-adopt-element~]].
1209 ** ~org-export-activate-smart-quotes~
1211 :CUSTOM_ID: activate-smart-quotes
1214 Transform quotes and apostrophes into their "smart" counterpart in
1217 It should be used after a check against ~:with-smart-quotes~ value
1218 in communication channel.
1220 Since this function needs the original string, it may be useful to
1221 apply others transformations (i.e. characters protection) on a copy
1222 of that string and provide the pristine original string as the
1225 For example, in ~e-html~ back-end, it is necessary to protect "<",
1226 ">" and "&" characters before calling this function. Here's an
1227 excerpt of the ~plain-text~ transcoder:
1229 #+BEGIN_SRC emacs-lisp
1230 (let ((output text))
1231 ;; Protect following characters: <, >, &.
1232 (setq output (org-e-html-encode-plain-text output))
1233 ;; Handle smart quotes. Be sure to provide original string since
1234 ;; OUTPUT may have been modified.
1235 (when (plist-get info :with-smart-quotes)
1236 (setq output (org-export-activate-smart-quotes output :html info text)))
1242 ** ~org-export-collect-figures~
1244 :CUSTOM_ID: collect-figures
1247 Return a list of all exportable figures in parse tree.
1249 Used to build a table of figures.
1251 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1252 [[#collect-tables][~org-export-collect-tables~]], [[#collect-listings][~org-export-collect-listings~]].
1254 ** ~org-export-collect-footnote-definitions~
1256 :CUSTOM_ID: collect-footnote-definitions
1259 List actually used footnotes definitions in order to add footnote
1260 listings throughout the transcoded data.
1262 Feed it with the whole parse tree to get the full footnote listing.
1263 Feed it with the current headline to get partial footnote listing
1264 relative to that headline.
1266 Number, label, if any, and definition are provided.
1268 See also: [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1269 [[#get-footnote-definition][~org-export-get-footnote-definition~]],
1270 [[#get-footnote-number][~org-export-get-footnote-number~]].
1272 ** ~org-export-collect-headlines~
1274 :CUSTOM_ID: collect-headlines
1277 Return a list of all exportable headlines, possibly limited to
1280 Used to build a table of contents.
1282 See also: [[#collect-tables][~org-export-collect-tables~]],
1283 [[#collect-figures][~org-export-collect-figures~]], [[#collect-listings][~org-export-collect-listings~]].
1285 ** ~org-export-collect-listings~
1287 :CUSTOM_ID: collect-listings
1290 Return a list of all exportable source blocks with a caption or
1291 a name in parse tree.
1293 Used to build a table of listings.
1295 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1296 [[#collect-tables][~org-export-collect-tables~]], [[#collect-figures][~org-export-collect-figures~]].
1297 ** ~org-export-collect-tables~
1299 :CUSTOM_ID: collect-tables
1302 Return a list of all exportable tables with a caption or a name in
1305 Used to build a table of tables.
1307 See also: [[#collect-headlines][~org-export-collect-headlines~]],
1308 [[#collect-figures][~org-export-collect-figures~]], [[#collect-listings][~org-export-collect-listings~]].
1310 ** ~org-export-data~
1315 Transcode a given element, object, secondary string or string using
1318 It is used primarily to transcode secondary strings, like ~:title~.
1319 For example =e-beamer= back-end uses the following:
1321 #+BEGIN_SRC emacs-lisp
1322 (defun org-e-beamer-template (contents info)
1323 (let ((title (org-export-data (plist-get info :title) info)))
1327 ** ~org-export-first-sibling-p~
1329 :CUSTOM_ID: first-sibling-p
1332 Non-nil if an headline is the first of its siblings.
1334 Used to know when to start a list if headline's relative level is
1335 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1337 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1338 [[#number-to-roman][~org-export-number-to-roman~]], [[#last-sibling-p][~org-export-last-sibling-p~]].
1340 ** ~org-export-footnote-first-reference-p~
1342 :CUSTOM_ID: footnote-first-reference-p
1345 Non-nil when a footnote reference if the first reference relative
1348 Used when a back-end needs to attach the footnote definition only
1349 to the first occurrence of the corresponding label.
1351 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1352 [[#get-footnote-definition][~org-export-get-footnote-definition~]],
1353 [[#get-footnote-number][~org-export-get-footnote-number~]].
1355 ** ~org-export-format-code-default~
1357 :CUSTOM_ID: format-code-default
1360 Return contents of a =src-block= or =example-block= element in
1361 a format suited for raw text or verbatim output. More
1362 specifically, it takes care of line numbering and labels
1363 integration depending of element's switches, but no formatting is
1364 otherwise applied to source code.
1366 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1368 ** ~org-export-format-code~
1370 :CUSTOM_ID: format-code
1373 Helper function to format source code. It applies a given function
1374 on each line of the code, passing current line number and
1375 associated code reference label, if any, as arguments.
1377 See also: [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]],
1378 [[#unravel-code][~org-export-unravel-code~]].
1380 ** ~org-export-get-caption~
1382 :CUSTOM_ID: get-caption
1385 Return the caption of a given element, as a secondary string. With
1386 an optional argument, return the short caption instead.
1388 As an example, =e-ascii= back-end, when creating a list of
1389 listings, uses the following:
1391 #+BEGIN_SRC emacs-lisp
1392 (defun org-e-ascii--list-listings (keyword info)
1393 (let ((title (org-e-ascii--translate "List of Listings" info)))
1399 ;; Use short name in priority, if available.
1400 (let ((caption (or (org-export-get-caption src-block t)
1401 (org-export-get-caption src-block))))
1402 (org-export-data caption info)
1404 (org-export-collect-listings info) "\n"))))
1407 See also: [[#read-attribute][~org-export-read-attribute~]].
1409 ** ~org-export-get-coderef-format~
1411 :CUSTOM_ID: get-coderef-format
1414 Return an appropriate format string for code reference links.
1416 See also: [[#resolve-coderef][~org-export-resolve-coderef~]].
1418 ** ~org-export-get-footnote-definition~
1420 :CUSTOM_ID: get-footnote-definition
1423 Retrieve the footnote definition relative to a given footnote
1426 If the footnote definition in inline, it is returned as a secondary
1427 string. Otherwise, it is full Org data.
1429 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1430 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1431 [[#get-footnote-number][~org-export-get-footnote-number~]].
1433 ** ~org-export-get-footnote-number~
1435 :CUSTOM_ID: get-footnote-number
1438 Return the ordinal attached to a footnote reference or definition.
1440 See also: [[#collect-footnote-definitions][~org-export-collect-footnote-definitions~]],
1441 [[#footnote-first-reference-p][~org-export-footnote-first-reference-p~]],
1442 [[#get-footnote-definition][~org-export-get-footnote-definition~]].
1444 ** ~org-export-get-genealogy~
1446 :CUSTOM_ID: get-genealogy
1449 Return flat list of current object or element's parents from
1450 closest to farthest, along with their contents.
1452 See also: [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1453 [[#get-parent-headline][~org-export-get-parent-headline~]],
1454 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1455 [[#get-previous-element][~org-export-get-previous-element~]].
1457 ** ~org-export-get-headline-number~
1459 :CUSTOM_ID: get-headline-number
1462 Return the section number of an headline, as a list of integers.
1464 See also: [[#headline-numbered-p][~org-export-headline-numbered-p~]],
1465 [[#number-to-roman][~org-export-number-to-roman~]].
1467 ** ~org-export-get-loc~
1472 Return count of accumulated lines of code from previous
1473 line-numbered =example-block= and =src-block= elements, according
1474 to current element's switches.
1476 In other words, the first line of code in the current block is
1477 supposed to be numbered as the returned value plus one, assuming
1478 its ~:number-lines~ properties is non-nil.
1480 See also: [[#format-code][~org-export-format-code~]], [[#unravel-code][~org-export-unravel-code~]].
1482 ** ~org-export-get-next-element~
1484 :CUSTOM_ID: get-next-element
1487 Return element (resp. object or string) after an element
1488 (resp. object), or nil.
1490 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1491 [[#get-parent-headline][~org-export-get-parent-headline~]],
1492 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1493 [[#get-previous-element][~org-export-get-previous-element~]].
1495 ** ~org-export-get-ordinal~
1497 :CUSTOM_ID: get-ordinal
1500 Associate a sequence number to any object or element. It is meant
1501 to be used to build captions.
1503 Also, it could be applied on a fuzzy link's destination, since such
1504 links are expected to be replaced with the sequence number of their
1505 destination, provided they have no description.
1507 Taken from =e-ascii= back-end, the following example shows how
1508 fuzzy links could be handled :
1510 #+BEGIN_SRC emacs-lisp :exports code
1511 (let ((type (org-element-property :type link)))
1514 ;; Do not apply a special syntax on fuzzy links pointing to targets.
1515 ((string= type "fuzzy")
1516 (let ((destination (org-export-resolve-fuzzy-link link info)))
1517 ;; Ignore invisible "#+TARGET: path".
1518 (unless (eq (org-element-type destination) 'keyword)
1519 ;; If link has a description, use it.
1520 (if (org-string-nw-p desc) desc
1522 (let ((number (org-export-get-ordinal destination info)))
1524 (if (atom number) (number-to-string number)
1525 (mapconcat 'number-to-string number ".")))))))))
1529 See also : [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]]
1531 ** ~org-export-get-parent-element~
1533 :CUSTOM_ID: get-parent-paragraph
1536 Return the first element containing provided object, if any.
1537 Return nil otherwise.
1539 See also: [[#get-genealogy][~org-export-get-genealogy~]], [[#get-parent][~org-export-get-parent~]],
1540 [[#get-parent-headline][~org-export-get-parent-headline~]],
1541 [[#get-previous-element][~org-export-get-previous-element~]], [[#get-next-element][~org-export-get-next-element~]].
1543 ** ~org-export-get-parent-headline~
1545 :CUSTOM_ID: get-parent-headline
1548 Return the headline containing provided element or object, if any.
1549 Return nil otherwise.
1551 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1552 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1553 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1554 [[#get-previous-element][~org-export-get-previous-element~]].
1556 ** ~org-export-get-parent~
1558 :CUSTOM_ID: get-parent
1561 Return closest element containing current element or object, if
1562 any. Return nil otherwise.
1564 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1565 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent-paragraph][~org-export-get-parent-paragraph~]],
1566 [[#get-parent-headline][~org-export-get-parent-headline~]],
1567 [[#get-previous-element][~org-export-get-previous-element~]].
1569 ** ~org-export-get-previous-element~
1571 :CUSTOM_ID: get-previous-element
1574 Return element (resp. object or string) before an element
1575 (resp. object), or nil.
1577 See also: [[#get-genealogy][~org-export-get-genealogy~]],
1578 [[#get-next-element][~org-export-get-next-element~]], [[#get-parent][~org-export-get-parent~]],
1579 [[#get-parent-headline][~org-export-get-parent-headline~]],
1580 [[#get-parent-paragraph][~org-export-get-parent-paragraph~]].
1582 ** ~org-export-get-relative-level~
1584 :CUSTOM_ID: get-relative-level
1587 Return headline level, relatively to the lower headline level in
1588 the parsed tree. It is meant to be used over ~:level~ headline's
1591 See also:[[#first-sibling-p][~org-export-first-sibling-p~]],
1592 [[#get-headline-number][~org-export-get-headline-number~]],[[#headline-numbered-p][~org-export-headline-numbered-p~]],
1593 [[#last-sibling-p][~org-export-last-sibling-p~]].
1595 ** ~org-export-get-table-cell-at~
1597 :CUSTOM_ID: get-table-cell-at
1600 Return exportable cell object at a given position, or nil. Hence,
1601 position ~(0 . 0)~ will always point to the first exportable cell
1604 See also: [[#table-cell-address][~org-export-table-cell-address~]],
1605 [[#table-dimensions][~org-export-table-dimensions~]].
1607 ** ~org-export-get-tags~
1609 :CUSTOM_ID: get-tags
1612 Return list of exportable tags attached to a given headline or
1615 In particular, it removes select tags and exclude tags. The
1616 function also accepts an arbitrary list of tags for further
1619 For example, =e-latex= back-end uses the following snippet in the
1620 inlinetask transcode function.
1622 #+BEGIN_SRC emacs-lisp
1623 (let ((title (org-export-data (org-element-property :title inlinetask) info))
1624 (todo (and (plist-get info :with-todo-keywords)
1625 (let ((todo (org-element-property :todo-keyword inlinetask)))
1626 (and todo (org-export-data todo info)))))
1627 (todo-type (org-element-property :todo-type inlinetask))
1628 (tags (and (plist-get info :with-tags)
1629 (org-export-get-tags inlinetask info)))
1630 (priority (and (plist-get info :with-priority)
1631 (org-element-property :priority inlinetask))))
1635 ** ~org-export-headline-numbered-p~
1637 :CUSTOM_ID: headline-numbered-p
1640 Non nil when a given headline should be numbered.
1642 See also: [[#get-headline-number][~org-export-get-headline-number~]],
1643 [[#get-relative-level][~org-export-get-relative-level~]].
1645 ** ~org-export-inline-image-p~
1647 :CUSTOM_ID: inline-image-p
1650 Non-nil when the link provided should be considered as an inline
1651 image. Note that it always return nil when the link has
1654 It accepts an optional set of rules in order to tweak the
1655 definition of an inline image, which is, by default, any link
1656 targetting a local file whose extension is either "png", "jpeg",
1657 "jpg", "gif", "tiff", "tif", "xbm", "xpm", "pbm", "pgm" or "ppm".
1659 A set of rules consists in an alist whose key is a type of link, as
1660 a string, and whose value is a regexp matching link's path. As an
1661 example, =e-html= back-end uses the following rules:
1663 #+BEGIN_SRC emacs-lisp
1664 '(("file" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1665 ("http" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'")
1666 ("https" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\'"))
1669 See also: [[#solidify-link-text][~org-export-solidify-link-text~]],
1670 [[#get-coderef-format][~org-export-get-coderef-format~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]].
1672 ** ~org-export-last-sibling-p~
1674 :CUSTOM_ID: last-sibling-p
1677 Non-nil if an headline is the last of its siblings.
1679 Used to know when to close a list if headline's relative level is
1680 below the one specified in [[#headline-levels][~:headline-levels~]] property.
1682 See also: [[#get-relative-level][~org-export-get-relative-level~]],
1683 [[#number-to-roman][~org-export-number-to-roman~]], [[#first-sibling-p][~org-export-first-sibling-p~]].
1685 ** ~org-export-number-to-roman~
1687 :CUSTOM_ID: number-to-roman
1690 Convert numbers to roman numbers. It can be used to provide roman
1691 numbering for headlines and numbered lists.
1693 See also: [[#get-headline-number][~org-export-get-headline-number~]].
1695 ** ~org-export-read-attribute~
1697 :CUSTOM_ID: read-attribute
1700 Read a property from a given element as a plist. It can be used to
1701 normalize affiliated keywords' syntax. For example, the following
1702 affiliated keywords:
1705 ,#+ATTR_HTML: :width 10 :height 5
1706 ,#+ATTR_HTML: :file "filename.ext"
1709 would be returned as:
1711 #+BEGIN_SRC emacs-lisp
1712 '(:width 10 :height 5 :file "filename.ext")
1715 See also: [[#get-caption][~org-export-get-caption~]].
1717 ** ~org-export-resolve-coderef~
1719 :CUSTOM_ID: resolve-coderef
1722 Search for a code reference within ~src-block~ and ~example-block~
1723 elements. Return corresponding --possibly accumulated-- line
1724 number, or reference itself, depending on container's switches.
1726 See also : [[#get-coderef-format][~org-export-get-coderef-format~]],
1727 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1728 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1730 ** ~org-export-resolve-fuzzy-link~
1732 :CUSTOM_ID: resolve-fuzzy-link
1735 Search destination of a fuzzy link — i.e. it has a ~fuzzy~ ~:type~
1736 attribute – within the parsed tree, and return that element,
1739 See also: [[#get-ordinal][~org-export-get-ordinal~]], [[#resolve-coderef][~org-export-resolve-coderef~]],
1740 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1741 [[#solidify-link-text][~org-export-solidify-link-text~]].
1743 ** ~org-export-resolve-id-link~
1745 :CUSTOM_ID: resolve-id-link
1748 Search headline targetted by an id link --- i.e. it has a ~id~ or
1749 ~custom-id~ ~:type~ attribute --- within the parse tree. Return
1750 the matching headline in the tree, the name of the external file,
1751 as a string, or nil.
1753 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1754 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-radio-link][~org-export-resolve-radio-link~]],
1755 [[#solidify-link-text][~org-export-solidify-link-text~]].
1757 ** ~org-export-resolve-radio-link~
1759 :CUSTOM_ID: resolve-radio-link
1762 Return first radio target object matching a radio link --- that is
1763 with a ~radio~ ~:type~ attribute --- in the parse tree, or nil.
1765 Typically, target's contents are exported through ~org-export-data~
1766 and used as link description, as in the following excerpt from
1769 #+BEGIN_SRC emacs-lisp
1770 (defun org-e-latex-link (link desc info)
1771 (let* ((type (org-element-property :type link))
1775 ((string= type "radio")
1776 (let ((destination (org-export-resolve-radio-link link info)))
1778 (format "\\hyperref[%s]{%s}"
1779 (org-export-solidify-link-text path)
1780 (org-export-data (org-element-contents destination) info)))))
1784 See also : [[#resolve-coderef][~org-export-resolve-coderef~]],
1785 [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]], [[#resolve-id-link][~org-export-resolve-id-link~]],
1786 [[#solidify-link-text][~org-export-solidify-link-text~]].
1788 ** ~org-export-solidify-link-text~
1790 :CUSTOM_ID: solidify-link-text
1793 Normalize a string, replacing most non-standard characters with
1796 Used to turn targets names into safer versions for links.
1798 See also: [[#inline-image-p][~org-export-inline-image-p~]],
1799 [[#resolve-id-link][~org-export-resolve-id-link~]], [[#resolve-fuzzy-link][~org-export-resolve-fuzzy-link~]],
1800 [[#resolve-radio-link][~org-export-resolve-radio-link~]].
1802 ** ~org-export-table-cell-address~
1804 :CUSTOM_ID: table-cell-address
1807 Return row and column of a given cell object. Positions are
1808 0-indexed and only exportable rows and columns are considered. The
1809 function returns nil if called on a non-exportable cell.
1811 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1812 [[#table-dimensions][~org-export-table-dimensions~]].
1814 ** ~org-export-table-cell-alignment~
1816 :CUSTOM_ID: table-cell-alignment
1819 Return expected alignment for the contents of a given cell object.
1820 It can be either ~left~, ~right~ or ~center~.
1822 See also: [[#table-cell-borders][~org-export-table-cell-borders~]],
1823 [[#table-cell-width][~org-export-table-cell-width~]].
1825 ** ~org-export-table-cell-borders~
1827 :CUSTOM_ID: table-cell-borders
1830 Indicate expected borders for a given cell object. When non-nil,
1831 return value is a list of symbols among ~top~, ~bottom~, ~above~,
1832 ~below~, ~left~ and ~right~.
1834 Special values ~top~ and ~bottom~ only happen for cells in,
1835 respectively, the first and the last exportable rows.
1837 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1838 [[#table-cell-width][~org-export-table-cell-width~]].
1840 ** ~org-export-table-cell-ends-colgroup-p~
1842 :CUSTOM_ID: table-cell-ends-colgroup-p
1845 Non-nil when a table cell object ends a column group.
1847 See also: [[#table-cell-starts-colgroup-p][~org-export-table-cell-starts-colgroup-p~]].
1849 ** ~org-export-table-cell-starts-colgroup-p~
1851 :CUSTOM_ID: table-cell-starts-colgroup-p
1854 Non-nil when a table cell object starts a column group.
1856 See also: [[#table-cell-ends-colgroup-p][~org-export-table-cell-ends-colgroup-p~]].
1858 ** ~org-export-table-cell-width~
1860 :CUSTOM_ID: table-cell-width
1863 Return expected width for contents of a given cell object.
1865 Only width specified explicitely through meta-data is considered.
1866 If no such information can be found, return nil instead.
1868 Some back-end may still need to know the actual width of exported
1869 cell's contents in order to compute column's width. In that case,
1870 every cell in the column must be transcoded in order to find the
1871 widest one. The snippet below, extracted from =org-e-ascii.el=
1872 illustrates a possible implementation.
1874 #+BEGIN_SRC emacs-lisp
1875 (or (org-export-table-cell-width table-cell info)
1876 (let* ((max-width 0)
1877 (table (org-export-get-parent-table table-cell info))
1878 (specialp (org-export-table-has-special-column-p table))
1879 (col (cdr (org-export-table-cell-address table-cell info))))
1883 ;; For each exportable row, get the cell at column COL and
1884 ;; transcode its contents. Then compare its length with
1885 ;; MAX-WIDTH and keep the greater of two.
1889 (org-element-contents
1890 (elt (if specialp (car (org-element-contents row))
1891 (org-element-contents row))
1899 See also: [[#table-cell-alignment][~org-export-table-cell-alignment~]],
1900 [[#table-cell-borders][~org-export-table-cell-borders~]].
1902 ** ~org-export-table-dimensions~
1904 :CUSTOM_ID: table-dimensions
1907 Return the number of exportable rows and columns in a given table.
1909 See also: [[#get-table-cell-at][~org-export-get-table-cell-at~]],
1910 [[#table-cell-address][~org-export-table-cell-address~]].
1912 ** ~org-export-table-has-header-p~
1914 :CUSTOM_ID: table-has-header-p
1917 Non-nil when table has at least two row groups.
1919 See also: [[#table-has-special-column-p][~org-export-table-has-special-column-p~]],
1920 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1922 ** ~org-export-table-has-special-column-p~
1924 :CUSTOM_ID: table-has-special-column-p
1927 Non-nil when first column in the table only contains meta-data.
1929 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
1930 [[#table-row-is-special-p][~org-export-table-row-is-special-p~]].
1932 ** ~org-export-table-row-ends-header-p~
1934 :CUSTOM_ID: table-row-ends-header-p
1937 Non-nil when a table row element ends table's header.
1939 See also: [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1940 [[#table-row-group][~org-export-table-row-group~]],
1941 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1942 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1944 ** ~org-export-table-row-ends-rowgroup-p~
1946 :CUSTOM_ID: table-row-ends-rowgroup-p
1949 Non-nil when a a table row element ends a rowgroup, header
1952 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1953 [[#table-row-group][~org-export-table-row-group~]],
1954 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]],
1955 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1957 ** ~org-export-table-row-group~
1959 :CUSTOM_ID: table-row-group
1962 Return row group number for a given table row element.
1964 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1965 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
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-is-special-p~
1971 :CUSTOM_ID: table-row-is-special-p
1974 Non-nil a given table row element only contains meta-data.
1976 See also: [[#table-has-header-p][~org-export-table-has-header-p~]],
1977 [[#table-has-special-column-p][~org-export-table-has-special-column-p~]].
1979 ** ~org-export-table-row-starts-header-p~
1981 :CUSTOM_ID: table-row-starts-header-p
1984 Non-nil when a table row element starts table's header.
1986 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
1987 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
1988 [[#table-row-group][~org-export-table-row-group~]],
1989 [[#table-row-starts-rowgroup-p][~org-export-table-row-starts-rowgroup-p~]].
1991 ** ~org-export-table-row-starts-rowgroup-p~
1993 :CUSTOM_ID: table-row-starts-rowgroup-p
1996 Non-nil when a table row element starts a rowgroup, header
1999 See also: [[#table-cell-starts-ends-header-p][~org-export-table-row-ends-header-p~]],
2000 [[#table-row-ends-rowgroup-p][~org-export-table-row-ends-rowgroup-p~]],
2001 [[#table-row-group][~org-export-table-row-group~]],
2002 [[#table-row-starts-header-p][~org-export-table-row-starts-header-p~]].
2004 ** ~org-export-translate~
2006 Translate a string, i.e. "Table of Contents", according to language
2009 Refer to ~org-export-dictionary~ variable for the list of all
2012 ** ~org-export-unravel-code~
2014 :CUSTOM_ID: unravel-code
2017 Clean source code from an =example-block= or a =src-block= element
2018 and extract code references out of it.
2020 Its purpose is to allow to transform raw source code first and then
2021 integrate line numbers or references back into the final output.
2022 That final task can be achieved with the help of
2023 ~org-export-format-code~ function.
2025 See also: [[#format-code][~org-export-format-code~]],
2026 [[#format-code-default][~org-export-format-code-default~]], [[#get-loc][~org-export-get-loc~]].
2030 # sentence-end-double-space: t