You are going to need a scripting language such as PHP to generate html pages from the content of the iframe. The content's html code will need to reside directly inside the shell pages when it is served to search engines.
On the shell page, instead of displaying the iframe, the scripting language will generate html code for the shell page content area.
The shell page code will be similar to this:
<html> <body> <?php $latex_content; ?> </body> </html>
HTML Output to Search Engine:
<html> <body> <p>LATEX CONTENT</p> </body> </html>
Instead of the iframe Method:
<html> <body> <iframe></iframe> </body> </html>
The iframe method only includes an
<iframe> tag in place of the content when the page is served. The search engines won't reference the frame because the iframe content is far to dynamic for the search engine to know that it's going to stay the same.
Another way to get search hits will be to put some static html content on the shell page that will lead users to your ebook. That way you can still use the iframe for the book. The book's contents won't be indexed in this scenario so you'll still be missing a good deal of potential traffic.