diff --git a/doc/org-manual.org b/doc/org-manual.org index 2c0ad7cd0..faaf7a1e6 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -14852,6 +14852,35 @@ and specify the text using Texinfo code, as shown in the example: [[ridt.pdf]] #+end_example +*** Quotations in Texinfo export +:PROPERTIES: +:DESCRIPTION: Quote block attributes. +:END: + +#+cindex: @samp{ATTR_TEXINFO}, keyword +You can write the text of a quotation within a quote block (see +[[*Paragraphs]]). You may also emphasize some text at the beginning of +the quotation with the =:tag= attribute. + +#+begin_example +,#+ATTR_TEXINFO: :tag Warning +,#+BEGIN_QUOTE +Striking your thumb with a hammer may cause severe pain and discomfort. +,#+END_QUOTE +#+end_example + +To specify the author of the quotation, use the =:author= attribute. + +#+begin_example +,#+ATTR_TEXINFO: :author King Arthur +,#+BEGIN_QUOTE +The Lady of the Lake, her arm clad in the purest shimmering samite, +held aloft Excalibur from the bosom of the water, signifying by divine +providence that I, Arthur, was to carry Excalibur. That is why I am +your king. +,#+END_QUOTE +#+end_example + *** Special blocks in Texinfo export :PROPERTIES: :DESCRIPTION: Special block attributes. diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 7bfdc03c9..825f95fef 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1345,11 +1345,12 @@ holding contextual information." "Transcode a QUOTE-BLOCK element from Org to Texinfo. CONTENTS holds the contents of the block. INFO is a plist holding contextual information." - (let* ((title (org-element-property :name quote-block)) - (start-quote (concat "@quotation" - (when title - (format " %s" title))))) - (format "%s\n%s@end quotation" start-quote contents))) + (let ((tag (org-export-read-attribute :attr_texinfo quote-block :tag)) + (author (org-export-read-attribute :attr_texinfo quote-block :author))) + (format "@quotation%s\n%s%s\n@end quotation" + (if tag (concat " " tag) "") + contents + (if author (concat "\n@author " author) "")))) ;;;; Radio Target