From 1c71172c54a3d00143aeee32c7c3cc54144a743c Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 7 Jun 2017 22:38:02 +0200 Subject: [PATCH] ox-texinfo: Tolerate indicating commands without @-sign * lisp/ox-texinfo.el (org-texinfo-def-table-markup): Improve docstring. (org-texinfo-plain-list): Tolerate indicating commands without @-sign. --- lisp/ox-texinfo.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index e5506a1c5..02de9376a 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -269,6 +269,7 @@ be placed after the end of the title." (defcustom org-texinfo-table-scientific-notation "%s\\,(%s)" "Format string to display numbers in scientific notation. + The format should have \"%s\" twice, for mantissa and exponent \(i.e. \"%s\\\\times10^{%s}\"). @@ -279,7 +280,12 @@ When nil, no transformation is made." (const :tag "No formatting" nil))) (defcustom org-texinfo-def-table-markup "@samp" - "Default setting for @table environments." + "Default markup for first column in two-column tables. + +This should an indicating command, e.g., \"@code\", \"@kbd\" or +\"@asis\". + +It can be overridden locally using the \":indic\" attribute." :group 'org-export-texinfo :type 'string) @@ -1198,8 +1204,10 @@ the plist used as a communication channel." CONTENTS is the contents of the list. INFO is a plist holding contextual information." (let* ((attr (org-export-read-attribute :attr_texinfo plain-list)) - (indic (or (plist-get attr :indic) - (plist-get info :texinfo-def-table-markup))) + (indic (let ((i (or (plist-get attr :indic) + (plist-get info :texinfo-def-table-markup)))) + ;; Allow indicating commands with missing @ sign. + (if (string-prefix-p "@" i) i (concat "@" i)))) (table-type (plist-get attr :table-type)) (type (org-element-property :type plain-list)) (list-type (cond