Math Times Pro 2 和 Txfontsb

Math Times Pro 2 和 Txfontsb

我尝试在同一个文档中加载 mtpro2(完整版)和 txfontsb 包,但出现此错误:

Command \Bbbk already defined. \newcommand{\Bbbk}{\mathbb{k}}

如果我把 txfontsb 包放在mtpro2我得到奇怪的符号而不是+=

\documentclass[a4paper,11pt]{article}
 \usepackage{psfrag}
 \usepackage[english,greek]{babel}
 \usepackage[iso-8859-7]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage{mtpro2}
 \usepackage{txfontsb}
 \usepackage[left=2.00cm, right=2.00cm, top=3.00cm, bottom=3.00cm]{geometry}
 \usepackage{tikz}
 \usepackage{tkz-euclide,tkz-fct}
 \usepackage{wrapfig}
 \usepackage{calc}

 \begin{document}
 $ a+\beta=1 $
 \end{document}

我怎样才能让它们一起工作?

答案1

这是因为两个包都定义了命令\Bbbkmtpro2执行以下操作:

\newcommand{\Bbbk}{\mathbb{k}}

txfontsb以下内容:

\re@DeclareMathSymbol{\Bbbk}{\mathord}{AMSb}{"7C}

您可以通过取消定义其中一个来摆脱这种情况,例如:

 \usepackage{txfontsb}
 \let\Bbbk\relax
 \usepackage[lite]{mtpro2}

如果你想同时使用它们,那么你可以复制其中一个的定义

 \usepackage{txfontsb}
 \let\myBbbk\Bbbk
 \let\Bbbk\relax
 \usepackage[lite]{mtpro2}

然后,Bbbk由 定义的txfontsb将可用作\myBbbk

由于我没有,因此尚未测试mtpro2

答案2

txfontsb包加载txfonts,我不推荐这样做。

以下是具体txfontsb操作(经过一些改进):

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} % or iso-8859-7
\usepackage[english,greek]{babel}

\usepackage{newtxtext}% for text fonts
\usepackage[lite]{mtpro2}

\DeclareRobustCommand{\scshape}{%
  \iflanguage{greek}{\fontfamily{txrc}}{}\fontshape{sc}\selectfont
}
\DeclareTextFontCommand{\textsc}{\scshape}
\DeclareRobustCommand{\scslshape}{%
  \fontfamily{txrc}\fontseries{m}\fontshape{sco}\selectfont
}
\DeclareTextFontCommand{\textscsl}{\scslshape}
\makeatletter
\@ifpackagewith{inputenc}{iso-8859-7}{%
      \DeclareInputText{242}{c}
}{}                 
\DeclareTextCommand{\Digamma}{LGR}{\char"C3\relax}
\DeclareTextCommand{\ddigamma}{LGR}{\char"93\relax}
\DeclareTextCommand{\tao}{LGR}{\char"01\relax}
\DeclareTextCommand{\Qoppa}{LGR}{\char"14\relax}
\DeclareTextCommand{\varqoppa}{LGR}{\char"13\relax}
\DeclareTextCommand{\Sampi}{LGR}{\char"13\relax}
\DeclareTextCommand{\sampi}{LGR}{\char"13\relax}
\DeclareTextCommand{\vardigamma}{LGR}{\char"07\relax}
\DeclareTextCommand{\Stigma}{LGR}{\textlatin{\char"43\relax}}
\DeclareTextCommand{\VarQoppa}{LGR}{\textlatin{\char"47\relax}}   
\DeclareTextCommand{\euro}{LGR}{\char"18\relax}
\DeclareTextCommand{\Euro}{LGR}{\char"18\relax}

\begin{document}

Some text and some math $\alpha+1$

\textsc{Some text}

\begin{otherlanguage*}{english}
Some text \textsc{Some text}
\end{otherlanguage*}

\end{document}

在此处输入图片描述

相关内容