함수 제한: 아래 첨자가 너무 낮은 것 같습니다.

함수 제한: 아래 첨자가 너무 낮은 것 같습니다.

일부 기능의 제한 사항을 작성할 때 때로는 제한 영역(아래 첨자)이 수직선 아래쪽 아래로 들어가는 경우가 있습니다(특히 kpfont-otf제가 사용하는 글꼴 패키지의 경우).

여기에 이미지 설명을 입력하세요

아래 첨자가 수직선의 하단보다 낮아지지 않도록 하거나 최소한 조금이라도 올릴 수 있는 방법이 있나요?

아래는 MWE입니다.

\documentclass{article}
\usepackage{kpfonts-otf}

% https://tex.stackexchange.com/questions/22252/
\newcommand\restr[2]{{% we make the whole thing an ordinary symbol
  \left.\kern-\nulldelimiterspace % automatically resize the bar with \right
  #1 % the function
  \littletaller % pretend it's a little taller at normal size
  \right|_{#2} % this is the delimiter
  }}

\newcommand{\littletaller}{\mathchoice{\vphantom{\big|}}{}{}{}}

\begin{document}

\[
    \restr{f}{U}=\frac{\restr{g}{U}}{\restr{h}{U}}
\]

\[
    \restr{\frac{\partial}{\partial X_i}}{P}
\]

\end{document}

답변1

U가 전체 그룹에 대한 첨자 인 경우 \left...\rightJohn Kormylo의 설명에 따라 수직선 아래로 낮아집니다. 그러나 공식과 동일한 깊이를 가진 또 다른 보이지 않는 수학 원자를 추가하고 U그 아래 첨자를 만들면 덜 낮아질 것입니다.

\left...\right그룹과 Close 원자 사이에 공백이 없기 때문에 다른 수학 원자는 Close 유형이어야 합니다 .

\newcommand\restr[2]{{% we make the whole thing an ordinary symbol
  \left.\kern-\nulldelimiterspace % automatically resize the bar with \right
  #1 % the function
  \littletaller % pretend it's a little taller at normal size
  \right|\mathclose{\vphantom{#1}}_{#2} % this is the delimiter
  }}

여기에 이미지 설명을 입력하세요

구분 기호 는 kpfonts-otf포함된 수식에 비해 너무 작은 것 같습니다. \delimiterfactor=1100다음을 사용하여 더 큰 구분 기호를 강제로 적용할 수 있습니다 \begin{document}.

여기에 이미지 설명을 입력하세요

그러나 이것은 해킹처럼 느껴집니다.

추가 분석

수학 공식 \left.g\right|(해킹 제외 \delimiterfactor)에서 의 세로 막대는 kpfonts-otfComputer Modern의 세로 막대보다 1.25pt 더 짧습니다. 더욱이 Computer Modern 막대는 이미 수학 축의 중앙에 배치되어 있지만 막대는 kpfonts-otf1.925pt만큼 올라야 하므로 충분히 낮아지지 않는 효과를 증폭시킵니다.

kpfonts-otf

\TU/KpMath-Regular.otf(1)/m/n/10 

관련 정보