summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-06-07 22:38:02 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-06-07 22:38:02 +0200
commit1c71172c54a3d00143aeee32c7c3cc54144a743c (patch)
tree5625cb63c29c5143f52675ecb705e531c9728eec
parent8305c9381efaf3ad5f95ee96bb15209f3d687707 (diff)
downloadorg-mode-1c71172c54a3d00143aeee32c7c3cc54144a743c.tar.gz
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.
-rw-r--r--lisp/ox-texinfo.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index e5506a1..02de937 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