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
Click For Summary

Discussion Overview

The discussion revolves around the challenges and considerations of formatting an ebook that includes HTML, CSS, and PHP code. Participants explore the suitability of using MS Word for ebook creation and discuss alternative approaches for ensuring proper formatting for ebook readers.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant expresses a desire to write an ebook using MS Word but questions the formatting capabilities for ebook readers.
  • Another participant argues that MS Word is not ideal for ebook formatting due to its inability to reflow content based on screen size, suggesting the use of HTML and CSS instead.
  • A participant acknowledges their knowledge of HTML and CSS but seeks clarification on how these technologies can facilitate reflowable ebook formatting.
  • Some participants mention that ebooks can be formatted in HTML, referencing a source that indicates certain HTML elements, like
    , are not supported by Kindle, which may complicate code formatting.
  • One participant expresses a need to learn LaTeX due to the lack of guidance on formatting code in ebooks.

Areas of Agreement / Disagreement

Participants generally agree that MS Word may not be suitable for ebook formatting, but there is no consensus on the best alternative methods or tools for formatting code within ebooks.

Contextual Notes

Limitations include the unclear support for specific HTML elements in various ebook formats and the participants' varying levels of knowledge about ebook publishing.

Who May Find This Useful

Individuals interested in ebook publishing, particularly those incorporating code into their works, may find this discussion relevant.

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.
 
Technology 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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 38 ·
2
Replies
38
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 13 ·
Replies
13
Views
4K