有没有办法删除问题部分的缩进>

有没有办法删除问题部分的缩进>

在此处输入图片描述

对于上面的例子,我怎样才能删除各部分的缩进,以便 (a)、(b)、(c)、(d) 都与“问题 1”对齐?

\documentclass[addpoints, 12pt]{exam}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\linespread{1.6}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{mlmodern}
\usepackage{amsmath}
\usepackage{amssymb}
\setlength{\topmargin}{0cm}
\setlength{\textheight}{9.25in}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in}
\setlength{\textwidth}{16cm}
\pagestyle{fancy}
\lhead{} 
\chead{} 
\rhead{} 
\lfoot{} 
\cfoot{\footnotesize{Page \thepage \ of \pageref{finalpage} -- \titlehd \ (\examcode)}} 
\rfoot{} 

\newcommand{\institution}{Maths Extension 2}
\newcommand{\titlehd}{Complex Numbers}
\newcommand{\examtype}{Summer Holidays Examination}
\newcommand{\examdate}{2021-2022}
\newcommand{\readtime}{10 Minutes}
\newcommand{\writetime}{THREE Hours}
\newcommand{\materials}{Non-programmable Calculators}

\setlength{\rightpointsmargin}{1.5cm}
\newpage
\begin{questions}
\marksnotpoints
\pointsinrightmargin
\pointformat{\bfseries\themarginpoints}
\qformat{\textbf{Question \thequestion} \hspace{2mm}\textbf{(\totalpoints \hspace{1mm}\points)}\hfill}


\question
\vspace{2mm}
\begin{parts}


\part[1]\text{If $(x+iy)^{2n}=a+ib$ where} $x,y,a,b,n$ $\in{\Bbb{Z}}$ find the value of $(y-ix)^{4n}$ in terms of $a$ and $b$ 
 
\vspace{8mm}
\part[2] Let $w=\cos{\frac{2\pi}{7}}+i\sin{\frac{2\pi}{7}}$. Show that $w, w^4$ and $w^5$ form the sides of an equilateral triangle. 

\vspace{8mm}
\part
\begin{subparts}
\subpart[2] Find the solutions to the equation $z^n-1=0$ where $n$ is odd.

\vspace{2mm}
\subpart[2]Hence show that $\cos{\frac{2\pi}{n}}+\cos{\frac{4\pi}{n}}+...+\cos{\frac{(n-1)\pi}{n}}$ is independent of $n$.
\end{subparts}
\vspace{0.8cm}


\part[3]Let $w=\frac{2}{1+z}$. If $|z|=1$ and $0<\arg{z}<\frac{2\pi}{3}$, sketch the complex number $w$ 
\vspace{1cm}
\end{parts}
\newpage

答案1

使用新命令\questionx代替\question

\newcommand{\questionx}[1]{% added <<<<<<<<<<<<<<<<<<<<
    \marksnotpoints
    \qformat{\textbf{Question~\thequestion} \hspace{1ex}\textbf{(\totalpoints \enspace \points)}\hfill}
    \pointsinrightmargin%
    \pointformat{\textbf{\themarginpoints}}% 
    \settowidth{\leftmargin}{(m)\hskip\labelsep}%
    \question\hspace*{-\leftmargin}\parbox{\textwidth}{#1}
} 

埃

\documentclass[addpoints, 12pt]{exam}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\linespread{1.6}
%\usepackage[utf8]{inputenc}
\usepackage{graphicx}
%\usepackage{fancyhdr}
\usepackage{mlmodern}
\usepackage{amsmath}
\usepackage{amssymb}
\setlength{\topmargin}{0cm}
\setlength{\textheight}{9.25in}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in}
\setlength{\textwidth}{16cm}

\usepackage{showframe} % show margins

\newcommand{\questionx}[1]{% added <<<<<<<<<<<<<<<<<<<<
    \marksnotpoints
    \qformat{\textbf{Question~\thequestion} \hspace{1ex}\textbf{(\totalpoints \enspace \points)}\hfill}
    \pointsinrightmargin%
    \pointformat{\textbf{\themarginpoints}}% 
    \settowidth{\leftmargin}{(m)\hskip\labelsep}%
    \question\hspace*{-\leftmargin}\parbox{\textwidth}{#1}
} 

\begin{document}
\newcommand{\institution}{Maths Extension 2}
\newcommand{\titlehd}{Complex Numbers}
\newcommand{\examtype}{Summer Holidays Examination}
\newcommand{\examdate}{2021-2022}
\newcommand{\readtime}{10 Minutes}
\newcommand{\writetime}{THREE Hours}
\newcommand{\materials}{Non-programmable Calculators}

\setlength{\rightpointsmargin}{1.5cm}
\newpage
\begin{questions}
%   \marksnotpoints
%   \pointsinrightmargin
%   \pointformat{\bfseries\themarginpoints}
%   \qformat{\textbf{Question \thequestion} \hspace{2mm}\textbf{(\totalpoints \hspace{1mm}\points)}\hfill}
        
    \questionx{%
    \vspace*{3mm}
    \begin{parts}       
        
        \part[1]\text{If $(x+iy)^{2n}=a+ib$ where} $x,y,a,b,n$ $\in{\Bbb{Z}}$ find the value of $(y-ix)^{4n}$ in terms of $a$ and $b$ 
        
        \vspace{8mm}
        \part[2] Let $w=\cos{\frac{2\pi}{7}}+i\sin{\frac{2\pi}{7}}$. Show that $w, w^4$ and $w^5$ form the sides of an equilateral triangle. 
        
        \vspace{8mm}
        \part
        \begin{subparts}
            \subpart[2] Find the solutions to the equation $z^n-1=0$ where $n$ is odd.
            
            \vspace{2mm}
            \subpart[2]Hence show that $\cos{\frac{2\pi}{n}}+\cos{\frac{4\pi}{n}}+...+\cos{\frac{(n-1)\pi}{n}}$ is independent of $n$.
        \end{subparts}
        \vspace{0.8cm}
        
        
        \part[3]Let $w=\frac{2}{1+z}$. If $|z|=1$ and $0<\arg{z}<\frac{2\pi}{3}$, sketch the complex number $w$ 
        \vspace{1cm}
    \end{parts}
}% added <<<<<<<<<<<<<<<<<<<<
\end{questions}
\end{document}

更新(后续跟进)

要允许在部分内分页,请使用

\newcommand{\questionx}[1]{% added <<<<<<<<<<<<<<<<<<<<
    \marksnotpoints
    \qformat{\textbf{Question \thequestion} \hspace{2mm}\textbf{(\totalpoints \hspace{1mm}\points)}\hfill}
    \pointsinrightmargin%
    \pointformat{\textbf{\themarginpoints}}% 
    \settowidth{\leftmargin}{(m)\hskip\labelsep}%
    \question\hspace*{-\leftmargin}#1% changed <<<<<<<<<<
} 

\renewcommand{\partshook}{% added <<<<<<<<<<<<<<<<<<<<
    \setlength{\leftmargin}{0pt}%
    \setlength{\labelwidth}{0pt}%
}

F

答案2

您可以使用“partshook”获取与零件相关的长度。请注意,我创建了一个更像最小可编译文件的东西,因为您的文件给我带来了麻烦。我没有费心使方程式正确。

\documentclass{exam}

\begin{document}
\begin{questions}   
\vspace{2mm}

% ***********
\renewcommand{\partshook}{%
    \setlength{\leftmargin}{0pt}%
    \setlength{\labelwidth}{-\labelsep}%
}
% **********

\question
\begin{parts}
    
    \part[1] If $(x+iy)^{2n}=a+ib$ where $x,y,a,b,n$ $\in{{Z}}$ find the value of $(y-ix)^{4n}$ in terms of $a$ and $b$ 
    
    \vspace{8mm}
    \part[2] Let $w=\cos{\frac{2\pi}{7}}+i\sin{\frac{2\pi}{7}}$. Show that $w, w^4$ and $w^5$ form the sides of an equilateral triangle. 
    
    \vspace{8mm}
    \part
    \begin{subparts}
        \subpart[2] Find the solutions to the equation $z^n-1=0$ where $n$ is odd.
        
        \vspace{2mm}
        \subpart[2]Hence show that $\cos{\frac{2\pi}{n}}+\cos{\frac{4\pi}{n}}+...+\cos{\frac{(n-1)\pi}{n}}$ is independent of $n$.
    \end{subparts}
    \vspace{0.8cm}
    
    
    \part[3]Let $w=\frac{2}{1+z}$. If $|z|=1$ and $0<\arg{z}<\frac{2\pi}{3}$, sketch the complex number $w$ 
    \vspace{1cm}
\end{parts}
\end{questions}
\end{document}

这得出 在此处输入图片描述当然,零件字母现在与问题编号重叠 - 但这是您的请求所固有的问题。

相关内容