weaveR                 package:relax                 R Documentation

_f_u_n_c_t_i_o_n _t_o _w_e_a_v_e _a _f_i_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     'weaveR' reads a file that is written according to the rules of
     the 'noweb' system and performs a simple kind of weaving. As a
     result a LaTeX file is generated.

_U_s_a_g_e:

     weaveR(in.file,out.file)

_A_r_g_u_m_e_n_t_s:

 in.file: name of input file 

out.file: name of output file; if missing the extension of the input
          file is turned to '.tex' 

_D_e_t_a_i_l_s:

     General remarks: A 'noweb' file consists of a mixture of text and
     code chunks. An '@' character (in column 1 of a line) indicates
     the beginning of a text chunk. '<<name of code chunk>>=' (starting
     at column 1 of a line) is a header line of a code chunk with a
     name defined by the text between '<<' and '>>='. A code chunk is
     finished by the beginning of hte next text chunk. Within the code
     chunk you are allowed to use other code chunks by referencing them
     by name ( for example by: '<<name of code chunk>>' ). In this way
     you can separate a big job in smaller ones.

     Technical remarks: To format small pieces of code in text chunks
     you have to put them in '[[...]]'-brackets: 'text text [[code]]
     text text'. One occurence of such a code in a text line is assumed
     to work always. If an error emerges caused by formatting code in a
     text chunk simplify the line by splitting it. Sometimes you want
     to use '[['- or even '<<'-characters in your text. Then it may be
     necessary to escape them by an '@'-sign and you have to type in:
     '@<<', '@[[' and so on.

     'weaveR' expands the input by adding some latex macros to typeset
     code by a typewriter font. Furthermore chunk numbers are appended
     to code chunk headers. The number of the last code chunk is stored
     in LaTeX-counter 'Rchunkno'. After defining
     '\newcommand{\chunklabel}[1]{\newcounter{#1}\setcounter{#1}{\value
     {Rchunkno} } }' and '\newcommand{\chunkref}[1]{\arabic{#1} } ' you
     can label a code chunk by '\chunklabel{xyzname} ' and reference it
     by '\chunkref{xyzname} '.

_V_a_l_u_e:

     a latex file is generated

_A_u_t_h_o_r(_s):

     Hans Peter Wolf

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.eecs.harvard.edu/~nr/noweb/intro.html>

_S_e_e _A_l_s_o:

     'tangleR'

_E_x_a_m_p_l_e_s:

     ## Not run: 
     ## This example cannot be run by examples() but should be work in an interactive R session
       weaveR("testfile.rev","testfile.tex")
       weaveR("testfile.rev")
     ## End(Not run)
     ## The function is currently defined as
     weaveR<-function(in.file,out.file){
       # german documentation of the code:
       # look for file webR.pdf, P. Wolf 050204
       ...
     }

