[GAP Forum] Is it possible to convert a GAP character table into a table with LaTeX format?

Chris Wensley c.d.wensley at bangor.ac.uk
Sat Sep 8 13:00:14 BST 2018


Dear Russ

This is just the sort of operation which would fit well in the Utils package, in the section on printing.  Would you be agreeable to this?

Best wishes, Chris Wensley
________________________________
From: Russ Woodroofe <rsw9 at cornell.edu>
Sent: 08 September 2018 09:56:51
To: Bernhard Boehmler; forum at gap-system.org
Subject: Re: [GAP Forum] Is it possible to convert a GAP character table into a table with LaTeX format?



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


_______________________________________________
Forum mailing list
Forum at gap-system.org
https://mail.gap-system.org/mailman/listinfo/forum



Mae croeso i chi gysylltu gyda'r Brifysgol yn Gymraeg neu Saesneg

You are welcome to contact the University in Welsh or English

Rhif Elusen Gofrestredig 1141565 - Registered Charity No. 1141565

Gall y neges e-bost hon, ac unrhyw atodiadau a anfonwyd gyda hi, gynnwys deunydd cyfrinachol ac wedi eu bwriadu i'w defnyddio'n unig gan y sawl y cawsant eu cyfeirio ato (atynt). Os ydych wedi derbyn y neges e-bost hon trwy gamgymeriad, rhowch wybod i'r anfonwr ar unwaith a dilewch y neges. Os na fwriadwyd anfon y neges atoch chi, rhaid i chi beidio a defnyddio, cadw neu ddatgelu unrhyw wybodaeth a gynhwysir ynddi. Mae unrhyw farn neu safbwynt yn eiddo i'r sawl a'i hanfonodd yn unig ac nid yw o anghenraid yn cynrychioli barn Prifysgol Bangor. Nid yw Prifysgol Bangor yn gwarantu bod y neges e-bost hon neu unrhyw atodiadau yn rhydd rhag firysau neu 100% yn ddiogel. Oni bai fod hyn wedi ei ddatgan yn uniongyrchol yn nhestun yr e-bost, nid bwriad y neges e-bost hon yw ffurfio contract rhwymol - mae rhestr o lofnodwyr awdurdodedig ar gael o Swyddfa Cyllid Prifysgol Bangor.

This email and any attachments may contain confidential material and is solely for the use of the intended recipient(s). If you have received this email in error, please notify the sender immediately and delete this email. If you are not the intended recipient(s), you must not use, retain or disclose any information contained in this email. Any views or opinions are solely those of the sender and do not necessarily represent those of Bangor University. Bangor University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of the text of the email, this email is not intended to form a binding contract - a list of authorised signatories is available from the Bangor University Finance Office.



More information about the Forum mailing list