[texworks] New build system

Reinhard Kotucha reinhard.kotucha at web.de
Sat May 17 00:26:16 CEST 2014


On 2014-05-16 at 14:23:58 +0200, Stefan Löffler wrote:

 > On 2014-05-16 03:54, Atsuhito Kohda wrote:
 > 
 > > I'm afraid it was well know issue but I noticed that Python
 > > plugin was not created with default setting.
 > > I'd like to know if there is any reason for this.
 > 
 > Yes, there is ;). At some point after the Python plugin was first
 > implemented, we were contacted by a guy who told us that the way we
 > use Python is inappropriate, against the python-y way of doing
 > things, and could possibly lead to (severe?) problems with some
 > modules, existing Python installations, etc. (these are no
 > quotations, I'm just writing off the top of my head). I tried to
 > elicit his help or get pointers how I could improve things, but
 > failed. I myself know Python only from a user's side, plus what I
 > read on the internet while developing the plugin, but I'm not a
 > real python developer, so I don't know about all the intricacies of
 > "the python way".  In addition, at the time, I didn't know about
 > any Python scripts for Tw (other than some rudimentary test
 > scripts). In fact, most of the scripts were written in QtScript
 > (which, admittedly, is the most portable as it doesn't require any
 > plugins). Besides that, a few lua scripts were sticking around. But
 > nothing python'y.

Hi Stefan,
though I was the one who suggested to embed Lua as a scripting
language (I asked Jonathan at TUG-2008), I'm wondering now whether it
makes sense at all to support anything but QtScript.

It's not sufficient to make internal functions accessible to scripting
languages, everything has to be documented too.  And providing
documentation often takes more time than programming.

Stefan, nobody can expect that you do everything yourself.  In this
sense I think it's better to concentrate on QtScript only.  Everything
else can be done by volunteers if desired.  But even if a volunteer
adds bindings for another language, what happens if he provides some
code and disappears?  Are you willing to maintain his stuff?  Someone
provided code for TIFF support in pdfTeX because he needed it himself.
It was incomplete but sufficient for his project.  He was not willing
or had no time to finish the TIFF stuff, hence it had to be removed
from pdfTeX.  Painful for people who relied on it.

What in my opinoin is more interesting is to enable scripts to modify
the pull-down menu which is still hard-coded.  Consider the thread
"Suggestions for the next TeXworks version".

You can write a script which calls latexmk but you have to to run the
script from the "Scripts" menu.

It would be much more intuitive if latexmk can be invoked from the
"Typeset" menu.  This menu can be considered as an associative list
which maps engine names to command-line strings.  If this list would
be exposed to the scripting engine, all one has to do is to add
latexmk to the list.  In Lua parlance it's a simple "table.insert()".

I'm not familiar with C and I don't know how difficult it is to make
the main menues accessible to QtScript, but my stomach tells me that
supporting three scripting languanges at the same time is painful.

I must admit that I'm not aware of any program which supports many
scripting languages.  Even though vi would benefit a lot from a
built-in Emacs Lisp engine. :)

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------




More information about the texworks mailing list