Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to know what LuaTeX offers in terms of graphics: I'm mostly interested in pstricks and tikz/pgfplots. Could it help tikz to run faster? Would it help tikz to handle 3D non-parallel figures? (which is not available yet and is CPU consuming). What could it bring to the pstricks package users?

share|improve this question
2  
Are you offering to write the necessary code :-) –  Joseph Wright Jan 8 '11 at 19:32
    
not really :) I'm super bad at coding anything. I'm just foreseeing interesting coming possibilities. If I can be of any help, I'll be happy though. –  pluton Jan 8 '11 at 19:42
    
Apart from PSTricks and TikZ, there are other solutions for graphics: metapost, which is in active development and part of LuaTeX/ConTeXt, and Asymptote, which is very good at 3D graphics. –  Philipp Jan 8 '11 at 21:23
    
yes about metapost. I'm not a big fan of asymptote. A luametapost could be nice as well :) –  pluton Jan 8 '11 at 21:25
    
@Philipp: Metapost is in active development? Who does it? –  Herbert Jan 27 '11 at 8:55

2 Answers 2

up vote 5 down vote accepted

In principle, LuaTeX offers more flexibility, and in particular more speed, for Tikz, pgfplots, etc. This is because the work (especially floating-point maths) is going to be much easier to do in Lua than in TeX. On the other hand, PStricks uses the PostScript language for the hard work, and it already offers native support for a lot of this work. So there is much less scope for assisting there. (Herbert may have more to say on PStricks, I suspect.)

share|improve this answer
    
A Lua backend for pgf-math would be really useful! –  Caramdir Jan 8 '11 at 19:59
    
@Caramdir. Probably not so hard, as you need to do very little for most of the maths, and it becomes a 'glue job'. I guess it is a question of time. (At some stage, we'll need to think about this for LaTeX3, but at the moment I'd prefer to focus on other issues.) –  Joseph Wright Jan 8 '11 at 20:00
    
@Joseph: can you elaborate on "we'll need to think about this for LaTeX3". Thanks. And yes, that'd be great if Herbert could comment on pstricks and LuaTeX. –  pluton Jan 10 '11 at 16:30
    
@pluton. There are places (for example floating-point work) were it's possible to do stuff with TeX but would be much faster in Lua. So there will be areas where we'll want to have TeX code for pdfTeX and XeTeX, with a Lua alternative 'hidden' within the same LaTeX3 interface. See the l3fp module, where I'd like to implement \fp_div:Nn, etc. in Lua. The idea would be that for packages that do not require LuaTeX there is still a performance benefit without needing to worry about the detail (of course, I have to do that). –  Joseph Wright Jan 10 '11 at 17:01
    
I've done some testing, and it turns out that pgf's non-floating point math functions are faster than Lua's. Of course the Lua functions offer higher precision and a bigger range than any calculations with TeX's dimensions can achieve. –  Caramdir Jan 11 '11 at 1:13

Recently the developer of tkz-euclide, tkz-graphe and some other graphics package has announced on fr.comp.text.tex that he will adapts his code to Lua (now it's gnuplot who does the job to calculate coordinate).

P.S. I would like to do a comment of these «answer», but i haven't enough reputation yet to comment

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.