[texworks] Lua scripting

Reinhard Kotucha reinhard.kotucha at web.de
Mon Jun 15 22:39:23 CEST 2009

On 15 June 2009 Jérome Laurens wrote:

 > Le 14 juin 09 à 23:45, Reinhard Kotucha a écrit :
 > > On 14 June 2009 Jérome Laurens wrote:
 > >
 > >> Things are not that simple.
 > >>
 > >> TeXWorks natural audience is the beginner in TeX, and most probably  
 > >> in
 > >> scripting too. [...]
 > >
 > > I never had in mind that users should be bothered with scripting at
 > > all.  They should neither be forced nor encouraged to write their own
 > > scripts or to install arbitrary scripts they find in the internet.
 > [...]
 > This point of view is definitely valuable, and one can add that the  
 > users should not be bothered with the underlying xetex, luatex,  
 > pdftex, latex, context neither.
 > In fact, there are 2 different approaches
 > 1) TeXWorks lowers the barrier to entry and nothing else
 > 2) TeXWorks also adapts to the user need
 > This discussion about scripting (and indirectly plugins) is related to  
 > point 2.
 > If we restrict ourselves to point 1, then there is nothing to add.
 > My opinion is that we should have (in a longer term) TeXWorks for  
 > point 1 and TeXWorks pro for point 2.
 > Both should have exactly the same underlying code (with very few
 > branching points), but the first one would have a very simple user
 > interface (no scripting for example).  When people feel limited
 > with TeXWorks, they just "switch" to TeXWorks pro.

Hmm, I suggested Lua because a lot of features needed by beginners
could better be written in Lua.  What I have in mind is a
log-analyzer, interfaces to texdoc and to Robin's FAQ, for example.

With a Lua engine and a reasonable interface things could be done
easier and faster.  It's easier to contribute code because you don't
have to compile the binary if you add a new feature.  You also don't
have to worry so much about platform dependencies if you provide Lua
code.  And it's less dangerous because if your script doesn't work, it
can simply be removed, without changing the binary.

The idea is to have a program which can be extended easily without
changing the program itself.  For instance, a C compiler provides only
the absolutely necessary functionality, everything else comes from
external libraries.  TeX, the program, only provides the primitives
which are absolutely necessary, everything else comes from macro
packages.  There are many other examples.  It's easier and much safer
if you don't have to change the binary in order to add new features.

But why do you think that the presence of a scripting language makes
TeXworks more difficult to use?  As I said, I regard this as something
internal, not as something the user should be aware of.

So, I don't think that it's very useful to have two versions.  If the
version for beginners doesn't contain a Lua engine, then all the
functions a beginner needs have to be written in C.  And exactly this
is what I'd like to avoid in order to make things easier for volunteers.

And, in my opinion, we don't need an extra version for experts.  The
difference between a beginner and an expert is that the expert knows
more keyboard shortcuts.

Maybe we don't have to think too much about those things, I think that
it's best if Stefan simply proceeds and ignores this discussion.


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