Macaulay2 » Documentation
Packages » Macaulay2Doc :: show
next | previous | forward | backward | up | index | toc

show -- display various objects in an external viewer

Synopsis

Description

The functions showTex and showHtml are specializations of the show method which first convert x to a TEX or Hypertext object, respectively, and display that result.

For example, the following lines would display a matrix in a browser or PDF viewer:

i1 : showTex matrix{{1,2,3},{4,5,6}}
+ cd /tmp/M2-95678-0/0/
+ pdflatex -interaction=batchmode show
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
i2 : showHtml matrix{{1,2,3},{4,5,6}}
Opening in existing browser session.

By default, the viewer is determined by either open on macOS or xdg-open on Linux distributions. As backup for when neither open nor xdg-open is available, the environmental variable WWWBROWSER or firefox is used.

Caveat

No attempt is made to wrap large matrices or equations. The code for this function is Unix dependent at the moment, requiring that certain commands like pdflatex are present.

See also

Ways to use show :

For the programmer

The object show is a method function.