|
Index of /arch/cc-env/libmathml-macro-dennou-ruby/libmathml-macro-dennou-ruby
|
Name Last modified Size Description
Parent Directory 16-Mar-2008 00:16 -
D6math.sty 11-Nov-2006 16:44 1k
install.rb 16-Mar-2008 00:02 2k
= Dennou style 6 TeX macro for MathML library for Ruby
== Prepare
Donwload MathML library for Ruby. See http://www.hinet.mydns.jp/~hiraku/en/.
* Unpack:
% tar -zxvf mathml-0.8.0.tar.gz
* Go into the source directory:
% cd mathml-0.8.0
* Install the package:
A script for installation is not prepared.
Install "mathml.rb" manually as follows.
(Please change "~/lib/ruby/1.8")
% mkdir -p ~/lib/ruby/1.8
% mkdir -p ~/lib/ruby/1.8/math_ml
% install lib/*.rb ~/lib/ruby/1.8/
% install lib/math_ml/*.rb ~/lib/ruby/1.8/math_ml/
* Set the environment variable RUBYLIB
% RUBYLIB=~/lib/ruby/1.8 ; export RUBYLIB # sh, bash
% setenv RUBYLIB ~/lib/ruby/1.8 # csh, tcsh
== Installation
* Unpack:
% tar -zxvf libmathml-macro-dennou-ruby_1.X.tar.gz
* Go into the source directory:
% cd libmathml-macro-dennou-ruby-1.X
* Install the package:
% ruby install.rb
Use --help option to show options and the directory to which
TeX macro file is installed:
% ruby install.rb --help
== Usage
Use D6math.sty as follows
=== Example
#!/usr/bin/ruby
require 'math_ml'
p = MathML::LaTeX::Parser.new
$LOAD_PATH.each{|l|
f = File.join(l, "math_ml/macro/D6math.sty")
if File.file?(f)
io = File.open(f) ; p.macro.parse(io.read)
end
}
puts p.parse('u_x = \DP{u}{x}', true).to_s
== Licence
See D6math.sty .
== Web site
Please visit <http://www.gfd-dennou.org/library/cc-env/libmathml-macro-dennou-ruby/>.
Relevant web sites are Dennou style TeX macro web site
<http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/SIGEN.htm>, and
MathML library for Ruby <http://www.hinet.mydns.jp/~hiraku/>.