JacobH wrote:might you give some thought to the ordering of the code at the start of the file?
I have, but more is definitely needed.
JacobH wrote:When I make a placemat, I tend to go through the following processes: enter the titles, names and other text; choose a typeface; make decisions as to the decoration; and, finally, worry about which extra sheets are needed. It would therefore be helpful if the parameters were declared in that order.
Our processes differ.
I start with the
Circlearrays, because my
Titles and
Subtitles are often derived from
Circlearrays. But I don’t want to have the default parameters start with
Circlearrays, as that would make the manual slightly more confusing.
JacobH wrote:II might therefore might be tempted to:
- Declare paper / orientation first (I only expect this because it tends to be traditional to do so in similar languages)
- Move /HeaderRightText to the same area as where /HeaderLeftText is declared.
But for many, perhaps most, users the
PaperType doesn’t need changing. I’m willing to concede
HeaderRightText, even though it typically doesn’t need changing.
JacobH wrote:- Put /ThePortForumIcon[...] declarations just under that (and add a comment listing the alternatives to /None and /LowerNonWaterCount
I don’t think that I have ever used an alternative to
/None/
/LowerNonWaterCount: have you? Often?
JacobH wrote:Then have the font declarations
Happy to move them up. How can the list of example fonts be improved, and ideally made more compact? Restrict to a few widely-available examples? But that would be less helpful to me and I am a user as well as the programmer. Please advise.
JacobH wrote:- Then the decoration declarations
- Then the other declarations (e.g. /GlassesOnSheets, /GlassesOnTastingNotePages, /PageOrderingNonDecanterLabelGlasses, /PageOrderingTastingNotePages, /NameHandedness, Water Counts, Extra Pages &c.) which are changed quite frequently but not all the time.
There are competing influences in the ordering of parameters. Important influences include: basics early; frequently-changed early; conceptually related things together; not muddling the manual.
For me,
GlassesOnSheets is tightly related to the
Titles, so I want it near. If that isn’t so for you, perhaps things can move.
JacobH wrote:I might also be tempted to split the decoration declarations between the basic boolean (e.g. /Rays /FillTitles) which could go higher up the file and the more advanced options (e.g. /FillTextAngle, /RaysLinesPerGlass).
I have split the decorative options into often changed, and rarely changed. Do you want a three-way split, or a two-way split into boolean and all others?
JacobH wrote:Could the /NamesHandedness function default to the Right and have a simple command like /LeftHandedTasters [(ABC) (DEF)] def for those who are left-handed?
Please allow me to re-interpret this. You want
NamesHandedness replaced with a new parameter
LeftHanders. I had considered this. But what if two tasters with the same name are of different handedness? Impossible, you might think. No. Consider
/Names [ () () ] def, with
/NamesHandedness [ /Right /Left ] def thus becoming plausible.
In the light of this reasoning, what do you think best?
Edit: scrap this reasoning. If each item of LeftHanders sets the handedness of only one item of Names, then duplicates are handled nicely. Your parameterisation will be used.
Edit edit: such a good idea that it has been done: LeftHanders is an array of known lefties. If some elements of Names are duplicated, the user might or might not wish to duplicate elements of LeftHanders.
JacobH wrote:I would also treat /OverlapSubtitlesOnTitles as a decorative question and put it with those declarations.
Good idea. But, given my post three above, and AHB’s favourable reply two above, perhaps too late.
JacobH wrote:A few of the parameters have quite complex defaults. For example,
/VoteRecorderNumCopies Titles length 2 le {0} {{GlassesOnTastingNotePages length dup 2 gt {pop 2} if}} ifelse def
/SideBySideGlassesTastingNotes {Titles length 3 le {GlassesOnSheets length 0 gt GlassesOnTastingNotePages length 0 gt and} {false} ifelse} def
Might there be a way of simplifying them since I am not sure how to modify them and what the result will be?
Over time complicated defaults have become split into multiple parameters that separately handle the various cases. E.g.,
TitleMaxHeightIfSubtitleBelowProportionDecanterLabelSmaller, and
PermittedPackingStyles gained the possibility
/IrregularLandscape. Likewise, perhaps
VoteRecorderNumCopies needs to be split into cases. Or perhaps I have the wrong default behaviour. Please consider further and advise.
JacobH wrote:If they are not intended to be modified, perhaps they could be put somewhere else in the file.
Fair, but, again, is there an advantage in having them with related conceptually-similar parameters.
JacobH wrote:I also think that the 8 lines from 131, starting /TitlesTastingNotes Titles def are probably quite unlikely to be changed so could go down the file.
Some of these new parameters, most especially
TitlesTastingNotes, have already been used by me.
JacobH wrote:In terms of the subtitles, I would be in favour of having the three parameters for the above, on and below options (though called, surely, /Subtitles, /Supertitles and /Surtitles?).
Splendid names. Just splendid.
JacobH wrote:Though wonder if it could be defaulted to "/Subtitle, /Supertitle, /Surtitles" so by default you get all three separated by commas? (The code would, of course, have to be a touch more complex to deal with situations where only one or two exist and so fewer commas are required).
And then code is brought back into some parameters. Hmmm.
Consider a vertical.
/TitlesTastingNotes [ (1955) (1963) (1966) (1970) (1977) (1985) (1991) (1994) (1997) (2000) (2003) (2007) (2009) ] def
/Titles [ TitlesTastingNotes {2 2 getinterval} forall ] def
Assume that all of these are from the same
Shipper, to which every element of
Supertitles is set. But then do we really require
Shipper on every TN subtitle? I think that we would want the TN subtitles to be the distinguishing elements of
Surtitles/
Subtitles/
Supertitles, rather than all three of them.