Ask Your Question
0

sagetex young_diagram size

asked 2019-11-29 14:27:30 +0100

heluani gravatar image

updated 2019-11-29 14:30:17 +0100

Hello, I am printing a list of young diagramas in sagetex with something like

\sage{[p for p in Partitions(28) if p.is_symmetric()]}
How can I change the size of the cells so that they can actually fit in paper?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-29 15:10:17 +0100

Emmanuel Charpentier gravatar image

updated 2019-11-30 11:41:22 +0100

The graphical representation is intrinsically large.

Would you consider settling for a textual representation such as:

sage: [str(u) for u in [p for p in Partitions(28) if p.is_symmetric()]]
['[14, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]',
 '[13, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]',
 '[12, 4, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1]',
 '[11, 5, 2, 2, 2, 1, 1, 1, 1, 1, 1]',
 '[10, 6, 2, 2, 2, 2, 1, 1, 1, 1]',
 '[10, 4, 4, 4, 1, 1, 1, 1, 1, 1]',
 '[9, 7, 2, 2, 2, 2, 2, 1, 1]',
 '[9, 5, 4, 4, 2, 1, 1, 1, 1]',
 '[8, 8, 2, 2, 2, 2, 2, 2]',
 '[8, 6, 4, 4, 2, 2, 1, 1]',
 '[8, 5, 5, 4, 3, 1, 1, 1]',
 '[7, 7, 4, 4, 2, 2, 2]',
 '[7, 6, 5, 4, 3, 2, 1]',
 '[7, 5, 5, 5, 4, 1, 1]',
 '[6, 6, 6, 4, 3, 3]',
 '[6, 6, 5, 5, 4, 2]']

EDIT : Since you insist on graphics, you may try to use Latex's \scalebox, but the resulting graph will be sum([max(p) for p in Partitions(28) if p.is_symmetric()])=145 cells wide (or sum([len(p) for p in Partitions(28) if p.is_symmetric()])=145 if Sage decides to put the column-wise). In either case, I doubt that the resut can be scaled on an A4 (or letter) paper sheet and remain legible...

The "obvious" solution of printing the the LaTeX representation of each partition separated by Latex's \par won't work either: the implementation of \sagestr needs a single-paragraph LaTeX string.

The only recourses are

  • print your 16 partitions one by one by repeating \sagestr insertins in your LaTeX source (ugly); or

  • computing atabular environmentof suitable dimensions whose each element is aminipage` environment containing the (possibly suitably scaled) LaTeX representation of one partition.

This is, for now, cowardly left to the reader "as an exercise"... Note that this is mostly an exercise in Latex programming.

One can note that org-mode, being less fussy than Sagetex aout what it accepts, will accept multi-paragraph LaTeX outputs from Sage. OTOH, it will be more fussy than Sagetex at labelling the thing... I have to check what Pythontex would accept...

edit flag offensive delete link more

Comments

Thanks, but I need to paint in the young diagram. I can achieve what I want by getting firs the partitions from sage and sending them to something like {\tiny\yng(7,...)}

heluani gravatar imageheluani ( 2019-11-29 15:49:36 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-11-29 14:27:30 +0100

Seen: 268 times

Last updated: Nov 30 '19