
Я пишу упражнение для студентов, использующих exam
класс. Я хочу, чтобы некоторые вопросы были послеклассными упражнениями, и указываю это, поставив звездочку после номера вопроса, что-то вроде (a)*
. Я пробовал \part[*]
, но это даст (* point)
. Что я могу сделать, пожалуйста? Спасибо! Мой код следующий.
\documentclass[english]{exam}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{bigints}
\usepackage{amssymb}
\usepackage{amsthm}
\begin{document}
\begin{questions}
\question
\begin{parts}
\part $*$ bla bla
\end{parts}
\end{questions}
\end{document}
решение1
Вот один из способов определения двух команд \afterclasspart
и \standardpart
придания им желаемого форматирования:
\documentclass{exam}
\newcommand\afterclasspart{\renewcommand\partlabel{(\thepartno)$^\ast$}}
\newcommand\standardpart{\renewcommand\partlabel{(\thepartno)}}
\begin{document}
\begin{questions}
\question[10]
Why is there air?
\question
What if there were no air?
\begin{parts}
\part[5]
Describe the effect on the balloon industry.
\afterclasspart
\part[5]
Describe the effect on the aircraft industry.
\standardpart
\part[5]
Describe the effect on the wool industry.
\end{parts}
\question[20]
\begin{parts}
\afterclasspart
\part
Define the universe.
Give three examples.
\standardpart
\part
If the universe were to end, how would you know?
\part
If the universe were not to end, how would you know?
\end{parts}
\end{questions}
\end{document}
Результат:
Возможно, этот вариант обеспечивает лучшее выравнивание надписей:
\documentclass{exam}
\newcommand\afterclasspart{\renewcommand\partlabel{(\thepartno)\makebox[0pt]{$\ ^\ast$}}}
\newcommand\standardpart{\renewcommand\partlabel{(\thepartno)}}
\begin{document}
\begin{questions}
\question[10]
Why is there air?
\question
What if there were no air?
\begin{parts}
\part[5]
Describe the effect on the balloon industry.
\afterclasspart
\part[5]
Describe the effect on the aircraft industry.
\standardpart
\part[5]
Describe the effect on the wool industry.
\end{parts}
\question[20]
\begin{parts}
\afterclasspart
\part
Define the universe.
Give three examples.
\standardpart
\part
If the universe were to end, how would you know?
\part
If the universe were not to end, how would you know?
\end{parts}
\end{questions}
\end{document}
Результат:
Обновлять
Аналогичную процедуру можно применить для добавления звездочки к выбранным вопросам:
\documentclass{exam}
\newcommand\afterclasspart{\renewcommand\partlabel{(\thepartno)\makebox[0pt]{$\ ^\ast$}}}
\newcommand\standardpart{\renewcommand\partlabel{(\thepartno)}}
\newcommand\afterclassquestion{\renewcommand\questionlabel{\thequestion.\makebox[0pt]{$^\ast$}}}
\newcommand\standardquestion{\renewcommand\questionlabel{\thequestion.}}
\begin{document}
\begin{questions}
\afterclassquestion
\question[10]
Why is there air?
\standardquestion
\question
What if there were no air?
\begin{parts}
\part[5]
Describe the effect on the balloon industry.
\afterclasspart
\part[5]
Describe the effect on the aircraft industry.
\standardpart
\part[5]
Describe the effect on the wool industry.
\end{parts}
\question[20]
\begin{parts}
\afterclasspart
\part
Define the universe.
Give three examples.
\standardpart
\part
If the universe were to end, how would you know?
\part
If the universe were not to end, how would you know?
\end{parts}
\end{questions}
\end{document}