
私は、数式があるときclassico
だけでなく、日常のフォントとして を使用しています\usepackage[EULERGREEK]{sansmath}\sansmath
。問題は、classico の「イコール」記号の形が気に入らないことです。たとえば、 では、非常に狭すぎると思います\Longrightarrow
が、他の場所でもそうです。(ムウェペーストビンで
tex.sxについてかなり調べた後(例:別のフォントから単一のシンボルをインポートするなど) 数式モードで、等号をコンピューターの最新版のままにしておくことができました。
\DeclareSymbolFont{mysymbols}{T1}{cmr}{m}{n}
\DeclareMathSymbol{=}{\mathrel}{mysymbols}{`=}
これが正しいやり方でも私には十分良さそうに見えます
テキストモードでも等号のフォントを変更したいのですが、これは可能ですか?
理解できないもの(catcodes、cfなど)をさらに試してみましたムウェ) だが、何も得られなかった。
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[sfdefault]{classico}
\usepackage[EULERGREEK]{sansmath}\sansmath
\DeclareSymbolFont{mysymbols}{T1}{cmr}{m}{n}
\DeclareMathSymbol{=}{\mathrel}{mysymbols}{`=}
% \catcode`==13 \def ={\ensuremath{=}}
\begin{document}
\begin{center}
text: 1 2 3 = 4 5 6
\end{center}
\begin{center}
math: $ 1 2 3 = 4 5 6$
\end{center}
\begin{center}
arrow: $\Longrightarrow$
\end{center}
\end{document}
答え1
fontspec
LuaLaTeX または XeLaTeX でコンパイルする場合、テキスト モードで等号を別のフォントで表示する方法は次のとおりです。
\documentclass{article}
\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault} % Use sans as base font
\usepackage{fontspec}
\newfontfamily{\mymathfont}{Latin Modern Math} % Family for math symbols
\newcommand{\mymath}[1]{\bgroup\mymathfont #1\egroup} % Command to apply family
\newcommand{\EQ}{\mymath{=}} % Specific command for equals sign
\begin{document}
text: 1 2 3 \EQ\ 4 5 6
\end{document}