Coder Social home page Coder Social logo

lasemproject / lasem Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 3.0 77.46 MB

SVG and Mathml rendering library

License: GNU Lesser General Public License v2.1

Shell 0.10% C 90.88% Lex 1.84% Yacc 3.04% TeX 0.14% JavaScript 1.05% HTML 0.26% CSS 0.01% XSLT 1.72% Perl 0.30% Meson 0.67%
svg glib gobject c dom cairo mathml pdf library gobject-introspection

lasem's Introduction

What is Lasem ?

Lasem is a C/Gobject based SVG/Mathml renderer. It uses cairo and pango as it's rendering abstraction layer, and then support numerous output formats: xlib, PNG, SVG, PDF, PS, EPS...

The API tries to follow the SVG and MathML DOM.

It currently includes two simple applications:

lasem-render, which takes a filename as argument and generates either a SVG, a PDF or a PS file, depending on the output file extension. There's a debug mode option (-d) that displays the bounding boxes of elements as blue rectangles, the logical extents of text as red boxes and the ink extents of text as green boxes. It accepts either MathML, Latex maths and SVG input. For the latex input, lasemrender uses the embedded itex2mml library for the conversion to MathML.

lsm-test, which, if launched without argument, renders recursively all svg and mml files in a directory, and generate an html file which displays the browser rendering, lasem rendering, and if present the reference output. The html filename is lasemtest.xml. It's main use is the rendering of the sample files in the samples directory, by invoking "cd test && ./lsm-test data".

Documentation

The latest documentation is available here.

The Lasem test suite is rendered in a single page here. The first column is the Lasem rendering, the middle one the reference rendering and the last one the rendering of your browser.

Installing Lasem

Lasem uses the meson build system ( http://mesonbuild.com/ ). After you have downloaded the latest release from https://github.com/LasemProject/lasem/releases, you can build and install Lasem like any other meson project:

meson build
cd build
ninja
ninja install

The build can be configured at any time using meson configure in the build directory. meson configure invoked without any other argument will show the configuration options.

On some platforms (like Ubuntu), you may have to configure the dynamic linker (ld) to let it know where the aravis libraries are installed, and run ldconfig as root in order to update ld cache.

Requirements

gobject, glib, gio, gdk-pixbuf, gdk, cairo, pangocairo, libxml, bison, flex

For the runtime, the following ttf fonts should be installed: cmr10, cmmi10, cmex10 and cmsy10. They are provided by the lyx-fonts package in fedora, and the fonts-lyx package in debian/ubuntu.

lasem's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lasem's Issues

Cloning the repository on case-insensitive file systems

Cloning the repository on macOS gives the following warning:

warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'tests/data/mathml/testsuite/Presentation/TablesAndMatrices/mtable/mtableAalign3.png'
  'tests/data/mathml/testsuite/Presentation/TablesAndMatrices/mtable/mtableaalign3.png'

and one of the two files overwrites the other.

Why lasem using pdfTex, then running lsm-test?

At the output of the test I get three files: t-out.png, t.png t.xml.
The t-out.png:
t-out
And t.png:
t
Did I understand correctly - pdfTex is used to generate t.png?
Shouldn't lasem do this itself?

Merging changes from mjakeman/lasem

Hi,

I've been maintaining my own fork of Lasem under the assumption that upstream development had stopped (see: mjakeman/lasem#23).

It has a few additional features/changes on top of this repo:

  • An independent port to meson (not as robust as the one here)
  • CI Pipeline
  • Demo application integrating lasem into gtk4
  • Flatpak manifest for one-click building the demo with gnome-builder
  • Documentation using gi-docgen (hosted at https://www.mattjakeman.com/lasem)

Would you be open to integrating some of the above changes? I'd like to discontinue my fork and converge around this one if you are agreeable.

Thanks! :)

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.