1

I have a XeLaTeX document written primarily in English, but with occasional passages in various non-English languages. I'm interested in some way of generating a PDF from this document with the property that when I do a CTRL-F search on the document, the non-English passages will be searchable by their English translation.

For example, if the source document has some command

\spanishtext{El perro ladra.}{The dog barks.}

This provides the Spanish source ("El perro ladra.") and its English translation ("The dog barks.") From this I'd like the PDF to show "El perro ladra." But when I search, I'd like to be able to find this passage by either its Spanish or English content, i.e. CTRL-F "ladra" finds it, and so does CTRL-F "barks".

Is this possible?

0 Answers0