On 10/25/2010 04:32 AM, Jurriën Stutterheim wrote:
Hmm... I just figured out I might be able to do this using Templates. However,
I can't seem to be able to make my custom template appear in the list of
Templates in the Insert External Material dialog. Where do I place my newly
created template?
I'm using LyX 2.0 alpha 6 on Mac OS X 10.6.4.
I'm not sure about this, but I think what you should do is copy the file
lib/external_templates from LyX's system directory to your local user
directory, then add your template to the local version. This is not the
most flexible system, to be sure.
Richard
Cheers,
- Jurriën
On 25 Oct, 2010, at 09:57 , Jurriën Stutterheim wrote:
Hi all,
I'm trying to streamline the inclusion of Haskell code in my documents.
Currently, I use the lhs2TeX tool to convert my .lhs (Literate Haskell) file to
.tex, which I can then include in LyX using the regular include mechanism.
Ideally, however, I would just include my .lhs file in LyX and have a converter
execute the lhs2TeX step for me. It might be useful to note that lhs2TeX can
both write to a file and output the produced LaTeX code to stdout.
Is this possible?
I added a File Format in the LyX File Formats settings dialog with extension
lhs and Default Output Format LaTeX (pdflatex). I marked it as Document format.
Next, I added a converter from Literate Haskell to LaTeX (pdflatex). The
converter command is lhs2TeX $$i -o $$o . This command makes lhs2TeX convert
the input $$i to LaTeX and write the results to file $$o .
Unfortunately, it doesn't really do anything useful yet. How can I make this
converter work?
Thanks!
- Jurriën