#!/bin/awk -f ############################################################################# # Sets up SASweave output routines for tangling (rather than weaving) # # Copyright (C) 2006 Russell V. Lenth - University of Iowa # Version: 2006.11.20 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## ### What to display at beginning of sasfile function fileStart () { print "*** SAS file generated by sastangle ***;\n" > sasfile print "options nocenter nodate nonumber ls=80 formdlim='';\n" >> sasfile } ### Function to NOT output any text-chunk lines! function put(stg) { } ### What to put in sasfile at beginning of a text chunk function beginText() { } ### What to put in sasfile at the end of a text chunk function endText() { if (lschanged) { print "options ls=" ls ";" >> sasfile lschanged = 0 } print "*** Code chunk number", chunkno " ***;" >> sasfile } ### What to put into sasfile to set up a graph function setupGraph() { # Obey hsize and vsize but don't set up a pdf file print "goptions hsize =", hsize, "in vsize =", vsize, "in;" >> sasfile } ### What to put into sasfile to set up a graph function setupsgGraph() { # Obey hsize and vsize but don't set up a pdf file print "ods graphics / noborder height =", hsize, "in width =", vsize, "in;" >> sasfile }