Convert (La)TeX formulas to ASCII art (in Perl)
C Perl
Switch branches/tags
Nothing to show
Pull request Compare This branch is 9 commits ahead, 17 commits behind jberger:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Text
src
t
Build.PL
Changes
MANIFEST
README.pod

README.pod

README

This is a fork of Text::AsciiTeX by Joel Berger. When I tried it, I thought the array reference returned by render was a bit awkward, so I wondered what it would be like if we made it depend on context.

use Text::AsciiArt;
 
my $tex = q( \int_0^W \frac{np}{n+p}dx = \int_0^W \frac{n_0}
             {exp \left(\frac{E_0(x-x_0)}{kT} \right)
             +exp \left(-\frac{E_0(x-x_0)}{kT}\right)} dx   );

say "\nscalar context - return block of text";
my $block = render $tex;
say $block;

say "\nlist context - return array of lines";
my @lines = render $tex;
say for @lines;

say "\nvoid context - print lines";
render $tex;