비머의 tikz와 반동적으로

비머의 tikz와 반동적으로

나는 in semiverbatim과 함께 사용하고 있습니다 . 다음 MWE에서 오류가 발생했습니다.tikzbeamer

! 패키지 tikz 오류: 죄송합니다. 일부 패키지는 수학 모드 달러 기호의 의미를 재정의했습니다. 이는 tikz 및 해당 calc 라이브러리와 호환되지 않으며 복구할 수 없는 오류가 발생할 수 있습니다.

이 문제를 해결하기 위한 아이디어가 있으신가요? 미리 감사드립니다.

\documentclass{beamer}

\usepackage{csed}

\usepackage{tikz}
\usetikzlibrary{shapes}

\newif\ifshowanimation
% The slides with animations take a long time to process.
% They are omitted in handout mode.
\showanimationfalse

\newenvironment<>{exercise}{\begin{block}#1{Exercise}}{\end{block}}

\newenvironment<>{notes}{\begin{alertblock}#1{Notes}}{\end{alertblock}}

\newcommand*{\menu}[1]{\textbf{#1}}
\newcommand*{\menuitem}[1]{\,$\to$\,\textbf{#1}}

\definecolor{highlight1}{named}{yellow}
\definecolor{highlight2}{named}{pink}
\definecolor{highlight3}{named}{green}
\definecolor{highlight4}{named}{orange}
\definecolor{Red}{named}{red}
\definecolor{Blue}{named}{blue}

\pgfdeclareimage[width=0.95\textwidth]{backdrop}{images/background.jpg}
\pgfdeclareimage[width=1mm]{pointer}{images/pointer.png}
\pgfdeclareimage[width=0.18\textwidth]{startmenu}{images/startMenu.jpg}
\pgfdeclareimage[width=0.34\textwidth]{programsmenu}{images/programsMenu.jpg}
\pgfdeclareimage[width=0.495\textwidth]{submenu}{images/subMenu.jpg}
\pgfdeclareimage[width=0.608\textwidth]{latexmenu}{images/latexMenu.jpg}
\pgfdeclareimage[width=0.591\textwidth]{latexmenu2}{images/latexMenu2.png}
\pgfdeclareimage[width=0.591\textwidth]{cmd1}{images/cmd1.jpg}
\pgfdeclareimage[width=0.591\textwidth]{cmd2}{images/cmd2.jpg}
\foreach \x in {1,...,46}
{
  \pgfdeclareimage[width=0.84\textwidth]{tmkwin\x}{images/tmkwin-\x.jpg}
}
\pgfdeclareimage[width=0.75\textwidth]{saveAs1}{images/tex-28.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs2}{images/tex-30.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs3}{images/tex-32.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs4}{images/tex-35.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs5}{images/tex-36.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs6}{images/tex-37.jpg}


\begin{document}

\begin{frame}[fragile]
  \frametitle{A Simple Document}

\begin{example}
    \begin{semiverbatim}
        \textcolor<2>{Red}{\cs{documentclass}\annote<5-7>[offset=0.5in,voffset=1cm,pos=br,bg=highlight2]{[a4paper,12pt]}{Class options}\annote<4-7>[pos=br,bg=highlight1]{\marg{article}}{The class name.}}
        \vspace{-2\baselineskip}\alt<7>{\colorbox{highlight4}{\rmfamily Preamble}}{\strut}
        \textcolor<2>{Red}{\cs{begin}\marg{document}}
        \textcolor<3>{Blue}{\% This is a comment}
        \annote<6-7>[pos=cr,bg=highlight3,offset=0.4in]{\begin{tabular}{@{}l}
        This is   a simple\\
        document\cs{footnote}\marg{with a footnote}.\\
        \\
        This is a new paragraph.
        \end{tabular}}{The document.}
        \textcolor<2>{Red}{\cs{end}\marg{document}}
    \end{semiverbatim}
\end{example}

\end{frame}


\end{document}

편집됨


csed에서 얻을 수 있습니다여기.

답변1

댓글이 너무 길었습니다.

오류 메시지는 일반적으로 ) 에 있는 \tikz@ensure@dollar@catcode파일에 정의 되어 있습니다. 한 가지 해결 방법은 다음을 사용하여 오류 메시지를 비활성화하는 것입니다.tikz.code.tex.../tex/generic/pgf/frontendlayer/tikz/tikz.code.tex

\makeatletter
\global\let\tikz@ensure@dollar@catcode=\relax
\makeatother

이는 문서의 다른 곳에서 원하지 않는 결과를 생성할 수 있지만 적어도 예제 코드에서는 원하는 결과를 제공합니다.

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{shapes}
\usepackage{csed}

\makeatletter
\global\let\tikz@ensure@dollar@catcode=\relax
\makeatother

\newif\ifshowanimation
% The slides with animations take a long time to process.
% They are omitted in handout mode.
%\showanimationfalse

\newenvironment<>{exercise}{\begin{block}#1{Exercise}}{\end{block}}

\newenvironment<>{notes}{\begin{alertblock}#1{Notes}}{\end{alertblock}}

\newcommand*{\menu}[1]{\textbf{#1}}
\newcommand*{\menuitem}[1]{\,$\to$\,\textbf{#1}}

\definecolor{highlight1}{named}{yellow}
\definecolor{highlight2}{named}{pink}
\definecolor{highlight3}{named}{green}
\definecolor{highlight4}{named}{orange}
\definecolor{Red}{named}{red}
\definecolor{Blue}{named}{blue}

\pgfdeclareimage[width=0.95\textwidth]{backdrop}{images/background.jpg}
\pgfdeclareimage[width=1mm]{pointer}{images/pointer.png}
\pgfdeclareimage[width=0.18\textwidth]{startmenu}{images/startMenu.jpg}
\pgfdeclareimage[width=0.34\textwidth]{programsmenu}{images/programsMenu.jpg}
\pgfdeclareimage[width=0.495\textwidth]{submenu}{images/subMenu.jpg}
\pgfdeclareimage[width=0.608\textwidth]{latexmenu}{images/latexMenu.jpg}
\pgfdeclareimage[width=0.591\textwidth]{latexmenu2}{images/latexMenu2.png}
\pgfdeclareimage[width=0.591\textwidth]{cmd1}{images/cmd1.jpg}
\pgfdeclareimage[width=0.591\textwidth]{cmd2}{images/cmd2.jpg}
\foreach \x in {1,...,46}
{
  \pgfdeclareimage[width=0.84\textwidth]{tmkwin\x}{images/tmkwin-\x.jpg}
}
\pgfdeclareimage[width=0.75\textwidth]{saveAs1}{images/tex-28.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs2}{images/tex-30.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs3}{images/tex-32.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs4}{images/tex-35.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs5}{images/tex-36.jpg}
\pgfdeclareimage[width=0.75\textwidth]{saveAs6}{images/tex-37.jpg}


\begin{document}

\begin{frame}
  \frametitle{A Simple Document}

\begin{example}
    \begin{semiverbatim}
        \textcolor<2>{Red}{\cs{documentclass}\annote<5-7>[offset=0.5in,voffset=1cm,pos=br,bg=highlight2]{[a4paper,12pt]}{Class options}\annote<4-7>[pos=br,bg=highlight1]{\marg{article}}{The class name.}}

        \vspace{-2\baselineskip}\alt<7>{\colorbox{highlight4}{\rmfamily Preamble}}{\strut}

        \textcolor<2>{Red}{\cs{begin}\marg{document}}

        \textcolor<3>{Blue}{\% This is a comment}

        \annote<6-7>[pos=cr,bg=highlight3,offset=0.4in]{\begin{tabular}{@{}l}
        This is   a simple\\
        document\cs{footnote}\marg{with a footnote}.\\
        \\
        This is a new paragraph.
        \end{tabular}}{The document.}

        \textcolor<2>{Red}{\cs{end}\marg{document}}
    \end{semiverbatim}
\end{example}

\end{frame}


\end{document}

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

이전에 말했듯이 이것은 오류 메시지만 비활성화하므로 답변이 아닌 긴 댓글 상태입니다.

관련 정보