GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Text::AsciiTeX(3) User Contributed Perl Documentation Text::AsciiTeX(3)

Text::AsciiTeX - Convert (La)TeX formulas to ASCII art

 use Text::AsciiArt;
 #equivalent examples
 my @text_array = render('\frac{1}{e}');
 print "$_\n" for @text_array;
 my $text_array = render('\frac{1}{e}');
 print $text_array;
 print scalar render('\frac{1}{e}');
 render('\frac{1}{e}');

This module provides a mechanism to render (La)TeX formulae to ASCII art. It is based solely on AsciiTeX written by Bart Pieters (See "UNDERLYING TECHNOLOGIES").

This module exports the "render" function.

Argument(s)

The function "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.

Return

Since version 0.03 the return value is context aware.

  • In list context, "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.
  • In scalar context, "render" will return a string of the concatenated lines, each ended with a newline.
  • In void context, "render" will print the scalar context return directly to the "select"ed file handle (usually "STDOUT").

For use examples see "SYNOPSIS". For a list of allowed syntax and syntax examples read Text::AsciiTeX::Syntax.

This module is basically just a C-level Perl wrapper of AsciiTeX written by Bart Pieters. That project is hosted at <http://asciitex.sourceforge.net/>. AsciiTeX in turn was a fork of eqascii which was written by Przemek Borys. This module owes a debt of thanks to both authors.

<http://github.com/jberger/Text::AsciiTeX>

Joel Berger, <joel.a.berger@gmail.com>

Copyright (C) 2012 by Joel Berger

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2025-07-05 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.