aboutsummaryrefslogtreecommitdiffstats
path: root/include/bsf
diff options
context:
space:
mode:
authorJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 20:37:45 +0000
committerJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 20:37:45 +0000
commitc89f0bc2209f7f98695e6b94fbac316c84fbf9d4 (patch)
tree456d506bd18edd3b768eaffa8f70ae93565682e4 /include/bsf
parent7db8921aac3a0e1223af269ec7092bdd91a7c7a2 (diff)
downloadlout-c89f0bc2209f7f98695e6b94fbac316c84fbf9d4.tar.gz
Lout 3.25.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@19 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'include/bsf')
-rw-r--r--include/bsf104
1 files changed, 50 insertions, 54 deletions
diff --git a/include/bsf b/include/bsf
index 1440b82..8158c22 100644
--- a/include/bsf
+++ b/include/bsf
@@ -36,55 +36,13 @@ def @OrIfPlain
}
}
- ###########################################################################
- # #
- # @Colour, @Color #
- # #
- ###########################################################################
+###########################################################################
+# #
+# @ColourCommand, @Colour, @Color #
+# #
+###########################################################################
- def @ColourCommand right col
- {
- def @ColourCoords
- {
- col @Case {
- 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 }
- black @Yield { 0.0 0.0 0.0 }
- white @Yield { 1.0 1.0 1.0 }
- }
- }
-
- col @Case {
- nochange @Yield { nochange }
- else @Yield { @BackEnd @Case {
- PostScript @Yield { @ColourCoords setrgbcolor }
- PDF @Yield { @ColourCoords rg @ColourCoords RG }
- PlainText @Yield ""
- } }
- }
- }
+@SysInclude { ccommand }
def @Colour @Color left col right y { {@ColourCommand col} @SetColour y }
@@ -157,8 +115,8 @@ def @OrIfPlain
export
- @InitialFont @InitialBreak @InitialSpace @InitialLanguage @InitialColour
- @OptimizePages @HeadingFont
+ @InitialFont @InitialBreak @InitialOutdent @InitialSpace @InitialLanguage
+ @InitialColour @OptimizePages @HeadingFont
@ParaGap @ParaIndent @DisplayGap @DisplayIndent @DefaultIndent
@DisplayNumStyle @WideIndent @VeryWideIndent
@ListGap @ListIndent @ListRightIndent @ListLabelWidth
@@ -177,8 +135,9 @@ export
@Date @Time @DateTimeFormat @DropCapTwo @DropCapThree @Centre @Right
@NoDotSep @NoDotJoin @Join @Sep @DotSep @DotJoin @DashJoin @NumSep
@OverStrike @Sup @Sub @FullWidthRule @LocalWidthRule
- @Box @CurveBox @ShadowBox @BoundaryMarks @NumberMarker @NumberOf
- @PageMarker @PageMark @NoLinkPageMark @PageOf @CrossLink
+ @Box @CurveBox @ShadowBox @BoundaryMarks
+ @NumberMarker @NumberOf @TitleMarker @TitleOf
+ @PageMarker @PageMark @NoLinkPageMark @PageOf @CrossLink @ExternalLink
@BeginDisplayCounter
@@ -303,11 +262,13 @@ 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
@@ -326,6 +287,9 @@ def @BasicSetup
import @BasicSetup
named @CrossLinkFormat
right @Body { @Body } # format for cross links
+ import @BasicSetup
+ named @ExternalLinkFormat
+ right @Body { @Body } # format for external links
@Begin
###########################################################################
@@ -341,7 +305,7 @@ def @BasicSetup
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 { { Courier Base -1p } @Font x }
+ def @F right x { @FixedWidthFont @Font x }
def @II
right x
@@ -1044,7 +1008,14 @@ def @BasicSetup
##########################################################################
# #
- # @NumberMarker, @NumberOf, @PageMarker, @PageMark, @PageOf, @CrossLink #
+ # @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. #
# #
##########################################################################
@@ -1063,6 +1034,21 @@ def @BasicSetup
}
+ 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 {}
@@ -1100,6 +1086,16 @@ def @BasicSetup
}
}
+ def @ExternalLink
+ left tag
+ named @Format right @Body { @ExternalLinkFormat @Body }
+ right obj
+ {
+ @HContract @VContract {
+ tag @URLLink @Format obj
+ }
+ }
+
###########################################################################
# #