我需要为以下内容添加行号,可能在框内和右侧,所有行(包括数学)上都有数字。我看到有一个名为 lineno 的包用于添加行号,并且它有命令来处理显示的数学和小页面,但我需要两者同时使用,但我还没有设法让任何东西工作。有人能告诉我怎么做吗?
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{lineno}
\begin{document}
\fboxsep=12pt
\fbox{\begin{minipage}[c]{28.5pc}
\raggedright
\textbf{Solution}
\begin{enumerate}
\item [(a)]
In \((U_9,\times_9)\) we have:
\[\begin{aligned}
&2^2 = 4,\\
&2^3 = 8,\\
&2^4 = 2\times_9 8= 7,\\
&2^5 = 2\times_9 7=5,\\
&2^6 = 2\times_9 5=1.
\end{aligned}\]
Thus \(\langle 2 \rangle = \{1,2,4,8,7,5\} = U_9\),
so \(U_9\) is cyclic and 2 is a generator for~\(U_9\).
\item [(b)]
An isomorphism from \((U_9, \times_9)\) to~\( (\mathbb{Z}_6, +_6)\) is as follows.
\[\begin{aligned}
\phi : \:(U_9,\times_9) & \longrightarrow (\mathbb{Z}_6,+_6)\\
1 & \longmapsto 0\\
2 & \longmapsto 1\\
4 & \longmapsto 2\\
8 & \longmapsto 3\\
7 & \longmapsto 4\\
5 & \longmapsto 5.
\end{aligned}\]
\end{enumerate}
\end{minipage}}
\end{document}