Re: [code] [textadept] open file and latex lexer

From: Olivier Guibé <>
Date: Sun, 5 Jan 2014 22:48:19 +0100

Hi Robert

Thanks for your comments.

>You probably already know this, so just in case, you can have
>language-specific short cuts without keychains as well, e.g.
>keys.latex.c1 = function() … -- ctrl-1
>keys.latex.f7 = function() … -- F7
Yes. Because I have a azerty-french keyboard,
the first thing was to modify your modules/latex/init.lua to
     [string.char(178)] = function()
in _G.keys.latex

I will add classical \alpha, etc..

>>- add another snippet : I can do it
>>- master file, tex engine : more difficult, it is possible to mimic
>>or auctex variables.
>Could you describe how that works in more detail? Do you mean
>compiling the main file, when working on an included sub-file?
Yes, a main document with different \include. Editing a sub-file
and compiling it should compile the main file. Different solutions
1) special comment in the sub-files like Texworks
or auctex with emacs-variables.
An editor command allows to specify main-document and adds the special comment
2) a extern file
>One way to do this could be to have a short-cut that changed the
>LaTeX compile command to compile the current file.
There are 4 (or more) Tex-engines : tex, pdftex, xetex, luatex (in beta)
The last one includes lua as an embedding language !
I will not detail the differences, mainly differences are output (dvi, pdf),
encoding, font (pfb, opentype), right-to-left language.

As master file, tex-engine should be set by an option.

>>- pdf viewer with forward/backward synctex synchronisation
>> : more difficult, but python scripts exist for evince / synctex
>> or using okular
>I looked into SyncTeX a while ago and on Linux it might even be
>possible to have both ways work as you can "send" Lua commands to
>Textadept. Do you have a link to the Python scripts?
Okular supports synctex through the command "okular options"
so that no script is needed for forward sync. For backward, it is
the same, a configuration of okular allows to specify the editor
for synctex backward sync.

Evince supports synctex through dbus. It seems that the first plugin
was written for gedit and then adapted to another editor. Emacs has a dbus
support so that auctex does not use the python-synctex scripts.
You can find forward/backward python for atp-vim
here for sublime-text

As soon as you have a well support of master file and synctex flag
compilation, okular should be easier to implement than evince.

Outside linux, I just know that skim under MacOs and sumatra under Win
are ok.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sun 05 Jan 2014 - 16:48:19 EST

This archive was generated by hypermail 2.2.0 : Mon 06 Jan 2014 - 06:43:10 EST