受到is-latex-worth-learning-today和许多Windows的如何操作的启发,
如何在Linux上开始使用LaTeX?
如何生成PDF文件并放弃OOO Word处理器?
更新:
感谢这里提供的所有建议。我能够使用Beamer类创建一个很棒的ppt:http://github.com/becomingGuru/gids-django-ppt。我发现这种方法比使用PowerPoint之类的软件要好得多。
受到is-latex-worth-learning-today和许多Windows的如何操作的启发,
如何在Linux上开始使用LaTeX?
如何生成PDF文件并放弃OOO Word处理器?
更新:
感谢这里提供的所有建议。我能够使用Beamer类创建一个很棒的ppt:http://github.com/becomingGuru/gids-django-ppt。我发现这种方法比使用PowerPoint之类的软件要好得多。
如果您使用的是Debian或Ubuntu,可以执行以下操作:
apt install texlive
..会安装好的。
RedHat或CentOS需要:
yum install tetex
\documentclass[a4paper,12pt]{article}
\begin{document}
The foundations of the rigorous study of \emph{analysis}
were laid in the nineteenth century, notably by the
mathematicians Cauchy and Weierstrass. Central to the
study of this subject are the formal definitions of
\emph{limits} and \emph{continuity}.
Let $D$ be a subset of $\bf R$ and let
$f \colon D \to \mathbf{R}$ be a real-valued function on
$D$. The function $f$ is said to be \emph{continuous} on
$D$ if, for all $\epsilon > 0$ and for all $x \in D$,
there exists some $\delta > 0$ (which may depend on $x$)
such that if $y \in D$ satisfies
\[ |y - x| < \delta \]
then
\[ |f(y) - f(x)| < \epsilon. \]
One may readily verify that if $f$ and $g$ are continuous
functions on $D$ then the functions $f+g$, $f-g$ and
$f.g$ are continuous. If in addition $g$ is everywhere
non-zero then $f/g$ is continuous.
\end{document}
latex test.tex
=> latex test.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./test.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
No file test.aux.
[1] (./test.aux) )
Output written on test.dvi (1 page, 1508 bytes).
Transcript written on test.log.
xdvi test.dvi &
pdflatex test.tex
..然后你会得到一个test.pdf文件,而不是test.dvi文件。
在这一切正常运行之后,我建议你去LaTeX入门页面,并按照那里的内容逐项进行操作,以满足你撰写文档所需的功能。
未来需要考虑的事项包括:
使用工具如 xfig 或 dia 来创建图表。这些图表可以以多种格式轻松插入到您的文档中。请注意,如果您正在创建 PDF 文件,则不应使用 EPS(封装的 PostScript)格式的图像 - 如果可能,请使用从图表编辑器导出的 PDF,或者您可以使用 epstopdf
包将 (e)ps 自动转换为包含在 \includegraphics
中的 pdf 图片。
开始在您的文档中使用版本控制。起初可能会觉得有些过度,但当您撰写大型文档时,能够回溯和查看早期版本非常有用。
使用 make 命令来运行 LaTeX。当您开始使用参考文献、图片和其他更复杂的 LaTeX 功能时,您会发现需要对多个文件或多次运行 LaTeX(第一次更新引用,第二次将引用放入文档中,因此如果不运行两次 LaTeX,引用可能已过时...)。将这个过程抽象成一个 makefile 可以节省大量时间和精力。
使用更好的编辑器。像 Emacs + AUCTeX 这样的编辑器非常强大。当然,这是一个高度主观的话题,所以我就说到这里(还有 Emacs 显然是最佳选择 :)
要在Linux上开始使用LaTeX,您需要安装几个软件包:
您需要一个 LaTeX发行版。这是组成(La)TeX计算机排版系统的程序集。 Unix系统上的标准LaTeX发行版曾经是teTeX,但已被TeX Live所取代。大多数Linux发行版都有TeX Live的安装包 - 例如,查看Ubuntu和Fedora的包数据库条目。
您可能需要安装一个 LaTeX编辑器。标准的Linux文本编辑器也可以正常工作; 特别是,Emacs有一个称为AUCTeX的(La)TeX编辑宏的不错集合。也存在专门的LaTeX编辑器; 其中,Kile(KDE集成的LaTeX环境)非常不错。
您可能需要一份 LaTeX教程。经典的教程是“A(Not So)Short Introduction to LaTeX2e”,但现在LaTeX Wikibook可能是更好的选择。
我建议开始使用Lyx,这样你就可以像使用OOO-Writer一样轻松使用Latex。 它让你有可能通过手动添加Latex代码到你的文档来更深入地学习Latex。 安装后PDF只需一次点击即可获得。 Lyx是跨平台的。
如果您使用Ubuntu或Debian,我制作了一份易于跟随的教程:在Ubuntu或Debian上安装LaTeX。本教程解释了如何安装LaTeX以及如何创建您的第一个PDF。
这取决于您的Linux发行版和编辑器偏好等因素,但我建议从Kile(一个KDE应用程序)开始,因为它易于学习,并且安装它应该会安装大多数LaTex和PDF生成所需的包。只需查看截图即可。
我个人会使用完整的编辑套件,例如:
然后,我会安装"MikTeX"作为编译套件,它可以使用pdfLaTeX
编译器从您的文档生成PDF。
yum -y install texlive
对于我的CentOS发行版来说,安装LaTeX命令还不够。
这个网站https://gist.github.com/melvincabatuan/350f86611bc012a5c1c6包含了额外的软件包。特别是:
yum -y install texlive texlive-latex texlive-xetex
作者提到这些已经足够了,但同时也指出了以下内容:
yum -y install texlive-collection-latex
yum -y install texlive-collection-latexrecommended
yum -y install texlive-xetex-def
yum -y install texlive-collection-xetex
仅在需要时使用:
yum -y install texlive-collection-latexextra
大多数编辑器,如vim或emacs都带有TeX 编辑模式。您还可以获得所谓的WYSIWYG前端(技术上为WYSIWYM),其中最著名的可能是LyX.。
介绍LaTeX最好的快速方法是Oetiker的“LaTeX简明介绍”。
LaTeX的工作方式类似于编译器。您编译LaTeX文档(可以包括其他文件),这将生成一个称为.dvi
(设备无关)的文件。这可以使用各种后处理程序进行后处理以生成各种格式(包括PDF)。
要生成PDF,请使用dvips
并使用标志-PPDF(如果我没记错的话 - 我手头没有makefile)生成具有设置字体呈现的PS,以便转换为pdf。然后可以使用ps2pdf
或Distiller(如果您有此软件)进行PDF转换。
在此环境中,包含图形的最佳格式是eps
(封装的Postscript),尽管并非所有软件都会生成行为良好的Postscript。可以使用各种机制包括jpeg或其他格式的照片。