水平边距

水平边距

我的代码:

 \documentclass[a4paper,12pt]{article}  \usepackage[portuguese]{babel}
 \usepackage{natbib} \usepackage{url} \usepackage[utf8x]{inputenc}
 \usepackage{amsmath} \usepackage{graphicx} \graphicspath{{images/}}
 \usepackage{parskip} \usepackage{fancyhdr} \usepackage{vmargin}
 \usepackage{wrapfig} \setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1
 cm}{1.5 cm}{1 cm}{1.5 cm}
 
 %%%%%%%%%%%%%
 
 \cfoot{} % <============================================== no
 pagenumber
 
 \usepackage[onehalfspacing]{setspace}  \usepackage{enumerate} 
 \newcommand{\quest}[1]{ \vspace{.8cm} \noindent\textbf{Questão #1.  }}
 
 \usepackage{graphicx}
 
 %\usepackage{blindtext} % <======================= to generate dummy
 text
 
 \everymath{\displaystyle}
 
 %%%%%%%% \title{Lista 4}                               % Title \author{\lfloor PLEIAD \rfloor
 \text{ Olimpíadas de Ciências Naturais}}                               % Author
 \date{\today}                                          % Date
 
 \makeatletter \let\thetitle\@title \let\theauthor\@author
 \let\thedate\@date \makeatother
 
 \pagestyle{fancy} \fancyhf{} \rhead{\theauthor} \lhead{\thetitle}
 \cfoot{\thepage}
 
 \begin{document}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 \newcommand{\opt}[2]{\begin{enumerate}[a) ]  \item #1 \item #2
 \end{enumerate}}
 
 
 \rfoot{\textit{ \resizebox{!}{0.25cm}{Outubro de 2021}}}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \begin{titlepage}  \centering
     \vspace*{0.5 cm}
     \includegraphics[scale = 0.75]{logo.png}\\[1.0 cm] % University Logo
     \textsc{\LARGE \newline\newline    \lfloor \text{PL\resizebox{!}{0.5cm}{\sum}\resizebox{!}{0.5cm}{\Lambda}D}
 \rfloor \text{ Olimpíadas de Ciências Naturais}}\\[2.0 cm] %
 University Name    \textsc{\Large Raciocínio Lógico e Contagem}\\[0.5
 cm]                % Course Code   \rule{\linewidth}{0.2 mm} \\[0.4 cm]    { \huge
 \bfseries \thetitle}\\     \rule{\linewidth}{0.2 mm} \\[1.5 cm]    
    \begin{minipage}{0.5\textwidth}         \begin{flushleft} \large
            \emph{.:}\\             ..\\            \end{flushleft}             \end{minipage}~
            \begin{minipage}{0.4\textwidth}
             
            
            \end{minipage}\\[2 cm]
    
    
 
     
     
         \end{titlepage}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \noindent\textbf{quest 1.} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
 ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 aliquip ex ea commodo consequat.
 
 
 \quest{2}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
 do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
 ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 aliquip ex ea commodo consequat.
 
 
 \quest{3} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
 do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
 ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 aliquip ex ea commodo consequat.
 
 \quest{4}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
 do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
 ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 aliquip ex ea commodo consequat.
 
 
 \end{document}

我想放这个模板。我怎样才能把这些边距放在每个问题上?

在此处输入图片描述

答案1

我曾经对您的 MWE 感到困惑,现在仍然感到困惑,但我认为,如果您确实如此,那么\renewcommand{\quest}[1]{\vspace{0.8cm} \rule{\textwidth}{0.4pt} \\ noindent\textbf{Questao #1. }}您会在问题之上制定规则。

% ruleprob.tex  SE 620640

 \documentclass[a4paper,12pt]{article}  \usepackage[portuguese]{babel}
 \usepackage{natbib} \usepackage{url} \usepackage[utf8x]{inputenc}
 \usepackage{amsmath} \usepackage{graphicx} \graphicspath{{images/}}
 \usepackage{parskip} \usepackage{fancyhdr} \usepackage{vmargin}
 \usepackage{wrapfig} \setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1
 cm}{1.5 cm}{1 cm}{1.5 cm}
 
 %%%%%%%%%%%%%
 
 \cfoot{} % <============================================== no
% pagenumber %%% what is this?
 
 \usepackage[onehalfspacing]{setspace}  \usepackage{enumerate} 
 \newcommand{\quest}[1]{ \vspace{.8cm} 
\renewcommand{\quest}[1]{\vspace{0.8cm} \rule{\textwidth}{0.4pt}\\
   \noindent\textbf{Questão #1.  }}
 \usepackage{graphicx}
 
 %\usepackage{blindtext} % <======================= to generate dummy
 text
 
 \everymath{\displaystyle}
 
 %%%%%%%% \title{Lista 4}                               % Title \author{\lfloor PLEIAD \rfloor
 \text{ Olimpíadas de Ciências Naturais}}                               % Author
 \date{\today}                                          % Date
 
 \makeatletter \let\thetitle\@title \let\theauthor\@author
 \let\thedate\@date \makeatother
 
 \pagestyle{fancy} \fancyhf{} \rhead{\theauthor} \lhead{\thetitle}
 \cfoot{\thepage}
 
 \begin{document}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 \newcommand{\opt}[2]{\begin{enumerate}[a) ]  \item #1 \item #2
 \end{enumerate}}
 
 
 \rfoot{\textit{ \resizebox{!}{0.25cm}{Outubro de 2021}}}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \begin{titlepage}  \centering
     \vspace*{0.5 cm}
     \includegraphics[scale = 0.75]{logo.png}\\[1.0 cm] % University Logo
     \textsc{\LARGE \newline\newline    \lfloor \text{PL\resizebox{!}{0.5cm}{\sum}\resizebox{!}{0.5cm}{\Lambda}D}
 \rfloor \text{ Olimpíadas de Ciências Naturais}}\\[2.0 cm] %
 University Name    \textsc{\Large Raciocínio Lógico e Contagem}\\[0.5
 cm]                % Course Code   \rule{\linewidth}{0.2 mm} \\[0.4 cm]    { \huge
 \bfseries \thetitle}\\     \rule{\linewidth}{0.2 mm} \\[1.5 cm]    
    \begin{minipage}{0.5\textwidth}         \begin{flushleft} \large
            \emph{.:}\\             ..\\            \end{flushleft}             \end{minipage}~
            \begin{minipage}{0.4\textwidth}
             
            
            \end{minipage}\\[2 cm]
    
          \end{titlepage}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \noindent\textbf{quest 1.} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
 ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 aliquip ex ea commodo consequat.
 
 
 \quest{2}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
 do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
 ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 aliquip ex ea commodo consequat.
 
 
 \quest{3} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
 do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
 ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 aliquip ex ea commodo consequat.
 
 \quest{4}Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
 do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
 ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
 aliquip ex ea commodo consequat.
 
 
 \end{document}

在此处输入图片描述

相关内容