mdframed와 titlesec 사이의 버그

mdframed와 titlesec 사이의 버그

편집 : 내가 사용하는 버전 titlesec

titlesec.sty 2011/12/15 v2.10.0 제목 섹션화


mdframed상자와 정리와 유사한 환경을 정의하는 데 사용하고 있습니다 . 패키지를 로드할 때 titlesec수직 정렬에 문제가 있습니다.

버그가 있는 MWE

다음은 로드된 MWE입니다 titlesec.

\documentclass{article}
\usepackage{titlesec} % This is the cause of the wrong alignment
\usepackage{mdframed}

\newmdenv[%
innerleftmargin = 0pt,
innerrightmargin = 0pt,
innertopmargin = 0pt,
innerbottommargin = 0pt,
leftmargin = 0pt,
rightmargin = 0pt,
topline = false,
bottomline = false,
leftline = false,
rightline = true
]{myBox}

\mdfdefinestyle{myFramedTheoremStyle}{%
linewidth=0pt,
innertopmargin=-1pt,
innerbottommargin=8pt,
innerleftmargin=8pt,
innerrightmargin=8pt,
skipabove=10pt,
backgroundcolor=yellow}

\mdtheorem[style=myFramedTheoremStyle]{theo}{Theorem}

\begin{document}

\begin{myBox}
\section{test}
test
\begin{theo}
test
\end{theo}
\end{myBox}

\section{test}
test
\begin{theo}
Test
\end{theo}
\end{document}

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

MWE는 어떻게 되어야 할까요?

로드 하지 않은 경우 titlesec결과는 다음과 같습니다.

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

내 질문

버그를 고칠 수 있는 방법이 있나요? 집중적으로 사용 mdframed하지만 titlesec다음 줄에만 필요합니다.

\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titlespacing*{\section} {0pt}{0ex plus 10ex minus -3.5ex}{-0.5ex plus .2ex}
\titlespacing*{\subsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

당신의 도움을 주셔서 감사합니다.


나는 삭제하고 \section*{...}(또한 titlesec; 나는 사용하지 않고 \section{}별표 표시된 버전만 사용함) 적절한 크기와 형식의 텍스트로 바꿀 수도 있지만 누군가 큰 문제를 해결하는 방법을 찾으면 그것도 좋습니다!

아무튼 이 버그를 발견했으니 여기서 참고하면 좋을 것 같습니다.

답변1

최신 버전 titlesec(2016/03/21 v2.10.2) 및 mdframed(2013/07/01 1.9b)을 사용하면 MWE가 문제 없이 작동합니다.

관련 정보