当我添加问题标签时,它超出了左边距。
这里有一个最小代码:
\documentclass[11pt,a4paper]{exam}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm,showframe]{geometry}
\usepackage{setspace}
\usepackage{fancybox}
\renewcommand{\thequestion}{\bf\arabic{question}}
\renewcommand{\questionlabel}{\bf\llap{Q}\thequestion.}
\begin{document}
\begin{questions}
\question This is the first question
\question This is the second question
\question Another question
\end{questions}
\end{document}
我该如何解决这个问题?
答案1
在...的帮助下
\renewcommand{\questionlabel}{\bfseries Q}thequestion.}
你得到:
完成 MWE:
\documentclass[11pt,a4paper]{exam}
%\usepackage[utf8]{inputenc} not needed since default with recent installation
\usepackage[T1]{fontenc} %in order to prevent " OT1 encoding should not be used for French" warning.
\usepackage[french]{babel}
\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm,showframe]{geometry}
\usepackage{setspace}
\usepackage{fancybox}
\renewcommand{\thequestion}{\bfseries\arabic{question}}
\renewcommand{\questionlabel}{\bfseries Q\thequestion.}
\begin{document}
\begin{questions}
\question This is the first question
\question This is the second question
\question Another question
\end{questions}
\end{document}