Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 161 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,176 @@
# tm-julia

A [TeXmacs](https://www.texmacs.org/tmweb/home/welcome.en.html) plugin for the [Julia](https://julialang.org) language
A plugin that integrates the **Julia programming language** with **GNU TeXmacs**, enabling interactive Julia sessions directly inside TeXmacs documents.

(c) 2021 Massimiliano Gubinelli <mgubi@mac.com>
This allows users to run Julia code, display results, and generate plots within a scientific writing environment similar to computational notebooks such as Jupyter.

This is still a development version lacking some features. Features request, bug reports and pull requests are welcome.
(c) 2021 Massimiliano Gubinelli <mgubi@mac.com>

### TODO
This project is still under development and some features are not yet implemented. Feature requests, bug reports, and pull requests are welcome.

* Better documentation
* Background computations
* Prettyprinting using TeXmacs formatting
* Syntax highlight in sessions (this will require to change the C++ sources)
---

## Features

- Interactive Julia sessions inside TeXmacs
- Execution of Julia code blocks
- Display of computation results in the document
- Support for graphical output (plots and images)
- Integration with scientific and mathematical documents

### Installation
---

To use the plugin just clone this repository and create a symbolic link to it from `$TEXMACS_HOME_PATH/plugin/julia`
## Requirements

E.g. if you clone in $REPOSITORY_DIR then
Before installing the plugin make sure the following software is installed:

- GNU TeXmacs
- Julia

You can verify that Julia is installed correctly by running:

```bash
julia --version
```

Julia must be available in your system `PATH`.

---

## Installation

### Linux / macOS

Clone the repository:

```bash
git clone https://github.com/mgubi/tm-julia.git
```

Create a symbolic link from the repository directory to the TeXmacs plugins directory:

```bash
ln -s $REPOSITORY_DIR $TEXMACS_HOME_PATH/plugins/julia
```

You should then be able to insert a Julia session from the TeXmacs menu `Insert->Sessions->Julia`
Example:

```bash
ln -s ~/tm-julia ~/.TeXmacs/plugins/julia
```

Restart TeXmacs after installation.

---

### Windows

1. Clone the repository:

```bash
git clone https://github.com/mgubi/tm-julia.git
```

2. Navigate to the TeXmacs configuration directory:

```
C:\Users\<username>\AppData\Roaming\TeXmacs\
```

3. Create a folder named:

```
plugins
```

4. Copy the repository folder into the plugins directory and rename it to:

```
julia
```

The final directory structure should look like this:

```
TeXmacs
└── plugins
└── julia
├── julia
├── progs
├── examples
└── README.md
```

5. Restart TeXmacs.

---

## Usage

After installation open TeXmacs and start a Julia session from the menu:

```
Insert → Session → Julia
```

You can now run Julia code inside the document.

Example:

```julia
2 + 2
```

Output:

```
4
```

### Example: Plotting

```julia
using Plots
plot(sin, 0, 10)
```

The generated plot will appear directly inside the TeXmacs document.

---

## Project Structure

```
tm-julia
├── julia/ Julia backend code
├── progs/ TeXmacs plugin initialization
├── examples/ Example TeXmacs documents
└── README.md
```

---

## TODO

The plugin is still under development. Planned improvements include:

- Better documentation
- Background computations
- Pretty printing using TeXmacs formatting
- Syntax highlighting in sessions (requires changes in TeXmacs C++ sources)

---

## Contributing

Contributions are welcome.

You can help by:

- improving documentation
- reporting bugs
- suggesting new features
- submitting pull requests

*Before submitting a pull request, please ensure that the plugin works correctly with your changes.*