home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / science / hyperbib.sit / HyperBibliography / background_5244.xml < prev    next >
Extensible Markup Language  |  1991-07-09  |  15KB  |  327 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>5244</id>
  5.     <filler1>0</filler1>
  6.     <bitmap>BMAP_5573.pbm</bitmap>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <link rel="stylesheet" type="text/css" href="stylesheet_3109.css" />
  11.     <part>
  12.         <id>1</id>
  13.         <type>field</type>
  14.         <visible> <true /> </visible>
  15.         <dontWrap> <false /> </dontWrap>
  16.         <dontSearch> <true /> </dontSearch>
  17.         <sharedText> <false /> </sharedText>
  18.         <fixedLineHeight> <false /> </fixedLineHeight>
  19.         <autoTab> <false /> </autoTab>
  20.         <lockText> <false /> </lockText>
  21.         <rect>
  22.             <left>7</left>
  23.             <top>67</top>
  24.             <right>251</right>
  25.             <bottom>339</bottom>
  26.         </rect>
  27.         <style>scrolling</style>
  28.         <autoSelect> <false /> </autoSelect>
  29.         <showLines> <false /> </showLines>
  30.         <wideMargins> <false /> </wideMargins>
  31.         <multipleLines> <false /> </multipleLines>
  32.         <reservedFamily> 0 </reservedFamily>
  33.         <titleWidth>0</titleWidth>
  34.         <icon>0</icon>
  35.         <textAlign>left</textAlign>
  36.         <font>Geneva</font>
  37.         <textSize>12</textSize>
  38.         <textStyle>plain</textStyle>
  39.         <textHeight>16</textHeight>
  40.         <name>References</name>
  41.         <script></script>
  42.     </part>
  43.     <part>
  44.         <id>2</id>
  45.         <type>button</type>
  46.         <visible> <true /> </visible>
  47.         <reserved5> 0 </reserved5>
  48.         <reserved4> 0 </reserved4>
  49.         <reserved3> 0 </reserved3>
  50.         <reserved2> 0 </reserved2>
  51.         <reserved1> 0 </reserved1>
  52.         <enabled> <true /> </enabled>
  53.         <rect>
  54.             <left>51</left>
  55.             <top>20</top>
  56.             <right>217</right>
  57.             <bottom>42</bottom>
  58.         </rect>
  59.         <style>roundrect</style>
  60.         <showName> <true /> </showName>
  61.         <highlight> <false /> </highlight>
  62.         <autoHighlight> <true /> </autoHighlight>
  63.         <sharedHighlight> <false /> </sharedHighlight>
  64.         <family>0</family>
  65.         <titleWidth>0</titleWidth>
  66.         <icon>0</icon>
  67.         <textAlign>center</textAlign>
  68.         <font>Chicago</font>
  69.         <textSize>12</textSize>
  70.         <textStyle>plain</textStyle>
  71.         <name>Make list of references</name>
  72.         <script>on mouseUpglobal unrealFirsts, specialWordsput "(," & tab & "," & numtochar(5) into unrealFirsts--tab gets counted as part of word, not as whitespace--ASCII 5 is character for footnote--for ref that occurs initially in fnput "and,van,der,den,de,et,al.,y" into specialWords --extra things in namesif bg fld "references" is not return thenanswer "Make new list, or add to the existing one?" with "Cancel" or "New" or "Add"if it is "cancel" or it is empty then exit mouseUpif it is "New" then put return into bg fld "references"end ifanswer file "Where is your text?"put it into theFileif theFile is empty then exit mouseUpset cursor to watchput "(," & tab & "," & numtochar(5) into unrealFirsts--tab gets counted as part of word, not as whitespace--ASCII 5 is character for footnote--for ref that occurs initially in fnopen file theFilerepeat forever--set cursor to busyread from file theFile until "1" --only works for dates 999 < >2000if it is empty then exit repeatput it into stuffread from file theFile for 4 --read 3 digits and a, b, etcput it after stuffif checkDate(stuff) thenput getRef(stuff) into theRefif char 1 of theRef is "1" then --i.e. author date, dateput theRef into the last word of prevRefput prevRef into theRefend ifif return & theRef is not in bg fld "references" then put theRef & return after bg fld "references"end ifput theRef into prevRefend repeatclose file theFilesort lines of bg fld "references"beep 2end mouseUpfunction checkDate theStuff --last word should be date between 999 < > 2000put the length of theStuff into howLongput char (howLong-4) to (howLong-1) of theStuff into theDateif theDate >999 and theDate < 2000 or char 4 of theDate is "?" thenreturn trueelse return falseend checkDatefunction getRef theStuff --extract reference from last few wordsglobal unrealFirstsput charToNum(the last char of theStuff) into lastNumif lastNum < 97 or lastNum > 122 then delete the last char of theStuff --not a, b, etcput the number of words in theStuff into totalput word total of theStuff into theRefrepeat with i = (total-1) down to 1 --last word is dateput word i of theStuff into thisWordif char 1 of thisWord is in unrealFirsts thendelete char 1 of thisWordput true into theFirstelse put false into theFirstif IsName(thisWord) thenput thisWord & space before theRefif theFirst thenexit repeatend ifelse exit repeatend repeatif word 1 of theRef is "and" then delete word 1 of theRefreturn theRefend getReffunction IsName theWord --is name or "and"global specialWordsif theWord is in specialWords then return true --special casesif theWord is "see" or theWord is "though" then return falseput char 1 of theWord into theCharput CharToNum(theChar) into theNumif theNum > 64 and theNum < 91 then --only works if the first letter is A-Zreturn trueelse return falseend IsName</script>
  73.     </part>
  74.     <part>
  75.         <id>3</id>
  76.         <type>button</type>
  77.         <visible> <true /> </visible>
  78.         <reserved5> 0 </reserved5>
  79.         <reserved4> 0 </reserved4>
  80.         <reserved3> 0 </reserved3>
  81.         <reserved2> 0 </reserved2>
  82.         <reserved1> 0 </reserved1>
  83.         <enabled> <true /> </enabled>
  84.         <rect>
  85.             <left>487</left>
  86.             <top>21</top>
  87.             <right>512</right>
  88.             <bottom>42</bottom>
  89.         </rect>
  90.         <style>transparent</style>
  91.         <showName> <false /> </showName>
  92.         <highlight> <false /> </highlight>
  93.         <autoHighlight> <true /> </autoHighlight>
  94.         <sharedHighlight> <false /> </sharedHighlight>
  95.         <family>0</family>
  96.         <titleWidth>0</titleWidth>
  97.         <icon>1012</icon>
  98.         <textAlign>center</textAlign>
  99.         <font>Chicago</font>
  100.         <textSize>12</textSize>
  101.         <textStyle>plain</textStyle>
  102.         <name>Return</name>
  103.         <script>on mouseUppop cdend mouseUp</script>
  104.     </part>
  105.     <part>
  106.         <id>7</id>
  107.         <type>field</type>
  108.         <visible> <true /> </visible>
  109.         <dontWrap> <false /> </dontWrap>
  110.         <dontSearch> <true /> </dontSearch>
  111.         <sharedText> <false /> </sharedText>
  112.         <fixedLineHeight> <false /> </fixedLineHeight>
  113.         <autoTab> <false /> </autoTab>
  114.         <lockText> <true /> </lockText>
  115.         <rect>
  116.             <left>259</left>
  117.             <top>67</top>
  118.             <right>503</right>
  119.             <bottom>339</bottom>
  120.         </rect>
  121.         <style>scrolling</style>
  122.         <autoSelect> <false /> </autoSelect>
  123.         <showLines> <false /> </showLines>
  124.         <wideMargins> <false /> </wideMargins>
  125.         <multipleLines> <false /> </multipleLines>
  126.         <reservedFamily> 0 </reservedFamily>
  127.         <titleWidth>0</titleWidth>
  128.         <icon>0</icon>
  129.         <textAlign>left</textAlign>
  130.         <font>Geneva</font>
  131.         <textSize>12</textSize>
  132.         <textStyle>plain</textStyle>
  133.         <textHeight>16</textHeight>
  134.         <name>Missing</name>
  135.         <script>on mouseUpif the optionKey is down then edit the script of meelseselect the clickLineput the selection into theEntryset the cursor to watchput the last word of theEntry into theDatedelete the last word of theEntryif the length of theDate = 5 then delete the last char of theDatelock screenpush cdgo cd 1put 0 into lastCdrepeat foreverfind theEntry in bg fld "1st last"if the result is "not found" or the number of this cd <= lastCd then --2nd conjunct means have circled aroundbeeppop cdexit repeatend ifput the number of this cd into lastCdif theDAte is in bg fld "date" then exit repeatend repeatend ifend mouseUp</script>
  136.     </part>
  137.     <part>
  138.         <id>8</id>
  139.         <type>button</type>
  140.         <visible> <true /> </visible>
  141.         <reserved5> 0 </reserved5>
  142.         <reserved4> 0 </reserved4>
  143.         <reserved3> 0 </reserved3>
  144.         <reserved2> 0 </reserved2>
  145.         <reserved1> 0 </reserved1>
  146.         <enabled> <true /> </enabled>
  147.         <rect>
  148.             <left>93</left>
  149.             <top>43</top>
  150.             <right>167</right>
  151.             <bottom>65</bottom>
  152.         </rect>
  153.         <style>roundrect</style>
  154.         <showName> <true /> </showName>
  155.         <highlight> <false /> </highlight>
  156.         <autoHighlight> <true /> </autoHighlight>
  157.         <sharedHighlight> <false /> </sharedHighlight>
  158.         <family>0</family>
  159.         <titleWidth>0</titleWidth>
  160.         <icon>0</icon>
  161.         <textAlign>center</textAlign>
  162.         <font>Chicago</font>
  163.         <textSize>12</textSize>
  164.         <textStyle>plain</textStyle>
  165.         <name>Clear List</name>
  166.         <script>on mouseUpput return into bg fld "references"end mouseUp</script>
  167.     </part>
  168.     <part>
  169.         <id>9</id>
  170.         <type>button</type>
  171.         <visible> <true /> </visible>
  172.         <reserved5> 0 </reserved5>
  173.         <reserved4> 0 </reserved4>
  174.         <reserved3> 0 </reserved3>
  175.         <reserved2> 0 </reserved2>
  176.         <reserved1> 0 </reserved1>
  177.         <enabled> <true /> </enabled>
  178.         <rect>
  179.             <left>322</left>
  180.             <top>20</top>
  181.             <right>416</right>
  182.             <bottom>42</bottom>
  183.         </rect>
  184.         <style>roundrect</style>
  185.         <showName> <true /> </showName>
  186.         <highlight> <false /> </highlight>
  187.         <autoHighlight> <true /> </autoHighlight>
  188.         <sharedHighlight> <false /> </sharedHighlight>
  189.         <family>0</family>
  190.         <titleWidth>0</titleWidth>
  191.         <icon>0</icon>
  192.         <textAlign>center</textAlign>
  193.         <font>Chicago</font>
  194.         <textSize>12</textSize>
  195.         <textStyle>plain</textStyle>
  196.         <name>Mark entries</name>
  197.         <script>on mouseUpset cursor to watchput empty into bg fld "missing"put "The following are missing:" & return into missingput return & "The following should be verified:" & return into verifyrepeat with i = 1 to the number of lines in bg fld "references"put word 1 of line i of bg fld "references" into firstName--put firstNameput 1 into howManyput empty into otherNamerepeat with j = 2 to (the number of words in line i of bg fld "references" -1)put word j of line i of bg fld "references" into itif it is "and" thenput 2 into howManynext repeatelse if it is "et" or it is "al" thenput 3 into howManyexit repeatend ifput it into otherNameend repeatput the last word of line i of bg fld "references" into theDateput the last char of theDate into lastCharif lastChar < 0 or lastChar > 9 then delete the last char of theDateelse put empty into lastCharput findMark(firstName,otherName,theDate,howMany) into foundif found is false thenput firstname && othername && theDate & lastChar & return after missingelse if found is "maybe" thenput firstname && othername && theDate & lastChar & return after verifyend ifend repeatif the number of lines in missing > 1 then put missing into bg fld "missing"if the number of lines in verify > 1 then put verify after bg fld "missing"beep 2end mouseUpfunction findMark firstName, otherName, theDate, howManylock screenpush this cd-- go cd 1put false into foundput 0 into thisCdrepeat foreverfind firstName in bg fld "1st last"if the result is "not found" thenput false into foundexit repeatend ifput thisCd into lastCdput the number of this cd into thisCdif thisCd <= lastCd then exit repeatif theDate is not in bg fld "date" then next repeatput the number of lines in bg fld "2+ last" into othersif howMany is 1 and others is 0 thenset the hilite of bg btn "include" to trueif found is true then put "maybe" into foundelse if found is false thenput true into foundend ifelse if howMany is 2 and others is 1 thenif otherName is in bg fld "2+ last" thenset the hilite of bg btn "include" to trueif found is true then put "maybe" into foundelse if found is false then put true into foundend ifelse if howMany is 3 and others > 1 thenset the hilite of bg btn "include" to trueif found is true then put "maybe" into foundelse if found is false then put true into foundend ifend repeatpop cdunlock screenreturn foundend findMark</script>
  198.     </part>
  199.     <part>
  200.         <id>10</id>
  201.         <type>button</type>
  202.         <visible> <true /> </visible>
  203.         <reserved5> 0 </reserved5>
  204.         <reserved4> 0 </reserved4>
  205.         <reserved3> 0 </reserved3>
  206.         <reserved2> 0 </reserved2>
  207.         <reserved1> 0 </reserved1>
  208.         <enabled> <true /> </enabled>
  209.         <rect>
  210.             <left>334</left>
  211.             <top>44</top>
  212.             <right>408</right>
  213.             <bottom>66</bottom>
  214.         </rect>
  215.         <style>roundrect</style>
  216.         <showName> <true /> </showName>
  217.         <highlight> <false /> </highlight>
  218.         <autoHighlight> <true /> </autoHighlight>
  219.         <sharedHighlight> <false /> </sharedHighlight>
  220.         <family>0</family>
  221.         <titleWidth>0</titleWidth>
  222.         <icon>0</icon>
  223.         <textAlign>center</textAlign>
  224.         <font>Chicago</font>
  225.         <textSize>12</textSize>
  226.         <textStyle>plain</textStyle>
  227.         <name>Clear List</name>
  228.         <script>on mouseUpput empty into bg fld "missing"end mouseUp</script>
  229.     </part>
  230.     <part>
  231.         <id>11</id>
  232.         <type>button</type>
  233.         <visible> <true /> </visible>
  234.         <reserved5> 0 </reserved5>
  235.         <reserved4> 0 </reserved4>
  236.         <reserved3> 0 </reserved3>
  237.         <reserved2> 0 </reserved2>
  238.         <reserved1> 0 </reserved1>
  239.         <enabled> <true /> </enabled>
  240.         <rect>
  241.             <left>445</left>
  242.             <top>44</top>
  243.             <right>512</right>
  244.             <bottom>65</bottom>
  245.         </rect>
  246.         <style>roundrect</style>
  247.         <showName> <true /> </showName>
  248.         <highlight> <false /> </highlight>
  249.         <autoHighlight> <true /> </autoHighlight>
  250.         <sharedHighlight> <false /> </sharedHighlight>
  251.         <family>0</family>
  252.         <titleWidth>0</titleWidth>
  253.         <icon>0</icon>
  254.         <textAlign>center</textAlign>
  255.         <font>Chicago</font>
  256.         <textSize>12</textSize>
  257.         <textStyle>plain</textStyle>
  258.         <name>Citations</name>
  259.         <script>on mouseUppush this cdgo to cd "Citation List"end mouseUp</script>
  260.     </part>
  261.     <part>
  262.         <id>12</id>
  263.         <type>field</type>
  264.         <visible> <false /> </visible>
  265.         <dontWrap> <false /> </dontWrap>
  266.         <dontSearch> <false /> </dontSearch>
  267.         <sharedText> <false /> </sharedText>
  268.         <fixedLineHeight> <false /> </fixedLineHeight>
  269.         <autoTab> <false /> </autoTab>
  270.         <lockText> <false /> </lockText>
  271.         <rect>
  272.             <left>146</left>
  273.             <top>104</top>
  274.             <right>365</right>
  275.             <bottom>219</bottom>
  276.         </rect>
  277.         <style>shadow</style>
  278.         <autoSelect> <false /> </autoSelect>
  279.         <showLines> <false /> </showLines>
  280.         <wideMargins> <false /> </wideMargins>
  281.         <multipleLines> <false /> </multipleLines>
  282.         <reservedFamily> 0 </reservedFamily>
  283.         <titleWidth>0</titleWidth>
  284.         <icon>0</icon>
  285.         <textAlign>left</textAlign>
  286.         <font>Geneva</font>
  287.         <textSize>12</textSize>
  288.         <textStyle>plain</textStyle>
  289.         <textHeight>16</textHeight>
  290.         <name>HelpFld</name>
  291.         <script></script>
  292.     </part>
  293.     <part>
  294.         <id>14</id>
  295.         <type>button</type>
  296.         <visible> <true /> </visible>
  297.         <reserved5> 0 </reserved5>
  298.         <reserved4> 0 </reserved4>
  299.         <reserved3> 0 </reserved3>
  300.         <reserved2> 0 </reserved2>
  301.         <reserved1> 0 </reserved1>
  302.         <enabled> <true /> </enabled>
  303.         <rect>
  304.             <left>220</left>
  305.             <top>21</top>
  306.             <right>319</right>
  307.             <bottom>39</bottom>
  308.         </rect>
  309.         <style>checkbox</style>
  310.         <showName> <true /> </showName>
  311.         <highlight> <true /> </highlight>
  312.         <autoHighlight> <false /> </autoHighlight>
  313.         <sharedHighlight> <true /> </sharedHighlight>
  314.         <family>0</family>
  315.         <titleWidth>0</titleWidth>
  316.         <icon>0</icon>
  317.         <textAlign>center</textAlign>
  318.         <font>Chicago</font>
  319.         <textSize>12</textSize>
  320.         <textStyle>outline</textStyle>
  321.         <name>Show Help</name>
  322.         <script>on mouseUpglobal showHelp, fromHereput not(the hilite of me) into showHelpset the hilite of me to showHelpif showHelp thendoCopyrightput true into fromHere --show helpFld when have clickedsend mouseEnter to the targetelseput false into fromHeresend mouseLeave to the targetend ifend mouseUpon mouseLeaveglobal fromHereif not fromHere then pass mouseLeave --don't hide helpFld when have clicked here (otherwise stack script will)else put false into fromHere --have already clicked hereend mouseLeave</script>
  323.     </part>
  324.     <name></name>
  325.     <script></script>
  326. </background>
  327.