The branch, 2.0.x, has been updated.

- Log -----------------------------------------------------------------

commit b54c782718fcc682c9fafd0022d8d4a7b9f0eec8
Author: Pavel Sanda <[email protected]>
Date:   Thu Oct 11 01:33:54 2012 +0200

    Doc updates for noweb (bug #5444).
    
    Patch based on Kayvan Sylvan input.

diff --git a/lib/doc/Additional.lyx b/lib/doc/Additional.lyx
index c894003..4404d03 100644
--- a/lib/doc/Additional.lyx
+++ b/lib/doc/Additional.lyx
@@ -21817,7 +21817,7 @@ Converter
 \family typewriter
 build-script $$i
 \family default
-
+ $$r
 \begin_inset Quotes erd
 \end_inset
 
@@ -21831,7 +21831,7 @@ build-script
 \end_inset
 
  (a program or script) with the name of the Noweb file (normally a file
- in the LyX temp directory).
+ in the LyX temp directory) and the directory path of the original LyX file.
  
 \end_layout
 
@@ -21856,7 +21856,7 @@ build-script
 \end_layout
 
 \begin_layout LyX-Code
-notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
+notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
 \end_layout
 
 \begin_layout Standard
@@ -21874,7 +21874,7 @@ Flags
 
 
 \family typewriter
-parselog=listerrors
+parselog=$$s/scripts/listerrors
 \family default
 
 \begin_inset Quotes erd
@@ -21901,26 +21901,6 @@ listerrors
 \end_layout
 
 \begin_layout Standard
-The converter code looks in 
-\emph on
-MYLYXDIR/scripts
-\emph default
- first, then in 
-\emph on
-LIBDIR/scripts
-\emph default
- then on the path for the 
-\begin_inset Quotes eld
-\end_inset
-
-listerrors
-\begin_inset Quotes erd
-\end_inset
-
- program.
-\end_layout
-
-\begin_layout Standard
 The build will normally take place in LyX's temporary directory, so the
  files produced by the conversion will be in that directory.
  LyX will copy out what it regards as the `main' file, but the 
@@ -21929,61 +21909,8 @@ Noweb->Program
 \family default
  conversion may produce several files, and so most of these would then be
  deleted when LyX was closed.
- The present solution is to use a `copier',
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-See section 
-\emph on
-Copiers
-\emph default
- of the 
-\emph on
-Customization
-\emph default
- manual for information on these.
-\end_layout
-
-\end_inset
-
- in this case, the 
-\family typewriter
-ext_copy.py
-\family default
- script in its default mode, so that the entire contents of the temporary
- directory is copied.
- More will get copied than is needed, to be sure, but nothing will be lost.
- If, however, you know what extensions the generated files will have, this
- can be improved by using the 
-\family typewriter
--e
-\family default
- option to 
-\family typewriter
-ext_copy
-\family default
-.
- This option takes a comma-separated list of extensions to copy.
- So, for example, if the conversion will generate only files with the 
extensions
- 
-\family typewriter
-.c
-\family default
- and 
-\family typewriter
-.h
-\family default
-, then the correct definition would be:
-\end_layout
-
-\begin_layout LyX-Code
-python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
-\end_layout
-
-\begin_layout Standard
-The result will be that only files with these two extensions will be copied
- out.
+ This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
+ the build-script scrap can place the generated files in that location.
 \end_layout
 
 \begin_layout Paragraph
@@ -22063,7 +21990,8 @@ fi
 \end_inset
 
 [...
- code to extract files ...]
+ code to extract files ...
+ use NOWEB_OUTPUT_DIR here ...]
 \begin_inset Newline newline
 \end_inset
 
@@ -22117,7 +22045,7 @@ Preferences
 \begin_inset Quotes eld
 \end_inset
 
-Conversion
+File Handling
 \begin_inset Quotes erd
 \end_inset
 
@@ -22134,7 +22062,7 @@ the
 \begin_inset Quotes eld
 \end_inset
 
-literate
+NoWeb
 \begin_inset Quotes erd
 \end_inset
 
@@ -22142,8 +22070,8 @@ literate
 \begin_inset space ~
 \end_inset
 
-format Set up via the Formats tab, this is where the Noweb-specific pieces
- are set up.
+format Set up via the File Formats tab, this is where the Noweb-specific
+ pieces are set up.
  The 
 \family sans
 GUI Name
@@ -22240,7 +22168,7 @@ tangling step
 \family typewriter
 build-script $$i
 \family default
-
+ $$r
 \begin_inset Quotes erd
 \end_inset
 
@@ -22250,7 +22178,7 @@ build-script $$i
 
 
 \family typewriter
-originaldir,parselog=listerrors
+parselog=$$s/scripts/listerrors
 \family default
 
 \begin_inset Quotes erd
diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx
index 2dcd832..9537075 100644
--- a/lib/doc/Customization.lyx
+++ b/lib/doc/Customization.lyx
@@ -1737,6 +1737,26 @@ $$o
 
 \begin_layout Labeling
 \labelwidthstring 00.00.0000
+$$b The base name (without filename extension) in the LyX temporary directory
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+$$p The full directory path of the LyX temporary directory
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+$$r The full pathname to the original LyX file being processed
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+$$f The filename (without any directory path) of the LyX file.
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
 \begin_inset Flex Code
 status collapsed
 
diff --git a/lib/examples/Literate.lyx b/lib/examples/Literate.lyx
index b0bc548..7ec15de 100644
--- a/lib/examples/Literate.lyx
+++ b/lib/examples/Literate.lyx
@@ -1679,7 +1679,11 @@ if [ -z "$NOWEB_SOURCE" ]; then 
NOWEB_SOURCE=Literate.nw; fi
 \end_layout
 
 \begin_layout Scrap
-notangle -L -Rlisterrors.c ${NOWEB_SOURCE} > listerrors.c
+if [ -z "$NOWEB_OUTPUT_DIR" ]; then NOWEB_OUTPUT_DIR=.; fi
+\end_layout
+
+\begin_layout Scrap
+notangle -L -Rlisterrors.c ${NOWEB_SOURCE} > ${NOWEB_OUTPUT_DIR}/listerrors.c
 \end_layout
 
 \begin_layout Scrap
@@ -1710,7 +1714,7 @@ build-script
 \begin_inset Newline newline
 \end_inset
 
-notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
+notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$r sh
 \end_layout
 
 \begin_layout LyX-Code
diff --git a/lib/examples/listerrors.lyx b/lib/examples/listerrors.lyx
index 7b5cbdc..2bbc925 100644
--- a/lib/examples/listerrors.lyx
+++ b/lib/examples/listerrors.lyx
@@ -1324,11 +1324,15 @@ if [ -z "$NOWEB_SOURCE" ]; then 
NOWEB_SOURCE=listerrors.nw; fi
 \end_layout
 
 \begin_layout Scrap
-notangle -Rlisterrors ${NOWEB_SOURCE} > listerrors
+if [ -z "$NOWEB_OUTPUT_DIR" ]; then NOWEB_OUTPUT_DIR=.; fi
 \end_layout
 
 \begin_layout Scrap
-chmod +x listerrors
+notangle -Rlisterrors ${NOWEB_SOURCE} > ${NOWEB_OUTPUT_DIR}/listerrors
+\end_layout
+
+\begin_layout Scrap
+chmod +x ${NOWEB_OUTPUT_DIR}/listerrors
 \end_layout
 
 \begin_layout Scrap

-----------------------------------------------------------------------

Summary of changes:
 lib/doc/Additional.lyx      |  100 ++++++-------------------------------------
 lib/doc/Customization.lyx   |   20 +++++++++
 lib/examples/Literate.lyx   |    8 +++-
 lib/examples/listerrors.lyx |    8 +++-
 4 files changed, 46 insertions(+), 90 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to