29

When skimming through a long mathematical paper (in pdf format), I often find a mathematical symbol (often in greek and with subscripts/superscripts) that was defined previously somewhere else within the paper. Of course, it's not always easy to find where the parameter was defined, so I resort to using the FIND tool. However, simply copy and pasting the symbol to the FIND tool doesn't seem to work well, since the symbol cannot be copied exactly.

Is there a better way to perform an automated search a PDF document for a particular mathematical symbol if I don't have the original latex file? Especially ones with subscripts and superscripts?

5
  • 2
    What PDF viewer are you using? Using Evince, searching for symbols seems to work without any problems.
    – Senex
    Commented May 18, 2014 at 14:17
  • @Senex: I'm currently using Adobe Reader. I've tried Evince, but it doesn't seem to work well to search symbols with subscripts and superscripts. Anytime I try to copy such a symbol, it doesn't paste exactly in the FIND tool.
    – Paul
    Commented May 18, 2014 at 15:33
  • 2
    OK, I see the problem with superscripts AND subscripts (with only one -- either a superscript or a subscript -- Evince seems to work by copying and pasting the symbol and deleting the space between the symbol and the sub/superscript that gets added during copying and pasting).
    – Senex
    Commented May 18, 2014 at 15:39
  • I search for '?', papers seldom have many questions. The precision is bad, but the recall is good, in my experience.
    – Trylks
    Commented May 19, 2014 at 15:26
  • Are the equations not numbered? Commented May 19, 2014 at 18:07

3 Answers 3

17

This can be a tricky one, and you can sometimes have similar issues with accented and greek letters. If you cannot find words that have been hyphenated to break a line, in my experience this is reader-dependent and Adobe Reader has never given me problems.

Some PDFs just were not generated with the proper character mappings, so they will never be searchable with the affected characters. With regards to the format of superscripts and subscripts, the PDF will be searchable with them in the same format that they appear when you copy-paste out of the document. With other special characters, if you cannot copy-paste them, you cannot search for them.

If you urge everyone using LaTeX to do \usepackage{cmap}\usepackage[T1]{fontenc}, those packages should solve most problems. Notably, cmap makes math characters (such as the integral sign) searchable.

Unfortunately, as far as I know there is no way to "repair" a PDF that is not properly searchable, unless you re-create a fixed version from the source.

3
  • If it were searchable, then simply copy-pasting from the PDF file should work, right?
    – Paul
    Commented May 18, 2014 at 16:42
  • 6
    @Paul Yes, it's a bi-directional thing. If you can search for it, you can copy-paste it. If you cannot search for it, you cannot copy-paste it.
    – Moriarty
    Commented May 18, 2014 at 16:45
  • 1
    It is possible to "repair" a PDF that is not properly searchable, for example by running it through OCR. Acrobat's own OCR won't run on a non-image PDF, but some other OCR packages will.
    – 410 gone
    Commented May 19, 2014 at 14:09
6

If your paper has been posted to the arXiv, go to the paper's page (here's one of mine), click on "Other formats" and "download source". Assuming the authors submitted the LaTeX Source to the arXiv, you'll get a tarball with the LaTeX source, which should be a lot more searchable. (Yes, I do this for large enough papers where I expect to do a lot of searching.)

1
3

I found a trick tonight trying to search for all instances of L_ij^* in a PDF. The regular search function didn't recognize the superscript asterisk, only regular asterisks. I am using Acrobat Reader DC version 2015.20.20042...hopefully it works for other versions. Here are the instructions:

Choose a string of words immediately next to an instance of the sought-after symbol in your PDF document. Do ctrl-F. In the Find window that opens, click the arrow next to the text box and select the full reader search from the list. Enter the string of words in the search window of the full reader search. The character you will need to use for a search shows up in the results window. You can click on the bolded/underlined instance in the results and your curser will be placed on the symbol in your PDF document.

In my case, it was the Å character that represented the superscript asterisk (*). Next, I opened a blank Word document and then chose Insert – Symbol - Advanced Symbol …. I then looked for Å (regular shortcuts, keyboard strokes, etc. for this symbol didn't work for me), inserted it into my Word document then copy and pasted the Å from the Word document into the Acrobat advanced search window and hit Search.

It found all instances of superscript *! Again, you can click on the result and your curser will be taken to that symbol in your PDF document.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .