Re: R-alpha: Version 0.4 : patches for manuals 'help & latex'

Martin Maechler (maechler@stat.math.ethz.ch)
Mon, 1 Apr 96 19:56:38 +0200


Date: Mon, 1 Apr 96 19:56:38 +0200
Message-Id: <9604011756.AA11361@>
From: Martin Maechler <maechler@stat.math.ethz.ch>
To: R-testers@stat.math.ethz.ch
In-Reply-To: <199604011408.JAA25674@desire.stat.cmu.edu> (message from Mike
Subject: Re: R-alpha: Version 0.4 : patches for manuals 'help & latex'

1) A warning:
	My fix to the   src/manual/help/
	FAILS on some architectures  (e.g. our SunOS 4.1.x)
	-----
  Reason: On some platforms 'sed' and or 'tr'  are not 8-bit clean...

  If you have perl (I hope you do...),
  do the following (in src/manual/help/ ):

----------------------------- call this  rm.multiple.empty and  "chmod +x" --
#!/usr/local/bin/perl -w
#
## Replace multiple empty lines by single empty lines
## -- but still leave ONE EMPTY !!

$/="\n\n"; # input  record separator
Para: 
 while (<>) { 
 print $_ unless /^\n\n$/
}
----------------------------- end of  rm.multiple.empty ---------------

In the file   'help.format' , replace the inner of the  'for' loop by

do
  ## at the end: replace multiple empty lines by single empty lines:
  ./doc2ms src/$i | nroff -ms | ./rm.multiple.empty > ../../../help/$i
  echo $i
done



2) The 'latex' Makefile is also still buggy :

Here is a 'Makefile'  for

	./src/manual/latex/

which is fixed.
You don't need 'make sources;make' anymore, just type   'make' now ...

- cut here --- o< -- o< -----------------------------------------------------

##-- Makefile in   manual/latex  ; fixed to be okay.
##-- 		   ~~~~~~~~~~~~    Now, a second "make" doesn't have to redo...
DVIdir = ../../../dvi

Man.dvi: doc.tex Man.tex
	@echo making latex documentation.
	latex Man
	mkdir -p ${DVIdir}
	cp -p Man.tex doc.tex  ${DVIdir}
	mv Man.dvi ${DVIdir}
	ln -s  ${DVIdir}/Man.dvi .
	@echo 'latex documents placed in  ${DVIdir}'

sources: doc.tex
doc.tex:
	@echo building latex source files
	mkdir -p src; cd src; rm -f *
	cd src; ln -s ../../man/* .
	cd src ; ../doc2latex `ls | sort -f` > ../doc.tex

print:	Man.dvi
	dvips -f Man.dvi | lpr

print2:	Man.dvi
	dvips -f Man.dvi | mpage -P -2  > Man.ps
	lpr -s Man.ps

clean:
	@echo cleaning in manual/latex
	-rm -f *.aux *.dvi *.log doc.tex *.ps
	-cd src; rm -f *

- cut here --- o< -- o< -----------------------------------------------------
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-