-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Is your feature request related to a problem? Please describe.
It would be convenient to be able to create a LaTeX version of simple generic tables which the GAP package browse can display:
- https://docs.gap-system.org/pkg/browse/doc/chap6.html#X7F6EE19480D10E2B
- https://docs.gap-system.org/pkg/browse/doc/chap4.html#X82689212794DA877
An example can be a simple list of the calculated number of subgroups up to a certain index (LowIndexSubgroups). Let's consider the 17 wallpaper groups (crystallographic groups for dimension 2) which packages Cryst and CrystCat can handle.
gap> LoadPackage("CrystCat");
You can calculate the number of LowIndexSubgroups for each of the 17 wallpaper groups as following:
gap> List([1..17], no -> Length(LowIndexSubgroups(FpGroupSpaceGroupBBNWZ(SpaceGroupBBNWZ(2, no)), 3 * Size(PointGroup(SpaceGroupBBNWZ(2, no))))));
with the subgroup index set by a multiple
It takes a short while (21 seconds on my machine), so I simply add the final data:
gap> nr_subgroups := [ 8, 65, 42, 20, 22, 343, 128, 71, 157, 51, 279, 113, 14, 41, 33, 43, 176 ];
You can use the Hermann Mauguin Symbols to denote each of the seventeen groups in the table:
gap> CrystGroupsCatalogue[2].HermannMauguinSymbol;
[ "p1", "p2", "pm", "pg", "cm", "p2mm", "p2mg", "p2gg", "c2mm", "p4", "p4mm", "p4gm", "p3", "p3m1", "p31m", "p6",
"p6mm" ]
You can show the results in a nicely formatted and labelled table in GAP with the package "browse":
gap> NCurses.BrowseDenseList(TransposedMat([nr_subgroups]), rec(labelsCol:=[["X_{\\cH < \\cG}^n"]], labelsRow:=TransposedMat([CrystGroupsCatalogue[2].HermannMauguinSymbol]), header := ["Number of Low Index Subgroups of Plane Groups", "\n"], footer := ["\n","$X_{\\cH < \\cG}^n = \\{\\cH | \\cH < \\cG \\wedge |\\cG:\\cH| \\leq n \\cdot |\\cP_\\cG| \\}$"]));
Describe the solution you'd like
It would be great if one could call Typeset instead of NCurses.BrowseDenseList to get conveniently a LaTeX table of the result for direct insertion into a LaTeX document.
Additional context
As a first step, adding support for NCurses.BrowseDenseList( list, arec ) with arec having following optional components:
- header
- footer
- convertEntry
- labelsRow
- labelsCol
would already be helpful.
I am aware that certain assumptions have to be made how the table will be formatted (e.g. if the LaTeX package booktabs should be used, ...).
