
패키지 에 환경을 정의했는데 패키지 exsheets
를 사용하여 인용하고 싶은데 cleveref
방법을 찾을 수 없습니다. 이것저것 시도해보고 exsheets
설명서도 읽어보았습니다. 저도 검색해봤습니다. 설명서나 인터넷에 해결책이 있을 수도 있지만 찾을 수 없었습니다. 도움이 필요합니다.
다음은 설명이 필요 없는 코드(작동하지 않음)입니다.
\documentclass[12pt]{book}
\usepackage{graphicx}
\usepackage{cleveref}
\usepackage{exsheets}
\NewQuSolPair{example}[name=Example,headings=runin]{egsolution}[name=Solution,print=true,headings=runin]
\begin{document}
\chapter{Sample chapter}
This is some text.
\begin{example}\label{ex:test}
This is some example.
\end{example}
\begin{egsolution}
This is the solution.
\end{egsolution}
This is some example \cref{ex:test}
\end{document}
답변1
패키지 exsheets
는 여전히 다른 카운터를 사용하는 것을 허용하지 않습니다 question
. (내가 아는 한, 변경하기 위해 @clemens에게 요청했지만 ;-))
그러나 cleveref
라벨 유형을 모르므 question
로
\crefname{question}{question}{questions}
대문자 변형
\Crefname{question}{Question}{Questions}
나중에 정의해야 합니다.
cleveref
또한 마지막 위치, 즉 다음 위치에 로드되는 패키지 중 하나여야 합니다 exsheets
.
\documentclass[12pt]{book}
\usepackage{graphicx}
\usepackage{exsheets}
\usepackage{cleveref}
\NewQuSolPair{example}[name=Example,headings=runin]{egsolution}[name=Solution,print=true,headings=runin]
\crefname{question}{question}{questions}
\Crefname{question}{Question}{Questions}
\begin{document}
\chapter{Sample chapter}
This is some text.
\begin{example}\label{ex:test}
This is some example.
\end{example}
\begin{egsolution}
This is the solution.
\end{egsolution}
This is some example \cref{ex:test}. \Cref{ex:test} shows that ...
\end{document}