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