@@ -1740,7 +1740,6 @@ InstallMethod( DisplayString,
17401740
17411741end );
17421742
1743- # = comment for Julia
17441743# #
17451744InstallMethod( LaTeXOutput,
17461745 [ IsAdditiveClosureObject ] ,
@@ -1757,9 +1756,9 @@ InstallMethod( LaTeXOutput,
17571756 List( objs,
17581757 function ( pair )
17591758 local s;
1760- s := Concatenation( " { " , LaTeXOutput( pair[ 1 ] ), " } " );
1759+ s := Concatenation( LATEX_LBRACE , LaTeXOutput( pair[ 1 ] ), LATEX_RBRACE );
17611760 if pair[ 2 ] <> 1 then
1762- s := Concatenation( s, " ^{ \\ oplus " , String( pair[ 2 ] ), " } " );
1761+ s := Concatenation( s, " ^" , LATEX_LBRACE, " \\ oplus " , String( pair[ 2 ] ), LATEX_RBRACE );
17631762 fi ;
17641763 return s;
17651764 end ),
@@ -1771,37 +1770,39 @@ end );
17711770# #
17721771InstallMethod( LaTeXOutput,
17731772 [ IsAdditiveClosureMorphism ] ,
1774-
1775- function ( morphism )
1776- local matrix, str;
1777-
1778- matrix := MorphismMatrix( morphism );
1779-
1780- if ForAny( List( [ Source( morphism ), Range( morphism ) ] , ObjectList ), IsEmpty ) then
1781- str := " \\\\ " ;
1782- else
1783- str := JoinStringsWithSeparator(
1784- List( matrix, row -> JoinStringsWithSeparator(
1785- List( row, m -> LaTeXOutput( m : OnlyDatum := true ) ),
1786- " \& " ) ),
1787- " \\\\ \n "
1788- );
1789- fi ;
1790-
1791- str := Concatenation( " \\ begin{pmatrix}" , str, " \\ end{pmatrix}" );
1792-
1793- if ValueOption( " OnlyDatum" ) = true then
1794- return str;
1795- fi ;
1796-
1797- return Concatenation(
1798- LaTeXOutput( Source( morphism ) ),
1799- " \\ xrightarrow{" , str, " }" ,
1800- LaTeXOutput( Range( morphism ) )
1801- );
1802-
1803- end );
1804- # =#
1773+ FunctionWithNamedArguments(
1774+ [ [ " OnlyDatum" , false ] ] ,
1775+ function ( CAP_NAMED_ARGUMENTS, morphism )
1776+ local matrix, str;
1777+
1778+ matrix := MorphismMatrix( morphism );
1779+
1780+ if ForAny( List( [ Source( morphism ), Range( morphism ) ] , ObjectList ), IsEmpty ) then
1781+ str := " \\\\ " ;
1782+ else
1783+ str := JoinStringsWithSeparator(
1784+ List( matrix, row -> JoinStringsWithSeparator(
1785+ List( row, m -> LaTeXOutput( m : OnlyDatum := true ) ),
1786+ " &" ) ),
1787+ " \\\\ \n "
1788+ );
1789+ fi ;
1790+
1791+ str := Concatenation( " \\ begin" , LATEX_LBRACE, " pmatrix" , LATEX_RBRACE, str, " \\ end" , LATEX_LBRACE, " pmatrix" , LATEX_RBRACE );
1792+
1793+ if CAP_NAMED_ARGUMENTS.OnlyDatum = true then
1794+ return str;
1795+ fi ;
1796+
1797+ return Concatenation(
1798+ LaTeXOutput( Source( morphism ) ),
1799+ " \\ xrightarrow" , LATEX_LBRACE, str, LATEX_RBRACE,
1800+ LaTeXOutput( Range( morphism ) )
1801+ );
1802+
1803+ end
1804+ )
1805+ );
18051806
18061807# ###################################
18071808# #
0 commit comments