首页 > 编程知识 正文

linux安装latex,latex安装

时间:2023-05-06 07:50:12 阅读:241941 作者:851

latex 安装包metropolis 官方步骤如下,略显简略:

Installing Metropolis from source, like any Beamer theme, involves four easy
steps:

Download the source with a git clone of the Metropolis repository or as a zip archive of the latest development version.

Compile the style files by running make sty inside the downloaded
directory. (Or run LaTeX directly on source/metropolistheme.ins.)

Move the resulting *.sty files to the folder containing your
presentation. To use Metropolis with many presentations, run make install
or move the *.sty files to a folder in your TeX path instead (might require
sudo rights).

Use the theme for your presentation by declaring usetheme{metropolis} in
the preamble of your Beamer document.

实际操作

以安装metropolis包为例。
第一步:下载、解压metropolis包,比如解压在“D:ctexlatex_packages”项目下。
第二步:打开source,找到beamerthememetropolis.ins文件,并在命令提示符内运行出.sty文件。如下:
运行前

在cmd运行:转换路径到包的source文件所在路径,

C:UsersJasmin>cd /d d:D:>cd ctexlatex_packagesmetropolissource

输入“latex beamerthememetropolis.ins”:

D:ctexlatex_packagesmetropolissource>latex beamerthememetropolis.ins

运行后:

第三步:将生成的 .sty文件放入LaTeX能够识别的路径下,在ctex下,这个路径样子以我电脑为例,是“D:SoftwareToolsctexMiKTeXtexlatex”,可以在这个路径下建立一个文件夹,如“metropolis”文件夹,然后把生成的所有.sty文件放入“metropolis”文件夹内,如下:

第四步:在电脑里找到MikTex的settings这个程序,settings有两个,选择后面括号里有admin的那个,

我使用的是:打开winedt,点开Tex选项,依次点击MikTex–MikTex Package Manager

打开以后,在general选项卡下有Refresh FNDB按钮,点击(可以点击多次),过一会(或者重启软件),这个package就会加入MikTex的路径中,然后在你的tex文件中就可以使用这个package了。
Notes: 如果发现refresh报错,原因在于有在运行的TEX文件。可以选择重启软件或者重启电脑。

documentclass{beamer}usetheme{metropolis} % Use metropolis themetitle{A minimal example}date{today}author{Matthias Vogelgesang}institute{Centre for Modern Beamer Themes}begin{document} maketitle section{First Section} begin{frame}{First Frame} Hello, world! end{frame}end{document}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。