이 tabularray에서 \textsc가 작동하지 않는 이유는 무엇입니까?

이 tabularray에서 \textsc가 작동하지 않는 이유는 무엇입니까?

이 tabularray 환경에서 제목 행을 작은 대문자로 만들 수 없는 이유를 알 수 없습니다( 를 추가하자마자 발생하는 것 row{2} = {font = \bfseries, cmd = \textrm},같지만 row{1} = {cmd = \textsc},.

난 그냥알다제가 뭔가 어리석은 짓을 하고 있습니다...특히 패키지를 포함하지 않고는 실제로 이것을 제대로 컴파일할 수 없기 때문에 pythontex...이건 제겐 말도 안 되는 일입니다.

\documentclass{article}
\usepackage{pythontex}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[margin = 0.5in]{geometry}
\usepackage{tabularray}


\begin{document}
% timeperiod calculations
\begin{tblr}[T]{
  colspec = {Q[c,m] *{4}{Q[c,m,$]}},
  column{1} = {2-Z}{font = \bfseries},
  row{odd} = {azure9},
  row{2} = {font = \bfseries, cmd = \textrm},
  hline{1,Z} = {2pt},
}
% header
\SetCell[c=5]{c} \textsc{Why am I not Small Caps?} \\
\hline
 &
  who &
    cares &
      not &
        me \\
tab &
  \mathrm{10\ \frac{units}{time}} &
    \mathrm{7\ units} &
      \mathrm{1\ unit \cdot 2\ units} &
        \mathrm{10\ unit^2} \\
\end{tblr}
\end{document}

편집: 명확히 하기 위해 Computer Modern 글꼴에는 굵은 작은 대문자가 없다는 것을 알고 있습니다. 그래서 첫 번째 행에 굵은 글씨를 적용하지 않으려고 합니다.

내가 이해하는 바에 따르면, 두 번째 행부터 첫 번째 열을 굵게 표시하고 두 번째 행을 완전히 굵게 표시해야 합니다. 내 머리글에 굵게 적용할 위치를 이해하지 못합니다.

를 사용하면 \normalfont \textsc{Why am I not Small Caps?}제대로 표시됩니다. 난 그냥 이해가 안 돼요.

편집 #2: 따라서 @Clara의 의견이 작동합니다. 하지만 아직 무슨 일이 일어나고 있는지 이해해야 할 것 같아요. 왜냐하면, 제 생각엔 이 복잡한 형식의 서문을 작성하려고 할 때 다른 곳에서 겪게 되는 오류와 같은 오류일 것 같습니다.

답변1

이것은 테이블이나 Pythontex와 관련이 없습니다.

라텍스는 경고한다

LaTeX Font Warning: Font shape `OT1/cmr/bx/sc' undefined
(Font)              using `OT1/cmr/bx/n' instead on input line 32.

즉, 현대 컴퓨터에는 굵은 대문자가 없으므로 일반 굵은 대문자로 대체됩니다.

다음을 추가하여 ec 글꼴을 사용할 수 있습니다.

\usepackage[T1]{fontenc}

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

답변2

@DavidCarlisle이 지적했듯이답변, Computer Modern 텍스트 글꼴 모음에는 굵은 글씨/작은 대문자 조합이 포함되지 않습니다.

치료법? 필요한 두께/모양 조합을 제공하는 글꼴을 사용하세요. 각각 Times Roman 및 Palatino 복제본을 제공하는 newtxtext및 패키지 는 이 조합을 특징으로 하는 글꼴 패키지의 예입니다.newpxtext

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

\documentclass{article}
\usepackage{pythontex}
%\usepackage{amsmath} % amsmath is loaded automatically by mathtools
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[margin = 0.5in]{geometry}
\usepackage{tabularray}
\usepackage{newtxtext,newtxmath} % or: \usepackage{newpxtext,newpxmath}

\begin{document}
% timeperiod calculations
\begin{tblr}[T]{
  colspec = {Q[c,m] *{4}{Q[c,m,$]}},
  column{1} = {2-Z}{font = \bfseries},
  row{odd} = {azure9},
  row{2} = {font = \bfseries, cmd = \textrm},
  hline{1,Z} = {2pt},
}
% header
\SetCell[c=5]{c} \textsc{Why am I not Small Caps?} \\
\hline
 &
  who &
    cares &
      not &
        me \\
tab &
  \mathrm{10\ \frac{units}{time}} &
    \mathrm{7\ units} &
      \mathrm{1\ unit \cdot 2\ units} &
        \mathrm{10\ unit^2} \\
\end{tblr}
\end{document}

관련 정보