Demote SageTeX to an optional package?

136 views
Skip to first unread message

Michael Orlitzky

unread,
Dec 5, 2021, 7:02:12 PM12/5/21
to sage-...@googlegroups.com
SageTeX was added to sage as a standard package in

https://trac.sagemath.org/ticket/7617

It's closely tied to sage (can't be used on its own), but is also not
used by any other part of sage.

Can we demote it to an optional package? Realistically this amounts to
adding "first, run `make sagetex`" at the top of the docs that talk
about it (warning: requires translators).

The benefits are the usual ones: faster installation, less disk usage,
easier for distros to package a standard "sage". And the downside of
course is that anyone regularly using sagetex will have to either
./configure --enable-sagetex, or run "make sagetex" at some point.


Nathan Dunfield

unread,
Dec 5, 2021, 11:03:13 PM12/5/21
to sage-devel
I'd be extremely hesitant to remove something that's been a standard package for over a decade unless it was causing major headaches.  I could be wrong, but isn't SageTeX just a couple files totaling under 25K?

The vast majority of SageMath users install it from binaries; tell them to run "make sagetex" or mess with "configure" would not help them.

Best,

Nathan





Emmanuel Charpentier

unread,
Dec 6, 2021, 4:55:38 AM12/6/21
to sage-devel

Having a standard way to integrate Sage’s results in a document is *crucial.

So -1.

Counter-proposal : add a pseudo-package à la tinytex (which tests for a local TeX installation, and install a minimal TeX if necessary).

Other possible alternatives : PythonTeX (slightly more general, accepts more languages), codebraid (a budding equivalent to PythonTeX using Markdown as a markup language). The latter may become important, Markdown turning out to be much more popular than LaTeX nowadays (notwithstanding its severe limitations).

Possible addition : professionals mathematicians do not need a LaTeX introduction, but students and “engineering type” users might benefit from a “Presenting Sage work” section in our tutorials.

Dima Pasechnik

unread,
Dec 6, 2021, 5:27:03 AM12/6/21
to sage-devel
It can become an optional spkg as soon as we figure out a robust way to install it with the binary distributions.

The main problem is that it's not a very standard Python package, as its installation involves generation of Python source from .dtx files by TeX.
So, if we make it into a PyPI package, a custom build step has to be added into setup.py



Meanwhile, please review the update to 3.6, which includes contributions from SciPy's @pv.



Dima

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/f5972e30-e9f7-4ca0-8597-06f662fd8504n%40googlegroups.com.

kcrisman

unread,
Dec 6, 2021, 9:05:47 AM12/6/21
to sage-devel

Having a standard way to integrate Sage’s results in a document is *crucial.

Since Sage is not (yet) in the position of R to have many user packages in a standardized place like CRAN, and since things like knitr are (hah!) crucial in that ecosystem, we almost certainly should continue providing this service directly.  
 

Michael Orlitzky

unread,
Dec 6, 2021, 9:39:23 AM12/6/21
to sage-...@googlegroups.com
Does "sage -i" not work either? (Is there a ticket for fixing it?)


Michael Orlitzky

unread,
Dec 6, 2021, 9:45:47 AM12/6/21
to sage-...@googlegroups.com
On Mon, 2021-12-06 at 01:55 -0800, Emmanuel Charpentier wrote:
>
> Having a *standard* way to integrate Sage’s results in a document is
> **crucial*.
>
> So -1.

Modulo the binary package issue, I'm only suggesting that we change the
word "standard" in build/pkgs/sagetex/type to "optional", not that we
change anything else about the way people put sage results in tex
documents.


> Possible addition : professionals mathematicians do not need a LaTeX
> introduction, but students and “engineering type” users might benefit
> from a “Presenting Sage work” section in our tutorials.

SageTeX is already part of the tutorial and I wouldn't change that.


> Counter-proposal : add a pseudo-package...

This is another topic entirely, but if you're looking for a
replacement, then a few lines in a Makefile and a trivial wrapper
around tcolorbox can do everything sagetex does without having to
install python files into sage itself and without the intermediate "run
sage on the file that sagetex created" step.


Matthias Koeppe

unread,
Dec 6, 2021, 1:06:47 PM12/6/21
to sage-devel
-1 on demoting it from standard. It's tiny, and installing it as part of the distribution is unproblematic. 

-1 on adding a Sage-specific installation procedure for TeX. Actually, we already have one but there is no good reason to use it other than possibly as part of the binary distribution; https://trac.sagemath.org/ticket/31529 proposes to remove it.

+1 on exploring and documenting alternatives that are not tied to Sage.

Dima Pasechnik

unread,
Dec 6, 2021, 2:55:36 PM12/6/21
to sage-devel
On Mon, Dec 6, 2021 at 6:06 PM Matthias Koeppe <matthia...@gmail.com> wrote:
>
> -1 on demoting it from standard. It's tiny, and installing it as part of the distribution is unproblematic.

it's possible to make it into a PyPI package - e.g. switch from using
make to using ninja to build the package (I even have a prototype, it
works), then everything (assuming TeX installed, naturally) can be
built using standard Python tools and packages.
But I'd rather not do it in this release cycle.
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/2ca7be82-9173-4db5-86bc-4ceb9854d6f5n%40googlegroups.com.

Nathan Dunfield

unread,
Dec 6, 2021, 10:34:20 PM12/6/21
to sage-devel
On Monday, December 6, 2021 at 8:39:23 AM UTC-6 Michael Orlitzky wrote:

Does "sage -i" not work either? (Is there a ticket for fixing it?)

It doesn't with the recommend macOS binaries, nor does it if you install SageMath via conda ("make: *** No rule to make target 'all-toolchain'.  Stop"). I haven't tried the linux "sage-as-distribution" binaries recently.

Nathan

Michael Orlitzky

unread,
Dec 7, 2021, 7:49:06 AM12/7/21
to sage-...@googlegroups.com
Conda has its own "sagetex" package, and should have separate packages
for all of the other optional sage packages (within reason).

I have no experience with the unofficial macOS binaries though so I
I'll give this up for now. With #29665 we'll be able to use python
packages from the system again, and with a little work, we can put
sagetex on pip. Then anyone will be able to `pip install sagetex` and
have it just work.


Dima Pasechnik

unread,
Dec 7, 2021, 8:01:48 AM12/7/21
to sage-devel
for the latter, I'd like to promote ninja_build to standard, see
https://trac.sagemath.org/ticket/32992
(it's much easier to have a ninja-built Python package, than a
make-built Python package)

> Then anyone will be able to `pip install sagetex` and
> have it just work.
>
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/ac437282214f1c1c1171145f3d50f05e3318e08e.camel%40orlitzky.com.

mmarco

unread,
Dec 29, 2021, 11:37:17 AM12/29/21
to sage-devel
FWIW, we are working on a python package that partially overlaps sagetex functionality:

Reply all
Reply to author
Forward
0 new messages