![从 PDF 中复制诗句并保持页边距结构](https://linux22.com/image/289990/%E4%BB%8E%20PDF%20%E4%B8%AD%E5%A4%8D%E5%88%B6%E8%AF%97%E5%8F%A5%E5%B9%B6%E4%BF%9D%E6%8C%81%E9%A1%B5%E8%BE%B9%E8%B7%9D%E7%BB%93%E6%9E%84%20.png)
我使用 LaTeX 软件包来精美地排版诗歌verse
。
这里是 MWE
\documentclass{article}
\usepackage{verse}
\verselinenumbersleft
\poemlines{2}
\setlength{\vrightskip}{-3em}
\begin{document}
\poemtitle{Garden}
\begin{verse}
I used to love my garden \\
But now my love is dead \\
For I found a bachelor's button \\
In black-eyed Susan's bed. \\!
\end{verse}
\end{document}
产生
然而,当我将诗歌从 PDF 复制/粘贴到纯文本文件(例如 MS Word)中时,我丢失了边距格式:
Garden
I used to love my garden
2 But now my love is dead
For I found a bachelor's button
4 In black-eyed Susan's bed.
有没有办法构造 PDF,以便将边距信息(可能带有制表符)嵌入文本字符串中?还是我应该使用环境tabular
而不是verse
环境?当然,后者是首选。