From beeab7c07db9952d6f8b49edd1931d420f3f6790 Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 30 Jul 2022 18:09:28 -0400 Subject: [PATCH 1/2] Adjsust trace example and output --- mathics/builtin/trace.py | 4 ++-- mathics/doc/tex/mathics.tex | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/mathics/builtin/trace.py b/mathics/builtin/trace.py index 4f4890a3d..10eb4fa97 100644 --- a/mathics/builtin/trace.py +++ b/mathics/builtin/trace.py @@ -153,8 +153,8 @@ class TraceBuiltins(_TraceBase): You can have results ordered by name, or time. Trace an expression and list the result by time from highest to lowest. - >> TraceBuiltins[Plus @@ {1, x, x x}, SortBy->"time"] - = 1 + x + x ^ 2 + >> TraceBuiltins[Tiems[x, x] SortBy->"time"] + = x ^ 2 """ definitions_copy: Definitions diff --git a/mathics/doc/tex/mathics.tex b/mathics/doc/tex/mathics.tex index 632980ab9..bf2ba571c 100644 --- a/mathics/doc/tex/mathics.tex +++ b/mathics/doc/tex/mathics.tex @@ -30,14 +30,14 @@ \usepackage{asymptote} \usepackage[hypertexnames=false]{hyperref} % make hyperref aware of chapter reset for built-in symbols % (http://tex.stackexchange.com/questions/6098/wrong-hyper-references-after-resetting-chapter-counter) -\usepackage{listings} -\usepackage{paralist} +\usepackage{amsmath} +\usepackage{amssymb} \usepackage{color} \usepackage{fullpage} \usepackage{graphics} +\usepackage{listings} +\usepackage{paralist} \usepackage{textcomp} -\usepackage{amsmath} -\usepackage{amssymb} \usepackage{mathpazo} \usepackage[mathpazo]{flexisym} \usepackage{breqn} @@ -198,25 +198,30 @@ \item \begin{minipage}[t]{\codewidth}\begin{flushleft} {\ttfamily \bfseries #1} \end{flushleft} \end{minipage} \hfill \nobreak% } +% Test case error message output \newenvironment{testmessage}{\item \begin{minipage}{\codewidth} - \begin{ttfamily} + \begin{ttfamily}% \vspace{0.1em}% \color{message}% }{% \end{ttfamily}% \end{minipage}% } +% Test case print output \newenvironment{testprint}{\item \vspace{-0.5em} \begin{minipage}{\codewidth} - \begin{dmath*}[indentstep={0em},compact]% + \begin{ttfamily}% + \vspace{0.1em}% + \tiny% \color{print}% }{% - \end{dmath*}% + \end{ttfamily}% \end{minipage}% } +% Test case output; the ... in (Out[x]= ... ) \newenvironment{testresult}{% \item% \vspace{-0.5em}% From 818e693d18656c7ce62b26f2bb8492b87d537107 Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 30 Jul 2022 18:09:54 -0400 Subject: [PATCH 2/2] Quote before TOC in FUTURE.rst --- FUTURE.rst | 5 ++--- mathics/builtin/trace.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/FUTURE.rst b/FUTURE.rst index 0f5de5030..0baef1fc9 100644 --- a/FUTURE.rst +++ b/FUTURE.rst @@ -1,11 +1,10 @@ +*One can always dream...* + .. contents:: 2022 Roadmap ============= -*One can always dream...* - - Code reorganization and Refactoring ----------------------------------- diff --git a/mathics/builtin/trace.py b/mathics/builtin/trace.py index 10eb4fa97..5cad26e78 100644 --- a/mathics/builtin/trace.py +++ b/mathics/builtin/trace.py @@ -153,7 +153,7 @@ class TraceBuiltins(_TraceBase): You can have results ordered by name, or time. Trace an expression and list the result by time from highest to lowest. - >> TraceBuiltins[Tiems[x, x] SortBy->"time"] + >> TraceBuiltins[Times[x, x], SortBy->"time"] = x ^ 2 """