별표 표시된 버전의 섹션 명령 내에서 `\동사`를 유효하게 만드는 방법은 무엇입니까?

별표 표시된 버전의 섹션 명령 내에서 `\동사`를 유효하게 만드는 방법은 무엇입니까?

내부에서는 유효 \cprotect하지 않은 것 같습니다 .\verb별표 표시된 버전분할 명령 \section*\paragraph*

이 문제를 해결하는 방법은 무엇입니까?

% MWE
\documentclass{book}
\usepackage{cprotect}
\begin{document}
\cprotect\part*{text and \verb"\verb"}
\cprotect\chapter*{text and \verb"\verb"}
\cprotect\section*{text and \verb"\verb"}
\cprotect\subsection*{text and \verb"\verb"}
\cprotect\subsubsection*{text and \verb"\verb"}
\cprotect\paragraph*{text and \verb"\verb"}
\cprotect\subparagraph*{text and \verb"\verb"}
\end{document}

답변1

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

\documentclass{book}
\usepackage{cprotect}
\begin{document}
\cprotect{\part*}{text and \verb"\verb"}
\cprotect{\chapter*}{text and \verb"\verb"}
\cprotect{\section*}{text and \verb"\verb"}
\cprotect{\subsection*}{text and \verb"\verb"}
\cprotect{\subsubsection*}{text and \verb"\verb"}
\cprotect{\paragraph*}{text and \verb"\verb"}
\cprotect{\subparagraph*}{text and \verb"\verb"}
\end{document}

관련 정보