"ULMUL" is an original Ultra Lightweight MarkUp Language. Using "ulmul2html5" or "ulmul2mathjax" commands, You can convert a ULMUL text with TeX style equations into HTML5 documents with MathML or MathJax, respectively. ULMUL is written in Ruby. You can also use ulmul.rb as a library.
Homepage of ULMUL: http://t-nissie.users.sourceforge.net/ULMUL/
Ruby Gem of ULMUL: http://rubygems.org/gems/ulmul
Repository of ULMUL: https://github.com/t-nissie/ULMUL
Please use gem ( RubyGems https://rubygems.org/ ) for the installation.
$ sudo gem install ulmul
If you do not have the eim_xml, math_ml, aasm and exifr libraries, gem will download and install the libraries automatically.
The encode of input file must be utf-8.
Inside ulmul.rb, input lines are processed as "events" with aasm library https://rubygems.org/gems/aasm .
Empty lines divide paragraphs.
Starting with "= ", "== ", "=== ", "==== ", "===== ", and "====== ". "= " will be used for the title.
Lines starting with asterisks become itemizing list. For example,
# Nesting is allowed up to 4th--5th level. * First * Second * Third * Fourth * more for Fourth second continue * More for third * More for first
become
Lines starting with some spaces but not asterisks become verbatim lines.
EOF or "=end" end the process.
Lines starting with "#" and "=begin" are ignored.
Other lines.
Input:
Mass $m$ can be converted into energy $E$ as \Eq:Emc2 E=mc^2. /Eq:Emc2
Output:
Mass can be converted into energy as
You can refer the equation in a way like "Eq:Einstein", as Eq. (1).
To view the equations in MathML correctly, please use
Start a Figure environment with "\Fig:foo FILENAME.jpg" and terminate it with "/Fig:foo", where "foo" is a tag for the figure. You can write a figure caption between them. You can refer the figure with "Fig:foo" as Fig. 1.
Input:
\Fig:ruby ruby.jpg The is a dummy figure for an example. Cute red logo of Ruby, isn't it? You can write equations even in a caption as $ax^2+bx+c=0$. /Fig:ruby
Output:
Table environment is NOT IMPLEMENTED yet. Start a Table environment with "\Table:bar" and terminate it with "/Table:bar", where "bar" is a tag for the table. You can write a table caption between them. You can refer the table with "Table:bar" as Table 1.
Input:
\Table:diamond The is a dummy caption for the table. /Table:diamond
Output:
TABLE |
---|
Not yet implemented |
Start a Code environment with "\Code:baz FILENAME" and terminate it with "/Code:baz", where "baz" is a tag for the code. You can write a caption between them. You can refer the code with "Code:baz" as Code 1. Code will be highlighted with google-code-prettify when -j https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js is given.
Input:
\Code:hello hello.c Ordinary hello.c. Can you see stdio.h? /Code:hello
Output:
/* hello.c */ #include <stdio.h> int main() { printf("hello, world\n"); return 0; }
$ ulmul2html5 foo.txt > foo.html $ ulmul2html5 -n 'Takeshi Nishimatsu' -s ulmul-slidy.css -j ulmul-slidy.js presentation.txt > presentation.html
Show a help message.
Specify stylesheet filename.
Specify your name for copyright notices.
Specify JavaScript filename.
Specify natural language. Its default is "en".
Maximum depth for the Table of Contents. Its default is 3. If you do not need the Table of Contents, specify 1.
It uses MathJax http://www.mathjax.org/ to show equations.
$ ulmul2mathjax --help $ ulmul2mathjax -s ulmul2html5.css -j https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js \ -j 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default' README-en > README-en-mathjax.html
$ ulmul2latex --help $ ulmul2latex test.ulmul | tee test.tex $ latex test.tex $ latex test.tex $ dvipdfmx test.dvi
ulmul2latex is still under development. Sorry.
For more, see TODO file.
You can clone the source tree of ULMUL from GitHub with git(1) command:
$ git clone https://github.com/t-nissie/ULMUL.git ulmul
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2017,2022,2024 by Takeshi Nishimatsu
ulmul.rb is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. You can copy, modify and redistribute ulmul.rb, but only under the conditions described in the GNU General Public License (the "GPL").
W3C has copyrights for ulmul-slidy.js and ulmul-slidy.css. Their original names were slidy.js and slidy.css, respectively. Takeshi Nishimatsu slightly modified them. You can download the original package, slidy.zip, from http://www.w3.org/Talks/Tools/Slidy/ . You can find their licenses at http://www.w3.org/Consortium/Legal/copyright-documents and http://www.w3.org/Consortium/Legal/copyright-software .
Takeshi Nishimatsu (t_nissie{at}yahoo.co.jp) http://t-nissie.users.sourceforge.net/