rrevweb<-function(filename,file.path="\\spluswin\\home"){ cat("rrevweb4---version: 30.5.1996---pnaeve/pwolf\n") cat(" angepasst fuer win* und R 2.6.2000, pwolf\n") revweb.path<-"..\\..\\revweb" if(missing(filename)){ cat("Usage:\n") cat(" revweb()\n") cat(" revweb(,)\n") cat(paste(" revweb(\"work.rev\",\"\\\\user1\\\\myweb\")\n\n")) cat("Implementations-Voraussetzungen fuer rrevweb: \n") cat(" 1. lege neben dem Verzeichnis, in dem R installiert ist,\n") cat(" ein Verzeichnis mit dem Namen revweb an.\n") cat(" Z.B. falls R so angelegt ist: \\software\\R\\rw1001\n") cat(" mkdir \\software\\R\\revweb\n") cat(" 2. entpacke revweb.zip in dieses Verzeichnis\n") cat(" 3. lade die Funktion rrevweb in den R-Interpreter:\n") cat(" source(\"??\\\\rrevweb.sch\") \n") return() } n<-nchar(filename) h<-"."==substring(filename,1:n,1:n) if(all(h==F)){ fn<-filename filename<-paste(filename,".rev",sep="") } else { pp<-max((1:n)[h]) h<-"\\"==substring(filename,1:n,1:n) bp<-max((1:n)[h]) if((!is.na(bp))&&bp>pp){ fn<-filename filename<-paste(filename,".rev",sep="") } else { fn<-substring(filename,1,pp-1) } } sink("..\\..\\revweb\\revweb.bat") cat("@echo off\n") cat(paste("if not exist ",file.path,"\\",filename," goto error\n",sep="")) cat(paste("copy ",file.path,"\\",filename," ", revweb.path,"\\work.rev\n",sep="")) cat(paste("cd ",revweb.path,"\n")) cat("markup work.rev > work.mu\n") cat("del work.tmp\n") cat("gawk-dos -f start.awk work.rev > work.sch\n") cat("if not exist work.tmp goto noini\n") cat("type work.sta > work.tmp\n") cat("type work.mu | nt -Rstart >> work.tmp\n") cat("type work.ste >> work.tmp\n") cat(":noini\n") cat("gawk-dos -f twebnum.awk work.mu | nt >> work.tmp\n") cat("gawk-dos -f delcopy.awk work.tmp > work.sch\n") cat("gawk-dos -f umlaute.awk work.mu > work.tex\n") cat("type work.tex | noidx | totex -delay > work.tmp\n") cat("gawk-dos -f ausblend.awk work.tmp > work.tex\n") cat("type work.end >> work.tex\n") cat("gawk-dos -f textract.awk work.mu > work.tch\n") cat(paste("copy work.tex ",file.path,"\\",fn,".tex\n",sep="")) cat(paste("copy work.tch ",file.path,"\\",fn,".tch\n",sep="")) cat(paste("copy work.sch ",file.path,"\\",fn,".sch\n",sep="")) cat("goto end\n") cat(":error\n") cat(paste("echo ERROR: filename", filename, "not found\n")) cat("goto end\n") cat(":end\n") cat("pause\n") sink() system("..\\..\\revweb\\revweb") }