better start up for tex lhs modules

  • Jonathan Gallagher

    I don't know a lot about eclipse, cohatoe, or rcp development, but I want to perturb the functionality of EclipseFP slightly.  I have done 1 eclipse rcp project, but there was no language definition.  I want that when I say new module > lhs > tex style, that it puts the \documentclass{} stuff and the appropriate %include xxxstyle.sty stuff.  and places an begin and end documents, so that when I am done writing code I can run lhs2TeX directly.  Optimally, I would like to include a button so that I can push it, and then have eclipse call my lhs2TeX program, so that then, I can import the .tex file in with TeXclipse, and compile and pdf the file from there.

    How hard would this be to do?  How would I actually go about doing that?

    • Leif Frenzel

      Leif Frenzel - 2008-12-07

      Hi Jonathan,

      you could run lhs2tex automatically as an external tool: menu 'Run' > 'External Tools' > 'External Tools Configs', then select 'Program' and press 'New' (the little document icon on the top left). You can then configure executable and workdir for the tool. Since lhs2tex runs outside Eclipse, you should make sure on the Refresh tab that the project is refreshed after the run. If you do this on a project property page (select project > 'Properties' > 'Builders'), you could also have it run automatically on any file change, if you want that.

      The code generation happens in the net.sf.eclipsefp.haskell.core plugin, in net.sf.eclipsefp.haskell.core.internal.code.CodeGenerator.

      Thanks && ciao,


Log in to post a comment.