Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/martinhelso/listings-macaulay2
- Owner: martinhelso
- License: mit
- Created: 2018-11-25T20:29:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-01T19:44:29.000Z (over 4 years ago)
- Last Synced: 2024-11-05T14:56:37.281Z (about 2 months ago)
- Topics: latex
- Language: TeX
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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},
}
```