Answers.Body: <p>If you want to be guaranteed of the fewest possible number of file conversion headaches, xhtml is your best bet. The epub format is built on xhtml, and Amazon's KF8 format seems to follow suit--at any rate, when you create a KF8 file you start with an epub. Anything other than xhtml will mean that you have to convert from that format <em>to</em> xhtml, so if you want to minimize those conversions, just start with xhtml. For bonus points, you can use xhtml for your print format as well, and then have a single-source manuscript&mdash;just use two different CSS files for print and ebook.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-10T04:11:42.467Z
Answers.Text: Perfect control over the input and output as there is no conversion +1. I should have thought of that, as I actually have done this myself. And when you use e.g. emacs even shows `<b>text</b>` in bold.
Answers.UserDisplayName: Anthon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-10T04:03:45.610Z
Answers.LastActivityDate: 2014-03-10T04:03:45.610Z
Answers.UserDisplayName: Tom
Answers.Body: <p>I think you should take a look at <a href="https://code.google.com/p/sigil/">Sigil</a>, a program for creating/editing epub-format ebooks.</p>
  
  <p><a href="https://code.google.com/p/sigil/downloads/list">On the download page,</a> there is an installer for Windows and an image for Mac.</p>
  
  <p>Sigil is open source and therefore free. You can input text from whatever you are using and edit either using a code editor or a WYSIWYG editor, which makes it pretty easy. The WYSIWYG editor has basic formatting options, easy chapter breaks and even the means for generating a table of contents. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-09T16:58:28.657Z
Answers.LastActivityDate: 2014-03-09T16:58:28.657Z
Answers.UserDisplayName: mattrweaver
Answers.Body: <p><a href="http://www.methods.co.nz/asciidoc/" rel="nofollow">ASCIIDoc</a> is a nice compromise between bare bones (like markdown) and full featured (like tex).  </p>
  
  <p>There are lots of examples online, but the basic idea is this: you write in plain text, using as-obvious-as-reasonable styles to indicate headers, italics, lists, etc. then you can export that format to PDF, HTML, EPUB, etc. </p>
  
  <p><a href="http://www.methods.co.nz/asciidoc/publishing-ebooks-with-asciidoc.html#X1" rel="nofollow">A quick example to get you started</a>:</p>
  
  <pre><code>= The Book Title
  
  == The first chapter
  Nec vitae mus fringilla eu vel pede sed pellentesque. Nascetur fugiat
  nobis. Eu felis id mauris sollicitudin ut. Sem volutpat feugiat.
  Ornare convallis urna vitae.
  
  Nec mauris sed aliquam nam mauris dolor lorem imperdiet.
  
  == The second chapter
  Ut suspendisse nulla. Auctor felis facilisis. Rutrum vivamus nec
  lectus porttitor dui dapibus eu ridiculus tempor sodales et. Sit a
  cras. Id tellus cubilia erat.
  
  Quisque nullam et. Blandit dui tempor. Posuere in elit diam egestas
  sem vivamus vel ac.
  </code></pre>
  
  <p>Then you can generate an EPUB formatted book file using AsciiDoc’s <code>a2x</code> wrapper:</p>
  
  <p><code>a2x -fepub -dbook mybook.txt</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-09T22:50:10.610Z
Answers.LastActivityDate: 2014-03-09T22:50:10.610Z
Answers.UserDisplayName: bishop
Answers.Body: <p>If you are just interested in basic formatting, <a href="http://daringfireball.net/projects/markdown/" rel="nofollow">markdown</a> is by far the simplest choice. You may write your text on any platform, and then converting it. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-09T18:06:14.973Z
Answers.LastActivityDate: 2014-03-09T18:06:14.973Z
Answers.UserDisplayName: mau
Answers.Body: <p>If you're going to be collaborating with more than one author, chances are that you will want to use MS Word at some point during the writing process. </p>
  
  <p>MS word is still a good option because it has a great grammar checker and lets you track changes. But  it doesn't output epub and you need another tool for that. But aside from bold, italic, heading 1, etc, I wouldn't use it for serious formatting.  </p>
  
  <p>If you're looking for a GUI tool to make an epub, use Sigil or Adobe Indesign. Calibre offers some ability to do conversions as well. </p>
  
  <p>I do a lot of composing in a simple text editor (like Sublime) and then paste it into another program to do the conversion. Smashwords for example essentially locks you into using MS Word, but it's very well-documented and you can do most basic stuff with it. </p>
  
  <p>Many people use HTML templates to make their content -- that way, they can tweak the CSS for them. (Then they have to zip everything up and save as .epub extension. I personal dump my prose into Docbook XML to auto-generate the files using the epub XSLT in Oxygen Author. But my solution is -- like the others suggested here --  more for the adventurous geek. </p>
  
  <p>There are lots of advantages to composing in source rather than using a WYSIWIG tool, but in any method, there will be a learning curve if you are producing it yourself. That said, you probably hire someone to make a decent ebook from a simple MS Word file for less than $300. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-10T23:33:28.013Z
Answers.LastActivityDate: 2014-03-10T23:33:28.013Z
Answers.UserDisplayName: idiotprogrammer
Answers.Body: <ol>
  <li>All the technically-savvy answers are <strong>wrong</strong>.</li>
  <li>This is a business question, not a technical question.</li>
  <li>Ask your publisher.</li>
  <li><p>If you're really self-publishing, then go with the technical advice.</p>
  
  <p>Read <a href="http://www.antipope.org/charlie/blog-static/2013/11/cmap-why-do-you-use-microsoft-.html" rel="nofollow">this rant by a professional writer</a>.</p>
  
  <p>If you mess up, fix it with <a href="http://johnmacfarlane.net/pandoc/" rel="nofollow" title="pandoc">the pandoc conversion program</a>.</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-10T16:21:39.433Z
Answers.Text: Can you expand on why "All the technically-savvy answers are wrong"?
Answers.UserDisplayName: James Jenkins
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-11T12:39:30.807Z
Answers.Text: If you are dealing with a publishing house, then yes, you probably will have to use MS Word. But this question was specifically about converting a document to an ebook. It *is* a technical question, rather than a business one.
Answers.UserDisplayName: evilsoup
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-10T12:38:32.790Z
Answers.LastActivityDate: 2014-03-10T13:05:34.403Z
Answers.LastEditDate: 2014-03-10T13:05:34.403Z
Answers.UserDisplayName: RickyS
Answers.Body: <p>TL;DR; In order not to worry about the output, you have to be sure of the input and the translation process into an ebook. The input has to show you everything that is there and hide nothing, and the translation process must be deterministic.</p>
  
  <hr>
  
  <p>If you only need basic formatting and want it to be consistently converted, the best you can do is use a mark-up language like <a href="http://docutils.sourceforge.net/rst.html">reStructured Text</a>, <a href="http://daringfireball.net/projects/markdown/">markdown</a> or <a href="http://www.docbook.org/">DocBook</a>.</p>
  
  <p>The reason for this is that common word processors like Word¹ are what-you-see-is-all-you've-got: you often have no idea what the internal structure of a document is even though it shows "right" on the screen. </p>
  
  <p>This happens e.g. when you have three words in italics, and select the middle one and set italics again. Is the internal structure such that italics ends after the first word and begins at the third; or does it end at the beginning of the second word (after the space) and start at the end of the second before the space; or is the second word just italics and does italics within italics mean: display non-italics? And what happens to this structure when you then deleted the second word?²</p>
  
  <p>With a mark-up language the mark-up is explicit and you see what you do: where things start, where things end. The translation of mark-up gets you the same result every time, and that makes it predictable. And predictable means you know what you get as an end-result and you don't have to check it. At least it should not be a result after the first time using some construct ;-).</p>
  
  <p>The preceeding isn't necessarily true for two documents that look the same in Word: they might have different internal structures, which translate to different output in an ebook.</p>
  
  <p>For many people this is not a problem, as to how this differs depends on the the target ebook format. Formats that do less rendering of <strong>structure</strong> (such as image based ebook formats like DjVu, or typesetting oriented formats like PDF and DVI (LaTeX output)) are similar to output to a printer. Word has control over this, and makes it look the same whether it renders to screen, to the printer or to PDF. That is why you normally have no visual difference directly printing from Word, or generating a PDF and printing that.</p>
  
  <p>This can be different  if your input text is translated in another mark-up, as in ebooks in EPUB, MOBI, etc. format. In that case knowing exactly what structure you started with is important as that may influence the output rendering. And that is where Word could get a different output for similar looking input, because there might be hidden elements, but something in a mark-up language will be the same if it looks the same, because there is nothing that is hidden.</p>
  
  <p>The aforementioned example, which looks the same in Word could translate in one of the following HTML pieces (there are more possibilities, and this might be an oversimplification, but the I hope it conveys the principle):</p>
  
  <p><code>&lt;i&gt;abc&lt;/i&gt; def &lt;i&gt;ghi&lt;/i&gt;</code> &rarr; <i>abc</i> def <i>ghi</i><br>
  <code>&lt;i&gt;abc &lt;/i&gt;def&lt;i&gt; ghi&lt;/i&gt;</code> &rarr; <i>abc </i>def<i> ghi</i><br>
  <code>&lt;i&gt;abc &lt;i&gt;def&lt;/i&gt; ghi&lt;/i&gt;</code> &rarr; <i>abc <i>def</i> ghi</i></p>
  
  <p>If the output was to be LaTeX instead of HTML (where italics in italics switches back to non-italics) the third would look the same as the first two, and the inter-word spacing would differ after italics ends (it might be different in HTML rendering by Firefox as well, I just can't see it).</p>
  
  <p>The conversion process should be deterministic, and it probably is for your purposes. However Knuth did do the calculation in TeX in integers because he argued that the floating point units in computers (at that time) where not deterministic enough because of rounding differences. IIRC this was to get the same result on different computers, so this is—hopefully—only an example of to what extremes people go to control the repeatability of their output.</p>
  
  <hr>
  
  <p>For conversion of mark-up, have a look at <a href="http://sphinx-doc.org/">Sphinx</a> or <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>. The former can generate output in PDF without having to install LaTeX, the latter has more in- and output formats. Both can generate HTML which you might use as a basis for MOBI as I have not seen any direct generation towards that of mark-up languages (but since I don't have a MOBI device, I have not really looked for that).</p>
  
  <p>¹ <sub>I use Word here, but this applies to OpenOffice writer and similar editors as well</sub><br></p>
  
  <p>² <sub>I fear too many of us have edited documents only to have new text at the cursor have some font or formatting that we did not expect and is a result of some program internal formatting lurking invisible.</sub><br></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-09T16:52:24.543Z
Answers.LastActivityDate: 2014-03-09T16:52:24.543Z
Answers.UserDisplayName: Anthon
Body: <p>There are several different software products for collecting and formatting the electronic written word. Microsoft &amp; Google, are two big names offering products, there are also many others.</p>
  
  <p>Looking at some of the questions here on ebooks, it is obvious that all software is not created equal and some formats translate to other formats better than others.</p>
  
  <p>If I want to write and save my work, with basic formatting. Only modifying; italics, bold &amp; font size for chapter headers.  What software and/or file type, will be the most consistent when converting to ebook formats? </p>
  
  <p>I want to be able to write, edit and provide basic formatting to my book, and not have to worry about doing a complete edit review for each ebook format I convert to.</p>
  
Tags: <file-format><formatting>
Title: What text format is least likely to clash with ebook formats?
UserDisplayName: James Jenkins
ThreadText: # What text format is least likely to clash with ebook formats?
  
  (Asked by: username_0 on 2014-03-09)
  
  There are several different software products for collecting and formatting the electronic written word. Microsoft & Google, are two big names offering products, there are also many others.
  
  Looking at some of the questions here on ebooks, it is obvious that all software is not created equal and some formats translate to other formats better than others.
  
  If I want to write and save my work, with basic formatting. Only modifying; italics, bold & font size for chapter headers. What software and/or file type, will be the most consistent when converting to ebook formats?
  
  I want to be able to write, edit and provide basic formatting to my book, and not have to worry about doing a complete edit review for each ebook format I convert to.
  
  **Tags:** file-format, formatting
  
  
  ---
  
  ## 7 answers
  
  ### Answer by username_2 on 2014-03-09. Score: 11 | Accepted answer
  
  TL;DR; In order not to worry about the output, you have to be sure of the input and the translation process into an ebook. The input has to show you everything that is there and hide nothing, and the translation process must be deterministic.
  
  ---
  
  If you only need basic formatting and want it to be consistently converted, the best you can do is use a mark-up language like [reStructured Text](http://docutils.sourceforge.net/rst.html), [markdown](http://daringfireball.net/projects/markdown/) or [DocBook](http://www.docbook.org/).
  
  The reason for this is that common word processors like Word¹ are what-you-see-is-all-you've-got: you often have no idea what the internal structure of a document is even though it shows "right" on the screen.
  
  This happens e.g. when you have three words in italics, and select the middle one and set italics again. Is the internal structure such that italics ends after the first word and begins at the third; or does it end at the beginning of the second word (after the space) and start at the end of the second before the space; or is the second word just italics and does italics within italics mean: display non-italics? And what happens to this structure when you then deleted the second word?²
  
  With a mark-up language the mark-up is explicit and you see what you do: where things start, where things end. The translation of mark-up gets you the same result every time, and that makes it predictable. And predictable means you know what you get as an end-result and you don't have to check it. At least it should not be a result after the first time using some construct ;-).
  
  The preceeding isn't necessarily true for two documents that look the same in Word: they might have different internal structures, which translate to different output in an ebook.
  
  For many people this is not a problem, as to how this differs depends on the the target ebook format. Formats that do less rendering of **structure** (such as image based ebook formats like DjVu, or typesetting oriented formats like PDF and DVI (LaTeX output)) are similar to output to a printer. Word has control over this, and makes it look the same whether it renders to screen, to the printer or to PDF. That is why you normally have no visual difference directly printing from Word, or generating a PDF and printing that.
  
  This can be different if your input text is translated in another mark-up, as in ebooks in EPUB, MOBI, etc. format. In that case knowing exactly what structure you started with is important as that may influence the output rendering. And that is where Word could get a different output for similar looking input, because there might be hidden elements, but something in a mark-up language will be the same if it looks the same, because there is nothing that is hidden.
  
  The aforementioned example, which looks the same in Word could translate in one of the following HTML pieces (there are more possibilities, and this might be an oversimplification, but the I hope it conveys the principle):
  
  `<i>abc</i> def <i>ghi</i>` → *abc* def *ghi*  
  `<i>abc </i>def<i> ghi</i>` → *abc* def *ghi*  
  `<i>abc <i>def</i> ghi</i>` → *abc *def* ghi*
  
  If the output was to be LaTeX instead of HTML (where italics in italics switches back to non-italics) the third would look the same as the first two, and the inter-word spacing would differ after italics ends (it might be different in HTML rendering by Firefox as well, I just can't see it).
  
  The conversion process should be deterministic, and it probably is for your purposes. However Knuth did do the calculation in TeX in integers because he argued that the floating point units in computers (at that time) where not deterministic enough because of rounding differences. IIRC this was to get the same result on different computers, so this is—hopefully—only an example of to what extremes people go to control the repeatability of their output.
  
  ---
  
  For conversion of mark-up, have a look at [Sphinx](http://sphinx-doc.org/) or [pandoc](http://johnmacfarlane.net/pandoc/). The former can generate output in PDF without having to install LaTeX, the latter has more in- and output formats. Both can generate HTML which you might use as a basis for MOBI as I have not seen any direct generation towards that of mark-up languages (but since I don't have a MOBI device, I have not really looked for that).
  
  ¹ I use Word here, but this applies to OpenOffice writer and similar editors as well
  
  ² I fear too many of us have edited documents only to have new text at the cursor have some font or formatting that we did not expect and is a result of some program internal formatting lurking invisible.
  
  
  ---
  
  ### Answer by username_1 on 2014-03-10. Score: 7
  
  If you want to be guaranteed of the fewest possible number of file conversion headaches, xhtml is your best bet. The epub format is built on xhtml, and Amazon's KF8 format seems to follow suit--at any rate, when you create a KF8 file you start with an epub. Anything other than xhtml will mean that you have to convert from that format *to* xhtml, so if you want to minimize those conversions, just start with xhtml. For bonus points, you can use xhtml for your print format as well, and then have a single-source manuscript—just use two different CSS files for print and ebook.
  
  > **Comments:**
  > **username_2**: Perfect control over the input and output as there is no conversion +1. I should have thought of that, as I actually have done this myself. And when you use e.g. emacs even shows `<b>text</b>` in bold.  
  
  ---
  
  ### Answer by username_3 on 2014-03-09. Score: 6
  
  I think you should take a look at [Sigil](https://code.google.com/p/sigil/), a program for creating/editing epub-format ebooks.
  
  [On the download page,](https://code.google.com/p/sigil/downloads/list) there is an installer for Windows and an image for Mac.
  
  Sigil is open source and therefore free. You can input text from whatever you are using and edit either using a code editor or a WYSIWYG editor, which makes it pretty easy. The WYSIWYG editor has basic formatting options, easy chapter breaks and even the means for generating a table of contents.
  
  
  ---
  
  ### Answer by username_4 on 2014-03-09. Score: 4
  
  [ASCIIDoc](http://www.methods.co.nz/asciidoc/) is a nice compromise between bare bones (like markdown) and full featured (like tex).
  
  There are lots of examples online, but the basic idea is this: you write in plain text, using as-obvious-as-reasonable styles to indicate headers, italics, lists, etc. then you can export that format to PDF, HTML, EPUB, etc.
  
  [A quick example to get you started](http://www.methods.co.nz/asciidoc/publishing-ebooks-with-asciidoc.html#X1):
  
  ```
  = The Book Title
  
  == The first chapter
  Nec vitae mus fringilla eu vel pede sed pellentesque. Nascetur fugiat
  nobis. Eu felis id mauris sollicitudin ut. Sem volutpat feugiat.
  Ornare convallis urna vitae.
  
  Nec mauris sed aliquam nam mauris dolor lorem imperdiet.
  
  == The second chapter
  Ut suspendisse nulla. Auctor felis facilisis. Rutrum vivamus nec
  lectus porttitor dui dapibus eu ridiculus tempor sodales et. Sit a
  cras. Id tellus cubilia erat.
  
  Quisque nullam et. Blandit dui tempor. Posuere in elit diam egestas
  sem vivamus vel ac.
  
  ```
  
  Then you can generate an EPUB formatted book file using AsciiDoc’s `a2x` wrapper:
  
  `a2x -fepub -dbook mybook.txt`
  
  
  ---
  
  ### Answer by username_5 on 2014-03-09. Score: 2
  
  If you are just interested in basic formatting, [markdown](http://daringfireball.net/projects/markdown/) is by far the simplest choice. You may write your text on any platform, and then converting it.
  
  
  ---
  
  ### Answer by username_6 on 2014-03-10. Score: 0
  
  If you're going to be collaborating with more than one author, chances are that you will want to use MS Word at some point during the writing process.
  
  MS word is still a good option because it has a great grammar checker and lets you track changes. But it doesn't output epub and you need another tool for that. But aside from bold, italic, heading 1, etc, I wouldn't use it for serious formatting.
  
  If you're looking for a GUI tool to make an epub, use Sigil or Adobe Indesign. Calibre offers some ability to do conversions as well.
  
  I do a lot of composing in a simple text editor (like Sublime) and then paste it into another program to do the conversion. Smashwords for example essentially locks you into using MS Word, but it's very well-documented and you can do most basic stuff with it.
  
  Many people use HTML templates to make their content -- that way, they can tweak the CSS for them. (Then they have to zip everything up and save as .epub extension. I personal dump my prose into Docbook XML to auto-generate the files using the epub XSLT in Oxygen Author. But my solution is -- like the others suggested here -- more for the adventurous geek.
  
  There are lots of advantages to composing in source rather than using a WYSIWIG tool, but in any method, there will be a learning curve if you are producing it yourself. That said, you probably hire someone to make a decent ebook from a simple MS Word file for less than $300.
  
  
  ---
  
  ### Answer by username_7 on 2014-03-10. Score: -1
  
  1. All the technically-savvy answers are **wrong**.
  2. This is a business question, not a technical question.
  3. Ask your publisher.
  4. If you're really self-publishing, then go with the technical advice.
  
     Read [this rant by a professional writer](http://www.antipope.org/charlie/blog-static/2013/11/cmap-why-do-you-use-microsoft-.html).
  
     If you mess up, fix it with [the pandoc conversion program](http://johnmacfarlane.net/pandoc/ "pandoc").
  
  > **Comments:**
  > **username_0**: Can you expand on why "All the technically-savvy answers are wrong"?  
  > **username_8**: If you are dealing with a publishing house, then yes, you probably will have to use MS Word. But this question was specifically about converting a document to an ebook. It *is* a technical question, rather than a business one.  
  
  ---
  
  