複数行のテキストを含むLaTeX生成PDFでは、各行の後に改行が挿入されます。

複数行のテキストを含むLaTeX生成PDFでは、各行の後に改行が挿入されます。

\itemまたは{itemize}に複数行のテキストがあり{section}、そのドキュメントの PDF を作成しています。PDF からテキストをコピーすると、各行の末尾に改行文字があります。AI ツールで読み取られるドキュメントを作成していますが、文を分割すると混乱します。

不要な改行を追加しないように設定するにはどうすればよいでしょうか?

たとえば、次のコードから生成されたPDFからテキストをコピーすると、間に改行文字があります。character inそしてthe middle

\begin{itemize}
    \item This is some text that spans multiple lines. I need the pdf to not have a newline 
    character in the middle of the sentence in the copied text
    \item Some more text.
\end{itemize}

ここに画像の説明を入力してください

答え1

これはタグ付きPDFプロジェクトについてです。これを、lualatex(実空間文字を最もうまく処理する)を使用した現在のTeXシステムでコンパイルすると、

\DocumentMetadata{testphase=phase-III}
\documentclass{article}

\begin{document}
\begin{itemize}
    \item This is some text that spans multiple lines. I need the pdf to not have a newline 
    character in the middle of the sentence in the copied text
    \item Some more text.
\end{itemize}
\end{document}

コピー&ペーストすると


This is some text that spans multiple lines. I need the pdf to not have a newline character in the middle of the sentence in the copied text
Some more text.

しかし、一般的には、PDF からのコピー & ペーストをあまり信用しすぎないでください。この形式には単純なテキストが含まれていないため、すべての読者が何らかのヒューリスティックスを実行する必要があります。

関連情報