Skip to content

[FEATURE] Generate LaTeX tables from "Browse" tables #26

@kiryph

Description

@kiryph

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:

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 $n$ (here 3) of the size of the point group of the plane group:

$|X_{\mathcal{H} < \mathcal{G}}^n| = |\{ \mathcal{H} | \mathcal{H} < \mathcal{G} \wedge |\mathcal{G}:\mathcal{H}| \leq n \cdot |\mathcal{P}_\mathcal{G}| \}|$

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| \\}$"]));

Screenshot 2023-11-15 at 09 32 54

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, ...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions