[texworks] Lua Extension - put into Sentance Case, Trim, Date Time, lowercase, uppercase

Paul A Norman paul at paulanorman.com
Mon Sep 7 01:32:44 CEST 2009


Dear Steffan,

Thanks for that.

I come from more a Delphi (Turbo Pascal) background so please excuse
anything I say as not working from a purely C workspace.

The incorporation of a scripting language is a stroke of genius, so many
distributed editors do not do that or in Win32/64 were just plugging VBA
in.

In Delphi we can extend an application's functionality using a PHP
extension which opens up all the libraries and code of PHP
(http://users.telenet.be/ws36637/php4delphi.html) this plugs into the PHP
Zend C API - you can think what I am going to ask here, can TW being a C
written application better do this as well as LUA? Or could LUA be asked
to handle this for TW? - its just that there is such a wealth of string
libraries and other  platform independant libaries already available under
PHP.

I think I suggested privately to Alain (again form my Delphi background)
that the Scripts (LUA) names be utilised to show where they should go on
the Scripts menu and auto-generated sub-menus.

I was thinking that the Scripts will be more important than many realise
at first, in that they will provide a lot of stringhandling utilties, and
placement of custom tags (custom LaTeX commands) so they will probably
increase in number for many users, very quickly.

This made me think from previous experiences that the Script menu would
become over-full and cumbersome very quickly.

As (in Delphi) I am used to being able to make new sub-menus and menu
items dynamiacally at run time, I wondered whether this was possible with
TW as well?
Thinking that the LUA script name could place it on the menu tree, and
call for the making of new sub-menu(s) as needed.

I.e. lua script name:  Insert-LaTeX_Pictures_Righthand-Logos.lua

- for space
 _ for new Sub menu

Would go on Menu Scripts/Insert LateX/Pictures/Righthand Logos

It would be a great help to us users!

Paul

On Sun, September 6, 2009 8:12 pm, Stefan Löffler wrote:
> Hi,
>
> On 2009-09-02 11:44, GMAIL wrote:
>>
>> message from TeXworks user
>>
>> I am very new to Lua as no doubt the following will confirm, but I
>> have been able to hobble this together from the Tutorials and chm help
>> and other Lua Wiki resources.
>>
>> Share it in case it inspires any one else...
>>
>
> Thanks for putting the time into this and for sharing. I haven't tested
> it intensively, but the first impression is great. It's good to see
> people testing the new (experimental) features of TeXworks.
>
>> (Also wondering, does TW object expose any more properties or methods
>> please?
>>
>
> Yes, that's definitely planned. So far, the Lua implementation is very
> experimental and basically just a prove of concept. After the first
> official release, we'll brainstorm new development plans for Tw, and Lua
> will certainly be in there. Then we'll probably also be drafting a
> reasonable API with more properties, methods, etc. so that it gets
> really usable. The methods provided so far are only quick hacks to show
> that it can be done (as you proved with your scripts ;)).
>
> Stefan
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: user_Lua_Menu.png
Type: image/x-png
Size: 10654 bytes
Desc: not available
URL: <http://tug.org/pipermail/texworks/attachments/20090907/8f9efacf/attachment.bin>


More information about the texworks mailing list