From: Ihor Radchenko <yantar92@posteo.net>
To: Damien Cassou <damien@cassou.me>
Cc: emacs-orgmode@gnu.org
Subject: Re: Need for dedicated kinds of paragraphs
Date: Mon, 17 Oct 2022 11:33:32 +0000 [thread overview]
Message-ID: <877d0yr8fn.fsf@localhost> (raw)
In-Reply-To: <8735bn2b87.fsf@cassou.me>
Damien Cassou <damien@cassou.me> writes:
> I'm not sure what kind of markup to use nor how to transcode that
> markup. I tried with:
>
> #+BOX: attention
> This text will appear with a red background
>
> Does that make sense? Do you have a better suggestion?
Note that #+BOX is not a valid affiliated keyword. Only keywords from
org-element-affiliated-keywords + #+ATTR_X keywords are considered
affiliated.
So, you example is actually parsed as
<keyword :name "BOX" ...>
<paragraph>
not as
<paragraph :BOX ...>
In addition to special blocks suggested by others, a natural way to
customize paragraph export is using #+ATTR_YOURBACKEND keywords.
Something like
#+ATTR_BACKEND: :style attention
This text will appear with a red background
Then, you can use
(plist-get (org-export-read-attribute :attr_backend paragraph-element)
:style)
from inside the paragraph transcoder.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2022-10-17 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 6:52 Need for dedicated kinds of paragraphs Damien Cassou
2022-10-17 7:25 ` Sébastien Miquel
2022-10-17 18:44 ` Damien Cassou
2022-10-17 8:16 ` Fraga, Eric
2022-10-17 11:33 ` Ihor Radchenko [this message]
2022-10-17 11:37 ` Max Nikulin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877d0yr8fn.fsf@localhost \
--to=yantar92@posteo.net \
--cc=damien@cassou.me \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).