[texworks] Using Lua Extension - to get LaTeX package help

Stefan Löffler st.loeffler at gmail.com
Sat Sep 19 09:26:40 CEST 2009


Hi Paul,

On 2009-09-19 05:03, Paul A Norman wrote:
> You can use a simple Lua script, if you are using MiTeX (and simply
> alter it for other distributions),
> to get LaTeX package help from within Stefan's experimental Lua
> TeXWorks editor version.
> (substitute "mthelp"  for your distribution's package help call.

This really is exciting news, thanks for sharing. For TeXlive, the
program you have to substitute for "mthelp" seems to be "texdoc", though
I'm not an expert in this.

> We should be careful to only highlight a non-system-destructive
> package name! So far as I know no CTAN LaTeX package names are
> synonymous with OS commnds that are dangerous are they?

Still, I'd recommend to enclose the package name in quotation marks. I'm
not sure if mthelp supports that, but it should. This should at least
handle spaces in the name (which shouldn't happen in the first place,
but you never know what gets accidentally selected ;)). In addition to
that, special characters should probably be escaped (I know that $ is
such a character on Linux, and quotation marks, too, of course, if the
string is surrounded by them). But these are details that should not be
too difficult to implement with simple string replace functions.

Cheers
Stefan


More information about the texworks mailing list