Forgot password?
 Create new account
View 133|Reply 3

exam.cls 题目留空时,编号缩进的问题

[Copy link]

3148

Threads

8489

Posts

610K

Credits

Credits
66148
QQ

Show all posts

hbghlyj Posted at 2025-3-4 03:36:52 |Read mode
exam.cls 题目留空时,只写solution,则编号缩进有问题:
  1. \documentclass[answers]{exam}
  2. \begin{document}
  3. \begin{questions}
  4. \question foobar
  5. \begin{solution}
  6. solution to q1
  7. \end{solution}
  8. \question
  9. \begin{solution}
  10. solution to q2
  11. \end{solution}
  12. \question foobar
  13. \begin{solution}
  14. solution to q3
  15. \end{solution}
  16. \end{questions}
  17. \end{document}
Copy the Code

如何使第二个 \question 的编号保持相同的缩进?

3148

Threads

8489

Posts

610K

Credits

Credits
66148
QQ

Show all posts

 Author| hbghlyj Posted at 2025-3-4 03:41:21
如果改为
  1. \question\
Copy the Code
会多出一个空行。

如何使第二个 \question 的编号保持相同的缩进,且不多出空行?

701

Threads

110K

Posts

910K

Credits

Credits
94145
QQ

Show all posts

kuing Posted at 2025-3-4 15:08:26
怎么会没题目就有解答呢?人家压根没想过会像你这样用啊,真需要这样的就自定义一个命令或环境来写吧。

3148

Threads

8489

Posts

610K

Credits

Credits
66148
QQ

Show all posts

 Author| hbghlyj Posted at 2025-3-5 05:23:12
kuing 发表于 2025-3-4 07:08
真需要这样的就自定义一个命令或环境来写吧
我用
  1. \question\fbox{\makebox[\textwidth][l]{solution to q2}}
Copy the Code

但是宽度 \textwidth 不对

怎样才能与 solution 环境的宽度相等呢

手机版Mobile version|Leisure Math Forum

2025-4-20 12:16 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list