11import { Expression } from '../../../math-json' ;
2- import { stringValue , operands , operand , operator } from '../../../math-json/utils' ;
2+ import {
3+ stringValue ,
4+ operands ,
5+ operand ,
6+ operator ,
7+ } from '../../../math-json/utils' ;
38import { LatexDictionary , Parser , Serializer } from '../types' ;
49import { joinLatex } from '../tokenizer' ;
510import { DELIMITERS_SHORTHAND } from './definitions-core' ;
@@ -103,8 +108,7 @@ export const DEFINITIONS_LINEAR_ALGEBRA: LatexDictionary = [
103108 const columns = parseColumnFormat ( parser ) ;
104109 const [ op , cells ] = parseCells ( parser ) ;
105110
106- if ( columns )
107- return [ 'Norm' , [ op , cells , { str : columns } ] ] as Expression ;
111+ if ( columns ) return [ 'Norm' , [ op , cells , { str : columns } ] ] as Expression ;
108112
109113 return [ 'Norm' , [ op , cells ] ] as Expression ;
110114 } ,
@@ -237,7 +241,12 @@ export const DEFINITIONS_LINEAR_ALGEBRA: LatexDictionary = [
237241 } ,
238242
239243 // Also support plain text: tr(A)
240- { symbolTrigger : 'tr' , kind : 'function' , parse : 'Trace' , arguments : 'implicit' } ,
244+ {
245+ symbolTrigger : 'tr' ,
246+ kind : 'function' ,
247+ parse : 'Trace' ,
248+ arguments : 'implicit' ,
249+ } ,
241250
242251 {
243252 name : 'Kernel' ,
@@ -247,7 +256,12 @@ export const DEFINITIONS_LINEAR_ALGEBRA: LatexDictionary = [
247256 serialize : ( serializer : Serializer , expr : Expression ) : string =>
248257 serializeImplicitOperator ( serializer , expr , '\\ker' ) ,
249258 } ,
250- { symbolTrigger : 'ker' , kind : 'function' , parse : 'Kernel' , arguments : 'implicit' } ,
259+ {
260+ symbolTrigger : 'ker' ,
261+ kind : 'function' ,
262+ parse : 'Kernel' ,
263+ arguments : 'implicit' ,
264+ } ,
251265
252266 {
253267 name : 'Dimension' ,
@@ -272,7 +286,12 @@ export const DEFINITIONS_LINEAR_ALGEBRA: LatexDictionary = [
272286 serialize : ( serializer : Serializer , expr : Expression ) : string =>
273287 serializeImplicitOperator ( serializer , expr , '\\deg' ) ,
274288 } ,
275- { symbolTrigger : 'deg' , kind : 'function' , parse : 'Degree' , arguments : 'implicit' } ,
289+ {
290+ symbolTrigger : 'deg' ,
291+ kind : 'function' ,
292+ parse : 'Degree' ,
293+ arguments : 'implicit' ,
294+ } ,
276295
277296 {
278297 name : 'Hom' ,
@@ -282,7 +301,12 @@ export const DEFINITIONS_LINEAR_ALGEBRA: LatexDictionary = [
282301 serialize : ( serializer : Serializer , expr : Expression ) : string =>
283302 serializeImplicitOperator ( serializer , expr , '\\hom' ) ,
284303 } ,
285- { symbolTrigger : 'hom' , kind : 'function' , parse : 'Hom' , arguments : 'implicit' } ,
304+ {
305+ symbolTrigger : 'hom' ,
306+ kind : 'function' ,
307+ parse : 'Hom' ,
308+ arguments : 'implicit' ,
309+ } ,
286310
287311 {
288312 name : 'Determinant' ,
@@ -306,7 +330,12 @@ export const DEFINITIONS_LINEAR_ALGEBRA: LatexDictionary = [
306330 } ,
307331
308332 // Also support plain text: det(A)
309- { symbolTrigger : 'det' , kind : 'function' , parse : 'Determinant' , arguments : 'implicit' } ,
333+ {
334+ symbolTrigger : 'det' ,
335+ kind : 'function' ,
336+ parse : 'Determinant' ,
337+ arguments : 'implicit' ,
338+ } ,
310339
311340 // MatrixMultiply serializes as multiplication with \cdot
312341 {
0 commit comments