#LyX 2.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 431
+\lyxformat 445
\begin_document
\begin_header
\textclass scrbook
\font_roman default
\font_sans default
\font_typewriter default
+\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
-
\graphics default
\default_output_format default
\output_sync 1
\papercolumns 1
\papersides 2
\paperpagestyle headings
-\tracking_changes false
+\tracking_changes true
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict true
+\author 274215730 "scott"
\end_header
\begin_body
\end_layout
\begin_layout Standard
-As the bibliography list is in a comment, LaTeX won't use use it and the
- references will look like this: [?], instead of like this: [1].
+As the bibliography list is in a comment, LaTeX won't use it and the references
+ will look like this: [?], instead of like this: [1].
One solution is to use the LaTeX-package
\begin_inset Flex Code
status collapsed
\end_inset
-: name of the (temporary) exported .tex file
+: name of the (temporary) exported .tex file (without path)
+\end_layout
+
+\begin_layout Itemize
+\noindent
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+$$f
+\end_layout
+
+\end_inset
+
+: name of the (temporary) exported .tex file (including path)
\end_layout
\begin_layout Itemize
\end_inset
- module, which is loaded by default when when you select one of the AMS
- classes.
+ module, which is loaded by default when you select one of the AMS classes.
(It can also be used with other classes and can be removed, if you would
rather use something else.) Less commonly used environments are in the
\begin_inset Flex Code
\begin_layout Subsection
LyX and Literate Programming
+\change_inserted 274215730 1350434640
+ with Noweb
+\change_unchanged
+
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
-The down side of the Scrap paragraph layout is that consecutive paragraphs
- of code will be spaced with one empty line in the source code and also
- in the printed documentation.
+The down
+\change_deleted 274215730 1350432842
+
+\change_unchanged
+side of the Scrap paragraph layout is that consecutive paragraphs of code
+ will be spaced with one empty line in the source code and also in the printed
+ documentation.
The work around is to enter each line of code within a single Scrap, with
a newline (ctrl-return).
The example above will look like this:
\family typewriter
build-script $$i
\family default
-
+ $$r
\begin_inset Quotes erd
\end_inset
\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
\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
\family typewriter
-parselog=listerrors
+parselog=$$s/scripts/listerrors
\family default
\begin_inset Quotes erd
program.
\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.
\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
\end_inset
[...
- code to extract files ...]
+ code to extract files ...
+ use NOWEB_OUTPUT_DIR here ...]
\begin_inset Newline newline
\end_inset
\begin_inset Quotes eld
\end_inset
-Conversion
+File Handling
\begin_inset Quotes erd
\end_inset
\begin_inset Quotes eld
\end_inset
-literate
+NoWeb
\begin_inset Quotes erd
\end_inset
\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
\family typewriter
build-script $$i
\family default
-
+ $$r
\begin_inset Quotes erd
\end_inset
\family typewriter
-originaldir,parselog=listerrors
+parselog=$$s/scripts/listerrors
\family default
\begin_inset Quotes erd
\end_layout
\begin_layout Standard
-I take advantage of the new created LyX server function and this ddd feature,
- and set
+I take advantage of the new
+\change_inserted 274215730 1350432999
+ly
+\change_unchanged
+ created LyX server function and this ddd feature, and set
\begin_inset Quotes eld
\end_inset
\begin_layout Standard
With this, whenever you are using ddd and find a point in the program that
you want to edit, you just press shift-ctrl-V (in the ddd window), and
- ddd you forward this information to LyX through the LyX server and then
- the LyX window will show the same file with the cursor at the same position
- ddd was pointing to.
+ ddd
+\change_deleted 274215730 1350433047
+you
+\change_inserted 274215730 1350433047
+will
+\change_unchanged
+ forward this information to LyX through the LyX server and then the LyX
+ window will show the same file with the cursor at the same position ddd
+ was pointing to.
No more guessing or long scrolling to locate a point in the program back
from debugging !
\end_layout
I recommend you choosing a color that is close to the background but not
equal, that way you still can see it is there, but it is not bothering
you anymore.
+
+\change_deleted 274215730 1350434691
+\change_inserted 274215730 1350434708
+
+\end_layout
+
+\begin_layout Subsection
+
+\change_inserted 274215730 1350434732
+LyX and knitr/Sweave
+\end_layout
+
+\begin_layout Standard
+
+\change_inserted 274215730 1350434777
+Support for knitr and Sweave is documented in the knitr.lyx example file
+ and in the Sweave manual (in the Help > Specific Manuals submenu).
+\change_unchanged
+
\end_layout
\begin_layout Chapter