all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Need for dedicated kinds of paragraphs
@ 2022-10-17  6:52 Damien Cassou
  2022-10-17  7:25 ` Sébastien Miquel
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Damien Cassou @ 2022-10-17  6:52 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I'm implementing an odt-based exporter for a French magazine named
GNU/Linux Magazine.  This magazine defines several kinds of boxes, which
are small paragraphs of a certain type among "Default", "Attention",
"Warning" and "PAO". When published, the magazine will change the
background of these boxes depending on the type (e.g., using red color
for warning boxes).

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?

From Worg's org-syntax.html file [1], I understand that this is an
"affiliated keyword" and that it must be declared in
`org-element-affiliated-keywords' but this variable is a `defconst' so
I'm reluctant to change it in my exporter.

I have an `ox-linuxmag--paragraph' transcoder for the `paragraph' type
but I don't know how to get the value of the "BOX" keyword.

Do you have any suggestion?

If I have a look at how org-odt transcodes paragraphs, I see this
function:

    (defun org-odt-paragraph (paragraph contents info)
      "Transcode a PARAGRAPH element from Org to ODT.
    CONTENTS is the contents of the paragraph, as a string.  INFO is
    the plist used as a communication channel."
      (org-odt--format-paragraph
       paragraph contents info
       (or (org-element-property :style paragraph) "Text_20_body")
       "OrgCenter"
       "Quotations"))

Could I use the :style property? What would the markup be like to make
that work?

Thank you so much for Org!

[1] https://orgmode.org/worg/dev/org-syntax.html#Affiliated_Keywords

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-17 18:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-10-17 11:37 ` Max Nikulin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.