On 10/25/2010 08:28 AM, Jurriën Stutterheim wrote:
Ah, nice! There we go.. it's appearing in the list now.
Strange side-effect: all stock templates are now gone from the list. (not that
I really care.. I don't use them)
You would need to copy the original templates file over and then add yours.
My document still compiles, however, I can't see my Haskell code in the output,
even when compiling to LaTeX, using pdflatex.
How does it know it should use the settings from the LHS converter I added? See
screenshots I link below for my current settings. Is my template actually
correct?
Converters: http://cl.ly/3198899be981beaa633f
File Formats: http://cl.ly/5574480e9555ba16dd57
Unfortunately, I do not actually know anything about templates. I'd try
posting the question to the devel list, where there are some people who
do. Also, if you can do this, you might try running LyX from a terminal
and then checking to see if you get any error messages related to the
template.
Also, you might have a look at the LaTeX source LyX is producing
(View>Source), and see if you are at least getting the \input line.
Richard
On 25 Oct, 2010, at 14:10 , Richard Heck wrote:
On 10/25/2010 07:55 AM, Jurriën Stutterheim wrote:
It turns out the external_templates file was hidden away in LyX.app itself. In
it, it suggests the following:
# Feel free to create your own External Templates, storing them in
# .lyx/external_templates
So I created ~/.lyx/external_templates and added this content:
Template LHS
GuiName "LHS: $$AbsOrRelPathParent$$Basename"
HelpText
Including Literate Haskell
HelpTextEnd
InputFormat lhs
FileFilter "*.lhs"
AutomaticProduction true
Format LHS
Product "\\input{$$AbsOrRelPathMaster$$Basename.tex_t}"
UpdateFormat lhs
UpdateResult "$$AbsPath$$Basename.tex"
ReferencedFile lhs "$$AbsPath$$Basename.tex"
FormatEnd
TemplateEnd
Next, I reconfigured LyX and restarted it.
Unfortunately, it still doesn't show my template.
Have I misplaced the external_templates file?
The location is wrong for Mac. I think it's something like ~/Application
Support/LyX 1.6/external_templates. If you find your lyxrc.defaults file, then
that is the right directory.
rh