다양한 글꼴의 문자 혼합(텍스트 모드)

다양한 글꼴의 문자 혼합(텍스트 모드)

수식이 있을 때 classico와 함께 일상 글꼴로 사용하고 있습니다 . \usepackage[EULERGREEK]{sansmath}\sansmath내 문제는: 나는 클래식의 "같음" 기호 모양을 좋아하지 않는다는 것입니다. 예를 들어 에서와 같이 너무 좁지만 \Longrightarrow다른 모든 곳에서도 마찬가지입니다. (MWE페이스트빈에서)

"Classico" 글꼴로 렌더링된 간단한 텍스트

tex.sx에 대한 꽤 많은 연구 끝에(예:다른 글꼴에서 단일 기호 가져오기등) 현대 컴퓨터의 등호를 유지하도록 수학 모드를 설득할 수 있었습니다.

\DeclareSymbolFont{mysymbols}{T1}{cmr}{m}{n}
\DeclareMathSymbol{=}{\mathrel}{mysymbols}{`=}

이게 맞는지 모르겠어요그것을하는 올바른 방법하지만 내가 보기엔 충분히 좋아 보여

동일한 텍스트이지만 "Computer modern" 글꼴에서 가져온 수학과 동일함

텍스트 모드에서도 등호 글꼴을 변경하고 싶습니다. 이것이 가능한가 ?

나는 내가 이해하지 못하는 더 많은 것들을 가지고 놀려고 노력했습니다(예: catcodes, cfMWE) 그러나 그것으로부터 아무것도 얻을 수 없었습니다.

\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

fontspecLuaLaTeX 또는 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}

관련 정보