diff options
author | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:38:23 +0000 |
---|---|---|
committer | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:38:23 +0000 |
commit | 78c2bcf9e96ab00615ee6f96905bca78fcd52a00 (patch) | |
tree | 9c7e31f2a59e174433e55b589771005b48a34158 /include | |
parent | 9daa98ce90ceeeaba9e942d28575d8fcfe36db4b (diff) | |
download | lout-78c2bcf9e96ab00615ee6f96905bca78fcd52a00.tar.gz |
Lout 3.27.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@23 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'include')
-rw-r--r-- | include/README | 97 | ||||
-rw-r--r-- | include/book | 37 | ||||
-rw-r--r-- | include/bookf | 40 | ||||
-rw-r--r-- | include/bsf | 194 | ||||
-rw-r--r-- | include/bsf.bk | 1618 | ||||
-rw-r--r-- | include/ccommand | 113 | ||||
-rw-r--r-- | include/coltex | 417 | ||||
-rw-r--r-- | include/diag | 85 | ||||
-rw-r--r-- | include/diagf | 209 | ||||
-rw-r--r-- | include/diagf.lpg | 29 | ||||
-rw-r--r-- | include/doc | 33 | ||||
-rw-r--r-- | include/dsf | 617 | ||||
-rw-r--r-- | include/figf.lpg | 60 | ||||
-rw-r--r-- | include/graphf | 427 | ||||
-rw-r--r-- | include/graphf.lpg | 62 | ||||
-rw-r--r-- | include/lengths | 150 | ||||
-rw-r--r-- | include/picture | 34 | ||||
-rw-r--r-- | include/pie | 109 | ||||
-rw-r--r-- | include/pief | 409 | ||||
-rw-r--r-- | include/pief.lpg | 485 | ||||
-rw-r--r-- | include/report | 40 | ||||
-rw-r--r-- | include/reportf | 49 | ||||
-rw-r--r-- | include/slides | 34 | ||||
-rw-r--r-- | include/tbl | 5 | ||||
-rw-r--r-- | include/tblf | 84 | ||||
-rw-r--r-- | include/xrgb | 680 |
26 files changed, 3534 insertions, 2583 deletions
diff --git a/include/README b/include/README index ce43384..135cb4b 100644 --- a/include/README +++ b/include/README @@ -1,86 +1,97 @@ Directory lout/include This directory contains Lout source files for the standard packages. -The following listing classifies them into types of files. +The following listing classifies them into types of files. Ordinary +users only need to know about setup files, not source files. Setup files (containing mainly lists of options settable by the user) --------------------------------------------------------------------- Setup files for basic document types (choose one): - doc The OrdinarySetup package - report The ReportSetup package - book The BookSetup package - slides The OverheadsSetup package - picture The IllustrationSetup package + doc OrdinarySetup package + report ReportSetup package + book BookSetup package + slides OverheadsSetup package + picture IllustrationSetup package Setup files for special-purpose packages (choose any combination): - tbl The Tbl table formatting package - tab The Tab table formatting package (OBSOLETE, use tbl) - eq The Eq equation formatting package - diag The Diag diagram drawing package - fig The Fig advanced graphics package (OBSOLETE, use diag) - graph The Graph graph drawing package - pas The Pas Pascal progam printing package - modula The Modula Modula-2 progam printing package - latin2 The Latin2 (Eastern European characters) package - russian The Russian language package + diag Diag diagram drawing package + eq Eq equation formatting package + graph Graph graph drawing package + latin2 Latin2 (Eastern European characters) package + pie Pie pie graph drawing package + russian Russian language package + tbl Tbl table formatting package + xrgb @Xrgb symbol (extra named colours) Setup files for program formatting packages (choose any combination): + blue Blue cprint C and C++ eiffel Eiffel - blue Blue + java Java + modula Modula-2 (quick hack, does not use prg2lout) + pas Pascal (quick hack, does not use prg2lout) perl Perl + Pod pod Pod python Python -Source files (containing Lout and PostScript source code for the packages) --------------------------------------------------------------------------- +Source files containing Lout and PostScript source code for the packages +------------------------------------------------------------------------ - bsf The BasicSetup package - ccommand Definition of the @ColourCommand symbol + bsf BasicSetup package bsf.lpg A PostScript prepend file needed by BasicSetup - dsf The DocumentSetup package - docf The OrdinarySetup package - reportf The ReportSetup package - bookf The BookSetup package - slidesf The OverheadsSetup package - picturef The IllustrationSetup package - - tabf The Tab table formatting package (OBSOLETE) - tabf.lpg A PostScript prepend file needed by tabf (OBSOLETE) - tblf The Tbl table formatting package - eqf The Eq equation formatting package - figf The Fig advanced graphics package (OBSOLETE) - figf.lpg A PostScript prepend file needed by figf (OBSOLETE) - diagf The Diag diagram drawing package + dsf DocumentSetup package + docf OrdinarySetup package + reportf ReportSetup package + bookf BookSetup package + slidesf OverheadsSetup package + picturef IllustrationSetup package + + diagf Diag diagram drawing package diagf.etc A file included by diagf diagf.lpg A PostScript prepend file needed by diagf - graphf The Graph graph drawing package + eqf Eq equation formatting package + graphf Graph graph drawing package graphf.etc A file included by graphf graphf.lpg A PostScript prepend file needed by graphf - pasf Pascal - modulaf Modula-2 - latin2.fd Latin2 font definitions file (placeholder file) + pief Pie diagram drawing package + pief.lpg A PostScript prepend file needed by pief russian.fd Russian font definitions file (placeholder file) + tblf Tbl table formatting package + bluef Blue cprintf C and C++ eiffelf Eiffel - bluef Blue + javaf Java + modulaf Modula-2 + pasf Pascal perlf Perl podf Pod pythonf Python -Miscellaneous -------------- +Obsolete source files retained for backward compatibility +--------------------------------------------------------- + + tab Tab table formatting package (OBSOLETE, use tbl) + tabf Tab table formatting package (OBSOLETE) + tabf.lpg A PostScript prepend file needed by tabf (OBSOLETE) + fig Fig advanced graphics package (OBSOLETE, use diag) + figf Fig advanced graphics package (OBSOLETE) + figf.lpg A PostScript prepend file needed by figf (OBSOLETE) + +Miscellaneous source files +-------------------------- langdefs Standard language definitions file + lengths Helper definitions: @PSLengths and @LoutLengths + coltex Helper definitions: @ColourCommand and @TextureCommand mydefs Empty file for if the user doesn't have a mydefs ts The ToySetup package (an expert users' intro. example) init A Lout source file used during installation (lout -x) Jeffrey H. Kingston -21 October 2001 +30 October 2002 diff --git a/include/book b/include/book index ec4d5c1..d823ab7 100644 --- a/include/book +++ b/include/book @@ -144,34 +144,68 @@ # @RefListBreak { } # break style of ref list # @RefListLabelWidth { @ListLabelWidth } # Labels column width # @RefListSortKey { @Tag } # sorting key + # @MakeGlossary { No } # make glossary? Yes or No + # @GlossaryText { @Null } # glossary initial text + # @GlossaryFont { } # glossary entries font + # @GlossaryBreak { } # glossary entries break + # @GlossaryFormat { +3p @Font @S @Name # glossary entries format + # @Right @I { @Word&&page @PageNum } + # @DP @RawIndentedDisplay @Body } + # @GlossaryGap { @DisplayGap } # gap between glossary entries + # @GlossaryColumnNumber{ 2 } # glossary columns (1 to 10) + # @GlossaryColumnGap { 1.00c @OrIfPlain 6s } # glossary column gap + # @InGlossaryFont { smallcaps } # font for @InGlossary + # @InGlossaryFormat { @Body } # format for @InGlossary + # @MakeIndex { No } # make index? Yes or No # @MakeIndex { No } # make index? Yes or No @MakeIndex { Yes } # make index? Yes or No # @IndexText { @Null } # index initial text # @IndexFont { } # index entries font # @IndexBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexFormat { @Body } # @Index format + # @SubIndexFormat { {1f @Wide}@Body } # @SubIndex format + # @SubSubIndexFormat { {2f @Wide}@Body } # @SubSubIndex format # @IndexColumnNumber { 2 } # index columns (1 to 10) # @IndexColumnGap { 1.00c @OrIfPlain 6s } # index column gap # @IndexCtd { Yes } # include (ctd.) lines # @IndexCtdWord { continued } # "ctd." in current lang. # @IndexCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexSpacerAbove { 2v } # space above index spacer + # @IndexSpacerBelow { 1v } # space below index spacer + # @IndexSpacerFont { +3p } # font of index spacer + # @IndexSpacerFormat { @Body } # format of index spacer # @MakeIndexA { No } # make index A? Yes or No # @IndexAText { @Null } # index A initial text # @IndexAFont { } # index A entries font # @IndexABreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexAFormat { @Body } # @IndexA format + # @SubIndexAFormat { {1f @Wide}@Body } # @SubIndexA format + # @SubSubIndexAFormat { {2f @Wide}@Body } # @SubSubIndexA format # @IndexAColumnNumber { 2 } # index A columns (1 to 10) # @IndexAColumnGap { 1.00c @OrIfPlain 6s } # index A column gap # @IndexACtd { Yes } # include (ctd.) lines # @IndexACtdWord { continued } # "ctd." in current lang. # @IndexACtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexASpacerAbove { 2v } # space above index A spacer + # @IndexASpacerBelow { 1v } # space below index A spacer + # @IndexASpacerFont { +3p } # font of index A spacer + # @IndexASpacerFormat { @Body } # format of index A spacer # @MakeIndexB { No } # make index B? Yes or No # @IndexBText { @Null } # index B initial text # @IndexBFont { } # index B entries font # @IndexBBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexBFormat { @Body } # @IndexB format + # @SubIndexBFormat { {1f @Wide}@Body } # @SubIndexB format + # @SubSubIndexBFormat { {2f @Wide}@Body } # @SubSubIndexB format # @IndexBColumnNumber { 2 } # index B columns (1 to 10) # @IndexBColumnGap { 1.00c @OrIfPlain 6s } # index B column gap # @IndexBCtd { Yes } # include (ctd.) lines # @IndexBCtdWord { continued } # "ctd." in current lang. # @IndexBCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexBSpacerAbove { 2v } # space above index B spacer + # @IndexBSpacerBelow { 1v } # space below index B spacer + # @IndexBSpacerFont { +3p } # font of index B spacer + # @IndexBSpacerFormat { @Body } # format of index B spacer # @TopGap { 0.75c @OrIfPlain 2f } # gap between figures # @MidGap { 0.75c @OrIfPlain 2f } # gap above/below body text # @FootNoteNumbers { Arabic } # footnote numbers @@ -280,6 +314,7 @@ # @AbbreviationsWord { abbreviations } # word for "Abbreviations" # @ChapterWord { chapter } # word for "Chapter" # @AppendixWord { appendix } # word for "Appendix" + # @GlossaryWord { glossary } # word for "Glossary" # @IndexWord { index } # word for "Index" # @IndexAWord { index } # word for "Index" (A) # @IndexBWord { index } # word for "Index" (B) @@ -340,6 +375,7 @@ # @SubAppendixInContents { Yes } # add subappendices to contents # @SubSubAppendixInContents { No } # add sub-subapps to contents # @ReferencesInContents { Yes } # add ref. section to contents + # @GlossaryInContents { Yes } # add glossary to contents # @IndexInContents { Yes } # add index to contents # @IndexAInContents { Yes } # add index A to contents # @IndexBInContents { Yes } # add index B to contents @@ -386,6 +422,7 @@ # @ChapterPrefix { } # for structured page nums # @AppendixPrefix { } # for structured page nums # @ReferencesPrefix { } # for structured page nums + # @GlossaryPrefix { } # for structured page nums # @IndexPrefix { } # for structured page nums # @IndexAPrefix { } # for structured page nums # @IndexBPrefix { } # for structured page nums diff --git a/include/bookf b/include/bookf index dac4bdd..c50d2cd 100644 --- a/include/bookf +++ b/include/bookf @@ -27,6 +27,7 @@ def @BookSetup named @AbbreviationsWord { abbreviations } named @ChapterWord { chapter } named @AppendixWord { appendix } + named @GlossaryWord { glossary } named @IndexWord { index } named @IndexAWord { index } named @IndexBWord { index } @@ -106,6 +107,7 @@ def @BookSetup named @SubAppendixInContents { Yes } named @SubSubAppendixInContents { No } named @ReferencesInContents { Yes } + named @GlossaryInContents { Yes } named @IndexInContents { Yes } named @IndexAInContents { Yes } named @IndexBInContents { Yes } @@ -158,6 +160,7 @@ def @BookSetup named @ChapterPrefix { } named @AppendixPrefix { } named @ReferencesPrefix { } + named @GlossaryPrefix { } named @IndexPrefix { } named @IndexAPrefix { } named @IndexBPrefix { } @@ -319,7 +322,6 @@ def @BookSetup named @OnTitlePage {} named @AfterTitlePage {} named @AtEnd { dft } - named @AtAfter { dft } named @InitialFont { @InitialFont } named @InitialBreak { @InitialBreak } named @InitialOutdent { @InitialOutdent } @@ -331,6 +333,7 @@ def @BookSetup named @FirstPageNumber { @FirstPageNumber } named @IntroFirstPageNumber { @IntroFirstPageNumber } named @OptimizePages { @OptimizePages } + named @GlossaryText { @GlossaryText } named @IndexText { @IndexText } named @IndexAText { @IndexAText } named @IndexBText { @IndexBText } @@ -450,6 +453,39 @@ def @BookSetup } + def @GlossaryPart + named @Tag {} + { + def @Run + { + NonStart @Runner + @MajorNum {} + @MajorTitle { glossary @WordVal @GlossaryWord } + @MinorNum {} + @MinorTitle { glossary @WordVal @GlossaryWord } + @Owner { @Tag } + @Prefix { @GlossaryPrefix } + } + + @LargeScaleStructure + tag { @Tag } + type { Major } + initiallanguage { @InitialLanguage } + title { glossary @WordVal @GlossaryWord } + aboveheadinggap { @AboveChapterGap } + headingfont { @ChapterHeadingFont } + headingbreak { @ChapterHeadingBreak } + headingformat { @Num @ChapterHeadingFormat @Body } + headingtext { @GlossaryText } + incontents { @GlossaryInContents } + pnprefix { @GlossaryPrefix } + inrunners { Yes } + sendheader { @Full @Body } + innergap { @SectionGap } + wantindefinite { Yes } + @GlossarySection @Run + } + def @IndexPart named @Tag {} { @@ -588,6 +624,7 @@ def @BookSetup // @ReferencesBeforeAppendices @Do { @MakeReferences @Do @ReferencesPart } + // @MakeGlossary @Do @GlossaryPart // @AppendixList @FirstAppendixNumber // @ReferencesBeforeAppendices @NoDo { @MakeReferences @Do @ReferencesPart @@ -637,6 +674,7 @@ def @BookSetup // @ReferencesBeforeAppendices @Do { @MakeReferences @Do @ReferencesPart } + // @MakeGlossary @Do @GlossaryPart // @AppendixList @FirstAppendixNumber // @ReferencesBeforeAppendices @NoDo { @MakeReferences @Do @ReferencesPart diff --git a/include/bsf b/include/bsf index d27b52a..afc3dba 100644 --- a/include/bsf +++ b/include/bsf @@ -1,10 +1,11 @@ ############################################################################### # # -# Lout @BasicSetup package (Version 3.13) # +# Lout @BasicSetup package # # # # Jeffrey H. Kingston # # 5 February 1999 # +# Modified 30 October 2002 - reorganization of colours, textures, lengths # # # # Based on the first part of the @DocumentLayout package, version 3.11. # # # @@ -15,7 +16,9 @@ # # ############################################################################### -@SysPrependGraphic { "bsf.lpg" } # rules, boxes, margin note setup +@SysInclude { lengths } # @PSLengths +@SysInclude { coltex } # @ColourCommand and @TextureCommand +@SysPrependGraphic { bsf.lpg } # rules, boxes, margin note setup ############################################################################### @@ -38,73 +41,55 @@ def @OrIfPlain ########################################################################### # # -# @ColourCommand, @Colour, @Color # +# @Colour, @Color # # # ########################################################################### -@SysInclude { ccommand } +def @Colour @Color left col right y { {@ColourCommand col} @SetColour y } - def @Colour @Color left col right y { {@ColourCommand col} @SetColour y } - export i c p m s v f - def @LengthUnits - { - def i left x { - @BackEnd @Case { - PostScript @Yield { x" in" } - PDF @Yield { "__mul(__in, "x")" } - PlainText @Yield "" - } - } - - def c left x { - @BackEnd @Case { - PostScript @Yield { x" cm" } - PDF @Yield { "__mul(__cm, "x")" } - PlainText @Yield "" - } - } - - def p left x { - @BackEnd @Case { - PostScript @Yield { x" pt" } - PDF @Yield { "__mul(__pt, "x")" } - PlainText @Yield "" - } - } - - def m left x { - @BackEnd @Case { - PostScript @Yield { x" em" } - PDF @Yield { "__mul(__em, "x")" } - PlainText @Yield "" - } - } - - def s left x { - @BackEnd @Case { - PostScript @Yield { x" sp" } - PDF @Yield { "__mul(__louts, "x")" } - PlainText @Yield "" - } - } +########################################################################### +# # +# @Texture # +# # +########################################################################### - def v left x { - @BackEnd @Case { - PostScript @Yield { x" vs" } - PDF @Yield { "__mul(__loutv, "x")" } - PlainText @Yield "" - } - } - def f left x { - @BackEnd @Case { - PostScript @Yield { x" ft" } - PDF @Yield { "__mul(__loutf, "x")" } - PlainText @Yield "" - } - } - } +def @Texture + left type + named scale { 1 } + named hscale { 1 } + named vscale { 1 } + import @PSLengths named angle { 0d } + import @PSLengths named hshift { 0i } + import @PSLengths named vshift { 0i } + import @PSLengths named width { "dft" } + import @PSLengths named height { "dft" } + import @PSLengths named gap { "dft" } + import @PSLengths named radius { "dft" } + import @PSLengths named linewidth { "dft" } + named font { "dft" } + import @PSLengths named size { "dft" } + named value { "dft" } + right x +{ + { type @TextureCommand + scale { scale } + hscale { hscale } + vscale { vscale } + angle { angle } + hshift { hshift } + vshift { vshift } + width { width } + height { height } + gap { gap } + radius { radius } + linewidth { linewidth } + font { font } + size { size } + value { value } + } @SetTexture x +} ############################################################################### @@ -733,40 +718,28 @@ def @BasicSetup ########################################################################### # # - # @AddPaint, @LineWidth (obsolete), @StrokeCommand # + # @AddPaint, @StrokeCommand # # # ########################################################################### - def @AddPaint right col + def @AddPaint + left col + right texture { col @Case { none @Yield "" nochange @Yield { @BackEnd @Case { - PostScript @Yield "gsave fill grestore" - PDF @Yield "q f Q" - PlainText @Yield "" + PostScript @Yield { "gsave" texture "fill grestore" } + PDF @Yield { "q f Q" } + PlainText @Yield { "" } } } else @Yield { @BackEnd @Case { - PostScript @Yield {"gsave" @ColourCommand col "fill grestore"} + PostScript @Yield {"gsave" @ColourCommand col texture "fill grestore"} PDF @Yield { "q" @ColourCommand col "f Q" } - PlainText @Yield "" - } - } - } - } - - def @LineWidth right lw - { - lw @Case { - "" @Yield "" - else @Yield { - @BackEnd @Case { - PostScript @Yield { lw "setlinewidth" } - PDF @Yield { lw "w" } - PlainText @Yield "" + PlainText @Yield { "" } } } } @@ -802,7 +775,7 @@ def @BasicSetup ########################################################################### def @FullWidthRule - import @LengthUnits named linewidth {} + import @PSLengths named linewidth {} { @BackEnd @Case { @@ -819,7 +792,7 @@ def @BasicSetup } def @LocalWidthRule - import @LengthUnits named linewidth {} + import @PSLengths named linewidth {} { @BackEnd @Case { @@ -837,21 +810,22 @@ def @BasicSetup def @Box named margin { 0.3f } - import @LengthUnits named linewidth {} + import @PSLengths named linewidth {} named paint { none } + import @TextureImport named texture {} right x { @BackEnd @Case { PostScript @Yield @VContract @HContract 0c @HShift { - {"LoutBox" @AddPaint paint @StrokeCommand linewidth } + {"LoutBox" paint @AddPaint texture @StrokeCommand linewidth } @Graphic { ^/margin ^|margin 0c @HShift @OneRow x |margin /margin } } PDF @Yield @VContract @HContract 0c @HShift { { "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h" - @AddPaint paint @StrokeCommand linewidth } @Graphic + paint @AddPaint texture @StrokeCommand linewidth } @Graphic { ^/margin ^|margin 0c @HShift @OneRow x |margin /margin } } @@ -863,8 +837,9 @@ def @BasicSetup def @CurveBox named margin { 0.3f } - import @LengthUnits named linewidth {} + import @PSLengths named linewidth {} named paint { none } + import @TextureImport named texture {} right x { def @PDFStuff @@ -887,13 +862,13 @@ def @BasicSetup "__div(__mul(11, __xmark), 24) 0" "__xmark 0 c" "h" - @AddPaint paint @StrokeCommand linewidth + paint @AddPaint texture @StrokeCommand linewidth } @VContract @HContract 0c @HShift @BackEnd @Case { PostScript @Yield { - {"LoutCurveBox" @AddPaint paint @StrokeCommand linewidth } + {"LoutCurveBox" paint @AddPaint texture @StrokeCommand linewidth } @Graphic { ^/margin ^|margin 0c @HShift @OneRow x |margin /margin } } @@ -911,8 +886,9 @@ def @BasicSetup def @ShadowBox named margin { 0.3f } - import @LengthUnits named linewidth {} + import @PSLengths named linewidth {} named paint { none } + import @TextureImport named texture {} named shadow { 0.2f } right x { @@ -921,14 +897,22 @@ def @BasicSetup PostScript @Yield { "LoutShadowBox fill" @Graphic { ^/shadow ^|shadow 0c @HShift - @Box margin {margin} paint {paint} linewidth {linewidth} x + @Box + margin {margin} + paint {paint} + texture { texture } + linewidth {linewidth} x |shadow /shadow } } PlainText @Yield { ^/shadow ^|shadow 0c @HShift - @Box margin {margin} paint {paint} linewidth {linewidth} x + @Box + margin { margin } + paint { paint } + texture { texture } + linewidth {linewidth} x |shadow /shadow } @@ -942,7 +926,11 @@ def @BasicSetup } @Graphic { ^/shadow ^|shadow 0c @HShift - @Box margin {margin} paint {paint} linewidth {linewidth} x + @Box + margin { margin } + paint { paint } + texture { texture } + linewidth { linewidth } x |shadow /shadow } } @@ -957,13 +945,13 @@ def @BasicSetup ########################################################################### def @BoundaryMarks - import @LengthUnits named linewidth { 0.2p } - import @LengthUnits named length { 0.5c } - import @LengthUnits named gap { 0.5c } - import @LengthUnits named lout { 0c } - import @LengthUnits named rout { 0c } - import @LengthUnits named uout { 0c } - import @LengthUnits named dout { 0c } + import @PSLengths named linewidth { 0.2p } + import @PSLengths named length { 0.5c } + import @PSLengths named gap { 0.5c } + import @PSLengths named lout { 0c } + import @PSLengths named rout { 0c } + import @PSLengths named uout { 0c } + import @PSLengths named dout { 0c } { def @UpStroke { "0" gap "rmoveto" "0" length "rlineto" } def @DownStroke { "0" gap "neg" "rmoveto" "0" length "neg rlineto" } @@ -1074,7 +1062,7 @@ def @BasicSetup def @PageMark right tag { - @Null & tag @LinkDest & @PageMarker&&preceding @Tagged tag + tag @LinkDest @Null & @PageMarker&&preceding @Tagged tag } def @NoLinkPageMark diff --git a/include/bsf.bk b/include/bsf.bk deleted file mode 100644 index 90b8143..0000000 --- a/include/bsf.bk +++ /dev/null @@ -1,1618 +0,0 @@ - -############################################################################### -# # -# Lout @BasicSetup package (Version 3.13) # -# # -# Jeffrey H. Kingston # -# 5 February 1999 # -# # -# Based on the first part of the @DocumentLayout package, version 3.11. # -# # -# This package contains basic symbols used widely throughout many # -# documents, for font changes, particular characters, standard words in # -# the current language, date and time, paragraphs, lists, colours, # -# rules, and boxes. # -# # -############################################################################### - -@SysPrependGraphic { "bsf.lpg" } # rules, boxes, margin note setup - - -############################################################################### -# # -# The following symbols are defined outside @BasicSetup so that # -# they can be invoked when setting its parameters in the @Use clause. # -# # -############################################################################### - -def @OrIfPlain - precedence 80 - left x - right y -{ - @BackEnd @Case { - PlainText @Yield y - else @Yield x - } -} - -########################################################################### -# # -# @ColourCommand, @Colour, @Color # -# # -########################################################################### - -@SysInclude { ccommand } - - def @Colour @Color left col right y { {@ColourCommand col} @SetColour y } - - export i c p m s v f - def @LengthUnits - { - def i left x { - @BackEnd @Case { - PostScript @Yield { x" in" } - PDF @Yield { "__mul(__in, "x")" } - PlainText @Yield "" - } - } - - def c left x { - @BackEnd @Case { - PostScript @Yield { x" cm" } - PDF @Yield { "__mul(__cm, "x")" } - PlainText @Yield "" - } - } - - def p left x { - @BackEnd @Case { - PostScript @Yield { x" pt" } - PDF @Yield { "__mul(__pt, "x")" } - PlainText @Yield "" - } - } - - def m left x { - @BackEnd @Case { - PostScript @Yield { x" em" } - PDF @Yield { "__mul(__em, "x")" } - PlainText @Yield "" - } - } - - def s left x { - @BackEnd @Case { - PostScript @Yield { x" sp" } - PDF @Yield { "__mul(__louts, "x")" } - PlainText @Yield "" - } - } - - def v left x { - @BackEnd @Case { - PostScript @Yield { x" vs" } - PDF @Yield { "__mul(__loutv, "x")" } - PlainText @Yield "" - } - } - - def f left x { - @BackEnd @Case { - PostScript @Yield { x" ft" } - PDF @Yield { "__mul(__loutf, "x")" } - PlainText @Yield "" - } - } - } - - -############################################################################### -# # -# Symbols exported by @BasicSetup. # -# # -############################################################################### - -export - - @InitialFont @InitialBreak @InitialOutdent @InitialSpace @InitialLanguage - @InitialColour @OptimizePages @HeadingFont - @ParaGap @ParaIndent @DisplayGap @DisplayIndent @DefaultIndent - @DisplayNumStyle @WideIndent @VeryWideIndent - @ListGap @ListIndent @ListRightIndent @ListLabelWidth - @NumberSeparator - - @Word @Roman @UCRoman @Alpha @UCAlpha @Months @ShortMonths @WeekDays - @ShortWeekDays @TwelveHours @ShortHours @MeriDiems @ShortMeriDiems - - @Sym @R @I @B @BI @S @F @II - "~" "~~" "``" "''" ",," "--" "---" "..." - - @Bullet @ParSym @SectSym @Dagger @DaggerDbl @CDot @Sterling @Yen @Florin - @Star @Degree @Minute @Second @Multiply @Divide @Lozenge @Register - @CopyRight @TradeMark @Euro - - @Date @Time @DateTimeFormat @DropCapTwo @DropCapThree @Centre @Right - @NoDotSep @NoDotJoin @Join @Sep @DotSep @ColonSep @DotJoin @DashJoin - @NumSep @OverStrike @Sup @Sub @FullWidthRule @LocalWidthRule - @Box @CurveBox @ShadowBox @BoundaryMarks - @NumberMarker @NumberOf @TitleMarker @TitleOf - @PageMarker @PageMark @NoLinkPageMark @PageOf @CrossLink @ExternalLink - - @BeginDisplayCounter - - @Heading "^" "&-" @If @Not @And @Or @True - @PP @LP @LLP @DP @LOP @NP @CNP - - @BeginAlignedDisplays - @EndAlignedDisplays - - @Display - @LeftDisplay - @IndentedDisplay - @QuotedDisplay - @CentredDisplay - @RightDisplay - @AlignedDisplay - @LeftAlignedDisplay - @IndentedAlignedDisplay - @QuotedAlignedDisplay - @CentredAlignedDisplay - @RightAlignedDisplay - @NumberedDisplay - @LeftNumberedDisplay - @IndentedNumberedDisplay - @QuotedNumberedDisplay - @CentredNumberedDisplay - @RightNumberedDisplay - @AlignedNumberedDisplay - @LeftAlignedNumberedDisplay - @IndentedAlignedNumberedDisplay - @QuotedAlignedNumberedDisplay - @CentredAlignedNumberedDisplay - @RightAlignedNumberedDisplay - - @RawDisplay - @RawLeftDisplay - @RawIndentedDisplay - @RawQuotedDisplay - @RawCentredDisplay - @RawRightDisplay - @RawAlignedDisplay - @RawLeftAlignedDisplay - @RawIndentedAlignedDisplay - @RawQuotedAlignedDisplay - @RawCentredAlignedDisplay - @RawRightAlignedDisplay - @RawNumberedDisplay - @RawLeftNumberedDisplay - @RawIndentedNumberedDisplay - @RawQuotedNumberedDisplay - @RawCentredNumberedDisplay - @RawRightNumberedDisplay - @RawAlignedNumberedDisplay - @RawLeftAlignedNumberedDisplay - @RawIndentedAlignedNumberedDisplay - @RawQuotedAlignedNumberedDisplay - @RawCentredAlignedNumberedDisplay - @RawRightAlignedNumberedDisplay - - @ListItem - @ListInterruptItem - @ListNewPage - @DropListItem - @TagItem - @DropTagItem - - @EndList - @RawEndList - - @RawList - @RawLeftList - @RawIndentedList - @RawQuotedList - @RawCentredList @RawCenteredList - @RawNumberedList - @RawParenNumberedList - @RawRomanList - @RawParenRomanList - @RawUCRomanList - @RawParenUCRomanList - @RawAlphaList - @RawParenAlphaList - @RawUCAlphaList - @RawParenUCAlphaList - @RawBulletList - @RawStarList - @RawDashList - @RawTaggedList - @RawWideTaggedList - @RawVeryWideTaggedList - - @List - @LeftList - @IndentedList - @QuotedList - @CentredList @CenteredList - @NumberedList - @ParenNumberedList - @RomanList - @ParenRomanList - @UCRomanList - @ParenUCRomanList - @AlphaList - @ParenAlphaList - @UCAlphaList - @ParenUCAlphaList - @BulletList - @StarList - @DashList - @TaggedList - @WideTaggedList - @VeryWideTaggedList - - -############################################################################### -# # -# The @BasicSetup package. # -# # -############################################################################### - -def @BasicSetup - named @InitialFont { Times Base 12p } # initial font - named @InitialBreak { {adjust 1.20fx hyphen} @OrIfPlain - {ragged 1fx nohyphen} } # initial break - named @InitialOutdent { 2f @OrIfPlain 4s } # initial outdent - named @InitialSpace { lout } # initial space style - named @InitialLanguage{ English } # initial language - named @InitialColour { black } # initial colour - named @OptimizePages { No } # optimize page breaks? - named @HeadingFont { Bold } # font for @Heading - named @FixedWidthFont { Courier Base -1p } # font for @F - named @ParaGap { 1.3vx @OrIfPlain 1f } # gap between paragraphs - named @ParaIndent { 2.0f @OrIfPlain 5s } # first-line indent for @PP - named @DisplayGap { 1.0v @OrIfPlain 1f } # gap above, below displays - named @DisplayIndent { 2.0f @OrIfPlain 5s } # @IndentedDisplay indent - named @DefaultIndent { 0.5rt } # @Display indent - named @DisplayNumStyle - right num { (num) } # display number style - named @WideIndent { 4.0f @OrIfPlain 10s } # @WideTaggedList indent - named @VeryWideIndent { 8.0f @OrIfPlain 20s } # @VeryWideTaggedList indent - named @ListOuterGap { 1.0v @OrIfPlain 1f } # gap before, after list - named @ListGap { 1.0v @OrIfPlain 1f } # gap between list items - named @ListIndent { 0s } # indent of list items - named @ListRightIndent{ 0s } # right indent of list items - named @ListLabelWidth { 2.0f @OrIfPlain 5s } # width allowed for list tags - named @NumberSeparator{ . } # separates numbers like 2.3.7 - import @BasicSetup - named @CrossLinkFormat - right @Body { @Body } # format for cross links - import @BasicSetup - named @ExternalLinkFormat - right @Body { @Body } # format for external links -@Begin - - ########################################################################### - # # - # @Sym, font symbols, and miscellaneous special characters. # - # # - ########################################################################### - - def @Sym right x { { Symbol Base } @Font @Char x } - - def @R right x { Base @Font x } - def @I right x { Slope @Font x } - def @B right x { Bold @Font x } - def @BI right x { BoldSlope @Font x } - def @S right x { smallcaps @Font x } - def @F right x { @FixedWidthFont @Font x } - - def @II - right x - { - { @CurrFace @Case { - Bold @Yield BoldSlope - else @Yield Slope - } } @Font x - } - - def "~" left x right y { x &1su y } - def "~~" left x right y { x &2s y } - - def "``" { @Char "quotedblleft" @OrIfPlain "``" } - def "''" { @Char "quotedblright" @OrIfPlain "''" } - def ",," { @Char "quotedblbase" @OrIfPlain ",," } - def "--" { @Char "endash" @OrIfPlain "--" } - def "---" { @Char "emdash" @OrIfPlain "---"} - def "..." { @Char "ellipsis" @OrIfPlain "..."} - def @Bullet { @Char "bullet" @OrIfPlain "o" } - def @ParSym { @Char "paragraph" @OrIfPlain "P" } - def @SectSym { @Char "section" @OrIfPlain "$" } - def @Dagger { @Char "dagger" @OrIfPlain "+" } - def @DaggerDbl { @Char "daggerdbl" @OrIfPlain "++" } - def @CDot { @Char "periodcentered" @OrIfPlain "." } - def @Sterling { @Char "sterling" @OrIfPlain "&" } - def @Yen { @Char "yen" @OrIfPlain "Y" } - def @Florin { @Char "florin" @OrIfPlain "f" } - - def @Star { @Sym "asteriskmath" @OrIfPlain "*" } - def @Degree { @Sym "degree" @OrIfPlain "o" } - def @Minute { @Sym "minute" @OrIfPlain "'" } - def @Second { @Sym "second" @OrIfPlain "''" } - def @Multiply { @Sym "multiply" @OrIfPlain "x" } - def @Divide { @Sym "divide" @OrIfPlain "/" } - def @Lozenge { @Sym "lozenge" @OrIfPlain "O" } - def @Register { @Sym "registersans" @OrIfPlain "R" } - def @CopyRight { @Sym "copyrightsans" @OrIfPlain "C" } - def @TradeMark { @Sym "trademarksans" @OrIfPlain "TM" } - - def @Euro - { - @BackEnd @Case { - - PostScript @Yield { - 0.65w @VShift @VContract @HContract - "xsize ysize ysize 0.07 mul louteuro" @Graphic { - 0.7f @High 0.735f @Wide - } - } - - PDF @Yield { EUR } - - PlainText @Yield { EUR } - } - } - - - ########################################################################### - # # - # Symbols stored in the "standard" database # - # # - # @Word language-spacific words such as Chapter, etc. # - # @Roman lower case Roman numerals i, ii, ... , cc # - # @UCRoman upper case Roman numerals I, II, ... , CC # - # @Alpha lower case Roman alphabet a, b, ... , z # - # @UCAlpha upper case Roman alphabet A, B, ... , Z # - # @Months months of the year: January, ... , December # - # @ShortMonths months of the year, abbreviated: Jan, ..., Dec # - # @WeekDays days of the week: Sunday, ... , Saturday # - # @ShortWeekDays days of the week, abbreviated: Sun, ... , Sat # - # @TwelveHours hours, from 1 to 12 # - # @ShortHours hours, from 0 to 23 # - # @DateTimeFormat format of results of @Date and @Time # - # # - ########################################################################### - - def @Word left @Tag right @Val { @Val } - def @Roman left @Tag right @Val { @Val } - def @UCRoman left @Tag right @Val { @Val } - def @Alpha left @Tag right @Val { @Val } - def @UCAlpha left @Tag right @Val { @Val } - def @Months left @Tag right @Val { @Val } - def @ShortMonths left @Tag right @Val { @Val } - def @WeekDays left @Tag right @Val { @Val } - def @ShortWeekDays left @Tag right @Val { @Val } - def @TwelveHours left @Tag right @Val { @Val } - def @ShortHours left @Tag right @Val { @Val } - def @MeriDiems left @Tag right @Val { @Val } - def @ShortMeriDiems left @Tag right @Val { @Val } - - export @Value - def @DateTimeFormat left @Tag - named @Value - named @Year {} - named @ShortYear {} - named @Month {} - named @ShortMonth {} - named @MonthNum {} - named @Day {} - named @ShortDay {} - named @DayNum {} - named @MeriDiem {} - named @ShortMeriDiem {} - named @Hour {} - named @TwelveHour {} - named @ShortHour {} - named @Minute {} - named @Second {} - {} - {} - - @SysDatabase @Word @Roman @UCRoman @Alpha @UCAlpha @Months - @ShortMonths @WeekDays @ShortWeekDays @TwelveHours - @ShortHours @MeriDiems @ShortMeriDiems @DateTimeFormat - { standard } - - - ########################################################################### - # # - # @Date and @Time: the date and time now. # - # # - ########################################################################### - - def @Date - named @Format - named @Year { @Moment&&now @Open { {@Century}@Year }} - named @ShortYear { @Moment&&now @Open { @Year }} - named @Month { @Moment&&now @Open { @Months&&@Month }} - named @ShortMonth { @Moment&&now @Open { @ShortMonths&&@Month }} - named @MonthNum { @Moment&&now @Open { @Month }} - named @Day { @Moment&&now @Open { @WeekDays&&@WeekDay }} - named @ShortDay { @Moment&&now @Open { @ShortWeekDays&&@WeekDay}} - named @DayNum { @Moment&&now @Open { @Day }} - named @MeriDiem { @Moment&&now @Open { @MeriDiems&&@Hour }} - named @ShortMeriDiem{ @Moment&&now @Open { @ShortMeriDiems&&@Hour }} - named @Hour { @Moment&&now @Open { @Hour }} - named @TwelveHour { @Moment&&now @Open { @TwelveHours&&@Hour }} - named @ShortHour { @Moment&&now @Open { @ShortHours&&@Hour }} - named @Minute { @Moment&&now @Open { @Minute }} - named @Second { @Moment&&now @Open { @Second }} - { - @DateTimeFormat&&date @Open { @Value - @Year { @Year } - @ShortYear { @ShortYear } - @Month { @Month } - @ShortMonth { @ShortMonth } - @MonthNum { @MonthNum } - @Day { @Day } - @ShortDay { @ShortDay } - @DayNum { @DayNum } - @MeriDiem { @MeriDiem } - @ShortMeriDiem { @ShortMeriDiem } - @Hour { @Hour } - @TwelveHour { @TwelveHour } - @ShortHour { @ShortHour } - @Minute { @Minute } - @Second { @Second } - } - } - { @Format } - - def @Time - named @Format - named @Year { @Moment&&now @Open { {@Century}@Year }} - named @ShortYear { @Moment&&now @Open { @Year }} - named @Month { @Moment&&now @Open { @Months&&@Month }} - named @ShortMonth { @Moment&&now @Open { @ShortMonths&&@Month }} - named @MonthNum { @Moment&&now @Open { @Month }} - named @Day { @Moment&&now @Open { @WeekDays&&@WeekDay }} - named @ShortDay { @Moment&&now @Open { @ShortWeekDays&&@WeekDay}} - named @DayNum { @Moment&&now @Open { @Day }} - named @MeriDiem { @Moment&&now @Open { @MeriDiems&&@Hour }} - named @ShortMeriDiem{ @Moment&&now @Open { @ShortMeriDiems&&@Hour }} - named @Hour { @Moment&&now @Open { @Hour }} - named @TwelveHour { @Moment&&now @Open { @TwelveHours&&@Hour }} - named @ShortHour { @Moment&&now @Open { @ShortHours&&@Hour }} - named @Minute { @Moment&&now @Open { @Minute }} - named @Second { @Moment&&now @Open { @Second }} - { - @DateTimeFormat&&time @Open { @Value - @Year { @Year } - @ShortYear { @ShortYear } - @Month { @Month } - @ShortMonth { @ShortMonth } - @MonthNum { @MonthNum } - @Day { @Day } - @ShortDay { @ShortDay } - @DayNum { @DayNum } - @MeriDiem { @MeriDiem } - @ShortMeriDiem { @ShortMeriDiem } - @Hour { @Hour } - @TwelveHour { @TwelveHour } - @ShortHour { @ShortHour } - @Minute { @Minute } - @Second { @Second } - } - } - { @Format } - - - ########################################################################### - # # - # @DropCapTwo and @DropCapThree # - # # - ########################################################################### - - def @DropCapTwo - left y - named height { 1.5v } - right x - { - def @ParPlace { @Galley } - def @EndParPlace { @Galley } - - def @LineList - { - @PAdjust @ParPlace - //1vx @LineList - } - - def @ParGalley horizontally into { @ParPlace&&preceding } - right x - { - x - } - - def @EndPar force into { @EndParPlace&&following } { @Null } - - def @Cap - { - -0.25f @VShift 1.0w @VShift { - -90d @Rotate height @Wide @Scale 90d @Rotate y - } - } - - |1s @PAdjust @ParPlace - /1vo @Cap @ParGalley {x & @EndPar &1rt } | @PAdjust @ParPlace - //1vx @LineList - // @EndParPlace - } - - def @DropCapThree - left y - named height { 2.5v } - right x - { - def @ParPlace { @Galley } - def @EndParPlace { @Galley } - - def @LineList - { - @PAdjust @ParPlace - //1vx @LineList - } - - def @ParGalley force horizontally into { @ParPlace&&preceding } - right x - { - x - } - - def @EndPar force into { @EndParPlace&&following } { @Null } - - def @Cap - { - -0.25f @VShift 1.0w @VShift { - -90d @Rotate height @Wide @Scale 90d @Rotate y - } - } - - |1s @PAdjust @ParPlace - /1vo @ParGalley { x & @EndPar &1rt } | @PAdjust @ParPlace - /1vo @Cap | @PAdjust @ParPlace - //1vx @LineList - // @EndParPlace - } - - - ########################################################################### - # # - # @Centre, @Center, @Right, @NoDotSep, @NoDotJoin, @DotSep, # - # @ColonSep, @DotJoin, @DashJoin, @NumSep # - # # - ########################################################################### - - macro @Centre @Center { |0.5rt @HContract } - - def @Right - precedence 50 - left x - right y - { x |1.0rt @OneCol { 2f @Wide {} | y } } - - def @NoDotSep left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { x |2s y } - } - } - } - } - - def @NoDotJoin left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { x{y} } - } - } - } - } - - def @DotSep left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { x. |2s y } - } - } - } - } - - def @ColonSep left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { x: |2s y } - } - } - } - } - - def @DotJoin left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { x.y } - } - } - } - } - - def @DashJoin left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { x--y } - } - } - } - } - - def @NumSep left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { - @CurrLang @Case { - Hungarian @Yield { y. x } - else @Yield { x y } - } - } - } - } - } - } - - - ########################################################################### - # # - # @OverStrike, @Sup and @Sub # - # # - ########################################################################### - - def @OverStrike left x right y - { - @OneRow { @HContract @VContract x /0io @HContract @VContract y } - } - - def @Sup - left x - named gap { 0.40fk } - right y - { - @HContract @VContract - { - | 0.7f @Font y ^/gap x - } - } - - def @Sub - left x - named gap { 0.40fk } - right y - { - @HContract @VContract - { - x /gap | 0.7f @Font y - } - } - - - ########################################################################### - # # - # @AddPaint, @LineWidth (obsolete), @StrokeCommand # - # # - ########################################################################### - - def @AddPaint right col - { - col @Case { - none @Yield "" - nochange @Yield { - @BackEnd @Case { - PostScript @Yield "gsave fill grestore" - PDF @Yield "q f Q" - PlainText @Yield "" - } - } - else @Yield { - @BackEnd @Case { - PostScript @Yield {"gsave" @ColourCommand col "fill grestore"} - PDF @Yield { "q" @ColourCommand col "f Q" } - PlainText @Yield "" - } - } - } - } - - def @LineWidth right lw - { - lw @Case { - "" @Yield "" - else @Yield { - @BackEnd @Case { - PostScript @Yield { lw "setlinewidth" } - PDF @Yield { lw "w" } - PlainText @Yield "" - } - } - } - } - - def @StrokeCommand right linewidth - { - @BackEnd @Case { - PostScript @Yield { - linewidth @Case { - "" @Yield { "stroke" } - none @Yield { } - else @Yield { linewidth "setlinewidth stroke" } - } - } - PDF @Yield { - linewidth @Case { - "" @Yield { "S" } - none @Yield { } - else @Yield { linewidth "w S" } - } - } - else @Yield "" - } - } - - - - ########################################################################### - # # - # @FullWidthRule, @Box, @CurveBox, and @ShadowBox # - # # - ########################################################################### - - def @FullWidthRule - import @LengthUnits named linewidth {} - { - @BackEnd @Case { - - PostScript @Yield @HExpand { - { "LoutRule" @StrokeCommand linewidth } @Graphic { 0.5p @High } - } - - PDF @Yield @HExpand { - { "0 0 m __xsize 0 l" @StrokeCommand linewidth } @Graphic { 0.5p @High } - } - - PlainText @Yield { "-" @PlainGraphic 1f @High } - } - } - - def @LocalWidthRule - import @LengthUnits named linewidth {} - { - @BackEnd @Case { - - PostScript @Yield { - { "LoutRule" @StrokeCommand linewidth } @Graphic { 0.5p @High } - } - - PDF @Yield { - { "0 0 m __xsize 0 l" @StrokeCommand linewidth } @Graphic { 0.5p @High } - } - - PlainText @Yield { "-" @PlainGraphic 1f @High } - } - } - - def @Box - named margin { 0.3f } - import @LengthUnits named linewidth {} - named paint { none } - right x - { - @BackEnd @Case { - - PostScript @Yield @VContract @HContract 0c @HShift { - {"LoutBox" @AddPaint paint @StrokeCommand linewidth } - @Graphic - { ^/margin ^|margin 0c @HShift @OneRow x |margin /margin } - } - - PDF @Yield @VContract @HContract 0c @HShift { - { "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h" - @AddPaint paint @StrokeCommand linewidth } @Graphic - { ^/margin ^|margin 0c @HShift @OneRow x |margin /margin } - } - - PlainText @Yield @VContract @HContract 0c @HShift { - ^/margin ^|margin 0c @HShift @OneRow x |margin /margin - } - } - } - - def @CurveBox - named margin { 0.3f } - import @LengthUnits named linewidth {} - named paint { none } - right x - { - def @PDFStuff - { - "__xmark 0 m" - "__sub(__xsize, __xmark) 0 l" - "__sub(__xsize, __div(__mul(11, __xmark), 24)) 0" - "__xsize __div(__mul(11, __xmark), 24)" - "__xsize __xmark c" - "__xsize __sub(__ysize, __xmark) l" - "__xsize __sub(__ysize, __div(__mul(11, __xmark), 24))" - "__sub(__xsize, __div(__mul(11, __xmark), 24)) __ysize" - "__sub(__xsize, __xmark) __ysize c" - "__xmark __ysize l" - "__div(__mul(11, __xmark), 24) __ysize" - "0 __sub(__ysize, __div(__mul(11, __xmark), 24))" - "0 __sub(__ysize, __xmark) c" - "0 __xmark l" - "0 __div(__mul(11, __xmark), 24)" - "__div(__mul(11, __xmark), 24) 0" - "__xmark 0 c" - "h" - @AddPaint paint @StrokeCommand linewidth - } - - @VContract @HContract 0c @HShift @BackEnd @Case { - - PostScript @Yield { - {"LoutCurveBox" @AddPaint paint @StrokeCommand linewidth } - @Graphic - { ^/margin ^|margin 0c @HShift @OneRow x |margin /margin } - } - - PlainText @Yield { - ^/margin ^|margin 0c @HShift @OneRow x |margin /margin - } - - PDF @Yield { - @PDFStuff @Graphic - { ^/margin ^|margin 0c @HShift @OneRow x |margin /margin } - } - } - } - - def @ShadowBox - named margin { 0.3f } - import @LengthUnits named linewidth {} - named paint { none } - named shadow { 0.2f } - right x - { - @VContract @HContract 0c @HShift @BackEnd @Case { - - PostScript @Yield { - "LoutShadowBox fill" @Graphic - { ^/shadow ^|shadow 0c @HShift - @Box margin {margin} paint {paint} linewidth {linewidth} x - |shadow /shadow - } - } - - PlainText @Yield { - ^/shadow ^|shadow 0c @HShift - @Box margin {margin} paint {paint} linewidth {linewidth} x - |shadow /shadow - } - - PDF @Yield { - { - "__mul(__xmark, 2) 0 m __xsize 0 l" - "__xsize __sub(__ysize, __mul(__xmark, 2)) l" - "__sub(__xsize, __xmark) __sub(__ysize, __mul(__xmark, 2)) l" - "__sub(__xsize, __xmark) __xmark l" - "__mul(__xmark, 2) __xmark l h f" - } - @Graphic - { ^/shadow ^|shadow 0c @HShift - @Box margin {margin} paint {paint} linewidth {linewidth} x - |shadow /shadow - } - } - } - } - - - ########################################################################### - # # - # @BoundaryMarks # - # # - ########################################################################### - - def @BoundaryMarks - import @LengthUnits named linewidth { 0.2p } - import @LengthUnits named length { 0.5c } - import @LengthUnits named gap { 0.5c } - import @LengthUnits named lout { 0c } - import @LengthUnits named rout { 0c } - import @LengthUnits named uout { 0c } - import @LengthUnits named dout { 0c } - { - def @UpStroke { "0" gap "rmoveto" "0" length "rlineto" } - def @DownStroke { "0" gap "neg" "rmoveto" "0" length "neg rlineto" } - def @LeftStroke { gap "neg" "0" "rmoveto" length "neg" "0 rlineto" } - def @RightStroke { gap "0" "rmoveto" length "0 rlineto" } - - def @LLSpot { lout "neg" dout "neg" moveto } - def @LRSpot { xsize rout "add" dout "neg" moveto } - def @ULSpot { lout "neg" ysize uout "add" moveto } - def @URSpot { xsize rout "add" ysize uout "add" moveto } - - def @PDFStuff { - "__sub(-"gap", "lout") __sub(0, "dout") m " - "__sub(__sub(-"gap", "lout"), "length") __sub(0, "dout") l" - "__sub(0, "lout") __sub(-"gap", "dout") m " - "__sub(0, "lout") __sub(__sub(-"gap", "dout"), "length") l" - "__add(__xsize,"rout") __sub(-"gap", "dout") m " - "__add(__xsize,"rout") __sub(__sub(-"gap", "dout"), "length") l" - "__add(__add(__xsize,"rout"),"gap") __sub(0, "dout") m " - "__add(__add(__add(__xsize,"rout"),"gap"),"length") __sub(0, "dout") l" - " __sub(__sub(0, "lout"), "gap") __add(__ysize, "uout") m " - "__sub(__sub(__sub(0, "lout"), "gap"), "length") __add(__ysize, "uout") l" - "__sub(0, "lout") __add(__add(__ysize, "uout"), "gap") m " - "__sub(0, "lout") __add(__add(__add(__ysize, "uout"), "gap"), "length") l" - " __add(__add(__xsize, "rout"), "gap") __add(__ysize, "uout") m " - "__add(__add(__add(__xsize, "rout"), "gap"), "length") __add(__ysize, "uout") l" - "__add(__xsize, "rout") __add(__add(__ysize, "uout"), "gap") m " - "__add(__xsize, "rout") __add(__add(__add(__ysize, "uout"), "gap"), "length") l" - - linewidth "w S" - } - - @BackEnd @Case { - - PostScript @Yield { - { - @LLSpot @LeftStroke - @LLSpot @DownStroke - @LRSpot @DownStroke - @LRSpot @RightStroke - @ULSpot @LeftStroke - @ULSpot @UpStroke - @URSpot @RightStroke - @URSpot @UpStroke - - linewidth "setlinewidth stroke" - } @Graphic {} - } - - PlainText @Yield "" - - PDF @Yield { @PDFStuff @Graphic {} } - } - } - - ########################################################################## - # # - # @NumberMarker, @NumberOf, @TitleMarker, @TitleOf, # - # @PageMark, @PageOf, @CrossLink, @ExternalLink # - # # - # NB the default value ?? is desperately important for unsorted # - # reference lists numbered by first appearance (@NumberOf @Tag), # - # because it is the special sort key value that prevents merging, # - # hence allowing all the references to be printed even though # - # their sort keys are all ?? initially. # - # # - ########################################################################## - - export @Tag @Value - def @NumberMarker - named @Tag {} - named @Value { "??" } - { - @Null - } - - def @NumberOf - right tag - { - @NumberMarker&&tag @Open { @Value } - } - - - export @Tag @Value - def @TitleMarker - named @Tag {} - named @Value { "??" } - { - @Null - } - - def @TitleOf - right tag - { - @TitleMarker&&tag @Open { @Value } - } - - - export num rawnum @Tag - def @PageMarker - named @Tag {} - named num {} - named rawnum {} - { - @PageLabel num - } - - def @PageMark - right tag - { - @Null & tag @LinkDest & @PageMarker&&preceding @Tagged tag - } - - def @NoLinkPageMark - right tag - { - @PageMarker&&preceding @Tagged tag - } - - def @PageOf - right tag - { - @PageMarker&&tag @Open { num } - } - - def @CrossLink - left tag - named @Format right @Body { @CrossLinkFormat @Body } - right obj - { - @HContract @VContract { - tag @LinkSource @Format obj - } - } - - def @ExternalLink - left tag - named @Format right @Body { @ExternalLinkFormat @Body } - right obj - { - @HContract @VContract { - tag @URLLink @Format obj - } - } - - - ########################################################################### - # # - # @Join and @Sep # - # # - # Join two objects together with @NumberSeparator, unless one is # - # empty in which case just return the other. # - # # - ########################################################################### - - def @Join left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { x{@NumberSeparator}y } - } - } - } - } - - def @Sep left x right y - { - x @Case { - {} @Yield y - else @Yield { - y @Case { - {} @Yield x - else @Yield { x{@NumberSeparator} |2s y } - } - } - } - } - - - ########################################################################### - # # - # Miscellaneous. # - # # - ########################################################################### - - def @Heading right x { ragged @Break @HeadingFont @Font x } - def "^" { {} ^& {} } - def "&-" left x right y { x &0ch y } - - - ########################################################################### - # # - # @If @Not @And @Or @True # - # # - # Used in databases to make optional fields format nicely. # - # # - ########################################################################### - - def @If - precedence 97 - left x - right y - { - y @Case { - {} @Yield @Null - else @Yield { @Null{x} } - } - } - - def @Not - precedence 100 - right y - { - y @Case { - {} @Yield "*" - else @Yield "" - } - } - - def @And - precedence 99 - left x - right y - { - x @Case { - {} @Yield {} - else @Yield y - } - } - - def @Or - precedence 98 - left x - right y - { - x @Case { - {} @Yield y - else @Yield x - } - } - - def @True { "*" } - - - ########################################################################### - # # - # Paragraphs. # - # # - ########################################################################### - - macro @PP { //@ParaGap @ParaIndent @Wide &{0i} } - macro @LP { //{@ParaGap} } - macro @LLP { //{1vx} } - macro @DP { //{@DisplayGap} } - macro @LOP { //{@ListOuterGap} } - macro @NP { //{1.1b} } - macro @CNP { // 3.2v @High //0io //{} } - - - ########################################################################### - # # - # Beginning and ending of aligned displays. # - # # - ########################################################################### - - def @APlace { @Galley } - def @EndAlignedPlace { @Galley } - def @AlignedPlace { @Galley } - - def @BAligned into { @APlace&&preceding } - { - def @AlignedList { @AlignedPlace /1.1b @AlignedList } - - //1.1b @AlignedList - // @EndAlignedPlace - } - - macro @BAD @BeginAlignedDisplays { // @APlace | @BAligned } - def @EAD @EndAlignedDisplays force into { @EndAlignedPlace&&preceding } {} - - - ########################################################################### - # # - # New code for numbered displays that will cross section boundaries # - # # - ########################################################################### - - export @Tag val - def @NumDispCounterMarker - named @Tag {} - named val {} - { - @Null - } - - def @NumDispNum right tag - { - @NumDispCounterMarker&&tag @Open { @Next val } - } - - def @NumDispCounterIncrement - right tag - { - @NumDispCounterMarker&&preceding @Tagged tag - @NumDispCounterMarker val { @NumDispNum tag } - @NumberMarker @Tag { tag } @Value { @NumDispNum tag } - } - - def @NN - { - @NumDispCounterMarker&&preceding @Open { @DisplayNumStyle val } - } - - def @Do - left x - right y - { - x @Case { - { No None } @Yield @Null - else @Yield y - } - } - - def @BeginDisplayCounter - left condition - right prefix - { - condition @Do @NumDispCounterMarker val { prefix @Join 0 } - } - - - ########################################################################### - # # - # Galleys that carry displays to their places. # - # # - ########################################################################### - - def @DispPlace { @Galley } - - def @Disp into { @DispPlace&&preceding } - right x - { - x - } - - def @NDisp into { @DispPlace&&preceding } - named @Tag {} - right x - { - @OneRow { - @NumDispCounterIncrement @Tag - @PageMark @Tag - ^// - @OneRow x - } - } - - def @ADisp into { @AlignedPlace&&preceding } - right x - { - x - } - - def @ANDisp into { @AlignedPlace&&preceding } - named @Tag {} - right x - { - @OneRow { - @NumDispCounterIncrement @Tag - @PageMark @Tag - ^/ - @OneRow x - } - } - - - ########################################################################### - # # - # Displays and raw displays. # - # # - ########################################################################### - - macro @G { |@DefaultIndent } - macro @LG { | } - macro @IG { |@DisplayIndent } - macro @CG { |0.5rt } - macro @RG { |1.0rt } - macro @QR { @DisplayIndent @Wide { |1rt @NN } } - macro @DX { @DispPlace } - macro @DY { @Disp } - macro @AX { @APlace } - macro @AY { @ADisp } - macro @NY { @NDisp } - macro @MY { @ANDisp } - - macro @D @Display { @DP @G @DX | @DP // @DY } - macro @LD @LeftDisplay { @DP @LG @DX | @DP // @DY } - macro @ID @IndentedDisplay { @DP @IG @DX | @DP // @DY } - macro @QD @QuotedDisplay { @DP @IG @DX @IG @DP // @DY } - macro @CD @CentredDisplay - @CenteredDisplay { @DP @CG @DX | @DP // @DY } - macro @RightDisplay { @DP @RG @DX | @DP // @DY } - - - macro @AD @AlignedDisplay { @DP @G @AX | @DP // @AY } - macro @LAD @LeftAlignedDisplay { @DP @LG @AX | @DP // @AY } - macro @IAD @IndentedAlignedDisplay { @DP @IG @AX | @DP // @AY } - macro @QAD @QuotedAlignedDisplay { @DP @IG @AX @IG @DP // @AY } - macro @CAD @CentredAlignedDisplay - @CenteredAlignedDisplay { @DP @CG @AX | @DP // @AY } - macro @RightAlignedDisplay { @DP @RG @AX | @DP // @AY } - - macro @ND @NumberedDisplay { @DP @G @DX |1rt @NN @DP // @NY } - macro @LND @LeftNumberedDisplay { @DP @LG @DX |1rt @NN @DP // @NY } - macro @IND @IndentedNumberedDisplay { @DP @IG @DX |1rt @NN @DP // @NY } - macro @QND @QuotedNumberedDisplay { @DP @IG @DX |1rt @QR @DP // @NY } - macro @CND @CentredNumberedDisplay - @CenteredNumberedDisplay { @DP @CG @DX |1rt @NN @DP // @NY } - macro @RightNumberedDisplay { @DP @RG @DX |1rt @NN @DP // @NY } - - macro @AND @AlignedNumberedDisplay { @DP @G @AX |1rt @NN @DP // @MY } - macro @LAND @LeftAlignedNumberedDisplay { @DP @LG @AX |1rt @NN @DP // @MY } - macro @IAND @IndentedAlignedNumberedDisplay{ @DP @IG @AX |1rt @NN @DP // @MY } - macro @QAND @QuotedAlignedNumberedDisplay { @DP @IG @AX |1rt @QR @DP // @MY } - macro @CAND @CentredAlignedNumberedDisplay - @CenteredAlignedNumberedDisplay{ @DP @CG @AX |1rt @NN @DP // @MY } - macro @RightAlignedNumberedDisplay { @DP @RG @AX |1rt @NN @DP // @MY } - - - macro @RD @RawDisplay { @G @DX | // @DY } - macro @RLD @RawLeftDisplay { @LG @DX | // @DY } - macro @RID @RawIndentedDisplay { @IG @DX | // @DY } - macro @RQD @RawQuotedDisplay { @IG @DX @IG | // @DY } - macro @RCD @RawCentredDisplay - @RawCenteredDisplay { @CG @DX | | // @DY } - macro @RRD @RawRightDisplay { @RG @DX | // @DY } - - - macro @RAD @RawAlignedDisplay { @G @AX | // @AY } - macro @RLAD @RawLeftAlignedDisplay { @LG @AX | // @AY } - macro @RIAD @RawIndentedAlignedDisplay { @IG @AX | // @AY } - macro @RQAD @RawQuotedAlignedDisplay { @IG @AX @IG | // @AY } - macro @RCAD @RawCentredAlignedDisplay - @RawCenteredAlignedDisplay { @CG @AX | // @AY } - macro @RRAD @RawRightAlignedDisplay { @RG @AX | // @AY } - - macro @RND @RawNumberedDisplay { @G @DX |1rt @NN // @NY } - macro @RLND @RawLeftNumberedDisplay { @LG @DX |1rt @NN // @NY } - macro @RIND @RawIndentedNumberedDisplay { @IG @DX |1rt @NN // @NY } - macro @RQND @RawQuotedNumberedDisplay { @IG @DX |1rt @QR // @NY } - macro @RCND @RawCentredNumberedDisplay - @RawCenteredNumberedDisplay { @CG @DX |1rt @NN // @NY } - macro @RRND @RawRightNumberedDisplay { @RG @DX |1rt @NN // @NY } - - macro @RAND @RawAlignedNumberedDisplay { @G @AX |1rt @NN // @MY } - macro @RLAND @RawLeftAlignedNumberedDisplay { @LG @AX |1rt @NN // @MY } - macro @RIAND @RawIndentedAlignedNumberedDisplay { @IG @AX |1rt @NN // @MY } - macro @RQAND @RawQuotedAlignedNumberedDisplay { @IG @AX |1rt @QR // @MY } - macro @RCAND @RawCentredAlignedNumberedDisplay - @RawCenteredAlignedNumberedDisplay { @CG @AX |1rt @NN // @MY } - macro @RRAND @RawRightAlignedNumberedDisplay{ @RG @AX |1rt @NN // @MY } - - - ########################################################################### - # # - # Lists and raw lists. # - # # - ########################################################################### - - - def @ItemPlace { @Galley } - def @InterruptItemPlace { @Galley } - def @NewPageItemPlace { @Galley } - def @TagPlace { @Galley } - def @EndListPlace { @Galley } - - def @RawList - named style right num { num } - named type right num { num } - named gap { @ListGap } - named indent { @ListIndent } - named itemindent { 0c } - named rightindent { @ListRightIndent } - named labelwidth { @ListLabelWidth } - named start { 1 } - { - def @MakeList right num - { - def @NormalItem - { - |indent - labelwidth @Wide { - # @NumberMarker @Value {style num} {style num} &0io - @NumberMarker @Value {num} {style type num} &0io - } - |itemindent @ItemPlace |rightindent - //gap @MakeList @NotRevealed @Next num - } - - def @InterruptItem - { - @InterruptItemPlace - //gap @MakeList @NotRevealed num - } - - def @NewPageItem - { - @NewPageItemPlace - //1.1b @MakeList @NotRevealed num - } - - @OneOf - { - @NormalItem - @InterruptItem - @NewPageItem - } - } - - def @ListGalleyPlace { @Galley } - - def @ListGalley into { @ListGalleyPlace&&preceding } - { - @MakeList start // @EndListPlace - } - - @ListGalleyPlace - // - @ListGalley - } - - def listitem into { @ItemPlace&&preceding } - named @Tag {} - right x - { - @NumberMarker&&preceding @Tagged @Tag - // x - // @PageMark @Tag # weird placement, but @PageMark is definite now - } - - def droplistitem into { @ItemPlace&&preceding } - named @Tag {} - right x - { - @NumberMarker&&preceding @Tagged @Tag - // @PageMark @Tag - //1vx x - } - - def tagitem into { @ItemPlace&&preceding } - named tag {} - right x - { - def sendtag into { @TagPlace&&preceding } { tag } - - sendtag // x - } - - def droptagitem into { @ItemPlace&&preceding } - named tag {} - right x - { - def sendtag into { @TagPlace&&preceding } { tag } - - sendtag // //1vx x - } - - def endlist force into { @EndListPlace&&preceding } {} - - def listnewpage into { @NewPageItemPlace&&preceding } {} - - def listinterruptitem into { @InterruptItemPlace&&preceding } - right x - { - x - } - - - macro @LI @ListItem { // listitem } - macro @LII @ListInterruptItem { // listinterruptitem } - macro @LNP @ListNewPage { // listnewpage } - macro @DLI @DropListItem { // droplistitem } - macro @TI @TagItem { // tagitem tag } - macro @DTI @DropTagItem { // droptagitem tag } - macro @REL @RawEndList { // & endlist // } - macro @EL @EndList { // & endlist @LOP } - - - macro @RLL @RawLeftList { @RawList style {} - labelwidth { 0c } } - macro @RIL @RawIndentedList { @RawList style {} } - macro @RQL @RawQuotedList { @RawList style {} - rightindent {@DisplayIndent}} - macro @RCL @RawCentredList { @RawList style {} - labelwidth {0c} - itemindent {0.5rt} } - macro @RawCenteredList { @RawCentredList } - macro @RNL @RawNumberedList { @RawList style { num. } } - macro @RPNL @RawParenNumberedList { @RawList style { (num) } } - macro @RRL @RawRomanList { @RawList type { @Roman&&num } - style { num. } } - macro @RPRL @RawParenRomanList { @RawList type { @Roman&&num } - style { (num) } } - macro @RUCRL @RawUCRomanList { @RawList type { @UCRoman&&num } - style { num. } } - macro @RPUCRL @RawParenUCRomanList { @RawList type { @UCRoman&&num } - style { (num) } } - macro @RAL @RawAlphaList { @RawList type { @Alpha&&num } - style { num. } } - macro @RPAL @RawParenAlphaList { @RawList type { @Alpha&&num } - style { (num) } } - macro @RUCAL @RawUCAlphaList { @RawList type { @UCAlpha&&num } - style { num. } } - macro @RPUCAL @RawParenUCAlphaList { @RawList type { @UCAlpha&&num } - style { (num) } } - macro @RBL @RawBulletList { @RawList style { @Bullet } } - macro @RSL @RawStarList { @RawList style { @Star } } - macro @RDL @RawDashList { @RawList style { -- } } - macro @RTL @RawTaggedList { @RawList type { @TagPlace } } - macro @RWTL @RawWideTaggedList { @RawList type { @TagPlace } - labelwidth { @WideIndent } } - macro @RVWTL @RawVeryWideTaggedList{ @RawList type { @TagPlace } - labelwidth { @VeryWideIndent } } - - - macro @L @List { @LOP @RawList } - macro @LL @LeftList { @LOP @RawLeftList } - macro @IL @IndentedList { @LOP @RawIndentedList } - macro @QL @QuotedList { @LOP @RawQuotedList } - macro @CL @CentredList { @LOP @RawCentredList } - macro @CenteredList { @LOP @RawCenteredList } - macro @NL @NumberedList { @LOP @RawNumberedList } - macro @PNL @ParenNumberedList { @LOP @RawParenNumberedList } - macro @RL @RomanList { @LOP @RawRomanList } - macro @PRL @ParenRomanList { @LOP @RawParenRomanList } - macro @UCRL @UCRomanList { @LOP @RawUCRomanList } - macro @PUCRL @ParenUCRomanList { @LOP @RawParenUCRomanList } - macro @AL @AlphaList { @LOP @RawAlphaList } - macro @PAL @ParenAlphaList { @LOP @RawParenAlphaList } - macro @UCAL @UCAlphaList { @LOP @RawUCAlphaList } - macro @PUCAL @ParenUCAlphaList { @LOP @RawParenUCAlphaList } - macro @BL @BulletList { @LOP @RawBulletList } - macro @SL @StarList { @LOP @RawStarList } - macro @DL @DashList { @LOP @RawDashList } - macro @TL @TaggedList { @LOP @RawTaggedList } - macro @WTL @WideTaggedList { @LOP @RawWideTaggedList } - macro @VWTL @VeryWideTaggedList { @LOP @RawVeryWideTaggedList } - -@End @BasicSetup diff --git a/include/ccommand b/include/ccommand deleted file mode 100644 index a1b8771..0000000 --- a/include/ccommand +++ /dev/null @@ -1,113 +0,0 @@ - -########################################################################### -# # -# @ColourCommand # -# # -# Jeff Kingston # -# 19 October 2001 # -# # -# @ColourCommand converts a colour expressed in a manner that the # -# ordinary user can comprehend into the PostScript or PDF command # -# needed to obtain that colour, suitable for passing to @SetColour # -# or including in the left parameter of @Graphic. # -# # -# This symbol is needed in various places so I've taken the coward's # -# way out and @SysIncluded it at those places. # -# # -# Examples of behaviour for the PostScript back end: # -# # -# Parameter Result # -# ------------------------------------------------------------ # -# black "0.0 0.0 0.0 setrgbcolor" # -# darkblue "0.0 0.0 0.5 setrgbcolor" # -# white "1.0 1.0 1.0 setrgbcolor" # -# none "" # -# nochange "" # -# "" "" # -# rgb <red> <blue> <green> "<red> <blue> <green> setrgbcolor" # -# cymk <c> <y> <m> <k> "<c> <y> <m> <k> setcymkcolor" # -# ------------------------------------------------------------ # -# # -# @ColourCommand also does the right thing for the PDF back end; # -# its result is always empty for the PlainText back end. # -# # -########################################################################### - -def @ColourCommand right @Body -{ - def @RGB right coords - { - @BackEnd @Case { - PostScript @Yield { coords "setrgbcolor" } - PDF @Yield { coords "rg" coords "RG" } - PlainText @Yield "" - } - } - - def @CMYK right coords - { - @BackEnd @Case { - PostScript @Yield { coords "setcmykcolor" } - PDF @Yield { coords "k" coords "K" } - PlainText @Yield "" - } - } - - def @RGBElse right alt - { - { "rgb" @Common @Body } @Case { - "rgb" @Yield @RGB { "rgb" @Rump @Body } - else @Yield alt - } - } - - def @CMYKElse right alt - { - { "cmyk" @Common @Body } @Case { - "cmyk" @Yield @CMYK { "cmyk" @Rump @Body } - else @Yield alt - } - } - - def @NoChangeElse right alt - { - @Body @Case { - { "nochange" "none" "" } @Yield "" - else @Yield alt - } - } - - def @RGBCoords - { - @Body @Case { - black @Yield { 0.0 0.0 0.0 } - darkblue @Yield { 0.0 0.0 0.5 } - blue @Yield { 0.0 0.0 1.0 } - lightblue @Yield { 0.5 0.5 1.0 } - darkgreen @Yield { 0.0 0.5 0.0 } - green @Yield { 0.0 1.0 0.0 } - lightgreen @Yield { 0.5 1.0 0.5 } - darkred @Yield { 0.5 0.0 0.0 } - red @Yield { 1.0 0.0 0.0 } - lightred @Yield { 1.0 0.5 0.5 } - darkcyan @Yield { 0.0 0.5 0.5 } - cyan @Yield { 0.0 1.0 1.0 } - lightcyan @Yield { 0.5 1.0 1.0 } - darkmagenta @Yield { 0.5 0.0 0.5 } - magenta @Yield { 1.0 0.0 1.0 } - lightmagenta @Yield { 1.0 0.5 1.0 } - darkyellow @Yield { 0.5 0.5 0.0 } - yellow @Yield { 1.0 1.0 0.0 } - lightyellow @Yield { 1.0 1.0 0.5 } - darkgray @Yield { 0.2 0.2 0.2 } - gray @Yield { 0.5 0.5 0.5 } - lightgray @Yield { 0.8 0.8 0.8 } - darkgrey @Yield { 0.2 0.2 0.2 } - grey @Yield { 0.5 0.5 0.5 } - lightgrey @Yield { 0.8 0.8 0.8 } - white @Yield { 1.0 1.0 1.0 } - } - } - - @RGBElse @CMYKElse @NoChangeElse @RGB @RGBCoords -} diff --git a/include/coltex b/include/coltex new file mode 100644 index 0000000..44b82a4 --- /dev/null +++ b/include/coltex @@ -0,0 +1,417 @@ + +########################################################################### +# # +# coltex # +# # +# Jeffrey H. Kingston # +# 30 October 2002 # +# # +# Include file providing @ColourCommand and @TextureCommand symbols. # +# # +########################################################################### + +@SysInclude { lengths } # @PSLengths (needed for @TextureCommand) + + +########################################################################### +# # +# @ColourCommand # +# # +# Jeff Kingston # +# 19 October 2001 # +# Updated for compatibility with textures 28 October 2002. # +# # +# @ColourCommand converts a colour expressed in a manner that the # +# ordinary user can comprehend into the PostScript or PDF command # +# needed to obtain that colour, suitable for passing to @SetColour # +# or including in the left parameter of @Graphic. # +# # +# This symbol is needed in various places so I've taken the coward's # +# way out and @SysIncluded it at those places. # +# # +# Examples of behaviour for the PostScript back end: # +# # +# Parameter Result # +# ------------------------------------------------------------ # +# black "0.0 0.0 0.0 LoutSetRGBColor" # +# darkblue "0.0 0.0 0.5 LoutSetRGBColor" # +# white "1.0 1.0 1.0 LoutSetRGBColor" # +# none "" # +# nochange "" # +# "" "" # +# rgb <red> <blue> <green> "<red> <blue> <green> LoutSetRGBColor" # +# cymk <c> <y> <m> <k> "<c> <y> <m> <k> LoutSetCMYKColor" # +# ------------------------------------------------------------ # +# # +# See the Expert's Guide for the use of LoutSetRGBColor and # +# LoutSetCMYKColor rather than setrgbcolor and setcmykcolor. # +# # +# @ColourCommand also does the right thing for the PDF back end; # +# its result is always empty for the PlainText back end. # +# # +########################################################################### + +def @ColourCommand right @Body +{ + def @RGB right coords + { + @BackEnd @Case { + PostScript @Yield { coords "LoutSetRGBColor" } + PDF @Yield { coords "rg" coords "RG" } + PlainText @Yield "" + } + } + + def @CMYK right coords + { + @BackEnd @Case { + PostScript @Yield { coords "LoutSetCMYKColor" } + PDF @Yield { coords "k" coords "K" } + PlainText @Yield "" + } + } + + def @RGBElse right alt + { + { "rgb" @Common @Body } @Case { + "rgb" @Yield @RGB { "rgb" @Rump @Body } + else @Yield alt + } + } + + def @CMYKElse right alt + { + { "cmyk" @Common @Body } @Case { + "cmyk" @Yield @CMYK { "cmyk" @Rump @Body } + else @Yield alt + } + } + + def @NoChangeElse right alt + { + @Body @Case { + { "nochange" "none" "" } @Yield "" + else @Yield alt + } + } + + def @RGBCoords + { + @Body @Case { + black @Yield { 0.0 0.0 0.0 } + darkblue @Yield { 0.0 0.0 0.5 } + blue @Yield { 0.0 0.0 1.0 } + lightblue @Yield { 0.5 0.5 1.0 } + darkgreen @Yield { 0.0 0.5 0.0 } + green @Yield { 0.0 1.0 0.0 } + lightgreen @Yield { 0.5 1.0 0.5 } + darkred @Yield { 0.5 0.0 0.0 } + red @Yield { 1.0 0.0 0.0 } + lightred @Yield { 1.0 0.5 0.5 } + darkcyan @Yield { 0.0 0.5 0.5 } + cyan @Yield { 0.0 1.0 1.0 } + lightcyan @Yield { 0.5 1.0 1.0 } + darkmagenta @Yield { 0.5 0.0 0.5 } + magenta @Yield { 1.0 0.0 1.0 } + lightmagenta @Yield { 1.0 0.5 1.0 } + darkyellow @Yield { 0.5 0.5 0.0 } + yellow @Yield { 1.0 1.0 0.0 } + lightyellow @Yield { 1.0 1.0 0.5 } + darkgray @Yield { 0.2 0.2 0.2 } + gray @Yield { 0.5 0.5 0.5 } + lightgray @Yield { 0.8 0.8 0.8 } + darkgrey @Yield { 0.2 0.2 0.2 } + grey @Yield { 0.5 0.5 0.5 } + lightgrey @Yield { 0.8 0.8 0.8 } + white @Yield { 1.0 1.0 1.0 } + } + } + + @RGBElse @CMYKElse @NoChangeElse @RGB @RGBCoords +} + + +########################################################################### +# # +# @TextureCommand # +# # +# @TextureCommand converts a texture expressed in a manner that the # +# ordinary user can comprehend into the PostScript texture dictionary # +# needed to obtain that texture, suitable for passing to @SetTexture # +# or including in the left parameter of @Graphic. # +# # +########################################################################### + +def @TextureCommand + left type + named scale { 1 } + named hscale { 1 } + named vscale { 1 } + import @PSLengths named angle { 0d } + import @PSLengths named hshift { 0i } + import @PSLengths named vshift { 0i } + import @PSLengths named width { "dft" } + import @PSLengths named height { "dft" } + import @PSLengths named gap { "dft" } + import @PSLengths named radius { "dft" } + import @PSLengths named linewidth { "dft" } + named font { "dft" } + import @PSLengths named size { "dft" } + named value { "dft" } +{ + def @Dft left x right y + { + y @Case { + "dft" @Yield x + else @Yield y + } + } + + def @SolidTexture + { + "null LoutSetTexture" + } + + def @StripedTexture + { + def @Width { "1 pt" @Dft width } + def @Gap { "1 pt" @Dft gap } + + scale hscale vscale angle hshift vshift + "2" + "[ 0 0" @Width @Gap "add dup ]" + @Width @Gap "add dup" + "{" + "pop 0 0 moveto" + @Width @Gap "add 0 lineto" + "0" @Width "rlineto" + "0" @Width "lineto" + "closepath fill" + "}" + "LoutMakeTexture LoutSetTexture" + } + + def @GridTexture + { + def @Width { "1 pt" @Dft width } + def @Gap { "1 pt" @Dft gap } + + scale hscale vscale angle hshift vshift + "2" + "[ 0 0" @Width @Gap "add dup ]" + @Width @Gap "add dup" + "{" + "pop 0 0 moveto" + @Width @Gap "add 0 lineto" + "0" @Width "rlineto" + @Gap "neg 0 rlineto" + "0" @Gap "rlineto" + @Width "neg 0 rlineto" + "closepath fill" + "}" + "LoutMakeTexture LoutSetTexture" + } + + def @DottedTexture + { + def @Radius { "0.5 pt" @Dft radius } + def @Gap { "2 pt" @Dft gap } + + scale hscale vscale angle hshift vshift + "2" + "[ 0 0" @Gap "dup ]" + @Gap "dup" + "{" + "pop" @Gap "2 div dup" @Radius "0 360 arc fill" + "}" + "LoutMakeTexture LoutSetTexture" + } + + def @ChessboardTexture + { + def @Width { "2 pt" @Dft width } + + scale hscale vscale angle hshift vshift + "2" + "[ 0 0" @Width "2 mul dup ]" + @Width "2 mul dup" + "{" + "pop 0 0 moveto" + @Width "0 rlineto" + "0" @Width "rlineto" + @Width "neg 0 rlineto" + closepath + @Width @Width "moveto" + @Width "0 rlineto" + "0" @Width "rlineto" + @Width "neg 0 rlineto" + "closepath fill" + "}" + "LoutMakeTexture LoutSetTexture" + } + + def @BrickworkTexture + { + def @Width { "6 pt" @Dft width } + def @Height { "2 pt" @Dft height } + def @Linewidth { "0.5 pt" @Dft linewidth } + + scale hscale vscale angle hshift vshift + "2" + "[ 0 0" @Width @Height "2 mul ]" + @Width @Height "2 mul" + "{" + "pop 0 0 moveto" @Width "0 rlineto" + "0" @Height "moveto" @Width "0 rlineto" + "0" @Height "2 mul moveto" @Width "0 rlineto" + "0 0 moveto 0" @Height "rlineto" + @Width "0 moveto 0" @Height "rlineto" + @Width "2 div" @Height "moveto 0" @Height "rlineto" + "[] 0 setdash" @Linewidth "setlinewidth stroke" + "}" + "LoutMakeTexture LoutSetTexture" + } + + def @HoneycombTexture + { + def @R { "2.0 pt" @Dft radius } + def @Linewidth { "0.5 pt" @Dft linewidth } + + def @X { @R "0.5 mul" } + def @Y { @R "0.886 mul" } + def @NegX { @X "neg" } + def @NegY { @Y "neg" } + def @NegR { @R "neg" } + def @BoxWidth { @R @X "add 2 mul" } + def @BoxHeight { @Y "2 mul" } + + scale hscale vscale angle hshift vshift + "2" + "[ 0 0" @BoxWidth @BoxHeight "]" + @BoxWidth @BoxHeight + "{" + "pop" + @X "0 moveto" + @R "0 rlineto" + @X @Y "rlineto" + @R "0 rlineto" + @NegR "0 rlineto" + @NegX @Y "rlineto" + @NegR "0 rlineto" + @NegX @NegY "rlineto" + "closepath" + "[] 0 setdash" @Linewidth "setlinewidth stroke" + "}" + "LoutMakeTexture LoutSetTexture" + } + + def @TriangularTexture + { + def @R { "4.0 pt" @Dft radius } + def @Linewidth { "0.5 pt" @Dft linewidth } + + def @X { @R "0.5 mul" } + def @Y { @R "0.886 mul" } + def @BoxWidth { @R } + def @BoxHeight { @Y "2 mul" } + + scale hscale vscale angle hshift vshift + "2" + "[ 0 0" @BoxWidth @BoxHeight "]" + @BoxWidth @BoxHeight + "{" + "pop" + "0 0 moveto" + @R "0 lineto" + "0" @Y "2 mul lineto" + @R "0 rlineto" + "closepath" + "0" @Y "moveto" + @R "0 rlineto" + "[] 0 setdash" @Linewidth "setlinewidth stroke" + "}" + "LoutMakeTexture LoutSetTexture" + } + + def @StringTexture + { + def @Width { "12 pt" @Dft width } + def @Height { "12 pt" @Dft height } + def @Font { "Times-Roman" @Dft font } + def @Size { "10 pt" @Dft size } + def @Value { "*" @Dft value } + + scale hscale vscale angle hshift vshift + "2" + "[ 0 0" @Width @Height "]" + @Width @Height + "{" + "pop /"@Font "findfont" @Size "scalefont setfont" + "("@Value") dup false 0 0 moveto charpath flattenpath" + "pathbbox pop pop neg exch neg exch moveto show" + + "}" + "LoutMakeTexture LoutSetTexture" + } + + type @Case + { + "solid" @Yield @SolidTexture + "striped" @Yield @StripedTexture + "grid" @Yield @GridTexture + "dotted" @Yield @DottedTexture + "chessboard" @Yield @ChessboardTexture + "brickwork" @Yield @BrickworkTexture + "honeycomb" @Yield @HoneycombTexture + "triangular" @Yield @TriangularTexture + "string" @Yield @StringTexture + else @Yield type + } +} + +########################################################################### +# # +# @TextureImport # +# # +# Used as an import for texture options. # +# # +# We cleverly replace @Texture by nothing inside those options, # +# and replace the known types by themselves plus @TextureCommand. # +# This allows the user to type # +# # +# texture { striped } # +# texture { striped @Texture } # +# texture { striped angle { 45d } } # +# texture { striped @Texture angle { 45d } } # +# # +# and it all winds up being a call to @TextureCommand. # +# # +########################################################################### + +export + + solid + striped + grid + dotted + chessboard + brickwork + honeycomb + triangular + string + @Texture + +def @TextureImport +{ + macro solid { "solid" @TextureCommand } + macro striped { "striped" @TextureCommand } + macro grid { "grid" @TextureCommand } + macro dotted { "dotted" @TextureCommand } + macro chessboard { "chessboard" @TextureCommand } + macro brickwork { "brickwork" @TextureCommand } + macro honeycomb { "honeycomb" @TextureCommand } + macro triangular { "triangular" @TextureCommand } + macro string { "string" @TextureCommand } + + macro @Texture { } +} diff --git a/include/diag b/include/diag index eb99116..a7c2de3 100644 --- a/include/diag +++ b/include/diag @@ -49,8 +49,9 @@ # translate { } # outlinestyle { solid } # outlinedashlength { 0.2f } - # outlinewidth { 0.02f } - # paint { nopaint } + # outlinewidth { thin } + # paint { none } + # texture { solid } # font { } # break { } # format { @Body } @@ -74,8 +75,8 @@ # nodelabelbreak { ragged nohyphen } # nodelabelformat { @Body } # nodelabelpos { } - # nodelabelprox { outside } # nodelabelangle { horizontal } + # nodelabelprox { outside } # nodelabelctr { no } # nodelabeladjust { 0 0 } # alabel { } @@ -84,8 +85,8 @@ # alabelbreak { } # alabelformat { } # alabelpos { NE } - # alabelprox { } # alabelangle { } + # alabelprox { } # alabelctr { } # alabeladjust { } # blabel { } @@ -94,8 +95,8 @@ # blabelbreak { } # blabelformat { } # blabelpos { NW } - # blabelprox { } # blabelangle { } + # blabelprox { } # blabelctr { } # blabeladjust { } # clabel { } @@ -104,8 +105,8 @@ # clabelbreak { } # clabelformat { } # clabelpos { SW } - # clabelprox { } # clabelangle { } + # clabelprox { } # clabelctr { } # clabeladjust { } # dlabel { } @@ -114,8 +115,8 @@ # dlabelbreak { } # dlabelformat { } # dlabelpos { SE } - # dlabelprox { } # dlabelangle { } + # dlabelprox { } # dlabelctr { } # dlabeladjust { } @@ -133,8 +134,9 @@ # atranslate { } # aoutlinestyle { solid } # aoutlinedashlength { 0.2f } - # aoutlinewidth { 0.02f } - # apaint { nopaint } + # aoutlinewidth { thin } + # apaint { none } + # atexture { solid } # afont { } # abreak { } # aformat { @Body } @@ -158,8 +160,8 @@ # anodelabelbreak { ragged nohyphen } # anodelabelformat { @Body } # anodelabelpos { } - # anodelabelprox { outside } # anodelabelangle { horizontal } + # anodelabelprox { outside } # anodelabelctr { no } # anodelabeladjust { 0 0 } # aalabel { } @@ -168,8 +170,8 @@ # aalabelbreak { } # aalabelformat { } # aalabelpos { NE } - # aalabelprox { } # aalabelangle { } + # aalabelprox { } # aalabelctr { } # aalabeladjust { } # ablabel { } @@ -178,8 +180,8 @@ # ablabelbreak { } # ablabelformat { } # ablabelpos { NW } - # ablabelprox { } # ablabelangle { } + # ablabelprox { } # ablabelctr { } # ablabeladjust { } # aclabel { } @@ -188,8 +190,8 @@ # aclabelbreak { } # aclabelformat { } # aclabelpos { SW } - # aclabelprox { } # aclabelangle { } + # aclabelprox { } # aclabelctr { } # aclabeladjust { } # adlabel { } @@ -198,8 +200,8 @@ # adlabelbreak { } # adlabelformat { } # adlabelpos { SE } - # adlabelprox { } # adlabelangle { } + # adlabelprox { } # adlabelctr { } # adlabeladjust { } @@ -217,8 +219,9 @@ # btranslate { } # boutlinestyle { solid } # boutlinedashlength { 0.2f } - # boutlinewidth { 0.02f } - # bpaint { nopaint } + # boutlinewidth { thin } + # bpaint { none } + # btexture { solid } # bfont { } # bbreak { } # bformat { @Body } @@ -242,8 +245,8 @@ # bnodelabelbreak { ragged nohyphen } # bnodelabelformat { @Body } # bnodelabelpos { } - # bnodelabelprox { outside } # bnodelabelangle { horizontal } + # bnodelabelprox { outside } # bnodelabelctr { no } # bnodelabeladjust { 0 0 } # balabel { } @@ -252,8 +255,8 @@ # balabelbreak { } # balabelformat { } # balabelpos { NE } - # balabelprox { } # balabelangle { } + # balabelprox { } # balabelctr { } # balabeladjust { } # bblabel { } @@ -262,8 +265,8 @@ # bblabelbreak { } # bblabelformat { } # bblabelpos { NW } - # bblabelprox { } # bblabelangle { } + # bblabelprox { } # bblabelctr { } # bblabeladjust { } # bclabel { } @@ -272,8 +275,8 @@ # bclabelbreak { } # bclabelformat { } # bclabelpos { SW } - # bclabelprox { } # bclabelangle { } + # bclabelprox { } # bclabelctr { } # bclabeladjust { } # bdlabel { } @@ -282,8 +285,8 @@ # bdlabelbreak { } # bdlabelformat { } # bdlabelpos { SE } - # bdlabelprox { } # bdlabelangle { } + # bdlabelprox { } # bdlabelctr { } # bdlabeladjust { } @@ -301,8 +304,9 @@ # ctranslate { } # coutlinestyle { solid } # coutlinedashlength { 0.2f } - # coutlinewidth { 0.02f } - # cpaint { nopaint } + # coutlinewidth { thin } + # cpaint { none } + # ctexture { solid } # cfont { } # cbreak { } # cformat { @Body } @@ -326,8 +330,8 @@ # cnodelabelbreak { ragged nohyphen } # cnodelabelformat { @Body } # cnodelabelpos { } - # cnodelabelprox { outside } # cnodelabelangle { horizontal } + # cnodelabelprox { outside } # cnodelabelctr { no } # cnodelabeladjust { 0 0 } # calabel { } @@ -336,8 +340,8 @@ # calabelbreak { } # calabelformat { } # calabelpos { NE } - # calabelprox { } # calabelangle { } + # calabelprox { } # calabelctr { } # calabeladjust { } # cblabel { } @@ -346,8 +350,8 @@ # cblabelbreak { } # cblabelformat { } # cblabelpos { NW } - # cblabelprox { } # cblabelangle { } + # cblabelprox { } # cblabelctr { } # cblabeladjust { } # cclabel { } @@ -356,8 +360,8 @@ # cclabelbreak { } # cclabelformat { } # cclabelpos { SW } - # cclabelprox { } # cclabelangle { } + # cclabelprox { } # cclabelctr { } # cclabeladjust { } # cdlabel { } @@ -366,8 +370,8 @@ # cdlabelbreak { } # cdlabelformat { } # cdlabelpos { SE } - # cdlabelprox { } # cdlabelangle { } + # cdlabelprox { } # cdlabelctr { } # cdlabeladjust { } @@ -388,22 +392,27 @@ # radius { 1.0f } # xindent { 0.8f } # zindent { 0.8f } + # frompt { 0 0 } + # topt { 0 0 } # pathstyle { solid } # pathdashlength { 0.2f } - # pathwidth { 0.02f } - # pathgap { 0.04f } + # pathwidth { thin } + # pathgap { thin } # arrow { no } # arrowstyle { solid } - # arrowwidth { 0.45f } - # arrowlength { 0.6f } + # arrowwidth { 0.3f } + # arrowlength { 0.5f } + # backarrowstyle { solid } + # backarrowwidth { 0.3f } + # backarrowlength { 0.5f } # linklabel { } # linklabelmargin { 0.2f } # linklabelfont { "-2p" } # linklabelbreak { ragged nohyphen } # linklabelformat { @Body } # linklabelpos { } - # linklabelprox { above } # linklabelangle { horizontal } + # linklabelprox { above } # linklabelctr { no } # linklabeladjust { 0 0 } # xlabel { } @@ -412,8 +421,8 @@ # xlabelbreak { } # xlabelformat { } # xlabelpos { LFROM } - # xlabelprox { } # xlabelangle { } + # xlabelprox { } # xlabelctr { } # xlabeladjust { } # ylabel { } @@ -422,8 +431,8 @@ # ylabelbreak { } # ylabelformat { } # ylabelpos { LMID } - # ylabelprox { } # ylabelangle { } + # ylabelprox { } # ylabelctr { yes } # ylabeladjust { } # zlabel { } @@ -432,8 +441,8 @@ # zlabelbreak { } # zlabelformat { } # zlabelpos { LTO } - # zlabelprox { } # zlabelangle { } + # zlabelprox { } # zlabelctr { } # zlabeladjust { } # fromlabel { } @@ -442,8 +451,8 @@ # fromlabelbreak { ragged nohyphen } # fromlabelformat { @Body } # fromlabelpos { FROM } - # fromlabelprox { E } # fromlabelangle { antiparallel } + # fromlabelprox { W } # fromlabelctr { no } # fromlabeladjust { 0 0 } # tolabel { } @@ -452,8 +461,8 @@ # tolabelbreak { ragged nohyphen } # tolabelformat { @Body } # tolabelpos { TO } - # tolabelprox { E } # tolabelangle { parallel } + # tolabelprox { W } # tolabelctr { no } # tolabeladjust { 0 0 } diff --git a/include/diagf b/include/diagf index ed9f0c9..5142dc8 100644 --- a/include/diagf +++ b/include/diagf @@ -10,8 +10,10 @@ # # ############################################################################### +@SysInclude { diagf.etc } # @Geometry +@SysInclude { coltex } # @ColourCommand and @TextureCommand @SysPrependGraphic { diagf.lpg } -@SysInclude { diagf.etc } + ############################################################################### # # @@ -59,7 +61,8 @@ def @DiagSetup named medium { 0.08 ft } named thick { 0.12 ft } { thin } - named paint { nopaint } + named paint { none } + import @TextureImport named texture { solid } named font { } named break { } named format right @Body { @Body } @@ -92,8 +95,8 @@ def @DiagSetup named nodelabelbreak { ragged nohyphen } named nodelabelformat right @Body { @Body } import @Geometry named nodelabelpos { } - named nodelabelprox { outside } import @Geometry named nodelabelangle { horizontal } + named nodelabelprox { outside } named nodelabelctr { no } import @Geometry named nodelabeladjust { 0 0 } @@ -103,8 +106,8 @@ def @DiagSetup named alabelbreak { } named alabelformat right @Body { } import @Geometry named alabelpos { NE } - named alabelprox { } import @Geometry named alabelangle { } + named alabelprox { } named alabelctr { } import @Geometry named alabeladjust { } @@ -114,8 +117,8 @@ def @DiagSetup named blabelbreak { } named blabelformat right @Body { } import @Geometry named blabelpos { NW } - named blabelprox { } import @Geometry named blabelangle { } + named blabelprox { } named blabelctr { } import @Geometry named blabeladjust { } @@ -125,8 +128,8 @@ def @DiagSetup named clabelbreak { } named clabelformat right @Body { } import @Geometry named clabelpos { SW } - named clabelprox { } import @Geometry named clabelangle { } + named clabelprox { } named clabelctr { } import @Geometry named clabeladjust { } @@ -136,8 +139,8 @@ def @DiagSetup named dlabelbreak { } named dlabelformat right @Body { } import @Geometry named dlabelpos { SE } - named dlabelprox { } import @Geometry named dlabelangle { } + named dlabelprox { } named dlabelctr { } import @Geometry named dlabeladjust { } @@ -171,7 +174,8 @@ def @DiagSetup named medium { 0.08 ft } named thick { 0.12 ft } { thin } - named apaint { nopaint } + named apaint { none } + import @TextureImport named atexture{ solid } named afont { } named abreak { } named aformat right @Body { @Body } @@ -204,8 +208,8 @@ def @DiagSetup named anodelabelbreak { ragged nohyphen } named anodelabelformat right @Body { @Body } import @Geometry named anodelabelpos{ } - named anodelabelprox { outside } import @Geometry named anodelabelangle { horizontal } + named anodelabelprox { outside } named anodelabelctr { no } import @Geometry named anodelabeladjust { 0 0 } @@ -215,8 +219,8 @@ def @DiagSetup named aalabelbreak { } named aalabelformat right @Body { } import @Geometry named aalabelpos { NE } - named aalabelprox { } import @Geometry named aalabelangle { } + named aalabelprox { } named aalabelctr { } import @Geometry named aalabeladjust{ } @@ -226,8 +230,8 @@ def @DiagSetup named ablabelbreak { } named ablabelformat right @Body { } import @Geometry named ablabelpos { NW } - named ablabelprox { } import @Geometry named ablabelangle { } + named ablabelprox { } named ablabelctr { } import @Geometry named ablabeladjust{ } @@ -237,8 +241,8 @@ def @DiagSetup named aclabelbreak { } named aclabelformat right @Body { } import @Geometry named aclabelpos { SW } - named aclabelprox { } import @Geometry named aclabelangle { } + named aclabelprox { } named aclabelctr { } import @Geometry named aclabeladjust{ } @@ -248,8 +252,8 @@ def @DiagSetup named adlabelbreak { } named adlabelformat right @Body { } import @Geometry named adlabelpos { SE } - named adlabelprox { } import @Geometry named adlabelangle { } + named adlabelprox { } named adlabelctr { } import @Geometry named adlabeladjust{ } @@ -283,7 +287,8 @@ def @DiagSetup named medium { 0.08 ft } named thick { 0.12 ft } { thin } - named bpaint { nopaint } + named bpaint { none } + import @TextureImport named btexture{ solid } named bfont { } named bbreak { } named bformat right @Body { @Body } @@ -316,8 +321,8 @@ def @DiagSetup named bnodelabelbreak { ragged nohyphen } named bnodelabelformat right @Body { @Body } import @Geometry named bnodelabelpos{ } - named bnodelabelprox { outside } import @Geometry named bnodelabelangle { horizontal } + named bnodelabelprox { outside } named bnodelabelctr { no } import @Geometry named bnodelabeladjust { 0 0 } @@ -395,7 +400,8 @@ def @DiagSetup named medium { 0.08 ft } named thick { 0.12 ft } { thin } - named cpaint { nopaint } + named cpaint { none } + import @TextureImport named ctexture{ solid } named cfont { } named cbreak { } named cformat right @Body { @Body } @@ -428,8 +434,8 @@ def @DiagSetup named cnodelabelbreak { ragged nohyphen } named cnodelabelformat right @Body { @Body } import @Geometry named cnodelabelpos{ } - named cnodelabelprox { outside } import @Geometry named cnodelabelangle { horizontal } + named cnodelabelprox { outside } named cnodelabelctr { no } import @Geometry named cnodelabeladjust { 0 0 } @@ -439,8 +445,8 @@ def @DiagSetup named calabelbreak { } named calabelformat right @Body { } import @Geometry named calabelpos { NE } - named calabelprox { } import @Geometry named calabelangle { } + named calabelprox { } named calabelctr { } import @Geometry named calabeladjust{ } @@ -450,8 +456,8 @@ def @DiagSetup named cblabelbreak { } named cblabelformat right @Body { } import @Geometry named cblabelpos { NW } - named cblabelprox { } import @Geometry named cblabelangle { } + named cblabelprox { } named cblabelctr { } import @Geometry named cblabeladjust{ } @@ -461,8 +467,8 @@ def @DiagSetup named cclabelbreak { } named cclabelformat right @Body { } import @Geometry named cclabelpos { SW } - named cclabelprox { } import @Geometry named cclabelangle { } + named cclabelprox { } named cclabelctr { } import @Geometry named cclabeladjust{ } @@ -472,8 +478,8 @@ def @DiagSetup named cdlabelbreak { } named cdlabelformat right @Body { } import @Geometry named cdlabelpos { SE } - named cdlabelprox { } import @Geometry named cdlabelangle { } + named cdlabelprox { } named cdlabelctr { } import @Geometry named cdlabeladjust{ } @@ -498,6 +504,7 @@ def @DiagSetup named topt {} named arrow {} named arrowlength {} + named backarrowlength {} { line } import @Geometry named from { 0,0 } import @Geometry named to { 1,1 } @@ -533,6 +540,9 @@ def @DiagSetup named arrowstyle { solid } named arrowwidth { 0.3f } named arrowlength { 0.5f } + named backarrowstyle { solid } + named backarrowwidth { 0.3f } + named backarrowlength { 0.5f } named linklabel { } named linklabelmargin { 0.2f } @@ -540,8 +550,8 @@ def @DiagSetup named linklabelbreak { ragged nohyphen } named linklabelformat right @Body { @Body } import @Geometry named linklabelpos { } - named linklabelprox { above } import @Geometry named linklabelangle { horizontal } + named linklabelprox { above } named linklabelctr { no } import @Geometry named linklabeladjust { 0 0 } @@ -551,8 +561,8 @@ def @DiagSetup named xlabelbreak { } named xlabelformat right @Body { } import @Geometry named xlabelpos { LFROM } - named xlabelprox { } import @Geometry named xlabelangle { } + named xlabelprox { } named xlabelctr { } import @Geometry named xlabeladjust { } @@ -562,8 +572,8 @@ def @DiagSetup named ylabelbreak { } named ylabelformat right @Body { } import @Geometry named ylabelpos { LMID } - named ylabelprox { } import @Geometry named ylabelangle { } + named ylabelprox { } named ylabelctr { yes } import @Geometry named ylabeladjust { } @@ -573,8 +583,8 @@ def @DiagSetup named zlabelbreak { } named zlabelformat right @Body { } import @Geometry named zlabelpos { LTO } - named zlabelprox { } import @Geometry named zlabelangle { } + named zlabelprox { } named zlabelctr { } import @Geometry named zlabeladjust { } @@ -584,8 +594,8 @@ def @DiagSetup named fromlabelbreak { ragged nohyphen } named fromlabelformat right @Body { @Body } import @Geometry named fromlabelpos { FROM } - named fromlabelprox { W } import @Geometry named fromlabelangle { antiparallel } + named fromlabelprox { W } named fromlabelctr { no } import @Geometry named fromlabeladjust { 0 0 } @@ -595,8 +605,8 @@ def @DiagSetup named tolabelbreak { ragged nohyphen } named tolabelformat right @Body { @Body } import @Geometry named tolabelpos { TO } - named tolabelprox { W } import @Geometry named tolabelangle { parallel } + named tolabelprox { W } named tolabelctr { no } import @Geometry named tolabeladjust { 0 0 } @@ -707,6 +717,7 @@ def @DiagSetup named thick { 0.12 ft } { outlinewidth } named paint { paint } + import @TextureImport named texture { texture } named font { font } named break { break } named format right @Body { format @Body } @@ -768,6 +779,7 @@ def @DiagSetup named thick { 0.12 ft } { aoutlinewidth } named apaint { apaint } + import @TextureImport named atexture { atexture } named afont { afont } named abreak { abreak } named aformat right @Body { aformat @Body } @@ -829,6 +841,7 @@ def @DiagSetup named thick { 0.12 ft } { boutlinewidth } named bpaint { bpaint } + import @TextureImport named btexture { btexture } named bfont { bfont } named bbreak { bbreak } named bformat right @Body { bformat @Body } @@ -890,6 +903,7 @@ def @DiagSetup named thick { 0.12 ft } { coutlinewidth } named cpaint { cpaint } + import @TextureImport named ctexture { ctexture } named cfont { cfont } named cbreak { cbreak } named cformat right @Body { cformat @Body } @@ -935,6 +949,7 @@ def @DiagSetup named topt {} named arrow {} named arrowlength {} + named backarrowlength {} { path from { from } to { to } @@ -950,6 +965,7 @@ def @DiagSetup topt { topt } arrow { arrow } arrowlength { arrowlength } + backarrowlength{ backarrowlength } } import @Geometry named from { from } import @Geometry named to { to } @@ -985,6 +1001,9 @@ def @DiagSetup named arrowstyle { arrowstyle } named arrowwidth { arrowwidth } named arrowlength { arrowlength } + named backarrowstyle { backarrowstyle } + named backarrowwidth { backarrowwidth } + named backarrowlength { backarrowlength } named nodelabel { nodelabel } named nodelabelmargin { nodelabelmargin } @@ -1138,14 +1157,11 @@ def @DiagSetup # # ####################################################################### -# include @ColourCommand symbol -@SysInclude { ccommand } - - def @PSAddPaint right col + def @PSAddPaint left col right tex { col @Case { - { "none" "nopaint" } @Yield "{}" - else @Yield { "{" @ColourCommand col "fill }" } + { "no" "none" "nopaint" } @Yield "{}" + else @Yield { "{" @ColourCommand col tex "fill }" } } } @@ -2264,6 +2280,7 @@ def @DiagSetup named thick { 0.12 ft } { outlinewidth } named paint { paint } + import @TextureImport named texture { texture } named font { font } named break { break } named format right @Body { format @Body } @@ -2517,7 +2534,7 @@ def @DiagSetup { "ldiagnodebegin [" @OutLine "]" outlinedashlength "[" outlinestyle "]" - outlinewidth @PSAddPaint paint "ldiagnodeend" + outlinewidth paint @PSAddPaint texture "ldiagnodeend" "(IN) ldiagpushtagdict" // "ldiagpopuptagdict" @@ -2607,6 +2624,7 @@ def @DiagSetup named thick { 0.12 ft } { aoutlinewidth } named paint { apaint } + import @TextureImport named texture { atexture } named font { afont } named break { abreak } named format right @Body { aformat @Body } @@ -2860,7 +2878,7 @@ def @DiagSetup { "ldiagnodebegin [" @OutLine "]" outlinedashlength "[" outlinestyle "]" - outlinewidth @PSAddPaint paint "ldiagnodeend" + outlinewidth paint @PSAddPaint texture "ldiagnodeend" "(IN) ldiagpushtagdict" // "ldiagpopuptagdict" @@ -2950,6 +2968,7 @@ def @DiagSetup named thick { 0.12 ft } { boutlinewidth } named paint { bpaint } + import @TextureImport named texture { btexture } named font { bfont } named break { bbreak } named format right @Body { bformat @Body } @@ -3203,7 +3222,7 @@ def @DiagSetup { "ldiagnodebegin [" @OutLine "]" outlinedashlength "[" outlinestyle "]" - outlinewidth @PSAddPaint paint "ldiagnodeend" + outlinewidth paint @PSAddPaint texture "ldiagnodeend" "(IN) ldiagpushtagdict" // "ldiagpopuptagdict" @@ -3293,6 +3312,7 @@ def @DiagSetup named thick { 0.12 ft } { coutlinewidth } named paint { cpaint } + import @TextureImport named texture { ctexture } named font { cfont } named break { cbreak } named format right @Body { cformat @Body } @@ -3546,7 +3566,7 @@ def @DiagSetup { "ldiagnodebegin [" @OutLine "]" outlinedashlength "[" outlinestyle "]" - outlinewidth @PSAddPaint paint "ldiagnodeend" + outlinewidth paint @PSAddPaint texture "ldiagnodeend" "(IN) ldiagpushtagdict" // "ldiagpopuptagdict" @@ -3637,6 +3657,7 @@ def @DiagSetup { @InsulatedNode paint { nochange } + texture { solid } outlinestyle { noline } outlinewidth { pathwidth } outline { @@ -3662,6 +3683,7 @@ def @DiagSetup outlinewidth { pathwidth } outlinestyle { noline } paint { nochange } + texture { solid } outline { @BackEnd @Case { PostScript @Yield { @@ -3696,6 +3718,7 @@ def @DiagSetup { @InsulatedNode paint { nochange } + texture { solid } outlinestyle { noline } outlinewidth { pathwidth } outline { @@ -3728,6 +3751,7 @@ def @DiagSetup @InsulatedNode outlinestyle { noline } paint { nochange } + texture { solid } outlinewidth { pathwidth } outline { @BackEnd @Case { @@ -3757,6 +3781,7 @@ def @DiagSetup @InsulatedNode outlinestyle { noline } paint { nochange } + texture { solid } outlinewidth { pathwidth } outline { @BackEnd @Case { @@ -3800,6 +3825,7 @@ def @DiagSetup @InsulatedNode outlinestyle { noline } paint { nochange } + texture { solid } outlinewidth { pathwidth } outline { @BackEnd @Case { @@ -3844,6 +3870,7 @@ def @DiagSetup @InsulatedNode outlinestyle { noline } paint { nochange } + texture { solid } outlinewidth { pathwidth } outline { circle } { length @Wide length @High } @@ -3857,6 +3884,7 @@ def @DiagSetup @InsulatedNode outlinestyle { noline } paint { nochange } + texture { solid } outlinewidth { pathwidth } outline { box } { length @Wide width @High } @@ -3919,6 +3947,7 @@ def @DiagSetup named topt {} named arrow {} named arrowlength {} + named backarrowlength {} { path from { from } to { to } @@ -3933,7 +3962,7 @@ def @DiagSetup frompt { frompt } topt { topt } arrow { arrow } - arrowlength { arrowlength } + backarrowlength { backarrowlength } } import @Geometry named from { from } import @Geometry named to { to } @@ -3946,7 +3975,7 @@ def @DiagSetup import @Geometry named xindent { xindent } import @Geometry named zindent { zindent } import @Geometry named frompt { frompt } - import @Geometry named topt { topt } + import @Geometry named topt { topt } named pathstyle named solid { "/ldiagsolid" } named dashed { "/ldiagdashed" } @@ -3970,6 +3999,9 @@ def @DiagSetup named arrowstyle { arrowstyle } named arrowwidth { arrowwidth } named arrowlength { arrowlength } + named backarrowstyle { backarrowstyle } + named backarrowwidth { backarrowwidth } + named backarrowlength { backarrowlength } named linklabel { linklabel } named linklabelmargin { linklabelmargin } @@ -4091,9 +4123,9 @@ def @DiagSetup arrow @Case { { back both } @Yield { @ArrowHead - style { arrowstyle } - width { arrowwidth } - length { arrowlength } + style { backarrowstyle } + width { backarrowwidth } + length { backarrowlength } pathwidth { pathwidth } } else @Yield "" @@ -4119,13 +4151,13 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent "ldiaglinepath" # FROM :< {from??CTR angleto to??CTR} # FROM :: from boundaryatangle FROM@ANGLE - # ++ {arrow @FromArrowLength arrowlength}atangle FROM@ANGLE + # ++ {arrow @FromArrowLength backarrowlength}atangle FROM@ANGLE # TO :< FROM@ANGLE # TO :: to boundaryatangle { TO@ANGLE - 180d } # ++ {arrow @ToArrowLength arrowlength} atangle {TO@ANGLE - 180d} @@ -4152,13 +4184,13 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent pathgap "ldiagdoublelinepath" # FROM :< {from??CTR angleto to??CTR} # FROM :: from boundaryatangle FROM@ANGLE - # ++ {arrow @FromArrowLength arrowlength}atangle FROM@ANGLE + # ++ {arrow @FromArrowLength backarrowlength}atangle FROM@ANGLE # TO :< FROM@ANGLE # TO :: to boundaryatangle { TO@ANGLE - 180d } # ++ {arrow @ToArrowLength arrowlength} atangle {TO@ANGLE - 180d} @@ -4185,7 +4217,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias "ldiagacurvepath" @@ -4199,7 +4231,7 @@ def @DiagSetup # to??CTR XTOP ldiaglinebetween ldiaglineintersect } # FROM :: aabout # circum { from } - # extra { arrow @FromArrowLength arrowlength } + # extra { arrow @FromArrowLength backarrowlength } # centre { CTR } # FROM :< if cond { from??CTR distance FROM > 0 } # then { from??CTR angleto FROM } @@ -4241,7 +4273,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias "ldiagccurvepath" @@ -4255,7 +4287,7 @@ def @DiagSetup # to??CTR XTOP ldiaglinebetween ldiaglineintersect } # FROM :: cabout # circum { from } - # extra { arrow @FromArrowLength arrowlength } + # extra { arrow @FromArrowLength backarrowlength } # centre { CTR } # FROM :< if cond { from??CTR distance FROM > 0 } # then { from??CTR angleto FROM } @@ -4298,13 +4330,13 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent [ frompt ] [ topt ] "ldiagbezierpath" # FROM :< from??CTR angleto frompt # FROM :: from boundaryatangle FROM@ANGLE - # ++ {arrow @FromArrowLength arrowlength} atangle FROM@ANGLE + # ++ {arrow @FromArrowLength backarrowlength} atangle FROM@ANGLE # TO :< topt angleto to??CTR # TO :: to boundaryatangle { TO@ANGLE + 180d } # ++ {arrow @ToArrowLength arrowlength} atangle { TO@ANGLE + 180d } @@ -4324,7 +4356,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent "ldiagvhlinepath" @@ -4332,7 +4364,7 @@ def @DiagSetup # FANG := from??CTR angleto CTR # TANG := to??CTR angleto CTR # FROM :: from boundaryatangle FANG - # ++ {arrow @FromArrowLength arrowlength} atangle FANG + # ++ {arrow @FromArrowLength backarrowlength} atangle FANG # FROM :< FANG # TO :: to boundaryatangle TANG # ++ {arrow @ToArrowLength arrowlength} atangle TANG @@ -4359,7 +4391,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent radius "ldiagvhcurvepath" @@ -4367,7 +4399,7 @@ def @DiagSetup # FANG := from??CTR angleto CTR # TANG := to??CTR angleto CTR # FROM :: from boundaryatangle FANG - # ++ {arrow @FromArrowLength arrowlength} atangle FANG + # ++ {arrow @FromArrowLength backarrowlength} atangle FANG # FROM :< FANG # TO :: to boundaryatangle TANG # ++ {arrow @ToArrowLength arrowlength} atangle TANG @@ -4408,7 +4440,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent "ldiaghvlinepath" @@ -4416,7 +4448,7 @@ def @DiagSetup # FANG := from??CTR angleto CTR # TANG := to??CTR angleto CTR # FROM :: from boundaryatangle FANG - # ++ {arrow @FromArrowLength arrowlength} atangle FANG + # ++ {arrow @FromArrowLength backarrowlength} atangle FANG # FROM :< FANG # TO :: to boundaryatangle TANG # ++ {arrow @ToArrowLength arrowlength} atangle TANG @@ -4443,7 +4475,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent radius "ldiaghvcurvepath" @@ -4451,7 +4483,7 @@ def @DiagSetup # FANG := from??CTR angleto CTR # TANG := to??CTR angleto CTR # FROM :: from boundaryatangle FANG - # ++ {arrow @FromArrowLength arrowlength} atangle FANG + # ++ {arrow @FromArrowLength backarrowlength} atangle FANG # FROM :< FANG # TO :: to boundaryatangle TANG # ++ {arrow @ToArrowLength arrowlength} atangle TANG @@ -4492,12 +4524,12 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias "ldiaglvrlinepath" # FROM :: from boundaryatangle 180d - # ++ {arrow @FromArrowLength arrowlength} atangle 180d + # ++ {arrow @FromArrowLength backarrowlength} atangle 180d # FROM :< 180d # TO :: to boundaryatangle 180d # ++ {arrow @ToArrowLength arrowlength} atangle 180d @@ -4527,12 +4559,12 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias radius "ldiaglvrcurvepath" # FROM :: from boundaryatangle 180d - # ++ {arrow @FromArrowLength arrowlength} atangle 180d + # ++ {arrow @FromArrowLength backarrowlength} atangle 180d # FROM :< 180d # TO :: to boundaryatangle 180d # ++ {arrow @ToArrowLength arrowlength} atangle 180d @@ -4579,12 +4611,12 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias "ldiagrvllinepath" # FROM :: from boundaryatangle 0d - # ++ {arrow @FromArrowLength arrowlength} atangle 0d + # ++ {arrow @FromArrowLength backarrowlength} atangle 0d # FROM :< 0d # TO :: to boundaryatangle 0d # ++ {arrow @ToArrowLength arrowlength} atangle 0d @@ -4614,12 +4646,12 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias radius "ldiagrvlcurvepath" # FROM :: from boundaryatangle 0d - # ++ {arrow @FromArrowLength arrowlength} atangle 0d + # ++ {arrow @FromArrowLength backarrowlength} atangle 0d # FROM :< 0d # TO :: to boundaryatangle 0d # ++ {arrow @ToArrowLength arrowlength} atangle 0d @@ -4667,7 +4699,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent hfrac hbias "ldiaghvhlinepath" @@ -4676,7 +4708,7 @@ def @DiagSetup # 180 { 180d } 180-270 { 180d } 270 { 180d } 270-360 { 0d }} # TODIRN := {FRDIRN + 180d} # FROM :: from boundaryatangle FRDIRN ++ - # {arrow @FromArrowLength arrowlength} atangle FRDIRN + # {arrow @FromArrowLength backarrowlength} atangle FRDIRN # FROM :< FRDIRN # TO :: to boundaryatangle TODIRN ++ # {arrow @ToArrowLength arrowlength} atangle TODIRN @@ -4704,7 +4736,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent hfrac hbias radius "ldiaghvhcurvepath" @@ -4713,7 +4745,7 @@ def @DiagSetup # 180 { 180d } 180-270 { 180d } 270 { 180d } 270-360 { 0d }} # TODIRN := {FRDIRN + 180d} # FROM :: from boundaryatangle FRDIRN ++ - # {arrow @FromArrowLength arrowlength} atangle FRDIRN + # {arrow @FromArrowLength backarrowlength} atangle FRDIRN # FROM :< FRDIRN # TO :: to boundaryatangle TODIRN ++ # {arrow @ToArrowLength arrowlength} atangle TODIRN @@ -4759,12 +4791,12 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent hfrac hbias "ldiagvhvlinepath" # FROM :: from boundaryatangle 0d - # ++ {arrow @FromArrowLength arrowlength} atangle 0d + # ++ {arrow @FromArrowLength backarrowlength} atangle 0d # FROM :< 0d # TO :: to boundaryatangle 0d # ++ {arrow @ToArrowLength arrowlength} atangle 0d @@ -4794,7 +4826,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent hfrac hbias radius "ldiagvhvcurvepath" @@ -4851,14 +4883,14 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias fbias tbias "ldiagdwraplinepath" # DIRN := if cond { xcoord from??CTR < xcoord to??CTR } # then { 180d } else { 0d } # FROM :: from boundaryatangle DIRN - # ++ {arrow @FromArrowLength arrowlength} atangle DIRN + # ++ {arrow @FromArrowLength backarrowlength} atangle DIRN # FROM :< DIRN # TO :: to boundaryatangle { DIRN + 180d } # ++ {arrow @ToArrowLength arrowlength} atangle { DIRN + 180d } @@ -4893,7 +4925,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias fbias tbias radius "ldiagdwrapcurvepath" @@ -4902,7 +4934,7 @@ def @DiagSetup # CLOCK := if cond { xcoord from??CTR < xcoord to??CTR } # then { anticlockwise } else { clockwise } # FROM :: from boundaryatangle DIRN - # ++ {arrow @FromArrowLength arrowlength} atangle DIRN + # ++ {arrow @FromArrowLength backarrowlength} atangle DIRN # FROM :< DIRN # TO :: to boundaryatangle { DIRN + 180d } # ++ {arrow @ToArrowLength arrowlength} atangle { DIRN + 180d } @@ -4976,14 +5008,14 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias fbias tbias "ldiaguwraplinepath" # DIRN := if cond { xcoord from??CTR < xcoord to??CTR } # then { 180d } else { 0d } # FROM :: from boundaryatangle DIRN - # ++ {arrow @FromArrowLength arrowlength} atangle DIRN + # ++ {arrow @FromArrowLength backarrowlength} atangle DIRN # FROM :< DIRN # TO :: to boundaryatangle { DIRN + 180d } # ++ {arrow @ToArrowLength arrowlength} atangle { DIRN + 180d } @@ -5018,7 +5050,7 @@ def @DiagSetup { @BackEnd @Case { PostScript @Yield { - {arrow @FromArrowLength arrowlength} + {arrow @FromArrowLength backarrowlength} {arrow @ToArrowLength arrowlength} "{" from "}" "{" to "}" xindent zindent bias fbias tbias radius "ldiaguwrapcurvepath" @@ -5027,7 +5059,7 @@ def @DiagSetup # CLOCK := if cond { xcoord from??CTR < xcoord to??CTR } # then { clockwise } else { anticlockwise } # FROM :: from boundaryatangle DIRN - # ++ {arrow @FromArrowLength arrowlength} atangle DIRN + # ++ {arrow @FromArrowLength backarrowlength} atangle DIRN # FROM :< DIRN # TO :: to boundaryatangle { DIRN + 180d } # ++ {arrow @ToArrowLength arrowlength} atangle { DIRN + 180d } @@ -5137,6 +5169,7 @@ def @DiagSetup topt { topt } arrow { arrow } arrowlength { arrowlength } + backarrowlength { backarrowlength } } } } @@ -5233,6 +5266,7 @@ def @DiagSetup named topt {} named arrow {} named arrowlength {} + named backarrowlength {} { path from { from } to { to } @@ -5248,6 +5282,7 @@ def @DiagSetup topt { topt } arrow { arrow } arrowlength { arrowlength } + backarrowlength { backarrowlength } } import @Geometry named basefrom { } import @Geometry named baseto { } @@ -5286,6 +5321,9 @@ def @DiagSetup named arrowstyle { arrowstyle } named arrowwidth { arrowwidth } named arrowlength { arrowlength } + named backarrowstyle { backarrowstyle } + named backarrowwidth { backarrowwidth } + named backarrowlength { backarrowlength } named linklabel { linklabel } named linklabelmargin { linklabelmargin } @@ -5405,6 +5443,7 @@ def @DiagSetup topt { topt } arrow { arrow } arrowlength { arrowlength } + backarrowlength { backarrowlength } } pathstyle { pathstyle } pathdashlength { pathdashlength } @@ -5414,6 +5453,9 @@ def @DiagSetup arrowstyle { arrowstyle } arrowwidth { arrowwidth } arrowlength { arrowlength } + backarrowstyle { backarrowstyle } + backarrowwidth { backarrowwidth } + backarrowlength { backarrowlength } linklabel { linklabel } linklabelmargin { linklabelmargin } @@ -6712,5 +6754,6 @@ def @DiagSetup chsize { 1f } arrowlength { 0.4f } + backarrowlength { 0.4f } } } diff --git a/include/diagf.lpg b/include/diagf.lpg index 9f3b3d6..3a076ef 100644 --- a/include/diagf.lpg +++ b/include/diagf.lpg @@ -227,26 +227,39 @@ ldiagdict begin { pop pop } def +% shape and labels of the @Box symbol +% ldiagbox <shape> /ldiagbox { 0 0 /SW ldiagpointdef xsize 0 /SE ldiagpointdef xsize ysize /NE ldiagpointdef 0 ysize /NW ldiagpointdef + + xsize 0.25 mul ysize /NNW ldiagpointdef + xsize 0.75 mul ysize /NNE ldiagpointdef + xsize 0.25 mul 0 /SSW ldiagpointdef + xsize 0.75 mul 0 /SSE ldiagpointdef + SE 0.5 ldiagpmul /S ldiagpointdef NW 0.5 ldiagpmul /W ldiagpointdef W SE ldiagpadd /E ldiagpointdef S NW ldiagpadd /N ldiagpointdef + NE 0.5 ldiagpmul /CTR ldiagpointdef - 0 dg /S@ANGLE ldiagangledef - 45 dg /SE@ANGLE ldiagangledef - 90 dg /E@ANGLE ldiagangledef - 135 dg /NE@ANGLE ldiagangledef - 180 dg /N@ANGLE ldiagangledef - 225 dg /NW@ANGLE ldiagangledef - 270 dg /W@ANGLE ldiagangledef - 315 dg /SW@ANGLE ldiagangledef + 0 dg /SSW@ANGLE ldiagangledef + 0 dg /S@ANGLE ldiagangledef + 0 dg /SSE@ANGLE ldiagangledef + 45 dg /SE@ANGLE ldiagangledef + 90 dg /E@ANGLE ldiagangledef + 135 dg /NE@ANGLE ldiagangledef + 180 dg /NNE@ANGLE ldiagangledef + 180 dg /N@ANGLE ldiagangledef + 180 dg /NNW@ANGLE ldiagangledef + 225 dg /NW@ANGLE ldiagangledef + 270 dg /W@ANGLE ldiagangledef + 315 dg /SW@ANGLE ldiagangledef [ CTR NE ldiagpsub /ldiagboxcircum cvx ] ldiagcircumdef SW SE NE NW SW diff --git a/include/doc b/include/doc index 202580b..fdf436a 100644 --- a/include/doc +++ b/include/doc @@ -145,33 +145,66 @@ # @RefListBreak { } # break style of ref list # @RefListLabelWidth { @ListLabelWidth } # Labels column width # @RefListSortKey { @Tag } # sorting key + # @MakeGlossary { No } # make glossary? Yes or No + # @GlossaryText { @Null } # glossary initial text + # @GlossaryFont { } # glossary entries font + # @GlossaryBreak { } # glossary entries break + # @GlossaryFormat { +3p @Font @S @Name # glossary entries format + # @Right @I { @Word&&page @PageNum } + # @DP @RawIndentedDisplay @Body } + # @GlossaryGap { @DisplayGap } # gap between glossary entries + # @GlossaryColumnNumber{ 2 } # glossary columns (1 to 10) + # @GlossaryColumnGap { 1.00c @OrIfPlain 6s } # glossary column gap + # @InGlossaryFont { smallcaps } # font for @InGlossary + # @InGlossaryFormat { @Body } # format for @InGlossary # @MakeIndex { No } # make index? Yes or No # @IndexText { @Null } # index initial text # @IndexFont { } # index entries font # @IndexBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexFormat { @Body } # @Index format + # @SubIndexFormat { {1f @Wide}@Body } # @SubIndex format + # @SubSubIndexFormat { {2f @Wide}@Body } # @SubSubIndex format # @IndexColumnNumber { 2 } # index columns (1 to 10) # @IndexColumnGap { 1.00c @OrIfPlain 6s } # index column gap # @IndexCtd { Yes } # include (ctd.) lines # @IndexCtdWord { continued } # "ctd." in current lang. # @IndexCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexSpacerAbove { 2v } # space above index spacer + # @IndexSpacerBelow { 1v } # space below index spacer + # @IndexSpacerFont { +3p } # font of index spacer + # @IndexSpacerFormat { @Body } # format of index spacer # @MakeIndexA { No } # make index A? Yes or No # @IndexAText { @Null } # index A initial text # @IndexAFont { } # index A entries font # @IndexABreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexAFormat { @Body } # @IndexA format + # @SubIndexAFormat { {1f @Wide}@Body } # @SubIndexA format + # @SubSubIndexAFormat { {2f @Wide}@Body } # @SubSubIndexA format # @IndexAColumnNumber { 2 } # index A columns (1 to 10) # @IndexAColumnGap { 1.00c @OrIfPlain 6s } # index A column gap # @IndexACtd { Yes } # include (ctd.) lines # @IndexACtdWord { continued } # "ctd." in current lang. # @IndexACtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexASpacerAbove { 2v } # space above index A spacer + # @IndexASpacerBelow { 1v } # space below index A spacer + # @IndexASpacerFont { +3p } # font of index A spacer + # @IndexASpacerFormat { @Body } # format of index A spacer # @MakeIndexB { No } # make index B? Yes or No # @IndexBText { @Null } # index B initial text # @IndexBFont { } # index B entries font # @IndexBBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexBFormat { @Body } # @IndexB format + # @SubIndexBFormat { {1f @Wide}@Body } # @SubIndexB format + # @SubSubIndexBFormat { {2f @Wide}@Body } # @SubSubIndexB format # @IndexBColumnNumber { 2 } # index B columns (1 to 10) # @IndexBColumnGap { 1.00c @OrIfPlain 6s } # index B column gap # @IndexBCtd { Yes } # include (ctd.) lines # @IndexBCtdWord { continued } # "ctd." in current lang. # @IndexBCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexBSpacerAbove { 2v } # space above index B spacer + # @IndexBSpacerBelow { 1v } # space below index B spacer + # @IndexBSpacerFont { +3p } # font of index B spacer + # @IndexBSpacerFormat { @Body } # format of index B spacer # @TopGap { 0.75c @OrIfPlain 2f } # gap between figures # @MidGap { 0.75c @OrIfPlain 2f } # gap above/below body text # @FootNoteNumbers { Arabic } # footnote numbers diff --git a/include/dsf b/include/dsf index b0fa61b..5e1ee73 100644 --- a/include/dsf +++ b/include/dsf @@ -38,14 +38,19 @@ export @Ref @NoRef @ChapRef @NoChapRef @Cite @NoCite @ChapCite @NoChapCite - @IndexA @SubIndexA @SubSubIndexA @RawIndexA - @RawSubIndexA @RawSubSubIndexA @IndexABlanks + @Glossary @InGlossary - @IndexB @SubIndexB @SubSubIndexB @RawIndexB - @RawSubIndexB @RawSubSubIndexB @IndexBBlanks + @IndexA @SubIndexA @SubSubIndexA + @RawIndexA @RawSubIndexA @RawSubSubIndexA + @IndexABlanks @IndexASpacer @InitialIndexASpacer @IndexALetters - @Index @SubIndex @SubSubIndex @RawIndex - @RawSubIndex @RawSubSubIndex @IndexBlanks + @IndexB @SubIndexB @SubSubIndexB + @RawIndexB @RawSubIndexB @RawSubSubIndexB + @IndexBBlanks @IndexBSpacer @InitialIndexBSpacer @IndexBLetters + + @Index @SubIndex @SubSubIndex + @RawIndex @RawSubIndex @RawSubSubIndex + @IndexBlanks @IndexSpacer @InitialIndexSpacer @IndexLetters @BypassContentsEntry @BypassMajorContentsEntry @BypassFigureContentsEntry @BypassTableContentsEntry @@ -73,7 +78,7 @@ def @DocumentSetup named @EvenRightBodyMargin { 0c } # extra margin for page body named @PageBoxType { None } # None Box CurveBox ShadowBox named @PageBoxMargin { 1.00c } # page box margin - import @LengthUnits named @PageBoxLineWidth + import @PSLengths named @PageBoxLineWidth { } # page box line thickness named @PageBoxPaint { none } # page box paint named @PageBoxShadow { 0.60c } # shadow margin if ShadowBox @@ -236,10 +241,32 @@ def @DocumentSetup named ":" { "\037" } { @Tag } # sorting key + named @MakeGlossary { No } # make glossary? Yes or No + named @GlossaryText { @Null } # initial glossary text + named @GlossaryFont { } # font for glossary + named @GlossaryBreak { } # break style for glossary + named @GlossaryFormat # format for glossary + named @Name {} + named @PageNum {} + named @Body {} + { +3p @Font @S @Name + @Right @I { @Word&&page @PageNum } + @DP @RawIndentedDisplay @Body } + named @GlossaryGap { @DisplayGap } # gap between glossary items + named @GlossaryColumnNumber { 2 } # glossary columns (1 to 10) + named @GlossaryColumnGap { 1.00c @OrIfPlain 6s } # glossary column gap + named @InGlossaryFont { smallcaps } # font for @InGlossary + named @InGlossaryFormat right @Body { @Body } # format for @InGlossary named @MakeIndex { No } # make index? Yes or No named @IndexText { @Null } # initial index text named @IndexFont { } # index entries font named @IndexBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # index entries break + named @IndexFormat + right @Body { @Body } # @Index format + named @SubIndexFormat + right @Body { {1f @Wide}@Body } # @SubIndex format + named @SubSubIndexFormat + right @Body { {2f @Wide}@Body } # @SubSubIndex format named @IndexColumnNumber { 2 } # index columns (1 to 10) named @IndexColumnGap { 1.00c @OrIfPlain 6s } # index column gap named @IndexCtd { Yes } # include (ctd.) lines @@ -248,10 +275,21 @@ def @DocumentSetup left @Body right @CtdWord { @Body @I (@CtdWord) } # (ctd.) format + named @IndexSpacerAbove { 2v } # space above index spacer + named @IndexSpacerBelow { 1v } # space below index spacer + named @IndexSpacerFont { +3p } # font of index spacer + named @IndexSpacerFormat + right @Body { @Body } # format of index spacer named @MakeIndexA { No } # make index A? Yes or No named @IndexAText { @Null } # initial index text named @IndexAFont { } # index A entries font named @IndexABreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # index A entries break + named @IndexAFormat + right @Body { @Body } # @IndexA format + named @SubIndexAFormat + right @Body { {1f @Wide}@Body } # @SubIndexA format + named @SubSubIndexAFormat + right @Body { {2f @Wide}@Body } # @SubSubIndexA format named @IndexAColumnNumber { 2 } # index A columns (1 to 10) named @IndexAColumnGap { 1.00c @OrIfPlain 6s } # index A column gap named @IndexACtd { Yes } # include (ctd.) lines @@ -260,10 +298,21 @@ def @DocumentSetup left @Body right @CtdWord { @Body @I (@CtdWord) } # (ctd.) format + named @IndexASpacerAbove { 2v } # space above index A spacer + named @IndexASpacerBelow { 1v } # space below index A spacer + named @IndexASpacerFont { +3p } # font of index A spacer + named @IndexASpacerFormat + right @Body { @Body } # format of index A spacer named @MakeIndexB { No } # make index B? Yes or No named @IndexBText { @Null } # initial index text named @IndexBFont { } # index B entries font named @IndexBBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # index B entries break + named @IndexBFormat + right @Body { @Body } # @IndexB format + named @SubIndexBFormat + right @Body { {1f @Wide}@Body } # @SubIndexB format + named @SubSubIndexBFormat + right @Body { {2f @Wide}@Body } # @SubSubIndexB format named @IndexBColumnNumber { 2 } # index B columns (1 to 10) named @IndexBColumnGap { 1.00c @OrIfPlain 6s } # index B column gap named @IndexBCtd { Yes } # include (ctd.) lines @@ -272,6 +321,11 @@ def @DocumentSetup left @Body right @CtdWord { @Body @I (@CtdWord) } # (ctd.) format + named @IndexBSpacerAbove { 2v } # space above index B spacer + named @IndexBSpacerBelow { 1v } # space below index B spacer + named @IndexBSpacerFont { +3p } # font of index B spacer + named @IndexBSpacerFormat + right @Body { @Body } # format of index B spacer named @TopGap { 0.75c @OrIfPlain 2f } # gap between figures named @MidGap { 0.75c @OrIfPlain 2f } # gap above/below body text @@ -785,7 +839,7 @@ def @DocumentSetup ########################################################################### # # # Definitions for page headers and footers. There are 16 symbols here, # - # in the following pattern: # + # in the following arrangement: # # # # @(- | Running)(- | Intro)(Odd | Even)(Top | Foot)Header # # # @@ -807,6 +861,7 @@ def @DocumentSetup named @Prefix {} named @Tag {} { @Null + # "(@Runner:"@Start":"@MajorTitle")" } def @DupRunner # duplicate previous runner @@ -1168,6 +1223,7 @@ def @DocumentSetup def @IntroOddFullPlace { @Galley } def @IntroEvenFullPlace { @Galley } def @IntroColPlace { @Galley } + def @GlossaryPlace { @Galley } def @IndexPlace { @Galley } def @IndexAPlace { @Galley } def @IndexBPlace { @Galley } @@ -1359,6 +1415,11 @@ def @DocumentSetup @HExpand num @ColsOf @EqualWidth 0c @High @IntroColPlace } + def @GlossaryColList right num + { + @HExpand num @ColsOf gap { @GlossaryColumnGap } @EqualWidth @VExpand @GlossaryPlace + } + def @IndexColList right num { @HExpand num @ColsOf gap { @IndexColumnGap } @EqualWidth @VExpand @IndexPlace @@ -1479,7 +1540,7 @@ def @DocumentSetup ########################################################################### # # # Definitions for page lists. There are four symbols here, in the # - # following pattern: # + # following arrangement: # # # # @(Simple | Running)(- | Intro)PageList # # # @@ -1502,6 +1563,7 @@ def @DocumentSetup @OneOf { @ColList colnum + @GlossaryColList @GlossaryColumnNumber @IndexAColList @IndexAColumnNumber @IndexBColList @IndexBColumnNumber @IndexColList @IndexColumnNumber @@ -1513,6 +1575,7 @@ def @DocumentSetup @OneOf { @IntroColList colnum + @GlossaryColList @GlossaryColumnNumber @IndexAColList @IndexAColumnNumber @IndexBColList @IndexBColumnNumber @IndexColList @IndexColumnNumber @@ -2141,7 +2204,9 @@ def @DocumentSetup named postgap { 0c } named protect { No } { - def @Leaders { @ContentsLeader &@ContentsLeaderGap @Leaders } +# def @Leaders { @ContentsLeader &@ContentsLeaderGap @Leaders } + + def @Leaders { @ContentsLeaderGap @Wide {} & @ContentsLeader & @Leaders } def @OptionalCrossLink right x { @@ -2158,10 +2223,20 @@ def @DocumentSetup } } +# def @Item +# { +# |indent @OptionalCrossLink number @ContentsFormat @HExpand { +# title & @ContentsLeaderGap @Wide &1rt @OneCol { +# @Leaders & @RightPart &0io +# } +# } +# |@ContentsRightWidth +# } + def @Item { |indent @OptionalCrossLink number @ContentsFormat @HExpand { - title & @ContentsLeaderGap @Wide &1rt @OneCol { + title &1rt @OneCol { @Leaders & @RightPart &0io } } @@ -2537,45 +2612,45 @@ def @DocumentSetup # but since the point of @Place is to output a matrix (?), I have not implemented this change # def @Place - named x + import @PSLengths named x named "+" precedence 96 associativity left left a right b { a b "add" } named "-" precedence 96 associativity left left a right b { a b "sub" } named "/" precedence 97 associativity left left a right b { a b "div" } named "*" precedence 98 associativity left left a right b { a b "mul" } - named c precedence 99 left a { a "cm" } - named i precedence 99 left a { a "in" } - named e precedence 99 left a { a "em" } - named p precedence 99 left a { a "pt" } - named f precedence 99 left a { a "ft" } - named s precedence 99 left a { a "sp" } - named v precedence 99 left a { a "vs" } - named cm precedence 99 left a { a "cm" } - named in precedence 99 left a { a "in" } - named em precedence 99 left a { a "em" } - named pt precedence 99 left a { a "pt" } - named ft precedence 99 left a { a "ft" } - named sp precedence 99 left a { a "sp" } - named vs precedence 99 left a { a "vs" } + # named c precedence 99 left a { a "cm" } + # named i precedence 99 left a { a "in" } + # named e precedence 99 left a { a "em" } + # named p precedence 99 left a { a "pt" } + # named f precedence 99 left a { a "ft" } + # named s precedence 99 left a { a "sp" } + # named v precedence 99 left a { a "vs" } + # named cm precedence 99 left a { a "cm" } + # named in precedence 99 left a { a "in" } + # named em precedence 99 left a { a "em" } + # named pt precedence 99 left a { a "pt" } + # named ft precedence 99 left a { a "ft" } + # named sp precedence 99 left a { a "sp" } + # named vs precedence 99 left a { a "vs" } { 0 } - named y + import @PSLengths named y named "+" precedence 96 associativity left left a right b { a b "add" } named "-" precedence 96 associativity left left a right b { a b "sub" } named "/" precedence 97 associativity left left a right b { a b "div" } named "*" precedence 98 associativity left left a right b { a b "mul" } - named c precedence 99 left a { a "cm" } - named i precedence 99 left a { a "in" } - named e precedence 99 left a { a "em" } - named p precedence 99 left a { a "pt" } - named f precedence 99 left a { a "ft" } - named s precedence 99 left a { a "sp" } - named v precedence 99 left a { a "vs" } - named cm precedence 99 left a { a "cm" } - named in precedence 99 left a { a "in" } - named em precedence 99 left a { a "em" } - named pt precedence 99 left a { a "pt" } - named ft precedence 99 left a { a "ft" } - named sp precedence 99 left a { a "sp" } - named vs precedence 99 left a { a "vs" } + # named c precedence 99 left a { a "cm" } + # named i precedence 99 left a { a "in" } + # named e precedence 99 left a { a "em" } + # named p precedence 99 left a { a "pt" } + # named f precedence 99 left a { a "ft" } + # named s precedence 99 left a { a "sp" } + # named v precedence 99 left a { a "vs" } + # named cm precedence 99 left a { a "cm" } + # named in precedence 99 left a { a "in" } + # named em precedence 99 left a { a "em" } + # named pt precedence 99 left a { a "pt" } + # named ft precedence 99 left a { a "ft" } + # named sp precedence 99 left a { a "sp" } + # named vs precedence 99 left a { a "vs" } { 0 } right val { @@ -3988,6 +4063,59 @@ def @DocumentSetup ########################################################################### # # + # Glossary. # + # # + ########################################################################### + + def @GlossaryList { @Galley //@GlossaryGap @GlossaryList } + + def @GlossarySection into { @GlossaryPlace&&following } + right etc + { + // @GlossaryList + // etc + //1rt + } + + def @DoGlossary into { @GlossaryList&&following } + left @Key + named name {} + named pnum {} + right body + { + @GlossaryFont @Font @GlossaryBreak @Break @GlossaryFormat + @Name { name } + @PageNum { pnum } + @Body { body } + } + + def @Glossary + left name + named sortkey { dft } + right body + { + def key { sortkey @Dft name } + + @MakeGlossary @Case { + { Yes yes } @Yield { @PageMark key & + key @DoGlossary name { name } pnum { @PageOf key } body + } + else @Yield @Null + } + } + + def @InGlossary + right x + { + @MakeGlossary @Case { + { Yes yes } @Yield { @InGlossaryFormat @InGlossaryFont @Font x } + else @Yield x + } + } + + + ########################################################################### + # # # Index. # # # ########################################################################### @@ -4002,39 +4130,47 @@ def @DocumentSetup // @IndexBreak @Break @BypassIndexList // @ClearHeaderComponent // etc + //1rt } def @DoIndex into { @IndexList&&following } - left @Key - named indent { 0f } - named stem {} - right @Body + left @Key # sort key + named pgrange {} # page numbers, or empty if none + named depth {} # 0, 1, or 2 (@Index, @Sub, or @SubSub) + right body # body, not including any prefix { + def @Body + { + depth @Case { + 0 @Yield @IndexFormat body + 1 @Yield @SubIndexFormat body + 2 @Yield @SubSubIndexFormat body + } + } + def @Enclose right x { - @IndexCtd.indent @Case { + @IndexCtd.depth @Case { - Yes.0f @Yield { + Yes.0 @Yield { @ClearHeaderComponent //1vx x //1vx 1vx @SetHeaderComponent { - indent @Wide & - stem @IndexCtdFormat {continued @WordVal @IndexCtdWord} + @Body @IndexCtdFormat {continued @WordVal @IndexCtdWord} } //1vx 1vx @BeginHeaderComponent (unused) } - Yes.1f @Yield { + Yes.1 @Yield { @EndHeaderComponent //1vx x //1vx 1vx @BeginHeaderComponent { - indent @Wide & - stem @IndexCtdFormat {continued @WordVal @IndexCtdWord} + @Body @IndexCtdFormat {continued @WordVal @IndexCtdWord} } } @@ -4043,46 +4179,43 @@ def @DocumentSetup } } - def @Merge left x right y + def @Merge left lpart right rpart { - { x @Rump { x @Meld y } } @Case + { lpart @Rump { lpart @Meld rpart } } @Case { - "" @Yield x - else @Yield { { x{@OneCol ,} } @Meld y } + "" @Yield lpart + else @Yield { { lpart{@OneCol ,} } @Meld rpart } } } - @IndexFont @Font @IndexBreak @Break { indent @Wide & @Body } + @IndexFont @Font @IndexBreak @Break pgrange @Case { + "" @Yield { @Body &"0.03fu" {} } + else @Yield { @Body &"0.03fu" {}{@OneCol ,} pgrange } + + } } def @RawIndex - left x - named @Tag {} - named indent { 0f } - right y + left lpart + named depth { 0 } + right rpart { @MakeIndex @Case { - Yes @Yield { - @PageMark @Tag & - x @DoIndex stem { y } indent { indent } - { - y &"0.03fu" {} - } - } + Yes @Yield { lpart @DoIndex depth { depth } rpart } else @Yield @Null } } - macro @RawSubIndex { @RawIndex indent { "1f" } } - macro @RawSubSubIndex { @RawIndex indent { "2f" } } + macro @RawSubIndex { @RawIndex depth { 1 } } + macro @RawSubSubIndex { @RawIndex depth { 2 } } def @Index - left x + left lpart named @Tag {} - named indent { 0f } + named depth { 0 } named to {} - right y + right rpart { def @PgMk right tag { @@ -4104,21 +4237,16 @@ def @DocumentSetup } } - @MakeIndex @Case { Yes @Yield { - @PageMark @Tag & - x @DoIndex stem { y } indent { indent } - { - y &"0.03fu" {}{@OneCol ,} @PgRange - } - } + @PageMark @Tag & + lpart @DoIndex depth { depth } pgrange { @PgRange } rpart } else @Yield @Null } } - macro @SubIndex { @Index indent { "1f" } } - macro @SubSubIndex { @Index indent { "2f" } } + macro @SubIndex { @Index depth { 1 } } + macro @SubSubIndex { @Index depth { 2 } } def @IndexBlanks { @@ -4131,6 +4259,44 @@ def @DocumentSetup z @RawIndex {} } + def @IndexSpacer + left lpart + named above { @IndexSpacerAbove } + named below { @IndexSpacerBelow } + named font { @IndexSpacerFont } + named format right @Body { @IndexSpacerFormat @Body } + right rpart + { + def @Send into { @IndexList&&following } + right @Key + { + @ClearHeaderComponent + // + //above + @CNP + @OneRow { font @Font format rpart //below } + } + + @MakeIndex @Case { + Yes @Yield @Send lpart + else @Yield @Null + } + } + + macro @InitialIndexSpacer { @IndexSpacer above { 0i } } + + def @IndexLetters + { + a @InitialIndexSpacer A + b @IndexSpacer B c @IndexSpacer C d @IndexSpacer D e @IndexSpacer E + f @IndexSpacer F g @IndexSpacer G h @IndexSpacer H i @IndexSpacer I + j @IndexSpacer J k @IndexSpacer K l @IndexSpacer L m @IndexSpacer M + n @IndexSpacer N o @IndexSpacer O p @IndexSpacer P q @IndexSpacer Q + r @IndexSpacer R s @IndexSpacer S t @IndexSpacer T u @IndexSpacer U + v @IndexSpacer V w @IndexSpacer W x @IndexSpacer X y @IndexSpacer Y + z @IndexSpacer Z + } + def @BypassBeginIndexPlace { @Galley } def @BypassBeginIndex force into { @BypassBeginIndexPlace&&preceding } {} @@ -4157,40 +4323,51 @@ def @DocumentSetup def @IndexASection into { @IndexAPlace&&following } right etc { - // @IndexABreak @Break @IndexAList // etc - // @IndexABreak @Break @BypassIndexAList // etc + // @IndexABreak @Break @IndexAList + // @IndexABreak @Break @BypassIndexAList + // @ClearHeaderComponent + // etc + //1rt } def @DoIndexA into { @IndexAList&&following } - left @Key - named indent { 0f } - right @Body + left @Key # sort key + named pgrange {} # page numbers, or empty if none + named depth {} # 0, 1, or 2 (@IndexA, @Sub, or @SubSub) + right body # body, not including any prefix { + def @Body + { + depth @Case { + 0 @Yield @IndexAFormat body + 1 @Yield @SubIndexAFormat body + 2 @Yield @SubSubIndexAFormat body + } + } + def @Enclose right x { - @IndexACtd.indent @Case { + @IndexACtd.depth @Case { - Yes.0f @Yield { + Yes.0 @Yield { @ClearHeaderComponent //1vx x //1vx 1vx @SetHeaderComponent { - indent @Wide & - stem @IndexACtdFormat {continued @WordVal @IndexACtdWord} + @Body @IndexACtdFormat {continued @WordVal @IndexACtdWord} } //1vx 1vx @BeginHeaderComponent (unused) } - Yes.1f @Yield { + Yes.1 @Yield { @EndHeaderComponent //1vx x //1vx 1vx @BeginHeaderComponent { - indent @Wide & - stem @IndexACtdFormat {continued @WordVal @IndexACtdWord} + @Body @IndexACtdFormat {continued @WordVal @IndexACtdWord} } } @@ -4199,46 +4376,43 @@ def @DocumentSetup } } - def @Merge left x right y + def @Merge left lpart right rpart { - { x @Rump { x @Meld y } } @Case + { lpart @Rump { lpart @Meld rpart } } @Case { - "" @Yield x - else @Yield { { x{@OneCol ,} } @Meld y } + "" @Yield lpart + else @Yield { { lpart{@OneCol ,} } @Meld rpart } } } - @IndexAFont @Font @IndexABreak @Break { indent @Wide & @Body } + @IndexAFont @Font @IndexABreak @Break pgrange @Case { + "" @Yield { @Body &"0.03fu" {} } + else @Yield { @Body &"0.03fu" {}{@OneCol ,} pgrange } + + } } def @RawIndexA - left x - named @Tag {} - named indent { 0f } - right y + left lpart + named depth { 0 } + right rpart { @MakeIndexA @Case { - Yes @Yield { - @PageMark @Tag & - x @DoIndexA stem { y } indent { indent } - { - y &"0.03fu" {} - } - } + Yes @Yield { lpart @DoIndexA depth { depth } rpart } else @Yield @Null } } - macro @RawSubIndexA { @RawIndexA indent { "1f" } } - macro @RawSubSubIndexA { @RawIndexA indent { "2f" } } + macro @RawSubIndexA { @RawIndexA depth { 1 } } + macro @RawSubSubIndexA { @RawIndexA depth { 2 } } def @IndexA - left x + left lpart named @Tag {} - named indent { 0f } + named depth { 0 } named to {} - right y + right rpart { def @PgMk right tag { @@ -4262,19 +4436,14 @@ def @DocumentSetup @MakeIndexA @Case { Yes @Yield { - @PageMark @Tag & - x @DoIndexA stem { y } indent { indent } - { - y &"0.03fu" {}{@OneCol ,} @PgRange - } - } + @PageMark @Tag & + lpart @DoIndexA depth { depth } pgrange { @PgRange } rpart } else @Yield @Null } - } - macro @SubIndexA { @IndexA indent { "1f" } } - macro @SubSubIndexA { @IndexA indent { "2f" } } + macro @SubIndexA { @IndexA depth { 1 } } + macro @SubSubIndexA { @IndexA depth { 2 } } def @IndexABlanks { @@ -4287,6 +4456,44 @@ def @DocumentSetup z @RawIndexA {} } + def @IndexASpacer + left lpart + named above { @IndexASpacerAbove } + named below { @IndexASpacerBelow } + named font { @IndexASpacerFont } + named format right @Body { @IndexASpacerFormat @Body } + right rpart + { + def @Send into { @IndexAList&&following } + right @Key + { + @ClearHeaderComponent + // + //above + @CNP + @OneRow { font @Font format rpart //below } + } + + @MakeIndexA @Case { + Yes @Yield @Send lpart + else @Yield @Null + } + } + + macro @InitialIndexASpacer { @IndexASpacer above { 0i } } + + def @IndexALetters + { + a @InitialIndexASpacer A + b @IndexASpacer B c @IndexASpacer C d @IndexASpacer D e @IndexASpacer E + f @IndexASpacer F g @IndexASpacer G h @IndexASpacer H i @IndexASpacer I + j @IndexASpacer J k @IndexASpacer K l @IndexASpacer L m @IndexASpacer M + n @IndexASpacer N o @IndexASpacer O p @IndexASpacer P q @IndexASpacer Q + r @IndexASpacer R s @IndexASpacer S t @IndexASpacer T u @IndexASpacer U + v @IndexASpacer V w @IndexASpacer W x @IndexASpacer X y @IndexASpacer Y + z @IndexASpacer Z + } + def @BypassBeginIndexAPlace { @Galley } def @BypassBeginIndexA force into { @BypassBeginIndexAPlace&&preceding } {} @@ -4313,40 +4520,51 @@ def @DocumentSetup def @IndexBSection into { @IndexBPlace&&following } right etc { - // @IndexBBreak @Break @IndexBList // etc - // @IndexBBreak @Break @BypassIndexBList // etc + // @IndexBBreak @Break @IndexBList + // @IndexBBreak @Break @BypassIndexBList + // @ClearHeaderComponent + // etc + //1rt } def @DoIndexB into { @IndexBList&&following } - left @Key - named indent { 0f } - right @Body + left @Key # sort key + named pgrange {} # page numbers, or empty if none + named depth {} # 0, 1, or 2 (@IndexB, @Sub, or @SubSub) + right body # body, not including any prefix { + def @Body + { + depth @Case { + 0 @Yield @IndexBFormat body + 1 @Yield @SubIndexBFormat body + 2 @Yield @SubSubIndexBFormat body + } + } + def @Enclose right x { - @IndexBCtd.indent @Case { + @IndexBCtd.depth @Case { - Yes.0f @Yield { + Yes.0 @Yield { @ClearHeaderComponent //1vx x //1vx 1vx @SetHeaderComponent { - indent @Wide & - stem @IndexBCtdFormat {continued @WordVal @IndexBCtdWord} + @Body @IndexBCtdFormat {continued @WordVal @IndexBCtdWord} } //1vx 1vx @BeginHeaderComponent (unused) } - Yes.1f @Yield { + Yes.1 @Yield { @EndHeaderComponent //1vx x //1vx 1vx @BeginHeaderComponent { - indent @Wide & - stem @IndexBCtdFormat {continued @WordVal @IndexBCtdWord} + @Body @IndexBCtdFormat {continued @WordVal @IndexBCtdWord} } } @@ -4355,46 +4573,43 @@ def @DocumentSetup } } - def @Merge left x right y + def @Merge left lpart right rpart { - { x @Rump { x @Meld y } } @Case + { lpart @Rump { lpart @Meld rpart } } @Case { - "" @Yield x - else @Yield { { x{@OneCol ,} } @Meld y } + "" @Yield lpart + else @Yield { { lpart{@OneCol ,} } @Meld rpart } } } - @IndexBFont @Font @IndexBBreak @Break { indent @Wide & @Body } + @IndexBFont @Font @IndexBBreak @Break pgrange @Case { + "" @Yield { @Body &"0.03fu" {} } + else @Yield { @Body &"0.03fu" {}{@OneCol ,} pgrange } + + } } def @RawIndexB - left x - named @Tag {} - named indent { 0f } - right y + left lpart + named depth { 0 } + right rpart { @MakeIndexB @Case { - Yes @Yield { - @PageMark @Tag & - x @DoIndexB stem { y } indent { indent } - { - y &"0.03fu" {} - } - } + Yes @Yield { lpart @DoIndexB depth { depth } rpart } else @Yield @Null } } - macro @RawSubIndexB { @RawIndexB indent { "1f" } } - macro @RawSubSubIndexB { @RawIndexB indent { "2f" } } + macro @RawSubIndexB { @RawIndexB depth { 1 } } + macro @RawSubSubIndexB { @RawIndexB depth { 2 } } def @IndexB - left x + left lpart named @Tag {} - named indent { 0f } + named depth { 0 } named to {} - right y + right rpart { def @PgMk right tag { @@ -4418,19 +4633,14 @@ def @DocumentSetup @MakeIndexB @Case { Yes @Yield { - @PageMark @Tag & - x @DoIndexB stem { y } indent { indent } - { - y &"0.03fu" {}{@OneCol ,} @PgRange - } - } + @PageMark @Tag & + lpart @DoIndexB depth { depth } pgrange { @PgRange } rpart } else @Yield @Null } - } - macro @SubIndexB { @IndexB indent { "1f" } } - macro @SubSubIndexB { @IndexB indent { "2f" } } + macro @SubIndexB { @IndexB depth { 1 } } + macro @SubSubIndexB { @IndexB depth { 2 } } def @IndexBBlanks { @@ -4443,6 +4653,44 @@ def @DocumentSetup z @RawIndexB {} } + def @IndexBSpacer + left lpart + named above { @IndexBSpacerAbove } + named below { @IndexBSpacerBelow } + named font { @IndexBSpacerFont } + named format right @Body { @IndexBSpacerFormat @Body } + right rpart + { + def @Send into { @IndexBList&&following } + right @Key + { + @ClearHeaderComponent + // + //above + @CNP + @OneRow { font @Font format rpart //below } + } + + @MakeIndexB @Case { + Yes @Yield @Send lpart + else @Yield @Null + } + } + + macro @InitialIndexBSpacer { @IndexBSpacer above { 0i } } + + def @IndexBLetters + { + a @InitialIndexBSpacer A + b @IndexBSpacer B c @IndexBSpacer C d @IndexBSpacer D e @IndexBSpacer E + f @IndexBSpacer F g @IndexBSpacer G h @IndexBSpacer H i @IndexBSpacer I + j @IndexBSpacer J k @IndexBSpacer K l @IndexBSpacer L m @IndexBSpacer M + n @IndexBSpacer N o @IndexBSpacer O p @IndexBSpacer P q @IndexBSpacer Q + r @IndexBSpacer R s @IndexBSpacer S t @IndexBSpacer T u @IndexBSpacer U + v @IndexBSpacer V w @IndexBSpacer W x @IndexBSpacer X y @IndexBSpacer Y + z @IndexBSpacer Z + } + def @BypassBeginIndexBPlace { @Galley } def @BypassBeginIndexB force into { @BypassBeginIndexBPlace&&preceding } {} @@ -4471,7 +4719,7 @@ def @DocumentSetup named type {} # MajorIntro, Major, VeryMajor, or Minor named initiallanguage {} # its language named title {} # its full title - named runningtitle {} # its running title + named runningtitle { dft } # its running title Jeffk 12/11/02 from {} named aboveheadinggap { 0f } # gap above heading named headingfont {} # its heading font named headingbreak {} # its heading break @@ -4528,6 +4776,21 @@ def @DocumentSetup initiallanguage @Language { runningtitle @Dft title } } + def @IfMajor right x + { + type @Case { + { MajorIntro Major ExtraMajor ExtraMajorIntro } @Yield x + else @Yield @Null + } + } + + def @StartIfMajor { + type @Case { + { MajorIntro Major ExtraMajor ExtraMajorIntro VeryMajor } @Yield Start + else @Yield NonStart + } + } + def @Run right start { inrunners @Do type @Case { @@ -4613,6 +4876,7 @@ def @DocumentSetup Minor @Yield { headingfont @Font headingbreak @Break @Protect {@LongNum headingformat title} + // @Run @StartIfMajor // @PageMark tag @DP headingtext } @@ -4622,6 +4886,7 @@ def @DocumentSetup //aboveheadinggap headingfont @Font headingbreak @Break { @LongNum headingformat title } + // @Run @StartIfMajor // @PageMark tag @DP headingtext } @@ -4631,6 +4896,7 @@ def @DocumentSetup //aboveheadinggap headingfont @Font headingbreak @Break { bypassnumber headingformat title } + // @Run @StartIfMajor // @PageMark tag @DP headingtext } @@ -4638,21 +4904,6 @@ def @DocumentSetup } } - def @IfMajor right x - { - type @Case { - { MajorIntro Major ExtraMajor ExtraMajorIntro } @Yield x - else @Yield @Null - } - } - - def @StartIfMajor { - type @Case { - { MajorIntro Major ExtraMajor ExtraMajorIntro VeryMajor } @Yield Start - else @Yield NonStart - } - } - initiallanguage @Language { @Heading // wantindefinite @Case { @@ -4663,7 +4914,7 @@ def @DocumentSetup attachnum & @NumberMarker @Tag { tag } @Value { @ShortNum } } // @IfMajor { @FootNoteThrough @Do @BeginFootNoteCounter } - // @Run @StartIfMajor + # // @Run @StartIfMajor // @ContentsStuff // @TitleMarker @Tag { tag } @Value { title } // intheorems @BeginAllCounters @ShortNum diff --git a/include/figf.lpg b/include/figf.lpg index 2b64188..b689b9a 100644 --- a/include/figf.lpg +++ b/include/figf.lpg @@ -4,6 +4,10 @@ % PostScript @SysPrependGraphic file for @Fig Jeffrey H. Kingston % % Version 2.0 (includes CIRCUM label) January 1992 % % % +% Although Fig is now obsolete I have updated it 20 October 2002 % +% to work with textures, i.e. replacing setrgbcolor with % +% LoutSetRGBColor. % +% % % To assist in avoiding name clashes, the names of all symbols % % defined here begin with "lfig". However, this is not feasible % % with user-defined labels and some labels used by users. % @@ -150,34 +154,34 @@ lfigdict begin } def % painting (i.e. filling): - lfigwhite - (etc.) -/lfignopaint { } def -/lfignochange { fill } def -/lfigdarkblue { 0.0 0.0 0.5 setrgbcolor fill } def -/lfigblue { 0.0 0.0 1.0 setrgbcolor fill } def -/lfiglightblue { 0.5 0.5 1.0 setrgbcolor fill } def -/lfigdarkgreen { 0.0 0.5 0.0 setrgbcolor fill } def -/lfiggreen { 0.0 1.0 0.0 setrgbcolor fill } def -/lfiglightgreen { 0.5 1.0 0.5 setrgbcolor fill } def -/lfigdarkred { 0.5 0.0 0.0 setrgbcolor fill } def -/lfigred { 1.0 0.0 0.0 setrgbcolor fill } def -/lfiglightred { 1.0 0.5 0.5 setrgbcolor fill } def -/lfigdarkcyan { 0.0 0.5 0.5 setrgbcolor fill } def -/lfigcyan { 0.0 1.0 1.0 setrgbcolor fill } def -/lfiglightcyan { 0.5 1.0 1.0 setrgbcolor fill } def -/lfigdarkmagenta { 0.5 0.0 0.5 setrgbcolor fill } def -/lfigmagenta { 1.0 0.0 1.0 setrgbcolor fill } def -/lfiglightmagenta { 1.0 0.5 1.0 setrgbcolor fill } def -/lfigdarkyellow { 0.5 0.5 0.0 setrgbcolor fill } def -/lfigyellow { 1.0 1.0 0.0 setrgbcolor fill } def -/lfiglightyellow { 1.0 1.0 0.5 setrgbcolor fill } def -/lfigdarkgray { 0.2 0.2 0.2 setrgbcolor fill } def -/lfiggray { 0.5 0.5 0.5 setrgbcolor fill } def -/lfiglightgray { 0.8 0.8 0.8 setrgbcolor fill } def -/lfigdarkgrey { 0.2 0.2 0.2 setrgbcolor fill } def -/lfiggrey { 0.5 0.5 0.5 setrgbcolor fill } def -/lfiglightgrey { 0.8 0.8 0.8 setrgbcolor fill } def -/lfigblack { 0.0 0.0 0.0 setrgbcolor fill } def -/lfigwhite { 1.0 1.0 1.0 setrgbcolor fill } def +/lfignopaint { } def +/lfignochange { fill } def +/lfigdarkblue { 0.0 0.0 0.5 LoutSetRGBColor fill } def +/lfigblue { 0.0 0.0 1.0 LoutSetRGBColor fill } def +/lfiglightblue { 0.5 0.5 1.0 LoutSetRGBColor fill } def +/lfigdarkgreen { 0.0 0.5 0.0 LoutSetRGBColor fill } def +/lfiggreen { 0.0 1.0 0.0 LoutSetRGBColor fill } def +/lfiglightgreen { 0.5 1.0 0.5 LoutSetRGBColor fill } def +/lfigdarkred { 0.5 0.0 0.0 LoutSetRGBColor fill } def +/lfigred { 1.0 0.0 0.0 LoutSetRGBColor fill } def +/lfiglightred { 1.0 0.5 0.5 LoutSetRGBColor fill } def +/lfigdarkcyan { 0.0 0.5 0.5 LoutSetRGBColor fill } def +/lfigcyan { 0.0 1.0 1.0 LoutSetRGBColor fill } def +/lfiglightcyan { 0.5 1.0 1.0 LoutSetRGBColor fill } def +/lfigdarkmagenta { 0.5 0.0 0.5 LoutSetRGBColor fill } def +/lfigmagenta { 1.0 0.0 1.0 LoutSetRGBColor fill } def +/lfiglightmagenta { 1.0 0.5 1.0 LoutSetRGBColor fill } def +/lfigdarkyellow { 0.5 0.5 0.0 LoutSetRGBColor fill } def +/lfigyellow { 1.0 1.0 0.0 LoutSetRGBColor fill } def +/lfiglightyellow { 1.0 1.0 0.5 LoutSetRGBColor fill } def +/lfigdarkgray { 0.2 0.2 0.2 LoutSetRGBColor fill } def +/lfiggray { 0.5 0.5 0.5 LoutSetRGBColor fill } def +/lfiglightgray { 0.8 0.8 0.8 LoutSetRGBColor fill } def +/lfigdarkgrey { 0.2 0.2 0.2 LoutSetRGBColor fill } def +/lfiggrey { 0.5 0.5 0.5 LoutSetRGBColor fill } def +/lfiglightgrey { 0.8 0.8 0.8 LoutSetRGBColor fill } def +/lfigblack { 0.0 0.0 0.0 LoutSetRGBColor fill } def +/lfigwhite { 1.0 1.0 1.0 LoutSetRGBColor fill } def % line caps (and joins, not currently used) /lfigbutt 0 def diff --git a/include/graphf b/include/graphf index 6a5edeb..e228021 100644 --- a/include/graphf +++ b/include/graphf @@ -10,8 +10,11 @@ # # ############################################################################### +@SysInclude { graphf.etc } # @GraphMath +@SysInclude { lengths } # @LoutLengths +@SysInclude { coltex } # @ColourCommand and @TextureCommand @SysPrependGraphic { graphf.lpg } -@SysInclude { graphf.etc } + def @GraphObj left p @@ -43,15 +46,7 @@ def @GraphObj } def @GraphCross - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -66,7 +61,8 @@ def @GraphCross PDF @Yield { @HContract @VContract - {"n [] 0 d 0 0 m __xsize __ysize l 0 __ysize m __xsize 0 l S"} # uses S because PostScript version does NOT use closepath + { "n [] 0 d 0 0 m __xsize __ysize l 0 __ysize m __xsize 0 l S"} + # uses S because PostScript version does NOT use closepath @Graphic {symbolsize @High symbolsize @Wide ^| symbolsize @Wide ^/ symbolsize @High} } @@ -75,15 +71,7 @@ def @GraphCross } def @GraphPlus - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -98,7 +86,8 @@ def @GraphPlus PDF @Yield { @HContract @VContract - {"n [] 0 d __xmark 0 m __xmark __ysize l 0 __ymark m __xsize __ymark l S"} # uses S because PostScript version does NOT use closepath + { "n [] 0 d __xmark 0 m __xmark __ysize l 0 __ymark m __xsize __ymark l S"} + # uses S because PostScript version does NOT use closepath @Graphic {symbolsize @High symbolsize @Wide ^| symbolsize @Wide ^/ symbolsize @High} } @@ -107,15 +96,7 @@ def @GraphPlus } def @GraphSquare - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -139,15 +120,7 @@ def @GraphSquare } def @GraphFilledSquare - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -171,15 +144,7 @@ def @GraphFilledSquare } def @GraphDiamond - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -203,15 +168,7 @@ def @GraphDiamond } def @GraphFilledDiamond - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -236,15 +193,7 @@ def @GraphFilledDiamond } def @GraphCircle - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -294,15 +243,7 @@ def @GraphCircle } def @GraphFilledCircle - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { PostScript @Yield { @@ -355,15 +296,7 @@ def @GraphFilledCircle } def @GraphTriangle - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -387,15 +320,7 @@ def @GraphTriangle } def @GraphFilledTriangle - named symbolsize - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.15 ft } + import @LoutLengths named symbolsize { 0.15f } { @BackEnd @Case { @@ -419,33 +344,17 @@ def @GraphFilledTriangle } def @GraphNoLine - named dashlength { 0.2 ft } - named linewidth { "currentlinewidth" } - named length - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 1.0 ft } + import @PSLengths named dashlength { 0.2f } + import @PSLengths named linewidth { "currentlinewidth" } + import @LoutLengths named length { 1.0f } { length @Wide {} } def @GraphSolid - named dashlength { 0.2 ft } - named linewidth { "currentlinewidth" } - named length - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 1.0 ft } + import @PSLengths named dashlength { 0.2f } + import @PSLengths named linewidth { "currentlinewidth" } + import @LoutLengths named length { 1.0f } { @BackEnd @Case { PostScript @Yield { @@ -463,17 +372,9 @@ def @GraphSolid } def @GraphDashed - named dashlength { 0.2 ft } - named linewidth { "currentlinewidth" } - named length - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 1.0 ft } + import @PSLengths named dashlength { 0.2f } + import @PSLengths named linewidth { "currentlinewidth" } + import @LoutLengths named length { 1.0f } { @BackEnd @Case { PostScript @Yield { @@ -491,17 +392,9 @@ def @GraphDashed } def @GraphDotted - named dashlength { 0.2 ft } - named linewidth { "currentlinewidth" } - named length - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 1.0 ft } + import @PSLengths named dashlength { 0.2f } + import @PSLengths named linewidth { "currentlinewidth" } + import @LoutLengths named length { 1.0f } { @BackEnd @Case { PostScript @Yield { @@ -521,230 +414,111 @@ def @GraphDotted export @Data def @Graph - named save { no } - named style { frame } - named width - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 6.0 cm } - named height - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 4.0 cm } - named xextra { "none" } - named yextra { "none" } - named xdecreasing { no } - named ydecreasing { no } - named leftcaption { } - named rightcaption { } - named abovecaption { } - named belowcaption { } - named leftgap - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 1.5 cm } - named rightgap - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.5 cm } - named abovegap - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.5 cm } - named belowgap - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.5 cm } - named hidecaptions { yes } + named save { no } + named style { frame } + import @LoutLengths named width { 6.0c } + import @LoutLengths named height { 4.0c } + import @PSLengths named xextra { "none" } + import @PSLengths named yextra { "none" } + named xdecreasing { no } + named ydecreasing { no } + named leftcaption { } + named rightcaption { } + named abovecaption { } + named belowcaption { } + import @LoutLengths named leftgap { 1.5c } + import @LoutLengths named rightgap { 0.5c } + import @LoutLengths named abovegap { 0.5c } + import @LoutLengths named belowgap { 0.5c } + named hidecaptions { yes } named objects named @NW import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "xsize neg ysize" } margin { margin } x } named @SW import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "xsize neg 0" } margin { margin } x } named @SE import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "0 0" } margin { margin } x } named @NE import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "0 ysize" } margin { margin } x } named @W import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "xsize neg ysize 2 div" } margin { margin } x } named @S import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "xsize neg 2 div 0" } margin { margin } x } named @E import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "0 ysize 2 div" } margin { margin } x } named @N import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "xsize neg 2 div ysize" } margin { margin } x } named @CTR import @GraphMath named at { 0 0 } - named margin - named cm left x { x"c" } - named in left x { x"i" } - named em left x { x"m" } - named pt left x { x"p" } - named ft left x { x"f" } - named sp left x { x"s" } - named vs left x { x"v" } - { 0.3 ft } + import @LoutLengths named margin { 0.3f } right x { at @GraphObj adj { "xsize neg 2 div ysize 2 div" } margin {margin} x } {} - named xorigin named none { "false" } { none } - named yorigin named none { "false" } { none } - named xlog named none { "0" } { none } - named ylog named none { "0" } { none } - named points named none { "none" } { none } - named pairs named none { "none" } { none } - named colour color named none { "none" } { none } - named paint named none { "none" } { none } - named xmin named none { "false" } { none } - named xmax named none { "false" } { none } - named ymin named none { "false" } { none } - named ymax named none { "false" } { none } - named xticksep named none { "0" } { none } - named yticksep named none { "0" } { none } - named rticksep named none { "0" } { none } + named xorigin named none { "false" } { none } + named yorigin named none { "false" } { none } + named xlog named none { "0" } { none } + named ylog named none { "0" } { none } + named points named none { "none" } { none } + named pairs named none { "none" } { none } + named colour color named none { "none" } { none } + named paint named none { "none" } { none } + import @TextureImport named texture { solid } + named xmin named none { "false" } { none } + named xmax named none { "false" } { none } + named ymin named none { "false" } { none } + named ymax named none { "false" } { none } + named xticksep named none { "0" } { none } + named yticksep named none { "0" } { none } + named rticksep named none { "0" } { none } import @GraphMath named xticks - named none { "false" } - named auto { "false" } - named "@" { " lgen" } - named "^" { "^" } - { false } + named none { "false" } + named auto { "false" } + named "@" { " lgen" } + named "^" { "^" } + { false } import @GraphMath named yticks - named none { "false" } - named auto { "false" } - named "@" { " lgen" } - named "^" { "^" } - { false } + named none { "false" } + named auto { "false" } + named "@" { " lgen" } + named "^" { "^" } + { false } import @GraphMath named rticks - named none { "false" } - named auto { "false" } - named "@" { " lgen" } - named "^" { "^" } - { } - named xticklength { 0.5 ft } - named yticklength { 0.5 ft } - named rticklength { 0.5 ft } - named dataformat { xandy } - named dashlength { 0.2 ft } - named linewidth { "currentlinewidth" } - named symbolsize { 0.15 ft } + named none { "false" } + named auto { "false" } + named "@" { " lgen" } + named "^" { "^" } + { } + import @PSLengths named xticklength { 0.5f } + import @PSLengths named yticklength { 0.5f } + import @PSLengths named rticklength { 0.5f } + named dataformat { xandy } + import @PSLengths named dashlength { 0.2f } + import @PSLengths named linewidth { "currentlinewidth" } + import @PSLengths named symbolsize { 0.15f } body @Body @Begin @@ -817,11 +591,12 @@ def @Graph def @Data named points named none { "none" } { points } named pairs named none { "none" } { pairs } - named colour color named none { "none" } { colour } + named colour color named none { "none" } { colour } named paint named none { "none" } { paint } - named dashlength { dashlength } - named linewidth { linewidth } - named symbolsize { symbolsize } + import @TextureImport named texture { texture } + import @PSLengths named dashlength { dashlength } + import @PSLengths named linewidth { linewidth } + import @PSLengths named symbolsize { symbolsize } named dataformat { dataformat } body data { @@ -945,9 +720,6 @@ def @Graph } } -# include @ColourCommand symbol -@SysInclude { ccommand } - def @Paint { paint @Case { @@ -963,6 +735,7 @@ def @Graph " /linewidth" linewidth "def" @ColourCommand colour " /symbolsize" symbolsize "def }" "{" @Paint "}" + "{" texture "}" "]" } diff --git a/include/graphf.lpg b/include/graphf.lpg index ff95259..3c7edbc 100644 --- a/include/graphf.lpg +++ b/include/graphf.lpg @@ -173,26 +173,49 @@ lgraphdict begin linewidth setlinewidth stroke } def +% % pre-texture versions +% % stroke a filled y histogram: - filledyhisto - +% /filledyhisto +% { +% linewidth setlinewidth +% xprev yleft trpoint exch currentlinewidth 2 div add exch yextra sub moveto +% xprev yprev trpoint exch currentlinewidth 2 div add exch lineto +% xcurr yprev trpoint exch currentlinewidth 2 div sub exch lineto +% xcurr yleft trpoint exch currentlinewidth 2 div sub exch yextra sub lineto +% closepath fill +% } def + +% % stroke a filled x histogram: - filledxhisto - +% /filledxhisto +% { +% linewidth setlinewidth +% xleft yprev trpoint currentlinewidth 2 div add exch xextra sub exch moveto +% xcurr yprev trpoint currentlinewidth 2 div add lineto +% xcurr ycurr trpoint currentlinewidth 2 div sub lineto +% xleft ycurr trpoint currentlinewidth 2 div sub exch xextra sub exch lineto +% closepath fill +% } def + % stroke a filled y histogram: - filledyhisto - /filledyhisto { linewidth setlinewidth - xprev yleft trpoint exch currentlinewidth 2 div add exch yextra sub moveto - xprev yprev trpoint exch currentlinewidth 2 div add exch lineto - xcurr yprev trpoint exch currentlinewidth 2 div sub exch lineto - xcurr yleft trpoint exch currentlinewidth 2 div sub exch yextra sub lineto - closepath fill + xprev yleft trpoint exch currentlinewidth 1.3 mul add exch yextra sub moveto + xprev yprev trpoint exch currentlinewidth 1.3 mul add exch lineto + xcurr yprev trpoint exch currentlinewidth 1.3 mul sub exch lineto + xcurr yleft trpoint exch currentlinewidth 1.3 mul sub exch yextra sub lineto + gsave texture fill grestore stroke } def % stroke a filled x histogram: - filledxhisto - /filledxhisto { linewidth setlinewidth - xleft yprev trpoint currentlinewidth 2 div add exch xextra sub exch moveto - xcurr yprev trpoint currentlinewidth 2 div add lineto - xcurr ycurr trpoint currentlinewidth 2 div sub lineto - xleft ycurr trpoint currentlinewidth 2 div sub exch xextra sub exch lineto - closepath fill + xleft yprev trpoint currentlinewidth 1.3 mul add exch xextra sub exch moveto + xcurr yprev trpoint currentlinewidth 1.3 mul add lineto + xcurr ycurr trpoint currentlinewidth 1.3 mul sub lineto + xleft ycurr trpoint currentlinewidth 1.3 mul sub exch xextra sub exch lineto + gsave texture fill grestore stroke } def @@ -315,13 +338,6 @@ lgraphdict begin } if } def -% % trpoint: transform (x, y) in graph space into (x', y') in print space -% % x y trpoint x' y' -% /trpoint -% { exch xtr trxmin sub trxmax trxmin sub div xwidth mul xextra add -% exch ytr trymin sub trymax trymin sub div ywidth mul yextra add -% } def - % trpoint: transform (x, y) in graph space into (x', y') in print space % x y trpoint x' y' @@ -358,7 +374,7 @@ lgraphdict begin % [ data ] xandy [ data ] /xandy {} def -% swapxandy: no interpolation of x or y values +% swapxandy: swap x and y values % [ data ] swapxandy [ data ] /swapxandy { dup /tmp exch def @@ -730,7 +746,8 @@ lgraphdict begin /rundata { alldata { gsave - dup dup dup dup + dup dup dup dup dup + 5 get /texture exch def 4 get /dopaint exch def 3 get /initrun exch def 2 get /pairs exch def @@ -738,7 +755,9 @@ lgraphdict begin 0 get /data exch def dopaint { data length 4 ge - { initrun + { + gsave + initrun newpath data 0 get ymin trpoint yextra sub moveto 0 2 data length 2 sub @@ -748,7 +767,8 @@ lgraphdict begin xcurr ycurr trpoint lineto } for data dup length 2 sub get ymin trpoint yextra sub lineto - closepath fill + closepath texture fill + grestore } if } if initrun diff --git a/include/lengths b/include/lengths new file mode 100644 index 0000000..2c1d447 --- /dev/null +++ b/include/lengths @@ -0,0 +1,150 @@ + +########################################################################### +# # +# lengths # +# # +# Jeffrey H. Kingston # +# 30 October 2002 # +# # +# This file offers two symbols for converting between PostScript # +# lengths and Lout lengths. This has been a messy area and the two # +# symbols in this file, @LoutLengths and @PSLengths, are my attempt # +# to put a final end to the mess. # +# # +# A Lout length is, and has always been, a number followed by # +# a one-letter unit of measurement: i c p m s v f d. # +# # +# A PostScript length is, and has always been, a number followed # +# by a space followed by a two-letter unit of measurement, one of # +# in cm pt em sp vs ft dg. # +# # +# To the ordinary user who reads the User's Guide, all lengths # +# now look like Lout lengths. However, internally some of these # +# lengths are used by Lout and others are passed to PostScript. # +# Based on the two symbols @PSLengths and @LoutLengths defined # +# below, an option x which could contain a length of either kind # +# can be classified as one of three types: # +# # +# Type of option How to handle it # +# ------------------------------------------------------------------- # +# Option was never advertised named x { ... } # +# as taking a PostScript length # +# # +# Option was advertised as import @LoutLengths named x { ... } # +# possibly taking a PostScript # +# length, but its value is used # +# by Lout # +# # +# Option whose value has to be import @PSLengths named x { ... } # +# passed to PostScript # +# ------------------------------------------------------------------- # +# # +# Either kind of import allows either kind of length to be given; # +# @LoutLengths makes sure the final result is suitable for passing # +# to Lout, while @PSLengths makes sure the final result is suitable # +# for passing to PostScript. If things had been done right from the # +# start, there would be no need for @LoutLengths, but for backward # +# compatibility we will continue to use it basically forever. # +# # +########################################################################### + + +########################################################################### +# # +# @LoutLengths # +# # +# Convert PostScript lengths into Lout lengths. # +# # +########################################################################### + +export in cm pt em sp vs ft dg +def @LoutLengths +{ + def in left x { x"i" } + def cm left x { x"c" } + def pt left x { x"p" } + def em left x { x"m" } + def sp left x { x"s" } + def vs left x { x"b" } + def ft left x { x"f" } + def dg left x { x"d" } +} + + +########################################################################### +# # +# @PSLengths # +# # +# Convert Lout lengths into PostScript (also PDF) lengths. # +# PDF is no longer supported but this code was there already so # +# it's been carried over. # +# # +########################################################################### + +export i c p m s v f d +def @PSLengths +{ + def i left x { + @BackEnd @Case { + PostScript @Yield { x" in" } + PDF @Yield { "__mul(__in, "x")" } + PlainText @Yield "" + } + } + + def c left x { + @BackEnd @Case { + PostScript @Yield { x" cm" } + PDF @Yield { "__mul(__cm, "x")" } + PlainText @Yield "" + } + } + + def p left x { + @BackEnd @Case { + PostScript @Yield { x" pt" } + PDF @Yield { "__mul(__pt, "x")" } + PlainText @Yield "" + } + } + + def m left x { + @BackEnd @Case { + PostScript @Yield { x" em" } + PDF @Yield { "__mul(__em, "x")" } + PlainText @Yield "" + } + } + + def s left x { + @BackEnd @Case { + PostScript @Yield { x" sp" } + PDF @Yield { "__mul(__louts, "x")" } + PlainText @Yield "" + } + } + + def v left x { + @BackEnd @Case { + PostScript @Yield { x" vs" } + PDF @Yield { "__mul(__loutv, "x")" } + PlainText @Yield "" + } + } + + def f left x { + @BackEnd @Case { + PostScript @Yield { x" ft" } + PDF @Yield { "__mul(__loutf, "x")" } + PlainText @Yield "" + } + } + + def d left x { + @BackEnd @Case { + PostScript @Yield { x" dg" } + PDF @Yield { "__mul(__loutd, "x")" } + PlainText @Yield "" + } + } +} diff --git a/include/picture b/include/picture index 6f85770..340b02b 100644 --- a/include/picture +++ b/include/picture @@ -144,33 +144,67 @@ # @RefListBreak { } # break style of ref list # @RefListLabelWidth { @ListLabelWidth } # Labels column width # @RefListSortKey { @Tag } # sorting key + # @MakeGlossary { No } # make glossary? Yes or No + # @GlossaryText { @Null } # glossary initial text + # @GlossaryFont { } # glossary entries font + # @GlossaryBreak { } # glossary entries break + # @GlossaryFormat { +3p @Font @S @Name # glossary entries format + # @Right @I { @Word&&page @PageNum } + # @DP @RawIndentedDisplay @Body } + # @GlossaryGap { @DisplayGap } # gap between glossary entries + # @GlossaryColumnNumber{ 2 } # glossary columns (1 to 10) + # @GlossaryColumnGap { 1.00c @OrIfPlain 6s } # glossary column gap + # @InGlossaryFont { smallcaps } # font for @InGlossary + # @InGlossaryFormat { @Body } # format for @InGlossary + # @MakeIndex { No } # make index? Yes or No # @MakeIndex { No } # make index? Yes or No # @IndexText { @Null } # index initial text # @IndexFont { } # index entries font # @IndexBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexFormat { @Body } # @Index format + # @SubIndexFormat { {1f @Wide}@Body } # @SubIndex format + # @SubSubIndexFormat { {2f @Wide}@Body } # @SubSubIndex format # @IndexColumnNumber { 2 } # index columns (1 to 10) # @IndexColumnGap { 1.00c @OrIfPlain 6s } # index column gap # @IndexCtd { Yes } # include (ctd.) lines # @IndexCtdWord { continued } # "ctd." in current lang. # @IndexCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexSpacerAbove { 2v } # space above index spacer + # @IndexSpacerBelow { 1v } # space below index spacer + # @IndexSpacerFont { +3p } # font of index spacer + # @IndexSpacerFormat { @Body } # format of index spacer # @MakeIndexA { No } # make index A? Yes or No # @IndexAText { @Null } # index A initial text # @IndexAFont { } # index A entries font # @IndexABreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexAFormat { @Body } # @IndexA format + # @SubIndexAFormat { {1f @Wide}@Body } # @SubIndexA format + # @SubSubIndexAFormat { {2f @Wide}@Body } # @SubSubIndexA format # @IndexAColumnNumber { 2 } # index A columns (1 to 10) # @IndexAColumnGap { 1.00c @OrIfPlain 6s } # index A column gap # @IndexACtd { Yes } # include (ctd.) lines # @IndexACtdWord { continued } # "ctd." in current lang. # @IndexACtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexASpacerAbove { 2v } # space above index A spacer + # @IndexASpacerBelow { 1v } # space below index A spacer + # @IndexASpacerFont { +3p } # font of index A spacer + # @IndexASpacerFormat { @Body } # format of index A spacer # @MakeIndexB { No } # make index B? Yes or No # @IndexBText { @Null } # index B initial text # @IndexBFont { } # index B entries font # @IndexBBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexBFormat { @Body } # @IndexB format + # @SubIndexBFormat { {1f @Wide}@Body } # @SubIndexB format + # @SubSubIndexBFormat { {2f @Wide}@Body } # @SubSubIndexB format # @IndexBColumnNumber { 2 } # index B columns (1 to 10) # @IndexBColumnGap { 1.00c @OrIfPlain 6s } # index B column gap # @IndexBCtd { Yes } # include (ctd.) lines # @IndexBCtdWord { continued } # "ctd." in current lang. # @IndexBCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexBSpacerAbove { 2v } # space above index B spacer + # @IndexBSpacerBelow { 1v } # space below index B spacer + # @IndexBSpacerFont { +3p } # font of index B spacer + # @IndexBSpacerFormat { @Body } # format of index B spacer # @TopGap { 0.75c @OrIfPlain 2f } # gap between figures # @MidGap { 0.75c @OrIfPlain 2f } # gap above/below body text # @FootNoteNumbers { Arabic } # footnote numbers diff --git a/include/pie b/include/pie new file mode 100644 index 0000000..132e90d --- /dev/null +++ b/include/pie @@ -0,0 +1,109 @@ +############################################################################### +# # +# Lout setup file for pie charts # +# # +# Jeffrey H. Kingston # +# 16 October 2002 # +# # +############################################################################### + + +############################################################################### +# # +# The @SysInclude { pief } line # +# # +# This line causes Lout to read the definitions for pie charts, and should # +# not be touched. # +# # +############################################################################### + +@SysInclude { pief } + + +############################################################################### +# # +# The @PieSetup @Use clause # +# # +# To change the default value of any option, delete the # at the start of # +# its line and change the value between braces. # +# # +############################################################################### + +@Use { @PieSetup + + ############################################################################# + # # + # General options # + # # + ############################################################################# + + # save { no } + # totalweight { 100 } + # radius { 2.5c } + # initialangle { 0d } + # leftextra { 0i } + # rightextra { 0i } + # aboveextra { 0i } + # belowextra { 0i } + + ############################################################################# + # # + # Caption options # + # # + ############################################################################# + + # leftcaption { } + # rightcaption { } + # abovecaption { } + # belowcaption { } + # leftgap { 0.5c } + # rightgap { 0.5c } + # abovegap { 0.5c } + # belowgap { 0.5c } + # hidecaptions { yes } + + ############################################################################# + # # + # Slice options # + # # + ############################################################################# + + # weight { 1 } + # paint { none } + # texture { solid } + # outlinestyle { solid } + # outlinedashlength { 0.2f } + # outlinewidth { thin } + # detach { no } + + ############################################################################# + # # + # Label options # + # # + ############################################################################# + + # label { } + # labelfont { -2p } + # labelbreak { clines } + # labelmargin { 0.2f } + # labelformat { @Body } + # labelradius { internal } + # labeladjust { 0 0 } + + ############################################################################# + # # + # finger options # + # # + ############################################################################# + + # finger { no } + # fingerstyle { solid } + # fingerdashlength { 0.2f } + # fingerwidth { thin } + # fingerradius { 0.7 } + # fingeradjust { 0 0 } + # fingerarrow { no } + # fingerarrowlength { 0.6f } + # fingerarrowwidth { 0.45f } + +} diff --git a/include/pief b/include/pief new file mode 100644 index 0000000..49a53b4 --- /dev/null +++ b/include/pief @@ -0,0 +1,409 @@ + +############################################################################### +# # +# Lout @Pie package for drawing pie charts # +# Version 1.0 (October 2002) # +# Jeffrey H. Kingston # +# # +############################################################################### + +@SysPrependGraphic { pief.lpg } +@SysInclude { lengths } # @PSLengths and @LoutLengths +@SysInclude { coltex } # @ColourCommand and @TextureCommand + + +############################################################################### +# # +# @PieSetup symbol # +# # +############################################################################### + +export @Pie +def @PieSetup + named save { no } + named totalweight { 100 } + named radius { 2.5c } + import @PSLengths named initialangle{ 0d } + named leftextra { 0i } + named rightextra { 0i } + named aboveextra { 0i } + named belowextra { 0i } + named leftcaption { } + named rightcaption { } + named abovecaption { } + named belowcaption { } + named leftgap { 0.5c } + named rightgap { 0.5c } + named abovegap { 0.5c } + named belowgap { 0.5c } + named hidecaptions { yes } + named weight { 1 } + named paint { none } + import @TextureImport named texture { solid } + named outlinestyle + named solid { "/lpiesolid" } + named dashed { "/lpiedashed" } + named cdashed { "/lpiecdashed" } + named dotted { "/lpiedotted" } + named noline { "/lpienoline" } + { solid } + import @PSLengths named outlinedashlength { 0.2f } + import @PSLengths named outlinewidth + named thin { 0.04f } + named medium { 0.08f } + named thick { 0.12f } + { thin } + named detach + named yes Yes { 0.5 } + named no No { 0.0 } + { no } + named label { } + named labelfont { -2p } + named labelbreak { clines } + named labelmargin { 0.2f } + named labelformat right @Body { @Body } + named labelradius + named internal { 0.6 } + named external { 1.4 } + { internal } + import @PSLengths named labeladjust { 0 0 } + named finger { no } + named fingerstyle + named solid { "/lpiesolid" } + named dashed { "/lpiedashed" } + named cdashed { "/lpiecdashed" } + named dotted { "/lpiedotted" } + named noline { "/lpienoline" } + { solid } + import @PSLengths named fingerdashlength { 0.2f } + import @PSLengths named fingerwidth + named thin { 0.04f } + named medium { 0.08f } + named thick { 0.12f } + { thin } + named fingerradius { 0.7 } + import @PSLengths named fingeradjust{ 0 0 } + named fingerarrow { no } + import @PSLengths named fingerarrowlength { 0.6f } + import @PSLengths named fingerarrowwidth { 0.45f } +{ + + ########################################################################### + # # + # @Pie symbol # + # # + ########################################################################### + + export @Slice + def @Pie + named save { save } + named totalweight { 100 } + named radius { radius } + import @PSLengths named initialangle { initialangle } + named leftextra { leftextra } + named rightextra { rightextra } + named aboveextra { aboveextra } + named belowextra { belowextra } + named leftcaption { leftcaption } + named rightcaption { rightcaption } + named abovecaption { abovecaption } + named belowcaption { belowcaption } + named leftgap { leftgap } + named rightgap { rightgap } + named abovegap { abovegap } + named belowgap { belowgap } + named hidecaptions { hidecaptions } + named weight { weight } + named paint { paint } + import @TextureImport named texture { texture } + named outlinestyle + named solid { "/lpiesolid" } + named dashed { "/lpiedashed" } + named cdashed { "/lpiecdashed" } + named dotted { "/lpiedotted" } + named noline { "/lpienoline" } + { outlinestyle } + import @PSLengths named outlinedashlength{ outlinedashlength } + import @PSLengths named outlinewidth + named thin { 0.04f } + named medium { 0.08f } + named thick { 0.12f } + { outlinewidth } + named detach + named yes Yes { 0.5 } + named no No { 0.0 } + { detach } + named label { label } + named labelfont { labelfont } + named labelbreak { labelbreak } + named labelmargin { labelmargin } + named labelformat right @Body { labelformat @Body } + named labelradius + named internal { 0.6 } + named external { 1.4 } + { labelradius } + import @PSLengths named labeladjust { labeladjust } + named finger { finger } + named fingerstyle + named solid { "/lpiesolid" } + named dashed { "/lpiedashed" } + named cdashed { "/lpiecdashed" } + named dotted { "/lpiedotted" } + named noline { "/lpienoline" } + { fingerstyle } + import @PSLengths named fingerdashlength{ fingerdashlength } + import @PSLengths named fingerwidth + named thin { 0.04f } + named medium { 0.08f } + named thick { 0.12f } + { fingerwidth } + named fingerradius { fingerradius } + import @PSLengths named fingeradjust { fingeradjust } + named fingerarrow { fingerarrow } + import @PSLengths named fingerarrowlength { fingerarrowlength } + import @PSLengths named fingerarrowwidth { fingerarrowwidth } + + body @Body + { + + + ####################################################################### + # # + # Miscellaneous helper definitions # + # # + ####################################################################### + + def @AddPaint left col right texture + { + col @Case { + { "no" "none" "nopaint" } @Yield "{}" + else @Yield { "{" @ColourCommand col texture "fill }" } + } + } + + # Like @Graphic, but affects the graphics state of right parameter + def @InnerGraphic + left ps + right x + { + { ps gsave // grestore } @Graphic x + } + + def @ZeroWidth right x + { + @HContract @VContract { + ^|0io @HContract @VContract x |0io + } + } + + def @ZeroSize right x + { + @HContract @VContract { + ^/0io ^|0io @HContract @VContract x |0io /0io + } + } + + + ####################################################################### + # # + # @Slice # + # # + ####################################################################### + + def @Slice + named weight { weight } + named paint { paint } + import @TextureImport named texture { texture } + named outlinestyle + named solid { "/lpiesolid" } + named dashed { "/lpiedashed" } + named cdashed { "/lpiecdashed" } + named dotted { "/lpiedotted" } + named noline { "/lpienoline" } + { outlinestyle } + import @PSLengths named outlinedashlength { outlinedashlength } + import @PSLengths named outlinewidth + named thin { 0.04f } + named medium { 0.08f } + named thick { 0.12f } + { outlinewidth } + named detach + named yes Yes { 0.5 } + named no No { 0.0 } + { detach } + named label { label } + named labelfont { labelfont } + named labelbreak { labelbreak } + named labelmargin { labelmargin } + named labelformat right @Body { labelformat @Body } + named labelradius + named internal { 0.6 } + named external { 1.4 } + { labelradius } + import @PSLengths named labeladjust { labeladjust } + named finger { finger } + named fingerstyle + named solid { "/lpiesolid" } + named dashed { "/lpiedashed" } + named cdashed { "/lpiecdashed" } + named dotted { "/lpiedotted" } + named noline { "/lpienoline" } + { fingerstyle } + import @PSLengths named fingerdashlength { fingerdashlength } + import @PSLengths named fingerwidth + named thin { 0.04 ft } + named medium { 0.08 ft } + named thick { 0.12 ft } + { fingerwidth } + named fingerradius { fingerradius } + import @PSLengths named fingeradjust{ fingeradjust } + named fingerarrow { fingerarrow } + import @PSLengths named fingerarrowlength { fingerarrowlength } + import @PSLengths named fingerarrowwidth { fingerarrowwidth } + { + + def @DrawSlice + { + outlinedashlength "[" outlinestyle "]" + outlinewidth paint @AddPaint texture + weight detach + "lpiebeginslice" + // + "lpieendslice" + } + + def @TranslateLabelAndDrawFinger + { labeladjust labelradius "lpietranslatelabel" + finger @Case { + { no No } @Yield "" + { yes Yes } @Yield { + fingerdashlength "[" fingerstyle "]" + fingerwidth fingeradjust fingerradius + "lpiedrawfinger" + fingerarrow @Case { + { no No } @Yield "" + { yes Yes } @Yield { + fingerarrowlength fingerarrowwidth + "lpiedrawarrowhead" + } + } + } + } + } + + def @AddMargins right x + { + @HContract @VContract { + //labelmargin ||labelmargin x ||labelmargin //labelmargin + } + } + + @Null @ZeroSize @DrawSlice @Graphic + @TranslateLabelAndDrawFinger @InnerGraphic { + @AddMargins labelfont @Font labelbreak @Break labelformat label + } @Null + + } + + def @Above + { + abovecaption @Case { + "" @Yield "" + else @Yield @OneCol { + ||0.5rt clines @Break abovecaption || //abovegap + } + } + } + + def @Below + { + belowcaption @Case { + "" @Yield "" + else @Yield @OneCol { + //belowgap ||0.5rt clines @Break belowcaption || + } + } + } + + def @Left + { + leftcaption @Case { + "" @Yield "" + else @Yield @OneRow { + { //0.5rt clines @Break leftcaption // } ^||leftgap + } + } + } + + def @Right + { + rightcaption @Case { + "" @Yield "" + else @Yield @OneRow { + ||rightgap { //0.5rt lines @Break rightcaption // } + } + } + } + + def @HideWidth right x + { + hidecaptions @Case { + { No no } @Yield x + { Yes yes } @Yield @OneCol { ||0io x ||0io } + } + } + + def @AddCaptions right x + { + + @HContract @VContract + { + | @Above | + / @HideWidth @Left | &0.5rt x | @HideWidth @Right + / | @Below | + } + } + + def @AddExtra right x + { + @HContract @VContract + { + /aboveextra |leftextra x |rightextra /belowextra + } + } + + def @GraphicSetup right x + { + { + save @Case { + { yes Yes } @Yield { + "grestore save gsave" totalweight initialangle "lpiebegin" + // + "lpieend restore" + } + { no No } @Yield { + totalweight initialangle "lpiebegin" + // + "lpieend" + } + } + } @Graphic x + } + + def @Base right x + { + def @Square { radius @Wide radius @High {} } + + @HContract @VContract { + @Square ^| @Square + ^/ + @Square | @Square + / + x + } + } + + @AddCaptions @AddExtra @GraphicSetup @Base @Body + + } +} diff --git a/include/pief.lpg b/include/pief.lpg new file mode 100644 index 0000000..6eff430 --- /dev/null +++ b/include/pief.lpg @@ -0,0 +1,485 @@ +%%BeginResource: procset LoutPiePrependGraphic +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% PostScript @SysPrependGraphic file for @Pie Jeffrey H. Kingston % +% Version 1.0 % +% % +% Jeffrey H. Kingston % +% October 2002 % +% % +% To assist in avoiding name clashes, the names of all symbols % +% defined here begin with "lpie". % +% % +% <point> is two numbers, a point. % +% <length> is one number, a length % +% <angle> is one number, an angle in degrees % +% <dashlength> is one number, the preferred length of a dash % +% % +% The following invariant is maintained from the end of the % +% call to lpiebegin to the beginning of the call to lpieend: % +% % +% lpiecentre is an executable function which leaves the two % +% coordinates of the centre of the pie on the % +% operand stack (signature - lpiectr <x> <y>) % +% % +% lpieradius is the radius of the pie % +% % +% lpieinitangle is the initial angle % +% % +% lpietotalweight is the total weight of all slices % +% % +% lpiecurrentweight is the total weight of all slices so far % +% % +% The first four are constants set by lpiebegin; the last is % +% updated as each slice is printed. % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% install error handler into error dictionary +errordict begin + /handleerror + { + { /Times-Roman findfont 8 pt scalefont setfont + 0 setgray 4 pt 4 pt moveto + $error /errorname get + dup lpiedict exch known + { lpiedict exch get } + { 100 string cvs } ifelse + show + ( Command: ) show + $error /command get 100 string cvs show + } stopped {} if + showpage stop + } def +end + +% initial coordinates of debug output +/lpiedebugposy 432 def +/lpiedebugposx 72 def + +% <string> <int> lpiedebugprint - +% must be defined outside lpiedict since used in arbitrary places +% print <string> plus count or <int> stack entries, whichever is the smaller +/lpiedebugprint +{ + exch + gsave + initgraphics + lpiedebugposy 72 lt + { /lpiedebugposx lpiedebugposx 144 add store + /lpiedebugposy 432 store + } + { + /lpiedebugposy lpiedebugposy 12 sub store + } ifelse + lpiedebugposx lpiedebugposy moveto + /Times-Roman findfont 10 scalefont setfont + 0 setgray show + count 1 sub 2 copy lt { pop } { exch pop } ifelse 1 sub + 0 exch 1 exch + { + /lpiedebugposy lpiedebugposy 12 sub store + lpiedebugposx 12 add lpiedebugposy moveto + index + dup type (dicttype) eq + { + (begin dict) show + { + /lpiedebugposy lpiedebugposy 12 sub store + lpiedebugposx 24 add lpiedebugposy moveto + pop 100 string cvs show + } forall + /lpiedebugposy lpiedebugposy 12 sub store + lpiedebugposx 12 add lpiedebugposy moveto + (end dict) show + } + { + dup type (arraytype) eq + { + dup xcheck { (executable array) } { (literal array) } ifelse show + { + /lpiedebugposy lpiedebugposy 12 sub store + lpiedebugposx 24 add lpiedebugposy moveto + 100 string cvs show + } forall + /lpiedebugposy lpiedebugposy 12 sub store + lpiedebugposx 12 add lpiedebugposy moveto + (end array) show + } + { + dup xcheck { (ex: ) } { (lit: ) } ifelse show + 100 string cvs show + } ifelse + } ifelse + } for + grestore +} def + +% name lpiedebugpoint - +/lpieshowpoint +{ + dup cvx exec moveto 20 string cvs show newpath +} def + +% begin pie: <totalweight> <initialangle> lpiebegin - +% must be defined outside lpiedict since it loads it +/lpiebegin +{ lpiedict begin + 20 dict begin + xmark ymark /lpiecentre lpiepointdef + /lpieradius xmark def + /lpieinitialangle exch def + /lpietotalweight exch def + /lpiecurrentweight 0 def +} def + +% end pie: - lpieend - +/lpieend +{ + end + end +} def + +% pie dictionary +/lpiedict 200 dict def + +% subsequent definitions are held within the pie dictionary +lpiedict begin + +% error messages +/syntaxerror (syntaxerror error: syntax error in text of pie chart?) def +/typecheck (typecheck error: syntax error in text of pie chart?) def +/undefined (undefined error: unknown or misspelt label?) def +/VMError (VMError error: run out of memory?) def + +% maximum of two numbers: <num> <num> lpiemax <num> +/lpiemax { 2 copy gt { pop } { exch pop } ifelse } def + +% minimum of two numbers: <num> <num> lpiemin <num> +/lpiemin { 2 copy lt { pop } { exch pop } ifelse } def + +% add two points: <point> <point> lpiepadd <point> +/lpiepadd +{ + % (Entering padd) 4 lpiedebugprint + exch 3 1 roll add 3 1 roll add exch + % (Leaving padd) 2 lpiedebugprint +} def + +% subtract first point from second: <point> <point> lpiepsub <point> +/lpiepsub { 3 2 roll sub 3 1 roll exch sub exch } def + +% max two points: <point> <point> lpiepmax <point> +/lpiepmax { exch 3 1 roll lpiemax 3 1 roll lpiemax exch } def + +% min two points: <point> <point> lpiepmin <point> +/lpiepmin { exch 3 1 roll lpiemin 3 1 roll lpiemin exch } def + +% scalar multiplication: <point> <num> lpiepmul <point> +/lpiepmul { dup 3 1 roll mul 3 1 roll mul exch } def + +% distance between two points: <point> <point> lpiedistance <length> +/lpiedistance { lpiepsub dup mul exch dup mul add sqrt } def + +% point at angle and distance +% <point> <length> <angle> lpieatangle <point> +/lpieatangle { 2 copy cos mul 3 1 roll sin mul lpiepadd } def + +% stroke a solid line: <length> <dashlength> lpiesolid - +/lpiesolid +{ % (Entering lpiesolid) 2 lpiedebugprint + gsave pop pop [] 0 setdash 1 setlinecap stroke grestore newpath + % (Leaving lpiesolid) 0 lpiedebugprint +} def + +% stroke a dashed line: <length> <dashlength> lpiedashed - +/lpiedashed +{ gsave + 2 copy div 2 le 1 index 0 le or + { exch pop 1 pt lpiemax [ exch dup ] 0 setdash } + { dup [ exch 4 2 roll 2 copy div + 1 sub 2 div ceiling dup 4 1 roll + 1 add mul sub exch div ] 0 setdash + } ifelse 0 setlinecap stroke + grestore newpath +} def + +% stroke a cdashed line: <length> <dashlength> lpiecdashed - +/lpiecdashed +{ % (Entering lpiecdashed) 2 lpiedebugprint + gsave + 2 copy le 1 index 0 le or + { exch pop 1 pt lpiemax [ exch dup ] dup 0 get 2 div setdash } + { dup [ 4 2 roll exch 2 copy exch div + 2 div ceiling div 1 index sub + ] exch 2 div setdash + } ifelse 0 setlinecap stroke + grestore newpath + % (Leaving lpiecdashed) 0 lpiedebugprint +} def + +% stroke a dotted line: <length> <dashlength> lpiedotted - +/lpiedotted +{ gsave + 2 copy le 1 index 0 le or + { exch pop 1 pt lpiemax [ exch 0 exch ] 0 setdash } + { 1 index exch div ceiling div + [ 0 3 2 roll ] 0 setdash + } ifelse 1 setlinecap stroke + grestore newpath +} def + +% stroke a noline line: <length> <dashlength> lpienoline - +/lpienoline +{ pop pop +} def + +% label a point in current dictionary: <point> /name lpiepointdef - +/lpiepointdef +{ + % (Entering lpiepointdef) 3 lpiedebugprint + [ 4 2 roll transform /itransform cvx ] cvx def + % (Leaving lpiepointdef) 0 lpiedebugprint +} def + +% find the angle that the current slice starts at +% - lpiesliceangle1 <angle> +/lpiesliceangle1 +{ lpiecurrentweight lpietotalweight div 360 mul lpieinitialangle add +} def + +% find the angle that the current slice stops at +% - lpiesliceangle2 <angle> +/lpiesliceangle2 +{ weight lpiecurrentweight add lpietotalweight div 360 mul lpieinitialangle add +} def + +% find the angle that bisects the current slice +% - lpieslicemidangle <angle> +/lpieslicemidangle +{ weight 2 div lpiecurrentweight add lpietotalweight div 360 mul lpieinitialangle add +} def + +% update the total weight +% - lpieupdateweight - +/lpieupdateweight +{ weight lpiecurrentweight add /lpiecurrentweight exch def +} def + +% find the apex of the slice +% - lpiesliceapex <x> <y> +/lpiesliceapex +{ lpiecentre lpieradius detach mul lpieslicemidangle lpieatangle +} def + +% find the end of the first arm of the slice +% - lpieslicearm1 <x> <y> +/lpieslicearm1 +{ lpiesliceapex lpieradius lpiesliceangle1 lpieatangle +} def + +% find the end of the second arm of the slice +% - lpieslicearm2 <x> <y> +/lpieslicearm2 +{ lpiesliceapex lpieradius lpiesliceangle2 lpieatangle +} def + +% set the whole closed path for the current slice +% - lpiesetslicepath - +/lpiesetslicepath +{ newpath lpiesliceapex moveto + currentpoint lpieradius lpiesliceangle1 lpiesliceangle2 arc + closepath +} def + +% set the first segment of the current slice and return its length +% - lpiesetsegment1 <length> +/lpiesetsegment1 +{ newpath lpiesliceapex moveto lpieslicearm1 lineto + lpieradius +} def + +% set the second segment of the current slice and return its length +% - lpiesetsegment2 <length> +/lpiesetsegment2 +{ newpath lpiesliceapex moveto lpieslicearm2 lineto + lpieradius +} def + +% set the arc segment of the current slice and return its length +% - lpiesetarcsegment <length> +/lpiesetarcsegment +{ newpath + lpiesliceapex lpieradius lpiesliceangle1 lpiesliceangle2 arc + lpiesliceangle2 lpiesliceangle1 sub 180 div 3.14159 mul lpieradius mul +} def + +% draw one slice +% <dashlength> [ <outlinecommand> ] <outlinewidth> { <paintcommand> } +% <weight> <detach> lpiedrawslice - +/lpiebeginslice +{ + % (Entering lpiebeginslice) 6 lpiedebugprint + /detach exch def + /weight exch def + + % paint the slice + gsave lpiesetslicepath exec grestore + + % set the line width + setlinewidth + + % stroke each segment separately to get dashes right + 2 copy lpiesetsegment1 3 1 roll + dup length 0 exch mod get cvx + % (Stroking segment1) count 1 sub lpiedebugprint + exec + + 2 copy lpiesetarcsegment 3 1 roll + dup length 1 exch mod get cvx + % (Stroking arc segment) count 1 sub lpiedebugprint + exec + + lpiesetsegment2 3 1 roll + dup length 2 exch mod get cvx + % (Stroking segment2) count 1 sub lpiedebugprint + exec + + % (Leaving lpiebeginslice) 0 lpiedebugprint +} def + +% finish off one slice +/lpieendslice +{ + % (Entering lpieendslice) 0 lpiedebugprint + + % update current weight ready for next slice + lpieupdateweight + + % (Leaving lpieendslice) 0 lpiedebugprint +} def + +% translate label +% <xadjust> <yadjust> <labelradius> lpietranslatelabel - +/lpietranslatelabel +{ + % (Entering lpietranslatelabel) 3 lpiedebugprint + /labelradius exch def + % lpiecentre (lpiecentre:) 2 lpiedebugprint pop pop + % lpieradius (lpieradius:) 1 lpiedebugprint pop + % labelradius (labelradius:) 1 lpiedebugprint pop + % lpieslicemidangle (lpieslicemidangle:) 1 lpiedebugprint pop + xsize 2 div ysize 2 div /labelcentre lpiepointdef + labelcentre + lpiesliceapex lpieradius labelradius mul lpieslicemidangle lpieatangle lpiepsub + lpiepadd + translate + % (Leaving lpietranslatelabel) 0 lpiedebugprint +} def + +% fix an angle to 0 <= res < 360: <angle> lpiefixangle <angle> +/lpiefixangle +{ + % (Entering lpiefixangle) 1 lpiedebugprint + { dup 0 ge { exit } if + 360 add + } loop + { dup 360 lt { exit } if + 360 sub + } loop + % (Leaving lpiefixangle) 1 lpiedebugprint +} def + +% angle from one point to another +% <point> <point> lpieangleto <angle> +/lpieangleto { + lpiepsub 2 copy 0 eq exch 0 eq and {pop} {exch atan} ifelse +} def + +% find point on circumference of box: alpha a b lpieboxcircum x y +/lpieboxcircum +{ + % (Entering lpieboxcircum) 3 lpiedebugprint + 4 dict begin + /b exch def + /a exch def + lpiefixangle /alpha exch def + 0 0 a b lpieangleto /theta exch def + % a (a:) 1 lpiedebugprint pop + % b (b:) 1 lpiedebugprint pop + % theta (theta:) 1 lpiedebugprint pop + % alpha (alpha:) 1 lpiedebugprint pop + + % if alpha <= theta, return (a, a*tan(alpha)) + alpha theta le + { a a alpha sin mul alpha cos div } + { + % else if alpha <= 180 - theta, return (b*cot(alpha), b) + alpha 180 theta sub le + { b alpha cos mul alpha sin div b } + { + % else if alpha <= 180 + theta, return (-a, -a*tan(alpha)) + alpha 180 theta add le + { a neg a neg alpha sin mul alpha cos div } + { + % else if alpha <= 360 - theta, return (-b*cot(alpha), -b) + alpha 360 theta sub le + { b neg alpha cos mul alpha sin div b neg } + { + % else 360 - theta <= alpha, return (a, a*tan(alpha)) + a a alpha sin mul alpha cos div + } ifelse + } ifelse + } ifelse + } ifelse + end + % (Leaving lpieboxcircum) 2 lpiedebugprint +} def + + +% draw finger (will immediately follow lpietranslatelabel) +% <fingerdashlength> "[" <fingerstyle> "]" fingerwidth +% <fingeradjustx> <fingeradjusty> <fingerradius> lpiedrawfinger - +/lpiedrawfinger +{ + % (Entering lpidrawfinger) 6 lpiedebugprint + % find inner endpoint of finger + /fingerradius exch def + lpiesliceapex lpieradius fingerradius mul + lpieslicemidangle lpieatangle lpiepadd + /fingerinner lpiepointdef + xsize 2 div ysize 2 div /labelcentre lpiepointdef + 0 0 /labelorigin lpiepointdef + + % find outer endpoint of finger, on circumference of label + labelcentre fingerinner lpieangleto + xsize 2 div ysize 2 div + lpieboxcircum labelcentre lpiepadd + /fingerouter lpiepointdef + + % set the line width + setlinewidth + + % draw line + newpath fingerinner moveto fingerouter lineto + fingerinner fingerouter lpiedistance 3 1 roll 0 get cvx exec + % (Leaving lpiedrawfinger) 0 lpiedebugprint +} def + +% draw arrowhead (will immediately follow lpiedrawfinger if reqd) +% <headlength> <headwidth> lpiedrawarrowhead +/lpiedrawarrowhead +{ + gsave + /headwidth exch def + /headlength exch def + fingerinner translate + fingerouter fingerinner lpieangleto rotate + 0 0 moveto + headlength neg headwidth 2 div lineto + 0 headwidth neg rlineto + closepath fill + grestore +} def +end +%%EndResource diff --git a/include/report b/include/report index a33257b..aa79533 100644 --- a/include/report +++ b/include/report @@ -149,33 +149,67 @@ # @RefListBreak { } # break style of ref list # @RefListLabelWidth { @ListLabelWidth } # Labels column width # @RefListSortKey { @Tag } # sorting key + # @MakeGlossary { No } # make glossary? Yes or No + # @GlossaryText { @Null } # glossary initial text + # @GlossaryFont { } # glossary entries font + # @GlossaryBreak { } # glossary entries break + # @GlossaryFormat { +3p @Font @S @Name # glossary entries format + # @Right @I { @Word&&page @PageNum } + # @DP @RawIndentedDisplay @Body } + # @GlossaryGap { @DisplayGap } # gap between glossary entries + # @GlossaryColumnNumber{ 2 } # glossary columns (1 to 10) + # @GlossaryColumnGap { 1.00c @OrIfPlain 6s } # glossary column gap + # @InGlossaryFont { smallcaps } # font for @InGlossary + # @InGlossaryFormat { @Body } # format for @InGlossary + # @MakeIndex { No } # make index? Yes or No # @MakeIndex { No } # make index? Yes or No # @IndexText { @Null } # index initial text # @IndexFont { } # index entries font # @IndexBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexFormat { @Body } # @Index format + # @SubIndexFormat { {1f @Wide}@Body } # @SubIndex format + # @SubSubIndexFormat { {2f @Wide}@Body } # @SubSubIndex format # @IndexColumnNumber { 2 } # index columns (1 to 10) # @IndexColumnGap { 1.00c @OrIfPlain 6s } # index column gap # @IndexCtd { Yes } # include (ctd.) lines # @IndexCtdWord { continued } # "ctd." in current lang. # @IndexCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexSpacerAbove { 2v } # space above index spacer + # @IndexSpacerBelow { 1v } # space below index spacer + # @IndexSpacerFont { +3p } # font of index spacer + # @IndexSpacerFormat { @Body } # format of index spacer # @MakeIndexA { No } # make index A? Yes or No # @IndexAText { @Null } # index A initial text # @IndexAFont { } # index A entries font # @IndexABreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexAFormat { @Body } # @IndexA format + # @SubIndexAFormat { {1f @Wide}@Body } # @SubIndexA format + # @SubSubIndexAFormat { {2f @Wide}@Body } # @SubSubIndexA format # @IndexAColumnNumber { 2 } # index A columns (1 to 10) # @IndexAColumnGap { 1.00c @OrIfPlain 6s } # index A column gap # @IndexACtd { Yes } # include (ctd.) lines # @IndexACtdWord { continued } # "ctd." in current lang. # @IndexACtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexASpacerAbove { 2v } # space above index A spacer + # @IndexASpacerBelow { 1v } # space below index A spacer + # @IndexASpacerFont { +3p } # font of index A spacer + # @IndexASpacerFormat { @Body } # format of index A spacer # @MakeIndexB { No } # make index B? Yes or No # @IndexBText { @Null } # index B initial text # @IndexBFont { } # index B entries font # @IndexBBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexBFormat { @Body } # @IndexB format + # @SubIndexBFormat { {1f @Wide}@Body } # @SubIndexB format + # @SubSubIndexBFormat { {2f @Wide}@Body } # @SubSubIndexB format # @IndexBColumnNumber { 2 } # index B columns (1 to 10) # @IndexBColumnGap { 1.00c @OrIfPlain 6s } # index B column gap # @IndexBCtd { Yes } # include (ctd.) lines # @IndexBCtdWord { continued } # "ctd." in current lang. # @IndexBCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexBSpacerAbove { 2v } # space above index B spacer + # @IndexBSpacerBelow { 1v } # space below index B spacer + # @IndexBSpacerFont { +3p } # font of index B spacer + # @IndexBSpacerFormat { @Body } # format of index B spacer # @TopGap { 0.75c @OrIfPlain 2f } # gap between figures # @MidGap { 0.75c @OrIfPlain 2f } # gap above/below body text # @FootNoteNumbers { Arabic } # footnote numbers @@ -291,6 +325,7 @@ # @AbstractWord { abstract } # word for "Abstract" # @ContentsWord { contents } # word for "Contents" # @AppendixWord { appendix } # word for "Appendix" + # @GlossaryWor { glossary } # word for "Glossary" # @IndexWord { index } # word for "Index" # @IndexAWord { index } # word for "Index" (A) # @IndexBWord { index } # word for "Index" (B) @@ -333,6 +368,9 @@ # @ReferencesHeadingFont { Bold } # references head font # @ReferencesHeadingBreak { ragged 1.2fx nohyphen } # references head break # @ReferencesHeadingFormat { title } # references head fmt + # @GlossaryHeadingFont { Bold } # glossary head font + # @GlossaryHeadingBreak { ragged 1.2fx nohyphen } # glossary head break + # @GlossaryHeadingFormat { title } # glossary head fmt # @IndexHeadingFont { Bold } # index head font # @IndexHeadingBreak { ragged 1.2fx nohyphen } # index head break # @IndexHeadingFormat { title } # index head fmt @@ -355,6 +393,7 @@ # @SubAppendixInContents { Yes } # add subappendices to contents # @SubSubAppendixInContents { No } # add sub-subapps to contents # @ReferencesInContents { Yes } # add references to contents + # @GlossaryInContents { Yes } # add glossary to contents # @IndexInContents { Yes } # add index to contents # @IndexAInContents { Yes } # add index A to contents # @IndexBInContents { Yes } # add index B to contents @@ -393,6 +432,7 @@ # @SectionPrefix { } # for structured page nums # @AppendixPrefix { } # for structured page nums # @ReferencesPrefix { } # for structured page nums + # @GlossaryPrefix { } # for structured page nums # @IndexPrefix { } # for structured page nums # @IndexAPrefix { } # for structured page nums # @IndexBPrefix { } # for structured page nums diff --git a/include/reportf b/include/reportf index 6136e4e..f0b3779 100644 --- a/include/reportf +++ b/include/reportf @@ -37,6 +37,7 @@ def @ReportSetup named @AbstractWord { abstract } named @ContentsWord { contents } named @AppendixWord { appendix } + named @GlossaryWord { glossary } named @IndexWord { index } named @IndexAWord { index } named @IndexBWord { index } @@ -99,6 +100,11 @@ def @ReportSetup named @ReferencesHeadingFormat right title { title } + named @GlossaryHeadingFont { Bold } + named @GlossaryHeadingBreak { ragged 1.2fx nohyphen } + named @GlossaryHeadingFormat + right title { title } + named @IndexHeadingFont { Bold } named @IndexHeadingBreak { ragged 1.2fx nohyphen } named @IndexHeadingFormat @@ -128,6 +134,7 @@ def @ReportSetup named @SubAppendixInContents { Yes } named @SubSubAppendixInContents { No } named @ReferencesInContents { Yes } + named @GlossaryInContents { Yes } named @IndexInContents { Yes } named @IndexAInContents { Yes } named @IndexBInContents { Yes } @@ -172,6 +179,7 @@ def @ReportSetup named @SectionPrefix { } named @AppendixPrefix { } named @ReferencesPrefix { } + named @GlossaryPrefix { } named @IndexPrefix { } named @IndexAPrefix { } named @IndexBPrefix { } @@ -270,6 +278,7 @@ def @ReportSetup named @AbstractDisplay { @AbstractDisplay } named @AbstractTitle { @AbstractTitle } named @Abstract {} + named @GlossaryText { @GlossaryText } named @IndexText { @IndexText } named @IndexAText { @IndexAText } named @IndexBText { @IndexBText } @@ -360,6 +369,44 @@ def @ReportSetup { //@RefListGap @ReferencesSection } } + def @GlossaryPart + named @Tag {} + { + + def @Run + { + NonStart @Runner + @MajorNum {} + @MajorTitle { glossary @WordVal @GlossaryWord } + @MinorNum {} + @MinorTitle {} + @Owner { @Tag } + @Prefix { @GlossaryPrefix } + } + + @LargeScaleStructure + tag { @Tag } + type { Major } + initiallanguage { @InitialLanguage } + title { glossary @WordVal @GlossaryWord } + headingfont { @GlossaryHeadingFont } + headingbreak { @GlossaryHeadingBreak } + headingformat { @GlossaryHeadingFormat @Body } + headingtext { @GlossaryText } + incontents { @GlossaryInContents } + prefix { @GlossaryPrefix } + inrunners { Yes } + majornum {} + majortitle {} + minornum {} + minortitle { glossary @WordVal @GlossaryWord } + sendheader { @Full @Body } + innergap { @SectionGap } + wantindefinite { Yes } + @GlossarySection @Run + + } + def @IndexPart named @Tag {} { @@ -497,6 +544,7 @@ def @ReportSetup //@SectionGap @ReferencesBeforeAppendices @NoDo { @MakeReferences @Do @ReferencesPart } + // @MakeGlossary @Do @GlossaryPart // @MakeIndexA @Do @IndexAPart // @MakeIndexB @Do @IndexBPart // @MakeIndex @Do @IndexPart @@ -526,6 +574,7 @@ def @ReportSetup } //@SectionGap @EndFigureList //@SectionGap @EndNoteList 1 + // @MakeGlossary @Do @GlossaryPart // @MakeIndexA @Do @IndexAPart // @MakeIndexB @Do @IndexBPart // @MakeIndex @Do @IndexPart diff --git a/include/slides b/include/slides index 8bbd22d..c9610ea 100644 --- a/include/slides +++ b/include/slides @@ -147,33 +147,67 @@ # @RefListBreak { } # break style of ref list # @RefListLabelWidth { @ListLabelWidth } # Labels column width # @RefListSortKey { @Tag } # sorting key + # @MakeGlossary { No } # make glossary? Yes or No + # @GlossaryText { @Null } # glossary initial text + # @GlossaryFont { } # glossary entries font + # @GlossaryBreak { } # glossary entries break + # @GlossaryFormat { +3p @Font @S @Name # glossary entries format + # @Right @I { @Word&&page @PageNum } + # @DP @RawIndentedDisplay @Body } + # @GlossaryGap { @DisplayGap } # gap between glossary entries + # @GlossaryColumnNumber{ 2 } # glossary columns (1 to 10) + # @GlossaryColumnGap { 1.00c @OrIfPlain 6s } # glossary column gap + # @InGlossaryFont { smallcaps } # font for @InGlossary + # @InGlossaryFormat { @Body } # format for @InGlossary + # @MakeIndex { No } # make index? Yes or No # @MakeIndex { No } # make index? Yes or No # @IndexText { @Null } # index initial text # @IndexFont { } # index entries font # @IndexBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexFormat { @Body } # @Index format + # @SubIndexFormat { {1f @Wide}@Body } # @SubIndex format + # @SubSubIndexFormat { {2f @Wide}@Body } # @SubSubIndex format # @IndexColumnNumber { 2 } # index columns (1 to 10) # @IndexColumnGap { 1.00c @OrIfPlain 6s } # index column gap # @IndexCtd { Yes } # include (ctd.) lines # @IndexCtdWord { continued } # "ctd." in current lang. # @IndexCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexSpacerAbove { 2v } # space above index spacer + # @IndexSpacerBelow { 1v } # space below index spacer + # @IndexSpacerFont { +3p } # font of index spacer + # @IndexSpacerFormat { @Body } # format of index spacer # @MakeIndexA { No } # make index A? Yes or No # @IndexAText { @Null } # index A initial text # @IndexAFont { } # index A entries font # @IndexABreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexAFormat { @Body } # @IndexA format + # @SubIndexAFormat { {1f @Wide}@Body } # @SubIndexA format + # @SubSubIndexAFormat { {2f @Wide}@Body } # @SubSubIndexA format # @IndexAColumnNumber { 2 } # index A columns (1 to 10) # @IndexAColumnGap { 1.00c @OrIfPlain 6s } # index A column gap # @IndexACtd { Yes } # include (ctd.) lines # @IndexACtdWord { continued } # "ctd." in current lang. # @IndexACtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexASpacerAbove { 2v } # space above index A spacer + # @IndexASpacerBelow { 1v } # space below index A spacer + # @IndexASpacerFont { +3p } # font of index A spacer + # @IndexASpacerFormat { @Body } # format of index A spacer # @MakeIndexB { No } # make index B? Yes or No # @IndexBText { @Null } # index B initial text # @IndexBFont { } # index B entries font # @IndexBBreak { {oragged 1.2fx} @OrIfPlain {oragged 1fx} } # and break + # @IndexBFormat { @Body } # @IndexB format + # @SubIndexBFormat { {1f @Wide}@Body } # @SubIndexB format + # @SubSubIndexBFormat { {2f @Wide}@Body } # @SubSubIndexB format # @IndexBColumnNumber { 2 } # index B columns (1 to 10) # @IndexBColumnGap { 1.00c @OrIfPlain 6s } # index B column gap # @IndexBCtd { Yes } # include (ctd.) lines # @IndexBCtdWord { continued } # "ctd." in current lang. # @IndexBCtdFormat { @Body @I (@CtdWord) } # format of ctd. + # @IndexBSpacerAbove { 2v } # space above index B spacer + # @IndexBSpacerBelow { 1v } # space below index B spacer + # @IndexBSpacerFont { +3p } # font of index B spacer + # @IndexBSpacerFormat { @Body } # format of index B spacer # @TopGap { 0.75c @OrIfPlain 2f } # gap between figures # @MidGap { 0.75c @OrIfPlain 2f } # gap above/below body text # @FootNoteNumbers { Arabic } # footnote numbers diff --git a/include/tbl b/include/tbl index 0574bf0..92b8e6f 100644 --- a/include/tbl +++ b/include/tbl @@ -12,7 +12,7 @@ # # # The @SysInclude { tblf } line # # # -# This line causes Lout to read the definitions for diagrams, and should # +# This line causes Lout to read the definitions for tables, and should # # not be touched. # # # ############################################################################### @@ -30,7 +30,8 @@ ############################################################################### @Use { @TblSetup - # paint { nopaint } # colour of background + # paint { none } # colour of background + # texture { solid } # texture of paint background # background { } # object in background # font { } # font # break { } # paragraph breaking style diff --git a/include/tblf b/include/tblf index 18b16ef..29bbb65 100644 --- a/include/tblf +++ b/include/tblf @@ -11,7 +11,7 @@ # # ############################################################################### -# obsoloete now @SysPrependGraphic { tblf.lpg } +@SysInclude { coltex } export @OrIfPlain def @TOIP { @@ -29,7 +29,8 @@ def @TOIP { export @Tbl def @TblSetup - import @TOIP named paint p { nopaint } + import @TOIP named paint p { none } + import @TextureImport named texture t { solid } import @TOIP named background bg {} import @TOIP named font f {} import @TOIP named break b {} @@ -98,6 +99,7 @@ def @TblSetup ########################################################################### def setupp { p } + def setupt { t } def setupbg { bg } def setupf { f } def setupb { b } @@ -206,6 +208,7 @@ def @TblSetup # parameters for formatting the entire table named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -254,6 +257,7 @@ def @TblSetup # parameters for formatting @Rowa rows named apaint ap {} + import @TextureImport named atexture at {} named abackground abg {} named afont af {} named abreak ab {} @@ -308,6 +312,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -359,6 +364,7 @@ def @TblSetup # parameters for formatting @Rowb rows named bpaint bp {} + import @TextureImport named btexture bt {} named bbackground bbg {} named bfont bf {} named bbreak bb {} @@ -413,6 +419,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -464,6 +471,7 @@ def @TblSetup # parameters for formatting @Rowc rows named cpaint cp {} + import @TextureImport named ctexture ct {} named cbackground cbg {} named cfont cf {} named cbreak cb {} @@ -518,6 +526,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -569,6 +578,7 @@ def @TblSetup # parameters for formatting @Rowd rows named dpaint dp {} + import @TextureImport named dtexture dt {} named dbackground dbg {} named dfont df {} named dbreak db {} @@ -623,6 +633,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -674,6 +685,7 @@ def @TblSetup # parameters for formatting @Rowe rows named epaint ep {} + import @TextureImport named etexture et {} named ebackground ebg {} named efont ef {} named ebreak eb {} @@ -728,6 +740,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -779,6 +792,7 @@ def @TblSetup # parameters for formatting @Rowf rows named fpaint fp {} + import @TextureImport named ftexture ft {} named fbackground fbg {} named ffont ff {} named fbreak fb {} @@ -833,6 +847,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -884,6 +899,7 @@ def @TblSetup # parameters for formatting @Rowg rows named gpaint gp {} + import @TextureImport named gtexture gt {} named gbackground gbg {} named gfont gf {} named gbreak gb {} @@ -938,6 +954,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -989,6 +1006,7 @@ def @TblSetup # parameters for formatting @Rowh rows named hpaint hp {} + import @TextureImport named htexture ht {} named hbackground hbg {} named hfont hf {} named hbreak hb {} @@ -1043,6 +1061,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -1103,6 +1122,7 @@ def @TblSetup ####################################################################### def tblp { p @Else setupp } + def tblt { t @Else setupt } def tblbg { bg @Else setupbg } def tblf { f @Else setupf } def tblb { b @Else setupb } @@ -1137,6 +1157,7 @@ def @TblSetup def @DoCell named compulsory p {} + named compulsory t {} named compulsory bg {} named compulsory f {} named compulsory b {} @@ -1180,9 +1201,6 @@ def @TblSetup @OneRow { /0io x /0io } } -# include @ColourCommand symbol -@SysInclude { ccommand } - def @PDFBox { "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h" @@ -1213,15 +1231,6 @@ def @TblSetup } } - def @PaintBox left col right x - { - @BackEnd @Case { - PostScript @Yield { {"LoutBox" @PSAddPaint col } @Graphic x } - PDF @Yield { { @PDFBox @PDFAddPaint col "S" } @Graphic x } - PlainText @Yield { x } - } - } - def @HRule left col right thick { @ZeroHeight thick @High col @FillBox {} @@ -1327,12 +1336,21 @@ def @TblSetup } } + def @PaintBox right x + { + @BackEnd @Case { + PostScript @Yield { {"LoutBox" @ColourCommand p t "fill"} @Graphic x } + PDF @Yield { { @PDFBox @PDFAddPaint col "S" } @Graphic x } + PlainText @Yield { x } + } + } + def @AddPaint right x { p @Case { { none nopaint no } @Yield x - else @Yield { p @PaintBox x } + else @Yield { @PaintBox x } } } @@ -1405,6 +1423,7 @@ def @TblSetup # symbol for producing @Row rows def @DoRow named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -1459,6 +1478,7 @@ def @TblSetup named Z {} named @Cell named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -1522,6 +1542,7 @@ def @TblSetup ################################################################### def rowp { p @Else tblp } + def rowt { t @Else tblt } def rowbg { bg @Else tblbg } def rowf { f @Else tblf } def rowb { b @Else tblb } @@ -1570,6 +1591,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } @@ -1608,6 +1630,7 @@ def @TblSetup # symbol for producing @Rowa rows def @DoRowa named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -1668,6 +1691,7 @@ def @TblSetup ################################################################### def tbxp { ap @Else tblp } + def tbxt { at @Else tblt } def tbxbg { abg @Else tblbg } def tbxf { af @Else tblf } def tbxb { ab @Else tblb } @@ -1706,6 +1730,7 @@ def @TblSetup ################################################################### def rowp { p @Else tbxp } + def rowt { t @Else tblt } def rowbg { bg @Else tbxbg } def rowf { f @Else tbxf } def rowb { b @Else tbxb } @@ -1754,6 +1779,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } @@ -1792,6 +1818,7 @@ def @TblSetup # symbol for producing @Rowb rows def @DoRowb named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -1852,6 +1879,7 @@ def @TblSetup ################################################################### def tbxp { bp @Else tblp } + def tbxt { bt @Else tblt } def tbxbg { bbg @Else tblbg } def tbxf { bf @Else tblf } def tbxb { bb @Else tblb } @@ -1890,6 +1918,7 @@ def @TblSetup ################################################################### def rowp { p @Else tbxp } + def rowt { t @Else tblt } def rowbg { bg @Else tbxbg } def rowf { f @Else tbxf } def rowb { b @Else tbxb } @@ -1938,6 +1967,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } @@ -1976,6 +2006,7 @@ def @TblSetup # symbol for producing @Rowc rows def @DoRowc named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -2036,6 +2067,7 @@ def @TblSetup ################################################################### def tbxp { cp @Else tblp } + def tbxt { ct @Else tblt } def tbxbg { cbg @Else tblbg } def tbxf { cf @Else tblf } def tbxb { cb @Else tblb } @@ -2074,6 +2106,7 @@ def @TblSetup ################################################################### def rowp { p @Else tbxp } + def rowt { t @Else tblt } def rowbg { bg @Else tbxbg } def rowf { f @Else tbxf } def rowb { b @Else tbxb } @@ -2122,6 +2155,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } @@ -2160,6 +2194,7 @@ def @TblSetup # symbol for producing @Rowd rows def @DoRowd named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -2220,6 +2255,7 @@ def @TblSetup ################################################################### def tbxp { dp @Else tblp } + def tbxt { dt @Else tblt } def tbxbg { dbg @Else tblbg } def tbxf { df @Else tblf } def tbxb { db @Else tblb } @@ -2258,6 +2294,7 @@ def @TblSetup ################################################################### def rowp { p @Else tbxp } + def rowt { t @Else tblt } def rowbg { bg @Else tbxbg } def rowf { f @Else tbxf } def rowb { b @Else tbxb } @@ -2306,6 +2343,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } @@ -2344,6 +2382,7 @@ def @TblSetup # symbol for producing @Rowe rows def @DoRowe named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -2404,6 +2443,7 @@ def @TblSetup ################################################################### def tbxp { ep @Else tblp } + def tbxt { et @Else tblt } def tbxbg { ebg @Else tblbg } def tbxf { ef @Else tblf } def tbxb { eb @Else tblb } @@ -2442,6 +2482,7 @@ def @TblSetup ################################################################### def rowp { p @Else tbxp } + def rowt { t @Else tblt } def rowbg { bg @Else tbxbg } def rowf { f @Else tbxf } def rowb { b @Else tbxb } @@ -2490,6 +2531,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } @@ -2528,6 +2570,7 @@ def @TblSetup # symbol for producing @Rowf rows def @DoRowf named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -2588,6 +2631,7 @@ def @TblSetup ################################################################### def tbxp { fp @Else tblp } + def tbxt { ft @Else tblt } def tbxbg { fbg @Else tblbg } def tbxf { ff @Else tblf } def tbxb { fb @Else tblb } @@ -2626,6 +2670,7 @@ def @TblSetup ################################################################### def rowp { p @Else tbxp } + def rowt { t @Else tblt } def rowbg { bg @Else tbxbg } def rowf { f @Else tbxf } def rowb { b @Else tbxb } @@ -2674,6 +2719,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } @@ -2712,6 +2758,7 @@ def @TblSetup # symbol for producing @Rowg rows def @DoRowg named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -2772,6 +2819,7 @@ def @TblSetup ################################################################### def tbxp { gp @Else tblp } + def tbxt { gt @Else tblt } def tbxbg { gbg @Else tblbg } def tbxf { gf @Else tblf } def tbxb { gb @Else tblb } @@ -2810,6 +2858,7 @@ def @TblSetup ################################################################### def rowp { p @Else tbxp } + def rowt { t @Else tblt } def rowbg { bg @Else tbxbg } def rowf { f @Else tbxf } def rowb { b @Else tbxb } @@ -2858,6 +2907,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } @@ -2896,6 +2946,7 @@ def @TblSetup # symbol for producing @Rowh rows def @DoRowh named paint p {} + import @TextureImport named texture t {} named background bg {} named font f {} named break b {} @@ -2956,6 +3007,7 @@ def @TblSetup ################################################################### def tbxp { hp @Else tblp } + def tbxt { ht @Else tblt } def tbxbg { hbg @Else tblbg } def tbxf { hf @Else tblf } def tbxb { hb @Else tblb } @@ -2994,6 +3046,7 @@ def @TblSetup ################################################################### def rowp { p @Else tbxp } + def rowt { t @Else tblt } def rowbg { bg @Else tbxbg } def rowf { f @Else tbxf } def rowb { b @Else tbxb } @@ -3042,6 +3095,7 @@ def @TblSetup ####################################################### p { p @Else rowp } + t { t @Else rowt } bg { bg @Else rowbg } f { f @Else rowf } b { b @Else rowb } diff --git a/include/xrgb b/include/xrgb new file mode 100644 index 0000000..fc71f6b --- /dev/null +++ b/include/xrgb @@ -0,0 +1,680 @@ +##################################################################### +# # +# @Xrgb symbol # +# # +# Contributed by Mark Summerfield # +# Tested and installed by Jeff Kingston, 18 November 2002 # +# November 2002 # +# # +# Said to be the list of named colours known to the X-windows # +# system. There are 752 colours here, but many are listed twice # +# under different spellings of their names. # +# # +# I've deleted the else clause and moved "black" to the top. # +# This will ensure that if the user mis-types the colour, an # +# error message will be printed and "black" substituted. # +# # +##################################################################### + +def @Xrgb right x { + x @Case { + { black } @Yield { rgb "0.000 0.000 0.000" } + { snow } @Yield { rgb "1.000 0.980 0.980" } + { ghostwhite } @Yield { rgb "0.973 0.973 1.000" } + { whitesmoke } @Yield { rgb "0.961 0.961 0.961" } + { gainsboro } @Yield { rgb "0.863 0.863 0.863" } + { floralwhite } @Yield { rgb "1.000 0.980 0.941" } + { oldlace } @Yield { rgb "0.992 0.961 0.902" } + { linen } @Yield { rgb "0.980 0.941 0.902" } + { antiquewhite } @Yield { rgb "0.980 0.922 0.843" } + { papayawhip } @Yield { rgb "1.000 0.937 0.835" } + { blanchedalmond } @Yield { rgb "1.000 0.922 0.804" } + { bisque } @Yield { rgb "1.000 0.894 0.769" } + { peachpuff } @Yield { rgb "1.000 0.855 0.725" } + { navajowhite } @Yield { rgb "1.000 0.871 0.678" } + { moccasin } @Yield { rgb "1.000 0.894 0.710" } + { cornsilk } @Yield { rgb "1.000 0.973 0.863" } + { ivory } @Yield { rgb "1.000 1.000 0.941" } + { lemonchiffon } @Yield { rgb "1.000 0.980 0.804" } + { seashell } @Yield { rgb "1.000 0.961 0.933" } + { honeydew } @Yield { rgb "0.941 1.000 0.941" } + { mintcream } @Yield { rgb "0.961 1.000 0.980" } + { azure } @Yield { rgb "0.941 1.000 1.000" } + { aliceblue } @Yield { rgb "0.941 0.973 1.000" } + { lavender } @Yield { rgb "0.902 0.902 0.980" } + { lavenderblush } @Yield { rgb "1.000 0.941 0.961" } + { mistyrose } @Yield { rgb "1.000 0.894 0.882" } + { white } @Yield { rgb "1.000 1.000 1.000" } + { darkslategray } @Yield { rgb "0.184 0.310 0.310" } + { darkslategrey } @Yield { rgb "0.184 0.310 0.310" } + { dimgray } @Yield { rgb "0.412 0.412 0.412" } + { dimgrey } @Yield { rgb "0.412 0.412 0.412" } + { slategray } @Yield { rgb "0.439 0.502 0.565" } + { slategrey } @Yield { rgb "0.439 0.502 0.565" } + { lightslategray } @Yield { rgb "0.467 0.533 0.600" } + { lightslategrey } @Yield { rgb "0.467 0.533 0.600" } + { gray } @Yield { rgb "0.745 0.745 0.745" } + { grey } @Yield { rgb "0.745 0.745 0.745" } + { lightgrey } @Yield { rgb "0.827 0.827 0.827" } + { lightgray } @Yield { rgb "0.827 0.827 0.827" } + { midnightblue } @Yield { rgb "0.098 0.098 0.439" } + { navy } @Yield { rgb "0.000 0.000 0.502" } + { navyblue } @Yield { rgb "0.000 0.000 0.502" } + { cornflowerblue } @Yield { rgb "0.392 0.584 0.929" } + { darkslateblue } @Yield { rgb "0.282 0.239 0.545" } + { slateblue } @Yield { rgb "0.416 0.353 0.804" } + { mediumslateblue } @Yield { rgb "0.482 0.408 0.933" } + { lightslateblue } @Yield { rgb "0.518 0.439 1.000" } + { mediumblue } @Yield { rgb "0.000 0.000 0.804" } + { royalblue } @Yield { rgb "0.255 0.412 0.882" } + { blue } @Yield { rgb "0.000 0.000 1.000" } + { dodgerblue } @Yield { rgb "0.118 0.565 1.000" } + { deepskyblue } @Yield { rgb "0.000 0.749 1.000" } + { skyblue } @Yield { rgb "0.529 0.808 0.922" } + { lightskyblue } @Yield { rgb "0.529 0.808 0.980" } + { steelblue } @Yield { rgb "0.275 0.510 0.706" } + { lightsteelblue } @Yield { rgb "0.690 0.769 0.871" } + { lightblue } @Yield { rgb "0.678 0.847 0.902" } + { powderblue } @Yield { rgb "0.690 0.878 0.902" } + { paleturquoise } @Yield { rgb "0.686 0.933 0.933" } + { darkturquoise } @Yield { rgb "0.000 0.808 0.820" } + { mediumturquoise } @Yield { rgb "0.282 0.820 0.800" } + { turquoise } @Yield { rgb "0.251 0.878 0.816" } + { cyan } @Yield { rgb "0.000 1.000 1.000" } + { lightcyan } @Yield { rgb "0.878 1.000 1.000" } + { cadetblue } @Yield { rgb "0.373 0.620 0.627" } + { mediumaquamarine } @Yield { rgb "0.400 0.804 0.667" } + { aquamarine } @Yield { rgb "0.498 1.000 0.831" } + { darkgreen } @Yield { rgb "0.000 0.392 0.000" } + { darkolivegreen } @Yield { rgb "0.333 0.420 0.184" } + { darkseagreen } @Yield { rgb "0.561 0.737 0.561" } + { seagreen } @Yield { rgb "0.180 0.545 0.341" } + { mediumseagreen } @Yield { rgb "0.235 0.702 0.443" } + { lightseagreen } @Yield { rgb "0.125 0.698 0.667" } + { palegreen } @Yield { rgb "0.596 0.984 0.596" } + { springgreen } @Yield { rgb "0.000 1.000 0.498" } + { lawngreen } @Yield { rgb "0.486 0.988 0.000" } + { green } @Yield { rgb "0.000 1.000 0.000" } + { chartreuse } @Yield { rgb "0.498 1.000 0.000" } + { mediumspringgreen } @Yield { rgb "0.000 0.980 0.604" } + { greenyellow } @Yield { rgb "0.678 1.000 0.184" } + { limegreen } @Yield { rgb "0.196 0.804 0.196" } + { yellowgreen } @Yield { rgb "0.604 0.804 0.196" } + { forestgreen } @Yield { rgb "0.133 0.545 0.133" } + { olivedrab } @Yield { rgb "0.420 0.557 0.137" } + { darkkhaki } @Yield { rgb "0.741 0.718 0.420" } + { khaki } @Yield { rgb "0.941 0.902 0.549" } + { palegoldenrod } @Yield { rgb "0.933 0.910 0.667" } + { lightgoldenrodyellow }@Yield{ rgb "0.980 0.980 0.824" } + { lightyellow } @Yield { rgb "1.000 1.000 0.878" } + { yellow } @Yield { rgb "1.000 1.000 0.000" } + { gold } @Yield { rgb "1.000 0.843 0.000" } + { lightgoldenrod } @Yield { rgb "0.933 0.867 0.510" } + { goldenrod } @Yield { rgb "0.855 0.647 0.125" } + { darkgoldenrod } @Yield { rgb "0.722 0.525 0.043" } + { rosybrown } @Yield { rgb "0.737 0.561 0.561" } + { indianred } @Yield { rgb "0.804 0.361 0.361" } + { saddlebrown } @Yield { rgb "0.545 0.271 0.075" } + { sienna } @Yield { rgb "0.627 0.322 0.176" } + { peru } @Yield { rgb "0.804 0.522 0.247" } + { burlywood } @Yield { rgb "0.871 0.722 0.529" } + { beige } @Yield { rgb "0.961 0.961 0.863" } + { wheat } @Yield { rgb "0.961 0.871 0.702" } + { sandybrown } @Yield { rgb "0.957 0.643 0.376" } + { tan } @Yield { rgb "0.824 0.706 0.549" } + { chocolate } @Yield { rgb "0.824 0.412 0.118" } + { firebrick } @Yield { rgb "0.698 0.133 0.133" } + { brown } @Yield { rgb "0.647 0.165 0.165" } + { darksalmon } @Yield { rgb "0.914 0.588 0.478" } + { salmon } @Yield { rgb "0.980 0.502 0.447" } + { lightsalmon } @Yield { rgb "1.000 0.627 0.478" } + { orange } @Yield { rgb "1.000 0.647 0.000" } + { darkorange } @Yield { rgb "1.000 0.549 0.000" } + { coral } @Yield { rgb "1.000 0.498 0.314" } + { lightcoral } @Yield { rgb "0.941 0.502 0.502" } + { tomato } @Yield { rgb "1.000 0.388 0.278" } + { orangered } @Yield { rgb "1.000 0.271 0.000" } + { red } @Yield { rgb "1.000 0.000 0.000" } + { hotpink } @Yield { rgb "1.000 0.412 0.706" } + { deeppink } @Yield { rgb "1.000 0.078 0.576" } + { pink } @Yield { rgb "1.000 0.753 0.796" } + { lightpink } @Yield { rgb "1.000 0.714 0.757" } + { palevioletred } @Yield { rgb "0.859 0.439 0.576" } + { maroon } @Yield { rgb "0.690 0.188 0.376" } + { mediumvioletred } @Yield { rgb "0.780 0.082 0.522" } + { violetred } @Yield { rgb "0.816 0.125 0.565" } + { magenta } @Yield { rgb "1.000 0.000 1.000" } + { violet } @Yield { rgb "0.933 0.510 0.933" } + { plum } @Yield { rgb "0.867 0.627 0.867" } + { orchid } @Yield { rgb "0.855 0.439 0.839" } + { mediumorchid } @Yield { rgb "0.729 0.333 0.827" } + { darkorchid } @Yield { rgb "0.600 0.196 0.800" } + { darkviolet } @Yield { rgb "0.580 0.000 0.827" } + { blueviolet } @Yield { rgb "0.541 0.169 0.886" } + { purple } @Yield { rgb "0.627 0.125 0.941" } + { mediumpurple } @Yield { rgb "0.576 0.439 0.859" } + { thistle } @Yield { rgb "0.847 0.749 0.847" } + { snow1 } @Yield { rgb "1.000 0.980 0.980" } + { snow2 } @Yield { rgb "0.933 0.914 0.914" } + { snow3 } @Yield { rgb "0.804 0.788 0.788" } + { snow4 } @Yield { rgb "0.545 0.537 0.537" } + { seashell1 } @Yield { rgb "1.000 0.961 0.933" } + { seashell2 } @Yield { rgb "0.933 0.898 0.871" } + { seashell3 } @Yield { rgb "0.804 0.773 0.749" } + { seashell4 } @Yield { rgb "0.545 0.525 0.510" } + { antiquewhite1 } @Yield { rgb "1.000 0.937 0.859" } + { antiquewhite2 } @Yield { rgb "0.933 0.875 0.800" } + { antiquewhite3 } @Yield { rgb "0.804 0.753 0.690" } + { antiquewhite4 } @Yield { rgb "0.545 0.514 0.471" } + { bisque1 } @Yield { rgb "1.000 0.894 0.769" } + { bisque2 } @Yield { rgb "0.933 0.835 0.718" } + { bisque3 } @Yield { rgb "0.804 0.718 0.620" } + { bisque4 } @Yield { rgb "0.545 0.490 0.420" } + { peachpuff1 } @Yield { rgb "1.000 0.855 0.725" } + { peachpuff2 } @Yield { rgb "0.933 0.796 0.678" } + { peachpuff3 } @Yield { rgb "0.804 0.686 0.584" } + { peachpuff4 } @Yield { rgb "0.545 0.467 0.396" } + { navajowhite1 } @Yield { rgb "1.000 0.871 0.678" } + { navajowhite2 } @Yield { rgb "0.933 0.812 0.631" } + { navajowhite3 } @Yield { rgb "0.804 0.702 0.545" } + { navajowhite4 } @Yield { rgb "0.545 0.475 0.369" } + { lemonchiffon1 } @Yield { rgb "1.000 0.980 0.804" } + { lemonchiffon2 } @Yield { rgb "0.933 0.914 0.749" } + { lemonchiffon3 } @Yield { rgb "0.804 0.788 0.647" } + { lemonchiffon4 } @Yield { rgb "0.545 0.537 0.439" } + { cornsilk1 } @Yield { rgb "1.000 0.973 0.863" } + { cornsilk2 } @Yield { rgb "0.933 0.910 0.804" } + { cornsilk3 } @Yield { rgb "0.804 0.784 0.694" } + { cornsilk4 } @Yield { rgb "0.545 0.533 0.471" } + { ivory1 } @Yield { rgb "1.000 1.000 0.941" } + { ivory2 } @Yield { rgb "0.933 0.933 0.878" } + { ivory3 } @Yield { rgb "0.804 0.804 0.757" } + { ivory4 } @Yield { rgb "0.545 0.545 0.514" } + { honeydew1 } @Yield { rgb "0.941 1.000 0.941" } + { honeydew2 } @Yield { rgb "0.878 0.933 0.878" } + { honeydew3 } @Yield { rgb "0.757 0.804 0.757" } + { honeydew4 } @Yield { rgb "0.514 0.545 0.514" } + { lavenderblush1 } @Yield { rgb "1.000 0.941 0.961" } + { lavenderblush2 } @Yield { rgb "0.933 0.878 0.898" } + { lavenderblush3 } @Yield { rgb "0.804 0.757 0.773" } + { lavenderblush4 } @Yield { rgb "0.545 0.514 0.525" } + { mistyrose1 } @Yield { rgb "1.000 0.894 0.882" } + { mistyrose2 } @Yield { rgb "0.933 0.835 0.824" } + { mistyrose3 } @Yield { rgb "0.804 0.718 0.710" } + { mistyrose4 } @Yield { rgb "0.545 0.490 0.482" } + { azure1 } @Yield { rgb "0.941 1.000 1.000" } + { azure2 } @Yield { rgb "0.878 0.933 0.933" } + { azure3 } @Yield { rgb "0.757 0.804 0.804" } + { azure4 } @Yield { rgb "0.514 0.545 0.545" } + { slateblue1 } @Yield { rgb "0.514 0.435 1.000" } + { slateblue2 } @Yield { rgb "0.478 0.404 0.933" } + { slateblue3 } @Yield { rgb "0.412 0.349 0.804" } + { slateblue4 } @Yield { rgb "0.278 0.235 0.545" } + { royalblue1 } @Yield { rgb "0.282 0.463 1.000" } + { royalblue2 } @Yield { rgb "0.263 0.431 0.933" } + { royalblue3 } @Yield { rgb "0.227 0.373 0.804" } + { royalblue4 } @Yield { rgb "0.153 0.251 0.545" } + { blue1 } @Yield { rgb "0.000 0.000 1.000" } + { blue2 } @Yield { rgb "0.000 0.000 0.933" } + { blue3 } @Yield { rgb "0.000 0.000 0.804" } + { blue4 } @Yield { rgb "0.000 0.000 0.545" } + { dodgerblue1 } @Yield { rgb "0.118 0.565 1.000" } + { dodgerblue2 } @Yield { rgb "0.110 0.525 0.933" } + { dodgerblue3 } @Yield { rgb "0.094 0.455 0.804" } + { dodgerblue4 } @Yield { rgb "0.063 0.306 0.545" } + { steelblue1 } @Yield { rgb "0.388 0.722 1.000" } + { steelblue2 } @Yield { rgb "0.361 0.675 0.933" } + { steelblue3 } @Yield { rgb "0.310 0.580 0.804" } + { steelblue4 } @Yield { rgb "0.212 0.392 0.545" } + { deepskyblue1 } @Yield { rgb "0.000 0.749 1.000" } + { deepskyblue2 } @Yield { rgb "0.000 0.698 0.933" } + { deepskyblue3 } @Yield { rgb "0.000 0.604 0.804" } + { deepskyblue4 } @Yield { rgb "0.000 0.408 0.545" } + { skyblue1 } @Yield { rgb "0.529 0.808 1.000" } + { skyblue2 } @Yield { rgb "0.494 0.753 0.933" } + { skyblue3 } @Yield { rgb "0.424 0.651 0.804" } + { skyblue4 } @Yield { rgb "0.290 0.439 0.545" } + { lightskyblue1 } @Yield { rgb "0.690 0.886 1.000" } + { lightskyblue2 } @Yield { rgb "0.643 0.827 0.933" } + { lightskyblue3 } @Yield { rgb "0.553 0.714 0.804" } + { lightskyblue4 } @Yield { rgb "0.376 0.482 0.545" } + { slategray1 } @Yield { rgb "0.776 0.886 1.000" } + { slategray2 } @Yield { rgb "0.725 0.827 0.933" } + { slategray3 } @Yield { rgb "0.624 0.714 0.804" } + { slategray4 } @Yield { rgb "0.424 0.482 0.545" } + { lightsteelblue1 } @Yield { rgb "0.792 0.882 1.000" } + { lightsteelblue2 } @Yield { rgb "0.737 0.824 0.933" } + { lightsteelblue3 } @Yield { rgb "0.635 0.710 0.804" } + { lightsteelblue4 } @Yield { rgb "0.431 0.482 0.545" } + { lightblue1 } @Yield { rgb "0.749 0.937 1.000" } + { lightblue2 } @Yield { rgb "0.698 0.875 0.933" } + { lightblue3 } @Yield { rgb "0.604 0.753 0.804" } + { lightblue4 } @Yield { rgb "0.408 0.514 0.545" } + { lightcyan1 } @Yield { rgb "0.878 1.000 1.000" } + { lightcyan2 } @Yield { rgb "0.820 0.933 0.933" } + { lightcyan3 } @Yield { rgb "0.706 0.804 0.804" } + { lightcyan4 } @Yield { rgb "0.478 0.545 0.545" } + { paleturquoise1 } @Yield { rgb "0.733 1.000 1.000" } + { paleturquoise2 } @Yield { rgb "0.682 0.933 0.933" } + { paleturquoise3 } @Yield { rgb "0.588 0.804 0.804" } + { paleturquoise4 } @Yield { rgb "0.400 0.545 0.545" } + { cadetblue1 } @Yield { rgb "0.596 0.961 1.000" } + { cadetblue2 } @Yield { rgb "0.557 0.898 0.933" } + { cadetblue3 } @Yield { rgb "0.478 0.773 0.804" } + { cadetblue4 } @Yield { rgb "0.325 0.525 0.545" } + { turquoise1 } @Yield { rgb "0.000 0.961 1.000" } + { turquoise2 } @Yield { rgb "0.000 0.898 0.933" } + { turquoise3 } @Yield { rgb "0.000 0.773 0.804" } + { turquoise4 } @Yield { rgb "0.000 0.525 0.545" } + { cyan1 } @Yield { rgb "0.000 1.000 1.000" } + { cyan2 } @Yield { rgb "0.000 0.933 0.933" } + { cyan3 } @Yield { rgb "0.000 0.804 0.804" } + { cyan4 } @Yield { rgb "0.000 0.545 0.545" } + { darkslategray1 } @Yield { rgb "0.592 1.000 1.000" } + { darkslategray2 } @Yield { rgb "0.553 0.933 0.933" } + { darkslategray3 } @Yield { rgb "0.475 0.804 0.804" } + { darkslategray4 } @Yield { rgb "0.322 0.545 0.545" } + { aquamarine1 } @Yield { rgb "0.498 1.000 0.831" } + { aquamarine2 } @Yield { rgb "0.463 0.933 0.776" } + { aquamarine3 } @Yield { rgb "0.400 0.804 0.667" } + { aquamarine4 } @Yield { rgb "0.271 0.545 0.455" } + { darkseagreen1 } @Yield { rgb "0.757 1.000 0.757" } + { darkseagreen2 } @Yield { rgb "0.706 0.933 0.706" } + { darkseagreen3 } @Yield { rgb "0.608 0.804 0.608" } + { darkseagreen4 } @Yield { rgb "0.412 0.545 0.412" } + { seagreen1 } @Yield { rgb "0.329 1.000 0.624" } + { seagreen2 } @Yield { rgb "0.306 0.933 0.580" } + { seagreen3 } @Yield { rgb "0.263 0.804 0.502" } + { seagreen4 } @Yield { rgb "0.180 0.545 0.341" } + { palegreen1 } @Yield { rgb "0.604 1.000 0.604" } + { palegreen2 } @Yield { rgb "0.565 0.933 0.565" } + { palegreen3 } @Yield { rgb "0.486 0.804 0.486" } + { palegreen4 } @Yield { rgb "0.329 0.545 0.329" } + { springgreen1 } @Yield { rgb "0.000 1.000 0.498" } + { springgreen2 } @Yield { rgb "0.000 0.933 0.463" } + { springgreen3 } @Yield { rgb "0.000 0.804 0.400" } + { springgreen4 } @Yield { rgb "0.000 0.545 0.271" } + { green1 } @Yield { rgb "0.000 1.000 0.000" } + { green2 } @Yield { rgb "0.000 0.933 0.000" } + { green3 } @Yield { rgb "0.000 0.804 0.000" } + { green4 } @Yield { rgb "0.000 0.545 0.000" } + { chartreuse1 } @Yield { rgb "0.498 1.000 0.000" } + { chartreuse2 } @Yield { rgb "0.463 0.933 0.000" } + { chartreuse3 } @Yield { rgb "0.400 0.804 0.000" } + { chartreuse4 } @Yield { rgb "0.271 0.545 0.000" } + { olivedrab1 } @Yield { rgb "0.753 1.000 0.243" } + { olivedrab2 } @Yield { rgb "0.702 0.933 0.227" } + { olivedrab3 } @Yield { rgb "0.604 0.804 0.196" } + { olivedrab4 } @Yield { rgb "0.412 0.545 0.133" } + { darkolivegreen1 } @Yield { rgb "0.792 1.000 0.439" } + { darkolivegreen2 } @Yield { rgb "0.737 0.933 0.408" } + { darkolivegreen3 } @Yield { rgb "0.635 0.804 0.353" } + { darkolivegreen4 } @Yield { rgb "0.431 0.545 0.239" } + { khaki1 } @Yield { rgb "1.000 0.965 0.561" } + { khaki2 } @Yield { rgb "0.933 0.902 0.522" } + { khaki3 } @Yield { rgb "0.804 0.776 0.451" } + { khaki4 } @Yield { rgb "0.545 0.525 0.306" } + { lightgoldenrod1 } @Yield { rgb "1.000 0.925 0.545" } + { lightgoldenrod2 } @Yield { rgb "0.933 0.863 0.510" } + { lightgoldenrod3 } @Yield { rgb "0.804 0.745 0.439" } + { lightgoldenrod4 } @Yield { rgb "0.545 0.506 0.298" } + { lightyellow1 } @Yield { rgb "1.000 1.000 0.878" } + { lightyellow2 } @Yield { rgb "0.933 0.933 0.820" } + { lightyellow3 } @Yield { rgb "0.804 0.804 0.706" } + { lightyellow4 } @Yield { rgb "0.545 0.545 0.478" } + { yellow1 } @Yield { rgb "1.000 1.000 0.000" } + { yellow2 } @Yield { rgb "0.933 0.933 0.000" } + { yellow3 } @Yield { rgb "0.804 0.804 0.000" } + { yellow4 } @Yield { rgb "0.545 0.545 0.000" } + { gold1 } @Yield { rgb "1.000 0.843 0.000" } + { gold2 } @Yield { rgb "0.933 0.788 0.000" } + { gold3 } @Yield { rgb "0.804 0.678 0.000" } + { gold4 } @Yield { rgb "0.545 0.459 0.000" } + { goldenrod1 } @Yield { rgb "1.000 0.757 0.145" } + { goldenrod2 } @Yield { rgb "0.933 0.706 0.133" } + { goldenrod3 } @Yield { rgb "0.804 0.608 0.114" } + { goldenrod4 } @Yield { rgb "0.545 0.412 0.078" } + { darkgoldenrod1 } @Yield { rgb "1.000 0.725 0.059" } + { darkgoldenrod2 } @Yield { rgb "0.933 0.678 0.055" } + { darkgoldenrod3 } @Yield { rgb "0.804 0.584 0.047" } + { darkgoldenrod4 } @Yield { rgb "0.545 0.396 0.031" } + { rosybrown1 } @Yield { rgb "1.000 0.757 0.757" } + { rosybrown2 } @Yield { rgb "0.933 0.706 0.706" } + { rosybrown3 } @Yield { rgb "0.804 0.608 0.608" } + { rosybrown4 } @Yield { rgb "0.545 0.412 0.412" } + { indianred1 } @Yield { rgb "1.000 0.416 0.416" } + { indianred2 } @Yield { rgb "0.933 0.388 0.388" } + { indianred3 } @Yield { rgb "0.804 0.333 0.333" } + { indianred4 } @Yield { rgb "0.545 0.227 0.227" } + { sienna1 } @Yield { rgb "1.000 0.510 0.278" } + { sienna2 } @Yield { rgb "0.933 0.475 0.259" } + { sienna3 } @Yield { rgb "0.804 0.408 0.224" } + { sienna4 } @Yield { rgb "0.545 0.278 0.149" } + { burlywood1 } @Yield { rgb "1.000 0.827 0.608" } + { burlywood2 } @Yield { rgb "0.933 0.773 0.569" } + { burlywood3 } @Yield { rgb "0.804 0.667 0.490" } + { burlywood4 } @Yield { rgb "0.545 0.451 0.333" } + { wheat1 } @Yield { rgb "1.000 0.906 0.729" } + { wheat2 } @Yield { rgb "0.933 0.847 0.682" } + { wheat3 } @Yield { rgb "0.804 0.729 0.588" } + { wheat4 } @Yield { rgb "0.545 0.494 0.400" } + { tan1 } @Yield { rgb "1.000 0.647 0.310" } + { tan2 } @Yield { rgb "0.933 0.604 0.286" } + { tan3 } @Yield { rgb "0.804 0.522 0.247" } + { tan4 } @Yield { rgb "0.545 0.353 0.169" } + { chocolate1 } @Yield { rgb "1.000 0.498 0.141" } + { chocolate2 } @Yield { rgb "0.933 0.463 0.129" } + { chocolate3 } @Yield { rgb "0.804 0.400 0.114" } + { chocolate4 } @Yield { rgb "0.545 0.271 0.075" } + { firebrick1 } @Yield { rgb "1.000 0.188 0.188" } + { firebrick2 } @Yield { rgb "0.933 0.173 0.173" } + { firebrick3 } @Yield { rgb "0.804 0.149 0.149" } + { firebrick4 } @Yield { rgb "0.545 0.102 0.102" } + { brown1 } @Yield { rgb "1.000 0.251 0.251" } + { brown2 } @Yield { rgb "0.933 0.231 0.231" } + { brown3 } @Yield { rgb "0.804 0.200 0.200" } + { brown4 } @Yield { rgb "0.545 0.137 0.137" } + { salmon1 } @Yield { rgb "1.000 0.549 0.412" } + { salmon2 } @Yield { rgb "0.933 0.510 0.384" } + { salmon3 } @Yield { rgb "0.804 0.439 0.329" } + { salmon4 } @Yield { rgb "0.545 0.298 0.224" } + { lightsalmon1 } @Yield { rgb "1.000 0.627 0.478" } + { lightsalmon2 } @Yield { rgb "0.933 0.584 0.447" } + { lightsalmon3 } @Yield { rgb "0.804 0.506 0.384" } + { lightsalmon4 } @Yield { rgb "0.545 0.341 0.259" } + { orange1 } @Yield { rgb "1.000 0.647 0.000" } + { orange2 } @Yield { rgb "0.933 0.604 0.000" } + { orange3 } @Yield { rgb "0.804 0.522 0.000" } + { orange4 } @Yield { rgb "0.545 0.353 0.000" } + { darkorange1 } @Yield { rgb "1.000 0.498 0.000" } + { darkorange2 } @Yield { rgb "0.933 0.463 0.000" } + { darkorange3 } @Yield { rgb "0.804 0.400 0.000" } + { darkorange4 } @Yield { rgb "0.545 0.271 0.000" } + { coral1 } @Yield { rgb "1.000 0.447 0.337" } + { coral2 } @Yield { rgb "0.933 0.416 0.314" } + { coral3 } @Yield { rgb "0.804 0.357 0.271" } + { coral4 } @Yield { rgb "0.545 0.243 0.184" } + { tomato1 } @Yield { rgb "1.000 0.388 0.278" } + { tomato2 } @Yield { rgb "0.933 0.361 0.259" } + { tomato3 } @Yield { rgb "0.804 0.310 0.224" } + { tomato4 } @Yield { rgb "0.545 0.212 0.149" } + { orangered1 } @Yield { rgb "1.000 0.271 0.000" } + { orangered2 } @Yield { rgb "0.933 0.251 0.000" } + { orangered3 } @Yield { rgb "0.804 0.216 0.000" } + { orangered4 } @Yield { rgb "0.545 0.145 0.000" } + { red1 } @Yield { rgb "1.000 0.000 0.000" } + { red2 } @Yield { rgb "0.933 0.000 0.000" } + { red3 } @Yield { rgb "0.804 0.000 0.000" } + { red4 } @Yield { rgb "0.545 0.000 0.000" } + { deeppink1 } @Yield { rgb "1.000 0.078 0.576" } + { deeppink2 } @Yield { rgb "0.933 0.071 0.537" } + { deeppink3 } @Yield { rgb "0.804 0.063 0.463" } + { deeppink4 } @Yield { rgb "0.545 0.039 0.314" } + { hotpink1 } @Yield { rgb "1.000 0.431 0.706" } + { hotpink2 } @Yield { rgb "0.933 0.416 0.655" } + { hotpink3 } @Yield { rgb "0.804 0.376 0.565" } + { hotpink4 } @Yield { rgb "0.545 0.227 0.384" } + { pink1 } @Yield { rgb "1.000 0.710 0.773" } + { pink2 } @Yield { rgb "0.933 0.663 0.722" } + { pink3 } @Yield { rgb "0.804 0.569 0.620" } + { pink4 } @Yield { rgb "0.545 0.388 0.424" } + { lightpink1 } @Yield { rgb "1.000 0.682 0.725" } + { lightpink2 } @Yield { rgb "0.933 0.635 0.678" } + { lightpink3 } @Yield { rgb "0.804 0.549 0.584" } + { lightpink4 } @Yield { rgb "0.545 0.373 0.396" } + { palevioletred1 } @Yield { rgb "1.000 0.510 0.671" } + { palevioletred2 } @Yield { rgb "0.933 0.475 0.624" } + { palevioletred3 } @Yield { rgb "0.804 0.408 0.537" } + { palevioletred4 } @Yield { rgb "0.545 0.278 0.365" } + { maroon1 } @Yield { rgb "1.000 0.204 0.702" } + { maroon2 } @Yield { rgb "0.933 0.188 0.655" } + { maroon3 } @Yield { rgb "0.804 0.161 0.565" } + { maroon4 } @Yield { rgb "0.545 0.110 0.384" } + { violetred1 } @Yield { rgb "1.000 0.243 0.588" } + { violetred2 } @Yield { rgb "0.933 0.227 0.549" } + { violetred3 } @Yield { rgb "0.804 0.196 0.471" } + { violetred4 } @Yield { rgb "0.545 0.133 0.322" } + { magenta1 } @Yield { rgb "1.000 0.000 1.000" } + { magenta2 } @Yield { rgb "0.933 0.000 0.933" } + { magenta3 } @Yield { rgb "0.804 0.000 0.804" } + { magenta4 } @Yield { rgb "0.545 0.000 0.545" } + { orchid1 } @Yield { rgb "1.000 0.514 0.980" } + { orchid2 } @Yield { rgb "0.933 0.478 0.914" } + { orchid3 } @Yield { rgb "0.804 0.412 0.788" } + { orchid4 } @Yield { rgb "0.545 0.278 0.537" } + { plum1 } @Yield { rgb "1.000 0.733 1.000" } + { plum2 } @Yield { rgb "0.933 0.682 0.933" } + { plum3 } @Yield { rgb "0.804 0.588 0.804" } + { plum4 } @Yield { rgb "0.545 0.400 0.545" } + { mediumorchid1 } @Yield { rgb "0.878 0.400 1.000" } + { mediumorchid2 } @Yield { rgb "0.820 0.373 0.933" } + { mediumorchid3 } @Yield { rgb "0.706 0.322 0.804" } + { mediumorchid4 } @Yield { rgb "0.478 0.216 0.545" } + { darkorchid1 } @Yield { rgb "0.749 0.243 1.000" } + { darkorchid2 } @Yield { rgb "0.698 0.227 0.933" } + { darkorchid3 } @Yield { rgb "0.604 0.196 0.804" } + { darkorchid4 } @Yield { rgb "0.408 0.133 0.545" } + { purple1 } @Yield { rgb "0.608 0.188 1.000" } + { purple2 } @Yield { rgb "0.569 0.173 0.933" } + { purple3 } @Yield { rgb "0.490 0.149 0.804" } + { purple4 } @Yield { rgb "0.333 0.102 0.545" } + { mediumpurple1 } @Yield { rgb "0.671 0.510 1.000" } + { mediumpurple2 } @Yield { rgb "0.624 0.475 0.933" } + { mediumpurple3 } @Yield { rgb "0.537 0.408 0.804" } + { mediumpurple4 } @Yield { rgb "0.365 0.278 0.545" } + { thistle1 } @Yield { rgb "1.000 0.882 1.000" } + { thistle2 } @Yield { rgb "0.933 0.824 0.933" } + { thistle3 } @Yield { rgb "0.804 0.710 0.804" } + { thistle4 } @Yield { rgb "0.545 0.482 0.545" } + { gray0 } @Yield { rgb "0.000 0.000 0.000" } + { grey0 } @Yield { rgb "0.000 0.000 0.000" } + { gray1 } @Yield { rgb "0.012 0.012 0.012" } + { grey1 } @Yield { rgb "0.012 0.012 0.012" } + { gray2 } @Yield { rgb "0.020 0.020 0.020" } + { grey2 } @Yield { rgb "0.020 0.020 0.020" } + { gray3 } @Yield { rgb "0.031 0.031 0.031" } + { grey3 } @Yield { rgb "0.031 0.031 0.031" } + { gray4 } @Yield { rgb "0.039 0.039 0.039" } + { grey4 } @Yield { rgb "0.039 0.039 0.039" } + { gray5 } @Yield { rgb "0.051 0.051 0.051" } + { grey5 } @Yield { rgb "0.051 0.051 0.051" } + { gray6 } @Yield { rgb "0.059 0.059 0.059" } + { grey6 } @Yield { rgb "0.059 0.059 0.059" } + { gray7 } @Yield { rgb "0.071 0.071 0.071" } + { grey7 } @Yield { rgb "0.071 0.071 0.071" } + { gray8 } @Yield { rgb "0.078 0.078 0.078" } + { grey8 } @Yield { rgb "0.078 0.078 0.078" } + { gray9 } @Yield { rgb "0.090 0.090 0.090" } + { grey9 } @Yield { rgb "0.090 0.090 0.090" } + { gray10 } @Yield { rgb "0.102 0.102 0.102" } + { grey10 } @Yield { rgb "0.102 0.102 0.102" } + { gray11 } @Yield { rgb "0.110 0.110 0.110" } + { grey11 } @Yield { rgb "0.110 0.110 0.110" } + { gray12 } @Yield { rgb "0.122 0.122 0.122" } + { grey12 } @Yield { rgb "0.122 0.122 0.122" } + { gray13 } @Yield { rgb "0.129 0.129 0.129" } + { grey13 } @Yield { rgb "0.129 0.129 0.129" } + { gray14 } @Yield { rgb "0.141 0.141 0.141" } + { grey14 } @Yield { rgb "0.141 0.141 0.141" } + { gray15 } @Yield { rgb "0.149 0.149 0.149" } + { grey15 } @Yield { rgb "0.149 0.149 0.149" } + { gray16 } @Yield { rgb "0.161 0.161 0.161" } + { grey16 } @Yield { rgb "0.161 0.161 0.161" } + { gray17 } @Yield { rgb "0.169 0.169 0.169" } + { grey17 } @Yield { rgb "0.169 0.169 0.169" } + { gray18 } @Yield { rgb "0.180 0.180 0.180" } + { grey18 } @Yield { rgb "0.180 0.180 0.180" } + { gray19 } @Yield { rgb "0.188 0.188 0.188" } + { grey19 } @Yield { rgb "0.188 0.188 0.188" } + { gray20 } @Yield { rgb "0.200 0.200 0.200" } + { grey20 } @Yield { rgb "0.200 0.200 0.200" } + { gray21 } @Yield { rgb "0.212 0.212 0.212" } + { grey21 } @Yield { rgb "0.212 0.212 0.212" } + { gray22 } @Yield { rgb "0.220 0.220 0.220" } + { grey22 } @Yield { rgb "0.220 0.220 0.220" } + { gray23 } @Yield { rgb "0.231 0.231 0.231" } + { grey23 } @Yield { rgb "0.231 0.231 0.231" } + { gray24 } @Yield { rgb "0.239 0.239 0.239" } + { grey24 } @Yield { rgb "0.239 0.239 0.239" } + { gray25 } @Yield { rgb "0.251 0.251 0.251" } + { grey25 } @Yield { rgb "0.251 0.251 0.251" } + { gray26 } @Yield { rgb "0.259 0.259 0.259" } + { grey26 } @Yield { rgb "0.259 0.259 0.259" } + { gray27 } @Yield { rgb "0.271 0.271 0.271" } + { grey27 } @Yield { rgb "0.271 0.271 0.271" } + { gray28 } @Yield { rgb "0.278 0.278 0.278" } + { grey28 } @Yield { rgb "0.278 0.278 0.278" } + { gray29 } @Yield { rgb "0.290 0.290 0.290" } + { grey29 } @Yield { rgb "0.290 0.290 0.290" } + { gray30 } @Yield { rgb "0.302 0.302 0.302" } + { grey30 } @Yield { rgb "0.302 0.302 0.302" } + { gray31 } @Yield { rgb "0.310 0.310 0.310" } + { grey31 } @Yield { rgb "0.310 0.310 0.310" } + { gray32 } @Yield { rgb "0.322 0.322 0.322" } + { grey32 } @Yield { rgb "0.322 0.322 0.322" } + { gray33 } @Yield { rgb "0.329 0.329 0.329" } + { grey33 } @Yield { rgb "0.329 0.329 0.329" } + { gray34 } @Yield { rgb "0.341 0.341 0.341" } + { grey34 } @Yield { rgb "0.341 0.341 0.341" } + { gray35 } @Yield { rgb "0.349 0.349 0.349" } + { grey35 } @Yield { rgb "0.349 0.349 0.349" } + { gray36 } @Yield { rgb "0.361 0.361 0.361" } + { grey36 } @Yield { rgb "0.361 0.361 0.361" } + { gray37 } @Yield { rgb "0.369 0.369 0.369" } + { grey37 } @Yield { rgb "0.369 0.369 0.369" } + { gray38 } @Yield { rgb "0.380 0.380 0.380" } + { grey38 } @Yield { rgb "0.380 0.380 0.380" } + { gray39 } @Yield { rgb "0.388 0.388 0.388" } + { grey39 } @Yield { rgb "0.388 0.388 0.388" } + { gray40 } @Yield { rgb "0.400 0.400 0.400" } + { grey40 } @Yield { rgb "0.400 0.400 0.400" } + { gray41 } @Yield { rgb "0.412 0.412 0.412" } + { grey41 } @Yield { rgb "0.412 0.412 0.412" } + { gray42 } @Yield { rgb "0.420 0.420 0.420" } + { grey42 } @Yield { rgb "0.420 0.420 0.420" } + { gray43 } @Yield { rgb "0.431 0.431 0.431" } + { grey43 } @Yield { rgb "0.431 0.431 0.431" } + { gray44 } @Yield { rgb "0.439 0.439 0.439" } + { grey44 } @Yield { rgb "0.439 0.439 0.439" } + { gray45 } @Yield { rgb "0.451 0.451 0.451" } + { grey45 } @Yield { rgb "0.451 0.451 0.451" } + { gray46 } @Yield { rgb "0.459 0.459 0.459" } + { grey46 } @Yield { rgb "0.459 0.459 0.459" } + { gray47 } @Yield { rgb "0.471 0.471 0.471" } + { grey47 } @Yield { rgb "0.471 0.471 0.471" } + { gray48 } @Yield { rgb "0.478 0.478 0.478" } + { grey48 } @Yield { rgb "0.478 0.478 0.478" } + { gray49 } @Yield { rgb "0.490 0.490 0.490" } + { grey49 } @Yield { rgb "0.490 0.490 0.490" } + { gray50 } @Yield { rgb "0.498 0.498 0.498" } + { grey50 } @Yield { rgb "0.498 0.498 0.498" } + { gray51 } @Yield { rgb "0.510 0.510 0.510" } + { grey51 } @Yield { rgb "0.510 0.510 0.510" } + { gray52 } @Yield { rgb "0.522 0.522 0.522" } + { grey52 } @Yield { rgb "0.522 0.522 0.522" } + { gray53 } @Yield { rgb "0.529 0.529 0.529" } + { grey53 } @Yield { rgb "0.529 0.529 0.529" } + { gray54 } @Yield { rgb "0.541 0.541 0.541" } + { grey54 } @Yield { rgb "0.541 0.541 0.541" } + { gray55 } @Yield { rgb "0.549 0.549 0.549" } + { grey55 } @Yield { rgb "0.549 0.549 0.549" } + { gray56 } @Yield { rgb "0.561 0.561 0.561" } + { grey56 } @Yield { rgb "0.561 0.561 0.561" } + { gray57 } @Yield { rgb "0.569 0.569 0.569" } + { grey57 } @Yield { rgb "0.569 0.569 0.569" } + { gray58 } @Yield { rgb "0.580 0.580 0.580" } + { grey58 } @Yield { rgb "0.580 0.580 0.580" } + { gray59 } @Yield { rgb "0.588 0.588 0.588" } + { grey59 } @Yield { rgb "0.588 0.588 0.588" } + { gray60 } @Yield { rgb "0.600 0.600 0.600" } + { grey60 } @Yield { rgb "0.600 0.600 0.600" } + { gray61 } @Yield { rgb "0.612 0.612 0.612" } + { grey61 } @Yield { rgb "0.612 0.612 0.612" } + { gray62 } @Yield { rgb "0.620 0.620 0.620" } + { grey62 } @Yield { rgb "0.620 0.620 0.620" } + { gray63 } @Yield { rgb "0.631 0.631 0.631" } + { grey63 } @Yield { rgb "0.631 0.631 0.631" } + { gray64 } @Yield { rgb "0.639 0.639 0.639" } + { grey64 } @Yield { rgb "0.639 0.639 0.639" } + { gray65 } @Yield { rgb "0.651 0.651 0.651" } + { grey65 } @Yield { rgb "0.651 0.651 0.651" } + { gray66 } @Yield { rgb "0.659 0.659 0.659" } + { grey66 } @Yield { rgb "0.659 0.659 0.659" } + { gray67 } @Yield { rgb "0.671 0.671 0.671" } + { grey67 } @Yield { rgb "0.671 0.671 0.671" } + { gray68 } @Yield { rgb "0.678 0.678 0.678" } + { grey68 } @Yield { rgb "0.678 0.678 0.678" } + { gray69 } @Yield { rgb "0.690 0.690 0.690" } + { grey69 } @Yield { rgb "0.690 0.690 0.690" } + { gray70 } @Yield { rgb "0.702 0.702 0.702" } + { grey70 } @Yield { rgb "0.702 0.702 0.702" } + { gray71 } @Yield { rgb "0.710 0.710 0.710" } + { grey71 } @Yield { rgb "0.710 0.710 0.710" } + { gray72 } @Yield { rgb "0.722 0.722 0.722" } + { grey72 } @Yield { rgb "0.722 0.722 0.722" } + { gray73 } @Yield { rgb "0.729 0.729 0.729" } + { grey73 } @Yield { rgb "0.729 0.729 0.729" } + { gray74 } @Yield { rgb "0.741 0.741 0.741" } + { grey74 } @Yield { rgb "0.741 0.741 0.741" } + { gray75 } @Yield { rgb "0.749 0.749 0.749" } + { grey75 } @Yield { rgb "0.749 0.749 0.749" } + { gray76 } @Yield { rgb "0.761 0.761 0.761" } + { grey76 } @Yield { rgb "0.761 0.761 0.761" } + { gray77 } @Yield { rgb "0.769 0.769 0.769" } + { grey77 } @Yield { rgb "0.769 0.769 0.769" } + { gray78 } @Yield { rgb "0.780 0.780 0.780" } + { grey78 } @Yield { rgb "0.780 0.780 0.780" } + { gray79 } @Yield { rgb "0.788 0.788 0.788" } + { grey79 } @Yield { rgb "0.788 0.788 0.788" } + { gray80 } @Yield { rgb "0.800 0.800 0.800" } + { grey80 } @Yield { rgb "0.800 0.800 0.800" } + { gray81 } @Yield { rgb "0.812 0.812 0.812" } + { grey81 } @Yield { rgb "0.812 0.812 0.812" } + { gray82 } @Yield { rgb "0.820 0.820 0.820" } + { grey82 } @Yield { rgb "0.820 0.820 0.820" } + { gray83 } @Yield { rgb "0.831 0.831 0.831" } + { grey83 } @Yield { rgb "0.831 0.831 0.831" } + { gray84 } @Yield { rgb "0.839 0.839 0.839" } + { grey84 } @Yield { rgb "0.839 0.839 0.839" } + { gray85 } @Yield { rgb "0.851 0.851 0.851" } + { grey85 } @Yield { rgb "0.851 0.851 0.851" } + { gray86 } @Yield { rgb "0.859 0.859 0.859" } + { grey86 } @Yield { rgb "0.859 0.859 0.859" } + { gray87 } @Yield { rgb "0.871 0.871 0.871" } + { grey87 } @Yield { rgb "0.871 0.871 0.871" } + { gray88 } @Yield { rgb "0.878 0.878 0.878" } + { grey88 } @Yield { rgb "0.878 0.878 0.878" } + { gray89 } @Yield { rgb "0.890 0.890 0.890" } + { grey89 } @Yield { rgb "0.890 0.890 0.890" } + { gray90 } @Yield { rgb "0.898 0.898 0.898" } + { grey90 } @Yield { rgb "0.898 0.898 0.898" } + { gray91 } @Yield { rgb "0.910 0.910 0.910" } + { grey91 } @Yield { rgb "0.910 0.910 0.910" } + { gray92 } @Yield { rgb "0.922 0.922 0.922" } + { grey92 } @Yield { rgb "0.922 0.922 0.922" } + { gray93 } @Yield { rgb "0.929 0.929 0.929" } + { grey93 } @Yield { rgb "0.929 0.929 0.929" } + { gray94 } @Yield { rgb "0.941 0.941 0.941" } + { grey94 } @Yield { rgb "0.941 0.941 0.941" } + { gray95 } @Yield { rgb "0.949 0.949 0.949" } + { grey95 } @Yield { rgb "0.949 0.949 0.949" } + { gray96 } @Yield { rgb "0.961 0.961 0.961" } + { grey96 } @Yield { rgb "0.961 0.961 0.961" } + { gray97 } @Yield { rgb "0.969 0.969 0.969" } + { grey97 } @Yield { rgb "0.969 0.969 0.969" } + { gray98 } @Yield { rgb "0.980 0.980 0.980" } + { grey98 } @Yield { rgb "0.980 0.980 0.980" } + { gray99 } @Yield { rgb "0.988 0.988 0.988" } + { grey99 } @Yield { rgb "0.988 0.988 0.988" } + { gray100 } @Yield { rgb "1.000 1.000 1.000" } + { grey100 } @Yield { rgb "1.000 1.000 1.000" } + { darkgrey } @Yield { rgb "0.663 0.663 0.663" } + { darkgray } @Yield { rgb "0.663 0.663 0.663" } + { darkblue } @Yield { rgb "0.000 0.000 0.545" } + { darkcyan } @Yield { rgb "0.000 0.545 0.545" } + { darkmagenta } @Yield { rgb "0.545 0.000 0.545" } + { darkred } @Yield { rgb "0.545 0.000 0.000" } + { lightgreen } @Yield { rgb "0.565 0.933 0.565" } + # else @Yield { rgb "0.000 0.000 0.000" } + } +} |