Dir Lyx-users and developers,

I get always errors, please help me.
I want to use the  EXTERNAL TEMPLATE function.
I just want to copy a text file to lyx temp dir, so that  I can use that
file containing data to plot a function with pgfplots. there is no need
to convert anything, just copy.

In the document, I want to have the code:
file{myfile.txt};
maybe a relative path from the lyx file like this:
file{textfiles\myfile.txt};

I have tryed this:


Template file(PgfPlots)
    GuiName "file{myFName}"
    HelpText
        file input for pgfplots
    HelpTextEnd
    InputFormat txt
    FileFilter "*.txt"
    AutomaticProduction true
   Format PDFLaTeX
        Product "file{$$Basename.txt};"
        UpdateFormat pdf
        UpdateResult "$$Basename.txt"
        Requirement "pgfplots"
    FormatEnd
TemplateEnd


In the Lyx document I then have this

ERT:
    \begin{tikzpicture}
    \begin{axis}[
    \addplot
 file{myfile.txt};   %Here I then use the external template input
ERT:
\end{axis}
\end{tikzpicture}


my problem is... I do not understand the documentation, so would you
please help me?
another question.. is there a difference between the lyx versions from
1.6 to 2.0?
I'm using windows at the moment.
and I'm bad english speaking german user :-)
Thanks for any help!

Reply via email to