Part of the Samples Website. 8/16/97.

samples.basicStuff.quarkDocServer

«Flows DocServer text thru Quark XPress 3.2
«this is the first step in the process we're going to use
«for the next printing of the Frontier reference manual
on layoutDocPage (verbName) «layout DocServer page in XPress
DocServer.getVerbText (verbName)
with objectModel, QXP, defs «layout the page
local (docbox, styles)
on doSection (title, key)
local (s = DocServer.verbText.[key], ixpara)
if sizeOf (s) == 0 «no text in this section
return
styles = {font: "Palatino", size:12, style:plain, leftindent:"1.5"", firstindent:"0"", rulebelow:{ruleOn:false}}
with docbox.textflow [1]
ixpara = count (it, paragraph) «we may be about to create several paragraphs
create (paragraph, title + char (9) + s + cr, styles, endOf (it))
with paragraph [ixpara] «the 1st new para
set (firstindent, "-1.25"")
set (character [1 to sizeOf (title)].style, {onStyles: {bold}})
create (document, 0, 0, beginningOf (null))
with document[1].page[1]
local (rulerspec = {ruleOn:true, position:".1 cm", color:"Blue", width:2})
docbox = create (textbox, 0, {bounds: {".5"",".5"","8"","8""}}, beginningOf (it))
styles = {ruleBelow: rulerspec, font: "Palatino", size:24, style:{bold:true}, leftindent:"0"", firstindent:"0""}
create (paragraph, verbName + cr, styles, endOf (docbox.textflow [1]))
doSection ("Syntax", 'synt')
doSection ("Parameters", 'parm')
doSection ("Action", 'actn')
doSection ("Returns", 'rtrn')
doSection ("Examples", 'exmp')
doSection ("Notes", 'note')
doSection ("Errors", 'erro')
doSection ("See Also", 'seea')
return (true)
if app.start (DocServer) and app.start ("QXP")
«both DocServer and XPress are running
layoutDocPage ("file.exists")
layoutDocPage ("random")


This page was last built on Sat, Aug 16, 1997 at 6:39:03 PM. You can download the current set of sample scripts from our FTP site. Dave