
有什麼方法可以讓 PDF 搜尋找到有連字的單字嗎?我用XeLaTeX。
\documentclass{book}
\begin{document}
Prefix.
\end{document}
在產生的 pdf 檔案中,搜尋單字「Prefix」失敗。
答案1
添加\usepackage{fontspec}
。這其實載入包fontenc
,這將解決您的 pdfLaTeX 問題。
因此,正如 Ulrike 在評論中所說,載入 ec 字體而不是標準的 Computer Modern 字體。對於其他字體,可能適用其他解決方案;這個答案解決了 OP 的 MWE 中看到的標準設定。