summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ffcode/README.md
blob: 5301bd65df202a513850d7f4301630d70f8320c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Fixed-Font LaTeX Primitive: `\ff` and `\begin{ffcode}`

[![make](https://github.com/yegor256/ffcode/actions/workflows/l3build.yml/badge.svg)](https://github.com/yegor256/ffcode/actions/workflows/l3build.yml)
[![CTAN](https://img.shields.io/ctan/v/ffcode)](https://ctan.org/pkg/ffcode)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/ffcode/blob/master/LICENSE.txt)

This LaTeX package helps you write source code in your academic papers
and make sure it looks neat. The package uses
[`listings`](https://ctan.org/pkg/listings)
and [`tcolorbox`](https://ctan.org/pkg/tcolorbox) packages.

First,
[install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
from [CTAN](https://ctan.org/pkg/ffcode)
and then use in the preamble:

```tex
\documentclass{article}
\usepackage{ffcode}
\begin{document}
The function \ff{r()} reads the file:
\begin{ffcode}
void r() {
  // read the file
}
\end{ffcode}
\end{document}
```

Otherwise, you can download
[`ffcode.sty`](https://yegor256.github.io/ffcode/ffcode.sty) and
add to your project.

If you want to contribute yourself, make a fork, then create a branch,
then run `l3build ctan` in the root directory.
It should compile everything without errors. If not, submit an issue and wait.
Otherwise, make your changes and then run `l3build ctan` again. If the build is
still clean, submit a pull request.