File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2355,7 +2355,9 @@ DataFrame >> toLatex [
23552355
23562356 columnWidths := dataFrame columnNames collect: [ :columnName |
23572357 | maxWidth |
2358- maxWidth := columnName size.
2358+ columnName isString
2359+ ifFalse: [ maxWidth := columnName asString size ]
2360+ ifTrue: [ maxWidth := columnName size ].
23592361 dataFrame rows do: [ :row |
23602362 | value |
23612363 value := row at: columnName.
@@ -2364,7 +2366,10 @@ DataFrame >> toLatex [
23642366
23652367 dataFrame columnNames withIndexDo: [ :columnName :index |
23662368 | paddedColumnName |
2367- paddedColumnName := columnName padRightTo: (columnWidths at: index).
2369+ paddedColumnName := (columnName isString
2370+ ifFalse: [ columnName asString ]
2371+ ifTrue: [ columnName ]) padRightTo:
2372+ (columnWidths at: index).
23682373 index = dataFrame numberOfColumns
23692374 ifFalse: [ markdown nextPutAll: paddedColumnName , ' & ' ]
23702375 ifTrue: [ markdown nextPutAll: paddedColumnName ] ].
You can’t perform that action at this time.
0 commit comments