org-special-block-extras icon indicating copy to clipboard operation
org-special-block-extras copied to clipboard

Special blocks for `.docx` export

Open Perangelot opened this issue 2 years ago • 6 comments

I am desperately trying to get special blocks to export to .docx, but it won't work. At first I thought I was missing the right backend, but then I came to realize the problem lays deeper. Even defining this custom block did not yield any result:

(org-defblock satz nil (name "" label "") "Custom block for the custom satz-environment in LaTeX."
(print "hello!"))

For all .tex and .html, it is replaced by "hello!" every time.

It seems to me that something is converting the block before the formatting function of org-special-blocks-extra comes into play. What could the reason for that be, and what could you do about it?

Perangelot avatar Jun 08 '22 13:06 Perangelot

Probably related to #32

MagicRB avatar Jun 10 '22 21:06 MagicRB

I think that this hook doesnt trigger https://github.com/alhassy/org-special-block-extras/blob/master/org-special-block-extras.el#L100 i camt test it rn unfortunately

MagicRB avatar Jun 10 '22 21:06 MagicRB

ox-html doesnt trigger it explicitly

MagicRB avatar Jun 10 '22 21:06 MagicRB

I just evaluated the line and then exported again. This time, it worked. Why is "ox-html" relevant here? The conversion is done by pandoc.

Perangelot avatar Jun 10 '22 22:06 Perangelot

Becuase ox-html works for me but org-thtml which is a derived backend doesnt

MagicRB avatar Jun 12 '22 11:06 MagicRB

@Perangelot @MagicRB Could you please summarize what hook isn't being hit? How could we get it to be hit? Is just evaluating the code associated with that hook enough to make things work for .docx? If so, why don't we always run that code?

alhassy avatar Jul 21 '23 02:07 alhassy