Arevmath und Buchstabe A

Arevmath und Buchstabe A

Das arevmathPaket bietet zwei verschiedene a, verfügbar als \origa und \vara (Standardwert). Wenn man jedoch \DeclareMathSymbol{a}{\mathalpha}{extraitalic}{50}in der Präambel hinzufügt, dass \origa als Standard-a festgelegt wird, ist die Ausgabe falsch; z. B. ergibt $\mathsf{a}$ 2, dasselbe gilt für $\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}

Bildbeschreibung hier eingeben

Wie kann ich das beheben?

Antwort1

Ältere Schriftarten mit lediglich 128 oder 256 Steckplätzen erforderten viel Programmieraufwand und viele Schriftarten-Unterstützungsdateien.

Für arevmathPakete akönnten die fettgedruckten tt und tt das Richtige für Sie sein. Ansonsten ascheint „rund“ die Norm zu sein.

Schneller Überblick:

zavm

(Mit dem Paket ist es allerdings einfacher, ttf\otf-Schriftarten zu verwenden unicode-math.)

MWE

Schrifttabellen / Glyphenlisten:

\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}


Bearbeiten

Typische ältere Schriftart:

eine Glyphenliste

Die Buchstabenvarianten stammen aus einer Schriftdatei mit Uder Kodierung (="unbekannt"), d. h. einer benutzerdefinierten Anordnung der Glyphen, die konzeptionell dem Private Use Area von Unicode ähnelt.

u-Kodierung

während „normale“ Buchstaben aus einer 128-Slot-Schriftdatei mit einer der alten Kodierungen stammen ( OML)

oml

und Symbole aus der OMSKodierung:

oms

und so weiter für Fettdruck usw. … (Der Code druckt die verschiedenen Tabellen aus.)

Das arevmathPaket funktioniert wie vorgesehen.

Die „Lösung“ wäre wahrscheinlich die Verwendung von Unicode-fähigen Paketen, die je nach verwendetem Compiler die Schriftarten für Sie umschalten können, oder Sie könnten unicode-mathdirekt in das Paket einsteigen und es mit xelatex/lualatex kompilieren (oder vielleicht neu schreiben arevmath? – es wurde zuletzt im Jahr 2006 gepflegt).


Mini-Beispiel zum Importieren von Symbolen mit Unicode-Mathematik

Angenommen, wir haben eine Reihe von Unicode-Mathematikschriftarten zur Auswahl (sans ist markiert):

Schriftartenliste

Und nehmen wir an, wir möchten die Schriftart TeX Gyre Schola Math verwenden, aber die alphanumerischen Symbole „rundes a“ in Sans-Italic durch die der Schriftart Asana-Math ersetzen.

Asanas

(Beachten Sie, dass Direkteingabesymbole und benannte Makrosymbole auf den aktuell gültigen Fett- und Mathematikstil normalisiert werden, grundsätzlich entweder aufrecht oder kursiv.)

Hier ist TeX Gyre Schola Math als Mathematikschriftart mit dem Stil ISO eingestellt, um die durchgehende Kursivschrift anzuzeigen.

Schule

Mit dieser range=Option können Sie auswählen, welche Symbole importiert werden sollen. Wir markieren sie rot, um sie hervorzuheben.

importiert

(Beachten Sie, dass range={sfit,bfsfit}Sans Italic und Bold Sans Italic für lateinische Großbuchstaben, lateinische Kleinbuchstaben, griechische Großbuchstaben, griechische Kleinbuchstaben und Ziffern importiert werden; range=es können Parameter verwendet werden, um den Import auf nur einen oder eine Kombination davon oder sogar nur auf einzelne Glyphen zu beschränken.)

texdoc unicode-mathWeitere Einzelheiten erfahren Sie hier .

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]{$

verwandte Informationen