
패키지 arevmath
는 \origa 및 \vara(기본값)로 사용 가능한 두 가지 다른 a를 제공합니다. 그러나 \DeclareMathSymbol{a}{\mathalpha}{extraitalic}{50}
\origa를 기본값인 a로 바꾸기 위해 서문을 추가하면 출력이 잘못됩니다. 예를 들어, $\mathsf{a}$는 2를 생성하고 $\mathbf{a}$와 동일합니다.
\documentclass{article}
\usepackage{arevmath}
\DeclareMathSymbol{a}{\mathalpha}{extraitalic}{50} % \origa by default
\begin{document}
$a, \mathsf{a}, \mathbf{2}, \vara, \origa, \mathsf{\origa}$
\end{document}
이 문제를 해결하는 방법은 무엇입니까?
답변1
슬롯이 128개 또는 256개에 불과한 레거시 글꼴에는 많은 코딩 작업과 많은 글꼴 지원 파일이 필요했습니다.
arevmath
패키지 의 경우 a
tt 및 tt 굵은 글씨가 당신이 원하는 것일 수 있습니다. 그렇지 않으면 "라운드" a
가 표준인 것 같습니다.
빠른 개요:
(그러나 패키지와 함께 ttf\otf 글꼴을 사용하는 것이 더 쉽습니다 unicode-math
.)
MWE
글꼴 테이블/글리프 목록:
\documentclass{article}
\usepackage{arevmath}
\usepackage{fonttable}
%\DeclareMathSymbol{b}{\mathalpha}{extraitalic}{50} %
\newcommand\showfont[6]{\newpage #1-#2-#3-#4 : for #5, #6 = {\usefont{#1}{#2}{#3}{#4}\char#6}\par\xfonttable{#1}{#2}{#3}{#4}}
\newcommand\xshowfont[6]{\par#1-#2-#3-#4 : for #5, #6 = {\usefont{#1}{#2}{#3}{#4}\char#6}}
\begin{document}
\xshowfont{U}{zavm}{m}{n}{nonstandard alternate glyphs, upright}{113}
\xshowfont{U}{zavm}{m}{it}{nonstandard alternate glyphs, italic}{50}
\xshowfont{U}{zavm}{m}{it}{nonstandard alternate glyphs, italic}{139}
\xshowfont{OT1}{zavm}{m}{n}{operators normal}{97}
\xshowfont{OML}{zavm}{m}{it}{letters normal}{97}
\xshowfont{OMS}{zavm}{m}{n}{symbols normal}{65}
\xshowfont{OMX}{mdbch}{m}{n}{largesymbols normal}{74}
\xshowfont{OT1}{zavm}{b}{n}{mathbf normal}{97}
\xshowfont{T1} {fvm} {m}{n}{mathtt normal}{97}
\xshowfont{OMS}{cmsy}{m}{n}{mathcal}{65}
\xshowfont{U}{rsfs}{m}{n}{mathscr}{65}
\xshowfont{OML}{zavm}{b}{it}{mathbm}{97}
%\showfont{U}{futm}{m}{n}{mathbb}{1}
%=====
\xshowfont{OT1}{zavm}{b}{n}{operators bold}{97}
\xshowfont{OML}{zavm}{b}{it}{letters bold}{97}
\xshowfont{OMS}{zavm}{b}{n}{symbols bold}{65}
\xshowfont{OMX}{mdbch}{b}{n}{largesymbols bold}{72}
\xshowfont{OT1}{zavm}{b}{n}{mathbf bold}{97}
\xshowfont{T1}{fvm}{b}{n}{mathtt bold}{97}
% with font table
\showfont{U}{zavm}{m}{n}{nonstandard alternate glyphs, upright}{113}
\showfont{U}{zavm}{m}{it}{nonstandard alternate glyphs, italic}{50}
\showfont{OT1}{zavm}{m}{n}{operators normal}{97}
\showfont{OML}{zavm}{m}{it}{letters normal}{97}
\showfont{OMS}{zavm}{m}{n}{symbols normal}{65}
\showfont{OMX}{mdbch}{m}{n}{largesymbols normal}{74}
\showfont{OT1}{zavm}{b}{n}{mathbf normal}{97}
\showfont{T1} {fvm} {m}{n}{mathtt normal}{97}
\showfont{OMS}{cmsy}{m}{n}{mathcal}{65}
\showfont{U}{rsfs}{m}{n}{mathscr}{65}
\showfont{OML}{zavm}{b}{it}{mathbm}{97}
%\showfont{U}{futm}{m}{n}{mathbb}{1}
%=====
\showfont{OT1}{zavm}{b}{n}{operators bold}{97}
\showfont{OML}{zavm}{b}{it}{letters bold}{97}
\showfont{OMS}{zavm}{b}{n}{symbols bold}{65}
\showfont{OMX}{mdbch}{b}{n}{largesymbols bold}{72}
\showfont{OT1}{zavm}{b}{n}{mathbf bold}{97}
\showfont{T1}{fvm}{b}{n}{mathtt bold}{97}
%\DeclareSymbolFontAlphabet{\mathnormal}{letters}
%\DeclareSymbolFontAlphabet{\mathit} {letters}
%\DeclareSymbolFontAlphabet{\mathrm} {operators}
%\DeclareSymbolFontAlphabet{\mathsf} {letters}
\end{document}
편집하다
일반적인 레거시 글꼴:
변형 문자는 (="알 수 없음") 인코딩을 사용하는 글꼴 파일에서 나옵니다. U
이는 개념적으로 유니코드의 개인 사용 영역과 다소 유사한 글리프의 사용자 정의 배열을 의미합니다.
OML
'일반' 문자는 레거시 인코딩( ) 중 하나가 포함된 128슬롯 글꼴 파일에서 나옵니다.
인코딩 의 기호 OMS
:
굵게 표시하는 등.... (코드는 다양한 테이블을 인쇄합니다.)
패키지 arevmath
가 설계된 대로 작동하고 있습니다.
"수정"은 아마도 사용하는 컴파일러에 따라 글꼴을 전환할 수 있는 유니코드 인식 패키지를 사용하거나 unicode-math
패키지를 직접 조사하여 xelatex/lualatex로 컴파일하는 것입니다(또는 다시 작성하시겠습니까 arevmath
? - 마지막으로 유지 관리되었습니다). 2006년).
unicode-math를 사용하여 기호를 가져오는 간단한 예
선택할 수 있는 유니코드 수학 글꼴 세트가 있다고 가정해 보겠습니다(sans가 표시됨).
그리고 TeX Gyre Schola Math 글꼴을 사용하고 싶지만 "둥근 a" 산세 이탤릭체 영숫자 기호를 Asana-Math 글꼴의 글꼴로 바꾸고 싶다고 가정해 보겠습니다.
(직접 입력 기호와 명명된 매크로 기호는 현재 시행 중인 굵은 스타일과 수학 스타일, 기본적으로 수직 또는 기울임꼴로 정규화됩니다.)
다음은 수학 글꼴로 설정된 TeX Gyre Schola Math입니다. 스타일은 ISO로 설정되어 이탤릭체가 흐르는 것을 보여줍니다.
이 range=
옵션은 가져올 기호를 선택하는 데 사용됩니다. 강조 표시하기 위해 빨간색으로 표시하겠습니다.
( range={sfit,bfsfit}
라틴 대문자, 라틴 소문자, 그리스어 대문자, 그리스어 소문자 및 숫자에 대해 산 이탤릭체 및 굵은 산 이탤릭체를 가져옵니다. range=
매개변수를 사용하여 가져오기를 하나만 또는 조합으로 제한하거나 심지어 개별적으로 제한할 수 있습니다. 글리프.)
자세한 내용을 보려면 하세요 texdoc unicode-math
.
MWE
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{unicode-math}
\setmathfont{Asana-Math}[Colour=brown]
\setmainfont{Noto Serif}
\usepackage{xparse}
% maths
\newfontfamily\asanamath{Asana}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/asana-math/,
UprightFont =*-Math,
]
\newfontfamily\firamathregular{FiraMath}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/firamath/,
UprightFont =*-Regular,
]
\newfontfamily\gfsneohellenicmath{GFSNeohellenicMath}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/gfsneohellenicmath/,
UprightFont =GFSNeohellenicMath,
]
\newfontfamily\latinmodernmath{latinmodern}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/lm-math/,
UprightFont =*-math,
]
\newfontfamily\libertinusmath{LibertinusMath}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/libertinus-fonts/,
UprightFont =*-Regular,
]
\newfontfamily\stixmath{STIXMath}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/stix/,
UprightFont =*-Regular,
]
\newfontfamily\stixiimath{STIX2Math}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/stix2-otf/,
UprightFont =STIX2Math,
]
\newfontfamily\texgyrebonummath{texgyrebonum}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/tex-gyre-math/,
UprightFont =*-math,
]
%
\newfontfamily\texgyredejavumath{texgyredejavu}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/tex-gyre-math/,
UprightFont =*-math,
]
%
\newfontfamily\texgyrepagellamath{texgyrepagella}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/tex-gyre-math/,
UprightFont =*-math,
]
%
\newfontfamily\texgyrescholamath{texgyreschola}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/tex-gyre-math/,
UprightFont =*-math,
]
%
\newfontfamily\texgyretermesmath{texgyretermes}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/tex-gyre-math/,
UprightFont =*-math,
]
%
\newfontfamily\xitsmathbold{XITSMath}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/xits/,
UprightFont =*-Bold,
]
%
\newfontfamily\xitsmathregular{XITSMath}[Extension=.otf,Path=C:/.../tl/texlive/2020/texmf-dist/fonts/opentype/public/xits/,
UprightFont =*-Regular,
]
%-------------------------------------------------------------
\ExplSyntaxOn
\cs_generate_variant:Nn
\seq_gset_split:Nnn
{ cno }
\tl_new:N \g_fc_namespace_tl
%------------------
\cs_set:Npn \fc_funcsymbolcompare:n #1 {
% 1=font switch name
\tl_set:Nx
\l_tmpa_tl
{
#1
}
\use:c
{ \tl_use:N \g_tmpa_tl } % sample name taking font name as parameter
{ \tl_use:N \l_tmpa_tl } % font name from seq
{ \tl_use:N \g_tmpb_tl } % symbol
}
%------------------
\cs_set:Npn \fc_funcprintesc:n #1 {
% 1=string
\exp_args:NNf \str_set:Nn \l_tmpa_str { #1 }
\group_begin:
\color{blue}
\usefont{T1}{zi4}{b}{n}
\large
\textbackslash
{\str_use:N \l_tmpa_str}
\group_end:
}
%------------------
\cs_set:Npn \fc_funcprint:n #1 {
% 1=string
\exp_args:NNf \str_set:Nn \l_tmpa_str { #1 }
\str_remove_all:Nn \l_tmpa_str {\protect}
\exp_args:NNxx
\str_replace_all:Nnn
\l_tmpa_str
{\space\space\c_left_brace_str}
{\c_left_brace_str}
\exp_args:NNxx
\str_replace_all:Nnn
\l_tmpa_str
{\space\c_left_brace_str}
{\c_left_brace_str}
\group_begin:
\color{blue}
\usefont{T1}{zi4}{b}{n}
\large
{\str_use:N \l_tmpa_str}
\group_end:
}
%****************************************************
%* utility commands
%****************************************************
%--------------------
\newcommand\mfssamplewidth{0.5in}
\NewDocumentCommand { \psymcmp } { m m } {
% 1=font name
% 2=symbol(s)
\use:c { #1 }
\tex_par:D
\colorbox
{blue!7}
{
\makebox[\mfssamplewidth][c]{\large #2}
}
{\usefont{T1}{lmr}{m}{n} \ #1}
}
%****************************************************
%* main commands
%****************************************************
%--------------------
\NewDocumentCommand { \mfsloadaseq } { o m +m } {
% 1=namespace
% 2=seq name
% 3=data
\IfNoValueTF { #1 }
{ \tl_clear:N \g_fc_namespace_tl }
{ \tl_gset:Nn \g_fc_namespace_tl { #1 } }
\cs_if_free:cT
{ g_fc_rwe \g_fc_namespace_tl #2 _seq }
{ \seq_new:c
{ g_fc_rwe \g_fc_namespace_tl #2 _seq }
}
\seq_gclear:c
{ g_fc_rwe \g_fc_namespace_tl #2 _seq }
\seq_gset_split:cno
{ g_fc_rwe \g_fc_namespace_tl #2 _seq }
{ , }
{ #3 }
}
%****************************************************
%*
%****************************************************
%--------------------
\NewDocumentCommand { \mfssymbolcompare } { o m m m } {
% 1=namespace
% 2=seq name
% 3=sample name
% 4=symbol
\IfNoValueTF { #1 }
{ \tl_clear:N \g_fc_namespace_tl }
{ \tl_gset:Nn \g_fc_namespace_tl { #1 } }
\tl_gset:Nn \g_tmpa_tl { #3 }
\tl_gset:Nn \g_tmpb_tl { #4 }
\group_begin:
\exp_args:Nx
\seq_map_function:cN
{ g_fc_rwe \g_fc_namespace_tl #2 _seq }
\fc_funcsymbolcompare:n
\group_end:
}
%****************************************************
%*
%****************************************************
%-------------------- Meta
\tl_new:N \l_myparmb_tl
%-------------------- MetaC
\NewDocumentCommand \mmc { s m } { % 1=run, 2 = text
\tl_set:Nn \l_myparmb_tl { #2 }
\IfBooleanTF { #1 }
{
\fc_funcprint:n { \tl_use:N \l_myparmb_tl }
\space $\mapsto$ \space \l_myparmb_tl
}
{
\fc_funcprintesc:n { \tl_use:N \l_myparmb_tl }
}
}
%-------------------- xMetaV
\NewDocumentCommand \xmmv { s O{\texttt} m } { % 1 = font, 2 = text
\tl_set:Nn \l_tmpa_tl { #2 { \tl_to_str:n {#3} }
\IfBooleanT {#1} { \space $\mapsto$\space #3 }
}
\tl_use:N \l_tmpa_tl
}
\ExplSyntaxOff
\newcommand\mtable[1]{% 1-(text)font for mmode
\begin{tabular}{lll}
\rowcolor{brown!15}
generic macros
& specific macros
& direct input
\\
\mmc*{$\symsfup{a}x$}
& \mmc*{$\msansa x$}
& \xmmv*[#1]{$