%EB%A1%9C%20%EC%83%9D%EC%84%B1%EB%90%9C%20%EB%B9%BC%EA%B8%B0%20%EA%B8%B0%ED%98%B8%20%EA%B8%80%EA%BC%B4.png)
유니코드 문자 "2212 또는 수학 모드에서 하이픈을 사용하여 생성되었는지 여부에 관계없이 모든 빼기 기호에 대해 글꼴(아래 예: Times New Roman)을 지정하고 싶습니다.
의 범위 옵션에 "2212"를 추가하면 \setmathfont
적절한 유니코드 문자 "빼기 기호"를 사용하여 텍스트를 작성할 때 작동합니다. 내 예에서 처음 두 개의 6을 참조하세요.
그러나 $-6$(여기서는 일반 하이픈)이라고 쓰면 출력은 올바른 빼기 기호이지만 Times New Roman에서는 그렇지 않습니다. 내 예에서 마지막 6을 참조하십시오.
\documentclass{article}
\RequirePackage[silent]{fontspec}
\setmainfont{Times New Roman}
\RequirePackage{unicode-math}
\setmathfont{STIXTwoMath}[]
\setmathfont{Times New Roman}[ range = { up/{num,latin,Latin}, "2212 } ]
\begin{document}
%% Minus ("2212) in source code:
−6 and $−6$
%% Hyphen ("002D) in source code:
-6 and $-6$
\end{document}
산출:
$ 환경에서 하이픈에 "액세스"하는 방법을 아는 사람이 있나요?
답변1
왜 그런지는 잘 모르겠지만 이라고 말하면 range = { "2212, \minus }
작동하지만 실제로는 "2212
및 다음을 모두 명시해야 합니다 \minus
.
\documentclass{article}
\RequirePackage[silent]{fontspec}
\setmainfont{Times New Roman}
\RequirePackage{unicode-math}
\setmathfont{STIX Two Math}
\setmathfont{Times New Roman}[
range = { "2212, \minus }
]
\begin{document}
%% Minus ("2212) in source code:
−6 and $−6$
%% Hyphen ("002D) in source code:
-6 and $-6$
\end{document}
따라서 더하기 및 빼기 기호에 동일한 글꼴을 선택하려면 다음과 같이 할 수 있습니다.
\documentclass{article}
\RequirePackage[silent]{fontspec}
\setmainfont{Times New Roman}
\RequirePackage{unicode-math}
\setmathfont{STIX Two Math}
\setmathfont{Times New Roman}[
range = { "2212, \minus, "002B }
]
\begin{document}
-6 and $-6$
+6 and $+6$
\end{document}
답변2
나는 당신이 쓰는 것이 좋습니다 \textnormal{-}
.
\documentclass{article}
\RequirePackage{unicode-math}
\setmainfont{Times New Roman}
\setmathfont{STIXTwoMath}[]
\setmathfont{Times New Roman}[ range = { up/{num,latin,Latin}, "2212 } ]
\begin{document}
%% Minus ("2212) in source code:
−6 and $−6$
%% Hyphen ("002D) in source code:
-6 and $\textnormal{-}6$
\end{document}