Wednesday 25th July 2012, The Olympic Tasting at the Portuguese Embassy (
placemats,
planning and arrangements).
Code: Select all
/PeopleData [
[
(JdV)
[
{TypeOfPagesBeingRendered dup dup /PlaceName eq exch /VoteRecorder eq or exch /DecantingNotes eq or {/JDAW-CFS CurrentFontSize def CurrentFontName JDAW-CFS 3 div selectfont 0 JDAW-CFS 0.25 mul rmoveto} if}
(H.E. Dr )
{TypeOfPagesBeingRendered dup dup /PlaceName eq exch /VoteRecorder eq or exch /DecantingNotes eq or {CurrentFontName JDAW-CFS selectfont 0 JDAW-CFS -0.25 mul rmoveto} if}
{TypeOfPagesBeingRendered /VoteRecorder eq {[(J) {-0.09 Kern} (.)]} {[(J) {-0.03 Kern} (o) /atilde (o)]} ifelse}
( de V) {-0.15 Kern} (allera)
]
]
[
(TEB)
[
(Lord Boswell)
{TypeOfPagesBeingRendered dup dup /PlaceName eq exch /VoteRecorder eq or exch /DecantingNotes eq or not {( of Aynho)} if}
]
]
[ (CM) (Charles M.) ] % Charles Metcalfe
[ (AWE) (Alex E.) ] % Ambassador's Guest, Alex W. Ellis
[
(RB)
[(Roger B.) {TypeOfPagesBeingRendered /PlaceName ne {(, Esq)} if}]
] % Ambassador's Guest, Lord Roger Bramble, the Deputy Lieutenant of Greater London ?
[ (RLC) (Ray C.) ]
[ (THRA) [(T) {-0.08 Kern} (om A.)] ]
[ (DRT) [(Derek T) {-0.09 Kern} (.)] ]
[ (WS) [(W) {-0.12 Kern} (olfgang S.)] ]
[ (BMHR) (Ben R.) ]
[ [(JDA) {-0.06 Kern} (W)] [(J) {-0.03 Kern} (ulian W) {-0.12 Kern} (.)] ]
[ [(RA) {-0.06 Kern} (YC)] (Rob C.) ]
[ (OJMQ) [(Oscar Q) {-0.03 Kern} (.)] ] % -0.105
[ (ARK) (Alex K.) ]
[ (CRS) (Carl S.) ]
[ (PW) [(Phil W) {-0.12 Kern} (.)] ]
[ (GW) [(Giles W) {-0.12 Kern} (.)] ] % Giles Wigoder, no middle initial known, right-handed, no special dietary requirements other than an aversion to Pot Noodle
[
(GRJ) % The Right Reverend Graham R James (Bishop of Norwich)
[
{TypeOfPagesBeingRendered dup dup /PlaceName eq exch /VoteRecorder eq or exch /DecantingNotes eq or {/JDAW-CFS CurrentFontSize def CurrentFontName JDAW-CFS 3 div selectfont 0 JDAW-CFS 0.25 mul rmoveto} if}
{TypeOfPagesBeingRendered /TastingNotes eq {(The Right Reverend )} {(T) {-0.09 Kern} (.R.R. )} ifelse}
{TypeOfPagesBeingRendered dup dup /PlaceName eq exch /VoteRecorder eq or exch /DecantingNotes eq or {CurrentFontName JDAW-CFS selectfont 0 JDAW-CFS -0.25 mul rmoveto} if}
{TypeOfPagesBeingRendered /VoteRecorder eq {(G.)} {(Graham)} ifelse}
( James)
{TypeOfPagesBeingRendered /TastingNotes eq {(, the 71) {SuperscriptOn} (st) {SuperscriptOff} ( Bishop of Norwich)} if}
]
]
[ (LB-S) (Lorenzo B.-S.) ] % Lorenzo Bakewell-Stone
[ (SF) [(Steve F) {-0.12 Kern} (.)] ] % Steve Filbey
[ (QA) (Quentin A.) ] % Quentin Archer
[ (RC) [/quoteleft (Oz) /quoteright ( C.)] ] % Oz Clarke
[ () () ] % Industry guest
[ () () ] % Industry guest
] def
/PortData [
% YYYY City Abbreviation Type Subtitle shipper Circlearray shipper
[ (1948) (London) (Mz) () (Martinez) dup ]
[ (1952) (Helsinki) (Ni) (Colheita) (Niepoort) dup ]
[ (1956) (Melbourne) (Ni) (Experimental) (Niepoort) dup ]
[ (1960) (Rome) (Cr) () (Croft) dup ]
[ (1964) [(T) {-0.06 Kern} (okyo)] (GM) () (Malvedos) (Graham Malvedos) ]
[ (1968) (Mexico City) (TV) () (Guimaraens) (Fonseca Guimaraens) ]
[ (1972) (Munich) (OBV) () (Offley Boa Vista) dup ]
[ (1976) (Montreal) (RP) () [(V) {-0.06 Kern} (argellas)] [(T) {-0.08 Kern} (aylor Quinta de ) 4 index] ]
[ (1980) (Moscow) (D) () (Dow) dup ]
[ (1984) (Los Angeles) (WC) () (Cavadinha) [(W) {-0.09 Kern} (arre Quinta da Cavadinha)] ]
[ (1988) (Seoul) (Rs) () (de la Rosa) [(Quinta ) 2 index] ]
[ (1992) (Barcelona) (T) () (Burmester) dup ]
[ (1996) (Atlanta) (V) () (Vesuvio) [(Quinta do V) {-0.15 Kern} (esuvio)] ]
[ (2000) (Sydney) (C) () (Delaforce) dup ]
[ (2004) (Athens) (Cs) () (Cockburn Canais) (Cockburn Quinta dos Canais) ]
[ (2008) (Beijing) (Qv) () (Quevedo) [1 index ( Quinta Vale D) /quoteright {-0.12 Kern} (Agodinho)] ]
] def
/TitlesTastingNotes [ PortData {0 get} forall ] def
/Titles [ TitlesTastingNotes {2 2 getinterval} forall ] def
/Overtitles [ PortData {[exch dup 4 get exch 3 get dup length 0 gt {( ) exch} {pop} ifelse]} forall ] def
/Circlearrays [ PortData {[ exch dup 5 get exch dup 3 get dup length 0 eq {pop} {exch} ifelse 0 get ]} forall ] def
/FillTexts [ PortData {1 get} forall ] def
/Belowtitles [ Titles length {()} repeat ] def
/SubtitlesTastingNotes Overtitles def
/Names [ PeopleData {1 get} forall ] def
/PaperType /A3 def % /A4 /A3 /B4 /USL /USLegal /USL2 [SmallerPts LargerPts]
/Orientation /Landscape def % /Landscape /Portrait
/HeaderLeftText [(The P) {-0.04 Kern} (ortuguese Embassy, London, W) {-0.07 Kern} (ednesday 25) {SuperscriptOn} (th) {SuperscriptOff} ( July 2012)] def
/HeaderCenterText [(P) {-0.04 Kern} (ort from the Y) {-0.12 Kern} (ears of Summer Olympics)] def
/ExternalLinks [
(http://www.theportforum.com/viewtopic.php?t=4567&view=unread#unread) (Thread on ThePortForum.com)
(http://www.jdawiseman.com/2012/20120725_olympic.pdf) (Latest version this placemat)
] def
/PlaceNamesNumCopies 1 def
/PrePourNumCopies 2 def
/CorkDisplay true def
/CorkDisplayNumCopies 2 def
/TitlesFont /Baskerville-SemiBold def % /Optima-Bold
/OvertitlesFont /LiberateBold def % /LiberateNormal /LiberateBold /LiberateExtendedNormal /Harrington /LucyNormal
/GlassesOnSheets [
[ 0 1 Titles length 1 sub {} for ]
] def % /GlassesOnSheets
/GlassesOnTastingNotePages [
[8 12 0 4] {[ exch dup 3 add 1 exch {} for ]} forall
] def % For no tasting note pages at all use /GlassesOnTastingNotePages [] def
/GlassesClusteredOnVoteRecorders [
[ [2 3 0 1] {GlassesOnTastingNotePages exch get} forall ]
] def % triple-depth array, same length as VoteRecorderTopTexts and VoteRecorderShowTotalRow
/VoteRecorderTopTexts [ % Must be same length as GlassesClusteredOnVoteRecorders, each sub-array containing some number of TopTexts
[ (Wine Of The Night) (Q:) ]
] def % Must be same length as GlassesClusteredOnVoteRecorders
/VoteRecorderShowTotalRow [ GlassesClusteredOnVoteRecorders length {false} repeat ] def % Must be same length as GlassesClusteredOnVoteRecorders
/VoteRecorderOrientation /Landscape def
/GlassesClusteredOnCorkDisplay [ [ GlassesOnTastingNotePages aload pop 4 2 roll ] ] def
/PermittedPackingStyles [ [
0 1 7 {[ exch dup 2 mod ]} for
0 1 7 {[ exch dup 2 mod 2.2 add ]} for
] ] def
/FlightSeparations true def
/FlightSeparationLines
[
[
[
[/Left 8
{
/JDAW-Rs
GlassPositions SheetNum get 1 get aload pop
GlassPositions SheetNum get 8 get aload pop
3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt Radii SheetNum get div 2 div
def
JDAW-Rs neg
}
]
[1 8] [1 10] [3 10] [3 12] [5 12] [5 14] [7 14]
[/Right 7 {JDAW-Rs}]
]
] % SheetNum = 0
] def % /FlightSeparationLines
/ColourSchemeTitles /Black def % /MidGrey /Black
/ColourSchemeOvertitles /Black def % /MidGrey /Black
/FillTitles true def
/FillOvertitles false def
/FillTextPlacename {PeopleData NameNum get 0 get} def
/NamesFontSizeMin 15 def
/NamesFontSizeMax NamesFontSizeMin def
/VerticalMiddlingStringTitles (N) def % Benchmark characters
/FillTextPrintQuickerDistillSlower true def
Software version 22:00 Sunday 22nd July 2012.
The Olympic placemats were more complicated than is typical.
• Data is mostly in two arrays,
PeopleData and
PortData, and is decanted from there into the parameter arrays. For large tastings this can be easier, as it keeps together the relevant items of
Titles,
Overtitles,
FillTexts, etc.
• Some of the people have complicated names, containing code that tests
TypeOfPagesBeingRendered and chooses a suitably shortened version. The compound strings to be rendered themselves contain code, kerning, shrinking and superscripting.
• These data are decanted into the parameters with lines like ‟
/TitlesTastingNotes [ PortData {0 get} forall ] def” followed by ‟
/Titles [ TitlesTastingNotes {2 2 getinterval} forall ] def”.
• With the glasses pages being A3 and the tasting-note pages being A4,
GlassesOnSheets â‰
GlassesOnTastingNotePages. Also unusually,
GlassesClusteredOnVoteRecorders and
GlassesClusteredOnCorkDisplay were re-ordered versions of
GlassesOnTastingNotePages.
•
PermittedPackingStyles contains only one possibility, an array:
[ Â [0Â 0] [1Â 1] [2Â 0] [3Â 1] [4Â 0] [5Â 1] [6Â 0] [7Â 1] Â [0Â 2.2] [1Â 3.2] [2Â 2.2] [3Â 3.2] [4Â 2.2] [5Â 3.2] [6Â 2.2] [7Â 3.2] Â ]. (Usually
PermittedPackingStyles contains contains multiple named arrangements including
/RectangularDislocation,
/PseudoHexagonal, and
/SquareGrid.) But for the array possibility the code chooses the radius and
x and
y scaling factors, to fill the page less margins. The extra 0.2 in some of the array’s
y values slightly separates the top two rows from the bottom two: before and after dinner. But even without this, observe that the ordering of the glasses would be different to that in a
/PseudoHexagonal arrangement.
•
FlightSeparationLines is an array of depth four holding the definitions of lines that separate flights. For the first time at least my first time this contains code. The code calculates half the distance between the Ni52c and D80 centres, and, to give the appearance of neatness, ensures that the line starts on the left the same distance below the D80. So the line starts at [/Left 8 -1.13324], which is on the left margin, at a height equal to the
y-centre of circle 8 (as ‟8” is an integer), adjusted by the real × radius. (So ‟8” and ‟8.0” would do different things.) This real is stored in JDAW-Rs, so that it could also be used relative to the TV76 circle on the right.
• Finally
FillTextPrintQuickerDistillSlower. With this
false, distillation took 34 seconds. With it
true, removing copies of FillTexts that were entirely
clipped away, it took 1302 seconds, more than 38 × slower. The file size fell from 2,135,094 to 1,482,771 bytes, so a change of about -30%. (Indeed, the placenames weren’t used, and without them distillation would have taken only 199 seconds. Also removing the unused pre-pour sheets would have further reduced the time to only 48 seconds.)
Edit in January 2013: recently added to the code is the function
HalfDistanceBetweenCentresProportionRadius, which simplifies part of the above to
Code: Select all
/FlightSeparationLines
[
[
[
[/Left 8 {1 8 HalfDistanceBetweenCentresProportionRadius neg}]
[1 8] [1 10] [3 10] [3 12] [5 12] [5 14] [7 14]
[/Right 7 {7 14 HalfDistanceBetweenCentresProportionRadius}]
]
] % SheetNum = 0
] def % /FlightSeparationLines
Edit in autumn 2013: the handling of name variations has been made easier by the new parameters
NamesVoteRecorder and its variants.
PermittedPackingStyles has also been re-parameterised since summer ’12.