From 2759546ea46ad664d09897c8638f2dd8b9990ace Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 20 Dec 2020 14:33:53 -0500 Subject: [PATCH 1/3] Add some Script Capital letters --- mathicsscript/inputrc | 26 -------------------------- mathicsscript/inputrc-no-unicode | 27 +++++++++++++++++++++++++++ mathicsscript/inputrc-unicode | 27 +++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 26 deletions(-) diff --git a/mathicsscript/inputrc b/mathicsscript/inputrc index 0b8c3cc..118477b 100644 --- a/mathicsscript/inputrc +++ b/mathicsscript/inputrc @@ -38,30 +38,4 @@ "\escx\e": "\\[ScriptX]" "\escy\e": "\\[ScriptY]" "\escz\e": "\\[ScriptZ]" -"\escA\e": "\\[ScriptCapitalA]" -"\escB\e": "\\[ScriptCapitalB]" -"\escC\e": "\\[ScriptCapitalC]" -"\escD\e": "\\[ScriptCapitalD]" -"\escE\e": "\\[ScriptCapitalE]" -"\escF\e": "\\[ScriptCapitalF]" -"\escG\e": "\\[ScriptCapitalG]" -"\escH\e": "\\[ScriptCapitalH]" -"\escI\e": "\\[ScriptCapitalI]" -"\escJ\e": "\\[ScriptCapitalJ]" -"\escK\e": "\\[ScriptCapitalK]" -"\escL\e": "\\[ScriptCapitalL]" -"\escM\e": "\\[ScriptCapitalM]" -"\escN\e": "\\[ScriptCapitalN]" -"\escO\e": "\\[ScriptCapitalO]" -"\escP\e": "\\[ScriptCapitalP]" -"\escQ\e": "\\[ScriptCapitalQ]" -"\escR\e": "\\[ScriptCapitalR]" -"\escS\e": "\\[ScriptCapitalS]" -"\escT\e": "\\[ScriptCapitalT]" -"\escU\e": "\\[ScriptCapitalU]" -"\escV\e": "\\[ScriptCapitalV]" -"\escW\e": "\\[ScriptCapitalW]" -"\escX\e": "\\[ScriptCapitalX]" -"\esCy\e": "\\[ScriptCapitalY]" -"\esCz\e": "\\[ScriptCapitalZ]" tab: complete diff --git a/mathicsscript/inputrc-no-unicode b/mathicsscript/inputrc-no-unicode index 469147b..d8939ed 100644 --- a/mathicsscript/inputrc-no-unicode +++ b/mathicsscript/inputrc-no-unicode @@ -54,3 +54,30 @@ $include "inputrc" # "\e\\phi\e": "φ" # ? # "\e\\chi\e": "χ" # ? # "\e\\psi\e": "ψ" # ? + +"\escA\e": "\\[ScriptCapitalA]" +"\escB\e": "\\[ScriptCapitalB]" +"\escC\e": "\\[ScriptCapitalC]" +"\escD\e": "\\[ScriptCapitalD]" +"\escE\e": "\\[ScriptCapitalE]" +"\escF\e": "\\[ScriptCapitalF]" +"\escG\e": "\\[ScriptCapitalG]" +"\escH\e": "\\[ScriptCapitalH]" +"\escI\e": "\\[ScriptCapitalI]" +"\escJ\e": "\\[ScriptCapitalJ]" +"\escK\e": "\\[ScriptCapitalK]" +"\escL\e": "\\[ScriptCapitalL]" +"\escM\e": "\\[ScriptCapitalM]" +"\escN\e": "\\[ScriptCapitalN]" +"\escO\e": "\\[ScriptCapitalO]" +"\escP\e": "\\[ScriptCapitalP]" +"\escQ\e": "\\[ScriptCapitalQ]" +"\escR\e": "\\[ScriptCapitalR]" +"\escS\e": "\\[ScriptCapitalS]" +"\escT\e": "\\[ScriptCapitalT]" +"\escU\e": "\\[ScriptCapitalU]" +"\escV\e": "\\[ScriptCapitalV]" +"\escW\e": "\\[ScriptCapitalW]" +"\escX\e": "\\[ScriptCapitalX]" +"\esCy\e": "\\[ScriptCapitalY]" +"\esCz\e": "\\[ScriptCapitalZ]" diff --git a/mathicsscript/inputrc-unicode b/mathicsscript/inputrc-unicode index ff08dd7..ba55e44 100644 --- a/mathicsscript/inputrc-unicode +++ b/mathicsscript/inputrc-unicode @@ -152,3 +152,30 @@ $include "inputrc" "\e&&\e": "∧" "\eue\e": "↔" "\ede\e": "→" + +"\escA\e": "𝒜" +"\escB\e": "ℬ" +"\escC\e": "𝒞" +"\escD\e": "𝒟" +"\escE\e": "ℰ" +"\escF\e": "ℱ" +"\escG\e": "𝒢" +"\escH\e": "ℋ" +"\escI\e": "ℐ" +"\escJ\e": "𝒥" +"\escK\e": "𝒦" +"\escL\e": "\\[ScriptCapitalL]" +"\escM\e": "\\[ScriptCapitalM]" +"\escN\e": "\\[ScriptCapitalN]" +"\escO\e": "\\[ScriptCapitalO]" +"\escP\e": "\\[ScriptCapitalP]" +"\escQ\e": "\\[ScriptCapitalQ]" +"\escR\e": "\\[ScriptCapitalR]" +"\escS\e": "𝒮" +"\escT\e": "\\[ScriptCapitalT]" +"\escU\e": "\\[ScriptCapitalU]" +"\escV\e": "\\[ScriptCapitalV]" +"\escW\e": "\\[ScriptCapitalW]" +"\escX\e": "\\[ScriptCapitalX]" +"\esCy\e": "\\[ScriptCapitalY]" +"\esCz\e": "\\[ScriptCapitalZ]" From 260445a9f617a3b8e127de9eb01020ed2bdff17c Mon Sep 17 00:00:00 2001 From: rocky Date: Tue, 22 Dec 2020 08:00:07 -0500 Subject: [PATCH 2/3] Use True/False for bool options... Now that Mathics will soon be fixed. --- mathicsscript/__main__.py | 4 ++-- mathicsscript/settings.m | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mathicsscript/__main__.py b/mathicsscript/__main__.py index 0cbca4c..5ce72e3 100755 --- a/mathicsscript/__main__.py +++ b/mathicsscript/__main__.py @@ -220,10 +220,10 @@ def main( # Then, it can be changed by the settings file (in WL) # and overwritten by the command line parameter. definitions.set_ownvalue( - "Settings`$ShowFullFormInput", from_python(1 if full_form else 0) + "Settings`$ShowFullFormInput", from_python(True if full_form else False) ) definitions.set_ownvalue( - "Settings`$PygmentsShowTokens", from_python(1 if pygments_tokens else 0) + "Settings`$PygmentsShowTokens", from_python(True if pygments_tokens else False) ) shell = TerminalShell(definitions, style, readline, completion, unicode) diff --git a/mathicsscript/settings.m b/mathicsscript/settings.m index 95f3285..47b724f 100644 --- a/mathicsscript/settings.m +++ b/mathicsscript/settings.m @@ -12,9 +12,11 @@ Note this is for input entered, not the output of the evaluated result. " -Settings`$ShowFullFormInput = 0 +Settings`$ShowFullFormInput = False Settings`$PygmentsStyle::usage = "This sets the Pygments style used to colorize output. The value should be a string. The default value changes background depending on whether the terminal has a light or dark background. You can also set the color style used on the command with the ``--style`` option, or look at the variable ```Settings`PygmentsStylesAvailable```. Or it can be set in the settings.m file." -Settings`$PygmentsShowTokens::usage = "Setting this 1 will show Pygments tokenization of the output." +Settings`$PygmentsShowTokens::usage = "Setting this True will show Pygments tokenization of the output." + +Settings`$PygmentsShowTokens = False From 00e9f2eaa393cb618304d262549ee8b88bf6a4f4 Mon Sep 17 00:00:00 2001 From: rocky Date: Tue, 22 Dec 2020 08:08:06 -0500 Subject: [PATCH 3/3] Adjust settings.m ... * Adjust usage descriptions. * Add Settings`$UseUnicode. --- mathicsscript/settings.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mathicsscript/settings.m b/mathicsscript/settings.m index 47b724f..ac69f2a 100644 --- a/mathicsscript/settings.m +++ b/mathicsscript/settings.m @@ -7,16 +7,19 @@ (**********************************************************************) -Settings`$ShowFullFormInput::usage = "If this variable is set nonzero, mathicsscript shows the input in FullForm before evaluation. +Settings`$ShowFullFormInput::usage = "If this Boolean variable is set True, mathicsscript shows the input in FullForm before evaluation. Note this is for input entered, not the output of the evaluated result. " Settings`$ShowFullFormInput = False -Settings`$PygmentsStyle::usage = "This sets the Pygments style used to colorize output. The value should be a string. +Settings`$PygmentsStyle::usage = "This variable sets the Pygments style used to colorize output. The value should be a string. The default value changes background depending on whether the terminal has a light or dark background. You can also set the color style used on the command with the ``--style`` option, or look at the variable ```Settings`PygmentsStylesAvailable```. Or it can be set in the settings.m file." -Settings`$PygmentsShowTokens::usage = "Setting this True will show Pygments tokenization of the output." +Settings`$PygmentsShowTokens::usage = "Setting this variable True will show Pygments tokenization of the output." Settings`$PygmentsShowTokens = False + +Settings`$PygmentsStyle::usage = "This Boolean variable sets whether Unicode is used in terminal input and output." +Settings`$UseUnicode = True