Org Ruby

The Ruby gem org-ruby is behind Jekyll-org and convert the ORG files into HTML. For highlight the code it uses Rouge and look like this:

puts "Hello World"

For code written in Ruby and also supports other languages like Emacs-lisp that got translated to scheme by org-ruby

(message "Hello World")

Org-ruby is under development, I’ve been trying to improve the code, and add new features, for example, export @@latex: Latex @@ code.

There are two ways to write latex code

MathJax, is a JavaScript library that render the text between $ as latex text and for blocks, the content between \[ and \]. For example:

To work I added the following code to the head tag of the Jekyll template.

<script>
  MathJax = {
    tex: { inlineMath: { '[+]': [['$', '$']] } }
  };
</script>
<script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js"></script>

Org-ruby code is not easy to understand and read, but it works. Refactor it has been a fun experience.

Maybe two more features come after this, to have this behavior open to configure and to include the MathJax scripts in the wrap_html option, like when including a CSS file.