在TexLive环境下安装数学公式字体宏包mathtime
下载宏包
该宏包包含以下四个文件:
Name | Size | Date |
---|---|---|
mathtime.dtx | 42kB | 1999-03-29 |
mathtime.ins | 2kB | 1997-07-08 |
mathtime.tet | 3kB | 1997-07-08 |
mtfonts.fdd | 9kB | 2001-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\mathtime
为mathtime.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
,回车运行。