Git Product home page Git Product logo

text-asciitex's Introduction

NAME

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

SYNOPSIS

use Text::AsciiTeX;

#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}');

DESCRIPTION

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").

EXPORTED FUNCTION

This module exports the render function.

render( $latex [, $columns] )

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 selected file handle (usually STDOUT).

EXAMPLES

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

UNDERLYING TECHNOLOGIES

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.

SOURCE REPOSITORY

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

AUTHOR

Joel Berger, <[email protected]>

COPYRIGHT AND LICENSE

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.

text-asciitex's People

Contributors

jberger avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.