ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Latex 安装包 metropolis

2021-10-20 19:01:03  阅读:249  来源: 互联网

标签:Latex metropolis latex ctex your source 安装包 sty


latex 安装包metropolis

官方步骤如下,略显简略:

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

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

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

  3. 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).

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

实际操作

以安装metropolis包为例。
第一步:下载、解压metropolis包,比如解压在“D:\ctex\latex_packages\”项目下。
第二步:打开source,找到beamerthememetropolis.ins文件,并在命令提示符内运行出.sty文件。如下:
运行前
在这里插入图片描述
在cmd运行:转换路径到包的source文件所在路径,

C:\Users\Jasmin>cd /d d:
D:\>cd ctex\latex_packages\metropolis\source

输入“latex beamerthememetropolis.ins”:

D:ctex\latex_packages\metropolis\source>latex  beamerthememetropolis.ins

运行后:
在这里插入图片描述
第三步:将生成的 .sty文件放入LaTeX能够识别的路径下,在ctex下,这个路径样子以我电脑为例,是“D:\Software\Tools\ctex\MiKTeX\tex\latex”,可以在这个路径下建立一个文件夹,如“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 theme
\title{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}

标签:Latex,metropolis,latex,ctex,your,source,安装包,sty
来源: https://blog.csdn.net/Jasmin_9923/article/details/120809138

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有