View Full Version : Display Code and animation


curiousgeorge
08-08-2012, 12:46 PM
I was looking for a code structure or way to actually display code in a epub. What tags do you use?? I was also curious about adding JavaScript or jQuery. I havent looked into animation within an epub but I would like to know a direction. Might give it a shot.

Toxaris
08-08-2012, 02:16 PM
It is a subset of xhtml, so I wonder what you mean with code.
Javascript and alike are not supported in ePUB 2. It is in version 3, but that is not widely supported.

curiousgeorge
08-08-2012, 02:47 PM
well if you are building a book on code and need to display code, for example here you would use bracket code bracket bracket / code bracket to display the code. I was trying to figure out what syntax for epub 3.0 that runs with HTML 5 and CSS 3.0 from what I've read that will allow you to display code instead of running the code. Hope this is better explaining.

Jellby
08-09-2012, 04:56 AM
You have to do it yourself. Instead of < and >, you have to write &lt; and &gt;. For the background, alignment, monospace font, etc., use CSS as usual.

mrmikel
08-09-2012, 07:02 AM
Or you can just use images.

curiousgeorge
08-09-2012, 10:30 AM
Or you can just use images.

ya but that would possibly in the end make the book larger than needed. I would test out some ideas and post back.