Open kiryph opened 12 months ago
@kiryph thanks for the suggestion. I'm not too familiar with Browse
, would this feature be more of adding a method overload to handle any arguments that satisfy BrowseData.IsBrowseTable
?
Or were you thinking of a more generic table-creating method that takes in a value table, with optional arguments for columns/rows and headers/footers etc.?
@ZachNewbery Thanks for getting back to me:
[...] would this feature be more of adding a method overload to handle any arguments that satisfy BrowseData.IsBrowseTable? Or were you thinking of a more generic table-creating method that takes in a value table, with optional arguments for columns/rows and headers/footers etc.?
I would imagine the second one. Since I am not very familiar with Browse
myself, but afaik it targets interactive browsing tables with paging, searching, sorting etc.
I was referring to Browse
since it already defines/establishes how a table might be stored in GAP with labels for rows, columns and title. One could use this to export to LaTeX as well.
Other math software with export functionality to LaTeX tables for comparison:
Ah that makes sense, thanks for clarifying. Do you think this would be restricted to rectangular tables, or are there cases where one may have uneven columns/rows?
Note to self when I find time to do this: here describes a filter that can be used to determine if we have homogenous lists. I imagine I will need an option like treatMatrixAsTable
or treatListAsTable
to allow fall-through to a more generic isTable
overload of Typeset
. Additionally, the specification of headers could be added either as options - unless it can be specified as an optional argument.
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 packagesCryst
andCrystCat
can handle.You can calculate the number of
LowIndexSubgroups
for each of the 17 wallpaper groups as following: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:
You can use the Hermann Mauguin Symbols to denote each of the seventeen groups in the table:
You can show the results in a nicely formatted and labelled table in GAP with the package "browse":
Describe the solution you'd like It would be great if one could call
Typeset
instead ofNCurses.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 )
witharec
having following optional components: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, ...).