考试类别:右边距中的 \question

考试类别:右边距中的 \question

我有一个.tex带有\question \part和的文件\subpart(示例.tex文件粘贴在这个问题中)。

我需要右边距中的所有点;但目前\question它还没有出现在边距中。

我还想用类似“Q.1”的内容替换默认问题编号(目前只显示“1”)

您能帮忙解决上述两个问题吗?

\documentclass[addpoints,answers,10pt]{exam}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{nonfloat}
\usepackage{caption}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{ifpdf}
\usepackage[export]{adjustbox}
\marksnotpoints
\bracketedpoints
\pointsdroppedatright
\pointsinrightmargin
\pagestyle{headandfoot}
\headrule
\footrule
\renewcommand{\thepartno}{\Alph{partno}}
\newcolumntype{b}{X}
\newcolumntype{s}{>{\hsize=.1\hsize}X}
\begin{document}
\begin{questions}
\question{\textbf{ Solve ANY ONE}}[4]  \begin{parts}
\part[2]
 Prepare a speech, to be belivered at your school, on the topic "Health is Wealth", on the occasion of world Health Day .
\part[2]
Solve Any TWO
\begin{subparts}
\subpart[1]  \rule{1cm}{0.4pt}  was known as peace-loving and cultured city-state. (Marathon, Athens, Sparta)
\subpart[1] The first tool made by man was  \rule{1cm}{0.4pt}  . (Hand axe, a Spear, an Adaze)
\subpart[1] Lord Buddha preached in  \rule{1cm}{0.4pt}  language. (Hindi, Pali, Sanskrit)
\end{subparts}
\end{parts}
\end{questions}
\end{document}

答案1

  1. 你误用了\question;语法是\question[<points>],所以你应该使用

    \question[4] 
    \textbf{ Solve ANY ONE}
    
  2. 要仅更改用于编号问题的标签,请重新定义\questionlabel

    \renewcommand\questionlabel{Q.\thequestion.}
    

    要完全改变计数器的表示形式,请重新定义\thequestion

    \renewcommand\thequestion{Q.\arabic{question}}
    

完整代码:

\documentclass[addpoints,answers,10pt]{exam}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{nonfloat}
\usepackage{caption}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{ifpdf}
\usepackage[export]{adjustbox}
\marksnotpoints
\bracketedpoints
\pointsdroppedatright
\pointsinrightmargin
\pagestyle{headandfoot}
\headrule
\footrule
\renewcommand{\thepartno}{\Alph{partno}}
\newcolumntype{b}{X}
\newcolumntype{s}{>{\hsize=.1\hsize}X}

\renewcommand\questionlabel{\llap{Q.}\thequestion.}

\begin{document}
\begin{questions}
\question[4]
\textbf{Solve ANY ONE}
\begin{parts}
\part[2]
 Prepare a speech, to be belivered at your school, on the topic "Health is Wealth", on the occasion of world Health Day .
\part[2]
Solve Any TWO
\begin{subparts}
\subpart[1]  \rule{1cm}{0.4pt}  was known as peace-loving and cultured city-state. (Marathon, Athens, Sparta)
\subpart[1] The first tool made by man was  \rule{1cm}{0.4pt}  . (Hand axe, a Spear, an Adaze)
\subpart[1] Lord Buddha preached in  \rule{1cm}{0.4pt}  language. (Hindi, Pali, Sanskrit)
\end{subparts}
\end{parts}
\end{questions}
\end{document}

在此处输入图片描述

答案2

尽管 Gonzalo 已经回答了您的问题,但我只想指出,您不仅误用了\question,而且误解了(或误用了)积分的概念。

在我看来,您希望您的问题值 4 分,但您却宣称它值 11 分。

事实上,如果你在问题后面输入一个命令\droptotalpoints,你会看到“问题 1 的总数:11”,这是不正确的。

正确的做法是,\noaddpoints当点数仅作为信息时,再将其还原为\addpoints需要的含义。

下面是一个展示此概念的例子。第一个问题是你原来的问题,其分数不正确;第二个问题是修改后的问题,其分数正确。

\documentclass[addpoints,answers,10pt]{exam}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{nonfloat}
\usepackage{caption}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{ifpdf}
\usepackage[export]{adjustbox}
\marksnotpoints
\bracketedpoints
\pointsdroppedatright
\pointsinrightmargin
\pagestyle{headandfoot}
\headrule
\footrule
\renewcommand{\thepartno}{\Alph{partno}}
\newcolumntype{b}{X}
\newcolumntype{s}{>{\hsize=.1\hsize}X}

\renewcommand\questionlabel{\llap{Q.}\thequestion.}

\begin{document}

\begin{questions}

\question[4]
\textbf{Solve ANY ONE}
\begin{parts}
\part[2]
 Prepare a speech, to be belivered at your school, on the topic "Health is Wealth", on the occasion of world Health Day .
\part[2]
Solve Any TWO
\begin{subparts}
\subpart[1]  \rule{1cm}{0.4pt}  was known as peace-loving and cultured city-state. (Marathon, Athens, Sparta)
\subpart[1] The first tool made by man was  \rule{1cm}{0.4pt}  . (Hand axe, a Spear, an Adaze)
\subpart[1] Lord Buddha preached in  \rule{1cm}{0.4pt}  language. (Hindi, Pali, Sanskrit)
\end{subparts}
\end{parts}

\droptotalpoints

\noaddpoints
\question[4]
\textbf{Solve ANY ONE}
\begin{parts}
\addpoints
\part[2]
 Prepare a speech, to be belivered at your school, on the topic "Health is Wealth", on the occasion of world Health Day .
\part[2]
Solve Any TWO
\begin{subparts}
\noaddpoints
\subpart[1]  \rule{1cm}{0.4pt}  was known as peace-loving and cultured city-state. (Marathon, Athens, Sparta)
\subpart[1] The first tool made by man was  \rule{1cm}{0.4pt}  . (Hand axe, a Spear, an Adaze)
\subpart[1] Lord Buddha preached in  \rule{1cm}{0.4pt}  language. (Hindi, Pali, Sanskrit)
\end{subparts}
\end{parts}

\droptotalpoints

\end{questions}


\end{document}

输出

在此处输入图片描述

如果您读过这个答案却对这些事情不感兴趣,我深感抱歉……

相关内容