30 xsim宏包答案输出的问题

发布于 2023-08-18 18:29:13

11.jpg
12.jpg
test.tex

`documentclass[hyperref,a4paper,openany,UTF8]{ctexbook}
usepackage{amsmath,amssymb}
usepackage{amsthm}
usepackage{geometry}
usepackage{hyperref}
usepackage{indentfirst}
usepackage{latexsym}
usepackage{titlesec}
usepackage{xeCJK}
usepackage[no-files]{xsim}
usepackage{lastpage}

xsimsetup{
load-style = layouts
}
DeclareExerciseType{eg}
{exercise-env = eg,
solution-env = egans,
exercise-name ={例},
solution-name ={例},
%exercise-template = item ,
%solution-template = item
exercise-template =margin,
solution-template =margin,
%ex-heading = subsection* ,
%sol-heading = subsection*
}
renewcommand*theeg{arabic{eg}}

DeclareExerciseType{ex}
{exercise-env = ex,
solution-env = exans,
exercise-name ={},
solution-name ={},
%exercise-template = item ,
%solution-template = item
exercise-template =margin,
solution-template =margin,
%ex-heading = subsection* ,
%sol-heading = subsection*
}
renewcommand*theex{(arabic{ex})}

title{测试}
author{测试}

date{today}

begin{document}
maketitle
tableofcontents

part{题}
chapter{测试}
section{测试一}
subsection{例题一}
begin{eg}
eg1
end{eg}
begin{egans}
eg1
end{egans}

begin{ex}
ex1
end{ex}
begin{exans}
ex1
end{exans}

subsection{例题二}
begin{eg}
eg2
end{eg}
begin{egans}
eg2
end{egans}

begin{ex}
ex2
end{ex}
begin{exans}
ex2
end{exans}

section{测试二}
subsection{例题三}
begin{eg}
eg3
end{eg}
begin{egans}
eg3
end{egans}

begin{ex}
ex3
end{ex}
begin{exans}
ex3
end{exans}

part{答案}
printsolutions[chapter=1,section=1,headings-template=none]
printsolutions[chapter=1,section=2,headings-template=none]
end{document}
`

练习题的顺序为:例1,练习1,例2,练习2,例3,练习3,但答案在输出的时候将练习1,练习2的答案放在了例2的后面,没有按顺序输出,这是什么原因呢?能否按题目的顺序(例1,练习1,例2,练习2,例3,练习3)依次输出答案呢?

查看更多

关注者
0
被浏览
859
1 个回答
mike
mike 2023-08-18
这家伙很懒,什么也没写!

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览