I am creating a PDF Bible for personal use; it includes both footnotes (which are superscripted numbers appended to the end of certain words), and margin cross-references (which are superscripted letters prepended to the front of certain words).
The cross-references are nothing more than this command, applied to words in the text:
command: \newcommand{\mref}[1]{\textsuperscript{\textit{\textcolor{blue}{#1}}}}.
application: does not annul a \mref{d}covenant previously \mref{e}ratified by God
Here's the Problem: PDF Search does find any word with a cross-ref in front of it!
I'm using the PDF in GoodNotes iOS app - which has a wonderful search capability, both for the text, and any handwritten notes.
The search function in GoodNotes does not find word-matches for words that are preceded by a superscripted letter. There's probably no fix for this ... but asking anyway ... Is there some optional method of separating the word from a superscript in such a way that a PDF document recognizes the word apart from the reference letter besides a physical space? Or to space, and back up the render some amount to make it look like the reference letter is next to the word ?
Or any other suggestions for this issue ?
\nobreak\hspace{0pt}after the superscript before the word, or you can probably use pdf tagging to separate the word and the annotation. – David Carlisle Feb 11 '22 at 16:52\newcommand{\mref}[1]{\textsuperscript{\textit{\textcolor{blue}{#1 \hspace{-2.0pt}}}}}works for most cases (note: actual space between #1 and \hspace ) ... but failed for a few instances ... like a "b" in front of "without" ... I am trying to find the minimal negative \hspace value that works for everything ... My text size is \small ... next to try is -1.9pt ... there is such a small visual spacing with -2.0pt that it's not too bad. BLUF some amount of spacing is required. – RichWalt Feb 11 '22 at 18:04\newcommand{\mref}[1]{\textsuperscript{\textit{\textcolor{blue}{#1 \hspace{-2.0pt}}}}}seems to work for fairly well. Visually, with size \small{} the space is not too bad. – RichWalt Feb 11 '22 at 19:55a\pdffakespace b(assuming that you use pdflatex) – Ulrike Fischer Feb 11 '22 at 19:59accsupppackage, this question, https://tex.stackexchange.com/questions/241968/how-to-protect-a-word-from-finding-by-google-search-machines, focuses on protection against google search, but the same logic applies for PDF search, as well. – Steven B. Segletes Feb 12 '22 at 00:32