Edit Links |
LyX /
Lhs2LyX
<< | Page list | >>
This page describes how one can include literate Haskell files ( Before starting, make sure lhs2TeX is installed on your system. The easiest way to do this is by executing Create a lhs2TeX Open your LyX settings window and go to File Handling -> File Formats. Add a new format called LHS with " Finally, add a new template to your Template LHS GuiName "LHS: $$AbsOrRelPathParent$$Basename" HelpText Including Literate Haskell HelpTextEnd InputFormat lhs FileFilter "*.lhs" AutomaticProduction true Format LaTeX Product "\\input{$$AbsOrRelPathMaster$$Basename.tex}" UpdateFormat pdflatex UpdateResult "$$AbsPath$$Basename.tex" ReferencedFile lhs "$$AbsPath$$Basename.tex" FormatEnd Format PDFLaTeX Product "\\input{$$AbsOrRelPathMaster$$Basename.tex}" UpdateFormat pdflatex UpdateResult "$$AbsPath$$Basename.tex" ReferencedFile lhs "$$AbsPath$$Basename.tex" FormatEnd Format Ascii Product "\\input{$$AbsOrRelPathMaster$$Basename.tex}" UpdateFormat pdflatex UpdateResult "$$AbsPath$$Basename.tex" ReferencedFile lhs "$$AbsPath$$Basename.tex" FormatEnd Format DocBook Product "\\input{$$AbsOrRelPathMaster$$Basename.tex}" UpdateFormat pdflatex UpdateResult "$$AbsPath$$Basename.tex" ReferencedFile lhs "$$AbsPath$$Basename.tex" FormatEnd TemplateEnd That's it! You might need to restart LyX first. You can add Happy Haskelling! |