我一直在 tufte-book 课上写笔记,但它总是给我无法识别的错误。所以我改用 svmono 课。问题是它似乎不能与 exsheets 包一起使用。要为自己制作讲义和笔记,exsheets 包是我发现的最佳解决方案。所以,我需要这个包。
部分错误如下:
Undefined control sequence.
/usr/local/texlive/2014/texmf-dist/tex/latex/exsheets/exsheets.sty, line 213
<argument> \@cntfmts@err@counter@defined
{question}
l.213 ...Pattern* [ exsheets ] { question } { qu }
The control sequence at the end of the top line of your error message was never
\def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling
(e.g., `I\hbox'). Otherwise just continue, and I'll forget about
whatever was undefined.
/usr/local/texlive/2014/texmf-dist/tex/latex/exsheets/exsheets.sty, line 2770
! LaTeX error: "xparse/environment-already-defined"
! Environment 'question' already defined!
! See the LaTeX3 documentation for further information.
! For immediate help type H <return>.
l.2770 \DeclareQuestionProperty
{counter}
| You have used \NewDocumentEnvironment with an environment that already has a
| definition.
| The existing definition of 'question' will be overwritten.
梅威瑟:
\documentclass[envcountsame,envcountchap]{svmono}
\usepackage{amsmath}
\usepackage{exsheets}
\NewQuSolPair{example}[name=Example]{examplesol}
\begin{document}
\mainmatter
\chapter{Integer}
\section{The Division Algorithm}
\begin{theorem}
Given integers $a$ and $b$, with $b>0$ there exist unique integers $q$ and
$r$ satisfying \[a=qb+r\ (0 \leq r <b).\] The integers $q$ and $r$ are called,
respectively, the quotient and remainder in the division of $a$ by $b$.
\end{theorem}
\end{document}
我应该怎么办?
答案1
该类svmono
已经定义了环境{question}
,并且{solution}
为了使其exsheets
工作,这些环境中的基本宏必须是未定义的:
\documentclass{svmono}
\usepackage{etoolbox}
\undef\thequestion
\undef\question
\undef\solution
\usepackage{exsheets}
\begin{document}
\end{document}
请注意,这\NewQuSolPair{example}[name=Example]{examplesol}
也会导致错误,因为svmono
还定义了一个环境example
。