Michal, I'm sorry, I responded too soon, without properly doing further investigation. Your suggestions worked! Maybe there are other problems, but at least, the links I have tested in the book have worked. Specifically:
(1) I put in "internal references" at the end of the book, to the program, and they were resolved and worked correctly. (2) I put in "filler text" between the "\ref" and the program, and the references resolved and worked correctly. (3) Why did they appear to not work? because in my example (in the book) the references were from the page preceding the program. That is, the references were from page N, and the program was on page N+1. I suspect it was an ebook-view problem. I will proceed now to figuring out if everything else works. It remains that "epubcheck" croaks big time, but I'll look into finding a newer version of that, and maybe that'll work. Or maybe there's a different epub-checker. Thank you so much for your help! --chet--
