Hi all,
I'm trying to have the same .org
file exported to LaTeX and ox-hugo. I use the template docsy template to export to which uses an alert shortcode to render an alert/info area.
In LaTeX I use awesomebox to render a similar block.
The LaTeX output works perfectly when I am using
#+begin_noteblock This is a noteblock info environment from the awesomebox LaTeX package. #+end_noteblock
Now I want that noteblock to render into the following when using the ox-hugo
export:
{{% alert title="Warning" color="warning" %}} This is a warning. {{% /alert %}}
I found I should be able to use org-special-block-extras
to do this conversion, but I seem to be getting it wrong, as on export no conversion happens. As I though there is maybe something wrong with the condition, I added the caution block as well, but that also does not work.
I deleted my ~/.emacs.d
and had everything set up from scratch again, in order to be "fresh".
Can someone tell me what I am doing wrong here and how I can achieve the desired result?
The configuration I am using is:
(use-package org-special-block-extras :ensure t :hook (org-mode . org-special-block-extras-mode) ;; All relevant Lisp functions are prefixed ‘o-’; e.g., `o-docs-insert'. :config (org-special-block-extras--defblock noteblock (title "Details") (title-color "Green") "Define noteblock export for docsy ox hugo" (cond ((eq backend 'ox-hugo) (format "{{%% alert title=\"%s\" color=\"%s\" %%}}\n%s\n{{%% /alert %%}}" title title-color contents)) )) (org-special-block-extras--defblock cautionblock nil nil "Awesomebox caution" (format "{{%% alert title=\"caution\" color=\"info\" %%}}%s{{%% /alert %%}}" contents) ) )
I get these compile errors:
``` Compiling file /Users/j/.emacs.d/elpa/org-special-block-extras-20210909.2032/org-special-block-extras.el at Wed Dec 8 23:38:13 2021 Entering directory ‘/Users/j/.emacs.d/elpa/org-special-block-extras-20210909.2032/’
In org-special-block-extras-mode: org-special-block-extras.el:133:17:Warning: reference to free variable ‘o--docs-from-libraries’ org-special-block-extras.el:194:21:Warning: assignment to free variable ‘o--docs-actually-used’ org-special-block-extras.el:195:21:Warning: assignment to free variable ‘o--docs’ org-special-block-extras.el:602:1:Warning: Unused lexical variable ‘blk-column’ org-special-block-extras.el:681:1:Error: Symbol’s value as variable is void: o--supported-blocks ```