캡션 라벨의 \spacedlowsmallcaps

캡션 라벨의 \spacedlowsmallcaps

산세리프체 외에 작은 글씨 labelfont도 어떻게 만들 수 있나요 ?\spacedlowsmallcaps

\documentclass{article}

            \usepackage{microtype}
            \usepackage{caption}

            \microtypesetup{expansion=false}%

            \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textls[80]{\scshape\MakeTextLowercase{#1}}}%

            \renewcommand{\sfdefault}{iwona}


\captionsetup{%
             format=hang,%
             labelfont={small,sf},%
             font={small,sf},%
             width={.8\textwidth}%
             }

\captionsetup[table]{skip=\medskipamount}

\begin{document}

\begin{table}
\caption{Test}
\end{table}

\end{document}

\subfloat명령

\DeclareCaptionLabelFormat{mysublabel}{\small\sffamily\bothIfSecond{\spacedlowsmallcaps{#1}}{~}\spacedlowsmallcaps{(#2)}}

\captionsetup[subfloat]{%
                       labelformat=mysublabel,%
                       labelsep=space,%
                       listofformat=subparens,%
                       font={small,sf},%
                   }

답변1

자신만의 라벨 형식을 선언할 수 있습니다. 패키지 는 이를 caption제공합니다 . \DeclareCaptionLabelFormat이름과 코드라는 두 가지 인수가 필요합니다. 코드 인수 내에서 #1캡션 이름(예: “그림” 또는 “표”) 및 #2숫자에 사용할 수 있습니다. 이들 중 하나가 제공되지 않은 경우에도 올바른 형식을 얻으려면 패키지 caption는 해당 인수가 제공되면 두 인수를 모두 정의 \bothIfFirst하고 \bothIfSecond그렇지 않으면 비를 정의합니다. 패키지를 사용하는 경우 이는 중요할 수 있습니다 subcaption. 자세한 내용은 다음을 참조하세요.패키지 문서.

\documentclass{article}

\usepackage{microtype}
\usepackage{caption}
\usepackage{textcase}

\microtypesetup{expansion=false}%

\DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textls[80]{\scshape\MakeTextLowercase{#1}}}%

\renewcommand{\sfdefault}{iwona}

\DeclareCaptionLabelFormat{mycaption}{%
  \bothIfFirst{\spacedlowsmallcaps{#1}}{~}\spacedlowsmallcaps{#2}}

\captionsetup{%
             format=hang,%
             % labelfont={small,sf},% not necessary since `font' applies to both label and text
             labelformat=mycaption,
             font={small,sf},%
             width={.8\textwidth}%
             }

\captionsetup[table]{skip=\medskipamount}

\begin{document}

\begin{table}
\caption{Test}
\end{table}

\end{document}

관련 정보