Okay... I looked at the code and figured out that there are additional $$ macros (in Converter.cpp) that are not documented.
So I fixed the documentation (patch attached) and I now have a perfectly working solution for using LyX and noweb for literate programming. Please apply my patch and we can just close ticket 5444. Note that the Customization.lyx file had Change Tracking enabled, so I left it on. Someone will have to accept the changes after applying this patch. Thanks! On Sun, Sep 23, 2012 at 1:40 PM, Kayvan Sylvan <[email protected]>wrote: > I'm running LyX 2.1.0 SVN on Fedora 17 > > Looking at http://www.lyx.org/trac/ticket/5444 ("noweb build-program > process broken"), I'm trying to figure out where the Copier is supposed to > be executed. > > I had a different idea about how to handle the issue: > > What if when the build-program external script is run, LyX sets an > environment variable to the original directory of the file that is being > edited. > > For example, I edit /home/kayvan/src/xyz/foo.lyx and when I execute > build-program, LyX would setenv LYX_FILE_DIR to "/home/kayvan/src/xyz" and > execute "build-script". > This would allow the code in the build-script scrap to output the files it > tangles to $LYX_FILE_DIR (and the temporary directory that LyX uses > wouldn't matter). > > Alternately, we can add another special macro to the following list (from > the Customization manual section on Copiers): > > $$s The LyX system directory (e. g. /usr/share/lyx). > $$i The input file > $$o The output file > $$l The `LaTeX name' > > $$d The original directory for the LyX file being edited. > > This would then allow us to run the build-script with two arguments: $$i > and $$d and the build-script scrap can handle putting the files in the > right directory without needing to run a Converter. > > What do you all think? > > If I want to make this work, which files do I need to change? > > Thanks! > > ---Kayvan > > >
DOC-DIFFS.patch
Description: Binary data
