Quote:
Originally Posted by sergio blum
I failed to say that the conversions I am trying to do are from CHM to EPUB. The CHM contains body text and examples of ActionScript code.
|
Any book of code often uses <pre> tags to ensure that the code is viewable exactly as required for a given language.
Quote:
Originally Posted by sergio blum
But again, is it no possible to manually remove <pre> tags manually? Why is that?
|
It is possible, even easy, but your code examples will be jumbled by epubs attempt to reflow the text.
Quote:
Originally Posted by sergio blum
I also read somewhere a suggestion to convert <pre> tags into <p> tags. Does this mean just substitue <p for <pre in the XHTML? I did this and the individual lines of code text all bunched up in a single paragraph. Or must it be done in tandem with other changes?
|
That is why there are <pre> tags so the code remains correctly laid out.
Quote:
Originally Posted by sergio blum
Am I expressisng myself clearly? Is there any info I left out? I just want — at the very least — have the code text converted into body text. The best would be to be able to specify different font sizes for body text and code text.
|
Yes, you are expressing yourself clearly the only problem is the type of book. ldolse and I were both referring to recreational novels and not a book of code.
Any attempt to remove the <pre> tags for this book may compromise the correctness of your code examples. You could try enclosing each line of code with a <p> </p> tags then removing the <pre> tags. This will minimize the jumble but not prevent it entirely.
I have limited experience, but if you want this book as a reflowable epub then you should buy it in that format. Otherwise resign yourself to reading it with <pre> tags in place and using either landscape mode on your reader to gain more space to view it or read it on a computer with the ability to have a wide enough (or scrollable) viewing area to read the code as written.