• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Text/H23-May-2012-321152

src/H23-May-2012-10,8105,398

t/H23-May-2012-5942

Build.PLH A D23-May-2012664 2723

ChangesH A D23-May-2012724 2720

MANIFESTH A D23-May-2012789 4140

META.jsonH A D23-May-20121 KiB4847

META.ymlH A D23-May-2012590 2625

README.podH A D23-May-20122.1 KiB7740

README.pod

1=head1 NAME
2
3Text::AsciiTeX - Convert (La)TeX formulas to ASCII art
4
5=head1 SYNOPSIS
6
7 use Text::AsciiArt;
8
9 #equivalent examples
10
11 my @text_array = render('\frac{1}{e}');
12 print "$_\n" for @text_array;
13
14 my $text_array = render('\frac{1}{e}');
15 print $text_array;
16
17 print scalar render('\frac{1}{e}');
18
19 render('\frac{1}{e}');
20
21=head1 DESCRIPTION
22
23This module provides a mechanism to render (La)TeX formulae to ASCII art. It is based solely on F<AsciiTeX> written by Bart Pieters (See L</"UNDERLYING TECHNOLOGIES">).
24
25=head1 EXPORTED FUNCTION
26
27This module exports the C<render> function.
28
29=head2 C<< render( $latex [, $columns] ) >>
30
31=head3 Argument(s)
32
33The function C<render> accepts a string containing a formula in (La)TeX formatting. Optionally, an integer may be given to specify the number of columns for the output or zero for no-breaking. The default number of columns is 80.
34
35=head3 Return
36
37Since version 0.03 the return value is context aware.
38
39=over
40
41=item *
42
43In list context, C<render> returns a list whose elements are strings, one for each row of the art. Printing each line, terminated by a newline will probably do what you expect.
44
45=item *
46
47In scalar context, C<render> will return a string of the concatenated lines, each ended with a newline.
48
49=item *
50
51In void context, C<render> will print the scalar context return directly to the C<select>ed file handle (usually C<STDOUT>).
52
53=back
54
55=head1 EXAMPLES
56
57For use examples see L</SYNOPSIS>. For a list of allowed syntax and syntax examples read L<Text::AsciiTeX::Syntax>.
58
59=head1 UNDERLYING TECHNOLOGIES
60
61This module is basically just a C-level Perl wrapper of F<AsciiTeX> written by Bart Pieters. That project is hosted at L<http://asciitex.sourceforge.net/>. F<AsciiTeX> in turn was a fork of F<eqascii> which was written by Przemek Borys. This module owes a debt of thanks to both authors.
62
63=head1 SOURCE REPOSITORY
64
65L<http://github.com/jberger/Text::AsciiTeX>
66
67=head1 AUTHOR
68
69Joel Berger, E<lt>joel.a.berger@gmail.comE<gt>
70
71=head1 COPYRIGHT AND LICENSE
72
73Copyright (C) 2012 by Joel Berger
74
75This library is free software; you can redistribute it and/or modify
76it under the same terms as Perl itself.
77