[GAP Forum] Is it possible to convert a GAP character table into a table with LaTeX format?
Russ Woodroofe
rsw9 at cornell.edu
Sat Sep 8 09:56:51 BST 2018
Dear Bernhard,
I'll give an alternative take. Writing code to export what you want is pretty easy -- you just need to iterate through the rows and columns of the character table.
I've attached code that takes a matrix and converts it to html (and outputs it in Gap.app -- see cocoagap.sourceforge.io ). I think you can easily do something similar by iterating through Irr(CharacterTable(G)).
Best,
--Russ
# code to pretty-print a matrix using html tables
HTMLPrintMatrix:=function(mat)
local htmlstr, m, n, i, j;
if not IsMatrix(mat) then
return fail;
fi;
htmlstr:="<style>table.mf { margin-left: 1em; border-left: .1em solid black; border-right: .1em solid black;} .mf td { padding: 0 .5em; text-align: right; } </style>";
Append(htmlstr, "<table class='mf'>");
m:=DimensionsMat(mat)[1];
n:=DimensionsMat(mat)[2];
for i in [1..m] do
Append(htmlstr, "<tr>");
for j in [1..n] do
Append(htmlstr, "<td>");
Append(htmlstr, String(mat[i][j]));
Append(htmlstr, "</td>");
od;
Append(htmlstr, "</tr>");
od;
Append(htmlstr, "</table>");
WcHtmlOut(htmlstr);
return htmlstr;
end;
> On 7 Sep 2018, at 15:50, Bernhard Boehmler <bernhard.boehmler at googlemail.com> wrote:
>
> Dear Dima, dear Thomas, dear GAP Forum,
>
> thank you very much for your answers. They do help me a lot.
>
> Kind regards,
> Bernhard
>
>
>
>
> On Fri, Sep 7, 2018 at 1:16 PM Thomas Breuer <sam at math.rwth-aachen.de>
> wrote:
>
>> Dear GAP Forum,
>>
>> concerning the question about showing character tables
>> in LaTeX documents in a nice way,
>> it is not clear to me what nice means,
>> but my suggestion would be to take what `Display' or `Browse'
>> for the character table in question shows,
>> and to put this into LaTeX's verbatim environment.
>> This is suitable also for tables which have to be split
>> into several pages.
>>
>> All the best,
>> Thomas
>>
>>
>> On Thu, Sep 06, 2018 at 05:01:43PM +0200, Bernhard Boehmler wrote:
>>> Dear GAP forum,
>>>
>>> I'd like to ask the following question.
>>>
>>> Is there an automatized way to get a LaTeX - document or LaTeX - string
>>> which display a character table computed with GAP nicely, for example as
>>> array or as table?
>>>
>>> Thanks for the help in advance.
>>>
>>> Yours, sincerely
>>> Bernhard Boehmler
>>
>>
> _______________________________________________
> Forum mailing list
> Forum at gap-system.org
> https://mail.gap-system.org/mailman/listinfo/forum
More information about the Forum
mailing list