비머에서 정리 이름 뒤에 구분선이 없습니다.

비머에서 정리 이름 뒤에 구분선이 없습니다.

질문 답변을 적용했습니다비머의 정리 이름 바로 뒤에 정리 내용내 질문에. \inserttheorempointation 뒤에 \normalfont를 넣었는데 결과가 예상치 못했습니다. 이미지 1을 보시겠습니까?

            \documentclass[envcountsect]{beamer}
            \usetheme{CambridgeUS}
            \usefonttheme{serif}
            \makeatletter
            \setbeamertemplate{theorem begin}
            {%
                \begin{\inserttheoremblockenv}
                    {%
                        \inserttheoremheadfont
                        \inserttheoremname
                        \inserttheoremnumber
                        \ifx \inserttheoremaddition \empty \else\ (\inserttheoremaddition)\fi%
                        \inserttheorempunctuation
                        \normalfont
                    }
                }
                \setbeamertemplate{theorem end}{\end{\inserttheoremblockenv}}
            \makeatother


             \begin{document}
                \section{ABC}
                \begin{frame}
                    \begin{theorem}[ABC]
                        This is a theorem
                    \end{theorem}
                \end{frame}
             \end{document}

결과는 다음과 같습니다.

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

바로 뒤에 내용을 넣고 싶습니다.정리(구분선 없음). 다음과 같습니다

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

답변1

제목이 아닌 본문에 서식 지정 명령을 입력하고 원하는 스타일을 모방하기 위해 제목 요소의 글꼴과 색상을 theoremblockenv선택 해야 합니다. block title제목이 있는 블록과 없는 블록의 두 가지 예를 비교해 보세요.

샘플 출력

\documentclass[envcountsect]{beamer}

\usetheme{CambridgeUS}
\usefonttheme{serif}

\usepackage{etoolbox}

\makeatletter
\setbeamertemplate{theorem begin}
{%
\begin{\inserttheoremblockenv}
  {}{\usebeamerfont*{block title}\usebeamercolor[fg]{block title}%
  \inserttheoremname
  \inserttheoremnumber
  \ifx \inserttheoremaddition \empty \else\ (\inserttheoremaddition)\fi
  \inserttheorempunctuation}
  \normalfont
  }
  \setbeamertemplate{theorem end}{\end{\inserttheoremblockenv}}
\makeatother

\begin{document}

\section{ABC}

\begin{frame}

  \begin{theorem}[ABC]
    This is a theorem
  \end{theorem}

  Text.

  \begin{block}{Block title}
    A block with title.
  \end{block}

  Text.

  \begin{block}{}
    A block without title.
  \end{block}

\end{frame}

\end{document}

관련 정보