| 1 |
# Fixed-Font LaTeX Primitive: `\ff` and `\begin{ffcode}` |
| 2 |
|
| 3 |
[](https://github.com/yegor256/ffcode/actions/workflows/l3build.yml) |
| 4 |
[](https://ctan.org/pkg/ffcode) |
| 5 |
[](https://github.com/yegor256/ffcode/blob/master/LICENSE.txt) |
| 6 |
|
| 7 |
This LaTeX package helps you write source code in your academic papers |
| 8 |
and make sure it looks neat. The package uses |
| 9 |
[`listings`](https://ctan.org/pkg/listings) |
| 10 |
and [`tcolorbox`](https://ctan.org/pkg/tcolorbox) packages. |
| 11 |
|
| 12 |
First, |
| 13 |
[install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages) |
| 14 |
from [CTAN](https://ctan.org/pkg/ffcode) |
| 15 |
and then use in the preamble: |
| 16 |
|
| 17 |
```tex |
| 18 |
\documentclass{article} |
| 19 |
\usepackage{ffcode} |
| 20 |
\begin{document} |
| 21 |
The function \ff{r()} reads the file: |
| 22 |
\begin{ffcode} |
| 23 |
void r() { |
| 24 |
// read the file |
| 25 |
} |
| 26 |
\end{ffcode} |
| 27 |
\end{document} |
| 28 |
``` |
| 29 |
|
| 30 |
Otherwise, you can download |
| 31 |
[`ffcode.sty`](https://yegor256.github.io/ffcode/ffcode.sty) and |
| 32 |
add it to your project. |
| 33 |
|
| 34 |
If you want to contribute yourself, make a fork, then create a branch, |
| 35 |
then run `l3build ctan` in the root directory. |
| 36 |
It should compile everything without errors. If not, submit an issue and wait. |
| 37 |
Otherwise, make your changes and then run `l3build ctan` again. If the build is |
| 38 |
still clean, submit a pull request. |