#+BEGIN_proof
...
Therefore, any even number greater than 2 is the sum of two primes.
#+END_proof
Currently, after exiting the block, the text “Therefore, […]” will be rendered, but the lines #+BEGIN_proof and #+END_proof will be hidden. In Emacs, that syntax is parsed by org export mechanism to produce proper latex, so I would like to be able to keep some pages with this kind of math environment (theorem, lemma, proposition) and have some indication that its there when not editing a block.
Does anyone have any idea of how to achieve this? I looked into the source code on github but couldn’t really pinpoint where to tackle the issue. In the definition of block-commands-map in commands.cljs, the comment
;; Allow user to modify or extend, should specify how to extend.
gave me hope that it shouldn’t be difficult, but even after having gone through other files (like html_parser.cljs) I am still at a loss.
I also would be very interested in this. I’ve been trying to reproduce the style of admonition callouts in Obsidian. While this can sort of be done using macros, being able to define custom environments whose contents are parsed as Markdown would make things much cleaner and easier.
seems to depend on org babel, which is a prime example of literate programming, in Emacs, including features like code block embedding and execution, result capture and display, session management, and parameter passing. Developed over decades, it supports a multitude of languages. Implementing this in Logseq seems very difficult. Hope this helps you.
I have come up with the following solution. I found that whichever #+BEGIN_ARBITRARYNAME environment gets parsed as a div.arbitraryname element, therefore one can use modify it via custom.css.
In the following example before the contents of the environment THEOREM the purple colored label “Theorem: ” is put.
Here is *Stoke's theorem*:
#+BEGIN_THEOREM
For every compactly supported smooth (n-1)-form \(ω\) on a oriented smooth n-manifold \(M\) with boundary, it holds that \[ ∫_M dω = ∫_{∂M} ω. \]
#+END_THEOREM