in reply to Hacking a source filter into the #! line
#LyX 2.1 created this file. For more info see http://www.lyx.org/ \lyxformat, 474, \begin_document, \begin_header, \textclass, article, \begin_preamble, %ignore; use yX;
Notice the commas after every element? Those make it possible for perl to parse this document down to the "use yX", at which point the source filter can take over.
Unfortunately, I cannot find a way to override how LyX writes the contents of its files. Everything seems to boil down to calling the Buffer class's save method, which does not provide any runtime-modifiable hooks.
Perhaps I should take a different approach: defining a "Run Perl Source" output format. :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hacking a source filter into the #! line
by dcmertens (Scribe) on Jul 26, 2014 at 11:19 UTC |