mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 20:07:46 +00:00
ox-texinfo: Fix quotations
* lisp/ox-texinfo.el (org-texinfo-quote-block): Do not use NAME keyword as the emphasized tag. Use a dedicated :tag attribute instead. Also add :author attribute. * doc/org-manual.org (Quotations in Texinfo export): New section.
This commit is contained in:
parent
25b3fd06be
commit
cbe1d76dc2
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue