![在文档右侧为每一行添加首行](https://linux22.com/image/399857/%E5%9C%A8%E6%96%87%E6%A1%A3%E5%8F%B3%E4%BE%A7%E4%B8%BA%E6%AF%8F%E4%B8%80%E8%A1%8C%E6%B7%BB%E5%8A%A0%E9%A6%96%E8%A1%8C.png)
我正在用 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
版本。