我是使用Linux系统的新手。
我的工作是使用LaTeX编写文档,然后将该文件转换为pdf文件以提交。因此,我尝试使用CentOS这样做。我的Linux系统的版本是RedHat。我在网上寻找了将.tex文件转换为.pdf的方法,这告诉我要安装texlive。所以我照做了。
[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
因此,我寻找了解决此问题的方法,并建议其中一个使用rpm -qa | grep tex
命令的网站。但是我在哪里找不到pdflatex文件。
[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]$
这是我键入命令时看到的。
当我尝试使用pdflatex,latex或pdftex命令时,这就是我得到的。
[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}
?
我不明白为什么我的系统不像其他人所说的那样无法识别。
PS哦,以防万一,我想附加我的.tex文件,想知道我在文件中写入的内容是否引起了问题。
\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}