On Tuesday 18 February 2003 6:11 pm, Christian Ridderström wrote: > Right now (AFAIK), the margins can be set using the GUI, or as I did, with > latex in the preamble. Assuming that there is an LFUN for setting the > margins (I looked briefly in commandtags.h, but I didn'f find one), how > would this be called?
We would export a string through the lyxserver pipe.out to outer space. Ie, your program/script. This string would contain the contents of bufferparams::write (which doesn't exist at the moment.) You would modify the contents of this string as you choose and send it back to the waiting pipe.in. If the LyX kernel classifies the contents as valid, it applies you changes. Because this bufferparams::write method is also used to output the LyX file, its contents are automatically documented. No weird and wonderful 'extra' format to unscramble. Moreover, as the LyX format changes, we automatically 'keep up', so outsiders retain the ability to modify anything and everything. > Hmm... I guess a script with instructions in some kind of "lyx"-langugage, > could be sent to the core. However, you would still manually have to start > this script... whereas you'd like this done at compile time. > > ... what I want to preserve is the possibility to let some kind of > script, or program, control settings and what is actually output > -- as opposed to manually doing it. > > Actually, I must have been thinking about preserving the possibility to > change appearance and content "programatically", i.e. using some kind of > script or program. > > Furthermore, if I think of the preamble as a place where you put source > code that is executed whenever you compile the document, I realize that > what I'd like from lyx is really 'callback' functionality! > > Conclusion: I'd like lyx to be able to make lyx call other programs > (or include 'source') when compiling the document. Ideas without code are just ideas ;-) (Seriously, there's about 6 people who do more than tinker at the edges and all 6 have outside commitments too. Some of them even have a life.) Angus