Last active
May 29, 2019 10:14
-
-
Save genkuroki/89466deb696fd09889f8d3aad296aef0 to your computer and use it in GitHub Desktop.
patches for WolframLanguageForJupyter-master/WolframLanguageForJupyter/Resources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- KernelForWolframLanguageForJupyter-orig.wl 2019-05-25 07:56:45.000000000 +0900 | |
+++ KernelForWolframLanguageForJupyter.wl 2019-05-29 15:03:02.746484500 +0900 | |
@@ -83,7 +83,7 @@ | |
(* provide the information *) | |
loopState["replyContent"] = | |
StringJoin[ | |
- "{\"protocol_version\": \"5.3.0\",\"implementation\": \"WolframLanguageForJupyter\",\"implementation_version\": \"0.0.1\",\"language_info\": {\"name\": \"Wolfram Language\",\"version\": \"12.0\",\"mimetype\": \"application/vnd.wolfram.m\",\"file_extension\": \".m\",\"pygments_lexer\": \"python\",\"codemirror_mode\": \"python\"},\"banner\" : \"Wolfram Language/Wolfram Engine Copyright 2019", | |
+ "{\"protocol_version\": \"5.3.0\",\"implementation\": \"WolframLanguageForJupyter\",\"implementation_version\": \"0.0.1\",\"language_info\": {\"name\": \"Wolfram Language\",\"version\": \"12.0\",\"mimetype\": \"application/vnd.wolfram.m\",\"file_extension\": \".m\",\"pygments_lexer\": \"python\",\"codemirror_mode\": \"mathematica\"},\"banner\" : \"Wolfram Language/Wolfram Engine Copyright 2019", | |
bannerWarning, | |
"\"}" | |
];, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- OutputHandlingUtilities-orig.wl 2019-05-25 07:56:45.000000000 +0900 | |
+++ OutputHandlingUtilities.wl 2019-05-29 18:42:49.103741100 +0900 | |
@@ -121,6 +121,16 @@ | |
(* generate HTML for the textual form of a result *) | |
toOutText[result_] := | |
+ Switch[JupyterOutTextForm, | |
+ "Plain", | |
+ StringJoin[{"&#", ToString[#1], ";"} & /@ ToCharacterCode[ToString[result], "Unicode"]], | |
+ "TeX", | |
+ StringJoin[ | |
+ "$$", | |
+ StringJoin[{"&#", ToString[#1], ";"} & /@ ToCharacterCode[ToString[result], "Unicode"]], | |
+ "$$" | |
+ ], | |
+ _, | |
StringJoin[ | |
(* preformatted *) | |
"<pre style=\"", | |
@@ -133,6 +143,7 @@ | |
StringJoin[{"&#", ToString[#1], ";"} & /@ ToCharacterCode[ToString[result], "Unicode"]], | |
(* end the element *) | |
"</pre>" | |
+ ] | |
]; | |
(* generate HTML for the rasterized form of a result *) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://nbviewer.jupyter.org/gist/genkuroki/6e32f4ac94a7bcad40526df806f833f2