[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sidebar symbol + poss. @Python bug
From: |
Mark Summerfield |
Subject: |
Sidebar symbol + poss. @Python bug |
Date: |
Tue, 23 Oct 2001 22:24:41 +0100 |
lout 3.23.
1. A @Sidebar symbol, with a couple of features missing.
2. A possible bug in @Python.
Here's a definition of a @Sidebar symbol that seems to work, but with
one error and a few "missings":
import @BasicSetup
def @Sidebar
named @Title {}
named @Type {}
right x
{
def @DetailsPlace { @Galley }
def @SendDetails into { @DetailsPlace&&preceding } right x { @OneCol x }
@OneRow @CD
@Tbl
rule { yes }
aformat {
@Cell iv { ctr }
paint {
@Type @Case {
tip @Yield { lightyellow }
caution @Yield { lightred }
exercise @Yield { lightcyan }
note @Yield { lightgreen }
else @Yield { lightgrey }
}
} A
}
{
@Rowa
A {
1c @Wide
@Type @Case {
tip @Yield { { Dingbats Base +2p } @Font 4 }
caution @Yield { { Dingbats Base +2p } @Font 8 }
exercise @Yield { { Dingbats Base +2p } @Font + }
note @Yield { { Dingbats Base +2p } @Font - }
else @Yield { @Diag {
@Circle margin { 0.2f }
{ Times Bold -1p } @Font i } }
}
@B @Title
}
@Rowa
A { x }
}
//
@SendDetails x
}
Note. This cannot be put in a "mydefs" file, i.e. you must do this:
@SysInclude { tbl }
@SysInclude { diag }
@SysInclude { book } # Or whatever your doc type is
@Include { misc.lout } # Contains @Sidebar
The definition generates this error message for the first @Sidebar
encountered:
no @DetailsPlace precedes this @DetailsPlace&&preceding
I don't know why; if I didn't use a galley the definition works fine,
but maybe not for large sidebars?
I have three "missings" with this definition:
i) I want to be able to use @Tag so that I can write:
@Sidebar
@Title { My Sidebar }
@Type { tip }
@Tag { my.sidebar }
{
body of sidebar
}
I know this stuff is explained in the experts guide, but I can't seem
to grasp how to do it. I tried @PageMark @Tag after the @B @Title but
that didn't work.
ii) I want to be able to optionally number sidebars, with each type
getting its own sequence of numbers, and a symbol, say @Number, that I
can use within the body of the definition so I can change
@B @Title
to
@B { @Number @Title }
for example.
iii) I'd like to be able to use @TitleOf with @Sidebar, once 3.25 is
available.
I've tried the above with 3.21 with the same results.
Possible bug in @Python.
@LD @Python {
'single quotes'
"double quotes"
'''triple
quotes'''
}
Lout converts the '' into a proper double quote -- which it should not
do since @Python should make everything literal. (I am not using the
symbol option.)
Thanks.
--
Mark.