Function: org-odt-link--inline-formula
org-odt-link--inline-formula is a byte-compiled function defined in
ox-odt.el.gz.
Signature
(org-odt-link--inline-formula ELEMENT INFO)
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-odt.el.gz
;;;; Links :: Math formula
(defun org-odt-link--inline-formula (element info)
(let* ((src (let ((raw-path (org-element-property :path element)))
(cond
((file-name-absolute-p raw-path)
(expand-file-name raw-path))
(t raw-path))))
(src-expanded (if (file-name-absolute-p src) src
(expand-file-name src (file-name-directory
(plist-get info :input-file)))))
(href
(format
"\n<draw:object %s xlink:href=\"%s\" xlink:type=\"simple\"/>"
" xlink:show=\"embed\" xlink:actuate=\"onLoad\""
(file-name-directory (org-odt--copy-formula-file src-expanded))))
(standalone-link-p (org-odt--standalone-link-p element info))
(embed-as (if standalone-link-p 'paragraph 'character))
(captions (org-odt-format-label element info 'definition))
;; Check if this link was created by LaTeX-to-MathML
;; converter.
(replaces (org-element-property
:replaces (if (not standalone-link-p) element
(org-element-parent-element element))))
;; If yes, note down the type of the element - LaTeX Fragment
;; or LaTeX environment. It will go in to frame title.
(title (and replaces (capitalize
(symbol-name (org-element-type replaces)))))
;; If yes, note down its contents. It will go in to frame
;; description. This quite useful for debugging.
(desc (and replaces (org-element-property :value replaces)))
) ;; width height
(cond
((eq embed-as 'character)
(org-odt--render-image/formula "InlineFormula" href nil nil ;; width height
nil nil title desc))
(t
(let* ((equation (org-odt--render-image/formula
"CaptionedDisplayFormula" href nil nil ;; width height
captions nil title desc))
(label
(let* ((org-odt-category-map-alist
'(("__MathFormula__" "Text" "math-label" "Equation"
org-odt--enumerable-formula-p))))
(car (org-odt-format-label element info 'definition)))))
(concat equation "<text:tab/>" label))))))