Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BottleWrap: new page type #161

Closed
jdaw1 opened this issue May 4, 2022 · 1 comment
Closed

BottleWrap: new page type #161

jdaw1 opened this issue May 4, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jdaw1
Copy link
Owner

jdaw1 commented May 4, 2022

BottleWrap

Purpose and motivation

At a recent tasting, one person brought a bottle wrapped in a printed page.

20220426_NAC_Blind_Bottle_Cover

Did the job well, except that it didn’t match the placemats.

¿Should there be a new page type (the first new page type since Accounts in Jan 2016), perhaps called BottleWrap?

Methodology

Likely parameters might be as follows.

/BottleWrapNumCopies 0 def  % Might be 1, might be {WithinTitles 1 eq {1} {0} ifelse}

/BottleWrapNumRows 4 def
/BottleWrapPaperType
	<< /TNSheetNum 0 >> begin TastingNotesPaperType end
	/A4 eq {/A3} {/Tabloid} ifelse
def  % /BottleWrapPaperType
/BottleWrapOrientation /Landscape def

Let’s call ‘TABO’ the contents centre of the circle, with its Title, Abovetitle, Belowtitle, Overtitle. Compute its bounding box.

Assuming BottleWrapNumRows = 4, there will four of these per column, so five copies of the Circlearrays. Allowing for a small gap between, that implies a maximum vertical height of this page’s TABO, and hence a scaling factor. Scale copies of the TABO thus, packing ’em in tightly from the left, so typically there will be a partial copy on the right, clipped to page margins. The external decorations of the TABO (ShapesInTitles, CrossHatching, Outlines, Spirals, and maybe Droplets) are to be shown but not used for bounding-box calculations.

Circlearrays separate the TABO copies, slightly differently to the way they work on the CorkDisplay pages. Horizontal lines of Circlearrays run from the left to the right, also being clipped on the right. Different rows will start at different item numbers, for variety of placement. Vertical lines of Circlearrays run between the horizontal lines, perhaps with some variety of starting item, rotated such that they can be read by somebody at the reader’s right of the page.

Note to self

% First row of Circlearrays item starts at item 0. Subsequent rows with constant step size, rotating
% modulo length. Step size is BottleWrapCirclearrayStepSize Circlearrays WithinTitles get length get
% with, of course, a pointless overflow check. Pointless because, IIRC, max item length seen = 5.
/BottleWrapCirclearrayStepSize [ 
	 1  1  1  1  1   2  1  2  3  2   %  0 to  9
	 3  3  5  5  3   4  7  7  5  8   % 10 to 19
	 9  8  9  9  7   7 11 10 11 11   % 20 to 29
	11 12  9 14 13  13 13 14 11 16   % 30 to 39
] def  % /BottleWrapCirclearrayStepSize
@jdaw1 jdaw1 self-assigned this May 4, 2022
@jdaw1 jdaw1 added the enhancement New feature or request label May 4, 2022
jdaw1 added a commit that referenced this issue May 8, 2022
New page type, BottleWrap, as heralded in issue #161. Closes issue #161.
@jdaw1 jdaw1 closed this as completed May 8, 2022
@jdaw1
Copy link
Owner Author

jdaw1 commented May 18, 2022

At the tasting on Tuesday 17th May 2022 there was some discussion (Mike M., Neil C., and me) about whether the BottleWrap pages should be in a separate PDF, or with the other page types. We concluded that people at home, trying to print their one page of BottleWrap, wouldn’t be willing to seek it within a large document. So the BottleWrap pages should be a separate PDF.

Hence the default behaviour is that if BottleWrapNumCopies is anything other than 0 then BottleWrapSuppressOtherPageTypes becomes true. As this might be unexpected (“Why have all the other pages disappeared‽”) a comment has been added:

/BottleWrapNumCopies 0 def  % Interacts with BottleWrapSuppressOtherPageTypes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant