GNU TeXmacs

Short description: Open-source word processor

GNU TeXmacs

TeXmacs 2.1.1 running on Windows 11

Developer(s)| GNU Project
Stable release| 2.1 (June 22, 2021; 2 years ago (2021-06-22)) [±]
Written in| C++
Operating system| Linux, Windows, macOS, Unix-like[1]
Platform| x86, x86-64
Type| Word processor
License| GPL-3.0-or-later[2]
Website| www.texmacs.org

GNU TeXmacs is a scientific word processor and typesetting component of the GNU Project. It originated as a variant of GNU Emacs with TeX functionalities, though it shares no code with those programs, while using TeX fonts.[3] It is written and maintained by Joris van der Hoeven and a group of developers.[4] The program produces structured documents with a WYSIWYG user interface. New document styles can be created by the user. The editor provides high-quality typesetting algorithms and TeX and other fonts for publishing professional looking documents.

## Contents

* 1 Background
* 2 Features
* 2.1 The TeXmacs editor
* 2.2 Mathematical typography
* 2.3 Batch processing
* 3 The TeXmacs format
* 4 Typesetting and document control
* 4.1 Document control
* 4.1.1 TeXmacs macros
* 4.1.2 Document control through Scheme
* 4.1.3 Graphics
* 5 Supported back ends
* 5.1 Embedding editable plugin output
* 6 See also
* 7 References
* 8 External links

## Background

As a structured WYSIWYG editor and document preparation system, TeXmacs is similar to earlier structured document editors, such as Interleaf (first release 1985), Framemaker (1986), SoftQuad Author/Editor (1988),[5] Lilac,[6] Grif (software) (fr) (1991),[7] and Thot;[8] there was also academic research into interactive editing of complex typographical constructs represented logically.[9][10]

In the 2000s and 2010s, interest on interactive editing of structured text encouraged the development of programs intended for scholars in the humanities; an example of this is CWRC-Writer, a visual XML editor with "Close-to-WYSIWYG editing and enrichment of scholarly texts with meaningful visual representations of markup".[11]

On another side of the editing and document preparation world, a program for visual interaction with structured texts written in LaTeX is LyX, which does not aim at WYSIWYG editing but at visual representation of the structure (WYSIWYM).

## Features

A screenshot showing mathematical formulas and italic font. A cyan focus frame surrounds the innermost environment (a formula environment) the cursor is in, while the subtle gray box surrounds another active tag (the theorem environment).

Like in many WYSIWYG editors (such as Microsoft Word), authors manipulate a document on screen which should print to a similar-looking paper copy. The goal of TeXmacs is to provide a WYSIWYG editor that nevertheless makes it possible to write correctly structured documents with aesthetically pleasing typesetting results. TeXmacs is not a front-end to LaTeX[12] but TeXmacs documents can be converted to either TeX or LaTeX. LaTeX also can be imported (to some extent), and both import from and export to HTML, Scheme, Verbatim, and XML is provided;[13] the HTML export is stylable with CSS (since version 1.99.14). There is a converter for MathML as well, and TeXmacs can output PDF and PostScript for printing.[14]

TeXmacs can handle mathematical formulas, tables, images, cross-references and citations. It can be used as a front-end to a number of computer algebra systems such as Maxima, FriCAS and SageMath, and can in turn integrate some of their output into its typesetting. TeXmacs also supports a Scheme extension language called Guile for customizing the program and writing extensions.

It also features a presentation mode and a small technical drawing editor and there are plans to evolve towards a complete scientific office suite with spreadsheet capabilities. An implementation of spreadsheets is present starting from version 1.99.12; spreadsheets in TeXmacs can take advantage of plugins (for example Python or Maxima) to compute cell values.

TeXmacs currently runs on most Unix-based architectures including Linux, FreeBSD, Cygwin, Haiku and macOS. Along with the Cygwin version, a native port is available for Microsoft Windows.

### The TeXmacs editor

In the TeXmacs editor structure and appearance of the document are represented at the same time;[15] the structure is made evident to the user by surrounding logical units of the document in nested focus frames carrying color cues that are displayed according to the movement of the cursor.[16] A detailed description of the structure in the proximity of the cursor is provided in the footer of the editor window, finely selectable with left-right arrow presses.[15] In the editor it is possible to switch between text mode and source mode editing, and support for the composition of macros is present; the source editor is syntax-aware.[17]

### Mathematical typography

TeXmacs facilitates the inputting of mathematical formulas by mapping sequences of keyboard presses to symbols. For example, the symbol [math]\displaystyle{ \Rightarrow }[/math] can be input by typing `=>`.

Some symbols have no such representation ([math]\displaystyle{ \Uparrow }[/math] for instance). These can be input with key (e.g. for [math]\displaystyle{ \Uparrow }[/math] the key presses are `=>` . This keyboard-based entry differs from other formulae editors, that tend to provide point-and-click menus for this task.[18]

### Batch processing

It is possible to use TeXmacs as a batch processor (which is LaTeX's usual operation mode), using X virtual framebuffer to avoid opening unwanted windows while processing. For example, the command

$ xvfb-run texmacs --convert article.tm article.pdf --quit

generates a PDF file "article.pdf" from a TeXmacs document "article.tm".

## The TeXmacs format

All TeXmacs documents or document fragments can be thought of as trees (the concept of tree exists as well in the SGML markup language, to which the Texmacs format is similar). For instance, the tree

represents the formula

[math]\displaystyle{ x+y+\frac{1}{2}+\sqrt{y+z} }[/math]

(written here with the TeX markup used by Wikipedia) and is turned by TeXmacs' own typesetting engine into a typeset formula, here inserted as an image:

TeXmacs trees are represented in TeXmacs files as strings, and in the TeXmacs editor as the typeset representation of the document together with its interactive behaviour.[19] In the on-screen representation of the TeXmacs tree, the cursor movement represents the movement inside the tree. On disk, three representations of the TeXmacs format exist: a native representation, an XML representation and a representation with Scheme S-expressions; the Scheme representation is useful for the interfacing with Scheme programs.

## Typesetting and document control

The typesetting process converts TeXmacs trees into boxes.[20] Evaluation of TeXmacs trees proceeds by reduction of the primitives, that is by evaluation of macro applications. The typesetting primitives are designed to be very fast and are built-in into the editor; the rendering of many of the primitives can be customized through the built-in environment variables; the stylesheet language allows users to write new primitives as macros on top of the built-in primitives.

TeXmacs uses a global algorithm for "line-breaking" (similar to the TeX one) and in addition uses a global algorithm for "page-breaking"; the page-breaking algorithm takes into account floating objects (figures, table, footnotes) and multi-column content.

### Document control

Documents can be controlled through a native macro system and through Guile-Scheme. It is possible to customize the editor's menus and keybindings and to act programmatically on the document tree.

#### TeXmacs macros

TeXmacs macros provide a means of structured input (as in TeX/LaTeX) and they are immediately typeset, at the same time maintaining editable input fields. They are written in source code, although the WYSIWYG editor can aid in their composition through the translation of visual structures into their syntax.[21]

#### Document control through Scheme

Scheme is embedded in TeXmacs through GNU Guile; the editor itself can be controlled in this way:[20] menus and keybindings can be customized. Scheme commands can be invoked interactively inside TeXmacs documents, can be invoked from the command line and from inside TeXmacs macros. TeXmacs trees can be passed to Scheme in different forms: as "passive trees" (convenient to manipulate content directly using standard Scheme routines on lists), as "active trees" (keep track of the position of the tree inside the global document tree and can be used to programmatically modify documents), and in a "hybrid" representation.

#### Graphics

Graphics objects are also part of the TeXmacs format and can be manipulated programmatically from Scheme. An example of TeXmacs graphics generated in a TeXmacs Scheme session is shown below together with the session which generated the image. Images generated programmatically in a Scheme session can also be edited using the internal drawing editor, as they are inserted in the document as a tree; Scheme scripts can also be executed through the `extern` TeXmacs macro—in this case only the typeset material is available in the document and no direct editing is possible (the modifications must be made within the Scheme code).

Scheme]  (define pi (acos -1))
;; A function to define a point in the TeXmacs graphics format using two coordinates
Scheme]  (define (pt x y)
‘(point ,(number->string x) ,(number->string y)))
;; Set points
Scheme]  (define xC (- (* 2 (cos (/ pi 3)))))
Scheme]  (define yC (* 2 (sin (/ pi 3))))
Scheme]  (define pA (pt -2 0))
Scheme]  (define pB (pt 2 0))
Scheme]  (define pC (pt xC yC))
Scheme]  (define tA (pt -2.3 -0.5))
Scheme]  (define tB (pt 2.1 -0.5))
Scheme]  (define tC (pt (- xC 0.2) (+ yC 0.2)))
;; Generate graphics
Scheme]  (stree->tree
‘(with "gr-geometry" (tuple "geometry" "400px" "300px" "center")
(graphics
(with "color" "blue"  (text-at (TeXmacs) ,(pt -0.55 -0.75)))
(with "color" "black" (arc ,pA ,pC ,pB))
(with "color" "black" (line ,pA ,pB))
(with "color" "red"   (cline ,pA ,pB ,pC))
(with "color" "black" (text-at "A" ,tA))
(with "color" "black" (text-at "B" ,tB))
(with "color" "black" (text-at "C" ,tC)))))

## Supported back ends

A TeXmacs session of Maxima

TeXmacs has back-ends supporting many technologies.

* Programming languages: CLISP, CMUCL, Python, QCL, R, Shell
* Computer algebra systems: Axiom, Giac, Macaulay 2, Mathematica, Maxima, MuPAD, PARI/GP, Reduce, SageMath, Yacas
* Numeric matrix systems: GNU Octave, Matlab, Scilab
* Plotting packages: gnuplot, Graphviz, XYpic, Mathemagix
* Other: DraTeX, Eukleides, GTybalt, Lush, Juris-M, and Zotero

### Embedding editable plugin output

Plugin output can be embedded within TeXmacs documents using "executable switches";[22] in this way one can switch back and forth between a given input to the system and the corresponding output, which blends seamlessly in the document.

## See also

* Comparison of TeX editors
* Comparison of office suites
* List of office suites
* Comparison of word processors
* Comparison of document-markup languages
* List of word processors
* LyX
* Visual editor

## References

1. ↑ "Downloading and installing TeXmacs (FSF GNU project)". Texmacs.org. http://www.texmacs.org/tmweb/download/download.en.html.
2. ↑ "The GNU General Public License". Texmacs.org. http://www.texmacs.org/tmweb/about/license.en.html.
3. ↑ Frequently asked questions (FSF GNU project)
4. ↑ "Authors of GNU TeXmacs". https://www.texmacs.org/tmweb/about/authors.en.html.
5. ↑ Brown, Susan (2015-03-01). "Remediating the Editor". Interdisciplinary Science Reviews 40 (1): 78–94. doi:10.1179/0308018814Z.000000000106. ISSN 0308-0188. Bibcode: 2015ISRv...40...78B.
6. ↑ Brooks, K.P. (June 1991). "Lilac: a two-view document editor". Computer 24 (6): 7–19. doi:10.1109/2.86832. ISSN 0018-9162. http://dx.doi.org/10.1109/2.86832.
7. ↑ "GriF SGML Editor". https://markupuk.org/webhelp/grif.html. [yes|permanent dead link|dead link}}]
8. ↑ "Thot structured document editor". http://opera.inrialpes.fr/Thot/index.html.
9. ↑ A structured document model, Clement Shin Tai-Yin, PhD Thesis, Department of Computing, Imperial College London, 1989
10. ↑ "Editing Graphical Objects Using Procedural Representations", Paul Asente, PhD Thesis, Department of Computer Science, Stanford University (1987)
11. ↑ CWRC-Writer: An In-Browser XML Editor, G. Rockwell et al., Digital Humanities 2012 Conference
12. ↑ van der Hoeven, Joris (2006-08-21). "GNU TeXmacs: a scientific editing platform". pp. 7f. http://www.texmacs.org/Samples/texmacs.pdf. "Since TeXmacs is not a LaTeX front-end, it follows that we can only ensure correct conversions for a (quite large) sublanguage of LaTeX."
13. ↑ van der Hoeven, Joris; Seidl, Andreas (2011). "Frequently asked questions". http://www.texmacs.org/tmweb/help/faq.en.html#general-1.
14. ↑ van der Hoeven, Joris (2012). "Welcome to GNU TeXmacs". http://www.texmacs.org/tmweb/home/welcome.en.html.
15. ↑ 15.0 15.1 van der Hoeven, Joris. "GNU TeXmacs, A free, structured, wysiwyg and technical text editor". Cahiers Gutenberg 39-40: 39–50. http://cahiers.gutenberg.eu.org/cg-bin/article/CG_2001___39-40_39_0.pdf.
16. ↑ "The TeXmacs manual. 2.2, Typing structured text.". https://www.texmacs.org/tmweb/documents/manuals/texmacs-manual.en.pdf.
17. ↑ "GNU TEXMACS user manual; 11.2. Rendering of style files and packages". http://www.texmacs.org/tmweb/documents/manuals/texmacs-manual.en.pdf.
18. ↑ See the user manual : « Typing mathematical symbols ».
19. ↑ van der Hoeven, Joris. "The TeXmacs format". https://www.texmacs.org/tmweb/manual/webman-format.en.html.
20. ↑ 20.0 20.1 M. Gubinelli, The Guile in TeXmacs, presentation at the Guile and Guix Days in Strasbourg, June 21–22, 2019 pdf Retrieved 2019-09-21.
21. ↑ "The TeXmacs Manual; 11.1 Writing a simple style package". http://www.texmacs.org/tmweb/documents/manuals/texmacs-manual.en.pdf.
22. ↑ "TeXmacs user manual, section "Traversal of a presentation"". http://www.texmacs.org/tmweb/documents/manuals/texmacs-manual.en.pdf.

## External links

* texmacs-users mailing list archives
* Forum

* v
* t
* e

Word processors

* List
* Comparison
* of early word processors

Open-source|

* AbiWord
* Apache OpenOffice Writer
* Bean (up to v. 2.x)
* Calligra Words
* GNU TeXmacs
* KWord
* LibreOffice Writer
* LyX
* NeoOffice Writer
* OpenOffice Writer
* ShareLaTeX
* Ted

Freeware|

* Adobe Buzzword
* Atlantis Nova
* Bean (since v. 3.x)
* Google Docs
* IBM Lotus Symphony
* Jarte (standard)
* TextMaker (2008)

Retail|

| Cross-platform|

* Adobe InCopy
* Corel WordPerfect (up to v. 9.0)
* Hangul
* Ichitaro
* Kingsoft Writer
* Microsoft Word
* Scrivener
* StarOffice Writer
* TextMaker

|

Classic Mac OS only
(and Classic Environment)|

* Nisus Writer

MacOS only|

* Apple Pages
* Mellel
* Nisus Writer Express

Windows only|

* Atlantis Word Processor
* Corel WordPerfect (since v. 10.0)
* IBM Lotus Word Pro
* Jarte (enhanced)
* Microsoft Works
* Nota Bene
* MobiSystems OfficeSuite
* PolyEdit
* Scientific WorkPlace
* WordPad
* XyWrite

Hardware word processors (pre-PC)|

* AlphaSmart
* CPT Corporation
* Friden Flexowriter
* IBM Displaywriter System
* IBM MT/ST
* Wang

* Category

* v
* t
* e

TeX editors

Open source|

* AUCTEX
* GNOME LaTeX
* GNU TeXmacs
* Gummi
* Kile
* LyX
* MeWa
* ShareLaTeX
* Texmaker
* TeXnicCenter
* TeXShop
* TeXstudio
* TeXworks

Freeware|

* LaTeX-Editor (LEd)
* proTeXt
* WinShell

Retail|

* Scientific WorkPlace
* WinEdt

* Category
* Comparison

* v
* t
* e

GNU Project

History|

* GNU Manifesto
* Free Software Foundation
* Europe
* India
* Latin America
* History of free software

Licenses|

* GNU General Public License
* linking exception
* font exception
* GNU Lesser General Public License
* GNU Affero General Public License
* GNU Free Documentation License

Software|

* GNU (variants)
* Hurd
* Linux-libre
* glibc
* Bash
* coreutils
* findutils
* Build System
* GCC
* binutils
* GDB
* GRUB
* GNOME
* GNUstep
* GIMP
* Jami
* GNU Emacs
* GNU TeXmacs
* GNU Octave
* GNU R
* GSL
* GMP
* GNU Electric
* GNU Archimedes
* GNUnet
* GNU Privacy Guard
* Gnuzilla (IceCat)
* GNU Health
* GNUmed
* GNU LilyPond
* GNU Go
* GNU Chess
* Gnash
* Guix
* Guix System Distribution
* more...

Public
speakers|

* Alexandre Oliva
* Benjamin Mako Hill
* Bradley M. Kuhn
* Federico Heinz
* Frédéric Couchet
* Georg C. F. Greve
* John Sullivan
* José E. Marchesi
* Joshua Gay
* Kefah T. Issa
* Loïc Dachary
* Nagarjuna G.
* Peter Heath
* Richard M. Stallman

Other topics|

* GNU/Linux naming controversy
* Revolution OS
* Free Software Foundation anti-Windows campaigns
* Defective by Design

* v
* t
* e

Software in the Public Interest

People|

* Martin Michlmayr (President)
* Bdale Garbee

Projects|

* 0 A.D.
* Arch Linux
* Debian
* Drizzle
* Drupal
* FFmpeg
* Fluxbox
* freedesktop.org
* FreedomBox
* Gallery Project
* GNU TeXmacs
* GNUstep
* Jenkins
* LibreOffice
* MinGW
* Open and Free Technology Community
* Open Bioinformatics Foundation
* Open64
* OpenEmbedded
* OpenVAS
* OpenWrt
* PostgreSQL
* Privoxy
* SproutCore
* X.Org Foundation
* YafaRay

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/GNU TeXmacs. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:GNU_TeXmacs&oldid=3454439"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template