@@ -817,10 +817,12 @@ class MathBlock extends StatelessWidget {
817
817
children: [TextSpan (text: node.texSource)])));
818
818
}
819
819
820
- return _Katex (
821
- inline: false ,
822
- textStyle: ContentTheme .of (context).textStylePlainParagraph,
823
- nodes: nodes);
820
+ return Center (
821
+ child: SingleChildScrollViewWithScrollbar (
822
+ scrollDirection: Axis .horizontal,
823
+ child: _Katex (
824
+ textStyle: ContentTheme .of (context).textStylePlainParagraph,
825
+ nodes: nodes)));
824
826
}
825
827
}
826
828
@@ -841,26 +843,17 @@ TextStyle mkBaseKatexTextStyle(TextStyle style) {
841
843
842
844
class _Katex extends StatelessWidget {
843
845
const _Katex ({
844
- required this .inline,
845
846
required this .textStyle,
846
847
required this .nodes,
847
848
});
848
849
849
- final bool inline;
850
850
final TextStyle textStyle;
851
851
final List <KatexNode > nodes;
852
852
853
853
@override
854
854
Widget build (BuildContext context) {
855
855
Widget widget = _KatexNodeList (nodes: nodes);
856
856
857
- if (! inline) {
858
- widget = Center (
859
- child: SingleChildScrollViewWithScrollbar (
860
- scrollDirection: Axis .horizontal,
861
- child: widget));
862
- }
863
-
864
857
return Directionality (
865
858
textDirection: TextDirection .ltr,
866
859
child: DefaultTextStyle .merge (
@@ -1335,7 +1328,7 @@ class _InlineContentBuilder {
1335
1328
: WidgetSpan (
1336
1329
alignment: PlaceholderAlignment .baseline,
1337
1330
baseline: TextBaseline .alphabetic,
1338
- child: _Katex (inline : true , textStyle: widget.style, nodes: nodes));
1331
+ child: _Katex (textStyle: widget.style, nodes: nodes));
1339
1332
1340
1333
case GlobalTimeNode ():
1341
1334
return WidgetSpan (alignment: PlaceholderAlignment .middle,
0 commit comments