mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-18 17:34:43 -04:00
Improves the spacing in LaTeX math mode output.
This commit is contained in:
parent
909b7bf09b
commit
c45de225c4
@ -27,6 +27,7 @@ public final class LaTeXFormatter {
|
|||||||
public static String format(Expression exp) {
|
public static String format(Expression exp) {
|
||||||
return format(new ExpressionToText().createText(exp, FormatToExpression.FORMATTER_LATEX), true);
|
return format(new ExpressionToText().createText(exp, FormatToExpression.FORMATTER_LATEX), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats the given text
|
* Formats the given text
|
||||||
*
|
*
|
||||||
@ -41,7 +42,10 @@ public final class LaTeXFormatter {
|
|||||||
if (text instanceof Simple) {
|
if (text instanceof Simple) {
|
||||||
return ((Simple) text).getText();
|
return ((Simple) text).getText();
|
||||||
} else if (text instanceof Blank) {
|
} else if (text instanceof Blank) {
|
||||||
return " ";
|
if (mathMode)
|
||||||
|
return "\\ ";
|
||||||
|
else
|
||||||
|
return " ";
|
||||||
} else if (text instanceof Character) {
|
} else if (text instanceof Character) {
|
||||||
return character(((Character) text).getChar(), mathMode);
|
return character(((Character) text).getChar(), mathMode);
|
||||||
} else if (text instanceof Decorate) {
|
} else if (text instanceof Decorate) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user