On 2010-03-11, John K wrote:

>> I think you need to define an input format and a .py -> .pdf converter which
>> runs the python interpreter on your file.

This is an alternative way to the "external inset".

...

>> Try the way I described above: defining the file format and converter
>> under the menu : Tools> Preferences...> File Handling.

> I can define a new Python file format, but strangely, no matter what I
> do the "Add" button in the converters section is greyed out. I can only
> create the converter by editing and saving over an existing converter
> in the list.

The UI is somewhat strange in this area. You can modify an existing
converter + its input/output formats and it will be saved as a new
converter.

Consider a name more specific than Python as input format description,
as there could be also Python scripts requiring other processing or
resulting in a different output format.

>> Once you have that I believe it will work. In fact once you have that
>> you could simply use the graphics inset in the usual way to insert
>> your .py file, that is, no need for an external material template.

> Makes sense, but then what are the external material templates actually
> meant to be used for?

There is external material that does not fit in the converter tool
paradiga. Also, with 'external inset' you can specify parameters in the
LyX document. If these are not needed, defining a Converter is simpler
and enables a preview.

Günter

Reply via email to