mdframed 예제 던지기 오류

mdframed 예제 던지기 오류

나는 다음 mdframed예제를 얻으려고 노력하고 있습니다.패키지 문서작동하려고 하는데( mdframed-example-default5페이지) 다음과 같은 오류가 발생합니다.

Missing number, treated as zero T
Illegal unit of measure (pt inserted) T

제목 상자가 너무 낮은 위치에 있는 환경 내용을 인쇄하기 전에 이상한 "pt"를 표시합니다. 이 문제를 해결하는 방법은 무엇입니까? 제목 상자는 맨 윗줄 중앙에 있어야 합니다.

\documentclass{article}

\usepackage{tikz,mdframed}

\begin{document}

\mdfsetup{skipabove=\topskip,skipbelow=\topskip}
\newcounter{theo}[section] 
\newenvironment{theo}[1][]{%
\stepcounter{theo}% 
    \ifstrempty{#1}% 
    {\mdfsetup{%
        frametitle={%
            \tikz[baseline=(current bounding box.east),outer sep=0pt]
            \node[anchor=east,rectangle,fill=blue!20]
            {\strut Theorem~\thetheo};}}%
    }%
    {\mdfsetup{% 
        frametitle={%
            \tikz[baseline=(current bounding box.east),outer sep=0pt]
            \node[anchor=east,rectangle,fill=blue!20]
            {\strut Theorem~\thetheo:~#1};}}%
    }%
    \mdfsetup{innertopmargin=10pt,linecolor=blue!20,%
            linewidth=2pt,topline=true,
            frametitleaboveskip=\dimexpr−\ht\strutbox\relax,}
    \begin{mdframed}[]\relax%
    }{\end{mdframed}}

\begin{theo}
    This is an example theorem
    %
    \begin{equation}
        a^2 + b^2 = c^2
    \end{equation}
\end{theo}

\end{document}

~를 야기하는

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

답변1

라인

frametitleaboveskip=\dimexpr−\ht\strutbox\relax

바로 앞에 이상한 문자(아마도 복사-붙여넣기 프로세스의 결과)가 있는 \ht경우 표준 빼기 기호로 바꿔야 합니다.

frametitleaboveskip=\dimexpr-\ht\strutbox\relax

코드:

\documentclass{article}

\usepackage{tikz,mdframed}

\mdfsetup{skipabove=\topskip,skipbelow=\topskip}
\newcounter{theo}[section] 
\newenvironment{theo}[1][]{%
\stepcounter{theo}% 
    \ifstrempty{#1}% 
    {\mdfsetup{%
        frametitle={%
            \tikz[baseline=(current bounding box.east),outer sep=0pt]
            \node[anchor=east,rectangle,fill=blue!20]
            {\strut Theorem~\thetheo};}}%
    }%
    {\mdfsetup{% 
        frametitle={%
            \tikz[baseline=(current bounding box.east),outer sep=0pt]
            \node[anchor=east,rectangle,fill=blue!20]
            {\strut Theorem~\thetheo:~#1};}}%
    }%
    \mdfsetup{innertopmargin=10pt,linecolor=blue!20,%
            linewidth=2pt,topline=true,
            frametitleaboveskip=\dimexpr-\ht\strutbox\relax,}
    \begin{mdframed}[]\relax%
    }{\end{mdframed}}

\begin{document}

\begin{theo}
test
    \begin{equation}
        a^2 + b^2 = c^2
    \end{equation}
\end{theo}

\end{document}

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

관련 정보