Start enumerating an item in the same line after a exercise number
You can create a new list, say eq
, with the resume
option for doing this.
\documentclass[a4paper,brazil, 12pt]{report}%{\article}
\usepackage{amsmath,amsfonts,amscd,bezier}
\usepackage{amssymb}
\usepackage{babel}
\usepackage[latin1]{inputenc}
\usepackage[dvips]{graphicx}
\usepackage{color}
\usepackage{hyperref}
\usepackage[shortlabels]{enumitem}
\usepackage{multicol}
\usepackage{tasks}
\newlist{eq}{enumerate}{1}
\setlist[eq]{resume,label={\arabic*.}}%
\begin{document}
\begin{eq}\item
\begin{enumerate}[$(a)$]
\item Prove that...
\item Next ...
\item
\end{enumerate}
\end{eq}
\begin{eq}\item
\begin{enumerate}[$(a)$]
\item Prove that...
\item Next ...
\item
\end{enumerate}
\end{eq}
\end{document}
Hereis a solution which plays with leftmargin=
and before=
keys:
\documentclass[a4paper,brazil, 12pt]{report}%
\usepackage{amsmath, amsfonts, amscd, bezier}%
\usepackage{amssymb}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{color}
\usepackage[shortlabels]{enumitem}
\usepackage{multicol}
\usepackage{tasks}
\usepackage{hyperref}
\newcounter{theeq} \setcounter{theeq}{0}
\newcommand{\eq}[1]{\noindent%
\refstepcounter{theeq}\textbf{\arabic{theeq}} {\hspace{-0.1cm{{.}}}} }
\newcommand{\eqz}{{\setcounter{eq}{1}} {{\arabic{eq}}} \refstepcounter{eq}\hspace{-0.1cm{{.}}}}
\begin{document}
\eq. \begin{enumerate}[$(a)$, leftmargin=3.2em, before=\vspace*{-\glueexpr\topsep + \baselineskip}]
\item Prove that...
\item Next ...
\end{enumerate}
\end{document}
Edit:
Another possibility would be to define your own enumerate-like list, like this:
\newlist{enumexp}{enumerate}{1}
\setlist[enumexp,1]{$(a)$, leftmargin=3.2em, before=\vspace*{-\glueexpr\topsep + \baselineskip}}
and code in the document body:
\eq. =\begin{enumexp}
\item ...
.........
\end{enumpexp}