1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/examples/
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 false
24 \language_package default
25 \inputencoding default
27 \font_roman "default" "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_sf_scale 100 100
36 \font_tt_scale 100 100
38 \default_output_format default
40 \bibtex_command default
41 \index_command default
42 \paperfontsize default
47 \use_package amsmath 0
48 \use_package amssymb 0
51 \use_package mathdots 1
52 \use_package mathtools 0
54 \use_package stackrel 0
55 \use_package stmaryrd 0
56 \use_package undertilde 0
58 \cite_engine_type default
62 \paperorientation portrait
72 \paragraph_separation indent
73 \paragraph_indentation default
74 \quotes_language english
77 \paperpagestyle default
78 \tracking_changes false
95 Sylvan <kayvan@sylvan.com>
102 \begin_layout Abstract
103 This document describes and implements a perl script for importing noweb
104 files into \SpecialChar LyX
108 \begin_layout Standard
109 \begin_inset CommandInset toc
110 LatexCommand tableofcontents
117 \begin_layout Standard
118 \begin_inset Newpage newpage
124 \begin_layout Section
128 \begin_layout Standard
129 Since version 1.0.1, \SpecialChar LyX
130 now supports Literate Programming using
135 This addition to \SpecialChar LyX
136 made it very pleasant to write programs in the literate
137 style (like this one).
138 In addition to being able to write new literate programs, it would be quite
143 code could be imported into \SpecialChar LyX
145 That's where this program comes in.
148 \begin_layout Standard
157 file to \SpecialChar LyX
161 \begin_layout Standard
162 \begin_inset Flex Chunk
165 \begin_layout Plain Layout
167 \begin_inset Argument 1
170 \begin_layout Plain Layout
179 \begin_layout Plain Layout
184 \begin_layout Plain Layout
186 # Copyright (C) 1999 Kayvan A.
187 Sylvan <kayvan@sylvan.com>
190 \begin_layout Plain Layout
192 # You are free to use and modify this code under the terms of
195 \begin_layout Plain Layout
197 # the GNU General Public Licence version 2 or later.
200 \begin_layout Plain Layout
205 \begin_layout Plain Layout
207 # Written with assistance from:
210 \begin_layout Plain Layout
212 # Edmar Wienskoski Jr.
213 <edmar-w-jr@technologist.com>
216 \begin_layout Plain Layout
218 # Amir Karger <karger@post.harvard.edu>
221 \begin_layout Plain Layout
226 \begin_layout Plain Layout
228 # $Id: noweb2lyx.lyx,v 1.5 2005/07/18 09:42:27 jamatos Exp $
231 \begin_layout Plain Layout
236 \begin_layout Plain Layout
238 # NOTE: This file was automatically generated from noweb2lyx.lyx using noweb.
241 \begin_layout Plain Layout
246 \begin_layout Plain Layout
248 <<Setup variables from user supplied args>>
251 \begin_layout Plain Layout
256 \begin_layout Plain Layout
258 <<Convert noweb to LyX>>
266 \begin_layout Section
267 The Noweb file defined
270 \begin_layout Standard
275 file is a collection of documentation and code chunks.
276 Documentation chunks simply start with an ``@'' and have no name:
279 \begin_layout LyX-Code
280 @ Here is some documentation.
283 \begin_layout Standard
287 \begin_layout Plain Layout
289 We can do arbitrary LaTeX code here.
292 \begin_layout Plain Layout
303 \begin_layout Standard
304 Code chunks look like this:
307 \begin_layout LyX-Code
312 \begin_layout Plain Layout
323 \begin_layout Plain Layout
331 \begin_inset Newline newline
335 code for the chunk goes here ...}
336 \begin_inset Newline newline
342 \begin_layout Standard
343 The ``@'' is a necessary delimiter to end the code chunk.
344 The other form that the ``@'' line takes is as follows:
347 \begin_layout LyX-Code
352 \begin_layout Plain Layout
363 \begin_layout Plain Layout
371 \begin_inset Newline newline
375 code for the chunk ...}
376 \begin_inset Newline newline
379 @ %def identifier1 identifier2
382 \begin_layout Standard
383 In the latter form, we are declaring to
387 that this code chunk defines identifier1, identifier2, etc.
390 \begin_layout Standard
391 When first tackling this problem, I spoke with members of the \SpecialChar LyX
393 knew about the literate programming extensions and re\SpecialChar LyX
394 (the \SpecialChar LaTeX
398 \begin_layout Standard
399 One of the first ideas was to extend the re\SpecialChar LyX
400 code to understand the
405 This proved to be too hard and presents other problems
409 \begin_layout Plain Layout
410 Not the least of these problems is the fact that << is a quote in French.
416 On the other hand, it turns out that re\SpecialChar LyX
417 contains a very useful literal
419 If the input file contains the construct
422 \begin_layout LyX-Code
425 begin{re\SpecialChar LyX
427 \begin_inset Newline newline
433 \begin_inset Newline newline
438 end{re\SpecialChar LyX
442 \begin_layout Standard
443 then re\SpecialChar LyX
444 will copy the surrounded code to the output file verbatim.
445 Given this, the first part of the translation is easy; we simply have to
446 copy the code chunks into an intermediate file that surrounds them with
451 begin{re\SpecialChar LyX
458 end{re\SpecialChar LyX
464 \begin_layout Standard
465 Once re\SpecialChar LyX
466 is done with the input file, the problem is reduced to changing
467 the code chunks from \SpecialChar LyX
468 's \SpecialChar LaTeX
469 layout to the Chunk layout.
472 \begin_layout Standard
473 There is one final constraint on
478 We want to be able to run it as a simple pre-processor and post-processor
479 from within re\SpecialChar LyX
481 We can accomplish this by setting the flags
494 \begin_layout Plain Layout
525 \begin_layout Plain Layout
542 before we reach the main conversion code.
545 \begin_layout Standard
546 With all that preamble out of the way, we now have the basic high-level
547 outline for our code:
550 \begin_layout Standard
551 \begin_inset Flex Chunk
554 \begin_layout Plain Layout
556 \begin_inset Argument 1
559 \begin_layout Plain Layout
560 Convert noweb to \SpecialChar LyX
569 \begin_layout Plain Layout
571 <<Transform noweb for reLyX>>
574 \begin_layout Plain Layout
579 \begin_layout Plain Layout
581 if ((!$pre_only) && (!$post_only)) {
584 \begin_layout Plain Layout
586 <<Run reLyX on intermediate file>>
589 \begin_layout Plain Layout
594 \begin_layout Plain Layout
599 \begin_layout Plain Layout
604 \begin_layout Plain Layout
609 \begin_layout Plain Layout
619 \begin_layout Section
620 Making a file that re\SpecialChar LyX
624 \begin_layout Standard
625 In this section, we present the code that performs the task of creating
626 the intermediate file that re\SpecialChar LyX
627 can process, using the algorithm that we
629 This algorithm is outlined in the code that follows:
632 \begin_layout Standard
633 \begin_inset Flex Chunk
636 \begin_layout Plain Layout
640 \begin_layout Plain Layout
642 <<Transform noweb for reLyX>>=
645 \begin_layout Plain Layout
647 <<Setup INPUT and OUTPUT>>
650 \begin_layout Plain Layout
652 inputline: while(<INPUT>)
655 \begin_layout Plain Layout
660 \begin_layout Plain Layout
672 >=/) { # Beginning of a noweb chunk
675 \begin_layout Plain Layout
677 <<Read in and output the noweb code chunk>>
680 \begin_layout Plain Layout
684 s+(.*)/) { # Beginning of a documentation chunk
687 \begin_layout Plain Layout
689 print OUTPUT $1; # We do not need the ``@'' part
692 \begin_layout Plain Layout
702 ]/) { # noweb quoted code
705 \begin_layout Plain Layout
707 <<Perform special input quoting of [[var]]>>
710 \begin_layout Plain Layout
715 \begin_layout Plain Layout
717 print OUTPUT; # Just let the line pass through
720 \begin_layout Plain Layout
725 \begin_layout Plain Layout
730 \begin_layout Plain Layout
732 <<Close INPUT and OUTPUT>>
740 \begin_layout Standard
741 In the code above, we do some pre-processing of the noweb ``[[...]]'' construct.
742 This avoids some problems with re\SpecialChar LyX
743 confusing lists composed of ``[[...]]''
747 \begin_layout Standard
751 \begin_layout Plain Layout
753 <<Perform special input quoting of [[var]]>>=
756 \begin_layout Plain Layout
767 \begin_layout Plain Layout
772 \begin_layout Plain Layout
782 \begin_layout Standard
796 \begin_layout Plain Layout
813 file, once we have identified a
817 code chunk, we transform it into a form that is usable by re\SpecialChar LyX
821 \begin_layout Standard
822 \begin_inset Flex Chunk
825 \begin_layout Plain Layout
827 \begin_inset Argument 1
830 \begin_layout Plain Layout
831 Read in and output the noweb code chunk
836 <<Save the beginning of the chunk to savedchunk>>
839 \begin_layout Plain Layout
841 <<Concatenate the rest of the chunk>>
844 \begin_layout Plain Layout
846 <<print out the chunk in a reLyXskip block>>
854 \begin_layout Subsection
855 File input and output for the pre-processing step
858 \begin_layout Standard
876 \begin_layout Plain Layout
907 \begin_layout Plain Layout
924 to read and write files.
925 In the code fragment above, we need to read from the input file and write
926 to a file that will be later transformed by re\SpecialChar LyX
928 If we are being called only to pre-process the input file, then there is
929 no need to create a temporary file.
932 \begin_layout Standard
933 \begin_inset Flex Chunk
936 \begin_layout Plain Layout
938 \begin_inset Argument 1
941 \begin_layout Plain Layout
942 Setup INPUT and OUTPUT
950 \begin_layout Plain Layout
952 &setup_files($input_file, $output_file);
955 \begin_layout Plain Layout
960 \begin_layout Plain Layout
962 $relyx_file = "temp$$";
965 \begin_layout Plain Layout
967 &setup_files($input_file, $relyx_file);
970 \begin_layout Plain Layout
980 \begin_layout Standard
981 This code uses a small perl subroutine,
994 \begin_layout Plain Layout
1010 , which we define below:
1013 \begin_layout Standard
1017 \begin_layout Plain Layout
1022 \begin_layout Plain Layout
1027 \begin_layout Plain Layout
1032 \begin_layout Plain Layout
1034 open(INPUT, "<$in") || die "Cannot read $in: $!
1039 \begin_layout Plain Layout
1041 open(OUTPUT, ">$out") || die "Cannot write $out: $!
1046 \begin_layout Plain Layout
1051 \begin_layout Plain Layout
1061 \begin_layout Subsection
1069 \begin_layout Standard
1070 After we see the beginning of the chunk, we need to read in and save the
1071 rest of the chunk for output.
1074 \begin_layout Standard
1075 \begin_inset Flex Chunk
1078 \begin_layout Plain Layout
1080 \begin_inset Argument 1
1083 \begin_layout Plain Layout
1084 Save the beginning of the chunk to savedchunk
1092 \begin_layout Plain Layout
1102 \begin_layout Standard
1106 \begin_layout Plain Layout
1108 <<Concatenate the rest of the chunk>>=
1111 \begin_layout Plain Layout
1113 chunkline: while (<INPUT>) {
1116 \begin_layout Plain Layout
1118 last chunkline if /^@
1123 \begin_layout Plain Layout
1128 \begin_layout Plain Layout
1133 \begin_layout Plain Layout
1138 \begin_layout Plain Layout
1142 s+$/) {$savedchunk .= $_; last switch; }
1145 \begin_layout Plain Layout
1149 s+%def.*$/) {$savedchunk .= $_; last switch; }
1152 \begin_layout Plain Layout
1156 s+(.*)$/) {$savedchunk .= "@
1163 \begin_layout Plain Layout
1168 \begin_layout Plain Layout
1178 \begin_layout Subsection
1179 Printing out the chunk
1182 \begin_layout Standard
1183 The final piece of the first pass of the conversion is done by this code.
1186 \begin_layout Standard
1187 \begin_inset Flex Chunk
1190 \begin_layout Plain Layout
1192 \begin_inset Argument 1
1195 \begin_layout Plain Layout
1196 print out the chunk in a re\SpecialChar LyX
1211 \begin_layout Plain Layout
1213 print OUTPUT $savedchunk;
1216 \begin_layout Plain Layout
1229 \begin_layout Plain Layout
1231 print OUTPUT "$endLine";
1239 \begin_layout Standard
1240 Finally, we need to close the
1253 \begin_layout Plain Layout
1284 \begin_layout Plain Layout
1304 \begin_layout Standard
1305 \begin_inset Flex Chunk
1308 \begin_layout Plain Layout
1310 \begin_inset Argument 1
1313 \begin_layout Plain Layout
1314 Close INPUT and OUTPUT
1322 \begin_layout Plain Layout
1332 \begin_layout Section
1333 Running re\SpecialChar LyX
1337 \begin_layout Standard
1338 In this section, we describe and implement the code that runs re\SpecialChar LyX
1353 \begin_layout Plain Layout
1373 \begin_layout Subsection
1374 Selecting the document class
1377 \begin_layout Standard
1378 In order to run re\SpecialChar LyX
1379 , we need to know the article class of the input document
1380 (to choose the corresponding literate document layout).
1381 For this, we need to parse the intermediate file.
1384 \begin_layout Standard
1385 \begin_inset Flex Chunk
1388 \begin_layout Plain Layout
1390 \begin_inset Argument 1
1393 \begin_layout Plain Layout
1394 Run re\SpecialChar LyX
1395 on intermediate file
1400 <<Parse for document class>>
1403 \begin_layout Plain Layout
1405 <<Run reLyX with document class>>
1413 \begin_layout Standard
1414 In the code below, you'll see a strange regular expression to search for
1416 The reason for this kludge is that without it, we can't run
1424 file that is generated by \SpecialChar LyX
1429 \begin_layout Plain Layout
1448 \begin_layout Plain Layout
1477 \begin_layout Plain Layout
1493 class and gets confused, so we have to obfuscate it slightly.
1499 With the regular expression as it is, we can actually run
1503 on itself and a produce a quite reasonable \SpecialChar LyX
1507 \begin_layout Standard
1508 \begin_inset Flex Chunk
1511 \begin_layout Plain Layout
1513 \begin_inset Argument 1
1516 \begin_layout Plain Layout
1517 Parse for document class
1522 open(INPUT, "<$relyx_file") ||
1525 \begin_layout Plain Layout
1527 die "Cannot read $relyx_file: $!
1532 \begin_layout Plain Layout
1534 $class = "article"; # default if none found
1537 \begin_layout Plain Layout
1539 parse: while(<INPUT>) {
1542 \begin_layout Plain Layout
1548 docu[m]entclass{(.*)}/) {
1551 \begin_layout Plain Layout
1556 \begin_layout Plain Layout
1561 \begin_layout Plain Layout
1566 \begin_layout Plain Layout
1571 \begin_layout Plain Layout
1581 \begin_layout Subsection
1582 Running re\SpecialChar LyX
1583 with the corresponding literate document layout
1586 \begin_layout Standard
1587 Now that we know what the document class ought to be, we do:
1590 \begin_layout Standard
1594 \begin_layout Plain Layout
1596 <<Run reLyX with document class>>=
1599 \begin_layout Plain Layout
1601 $doc_class = "literate-" .
1605 \begin_layout Plain Layout
1607 die "reLyX returned non-zero: $!
1612 \begin_layout Plain Layout
1614 if (system("reLyX -c $doc_class $relyx_file"));
1617 \begin_layout Plain Layout
1627 \begin_layout Standard
1629 performs the main bulk of the translation work.
1630 Note that if the ``literate-
1634 '' document layout is not found, then re\SpecialChar LyX
1635 will fail with an error.
1636 In that case, you may need to modify your
1640 input file to a supported document type.
1643 \begin_layout Section
1644 Fixing the re\SpecialChar LyX
1648 \begin_layout Standard
1649 We need to perform some post-processing of what re\SpecialChar LyX
1650 produces in order to
1651 have the best output for our literate document.
1652 The outline of the post-processing steps are:
1655 \begin_layout Standard
1656 \begin_inset Flex Chunk
1659 \begin_layout Plain Layout
1661 \begin_inset Argument 1
1664 \begin_layout Plain Layout
1665 Fix up \SpecialChar LyX
1671 <<Setup INPUT and OUTPUT for the final output>>
1674 \begin_layout Plain Layout
1676 line: while(<INPUT>)
1679 \begin_layout Plain Layout
1684 \begin_layout Plain Layout
1686 <<Fix code chunks in latex layout>>
1689 \begin_layout Plain Layout
1691 <<Fix [[var]] noweb construct>>
1694 \begin_layout Plain Layout
1696 print OUTPUT; # default
1699 \begin_layout Plain Layout
1704 \begin_layout Plain Layout
1706 <<Close INPUT and OUTPUT>>
1714 \begin_layout Standard
1715 Note that in the perl code that is contained in the
1728 \begin_layout Plain Layout
1745 loop above, the perl construct
1759 \begin_layout Plain Layout
1776 is sufficient to restart the loop.
1777 We can use this construct to do some relatively complex parsing of the
1782 \begin_layout Subsection
1783 File input and output for the post-processing
1786 \begin_layout Standard
1800 \begin_layout Plain Layout
1831 \begin_layout Plain Layout
1848 is taken care of by this code:
1851 \begin_layout Standard
1852 \begin_inset Flex Chunk
1855 \begin_layout Plain Layout
1857 \begin_inset Argument 1
1860 \begin_layout Plain Layout
1861 Setup INPUT and OUTPUT for the final output
1869 \begin_layout Plain Layout
1871 &setup_files("$input_file", "$output_file");
1874 \begin_layout Plain Layout
1879 \begin_layout Plain Layout
1881 &setup_files("$relyx_file.lyx", "$output_file");
1884 \begin_layout Plain Layout
1894 \begin_layout Subsection
1895 Making sure the code chunks are in the Chunk layout
1898 \begin_layout Standard
1899 Now, as we outlined before, the final step is transforming the code-chunks
1900 which have been put into a \SpecialChar LaTeX
1901 layout by \SpecialChar LyX
1902 into the Chunk layout.
1905 \begin_layout Standard
1906 \begin_inset Flex Chunk
1909 \begin_layout Plain Layout
1911 \begin_inset Argument 1
1914 \begin_layout Plain Layout
1915 Fix code chunks in latex layout
1924 latex latex/) { # Beginning of some latex code
1927 \begin_layout Plain Layout
1929 if (($line = <INPUT>) =~ /^
1931 s*<</) { # code chunk
1934 \begin_layout Plain Layout
1936 <<Transform this chunk into layout chunk>>
1939 \begin_layout Plain Layout
1944 \begin_layout Plain Layout
1948 latex latex line + next line
1951 \begin_layout Plain Layout
1953 print OUTPUT "$_$line";
1956 \begin_layout Plain Layout
1961 \begin_layout Plain Layout
1966 \begin_layout Plain Layout
1976 \begin_layout Standard
1977 When we are sure that we are in a code chunk, we must read in the rest of
1978 the code chunk and output a chunk layout for it:
1981 \begin_layout Standard
1985 \begin_layout Plain Layout
1987 <<Transform this chunk into layout chunk>>=
1990 \begin_layout Plain Layout
1994 \begin_layout Plain Layout
2007 \begin_layout Plain Layout
2009 codeline: while (<INPUT>) {
2012 \begin_layout Plain Layout
2017 \begin_layout Plain Layout
2019 last codeline if /^@
2024 \begin_layout Plain Layout
2029 \begin_layout Plain Layout
2031 print OUTPUT $savedchunk;
2034 \begin_layout Plain Layout
2036 <<Slurp up to the end of the latex layout>>
2039 \begin_layout Plain Layout
2049 \begin_layout Standard
2050 Okay, now we just need to eat the rest of the latex layout.
2051 There should only be a few different types of lines for us to match:
2054 \begin_layout Standard
2055 \begin_inset Flex Chunk
2058 \begin_layout Plain Layout
2060 \begin_inset Argument 1
2063 \begin_layout Plain Layout
2064 Slurp up to the end of the latex layout
2069 slurp: while (<INPUT>) {
2072 \begin_layout Plain Layout
2081 \begin_layout Plain Layout
2090 \begin_layout Plain Layout
2097 \begin_layout Plain Layout
2099 warn "confused by line: $_";
2102 \begin_layout Plain Layout
2112 \begin_layout Subsection
2124 \begin_layout Standard
2129 allows the user to use a special code quoting mechanism in documentation
2131 Fixing this ``[[quoted-code]]''
2135 syntax means putting the ``[[quoted-code]]'' in a \SpecialChar LaTeX
2136 layout in the \SpecialChar LyX
2138 Otherwise, \SpecialChar LyX
2139 will backslash-quote the brackets, creating ugly output.
2140 The quoted-code is transformed by
2144 when it generates the final \SpecialChar LaTeX
2148 \begin_layout Standard
2149 \begin_inset Flex Chunk
2152 \begin_layout Plain Layout
2154 \begin_inset Argument 1
2157 \begin_layout Plain Layout
2158 Fix [[var]] noweb construct
2171 ]/) { # special code for [[var]]
2174 \begin_layout Plain Layout
2201 \begin_layout Plain Layout
2206 \begin_layout Plain Layout
2211 \begin_layout Plain Layout
2221 \begin_layout Section
2222 Cleaning up intermediate files
2225 \begin_layout Standard
2226 The cleanup code is very simple:
2229 \begin_layout Standard
2230 \begin_inset Flex Chunk
2233 \begin_layout Plain Layout
2235 \begin_inset Argument 1
2238 \begin_layout Plain Layout
2244 system("rm -f $relyx_file*") unless ($post_only || $pre_only);
2252 \begin_layout Section
2253 User supplied arguments
2256 \begin_layout Standard
2261 script understands two arguments, input-file and output-file.
2262 It is also set up to be used internally by re\SpecialChar LyX
2263 to pre-process or postprocess
2264 files in the import pipeline.
2267 \begin_layout Standard
2271 \begin_layout Plain Layout
2273 <<Setup variables from user supplied args>>=
2276 \begin_layout Plain Layout
2278 &usage() if ($#ARGV < 1); # zero or one argument
2281 \begin_layout Plain Layout
2283 if ($ARGV[0] eq "-pre") {
2286 \begin_layout Plain Layout
2288 &usage unless ($#ARGV == 2);
2291 \begin_layout Plain Layout
2293 $input_file = $ARGV[1]; $output_file = $ARGV[2]; $pre_only = 1;
2296 \begin_layout Plain Layout
2298 } elsif ($ARGV[0] eq "-post") {
2301 \begin_layout Plain Layout
2303 &usage unless ($#ARGV == 2);
2306 \begin_layout Plain Layout
2308 $input_file = $ARGV[1]; $output_file = $ARGV[2]; $post_only = 1;
2311 \begin_layout Plain Layout
2316 \begin_layout Plain Layout
2318 &usage unless ($#ARGV == 1);
2321 \begin_layout Plain Layout
2323 $input_file = $ARGV[0]; $output_file = $ARGV[1];
2326 \begin_layout Plain Layout
2328 $pre_only = 0; $post_only = 0;
2331 \begin_layout Plain Layout
2336 \begin_layout Plain Layout
2338 @ %def input_file output_file pre_only post_only
2341 \begin_layout Plain Layout
2346 \begin_layout Plain Layout
2351 \begin_layout Plain Layout
2353 print "Usage: noweb2lyx [-pre | -post] input-file output-file
2356 \begin_layout Plain Layout
2360 \begin_layout Plain Layout
2362 If -pre is specified, only pre-processes the input-file for reLyX.
2365 \begin_layout Plain Layout
2367 Similarly, in the case of -post, post-processes reLyX output.
2370 \begin_layout Plain Layout
2372 In case of bugs, Email Kayvan Sylvan <kayvan
2379 \begin_layout Plain Layout
2384 \begin_layout Plain Layout
2389 \begin_layout Plain Layout
2399 \begin_layout Section
2407 \begin_layout Standard
2408 The noweb2lyx script can be tangled from \SpecialChar LyX
2415 to call a generic script that always extracts a chunk named
2420 Here is an example of such a script:
2423 \begin_layout LyX-Code
2425 \begin_inset Newline newline
2428 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
2431 \begin_layout Standard
2432 \begin_inset Flex Chunk
2435 \begin_layout Plain Layout
2437 \begin_inset Argument 1
2440 \begin_layout Plain Layout
2449 \begin_layout Plain Layout
2451 notangle -Rnoweb2lyx.in noweb2lyx.nw > noweb2lyx.in
2454 \begin_layout Plain Layout
2456 sed -e "s=@PERL@=$PREFIX/bin/perl=" noweb2lyx.in > noweb2lyx
2459 \begin_layout Plain Layout
2469 \begin_layout Standard
2470 \begin_inset Newpage newpage
2476 \begin_layout Section*
2480 \begin_layout Standard
2493 \begin_layout Plain Layout
2505 \begin_layout Section*
2509 \begin_layout Standard
2522 \begin_layout Plain Layout