[Geany-devel] Manipulating build system from plugin

Lex Trotman elextr at xxxxx
Sat Nov 7 00:24:48 UTC 2009


Hi Frank,

Yes, I think the build system can do what you want.

With the new build system project files can contain filetype dependent
commands that are defined only when the project is open.

So:

1. the collection of latex files making the document should have a
project file associated with them (maybe in the same directory as
main.tex)

2. An extra filetype dependent command is defined in the project file
that compiles main.tex (remember that by default you have 3 filetype
dependent commands and can increase it if needed)

3. that command can be named something like "Compile Book"

Then when you open the project you will get this extra command.

The problem at the moment is that there is no GUI to edit this, (see
the long discussion with Enrico in another thread re the configuration
GUI).  I am re-working the GUI at the moment but some of that "life"
stuff that is causing Enrico so many problems has got in my way too
:-).  I hope to be able to do some work on it this weekend.

In the interim you can hand edit the project file:

add a [build-menu] section (or use the existing one if its already there)
add a line (or add LaTeX to the existing line if its present):

filetypes=LaTeX;

add:

LaTeXFT_02_LB=Compile Book
LaTeXFT_02_CM=pdflatex main.tex
LaTeXFT_02_WD=

For the moment I recommend not accessing the build system from a
plugin since its plugin API is likely to change, (see discussions with
Nick).

Any problems let me know as I suspect this has not been used anywhere
other than my testing, so far.


Cheers
Lex

2009/11/7  <frank at frank.uvena.de>:
> Hi Lex,
>
> I'm in discussion inside a feature request and I'm wondering whether you
> see any chance doing this on Geany's current build system:
> https://sourceforge.net/tracker/index.php?func=detail&aid=2893464&group_id=222729&atid=1056535
>
> Goal would be to react on some open tex file and set the build command
> properly. Let's make an example:
> chapter1.tex is part of a book which contains of many files, where the
> main file is main.tex. Now if you have chapter1.tex open and push compile,
> it might won't compile as the header might is missing. On emacs and vi and
> ... you can define for this some local variable which is setting the master
> file which is compiled instead. So something like %master: main.tex will
> case the build command to run pdflatex main.tex whenever called from
> chapter.tex.
>
> From best knowledge, I don't see any way to build this in a clear way. But
> maybe I'm missing something. So I'm asking you ;)
>
> Cheers,
> Frank
>



More information about the Devel mailing list