texmacs
branch for the TeXmacs plugin 🚧
In order to interfacing we have SBCL to output the necessary control codes. As a prototype this was accomplished by changing the following two files
- src/code/debug.lisp
- src/code/top-level.lisp
See Commit 88ef2eb
It is assumed that you already have a version of SBCL installed, so that these sources can be compiled.
As described in INSTALL
, a build of SBCL may be run without installing it (by run-sbcl.sh
). Just this
feature will be used here, hence your current installation of SBCL will not be compromised.
- Clone this repo
- Inside, execute
sh make.sh
(recommended: read INSTALL) - Check if build was successful by
sh run-sbcl.sh
- Copy the
plugin
directory to your TeXmacs/plugin folder and rename it tosbcl
: Before, adjust the path torun-sbcl.sh
by editing the file./plugin/progs/init-sbcl.scm
$ cp -r ./plugin $HOME/.TeXmacs/plugins/sbcl
- Test it 🍋.1
One may control TeXmacs by sending apropriate (scheme/guile)
messages to TeXmacs. Most of the menu commands may be mapped
to a LISP function. Thus inserting images, hyperlinks, latex,
schmeme, postscript and so on can be done by the plugin when
loading the package TMSPT (plugin/lisp/tmspt.lisp
).
Start sequence in init-sbcl.scm
:
(:launch "sh /path/to/sbcl/run-sbcl.sh --eval
\"(defun debug-ignore (c h) (declare (ignore h)) (print c)
(abort))\" --eval \"(setf *debugger-hook* #'debug-ignore)\"")
The function names are more or less self-explaining:
(defpackage TMSPT (:use common-lisp)
(:export #:tm-message
#:verbatim
#:command
#:latex
#:scheme
#:html
#:ps
#:output
#:prompt
#:input
#:add-style
#:rempve-style
#:toggle-header
#:toggle-footer
#:insert-text-field-above
#:insert-text-field-below
#:add-default-style
#:remove-default-style
#:link-image
#:inline-image
#:toggle-math-input
#:toggle-multiline-input
#:toggle-math-output
#:toggle-scheme-output
#:toggle-scheme-tree-output
#:show-timings
#:clear-all-fields
#:fold-all-fields
#:unfold-all-fields
#:evaluate-fields-in-order
6BDC
#:create-subsession
#:split-session
#:session-eval
#:evaluate-all
#:evaluate-above
#:evaluate-below
#:previous-field
#:next-field
#:first-field
#:last-field
#:insert-field-above
#:insert-field-below
#:remove-next-field
#:remove-banner
#:remove-last-field
#:close-session
#:toggle-full-screen
#:change-zoom-factor
#:zoom-in
#:zoom-out
#:fit-all-to-screen
#:fit-to-screen
#:fit-to-screen-width
#:fit-to-screen-height)
For details consult the source file tmspt.lisp
in the plugin/lisp/
directory.
Mathematical input (math-mode).
:TODO: rewrite
📅 14-JAN-2025
Footnotes
-
Use "STOP" button if "busy" for too long ... ↩