Group Abstract Group Abstract

Message Boards Message Boards

Displaying graphics and images inline on Wolfram Engine

11 Replies
Posted 8 months ago
POSTED BY: Peng Peng
Posted 10 months ago

Thanks for sharing! Inspired by your code, I developed the Wolfram-terminal-image package to display Wolfram Mathematica graphics in the vscode terminal and emacs org-mode (dynamic plots can be interacted via Wolfram Player).

For vscode, both formulas and plots are converted into .png files and shown in terminal using imgcat.

Demo: Test-vscode-terminal-wolfram-mathematica.gif Testing wolfram mathematica in vscode terminal

For emacs org-mode, formulas are converted into LaTeX fragments by default, making it easy to paste them into Microsoft Word or LaTeX. You can place the cursor on a formula and press C-c C-x C-l to toggle it preview.

Print["\\begin{equation*}\n" <> ToString[TeXForm[expr]] <> "\n\\end{equation*}"];

Demo: Test-emacs-jupyter-wolfram-mathematica.gif Testing wolfram mathematica in emacs org mode

POSTED BY: Peng Peng
Posted 10 months ago

Thanks for this post!

Wanted to add that Kitty (alternative to iTerm2) also offers a similar feature. To obtain the same results with Kitty, one can replace Run["imgcat " <> fileName] in the module with Run["kitten icat " <> fileName].

Details could be found at https://sw.kovidgoyal.net/kitty/kittens/icat/

POSTED BY: Sudeepan Datta
Posted 2 years ago

Nice! Thanks for sharing.

You may also create a RAM disk to house your temporary directory.

POSTED BY: James Wey
POSTED BY: Josh Lietz

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Posted 3 years ago
POSTED BY: Cornel B.

Hi Cornel,

I am not there yet. With the setup described here, it is only possible to display static content. Manipulate, Animate contian Dynamic functions that require the frontend.

Posted 3 years ago

Hi Soumya,

This is nice, thanks for sharing. BTW, you can use CreateFile[] to create a unique file in $TemporaryDirectory.

POSTED BY: Rohit Namjoshi

Hi Rohit,

Thank you for the suggestion. I will look it up and see how it can fit in.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard