在TexLive环境下安装数学公式字体库mathtime

在TexLive环境下安装数学公式字体宏包mathtime

ctan

下载宏包

该宏包包含以下四个文件:

NameSizeDate
mathtime.dtx42kB1999-03-29
mathtime.ins2kB1997-07-08
mathtime.tet3kB1997-07-08
mtfonts.fdd9kB2001-05-30

点击上面的链接下载即可得到mathtime.zip文件。

安装宏包

上述mathtime.txt文件为该宏包的安装方式,下面我们将详细讲解该文件并给出安装过程。

解压缩mathtime.zip文件到mathtime文件夹;

打开mathtime.txt;

If you are using a Case Sensitive file system (such as UNIX)
and your LaTeX is older then the release of 1996/12/01 then edit the
file mathtime.ins to uncomment the line that is marked by the first
%%%% IMPORTANT NOTE %%%%%.
This will cause `fd’ files to be written in the old style (MY1mtt.fd)
rather than the new style (my1mtt.fd). On DOS or other case insensitive
systems this step may be omitted as MY1mtt.fd and my1mtt.fd refer to
the same file.

该部分是指如果所使用的文件系统区别大小写或者TexLive发行版的时间在1996/12/01之前需要将mathtime.ins文件中的第一个%%%% IMPORTANT NOTE %%%%%注释取消,(这一步可以大多数人可以直接跳过)。

If you have the basic MathTime font set, but not the bold math fonts
and other fonts that make up the MathTime Plus (or MathTime Complete)
font sets, then you should edit mathtime.ins to uncomment the line
marked by the second
%%%% IMPORTANT NOTE %%%%%.
This will cause the fd files written by the installation process
to refer to the more restricted set of fonts that you have available.

这里是指如果已经安装了基础的字库,但是缺少粗体等字体则需要将mathtime.ins文件中的第二个%%%% IMPORTANT NOTE %%%%%注释取消,首次该字体包可以选择忽略。

我们使用编辑器打开mathtime.ins文件,得到如下内容:

%% Copyright 1996 1997  Frank Mittelbach David Carlisle
%%
%% Development of this package was commissioned by Y&Y Inc.
%% http://www.yandy.com

\def\batchfile{mathtime.ins}
\input docstrip.tex
\preamble
\endpreamble

\def\writefd#1{\lowercase{\generateFile{#1}{f}}}
\def\mtplus{mtplus} 


%%%% IMPORTANT NOTE %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
% If your LaTeX is older than 1996/12/01 then uncomment this
% line to write the file names as `mixed case' if you are
% using a case sensitive system such as UNIX.
%
%\def\writefd#1{\generateFile{#1}{f}}
%
%%%% IMPORTANT NOTE %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
% If you have the `basic' MathTime font set, and *not*
% the extended MathTime Plus (or MathTime Complete) set
% then you should uncomment this line so that LaTeX does
% not attempt to access bold math fonts, or the new MTSYN
% font.
%
%\def\mtplus{}
%
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%


\keepsilent

\Msg{*** Generating .fd files using Mathtime fonts ***}

\writefd{MY1mtt.fd}{\from{mtfonts.fdd}{MY1mtt,\mtplus}}

\writefd{MY2mtt.fd}{\from{mtfonts.fdd}{MY2mtt,\mtplus}}

\writefd{MY3mtt.fd}{\from{mtfonts.fdd}{MY3mtt,\mtplus}}

% mathtime plus script

\writefd{Umtms.fd}{\from{mtfonts.fdd}{Umtms}}

% Adobe Math Pi Two for Fraktur and Script alphabets

\writefd{Umh2.fd}{\from{mtfonts.fdd}{Umh2}}

\writefd{Umh2scr.fd}{\from{mtfonts.fdd}{Umh2Scr}}

% Adobe Math Pi Six for Blackboard Bold alphabet

\writefd{Umh6.fd}{\from{mtfonts.fdd}{Umh6}}

% Lucida New Math Symbol for Calligraphy alphabet 

\writefd{OMSlby.fd}{\from{mtfonts.fdd}{lucidascale,OMSlby}}


\Msg{*** Generating packages for Mathtime fonts ***}
 
\generateFile{mathpi.sty}{f}{\from{mathtime.dtx}{package,mathpi}}
 
\generateFile{mathtime.sty}{f}{\from{mathtime.dtx}{package,mathtime}}


\Msg{*** Generating Encoding file for Math Pi Two font ***}

\postamble
\endpostamble
% the encoding file to reencode the Pi Two font

\generateFile{mh2scr.enc}{f}{\from{mtfonts.fdd}{mh2screnc}}

如果用户属于上一条的第一个条件此处需要将第一个%%%% IMPORTANT NOTE %%%%%下面%\def\writefd#1{\generateFile{#1}{f}}这行代码注释掉的内容取消注释。如果属于第二种情况则需要将第二个%%%% IMPORTANT NOTE %%%%%下面的%\def\mtplus{}这行代码注释取消。

完成以上步骤后,在mathtime文件夹中右击鼠标选择在终端打开(没有下载Windows Terminal的可以参看附录1:在文件夹中打开cmd的方法);

To generate the package files and font descriptor files you should
run:
latex mathtime.ins

C:\Users\17892\Desktop\mathtime\mathtime>latex mathtime.ins

此处C:\Users\17892\Desktop\mathtime\mathtimemathtime.ins文件所在文件夹路径,输入latex mathtime.ins命令,运行得到

C:\Users\17892\Desktop\mathtime\mathtime>latex mathtime.ins
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./mathtime.ins
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-04-29>
(d:/Users/texlive/2022/texmf-dist/tex/latex/base/docstrip.tex
Utility: `docstrip' v2.6a <2020-11-23>
English documentation    <2020-11-23>

**********************************************************
* This program converts documented macro-files into fast *
* loadable files by stripping off (nearly) all comments! *
**********************************************************

********************************************************
* No Configuration file found, using default settings. *
********************************************************

(./mathtime.ins
*** Generating .fd files using Mathtime fonts ***

Generating file(s) ./my1mtt.fd

Processing file mtfonts.fdd (MY1mtt,mtplus) -> my1mtt.fd
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94


Generating file(s) ./my2mtt.fd

Processing file mtfonts.fdd (MY2mtt,mtplus) -> my2mtt.fd
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94


Generating file(s) ./my3mtt.fd

Processing file mtfonts.fdd (MY3mtt,mtplus) -> my3mtt.fd
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94


Generating file(s) ./umtms.fd

Processing file mtfonts.fdd (Umtms) -> umtms.fd
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94


Generating file(s) ./umh2.fd

Processing file mtfonts.fdd (Umh2) -> umh2.fd
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94


Generating file(s) ./umh2scr.fd

Processing file mtfonts.fdd (Umh2Scr) -> umh2scr.fd
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94


Generating file(s) ./umh6.fd

Processing file mtfonts.fdd (Umh6) -> umh6.fd
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94


Generating file(s) ./omslby.fd

Processing file mtfonts.fdd (lucidascale,OMSlby) -> omslby.fd
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94

*** Generating packages for Mathtime fonts ***

Generating file(s) ./mathpi.sty

Processing file mathtime.dtx (package,mathpi) -> mathpi.sty
Lines  processed: 1187
Comments removed: 807
Comments  passed: 8
Codelines passed: 352


Generating file(s) ./mathtime.sty

Processing file mathtime.dtx (package,mathtime) -> mathtime.sty
Lines  processed: 1187
Comments removed: 807
Comments  passed: 8
Codelines passed: 352

*** Generating Encoding file for Math Pi Two font ***

Generating file(s) ./mh2scr.enc

Processing file mtfonts.fdd (mh2screnc) -> mh2scr.enc
Lines  processed: 260
Comments removed: 110
Comments  passed: 4
Codelines passed: 94

)
Overall statistics:
Files  processed: 11
Lines  processed: 4714
Comments removed: 2604
Comments  passed: 52
Codelines passed: 1550
 ) )
No pages of output.
Transcript written on mathtime.log.

此时文件夹中产生了多个.sty .fd .log等文件。

将产生的文件放在指定的文件路径;

In addition to mathtime.sty, a package mathpi.sty will also be produced
making available math fonts from the Adobe Math Pi font set.
These .sty files and all the .fd files that are produced should be
placed in a directory on TeX’s input path.

此处告诉我们需要将产生的文件放在Tex的输出路径。因此怎么找到此处所指的输出路径呢?
此处告诉一种方式,我们假设目前该输出路径里面已经有.sty .fd这两类文件,因此我们在TexLive安装路径中在搜索框中搜索sty。比如此处我的TexLive发行版为2022版,路径为texlive\2022\......,通过分析搜索结果我们得出后缀名为.sty的文件基本上都位于texlive\2022\texmf-dist中,更精确的路径为texlive\2022\texmf-dist\tex中,同理我们再搜索fd,得到后缀名为.fd的文件基本上位于texlive\2022\texmf-dist\tex\latex文件夹中,所以我们将mathtime整个文件夹复制粘贴到该文件夹。

验证是否完成导入

打开编辑好的.tex文件,输入\usepackage{mathtime},将鼠标放在mathtime上面查看提示是否为:包:mathtime,如果是的,恭喜你成功了!

使用宏包

在导言区使用\usepackage{mathtime}语句引用包,运行之后如果显示:

Math version `bold’ is not defined. \begin{document}

则在导言区加入\DeclareMathVersion{bold}语句。

既然你来到了这里,那意味着你可能已经查看了该宏包的编译效果并且对其很满意,但这里还是贴心的给出了该宏包的编译效果示例:
在这里插入图片描述

附录1:在文件夹中打开cmd的方法

在这里插入图片描述

在红框中输入cmd,回车运行。

相关内容

在这里插入图片描述

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
TeXLive 是一个免费的跨平台的 TeX 发行版,用于排版学术论文和书籍。以下是配置 TeXLive 环境的步骤: 步骤 1:下载安装 TeXLiveTeXLive 的官方网站上,选择适合您操作系统的版本并下载安装程序。根据您的操作系统,可能需要管理员权限来完成安装。 步骤 2:设置环境变量 在 Windows 系统中,打开控制面板,找到“系统和安全”菜单中的“系统”选项。点击“高级系统设置”,在弹出的对话框中点击“环境变量”按钮。 在环境变量对话框中,找到“系统变量”一栏中的“Path”变量,并点击编辑。将 TeXLive安装路径(例如 C:\texlive\2021\bin\win32)添加到变量值的末尾,并保存更改。 在 macOS 或 Linux 系统中,打开终端,并编辑用户主目录下的 `.bash_profile` 文件。将 TeXLive安装路径(例如 /usr/local/texlive/2021/bin/x86_64-linux)添加到文件中,并保存更改。 步骤 3:配置编辑器 选择一个适合您的编辑器,常见的选择包括 TeXworks、TeXstudio、TeXmaker 等。在编辑器的设置中,将编译引擎和路径设置为 TeXLive安装路径。 步骤 4:测试安装 打开一个新的 TeX 文档,输入一些简单的 LaTeX 代码,并尝试编译。如果一切顺利,您应该能够生成 PDF 格式的文档。 这些是配置 TeXLive 环境的基本步骤,您还可以根据需要进行其他设置,例如安装额外的宏包或字体。详细的配置方法可以参考 TeXLive 的官方文档或相关的在线资源。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

新手小张

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值