diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/ShareDialog.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/ShareDialog.java index 0735db5..7286226 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/ShareDialog.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/ShareDialog.java @@ -31,6 +31,8 @@ public class ShareDialog extends Dialog implements LocaleChangeObserver { private static final String CLOSE_ICON_ID = "closeIcon"; private static final String RIGHT_ARROW_WHITE = "\\\\rightwhitearrow"; + private static final String MATH_OPEN = "\\["; + private static final String MATH_CLOSE = "\\]"; private final TextField urlField; private final TextArea packageAreaTree; @@ -67,7 +69,7 @@ public class ShareDialog extends Dialog implements LocaleChangeObserver { latexAreaTree = new TextArea(); packageAreaUnification = new TextArea(); latexAreaUnification = new TextArea(); - initializeFields(url, latexCodeTree, latexCodeUnification); + initializeFields(url, latexCodeTree, MATH_OPEN + latexCodeUnification + MATH_CLOSE); UI.getCurrent().getPage().executeJs("window.autoSelect($0)", FIELD_CLASS); diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstants.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstants.java index ad9294f..554e906 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstants.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstants.java @@ -58,8 +58,8 @@ public final class LatexCreatorConstants { protected static final String LATEX_NEW_LINE = "\\\\"; protected static final String CIRC = "\\circ"; - protected static final String COLOR_RED = "\\color{#f00}"; - protected static final String COLOR_HIGHLIGHT = "\\color{#006AF5}"; + protected static final String COLOR_RED = "\\color{Red}"; + protected static final String COLOR_HIGHLIGHTED = "\\color{RoyalBlue}"; protected static final String EMPTY_SET = "\\emptyset"; protected static final String LAMBDA = "\\lambda"; protected static final String LATEX_SPACE = "\\ "; diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java index ab6e30f..0c1763c 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java @@ -291,7 +291,7 @@ public class LatexCreatorConstraints implements StepVisitor { sb.append(COLOR_RED); } else if (markLastTwoConstraints && (i < 2)) { sb.append(CURLY_LEFT); - sb.append(COLOR_HIGHLIGHT); + sb.append(COLOR_HIGHLIGHTED); } sb.append(new LatexCreatorType(unificationConstraints.get(i).getFirstType()).getLatex()); sb.append(EQUALS); @@ -310,7 +310,7 @@ public class LatexCreatorConstraints implements StepVisitor { if (original.contains(originalType)) { StringBuilder highlightedChange2 = new StringBuilder(); highlightedChange2.append(CURLY_LEFT); - highlightedChange2.append(COLOR_HIGHLIGHT); + highlightedChange2.append(COLOR_HIGHLIGHTED); highlightedChange2.append(new LatexCreatorType(s.getType()).getLatex()); highlightedChange2.append(CURLY_RIGHT); latex.append(original.replace(originalType, highlightedChange2.toString())); diff --git a/src/main/resources/language/general.properties b/src/main/resources/language/general.properties index 8e0eca3..d352326 100644 --- a/src/main/resources/language/general.properties +++ b/src/main/resources/language/general.properties @@ -85,5 +85,6 @@ share.neededPackagesTree=\ \\usepackage{bussproofs}\n\ \\usepackage{amsmath} share.neededPackagesUnification=\ -\\usepackage{xcolor}\n\ -\\usepackage{amsmath} +\\usepackage[dvipsnames]{xcolor}\n\ +\\usepackage{amsmath}\n\ +\\usepackage{stix}