캡션 및 하위 캡션 패키지 사용 시 하위 캡션 레이블을 소문자로 표시

캡션 및 하위 캡션 패키지 사용 시 하위 캡션 레이블을 소문자로 표시

나는caption그리고subcaption하위 테이블을 생성하고 캡션을 추가하는 패키지입니다. 나는caption모든 플로트의 캡션 스타일을 변경하는 패키지입니다. 나는subcaption하위 테이블을 생성하는 패키지입니다. 나는booktabs내 테이블을 보기 좋게 만드는 데 도움이 되는 패키지. 내 MWE는 다음과 같습니다.

\documentclass{article}
\usepackage[labelsep=quad,labelfont=sc]{caption}
\usepackage[subrefformat=parens]{subcaption}
\usepackage{booktabs}

\begin{document}

\begin{table}
%  \centering
  \begin{subtable}{\textwidth}
    \centering
    \caption{First table}\label{tab:mytable:first}
    \begin{tabular}{ll}
      \toprule
      A & B\\
      \midrule
      1 & 2\\
      \bottomrule
    \end{tabular}
  \end{subtable}

  \vspace*{16pt}
  
  \begin{subtable}{\textwidth}
    \caption{Second table}\label{tab:mytable:second}
    \centering
    \begin{tabular}{ll}
      \toprule
      C & D\\
      \midrule
      3 & 4\\
      \bottomrule
    \end{tabular}
  \end{subtable}
  \caption{My caption referring to \subref{tab:mytable:first}~first table
and \subref{tab:mytable:second}~second table.}\label{tab:mytable}
\end{table}

\end{document}

... 다음과 같은 출력을 제공합니다.

산출

다른 스타일, 배치 등을 변경하지 않고 하위 테이블 레이블을 소문자((A) 대신 (a), (B) 대신 (b), ...)로 만들려면 어떻게 해야 합니까?)

가능하다면 이 형식이 로컬에서 발생하도록 하고 싶습니다. 즉, 내 논문의 테이블에 로컬이거나 이 테이블에 로컬입니다.특정한내 논문의 표.

답변1

\begin{subtable}{\textwidth}와 사이에 \caption...라인을 추가하세요

\renewcommand\captionlabelfont{}

변경 사항은 특정 테이블에 국한됩니다. 첫 번째 하위 테이블(변경됨)과 두 번째 하위 테이블(변경되지 않음)의 차이점을 확인하세요.

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

\documentclass{article}
\usepackage[labelsep=quad,labelfont=sc]{caption}
\usepackage[subrefformat=parens]{subcaption}
\usepackage{booktabs}

\begin{document}

\begin{table}
%  \centering
  \begin{subtable}{\textwidth}
    \renewcommand\captionlabelfont{}% <<< HERE <<< HERE <<< HERE
    \centering
    \caption{First table}\label{tab:mytable:first}
    \begin{tabular}{ll}
      \toprule
      A & B\\
      \midrule
      1 & 2\\
      \bottomrule
    \end{tabular}
  \end{subtable}

  \vspace*{16pt}
  
  \begin{subtable}{\textwidth}
    \tracingmacros=2
    \caption{Second table}\label{tab:mytable:second}
    \tracingmacros=0
    \centering
    \begin{tabular}{ll}
      \toprule
      C & D\\
      \midrule
      3 & 4\\
      \bottomrule
    \end{tabular}
  \end{subtable}
  \caption{My caption referring to \subref{tab:mytable:first}~first table
and \subref{tab:mytable:second}~second table.}\label{tab:mytable}
\end{table}

\end{document}

답변2

간단히 프리앰블에 사용하세요.

\usepackage[subrefformat=parens, labelfont=up]{subcaption}

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

관련 정보