1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/examples/Modules/
10 % This relaxes the noweb constraint that chunks are
11 % never broken across pages.
13 % This is from the noweb FAQ
15 \def\nwendcode{\endtrivlist \endgroup}
16 \let\nwdocspar=\smallbreak
18 \use_default_options false
22 \maintain_unincluded_children no
24 \language_package default
27 \font_roman "lmodern" "default"
28 \font_sans "default" "default"
29 \font_typewriter "default" "default"
30 \font_math "auto" "auto"
31 \font_default_family default
32 \use_non_tex_fonts false
35 \font_typewriter_osf false
37 \font_sf_scale 100 100
38 \font_tt_scale 100 100
40 \use_dash_ligatures false
42 \default_output_format default
44 \bibtex_command default
45 \index_command default
46 \paperfontsize default
51 \use_package amsmath 1
52 \use_package amssymb 1
55 \use_package mathdots 1
56 \use_package mathtools 1
58 \use_package stackrel 1
59 \use_package stmaryrd 1
60 \use_package undertilde 1
62 \cite_engine_type default
66 \paperorientation portrait
78 \paragraph_separation indent
79 \paragraph_indentation default
81 \math_numbering_side default
86 \paperpagestyle default
87 \tracking_changes false
88 \postpone_fragile_content false
105 Sylvan <kayvan@sylvan.com>
112 \begin_layout Abstract
113 This document describes and implements a perl script for importing noweb
114 files into \SpecialChar LyX
118 \begin_layout Standard
119 \begin_inset CommandInset toc
120 LatexCommand tableofcontents
127 \begin_layout Standard
128 \begin_inset Newpage newpage
134 \begin_layout Section
138 \begin_layout Standard
139 Since version 1.0.1, \SpecialChar LyX
140 now supports Literate Programming using
145 This addition to \SpecialChar LyX
146 made it very pleasant to write programs in the literate
147 style (like this one).
148 In addition to being able to write new literate programs, it would be quite
153 code could be imported into \SpecialChar LyX
155 That's where this program comes in.
158 \begin_layout Standard
167 file to \SpecialChar LyX
171 \begin_layout Standard
172 \begin_inset Flex Chunk
175 \begin_layout Plain Layout
177 \begin_inset Argument 1
180 \begin_layout Plain Layout
190 \begin_layout Plain Layout
195 \begin_layout Plain Layout
197 # Copyright (C) 1999 Kayvan A.
198 Sylvan <kayvan@sylvan.com>
201 \begin_layout Plain Layout
203 # You are free to use and modify this code under the terms of
206 \begin_layout Plain Layout
208 # the GNU General Public Licence version 2 or later.
211 \begin_layout Plain Layout
216 \begin_layout Plain Layout
218 # Written with assistance from:
221 \begin_layout Plain Layout
223 # Edmar Wienskoski Jr.
224 <edmar-w-jr@technologist.com>
227 \begin_layout Plain Layout
229 # Amir Karger <karger@post.harvard.edu>
232 \begin_layout Plain Layout
237 \begin_layout Plain Layout
239 # $Id: noweb2lyx.lyx,v 1.5 2005/07/18 09:42:27 jamatos Exp $
242 \begin_layout Plain Layout
247 \begin_layout Plain Layout
249 # NOTE: This file was automatically generated from noweb2lyx.lyx using noweb.
252 \begin_layout Plain Layout
257 \begin_layout Plain Layout
259 <<Setup variables from user supplied args>>
262 \begin_layout Plain Layout
267 \begin_layout Plain Layout
269 <<Convert noweb to LyX>>
277 \begin_layout Section
278 The Noweb file defined
281 \begin_layout Standard
286 file is a collection of documentation and code chunks.
287 Documentation chunks simply start with an ``@'' and have no name:
290 \begin_layout LyX-Code
291 @ Here is some documentation.
294 \begin_layout Standard
298 \begin_layout Plain Layout
300 We can do arbitrary LaTeX code here.
303 \begin_layout Plain Layout
314 \begin_layout Standard
315 Code chunks look like this:
318 \begin_layout LyX-Code
323 \begin_layout Plain Layout
334 \begin_layout Plain Layout
342 \begin_inset Newline newline
346 code for the chunk goes here ...}
347 \begin_inset Newline newline
353 \begin_layout Standard
354 The ``@'' is a necessary delimiter to end the code chunk.
355 The other form that the ``@'' line takes is as follows:
358 \begin_layout LyX-Code
363 \begin_layout Plain Layout
374 \begin_layout Plain Layout
382 \begin_inset Newline newline
386 code for the chunk ...}
387 \begin_inset Newline newline
390 @ %def identifier1 identifier2
393 \begin_layout Standard
394 In the latter form, we are declaring to
398 that this code chunk defines identifier1, identifier2, etc.
401 \begin_layout Standard
402 When first tackling this problem, I spoke with members of the \SpecialChar LyX
404 knew about the literate programming extensions and re\SpecialChar LyX
405 (the \SpecialChar LaTeX
409 \begin_layout Standard
410 One of the first ideas was to extend the re\SpecialChar LyX
411 code to understand the
416 This proved to be too hard and presents other problems
420 \begin_layout Plain Layout
421 Not the least of these problems is the fact that << is a quote in French.
427 On the other hand, it turns out that re\SpecialChar LyX
428 contains a very useful literal
430 If the input file contains the construct
433 \begin_layout LyX-Code
436 begin{re\SpecialChar LyX
438 \begin_inset Newline newline
444 \begin_inset Newline newline
449 end{re\SpecialChar LyX
453 \begin_layout Standard
454 then re\SpecialChar LyX
455 will copy the surrounded code to the output file verbatim.
456 Given this, the first part of the translation is easy; we simply have to
457 copy the code chunks into an intermediate file that surrounds them with
462 begin{re\SpecialChar LyX
469 end{re\SpecialChar LyX
475 \begin_layout Standard
476 Once re\SpecialChar LyX
477 is done with the input file, the problem is reduced to changing
478 the code chunks from \SpecialChar LyX
479 's \SpecialChar LaTeX
480 layout to the Chunk layout.
483 \begin_layout Standard
484 There is one final constraint on
489 We want to be able to run it as a simple pre-processor and post-processor
490 from within re\SpecialChar LyX
492 We can accomplish this by setting the flags
505 \begin_layout Plain Layout
536 \begin_layout Plain Layout
553 before we reach the main conversion code.
556 \begin_layout Standard
557 With all that preamble out of the way, we now have the basic high-level
558 outline for our code:
561 \begin_layout Standard
562 \begin_inset Flex Chunk
565 \begin_layout Plain Layout
567 \begin_inset Argument 1
570 \begin_layout Plain Layout
572 Convert noweb to \SpecialChar LyX
581 \begin_layout Plain Layout
583 <<Transform noweb for reLyX>>
586 \begin_layout Plain Layout
591 \begin_layout Plain Layout
593 if ((!$pre_only) && (!$post_only)) {
596 \begin_layout Plain Layout
598 <<Run reLyX on intermediate file>>
601 \begin_layout Plain Layout
606 \begin_layout Plain Layout
611 \begin_layout Plain Layout
616 \begin_layout Plain Layout
621 \begin_layout Plain Layout
631 \begin_layout Section
632 Making a file that re\SpecialChar LyX
636 \begin_layout Standard
637 In this section, we present the code that performs the task of creating
638 the intermediate file that re\SpecialChar LyX
639 can process, using the algorithm that we
641 This algorithm is outlined in the code that follows:
644 \begin_layout Standard
645 \begin_inset Flex Chunk
648 \begin_layout Plain Layout
652 \begin_layout Plain Layout
654 <<Transform noweb for reLyX>>=
657 \begin_layout Plain Layout
659 <<Setup INPUT and OUTPUT>>
662 \begin_layout Plain Layout
664 inputline: while(<INPUT>)
667 \begin_layout Plain Layout
672 \begin_layout Plain Layout
684 >=/) { # Beginning of a noweb chunk
687 \begin_layout Plain Layout
689 <<Read in and output the noweb code chunk>>
692 \begin_layout Plain Layout
696 s+(.*)/) { # Beginning of a documentation chunk
699 \begin_layout Plain Layout
701 print OUTPUT $1; # We do not need the ``@'' part
704 \begin_layout Plain Layout
714 ]/) { # noweb quoted code
717 \begin_layout Plain Layout
719 <<Perform special input quoting of [[var]]>>
722 \begin_layout Plain Layout
727 \begin_layout Plain Layout
729 print OUTPUT; # Just let the line pass through
732 \begin_layout Plain Layout
737 \begin_layout Plain Layout
742 \begin_layout Plain Layout
744 <<Close INPUT and OUTPUT>>
752 \begin_layout Standard
753 In the code above, we do some pre-processing of the noweb ``[[...]]'' construct.
754 This avoids some problems with re\SpecialChar LyX
755 confusing lists composed of ``[[...]]''
759 \begin_layout Standard
763 \begin_layout Plain Layout
765 <<Perform special input quoting of [[var]]>>=
768 \begin_layout Plain Layout
779 \begin_layout Plain Layout
784 \begin_layout Plain Layout
794 \begin_layout Standard
808 \begin_layout Plain Layout
825 file, once we have identified a
829 code chunk, we transform it into a form that is usable by re\SpecialChar LyX
833 \begin_layout Standard
834 \begin_inset Flex Chunk
837 \begin_layout Plain Layout
839 \begin_inset Argument 1
842 \begin_layout Plain Layout
844 Read in and output the noweb code chunk
849 <<Save the beginning of the chunk to savedchunk>>
852 \begin_layout Plain Layout
854 <<Concatenate the rest of the chunk>>
857 \begin_layout Plain Layout
859 <<print out the chunk in a reLyXskip block>>
867 \begin_layout Subsection
868 File input and output for the pre-processing step
871 \begin_layout Standard
889 \begin_layout Plain Layout
920 \begin_layout Plain Layout
937 to read and write files.
938 In the code fragment above, we need to read from the input file and write
939 to a file that will be later transformed by re\SpecialChar LyX
941 If we are being called only to pre-process the input file, then there is
942 no need to create a temporary file.
945 \begin_layout Standard
946 \begin_inset Flex Chunk
949 \begin_layout Plain Layout
951 \begin_inset Argument 1
954 \begin_layout Plain Layout
956 Setup INPUT and OUTPUT
964 \begin_layout Plain Layout
966 &setup_files($input_file, $output_file);
969 \begin_layout Plain Layout
974 \begin_layout Plain Layout
976 $relyx_file = "temp$$";
979 \begin_layout Plain Layout
981 &setup_files($input_file, $relyx_file);
984 \begin_layout Plain Layout
994 \begin_layout Standard
995 This code uses a small perl subroutine,
1008 \begin_layout Plain Layout
1024 , which we define below:
1027 \begin_layout Standard
1031 \begin_layout Plain Layout
1036 \begin_layout Plain Layout
1041 \begin_layout Plain Layout
1046 \begin_layout Plain Layout
1048 open(INPUT, "<$in") || die "Cannot read $in: $!
1053 \begin_layout Plain Layout
1055 open(OUTPUT, ">$out") || die "Cannot write $out: $!
1060 \begin_layout Plain Layout
1065 \begin_layout Plain Layout
1075 \begin_layout Subsection
1083 \begin_layout Standard
1084 After we see the beginning of the chunk, we need to read in and save the
1085 rest of the chunk for output.
1088 \begin_layout Standard
1089 \begin_inset Flex Chunk
1092 \begin_layout Plain Layout
1094 \begin_inset Argument 1
1097 \begin_layout Plain Layout
1099 Save the beginning of the chunk to savedchunk
1107 \begin_layout Plain Layout
1117 \begin_layout Standard
1121 \begin_layout Plain Layout
1123 <<Concatenate the rest of the chunk>>=
1126 \begin_layout Plain Layout
1128 chunkline: while (<INPUT>) {
1131 \begin_layout Plain Layout
1133 last chunkline if /^@
1138 \begin_layout Plain Layout
1143 \begin_layout Plain Layout
1148 \begin_layout Plain Layout
1153 \begin_layout Plain Layout
1157 s+$/) {$savedchunk .= $_; last switch; }
1160 \begin_layout Plain Layout
1164 s+%def.*$/) {$savedchunk .= $_; last switch; }
1167 \begin_layout Plain Layout
1171 s+(.*)$/) {$savedchunk .= "@
1178 \begin_layout Plain Layout
1183 \begin_layout Plain Layout
1193 \begin_layout Subsection
1194 Printing out the chunk
1197 \begin_layout Standard
1198 The final piece of the first pass of the conversion is done by this code.
1201 \begin_layout Standard
1202 \begin_inset Flex Chunk
1205 \begin_layout Plain Layout
1207 \begin_inset Argument 1
1210 \begin_layout Plain Layout
1212 print out the chunk in a re\SpecialChar LyX
1227 \begin_layout Plain Layout
1229 print OUTPUT $savedchunk;
1232 \begin_layout Plain Layout
1245 \begin_layout Plain Layout
1247 print OUTPUT "$endLine";
1255 \begin_layout Standard
1256 Finally, we need to close the
1269 \begin_layout Plain Layout
1300 \begin_layout Plain Layout
1320 \begin_layout Standard
1321 \begin_inset Flex Chunk
1324 \begin_layout Plain Layout
1326 \begin_inset Argument 1
1329 \begin_layout Plain Layout
1331 Close INPUT and OUTPUT
1339 \begin_layout Plain Layout
1349 \begin_layout Section
1350 Running re\SpecialChar LyX
1354 \begin_layout Standard
1355 In this section, we describe and implement the code that runs re\SpecialChar LyX
1370 \begin_layout Plain Layout
1390 \begin_layout Subsection
1391 Selecting the document class
1394 \begin_layout Standard
1395 In order to run re\SpecialChar LyX
1396 , we need to know the article class of the input document
1397 (to choose the corresponding literate document layout).
1398 For this, we need to parse the intermediate file.
1401 \begin_layout Standard
1402 \begin_inset Flex Chunk
1405 \begin_layout Plain Layout
1407 \begin_inset Argument 1
1410 \begin_layout Plain Layout
1412 Run re\SpecialChar LyX
1413 on intermediate file
1418 <<Parse for document class>>
1421 \begin_layout Plain Layout
1423 <<Run reLyX with document class>>
1431 \begin_layout Standard
1432 In the code below, you'll see a strange regular expression to search for
1434 The reason for this kludge is that without it, we can't run
1442 file that is generated by \SpecialChar LyX
1447 \begin_layout Plain Layout
1466 \begin_layout Plain Layout
1495 \begin_layout Plain Layout
1511 class and gets confused, so we have to obfuscate it slightly.
1517 With the regular expression as it is, we can actually run
1521 on itself and a produce a quite reasonable \SpecialChar LyX
1525 \begin_layout Standard
1526 \begin_inset Flex Chunk
1529 \begin_layout Plain Layout
1531 \begin_inset Argument 1
1534 \begin_layout Plain Layout
1536 Parse for document class
1541 open(INPUT, "<$relyx_file") ||
1544 \begin_layout Plain Layout
1546 die "Cannot read $relyx_file: $!
1551 \begin_layout Plain Layout
1553 $class = "article"; # default if none found
1556 \begin_layout Plain Layout
1558 parse: while(<INPUT>) {
1561 \begin_layout Plain Layout
1567 docu[m]entclass{(.*)}/) {
1570 \begin_layout Plain Layout
1575 \begin_layout Plain Layout
1580 \begin_layout Plain Layout
1585 \begin_layout Plain Layout
1590 \begin_layout Plain Layout
1600 \begin_layout Subsection
1601 Running re\SpecialChar LyX
1602 with the corresponding literate document layout
1605 \begin_layout Standard
1606 Now that we know what the document class ought to be, we do:
1609 \begin_layout Standard
1613 \begin_layout Plain Layout
1615 <<Run reLyX with document class>>=
1618 \begin_layout Plain Layout
1620 $doc_class = "literate-" .
1624 \begin_layout Plain Layout
1626 die "reLyX returned non-zero: $!
1631 \begin_layout Plain Layout
1633 if (system("reLyX -c $doc_class $relyx_file"));
1636 \begin_layout Plain Layout
1646 \begin_layout Standard
1648 performs the main bulk of the translation work.
1649 Note that if the ``literate-
1653 '' document layout is not found, then re\SpecialChar LyX
1654 will fail with an error.
1655 In that case, you may need to modify your
1659 input file to a supported document type.
1662 \begin_layout Section
1663 Fixing the re\SpecialChar LyX
1667 \begin_layout Standard
1668 We need to perform some post-processing of what re\SpecialChar LyX
1669 produces in order to
1670 have the best output for our literate document.
1671 The outline of the post-processing steps are:
1674 \begin_layout Standard
1675 \begin_inset Flex Chunk
1678 \begin_layout Plain Layout
1680 \begin_inset Argument 1
1683 \begin_layout Plain Layout
1685 Fix up \SpecialChar LyX
1691 <<Setup INPUT and OUTPUT for the final output>>
1694 \begin_layout Plain Layout
1696 line: while(<INPUT>)
1699 \begin_layout Plain Layout
1704 \begin_layout Plain Layout
1706 <<Fix code chunks in latex layout>>
1709 \begin_layout Plain Layout
1711 <<Fix [[var]] noweb construct>>
1714 \begin_layout Plain Layout
1716 print OUTPUT; # default
1719 \begin_layout Plain Layout
1724 \begin_layout Plain Layout
1726 <<Close INPUT and OUTPUT>>
1734 \begin_layout Standard
1735 Note that in the perl code that is contained in the
1748 \begin_layout Plain Layout
1765 loop above, the perl construct
1779 \begin_layout Plain Layout
1796 is sufficient to restart the loop.
1797 We can use this construct to do some relatively complex parsing of the
1802 \begin_layout Subsection
1803 File input and output for the post-processing
1806 \begin_layout Standard
1820 \begin_layout Plain Layout
1851 \begin_layout Plain Layout
1868 is taken care of by this code:
1871 \begin_layout Standard
1872 \begin_inset Flex Chunk
1875 \begin_layout Plain Layout
1877 \begin_inset Argument 1
1880 \begin_layout Plain Layout
1882 Setup INPUT and OUTPUT for the final output
1890 \begin_layout Plain Layout
1892 &setup_files("$input_file", "$output_file");
1895 \begin_layout Plain Layout
1900 \begin_layout Plain Layout
1902 &setup_files("$relyx_file.lyx", "$output_file");
1905 \begin_layout Plain Layout
1915 \begin_layout Subsection
1916 Making sure the code chunks are in the Chunk layout
1919 \begin_layout Standard
1920 Now, as we outlined before, the final step is transforming the code-chunks
1921 which have been put into a \SpecialChar LaTeX
1922 layout by \SpecialChar LyX
1923 into the Chunk layout.
1926 \begin_layout Standard
1927 \begin_inset Flex Chunk
1930 \begin_layout Plain Layout
1932 \begin_inset Argument 1
1935 \begin_layout Plain Layout
1937 Fix code chunks in latex layout
1946 latex latex/) { # Beginning of some latex code
1949 \begin_layout Plain Layout
1951 if (($line = <INPUT>) =~ /^
1953 s*<</) { # code chunk
1956 \begin_layout Plain Layout
1958 <<Transform this chunk into layout chunk>>
1961 \begin_layout Plain Layout
1966 \begin_layout Plain Layout
1970 latex latex line + next line
1973 \begin_layout Plain Layout
1975 print OUTPUT "$_$line";
1978 \begin_layout Plain Layout
1983 \begin_layout Plain Layout
1988 \begin_layout Plain Layout
1998 \begin_layout Standard
1999 When we are sure that we are in a code chunk, we must read in the rest of
2000 the code chunk and output a chunk layout for it:
2003 \begin_layout Standard
2007 \begin_layout Plain Layout
2009 <<Transform this chunk into layout chunk>>=
2012 \begin_layout Plain Layout
2016 \begin_layout Plain Layout
2029 \begin_layout Plain Layout
2031 codeline: while (<INPUT>) {
2034 \begin_layout Plain Layout
2039 \begin_layout Plain Layout
2041 last codeline if /^@
2046 \begin_layout Plain Layout
2051 \begin_layout Plain Layout
2053 print OUTPUT $savedchunk;
2056 \begin_layout Plain Layout
2058 <<Slurp up to the end of the latex layout>>
2061 \begin_layout Plain Layout
2071 \begin_layout Standard
2072 Okay, now we just need to eat the rest of the latex layout.
2073 There should only be a few different types of lines for us to match:
2076 \begin_layout Standard
2077 \begin_inset Flex Chunk
2080 \begin_layout Plain Layout
2082 \begin_inset Argument 1
2085 \begin_layout Plain Layout
2087 Slurp up to the end of the latex layout
2092 slurp: while (<INPUT>) {
2095 \begin_layout Plain Layout
2104 \begin_layout Plain Layout
2113 \begin_layout Plain Layout
2120 \begin_layout Plain Layout
2122 warn "confused by line: $_";
2125 \begin_layout Plain Layout
2135 \begin_layout Subsection
2147 \begin_layout Standard
2152 allows the user to use a special code quoting mechanism in documentation
2154 Fixing this ``[[quoted-code]]''
2158 syntax means putting the ``[[quoted-code]]'' in a \SpecialChar LaTeX
2159 layout in the \SpecialChar LyX
2161 Otherwise, \SpecialChar LyX
2162 will backslash-quote the brackets, creating ugly output.
2163 The quoted-code is transformed by
2167 when it generates the final \SpecialChar LaTeX
2171 \begin_layout Standard
2172 \begin_inset Flex Chunk
2175 \begin_layout Plain Layout
2177 \begin_inset Argument 1
2180 \begin_layout Plain Layout
2182 Fix [[var]] noweb construct
2195 ]/) { # special code for [[var]]
2198 \begin_layout Plain Layout
2225 \begin_layout Plain Layout
2230 \begin_layout Plain Layout
2235 \begin_layout Plain Layout
2245 \begin_layout Section
2246 Cleaning up intermediate files
2249 \begin_layout Standard
2250 The cleanup code is very simple:
2253 \begin_layout Standard
2254 \begin_inset Flex Chunk
2257 \begin_layout Plain Layout
2259 \begin_inset Argument 1
2262 \begin_layout Plain Layout
2269 system("rm -f $relyx_file*") unless ($post_only || $pre_only);
2277 \begin_layout Section
2278 User supplied arguments
2281 \begin_layout Standard
2286 script understands two arguments, input-file and output-file.
2287 It is also set up to be used internally by re\SpecialChar LyX
2288 to pre-process or postprocess
2289 files in the import pipeline.
2292 \begin_layout Standard
2296 \begin_layout Plain Layout
2298 <<Setup variables from user supplied args>>=
2301 \begin_layout Plain Layout
2303 &usage() if ($#ARGV < 1); # zero or one argument
2306 \begin_layout Plain Layout
2308 if ($ARGV[0] eq "-pre") {
2311 \begin_layout Plain Layout
2313 &usage unless ($#ARGV == 2);
2316 \begin_layout Plain Layout
2318 $input_file = $ARGV[1]; $output_file = $ARGV[2]; $pre_only = 1;
2321 \begin_layout Plain Layout
2323 } elsif ($ARGV[0] eq "-post") {
2326 \begin_layout Plain Layout
2328 &usage unless ($#ARGV == 2);
2331 \begin_layout Plain Layout
2333 $input_file = $ARGV[1]; $output_file = $ARGV[2]; $post_only = 1;
2336 \begin_layout Plain Layout
2341 \begin_layout Plain Layout
2343 &usage unless ($#ARGV == 1);
2346 \begin_layout Plain Layout
2348 $input_file = $ARGV[0]; $output_file = $ARGV[1];
2351 \begin_layout Plain Layout
2353 $pre_only = 0; $post_only = 0;
2356 \begin_layout Plain Layout
2361 \begin_layout Plain Layout
2363 @ %def input_file output_file pre_only post_only
2366 \begin_layout Plain Layout
2371 \begin_layout Plain Layout
2376 \begin_layout Plain Layout
2378 print "Usage: noweb2lyx [-pre | -post] input-file output-file
2381 \begin_layout Plain Layout
2385 \begin_layout Plain Layout
2387 If -pre is specified, only pre-processes the input-file for reLyX.
2390 \begin_layout Plain Layout
2392 Similarly, in the case of -post, post-processes reLyX output.
2395 \begin_layout Plain Layout
2397 In case of bugs, Email Kayvan Sylvan <kayvan
2404 \begin_layout Plain Layout
2409 \begin_layout Plain Layout
2414 \begin_layout Plain Layout
2424 \begin_layout Section
2432 \begin_layout Standard
2433 The noweb2lyx script can be tangled from \SpecialChar LyX
2440 to call a generic script that always extracts a chunk named
2445 Here is an example of such a script:
2448 \begin_layout LyX-Code
2450 \begin_inset Newline newline
2453 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
2456 \begin_layout Standard
2457 \begin_inset Flex Chunk
2460 \begin_layout Plain Layout
2462 \begin_inset Argument 1
2465 \begin_layout Plain Layout
2475 \begin_layout Plain Layout
2477 notangle -Rnoweb2lyx.in noweb2lyx.nw > noweb2lyx.in
2480 \begin_layout Plain Layout
2482 sed -e "s=@PERL@=$PREFIX/bin/perl=" noweb2lyx.in > noweb2lyx
2485 \begin_layout Plain Layout
2495 \begin_layout Standard
2496 \begin_inset Newpage newpage
2502 \begin_layout Section*
2506 \begin_layout Standard
2519 \begin_layout Plain Layout
2531 \begin_layout Section*
2535 \begin_layout Standard
2548 \begin_layout Plain Layout