Skip to content

Commit

Permalink
More doc tweaks... (#1053)
Browse files Browse the repository at this point in the history
* More information in colophon
* fix reflow in recent Manual changes
  • Loading branch information
rocky committed Aug 7, 2024
1 parent 28a6d21 commit 43bf158
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
7 changes: 6 additions & 1 deletion mathics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
optional_software: Dict[str, str] = (
"cython",
"lxml",
"matplotlib",
"networkx",
"nltk",
"psutil",
Expand All @@ -40,7 +41,11 @@
for package in optional_software:
try:
mod = import_module(package)
package_version = mod.__dict__.get("__version__", "No version information")
package_version = (
mod.__version__
if hasattr(mod, "__version__")
else mod.__dict__.get("__version__", "No version information")
)
except ImportError:
package_version = "Not installed"

Expand Down
10 changes: 5 additions & 5 deletions mathics/doc/documentation/1-Manual.mdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<chapter title="Introduction">

\Mathics is a <url>:computer algebra
system:https://en.wikipedia.org/wiki/Computer_algebra_system</url>. It
is a free, open-source alternative to \Mathematica or the \Wolfram
Language. However, \Mathics builds around and on top of the Python
ecosystem of libraries and tools. So in a sense, you can think of it
system:https://en.wikipedia.org/wiki/Computer_algebra_system</url>. It \
is a free, open-source alternative to \Mathematica or the \Wolfram \
Language. However, \Mathics builds around and on top of the Python \
ecosystem of libraries and tools. So in a sense, you can think of it \
as a WMA front-end to the Python ecosystem of tools.

\Mathics is free both as in "free beer" but also, more importantly, as in "freedom". \Mathics can be run locally. But to facilitate installation of the vast amount of software need to run this, there is a <url>:docker image available on dockerhub: https://hub.docker.com/r/mathicsorg/mathics</url>.
Expand All @@ -18,7 +18,7 @@ See the <url>:installation instructions: https://mathics-development-guide.readt

For implementation details, plrease refer to the <url>:Developers Guide:https://mathics-development-guide.readthedocs.io/en/latest/</url>.

<section title="Why a CAS based on Wolfram Language?">
<section title="Why try to recreate Wolfram Language?">
\Mathematica is great, but it a couple of disadvantages.

<ul>
Expand Down
3 changes: 2 additions & 1 deletion mathics/doc/latex/doc2latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from sympy import __version__ as SymPyVersion

import mathics
from mathics import __version__, settings, version_string
from mathics import __version__, settings, version_info, version_string
from mathics.core.definitions import Definitions
from mathics.core.load_builtin import import_and_load_builtins
from mathics.doc.latex_doc import LaTeXMathicsDocumentation
Expand Down Expand Up @@ -89,6 +89,7 @@ def try_cmd(cmd_list: tuple, stdout_or_stderr: str) -> str:
["GhostscriptVersion", ("gs", "--version"), "stdout"],
):
versions[name] = try_cmd(cmd, field)
versions.update(version_info)
return versions


Expand Down
22 changes: 16 additions & 6 deletions mathics/doc/latex/mathics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -309,16 +309,26 @@ \part*{Appendices}
% Add this into table of contents
% The page reference may come out wrong and refer to the index.
% If so, adjust by hand, or diff file.
\addcontentsline{toc}{chapter}{Colophon}
\addcontentsline{toc}{chapter}{Colophon}

\begin{description}
\item[Mathics3 Core] \hfill \\ \MathicsCoreVersion
\item[Mathics3 Core] \hfill \MathicsCoreVersion
\item[Python] \hfill \\ \PythonVersion
\item[mpmath] \hfill \\ \mpmathVersion
\item[NumpyPy] \hfill \\ \NumPyVersion
\item[SymPy] \hfill \\ \SymPyVersion
\item[XeTeX] \hfill \\ \XeTeXVersion
\item[Asymptote] \hfill \\ \AsymptoteVersion
\item[Ghostscript] \hfill \\ \GhostscriptVersion
\item[mpmath] \hfill \mpmathVersion
\item[NumpyPy] \hfill \NumPyVersion
\item[SymPy] \hfill \SymPyVersion
\item[Ghostscript] \hfill \GhostscriptVersion
\item[cython] \hfill \cython
\item[lxml] \hfill \lxml
\item[matplotlib] \hfill \matplotlib
\item[networkx] \hfill \networkx
\item[psutil] \hfill \psutil
\item[skimage] \hfill \skimage
\item[scipy] \hfill \scipy
\item[wordcloud] \hfill \wordcloud
\end{description}

\end{colophon}
\end{document}

0 comments on commit 43bf158

Please sign in to comment.