Coder Social home page Coder Social logo

maximalexer's Introduction

A Lexer for pygments that handles how Maxima (a Computer Algebra System) code is highlighted.

This package based on the asymptote lexer which is also a good option!

Installation

You should be easilly install the package using the command (This package obviously depends on pygments):

$ sudo pip install maximalexer

The package contains a basic test file that you can process:

$ pygmentize -f html -O full -o /tmp/example.html tests/examplefiles/basic.mac
$ firefox /tmp/example.html

Usage

Just like any other pygments lexer, you can highlight Maxima code (not lisp) using pygmentize command, minted latex package, jekyll, and so on.

maximalexer's People

Contributors

foamscience avatar meisterluk avatar

Watchers

James Cloos avatar

Forkers

meisterluk

maximalexer's Issues

Inequality operator is not recognized

Hi,

I have come across an issue with maximalexer. The inequality operator is not recognized as such. For example, consider the following input:

(%i10) M:matrix([1,2],[3,4]);
                                   [ 1  2 ]
(%o10)                             [      ]
                                   [ 3  4 ]
(%i11) determinant(M);
(%o11)                                - 2
(%i12) is(determinant(M)#0);
(%o12)                               true

The final query asks “is the determinant of M not equal to 0”. I am using maximalexer with CTAN's minted. Minted generates the following output (to be used by LaTeχ):

\PYG{k+kt}{is}\PYG{p}{(}\PYG{k+kt}{determinant}\PYG{p}{(}\PYG{n}{M}\PYG{p}{)}\PYG{err}{\PYGZsh{}}\PYG{l+m+mi}{0}\PYG{p}{);;}

Recognize that \PYG{err} indicates an error even though the syntax was correct.

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.