
Helvetica 글꼴로 문서를 작성해야 하는데산스 수학 글꼴수학에 대해 잘 어울리는 상대가 되려고 하지만 다른 제안에도 열려 있습니다.
지금은 정말 구하려고 애쓰고 있어요산세리프 직립 그리스어수학 모드의 문자. 그것을 달성할 수 있는 방법이 있나요?
이전에 사용했던 세리프 글꼴의 경우 그리스의아니면 이거훌륭한 답변. 둘 다 helvet+sansmathfonts에서는 작동하지 않습니다.
\documentclass{article}
\usepackage[utf8]{luainputenc}
\usepackage[T1]{fontenc}
\usepackage{siunitx}
\usepackage{sansmathfonts}
\usepackage[scaled=0.95]{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{upgreek}
\begin{document}
Upright greek in math mode:
$\mathrm{\mu\alpha\beta\gamma}$, $\upmu\upalpha\upbeta\upgamma$,
\end{document}
Steven B. Segletes의 의견에 관한 MWE:
\documentclass{article}
\usepackage[utf8]{luainputenc}
\usepackage[T1]{fontenc}
\usepackage{siunitx}
\usepackage{sansmathfonts}
\usepackage[scaled=0.95]{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{tikz}
\usepackage{scalerel}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][0]{\mbox{%
\sbox{\foobox}{#2}%
\hskip\wd\foobox
\pdfsave
\pdfsetmatrix{1 0 #1 1}%
\llap{\usebox{\foobox}}%
\pdfrestore
}}
\newcommand\unslant[2][-.2]{%
\mkern1mu%
\ThisStyle{\slantbox[#1]{$\SavedStyle#2$}}%
\mkern-1mu%
}
\newcommand\upmu{\unslant\mu}
\begin{document}
Upright greek in math mode: $\mathrm{\mu}$, $\upmu$,
\begin{tikzpicture}
\node[color=red,] {$\upmu$$\mu$};
\end{tikzpicture}
\end{document}
답변1
이 답변은 내가 독자에게 언급한 질문에 대한 의견에서 논의된 후에 나옵니다. 나는 내 솔루션이Computer Modern에 적합한 Upright Greek 글꼴기울어지지 않은 글꼴에서 직접 작동합니다(Bruno의 답변을 기반으로 함)."상자"를 전단 변환). 나는 그것을 그리스 문자 형식에 적용하는 방법을 보여 주었지만 pdflate에만 적용되는 반면 OP에는 서문에 lualatex 호출이 있음을 언급했습니다.
그런 다음 OP는 이 \unslant
방법이 lua에서도 작동하지만(halle-lua-jah) 기본 노드 가 노드 \slantbox
색상을 받아들이는 데 문제가 있다고 알려줍니다 tikz
. 는 논쟁 \slantbox
의 일부로 \textcolor
또는 \color
선언 후에 색상을 잘 받아들이 기 때문에 그것은 나에게 새로운 소식이었습니다.
그런 다음 pgf 버그 보고서를 발견했습니다.https://sourceforge.net/p/pgf/bugs/362/, 그것은 문제와 관련이 있는 것 같습니다. 이 문제는 제가 직접 해결할 수 없어서 해결 방법을 찾아봤습니다.
하이코의 대답은 다음과 같습니다.현재 색상을 저장하는 방법현재 색상을 저장 하는 멋진 기술을 보여줍니다 \colorlet{slantcolor}{.}
( 로 들어가기 전에 , 그리고 방금 을 내부에서 \mbox
다시 발행했습니다 . 문제가 해결된 것 같았습니다.\color{slantcolor}
\foobox
요약하자면, 이 \unslant
방법은 기존이탤릭체문자는 동일한 글꼴 디자인으로 똑바로 세워질 수 있으며 \colorlet
수정 사항을 통해 이 솔루션은 컬러 노드와 함께 작동할 수 있습니다 tikz
. 전반적인 접근 방식은 pdflatex 및 lualatex에서 작동합니다.
\documentclass{article}
%\usepackage[utf8]{luainputenc}
\usepackage[T1]{fontenc}
\usepackage{siunitx}
\usepackage{sansmathfonts}
\usepackage[scaled=0.95]{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{tikz}
\usepackage{scalerel}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][0]{\colorlet{slantcolor}{.}\mbox{%
\sbox{\foobox}{\color{slantcolor}#2}%
\hskip\wd\foobox
\pdfsave
\pdfsetmatrix{1 0 #1 1}%
\llap{\usebox{\foobox}}%
\pdfrestore
}}
\newcommand\unslant[2][-.2]{%
\mkern1mu%
\ThisStyle{\slantbox[#1]{$\SavedStyle#2$}}%
\mkern-1mu%
}
\newcommand\upmu{\unslant\mu}
\begin{document}
Upright greek in math mode: $\mathrm{\mu}$, $\upmu$,
\begin{tikzpicture}
\node[color=red,] {$\upmu$$\mu$};
\end{tikzpicture}
\end{document}
답변2
CB 글꼴을 사용할 수 있습니다
\documentclass{article}
\usepackage[scaled=0.95]{helvet}
\usepackage{sansmathfonts}
\renewcommand{\familydefault}{\sfdefault}
\DeclareFontEncoding{LGR}{}{}
\DeclareSymbolFont{sfgreek}{LGR}{cmss}{m}{n}
\SetSymbolFont{sfgreek}{bold}{LGR}{cmss}{bx}{n}
\DeclareMathSymbol{\alpha}{\mathord}{sfgreek}{`a}
\DeclareMathSymbol{\beta}{\mathord}{sfgreek}{`b}
\DeclareMathSymbol{\gamma}{\mathord}{sfgreek}{`g}
\DeclareMathSymbol{\delta}{\mathord}{sfgreek}{`d}
\DeclareMathSymbol{\epsilon}{\mathord}{sfgreek}{`e}
\DeclareMathSymbol{\zeta}{\mathord}{sfgreek}{`z}
\DeclareMathSymbol{\eta}{\mathord}{sfgreek}{`h}
\DeclareMathSymbol{\theta}{\mathord}{sfgreek}{`j}
\DeclareMathSymbol{\iota}{\mathord}{sfgreek}{`i}
\DeclareMathSymbol{\kappa}{\mathord}{sfgreek}{`k}
\DeclareMathSymbol{\lambda}{\mathord}{sfgreek}{`l}
\DeclareMathSymbol{\mu}{\mathord}{sfgreek}{`m}
\DeclareMathSymbol{\nu}{\mathord}{sfgreek}{`n}
\DeclareMathSymbol{\xi}{\mathord}{sfgreek}{`x}
\DeclareMathSymbol{\omicron}{\mathord}{sfgreek}{`o}
\DeclareMathSymbol{\pi}{\mathord}{sfgreek}{`p}
\DeclareMathSymbol{\rho}{\mathord}{sfgreek}{`r}
\DeclareMathSymbol{\sigma}{\mathord}{sfgreek}{`s}
\DeclareMathSymbol{\tau}{\mathord}{sfgreek}{`t}
\DeclareMathSymbol{\upsilon}{\mathord}{sfgreek}{`u}
\DeclareMathSymbol{\phi}{\mathord}{sfgreek}{`f}
\DeclareMathSymbol{\chi}{\mathord}{sfgreek}{`q}
\DeclareMathSymbol{\psi}{\mathord}{sfgreek}{`y}
\DeclareMathSymbol{\omega}{\mathord}{sfgreek}{`w}
\let\varepsilon\epsilon
\let\vartheta\theta
\let\varpi\pi
\let\varrho\rho
\DeclareMathSymbol{\varsigma}{\mathord}{sfgreek}{`c}
\let\varphi\phi
\DeclareMathSymbol{\Gamma}{\mathalpha}{sfgreek}{`G}
\DeclareMathSymbol{\Delta}{\mathalpha}{sfgreek}{`D}
\DeclareMathSymbol{\Theta}{\mathalpha}{sfgreek}{`J}
\DeclareMathSymbol{\Lambda}{\mathalpha}{sfgreek}{`L}
\DeclareMathSymbol{\Xi}{\mathalpha}{sfgreek}{`X}
\DeclareMathSymbol{\Pi}{\mathalpha}{sfgreek}{`P}
\DeclareMathSymbol{\Sigma}{\mathalpha}{sfgreek}{`S}
\DeclareMathSymbol{\Upsilon}{\mathalpha}{sfgreek}{`U}
\DeclareMathSymbol{\Phi}{\mathalpha}{sfgreek}{`F}
\DeclareMathSymbol{\Psi}{\mathalpha}{sfgreek}{`Y}
\DeclareMathSymbol{\Omega}{\mathalpha}{sfgreek}{`W}
\begin{document}
Upright greek in math mode:
$\mu\alpha\beta\gamma$
$\alpha\beta\gamma\delta\epsilon\zeta\eta\theta\iota\kappa\lambda\mu$
$\nu\xi\omicron\pi\rho\sigma\varsigma\tau\upsilon\phi\chi\psi\omega$
$\mathrm{A}\mathrm{B}\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega$
\end{document}