我正在用自己创建的字体编写一个简单的文档,我不知道为什么当我使用数学模式时逗号会显示为分号而点会显示为双点。
以下是一个例子:
这是文档:
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{amsmath,amsthm,amssymb,amsfonts,mathrsfs,latexsym,stmaryrd}
\usepackage{color}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{textpos}
\usepackage{enumerate}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{float}
\usepackage{bm}
\usepackage[no-math]{fontspec}
\DeclareSymbolFont{letters}{TU}{MiLetra}{m}{n}
\usepackage{fontspec}
\newfontfamily{\miletra}{MiLetra}[
NFSSFamily=MiLetra,
UprightFont=*,
BoldFont=*,
BoldFeatures={FakeBold=3},
]
\renewcommand{\familydefault}{MiLetra}
\DeclareSymbolFont{numbers}{TU}{MiLetra}{m}{n}
\SetSymbolFont{numbers}{bold}{TU}{MiLetra}{bx}{n}
\DeclareMathSymbol{0}\mathalpha{numbers}{"30}
\DeclareMathSymbol{1}\mathalpha{numbers}{"31}
\DeclareMathSymbol{2}\mathalpha{numbers}{"32}
\DeclareMathSymbol{3}\mathalpha{numbers}{"33}
\DeclareMathSymbol{4}\mathalpha{numbers}{"34}
\DeclareMathSymbol{5}\mathalpha{numbers}{"35}
\DeclareMathSymbol{6}\mathalpha{numbers}{"36}
\DeclareMathSymbol{7}\mathalpha{numbers}{"37}
\DeclareMathSymbol{8}\mathalpha{numbers}{"38}
\DeclareMathSymbol{9}\mathalpha{numbers}{"39}
\DeclareSymbolFont{grletters}{OML}{cmm}{m}{it}
\DeclareMathSymbol{\pi}{\mathord}{grletters}{"19}
\DeclareSymbolFont{operators}{TU}{MiLetra}{m}{n}
\DeclareSymbolFontAlphabet{\mathsf}{operators}
\DeclareSymbolFont{letters}{TU}{MiLetra}{m}{n}
\DeclareSymbolFontAlphabet{\mathsf}{letters}
\begin{document}
\section{Introduction}
$(0,0)$
\end{document}
如果有人知道我该怎么做才能纠正它,我会非常感激。
答案1
您应该考虑unicode-math
上一个问题的答案,但是如果您选择这种方式,您需要为您正在使用的 TU(Unicode)字体声明字符(我再次将字体切换为可用的字体)
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{amsmath,amsthm,amssymb,amsfonts,mathrsfs,latexsym,stmaryrd}
\usepackage{color}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{textpos}
\usepackage{enumerate}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{float}
\usepackage{bm}
\usepackage[no-math]{fontspec}
\usepackage{fontspec}
\newfontfamily{\miletra}{Comic Sans MS}[
NFSSFamily=MiLetra,
UprightFont=*,
BoldFont=*,
BoldFeatures={FakeBold=3},
]
\DeclareSymbolFont{letters}{TU}{MiLetra}{m}{n}
\renewcommand{\familydefault}{MiLetra}
\DeclareSymbolFont{numbers}{TU}{MiLetra}{m}{n}
\SetSymbolFont{numbers}{bold}{TU}{MiLetra}{bx}{n}
\DeclareMathSymbol{0}\mathalpha{numbers}{"30}
\DeclareMathSymbol{1}\mathalpha{numbers}{"31}
\DeclareMathSymbol{2}\mathalpha{numbers}{"32}
\DeclareMathSymbol{3}\mathalpha{numbers}{"33}
\DeclareMathSymbol{4}\mathalpha{numbers}{"34}
\DeclareMathSymbol{5}\mathalpha{numbers}{"35}
\DeclareMathSymbol{6}\mathalpha{numbers}{"36}
\DeclareMathSymbol{7}\mathalpha{numbers}{"37}
\DeclareMathSymbol{8}\mathalpha{numbers}{"38}
\DeclareMathSymbol{9}\mathalpha{numbers}{"39}
\DeclareSymbolFont{grletters}{OML}{cmm}{m}{it}
\DeclareMathSymbol{\pi}{\mathord}{grletters}{"19}
\DeclareSymbolFont{operators}{TU}{MiLetra}{m}{n}
\DeclareSymbolFontAlphabet{\mathsf}{operators}
\DeclareSymbolFont{letters}{TU}{MiLetra}{m}{n}
\DeclareSymbolFontAlphabet{\mathsf}{letters}
\DeclareMathSymbol{,}\mathpunct{numbers}{`,}
\begin{document}
\section{Introduction}
$(0,0)$
\end{document}