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

From: Robert Gieseke <rob.g.att.web.de>
Date: Wed, 08 Jan 2014 11:15:40 +0100

Hi Olivier,

Am 1/5/14, 10:48 PM, schrieb Olivier Guibé:
>>> - master file, tex engine : more difficult, it is possible to mimic
>>> Texworks
>>> 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
> http://www.texdev.net/2011/03/24/texworks-magic-comments/
> 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.

It would be possible to parse the variables (of either style) but I
would probably rather change the compilation process.

In your LaTeX module:

textadept.run.compile_commands.tex = ''

And a short cut to set the master file, e.g.:
f4 = function()
     if textadept.run.compile_commands.tex == '' then
       textadept.run.compile_commands.tex =
         'pdflatex "'..buffer.filename..'"'
       ui.statusbar_text = 'Master file is '..buffer.filename
     end
   end,

Then you can use the default compile short cut from the included file.

> 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.
[…]

Thanks for the links, I'll have a look …

Cheers,
Robert

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 08 Jan 2014 - 05:15:40 EST

This archive was generated by hypermail 2.2.0 : Wed 08 Jan 2014 - 06:44:40 EST