从 libertine 字体获取 `\tau`

从 libertine 字体获取 `\tau`

从某种字体中提取单个符号看起来非常复杂,而且似乎每种字体都需要自己的方法。

现在我想\tau从中提取单曲\usepackage{libertine} \usepackage[libertine]{newtxmath},它对我来说看起来很完美。

在此处输入图片描述

这是我为防止任何冲突而采取的设置。

\documentclass{article}

\usepackage{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools}
\usepackage{mathabx}
\usepackage{polynom}

\usepackage{xparse}

% --- get \lwavy --- %
\DeclareFontFamily{OMX}{MnSymbolE}{}
\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
    <-6>  MnSymbolE5
    <6-7>  MnSymbolE6
    <7-8>  MnSymbolE7
    <8-9>  MnSymbolE8
    <9-10> MnSymbolE9
    <10-12> MnSymbolE10
    <12->   MnSymbolE12}{}
\DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
    <-6>  MnSymbolE-Bold5
    <6-7>  MnSymbolE-Bold6
    <7-8>  MnSymbolE-Bold7
    <8-9>  MnSymbolE-Bold8
    <9-10> MnSymbolE-Bold9
    <10-12> MnSymbolE-Bold10
    <12->   MnSymbolE-Bold12}{}
\DeclareSymbolFont{mnlargesymbols}{OMX}{MnSymbolE}{m}{n}
\SetSymbolFont{mnlargesymbols}{bold}{OMX}{MnSymbolE}{b}{n}
\DeclareMathDelimiter{\lwavy}{\mathopen}{mnlargesymbols}{'136}{mnlargesymbols}{'136}
\DeclareMathDelimiter{\rwavy}{\mathclose}{mnlargesymbols}{'136}{mnlargesymbols}{'136}


% --- Get fancy 'u' and 'v' --- %
\DeclareSymbolFont{mathtx}{OML}{txmi}{m}{it}
\DeclareMathSymbol{u}{\mathalpha}{mathtx}{117}
\DeclareMathSymbol{v}{\mathalpha}{mathtx}{118}

\begin{document}

\[
\tau : \enspace \frac{x^2}{25}+\frac{y^2}{9}-\frac{z^2}{100}=-1
\]

\end{document}

答案1

我已将相关行添加到您的代码中。输出现在正确了\tau

\documentclass{article}

\usepackage{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools}
\usepackage{mathabx}
\usepackage{polynom}

\usepackage{xparse}

% --- get \lwavy --- %
\DeclareFontFamily{OMX}{MnSymbolE}{}
\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
    <-6>  MnSymbolE5
    <6-7>  MnSymbolE6
    <7-8>  MnSymbolE7
    <8-9>  MnSymbolE8
    <9-10> MnSymbolE9
    <10-12> MnSymbolE10
    <12->   MnSymbolE12}{}
\DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
    <-6>  MnSymbolE-Bold5
    <6-7>  MnSymbolE-Bold6
    <7-8>  MnSymbolE-Bold7
    <8-9>  MnSymbolE-Bold8
    <9-10> MnSymbolE-Bold9
    <10-12> MnSymbolE-Bold10
    <12->   MnSymbolE-Bold12}{}
\DeclareSymbolFont{mnlargesymbols}{OMX}{MnSymbolE}{m}{n}
\SetSymbolFont{mnlargesymbols}{bold}{OMX}{MnSymbolE}{b}{n}
\DeclareMathDelimiter{\lwavy}{\mathopen}{mnlargesymbols}{'136}{mnlargesymbols}{'136}
\DeclareMathDelimiter{\rwavy}{\mathclose}{mnlargesymbols}{'136}{mnlargesymbols}{'136}

% --- Get fancy 'u' and 'v' --- %
\DeclareSymbolFont{mathtx}{OML}{txmi}{m}{it}
\DeclareMathSymbol{u}{\mathalpha}{mathtx}{117}
\DeclareMathSymbol{v}{\mathalpha}{mathtx}{118}

% --- Get 'tau' from libertine --- %
\makeatletter
\newif\iflibus@sansmath
\makeatother
\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{libertinust1math}{m}{n}
\DeclareSymbolFont{LettersLibertinus}{LS1}{libertinust1math}{m}{it}
\DeclareMathSymbol{\tau}{\mathord}{LettersLibertinus}{"1C}


\begin{document}

\[
\tau : \enspace \frac{x^2}{25}+\frac{y^2}{9}-\frac{z^2}{100}=-1
\]

\end{document}

答案2

在现代工具链中unicode-math,你可以这样做\setmathfont,例如

\documentclass{minimal}

\usepackage[mathit=sym]{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TeX Gyre Termes}[Scale=1.0] % Corresponding to newtxtext
\setmathfont{TeX Gyre Termes Math} % Corresponding to newtxmath
\setmathfont[range=\mittau]{Libertinus Math} % Or range=it/{Greek,greek} for all Greek letters

\begin{document}
\[
\tau : \enskip \frac{x^2}{25}+\frac{y^2}{9}-\frac{z^2}{100}= -1
\]
\end{document}

Libertinus/Termes 样本

mathit=sym选项默认使用已修补的符号,无需写入\symit\tau\symnormal\tau。如果您希望以相同的方式使用其他字母,则需要添加mathrm=symmathbf=sym等。

\mittau来自“unicode-math 定义的符号”。不过,命名模式是常规的:直立的 Θ 是\mupTheta,粗体的θ\mbftheta,粗斜体α\mbfitalpha

相关内容