How To Install texlive-listings on Fedora 36

In this tutorial we learn how to install texlive-listings in Fedora 36. texlive-listings is Typeset source code listings using LaTeX

Introduction

In this tutorial we learn how to install texlive-listings on Fedora 36.

What is texlive-listings

The package enables the user to typeset programs (programming code) within LaTeX; the source code is read directly by TeX–no front-end processor is needed. Keywords, comments and strings can be typeset using different styles (default is bold for keywords, italic for comments and no special style for strings). Support for hyperref is provided. To use, \usepackage{listings}, identify the language of the object to typeset, using a construct like use environment lstlisting for inline code. External files may be formatted using \lstinputlisting to process a given file in the form appropriate for the current language. Short (in-line) listings are also available, using either \lstinline|…| or |…| (after defining the | token with the \lstMakeShortInline command).

We can use yum or dnf to install texlive-listings on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install texlive-listings.

Install texlive-listings on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install texlive-listings using dnf by running the following command:

sudo dnf -y install texlive-listings

Install texlive-listings on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install texlive-listings using yum by running the following command:

sudo yum -y install texlive-listings

How To Uninstall texlive-listings on Fedora 36

To uninstall only the texlive-listings package we can use the following command:

sudo dnf remove texlive-listings

texlive-listings Package Contents on Fedora 36

/usr/share/licenses/texlive-listings
/usr/share/licenses/texlive-listings/lppl1.3.txt
/usr/share/texlive/texmf-dist/tex/latex/listings
/usr/share/texlive/texmf-dist/tex/latex/listings/listings-acm.prf
/usr/share/texlive/texmf-dist/tex/latex/listings/listings-bash.prf
/usr/share/texlive/texmf-dist/tex/latex/listings/listings-fortran.prf
/usr/share/texlive/texmf-dist/tex/latex/listings/listings-hansl.prf
/usr/share/texlive/texmf-dist/tex/latex/listings/listings-lua.prf
/usr/share/texlive/texmf-dist/tex/latex/listings/listings-python.prf
/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg
/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty
/usr/share/texlive/texmf-dist/tex/latex/listings/lstdoc.sty
/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty
/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang2.sty
/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang3.sty
/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty

References

Summary

In this tutorial we learn how to install texlive-listings on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).