Skip to content

Commit d8eed34

Browse files
Merge pull request #64 from kamalsaleh/latex_string
Install LaTeXOutput operations
2 parents 60dc0ef + ab1cb68 commit d8eed34

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Subtitle := "Algebroids and bialgebroids as preadditive categories generated by
1313
Version := Maximum( [
1414
"2020.04.26", ## Mohamed's version
1515
## this line prevents merge conflicts
16-
"2020.04.05", ## Kamal's version
16+
"2020.09.05", ## Kamal's version
1717
## this line prevents merge conflicts
1818
"2019.02.12", ## Florian's version
1919
## this line prevents merge conflicts

gap/Algebroids.gd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,18 @@ DeclareOperation( "ApplyToQuiverAlgebraElement",
326326
DeclareOperation( "ApplyToQuiverAlgebraElement",
327327
[ IsCapFunctor, IsQuiverAlgebraElement ] );
328328

329+
#! @Description
330+
#! The ouput is the LaTeX string of the object <A>o</A>.
331+
#! @Arguments o
332+
#! Returns a string
333+
DeclareOperation( "LaTeXStringOp", [ IsCapCategoryObjectInAlgebroid ] );
334+
335+
#! @Description
336+
#! The ouput is the LaTeX string of the morphism <A>m</A>.
337+
#! @Arguments m
338+
#! Returns a string
339+
DeclareOperation( "LaTeXStringOp", [ IsCapCategoryMorphismInAlgebroid ] );
340+
329341
####################################
330342
#
331343
#! @Section Constructors

gap/Algebroids.gi

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,7 @@ InstallMethod( Display,
23472347
ViewObj( CapCategory(o) );
23482348

23492349
end );
2350+
23502351
##
23512352
InstallMethod( ViewObj,
23522353
"for a morphism in an algebroid",
@@ -2369,3 +2370,50 @@ InstallMethod( ViewObj,
23692370
fi;
23702371

23712372
end );
2373+
2374+
##
2375+
InstallMethod( LaTeXStringOp,
2376+
[ IsCapCategoryObjectInAlgebroidRep ],
2377+
2378+
o -> LaTeXStringForQPA( UnderlyingVertex( o ) )
2379+
);
2380+
2381+
##
2382+
InstallMethod( LaTeXOutput,
2383+
[ IsCapCategoryObjectInAlgebroidRep ],
2384+
2385+
LaTeXStringOp
2386+
);
2387+
2388+
##
2389+
InstallMethod( LaTeXStringOp,
2390+
[ IsCapCategoryMorphismInAlgebroidRep ],
2391+
2392+
function( m )
2393+
local s;
2394+
2395+
s := LaTeXStringForQPA( UnderlyingQuiverAlgebraElement( m ) );
2396+
2397+
if ValueOption( "OnlyDatum" ) = true then
2398+
2399+
return s;
2400+
2401+
else
2402+
2403+
return Concatenation(
2404+
"{", LaTeXOutput( Source( m ) ), "}-\\left(",
2405+
"{", s, "}\\right)\\rightarrow",
2406+
"{", LaTeXOutput( Range( m ) ), "}"
2407+
);
2408+
2409+
fi;
2410+
2411+
end );
2412+
2413+
##
2414+
InstallMethod( LaTeXOutput,
2415+
[ IsCapCategoryMorphismInAlgebroidRep ],
2416+
2417+
LaTeXStringOp
2418+
);
2419+

0 commit comments

Comments
 (0)