Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/martinhelso/listings-macaulay2

Listings language file for Macaulay2
https://github.com/martinhelso/listings-macaulay2

latex

Last synced: 3 days ago
JSON representation

Listings language file for Macaulay2

Awesome Lists containing this project

README

        

# Macaulay2 for listings

The file `lstlang0.sty` defines _Macaulay2_ as a language in the LaTeX package `listings`.

## Usage

Store `lstlang0.sty` in the working folder or in the same directory as the other `listings` files.

### Choice of language
The language can be set globally in the document with
```LaTeX
\lstset{language = Macaulay2}
```
It can be set locally with
```LaTeX
\lstinputlisting[language = Macaulay2]{filename}
```
or
```LaTeX
\begin{lstlisting}[language = Macaulay2]
...
\end{lstlisting}
```

### Formatting
The keywords are divided into the same four types as in the highlighting done by `emacs`. By default, all four types are typeset in the same style. Individual styles can be chosen for each type:
```LaTeX
\lstset
{
keywordstyle = [1]\bfseries,
keywordstyle = [2]\itshape,
keywordstyle = [3]\sffamily,
keywordstyle = [4]\color{blue},
}
```