Wrote one
https://steemit.com/common-lisp/@sundawning/use-klipse-in-org-mode
, but the method is very limited, and it can not be closely combined with the original org-mode, but it is not entirely useless. There are still merits, so this article is relative to the previous article. Say it is a new way.
The new method can be easily implemented in org-mode to export code block that klipse can handle. This method is so intuitive that I didn't find it at first.
Step-by-step implementation:
- Create a block of code in the "your-language" language
#+BEGIN_SRC your-language (print "hello") #+END_SRC
- Add the language class in the klipse configuration
Selector_eval_clisp: '.src-your-language',
When an org file is converted to HTML, the src prefix is added to the class name of the code block, stitched into "src-your-language", and klipse can correctly process the formatted code block.
The full content of the org file is like:
#+BEGIN_SRC your-language
(print "hello")
#+END_SRC
#+BEGIN_HTML
<link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css">
<script>
window.klipse_settings = {
codemirror_options_in: {
lineWrapping: true,
autoCloseBrackets: true
},
codemirror_options_out: {
lineWrapping: true
},
beautify_strings: true,
selector_eval_clisp: '.src-your-language',
};
</script>
<script src="https://storage.googleapis.com/app.klipse.tech/plugin_prod/js/klipse_plugin.min.js?v=7.4.0">
</script>
#+END_HTML