trying to fix

This commit is contained in:
Chris Cochrun 2022-01-03 12:41:35 -06:00
parent fa407dfeb6
commit e013d7569e
22945 changed files with 447936 additions and 0 deletions

View file

@ -0,0 +1 @@
<!-- SC_OFF --><div class="md"><p>Hi all,</p> <h1>Problem Description</h1> <p>I&#39;m trying to have the same <code>.org</code> file exported to LaTeX and ox-hugo. I use the template <a href="https://www.docsy.dev/">docsy</a> template to export to which uses an <a href="https://www.docsy.dev/docs/adding-content/shortcodes/#alert">alert shortcode</a> to render an alert/info area.</p> <p>In LaTeX I use <a href="https://packages.oth-regensburg.de/ctan/graphics/awesomebox/awesomebox.pdf">awesomebox</a> to render a similar block.</p> <p>The LaTeX output works perfectly when I am using </p> <p><code> #+begin_noteblock This is a noteblock info environment from the awesomebox LaTeX package. #+end_noteblock </code></p> <p>Now I want that noteblock to render into the following when using the <code>ox-hugo</code> export:</p> <p><code> {{% alert title=&quot;Warning&quot; color=&quot;warning&quot; %}} This is a warning. {{% /alert %}} </code></p> <p>I found I should be able to use <code>org-special-block-extras</code> 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.</p> <p>I deleted my <code>~/.emacs.d</code> and had everything set up from scratch again, in order to be &quot;fresh&quot;.</p> <p>Can someone tell me what I am doing wrong here and how I can achieve the desired result?</p> <h1>Configuration</h1> <p>The configuration I am using is:</p> <p><code> (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&#39;. :config (org-special-block-extras--defblock noteblock (title &quot;Details&quot;) (title-color &quot;Green&quot;) &quot;Define noteblock export for docsy ox hugo&quot; (cond ((eq backend &#39;ox-hugo) (format &quot;{{%% alert title=\&quot;%s\&quot; color=\&quot;%s\&quot; %%}}\n%s\n{{%% /alert %%}}&quot; title title-color contents)) )) (org-special-block-extras--defblock cautionblock nil nil &quot;Awesomebox caution&quot; (format &quot;{{%% alert title=\&quot;caution\&quot; color=\&quot;info\&quot; %%}}%s{{%% /alert %%}}&quot; contents) ) ) </code></p> <h1>Errors</h1> <p>I get these compile errors:</p> <p>``` 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/</p> <p>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: Symbols value as variable is void: o--supported-blocks ```</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/authsec"> /u/authsec </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/rc32ei/orgmodeoxhugo_custom_begin_noteblock/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/emacs/comments/rc32ei/orgmodeoxhugo_custom_begin_noteblock/">[comments]</a></span>