Function: org-texinfo--@ref

org-texinfo--@ref is a byte-compiled function defined in ox-texinfo.el.gz.

Signature

(org-texinfo--@ref DATUM DESCRIPTION INFO)

Documentation

Return @ref command for element or object DATUM.

DESCRIPTION is the printed name of the section, as a string, or nil.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-texinfo.el.gz
;;;; Link

(defun org-texinfo--@ref (datum description info)
  "Return @ref command for element or object DATUM.
DESCRIPTION is the printed name of the section, as a string, or
nil."
  (let ((node-name (org-texinfo--get-node datum info))
	;; Sanitize DESCRIPTION for cross-reference use.  In
	;; particular, remove colons as they seem to cause pain (even
	;; within @asis{...}) to the Texinfo reader.
	(title (and description
		    (replace-regexp-in-string
		     "[ \t]*:+" ""
		     (replace-regexp-in-string "," "@comma{}" description)))))
    (if (or (not title) (equal title node-name))
	(format "@ref{%s}" node-name)
      (format "@ref{%s, , %s}" node-name title))))