Skip to content

Commit 69fb790

Browse files
authored
Provide workaround for #192 (#193)
1 parent a7e11ba commit 69fb790

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CSharpMath.Rendering/Text/TextLaTeXParser.cs

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ string BreakText(string text, string seperator = "|")
3838
}
3939
BreakText(@"Here are some text $1 + 12 \frac23 \sqrt4$ $$Display$$ text")
4040
*/
41+
/// <summary>Handle additional languages</summary>
42+
public static List<BreakingEngine> AdditionalBreakingEngines { get; } = new();
4143
public static Result<TextAtom> TextAtomFromLaTeX(string latexSource) {
4244
if (string.IsNullOrEmpty(latexSource))
4345
return new TextAtom.List(Array.Empty<TextAtom>());
@@ -54,6 +56,8 @@ public static Result<TextAtom> TextAtomFromLaTeX(string latexSource) {
5456
BreakNumberAfterText = true,
5557
ThrowIfCharOutOfRange = false
5658
};
59+
foreach (var engine in AdditionalBreakingEngines)
60+
breaker.AddBreakingEngine(engine);
5761
breaker.BreakWords(latexSource);
5862

5963
Result CheckDollarCount(int startAt, ref int endAt, TextAtomListBuilder atoms) {

0 commit comments

Comments
 (0)