如何在项目之间书写小尺寸的文字?

如何在项目之间书写小尺寸的文字?

我想在 itemise 之间写入,即在一个项目符号之后,我想在其下方添加 2 个小句子。查看我的代码,我想要的内容如下:

\documentclass{amsart}
 \newtheorem{thm}{Theorem}
 \usepackage{xcolor}

 \begin{document}
 \section{\textcolor{blue}{Testing Nilpotence in linear time}}
 Given a group $G$ in the form of mutiplication table, we want to check to decide  divides the order of $G$}. Algorithm for testing nilpotence is given below. \\

 \begin{itemize}
 \item Compute the prime factorization of $n= p_1^{\alpha_1} \times p_2^{\alpha_2} \cdots p_i^{\alpha_i}$. \\
 \item Determine the order of all elements in $G$. \\
 \item For $1 \le i \le r$, check if $\mathcal{N}(p_i^{\alpha_i}) \neq p_i^{\alpha_i}$ then $G$ is not nilpotent. \\
\item Else output that $G$ is nilpotent  
 \end{itemize}

查看编译输出: 在此处输入图片描述

问题:如何添加如图所示的小文字?

在此处输入图片描述

答案1

我建议你创建一个名为 的小工具宏\aside。如果\footnotesize文本太小,\small不符合你的口味,请使用 。

在此处输入图片描述

\documentclass{amsart}
\usepackage{xcolor}
\newcommand\aside[1]{\par\quad{\footnotesize(#1)}\par} % or "\small", if you prefer

\begin{document}
\section{\color{blue}Testing Nilpotence in linear time}

Given a group $G$ in the form of multiplication table, we want to check to 
decide [...] divides the order of $G$. An algorithm for testing nilpotence 
is given below.

\begin{itemize}
\item Compute the prime factorization of $n = p_1^{\alpha_1} \times 
     p_2^{\alpha_2} \cdots \times p_i^{\alpha_i}$.
     \aside{Each $p_i^{\alpha_i}$ is the highest power}

\item Determine the order of all elements in $G$. 
     \aside{It can be done easily}

\item For $1 \le i \le r$, check if $\mathcal{N}(p_i^{\alpha_i}) \neq 
     p_i^{\alpha_i}$. If true, $G$ is not nilpotent.

\item Else, conclude that $G$ is nilpotent.
\end{itemize}

\end{document} 

答案2

  • 你的 mwe 不完整(缺少\end{document}
  • 它还包含错误(}之后是 多余的$G$
  • 后面所有\\项目都是多余的
  • (主要) 项目下面的附加行只需在新行中写入 (您可以为该行选择较小的字体大小)
  • 为了更好地格式化使用包enumitem

\documentclass{amsart}
\newtheorem{thm}{Theorem}
\usepackage{xcolor}
\usepackage{enumitem}

\begin{document}
\section{\textcolor{blue}{Testing Nilpotence in linear time}}
Given a group $G$ in the form of multiplication table, we want to check to decide  divides the order of $G$. Algorithm for testing nilpotence is given below. %\\ had to be removed

\begin{itemize}[itemsep=1ex,leftmargin=1cm]
\item Compute the prime factorization of $n= p_1^{\alpha_1} \times p_2^{\alpha_2} \cdots p_i^{\alpha_i}$.               % "\\" had to be removed

    {\small(small text in the next line)}
\item Determine the order of all elements in $G$. % "\\" had to be removed

    {\small(small text in the next line)}
\item For $1 \le i \le r$, check if $\mathcal{N}(p_i^{\alpha_i}) \neq p_i^{\alpha_i}$ then $G$ is not nilpotent.            % "\\" had to be removed

    {\small(small text in the next line)}
\item Else output that $G$ is nilpotent
\end{itemize}
\end{document}

在此处输入图片描述

相关内容