在文档右侧为每一行添加首行

在文档右侧为每一行添加首行

我正在用 LaTeX 创建一系列标准操作程序,要求在每个列表项旁边添加首字母以表示已完成。有没有办法自动在文本右侧或每个项目的第二列中添加右对齐的首字母?

\documentclass{report}
\begin{document}
 Please initial each line item of the procedure.
\begin{itemize}
   \item First item needing an initial line next to it..
   \item Second item needing an initial line next to it.
   \item Another lines with initial.
\end{itemize}

\begin{enumerate}
  \item Some text
  \item Some more text
  \item blah, blah.
\end{enumerate}

\end{document}

答案1

这句话位于页边空白处:

\documentclass{article}
\usepackage[heightadjust]{marginnote}
\usepackage{lipsum}    
\let\Item\item
\renewcommand\item{\marginnote{\hrulefill}[1.6\baselineskip]\Item}
\begin{document}        
    Please initial each line item of the procedure.

    \begin{itemize}
        \item First item needing an initial line next to it.
        \item \sloppy\lipsum[2]
        \item Another lines with initial.
    \end{itemize}

    \begin{enumerate}
        \item Some text
        \item Some more text
        \item blah, blah.
    \end{enumerate}

\end{document}

在此处输入图片描述

答案2

以下规定在右边距(每个 的第一行)initialitemize插入常规\item加下划线(在基线的 ) 。首字母和边距之间的间距为,但可以根据需要进行更改。3em\item~

在此处输入图片描述

\documentclass{article}

\usepackage{lipsum}

\newenvironment{initialitemize}
  {\begin{itemize}
    \let\olditem\item
    \renewcommand{\item}{%
      \olditem\leavevmode
      \makebox[0pt][l]{\makebox[\linewidth][r]{\makebox[0pt][l]{~\rule{3em}{.4pt}}}}%
      \ignorespaces}}
  {\end{itemize}}

\begin{document}

Please initial each line item of the procedure.

\begin{initialitemize}
  \item First item needing an initial line next to it.
  \item \sloppy\lipsum[2]
  \item Another lines with initial.
\end{initialitemize}

\begin{enumerate}
  \item Some text
  \item Some more text
  \item blah, blah.
\end{enumerate}

\end{document}

可以复制一个enumerate版本。

相关内容