HTML, php and css code in ebook, proper formatting?

  • Context: HTML/CSS 
  • Thread starter Thread starter christian0710
  • Start date Start date
  • Tags Tags
    Code Css Html Php
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
christian0710
Messages
407
Reaction score
8
Hi, I want to write an ebook on CSS, HTML and php, and I'm using a RTF copy/paste plugin to my code editor so i can copy and paste code directly into MS Word from my code editor.

I'm just wondering: Can i write the whole book in MS Word and then directly upload it to amazon, for ebook readers, or what would i need to get or do in order to assure proper formatting for the ebook readers?

I'm using Verdana font for the text and for the and copy paste code the default is Curier new.
 
Physics news on Phys.org
I don't think MS Word will do a good job. MS word documents aren't designed to reflow based on the size of the screen. Why not use HTML and CSS?
 
  • Like
Likes   Reactions: christian0710
Khashishi said:
I don't think MS Word will do a good job. MS word documents aren't designed to reflow based on the size of the screen. Why not use HTML and CSS?

That's very nice to know. I know a lot about html and css but very little about ebook publishing. How can CSS and HTML help me make an ebook that reflows based on screen size?
 
Ok, I don't actually know anything about ebook publishing, but it looks like you can format the ebook itself in html.
http://webdesign.about.com/od/mobi/a/html-for-kindle.htm
Unfortunately, it says pre is not supported by kindle, so you'll have to figure out some way of formatting code.
 
Khashishi said:
Ok, I don't actually know anything about ebook publishing, but it looks like you can format the ebook itself in html.
http://webdesign.about.com/od/mobi/a/html-for-kindle.htm
Unfortunately, it says pre is not supported by kindle, so you'll have to figure out some way of formatting code.

Thank you for the reply, I might have to learn latex, seems like there is scarce guidance on proper formatting for ebook publishers who want to publish code language.