TeX - LaTeX Asked by user61681 on February 14, 2021
documentclass{exam}
printanswers
begin{document}
begin{questions}
question Sample Question 1
begin{choices}
choice Option1
choice Option2
choice Option3
correctchoice Option4
end{choices}
question Sample Question 2
begin{choices}
choice Option1
choice Option2
correctchoice Option3
choice Option4
end{choices}
end{questions}
end{document}
With the printanswers
command, correct choice gets bold. Instead of making it bold, is it possible to display the correct choice in red color font? Any help will be highly appreciated. Thanks.
The class provides the macro CorrectChoiceEmphasis
for that (section 5.7 of the manual). The default definition is
CorrectChoiceEmphasis{bfseries}
so you can write
usepackage{xcolor}
CorrectChoiceEmphasis{color{red}bfseries}
for boldface, red text (or remove bfseries
if you only want the text in red).
documentclass{exam}
usepackage{xcolor}
CorrectChoiceEmphasis{color{red}bfseries}
printanswers
begin{document}
begin{questions}
question Sample Question 1
begin{choices}
choice Option1
choice Option2
choice Option3
correctchoice Option4
end{choices}
question Sample Question 2
begin{choices}
choice Option1
choice Option2
correctchoice Option3
choice Option4
end{choices}
end{questions}
end{document}
Correct answer by campa on February 14, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP