Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/szhorvat/MaTeX

LaTeX labels in Mathematica
https://github.com/szhorvat/MaTeX

latex latex-labels mathematica wolfram-language wolfram-mathematica

Last synced: 12 days ago
JSON representation

LaTeX labels in Mathematica

Awesome Lists containing this project

README

        

[![GitHub (pre-)release](https://img.shields.io/github/release/szhorvat/MaTeX/all.svg)](https://github.com/szhorvat/MaTeX/releases)
[![Github All Releases](https://img.shields.io/github/downloads/szhorvat/MaTeX/total.svg)](https://github.com/szhorvat/MaTeX/releases)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/szhorvat/MaTeX/issues)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.883841.svg)](https://doi.org/10.5281/zenodo.883841)

----

[English](README.md) | [中文](README.zh_cn.md)

----

# MaTeX

Create LaTeX labels in *Mathematica*.

See [the blog post](http://szhorvat.net/pelican/latex-typesetting-in-mathematica.html) for a detailed introduction to MaTeX and up to date troubleshooting information.

## Installation

**In Mathematica 11.3 or later, simply evaluate `ResourceFunction["MaTeXInstall"][]` to install or upgrade MaTeX.**

In older versions that do not support resource functions, follow the manual installation instructions:

- [Download the latest release](https://github.com/szhorvat/MaTeX/releases), distributed as a `.paclet` file, and install it using the `PacletInstall` function in Mathematica. For example, assuming that the file `MaTeX-1.7.10.paclet` was downloaded into the directory `~/Downloads`, evaluate

```mma
Needs["PacletManager`"]
PacletInstall["~/Downloads/MaTeX-1.7.10.paclet"]
```

The most convenient way to obtain the path to a file is Mathematica's Insert → File Path... menu command.

- Make sure that [a TeX system](https://tug.org/begin.html) and Ghostscript 9.15 or later are installed.

For Windows and Linux, the latest Ghostscript is available from [its official download page](http://ghostscript.com/download/gsdnld.html).

On OS X, MacTeX 2015 and later already include a compatible version of Ghostscript. If you use an older TeX distribution that doesn't, please obtain a recent Ghostscript from [Richard Koch's page](http://pages.uoregon.edu/koch/).

- Evaluate ``< "Necklace"], "Downloading...", Right],
Print["Downloading..."]
];
URLSave[download, target]
,
Return[$Failed]
];
If[FileExistsQ[target], PacletManager`PacletInstall[target], $Failed]
]
```

After evaluating the function definition above, just run `updateMaTeX[]`, then ``< True` ensures that the the output height is at least one line height
- Added `LineSpacing` option
- The size of vertical borders is slightly different now: use `LineSpacing -> {0, 14.4}` to reproduce the older behaviour
- Bug fixes

#### Version 1.1.1

- Reliability fixes for Windows
- Windows: Work around Mathematica bug causing MaTeX to fail when the current directory has special characters in its name
- Windows: Ensure that auto-detected paths do not use `/` as path separator

#### Version 1.1.0

- MaTeX now attempts to automatically detect the location of Ghostscript and pdflatex on first run
- Syntax highlighting for MaTeX functions (added SyntaxInformation)
- Minor bug fixes and reliability fixes

#### Version 1.0.0

- Minor bug fixes and compatibility fixes

#### Version 0.3

- Bug fixes and other compatibility fixes: works with XeTeX and behaves better on Windows.

#### Version 0.2

- Automatic baseline alignment. MaTeX output is now perfectly aligned with Mathematica text.
- Improved positioning accuracy
- Added `FontSize` option (now requires the `lmodern` package)
- Support for some accented characters
- More robust `Magnification` handling

#### Version 0.1

- Initial release

## Feedback

MaTeX was primarily created for my own needs. However, if you find it useful, feel free to drop me an email.

Send feedback or bug reports to `szhorvat` at `gmail.com` or [open an issue in the tracker](https://github.com/szhorvat/MaTeX/issues).