Software that makes placemats

Organise events to meet up and drink Port.
User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 07:55 Sun 24 Mar 2013

In setting up the recent Taylor vertical, AHB was pouring and DRT and I were distributing. Naturally enough, the young vintages were pre-poured first, and soon enough the front rows were filled with glasses. Then the older glasses had to be lifted awkwardly behind the already-full first row. It was fiddly.

This problem could be solved by reversing the order of rows of on the sheet. AHB remarked that having the older vintages nearer would help his smelling of them.

There is already a parameter, very rarely changed, PackingDirectionVertical, which can take values /TopToBottom or /BottomToTop. So the change isn’t tricky.

However, doing this by default would rather conflict with my sense of natural order. Vintage lists start old, and have the new at the end, allowing the list to be extended with the passage of time. My sense of old-to-new / top-to-bottom natural order is quite strong is that just me?

User avatar
DRT
Fonseca 1966
Posts: 15477
Joined: 23:51 Wed 20 Jun 2007
Location: Chesterfield, UK
Contact:

Re: Software that makes placemats

Post by DRT » 08:21 Sun 24 Mar 2013

I had a similar thought while distributing the wines but either way the taster has to remove and replace glasses in the back row throughout the evening. For some inexplicable reason, this manoeuvre gets trickier as time goes by.

Perhaps a third parameter /TopLeftToBottomRight could be used so that the wines end up in columns of four working from left to right.
"The first duty of Port is to be red"
Ernest H. Cockburn

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 12:02 Sun 24 Mar 2013

There are currently two relevant settings.
PackingDirectionVertical, which can be /TopToBottom or /BottomToTop;
PackingDirectionHorizontal, which can be /LeftToRight or /LeftToRight.

DRT seems to be asking for another setting, PackingNestingOrder, with allowed values of /RowsThenColumns (current behaviour) and /ColumnsThenRows.

Let’s have some examples in mind.
Image Image Image Image
(These shown with glasses in current default order.)

For the first two examples, with an easy rectangular layout, any of the eight possibilities from these 2+1 parameters would make sense. So far, so good.

The third example can also cope with any of the eight parameter arrangements. But for the fourth, is the top-most glass (‘A0’) in a column of its own? Yes, I guess so. So that could work.

But what should be the default behaviour? Should it really be this:
/PackingNestingOrder /ColumnsThenRows def
/PackingDirectionVertical /BottomToTop def
/PackingDirectionHorizontal /LeftToRight def

Image
This order seems weird to me. Just me?

User avatar
DRT
Fonseca 1966
Posts: 15477
Joined: 23:51 Wed 20 Jun 2007
Location: Chesterfield, UK
Contact:

Re: Software that makes placemats

Post by DRT » 13:23 Sun 24 Mar 2013

The current default behaviour is perfect for smallish tastings so should remain the default. But the ability to produce the format that you find odd is useful for tastings where the tasting mats become elongated, such as was the case at the Taylor tasting on Friday.
"The first duty of Port is to be red"
Ernest H. Cockburn

PhilW
Dow 1980
Posts: 2872
Joined: 14:22 Wed 15 Dec 2010
Location: Near Cambridge, UK

Re: Software that makes placemats

Post by PhilW » 17:59 Sun 24 Mar 2013

DRT wrote:The current default behaviour is perfect for smallish tastings so should remain the default. But the ability to produce the format that you find odd is useful for tastings where the tasting mats become elongated, such as was the case at the Taylor tasting on Friday.
Agreed with preference for current behaviour as default; so if adding this extension, then defaults of:
/PackingNestingOrder /RowsThenColumns def
/PackingDirectionVertical /TopToBottom def
/PackingDirectionHorizontal /LeftToRight def

(though noting AHB's preference for BottomToTop).

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 20:37 Sun 24 Mar 2013

DRT, PhilW: assuming settings of /ColumnsThenRows, /TopToBottom, and /LeftToRight, in which order would the following two layouts be? (Your answer should be of the form ‟A0, D3, !”, though not necessarily starting with those two.)
Image Image

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 22:12 Sun 24 Mar 2013

I’m hoping the answers are:
• G6, A0, D3, H7, B1, E4, I8, C2, F5, J9;
• D3, H7, A0, E4, I8, B1, F5, J9, C2, G6, K10.

PhilW
Dow 1980
Posts: 2872
Joined: 14:22 Wed 15 Dec 2010
Location: Near Cambridge, UK

Re: Software that makes placemats

Post by PhilW » 22:56 Sun 24 Mar 2013

jdaw1 wrote:I’m hoping the answers are:
• G6, A0, D3, H7, B1, E4, I8, C2, F5, J9;
• D3, H7, A0, E4, I8, B1, F5, J9, C2, G6, K10.
I'd agree with both answers.

Glenn E.
Quinta do Vesuvio 1994
Posts: 3401
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. » 23:20 Mon 25 Mar 2013

PhilW wrote:
jdaw1 wrote:I’m hoping the answers are:
• G6, A0, D3, H7, B1, E4, I8, C2, F5, J9;
• D3, H7, A0, E4, I8, B1, F5, J9, C2, G6, K10.
I'd agree with both answers.
+1

I'm also pleased to now know of the existence of /PackingDirectionVertical and /PackingDirectionHorizontal. This will save me from having to manually arrange the Ports in the various lists so that they come out with the oldest front left and the youngest back right! If I understand correctly, that would only require that I change /PackingDirectionVertical to /BottomToTop?

See, there really is a point to keeping up with this thread. :wink:
Glenn Elliott

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 00:42 Tue 26 Mar 2013

Glenn E. wrote:I'm also pleased to now know of the existence of /PackingDirectionVertical and /PackingDirectionHorizontal.
Happiness. But PackingNestingOrder is, currently, only a planned parameter. It does not yet exist.

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 23:28 Sat 06 Apr 2013

Added RotationTitlesAboveBelowOverCirclearray, use of which can be seen in the placemats for Griff’s departure down under.

Glenn E.
Quinta do Vesuvio 1994
Posts: 3401
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. » 04:32 Fri 19 Apr 2013

Bug: /GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9.

I was able to work around the problem by changing the default behavior to 10, which was the number of glasses that I wished to place on each sheet.
Glenn Elliott

Glenn E.
Quinta do Vesuvio 1994
Posts: 3401
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. » 04:45 Fri 19 Apr 2013

While I'm doing QA, I just downloaded a fresh copy of the software from http://www.jdawiseman.com/placemat and it still contains the following comment:

% GlassesOnSheetsMaxPerSheet: 6 default, USLegal => 9; A3 or USL2 => 13. For all on one sheet replace with "/GlassesOnSheetsMaxGlassesPerSheetInDefault 999 def".

/GlassesOnSheetsMaxGlassesPerSheetInDefault is not used anywhere else in the software, so setting it to 999 will have no effect.
Glenn Elliott

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 08:33 Fri 19 Apr 2013

GlassesOnSheetsMaxGlassesPerSheetInDefault is used in the next line of the parameters.

Edit: I renamed parameter, but not in comment. Sorry. It should be GlassesOnSheetsMaxPerSheet. Fixed in new version of code.

Glenn E.
Quinta do Vesuvio 1994
Posts: 3401
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. » 19:25 Fri 19 Apr 2013

Glenn E. wrote:Bug: /GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9.

I was able to work around the problem by changing the default behavior to 10, which was the number of glasses that I wished to place on each sheet.
I spoke too soon.

Caveat: I am working on Windows 8 and am unfamiliar with the applications that come pre-installed on a Windows 8 box. It is entirely possible, if not probable, that my difficulties are derived from this and not from the code. However...

My work around above did indeed put 10 glasses on each sheet, but the sheets were USL and not USLegal. When printed they left a good chunk of white space (3") on the tail end of the sheet. The arrangement of glasses should have tipped me off, as the software created a hex-ish pattern 2-3-2-3 when I was expecting the more normal slightly staggered straight rows of 3-4-3.
Glenn Elliott

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 20:23 Fri 19 Apr 2013

Please post a link to a PDF and state clearly what you believe to be the bug.

Glenn E.
Quinta do Vesuvio 1994
Posts: 3401
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. » 00:14 Sat 20 Apr 2013

Neither pdf nor ps are allowed as uploads. I've spent too much time on this today... we'll do without placemats this time and I'll try to figure out what happened later.
Glenn Elliott

Glenn E.
Quinta do Vesuvio 1994
Posts: 3401
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. » 00:48 Sat 20 Apr 2013

Success. The problem appears to have been with Windows 8's "Reader" app. It looks like it recognizes US Legal size paper, but in reality it appears that it does not because USLegal files sent to a printer are instead re-sized to fit on USL but then printed on USLegal anyway. I was able to print successfully once I forced Windows 8 to use Word to open the pdf, converted the pdf to Word format (at the risk of losing fidelity), then converted it again to editable format because it wouldn't let me print otherwise.

*sigh*

This bug remains:

/GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9. It does have the desired effect when /PaperType /USL def or /PaperType /USL2 def.
Glenn Elliott

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 08:33 Sat 20 Apr 2013

The ante-penultimate bullet of the green box describes a bug with Konica Minolta printers. Please could you write a concise description of problem and solution for me to add int he same place?
Glenn E. wrote:/GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9. It does have the desired effect when /PaperType /USL def or /PaperType /USL2 def.
I suspect that you are doing /GlassesOnSheetsMaxPerSheet 999 def, without having deleted the usual definition of GlassesOnSheetsMaxPerSheet, which is therefore redefined to its default value. If not that, please email me your code.

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 20:09 Sat 20 Apr 2013

[url=http://www.theportforum.com/viewtopic.php?p=56530#p56530]Here[/url] jdaw1 wrote:New draft of the placemats.
  • Completely redone, hopefully in accordance with instructions received from DRT.
Image
[url=http://www.theportforum.com/viewtopic.php?p=56544#p56544]Three posts later[/url] DRT wrote:Could you please change the order of the subtitles to correspond with the above and set the parameters so that they appear as:

1 4 7 10 13
2 5 8 11 14
3 6 9 12 13
After which,
[url=http://www.theportforum.com/viewtopic.php?p=56546#p56546]Here[/url] jdaw1 wrote:Updated draft of the placemats.
  • Slightly redone, hopefully in accordance with instructions received from DRT.
Image
In light of all of which, recall that
Twenty-seven days ago, [url=http://www.theportforum.com/viewtopic.php?p=55783#p55783]here[/url], jdaw1 wrote:DRT seems to be asking for another setting, PackingNestingOrder, with allowed values of /RowsThenColumns (current behaviour) and /ColumnsThenRows.
Action is needed.

Glenn E.
Quinta do Vesuvio 1994
Posts: 3401
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. » 17:31 Wed 24 Apr 2013

jdaw1 wrote:
Glenn E. wrote:/GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9. It does have the desired effect when /PaperType /USL def or /PaperType /USL2 def.
I suspect that you are doing /GlassesOnSheetsMaxPerSheet 999 def, without having deleted the usual definition of GlassesOnSheetsMaxPerSheet, which is therefore redefined to its default value. If not that, please email me your code.
Relevant code as used. This is the version that "worked" because I changed the USLegal default to 10, but I'm confused that it worked because I also attempted to comment out that section of the /GlassesOnSheetsMaxPerSheet definition. Note inserted 'def %'. Despite that insertion, the change from /USLegal eq {pop 9} to /USLegal eq {pop 10} had an effect.

I think. To be honest, after struggling to get the placemats created for a couple of hours (off and on while also working), I can't be 100% certain of which steps I tried in which order. I thought it would be a simple change due to a simple mistake every time I made a change, so didn't keep track as I made them. I also reverted to a clean copy of the software on more than one occasion to ensure that I hadn't accidentally totally mucked things up at some point.

% % % % % % % % % % % % % % % % % % % % % % %
% Page Organisation and Page-Level Features %
% % % % % % % % % % % % % % % % % % % % % % %

% GlassesOnSheetsMaxPerSheet: 6 default, USLegal => 9; A3 or USL2 => 13. For all on one sheet replace with "/GlassesOnSheetsMaxGlassesPerSheetInDefault 999 def".
/GlassesOnSheetsMaxPerSheet 999 def % /PaperType load dup /A3 eq exch /USL2 eq or {pop 13} if /PaperType load /USLegal eq {pop 10} if def
/GlassesOnSheets [
% For a custom arrangement replace the next line with something of the form "[0 1 2 3] [4 5 6 7 8 9] [10 11 12 13]"
% The code below spreads glasses evenly over the sheets, the one-larger sheets being last. For them to be early replace "floor" with "ceiling"; for them to be evenly distributed with "round".
<< /p Titles length GlassesOnSheetsMaxPerSheet div ceiling cvi /g 0 >> begin 0 1 p 1 sub {[exch p sub g Titles length sub exch div floor cvi {g /g g 1 add def} repeat]} for end
] def % /GlassesOnSheets

/GlassesOnSheetsMaxPerTNSheet GlassesOnSheetsMaxPerSheet dup 8 gt {pop 6} if def % 8 gives per page leaves just enough writing space.
/GlassesOnTastingNotePages [ % Consider "/GlassesOnTastingNotePages GlassesOnSheets def"
<< /p Titles length GlassesOnSheetsMaxPerTNSheet div ceiling cvi /g 0 >> begin 0 1 p 1 sub {[exch p sub g Titles length sub exch div floor cvi {g /g g 1 add def} repeat]} for end
] def % /GlassesOnTastingNotePages
Glenn Elliott

User avatar
oscar quevedo
Fonseca LBV
Posts: 114
Joined: 19:48 Wed 08 Jul 2009
Location: Douro
Contact:

Re: Software that makes placemats

Post by oscar quevedo » 13:23 Thu 25 Apr 2013

Thank you Julian, I've made my first placemts! It is possible :D

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 15:29 Thu 25 Apr 2013

oscar quevedo wrote:Thank you Julian, I've made my first placemts! It is possible :D
And thank you for also mentioning it in a tweet.

Glenn E.
Quinta do Vesuvio 1994
Posts: 3401
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. » 16:57 Thu 25 Apr 2013

oscar quevedo wrote:Thank you Julian, I've made my first placemts! It is possible :D
Don't let my struggles this time around mislead you. I use Julian's software for most of the tastings I do and it's great!
Glenn Elliott

User avatar
jdaw1
Cockburn 1900
Posts: 21513
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 » 17:08 Thu 25 Apr 2013

Glenn E. wrote:Bug: /GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9.
Works for me, as I have replaced the default definition with that in your subsequent post.
jdaw1 wrote:I suspect that you are doing /GlassesOnSheetsMaxPerSheet 999 def, without having deleted the usual definition of GlassesOnSheetsMaxPerSheet, which is therefore redefined to its default value. If not that, please email me your code.
Still seems likely to me.

Please email your whole PS.

Post Reply