Centos – Question about using pdflatex on RedHat in CentOS

centoslatex

I am a novice in using Linux systems.

I was given an assignment of writing a document using LaTeX and converting the file into a pdf file to submit. So I tried using my CentOS to do so. The version of my Linux system is RedHat. I've looked up ways to convert .tex file into .pdf on the web, which told me to install texlive. So I did so.

[csi2102@localhost]$ yum install -y texlive
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
  * base: data.nicehosting.co.kr
  * extras: data.nicehosting.co.kr
  * updates: data.nicehosting.co.kr
Setting up Install Process
Package texlive-2007-57.e.16_2.i686 already installed and latest version
Nothing to do

So I looked up for ways to solve this problem and one of the websites suggested of using rpm -qa | grep tex command. But nowhere could I find the pdflatex file.

[csi2102@localhost]$ rpm -qa | grep tex
texlive-texmf-errata-dvips-2007.7.1.e16.noarch
texlive-2007.57.e16_2.i686
texlive-texmf-errata-fonts-2007.7.1e16.noarch
texlive-texmf-2007-38.e16.noarch
texlive-texmf-fonts-2007-38.e16.noarch
texlive-texmf-errata-2007-7.1.e16.noarch
texlive-texmf-dvips-2007-38.e16.noarch
[csi2102@localhost]$ 

This is what I saw when I typed the command.

When I try to use pdflatex, latex, or pdftex command, this is what I get.

[csi2102@localhost]$ latex homework
bash: latex: command not found
[csi2102@localhost]$ pdflatex homework
bash: pdflatex: command not found
[csi2102@localhost]$ pdftex homework
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
 %&-line parsing enabled.
entering extended mode
(./homework1.tex
!Undefined control sequence.
1.7 \documentclass
                   [pdftex,11pt] {article}
?

I don't see why my system would not recognize unlike how other people have been saying.

P.S. Oh, and just in case, I wanted to attach my .tex file wondering if what I have written in my file was creating the problem.

\documentclass[pdftex,11pt] {article}
\usepackage[utf8] {inputenc}

\usepackage{geometry}
\gemoetry{a4paper}

\usepackage[dvips]{graphicx}
\usepackage{pslatex}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\lhead{}\chead{}\rhead{Introduction to Engineering Design}
\lfoot{}\cfoot{\thepage}\rfoot{}

\usepacakge{sectsty}
\allsectionsfont{\sffamily\mdseries\upshape}

\title{What is \LaTex ?}
\author{2013147549 Geun Ho Lee}
\date{}

\begin{document}
\maketitle

 LaTex is a document preparation system that is most often used for medium-to-large technical or scientific documents. It is not, however, a word processor. It is based on the idea that it would be more efficient for the authors to write their documents and let the document designers to worry about the document design. LaTex consists of several features ranging from typesetting journal articles, technical reports, books, and slide presentations to automatically generating bibliographies and indexes.

 LaTex is based on the TeX typesetting language or certain extensions of it. LaTex was first developed in 1985 by Leslie Lamport and is now maintained and developed by the LaTex3 Project.

 (source: http://latex-project.org/intro.html)

\end{document}

Best Answer

You're missing some stuff. This is on Fedora but the same pattern should hold on CentOS:

> yum whatprovides latex

Loaded plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit, verify
texlive-latex-2007-70.fc17.x86_64 : The LaTeX front end for the TeX text formatting system
Repo        : fedora
Matched from:
Filename    : /usr/bin/latex

I don't see texlive-latex anywhere in your list. The same package is mentioned for yum whatprovides pdflatex, so...

> yum install texlive-latex
Related Question