octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Latex interpreter via Mathjax + Qt


From: Pantxo
Subject: Re: Latex interpreter via Mathjax + Qt
Date: Tue, 12 Jan 2016 01:29:33 -0800 (PST)

George Apostolopoulos wrote
> Dear Octave maintainers,
>  
> I am considering the implementation of the "latex interpreter"
> functionality in octave based on a combination of Qt+Mathjax.
>  
> The idea is from this post
> https://forum.qt.io/topic/36457/qtmathjax-beautiful-math-typesetting-in-
> qt-apps.
>  
> Please let me know your oppinion if such an approach would be feasible
> and desirable.
>  
> Best regards
> George
> 
> ____________________________________________
> Dr. Georgios Apostolopoulos
> Fusion Technology Group               
> INRASTES / NCSR "Demokritos"
> 15310 Agia Paraskevi Attikis, 
> Greece           
>  
> tel:   +30-210-650-3731 / 3749 (lab)
> fax:   +30-210-654-5496
> email: 

> address@hidden

> web:   http://ipta.demokritos.gr/ftg/

Hi Georgios,

AFAICS the library you mention makes use of the svg ouput of Mathjax so lets
assume you'll end up having to deal with svg paths (*not characters
anymore*, see [1]). 

The Qt toolkit is mostly a container for an opengl scene, *not* a QPainter
that would have the hability to handle directly the svg output of Mathjax.
For text rendering we currently use two approaches:
* on-screen: we build text strings using our own tex parser and freetype and
we render them as pixmaps to include them in the opengl scene.
* printing: we use the very basic text capabilities of gl2ps.

Turning the svg to pixels for on-screen rendering of latex strings would
probably do the trick. Now for printing we would have to make svg our
primary output format (instead of eps), include Mathjax svg output directly
into the output file using gl2psSpecial, convert to eps using e.g. librsvg
and then use our current tool chain to convert to the desired format.
The major drawbacks in the above approach is that you'll end up with *non
selectable* text strings in e.g. pdf printout (characters are now paths) and
we would need to add a conversion step. The advantage is that we don't need
to to have latex installed to have latex typesetting in our printout
contrary to what has been tried in a GSOC a few years ago.

This is my two cents.

Pantxo 

[1] https://github.com/nathancarter/qtmathjax/blob/master/screenshot.png




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Latex-interpreter-via-Mathjax-Qt-tp4674346p4674359.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]