
答案1
有一種方法是針對讀者的。accsupp
與 Adobe Reader 配合良好:
\documentclass{article}
\usepackage{accsupp,xstring}
\makeatletter
\newcommand{\@syllable}{$\cdot$}
\newcommand{\setsyllable}[1]{\renewcommand{\@syllable}{#1}}
\newcommand{\dict}[1]{%
\StrSubstitute{#1}{|}{}[\@ActualText]% Strip syllable symbol |
\StrSubstitute{#1}{|}{\@syllable}[\@VisualText]% Replace syllable
\BeginAccSupp{ActualText=\@ActualText}\@VisualText\EndAccSupp{}%
}
\makeatother
\begin{document}
\dict{Aard|vark}
\setsyllable{:}
\dict{Aar|dv|ark}
\setsyllable{-}
\dict{A|a|r|d|v|a|r|k}
\end{document}
這不適用於蘇門答臘島。