알고리즘 제목과 색인 번호의 글꼴 크기를 어떻게 줄일 수 있나요?

알고리즘 제목과 색인 번호의 글꼴 크기를 어떻게 줄일 수 있나요?

알고리즘 환경에서 의사 코드를 작성하고 있는데, 알고리즘 제목과 인덱스 번호의 글꼴 크기를 어떻게 줄일 수 있나요?

\begin{frame}{Proposal Algorithm}
\begin{minipage}{.49\textwidth}
\centering{\textcolor{red}{Proposal}}
\begin{algorithm}[H]
    \begin{algorithmic}[10]
    \tiny{
        \STATE  a
        \WHILE {\textcolor{red}{$x>0$}}
         \STATE Simulate $g\sim uniformm[0,1]$;\\
         \STATE Simulate $y\sim \mathcal{N}(0,\sigma^2)$\\
        \ENDWHILE
        }
    \end{algorithmic}
    \caption{\small{$\Delta$- proposla new algorithm}}
    \label{al122}
\end{algorithm}
 \end{minipage}
 \end{frame}

답변1

caption패키지를 사용하여 글꼴 크기를 변경할 수 있습니다 .

\documentclass{beamer}

\setbeamertemplate{caption}[numbered]

\usepackage{caption}
\captionsetup[algorithm]{font=tiny}

\usepackage{algorithm,algorithmic}



\begin{document}

\begin{frame}{Proposal Algorithm}
\begin{minipage}{.49\textwidth}
\centering{\textcolor{red}{Proposal}}
\begin{algorithm}[H]
    \begin{algorithmic}[10]
    \tiny
        \STATE  a
        \WHILE {\textcolor{red}{$x>0$}}
         \STATE Simulate $g\sim uniformm[0,1]$;\\
         \STATE Simulate $y\sim \mathcal{N}(0,\sigma^2)$\\
        \ENDWHILE
    \end{algorithmic}
    \caption{$\Delta$- proposla new algorithm}
    \label{al122}
\end{algorithm}
 \end{minipage}
 \end{frame}

    
\end{document}

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

관련 정보