Ask Your Question
2

Math document containing some Sage calculations

asked 2018-01-15 01:40:03 +0200

porton gravatar image

I need to write a short math text draft containing some Sage calculations. (I am a Sage novice.)

What software (or software combinations) you may suggest to do this?

Is it possible to do with TeXmacs? If yes, does it require to install any TeXmacs addons? I tried wiki.sagemath.org/TeXmacs but it does not work (does not appear in the list of installed plugins) with my version of TeXmacs.

I prefer interactive software rather than LaTeX for this task.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2018-01-15 23:22:11 +0200

tmonteil gravatar image

Personally, i like the following combo when organizing tutorials:

  • write your document in .rst format (same format as Sage documentation and thematic tutorials, and it is pure text, good for versionning)
  • compile into static pdf with rst2latex followed by pdflatex (for printing)
  • compile into live jupyter notebook with rst2ipynb (for interacting with the computation cells)

Regarding edition, i use a text editor (vim), but if you like to see the rendering on the fly, you can use .rst editors like retext.

I have some dirty bash scripts to automate that (and pass nice rendering options, and convenient headers), do not hesitate to ask if you plan to use that method.

edit flag offensive delete link more

Comments

To be equal, I should say this is a good solution too and perhaps better for the use case mentioned.

kcrisman gravatar imagekcrisman ( 2018-01-16 03:09:51 +0200 )edit
1

Note that you must install rst2ipynb:

sage -i rst2pynb

Then you can use it

sage -rst2ipynb source.rst out.ipynb
pang gravatar imagepang ( 2018-01-28 23:26:53 +0200 )edit
2

answered 2018-01-15 18:03:55 +0200

vdelecroix gravatar image

Solution 1: sagetex. This is to embbed Sage computation in a LaTeX document.

Solution 2: pretext. This is much more general and designed to write books. It can be used to produce LaTeX but also html pages with embbeded Sage cells.

edit flag offensive delete link more

Comments

Haha, you took exactly what I would have said :-)

kcrisman gravatar imagekcrisman ( 2018-01-16 03:08:43 +0200 )edit
1

answered 2018-01-24 12:01:57 +0200

Adrian soto gravatar image

updated 2018-01-24 12:03:51 +0200

There is a plugin for sage in TeXmacs. It needs some work to make it have the same functionality as that for Python, and to have it work both in Windows as in LInux or Mac.

In the meantime, inside the following link you could download the file adriansage2.tar.gz.

If you use LInux, you may try to uncompress and download the file in the plugins directory of your .TeXmacs directory to see if it recognizes your sage instalation (assuming sage is discoverable from the path) and perhaps this allows you to practice a bit.

http://lists.texmacs.org/wws/arc/texm...

edit flag offensive delete link more

Comments

Is TeXmacs still alive? I loved that thing, but it is no longer in the ubuntu repos and I cannot install it from source. It looks abandoned.

pang gravatar imagepang ( 2018-01-28 23:35:35 +0200 )edit
1

Yes, the TeXmacs project is still active. See the mailing lists activity.

The last message on the "texmacs-info" mailing list was in Dec 2017, announcing the release of TeXmacs 1.99.6.

The "texmacs-users" mailing list shows activity over the months.

slelievre gravatar imageslelievre ( 2018-04-27 19:58:02 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-01-15 01:40:03 +0200

Seen: 387 times

Last updated: Jan 24 '18