Thread View: bit.listserv.script-l
1 messages
1 total messages
Started by Michael Friendly
Fri, 30 Oct 1992 04:38
Re: Waterloo SCRIPT output for on-line viewing
Author: Michael Friendly
Date: Fri, 30 Oct 1992 04:38
Date: Fri, 30 Oct 1992 04:38
76 lines
3142 bytes
3142 bytes
On Thu, 29 Oct 1992 10:27:46 EST Jeff Brooks said:
>We would like to use Waterloo SCRIPT to format documents for
>on-line viewing using Gopher or some other campus-wide information
>system. We have the following problems:
>
> 1. Underscored/overstruck text is displayed using several output
> lines per line of text. This is fine for printer output, but
> terribly confusing to on-line viewing. We _could_ write dummy
> tag code for every tag that produces emphasized text, but we
> would still miss, e.g., places where a function was used to
> select boldface text.
>
> 2. SCRIPT seems to append quite a number of blanks lines at the
> end of each document.
>
A simple solution is to filter the listing file. If you have
CMS pipes, here's a program that solves (1) and can be adjusted
to solve (2) [it was designed to mimic the page appearance of
the listing file, hence includes the blanks at the end of each
page - passing a pagesize argument of 0 should cure that.]
+========================================== Beginning of ASA2MEMO EXEC
/* convert listing file to memo file */
arg fn ft fm
'pipe disk' fn ft fm '| asa2memo | >' fn 'memo' fm
-================================================ End of ASA2MEMO EXEC
+========================================== Beginning of ASA2MEMO REXX
/* convert a listing file (ASA control chars) to memo file */
arg ps .
signal on error
lines=0
hexin = 'BFAFFA'x ||, /* underline, bullet, vert bar */
'ACBCABBB'x ||, /* box corners */
'CCCBEBEC'x
hexout= '-*|' || '++++++++'
if ps='' | datatype(ps,'w')=0 ,
then pagesize = 56
else pagesize = ps
do forever
'readto record'
parse var record 1 cc 2 rest
rest=translate(rest,hexout,hexin) /* translate fancy characters */
select
when cc='+' then iterate /* ignore this record */
when cc=' ' then do
'output' rest
lines = lines+1
end
when cc='0' then do
'output '
'output' rest
lines = lines+2
end
when cc='-' then do
'output '
'output '
'output' rest
lines = lines+3
end
when cc='1' then do
if lines > 0 then do
do l=lines to pagesize
'output '
end
'output' rest
end
lines = 0
end
otherwise 'output' rest
end
end
Error: exit RC*(RC^=12)
-================================================ End of ASA2MEMO REXX
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads