How To Install tex-preview on CentOS 7

In this tutorial we learn how to install tex-preview on CentOS 7. tex-preview is Preview style files for LaTeX

Introduction

In this tutorial we learn how to install tex-preview on CentOS 7.

What is tex-preview

The preview package for LaTeX allows for the processing of selected parts of a LaTeX input file. This package extracts indicated pieces from a source file (typically displayed equations, figures and graphics) and typesets with their base point at the (1in,1in) magic location, shipping out the individual pieces on separate pages without any page markup. You can produce either DVI or PDF files, and options exist that will set the page size separately for each page. In that manner, further processing (as with Ghostscript or dvipng) will be able to work in a single pass. The main purpose of this package is the extraction of certain environments (most notably displayed formulas) from LaTeX sources as graphics. This works with DVI files postprocessed by either Dvips and Ghostscript or dvipng, but it also works when you are using PDFTeX for generating PDF files (usually also postprocessed by Ghostscript). The tex-preview package is generated from the AUCTeX package for Emacs.

We can use yum or dnf to install tex-preview on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install tex-preview.

Install tex-preview on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install tex-preview

Install tex-preview on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install tex-preview

How To Uninstall tex-preview on CentOS 7

To uninstall only the tex-preview package we can use the following command:

sudo dnf remove tex-preview

References

Summary

In this tutorial we learn how to install tex-preview on CentOS 7 using yum and dnf.