Resizebox 내부의 글꼴 크기를 기준으로 Resizebox 외부의 글꼴 크기를 정확히 줄이는 방법은 무엇입니까?

Resizebox 내부의 글꼴 크기를 기준으로 Resizebox 외부의 글꼴 크기를 정확히 줄이는 방법은 무엇입니까?

다음 최소 작업 예제는 resizebox길이가 길지만 tabulartextwidth의 캡션과 문장은 tabular이에 따라 축소되지 않습니다. 아래의 resizebox순진한 s 대신 내부의 글꼴 크기를 참조하는 이러한 캡션과 문장의 크기를 정확하게 줄일 수 있는 방법이 있는지 궁금합니다 small. 당신의 도움을 주셔서 감사합니다!

\documentclass{article}

\usepackage{graphicx}
\usepackage[font=normalsize]{subcaption}

\begin{document}

\begin{table}

% How could one exactly downsize this caption?
\caption{\small This is a caption.}

% How could one exactly downsize these sentences?
{\small This is sentence 1. This is sentence 2. This is sentence 3.
This is sentence 4. This is sentence 5. This is sentence 6.\par}

% based on the font size inside this resizebox
\resizebox{\textwidth}{!}{
\subcaptionbox{This is a subcaption.}{
\begin{tabular}{*{12}c}\hline
1.1111&2.2222&3.3333&4.4444&5.5555&6.6666&
7.7777&8.8888&9.9999&0.0000&1.1111&2.2222\\
1.1111&2.2222&3.3333&4.4444&5.5555&6.6666&
7.7777&8.8888&9.9999&0.0000&1.1111&2.2222\\\hline
\end{tabular}
}
}

\end{table}

\end{document}

답변1

죄송합니다. 귀하의 예에는 몇 가지 나쁜 아이디어가 있습니다.

  1. 최종 결과를 전혀 제어할 수 없기 때문에 테이블 크기 조정은 좋지 않습니다.

  2. 표의 글꼴 크기를 크기에 맞게 줄이더라도 캡션은 다른 모든 캡션과 동일해야 합니다.

  3. 내부의 글꼴 변경 명령은 \caption절대 사용해서는 안됩니다.

하지만 나는 하위 캡션의 글꼴 크기를 조정하는 것에 반대하지 않습니다.

\documentclass{article}
\usepackage[font=normalsize]{subcaption}
\usepackage{booktabs}

\begin{document}

\begin{table}[htp]

\caption{This is a caption.}

\captionsetup[subtable]{font=footnotesize}
\subcaptionbox{This is a subcaption.}{%
  \footnotesize
  \setlength{\tabcolsep}{0pt}%
  \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}*{12}c}
  \toprule
  1.1111 & 2.2222 & 3.3333 & 4.4444 & 5.5555 & 6.6666 &
    7.7777 & 8.8888 & 9.9999 & 0.0000 & 1.1111 & 2.2222 \\
  1.1111 & 2.2222 & 3.3333 & 4.4444 & 5.5555 & 6.6666 &
    7.7777 & 8.8888 & 9.9999 & 0.0000 & 1.1111 & 2.2222 \\
  \bottomrule
\end{tabular*}%
}
\end{table}

\end{document}

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

관련 정보