Skip to main content
18 votes

How can I convert an HTML site into an ebook?

I had the exact same problem for a long time. You can produce good results with Calibre, but I found the process was a bit involved. Instead I created a way to do this much more easily. It's a ...
Harold's user avatar
  • 181
7 votes

Any opensource or free css stylesheets for books?

Paul Salvette wrote an ebook formatting guide which I recommend. He wrote boilerplate css which you can view/download here: http://bbebooksthailand.com/bb-CSS-boilerplate.html His company has ...
idiotprogrammer's user avatar
4 votes
Accepted

How to alternate row colors of tables in ePub files

You can use the following CSS rules to style respectively even or odd table rows (See the Example on W3schools): tr:nth-child(even) { background-color: #f2f2f2 } tr:nth-child(odd) { ...
Sekhemty's user avatar
  • 6,194
3 votes

How can I prevent a widowed/orphaned header?

I would use h4 {page-break-after: avoid;} p { widows: 2; orphans: 2; } I think this works for Kindles as well as epubs. This is just example code. My guess is that this is structured content ...
idiotprogrammer's user avatar
3 votes
Accepted

How can I prevent a widowed/orphaned header?

According to this blog article, you should use the display: inline-block property on a div selector that encloses your header and paragraph. Here is an excerpt from the said article: If you set ...
Sekhemty's user avatar
  • 6,194
3 votes
Accepted

Software recommendation for writing ebook and exporting to multiple formats

Pandoc is your friend here. Pandoc can take your input file (LaTeX, markdown, other) and transform it to PDF, EPUB, HTML (and many more). Pandoc is cross-platform and free under the GPL, although ...
StandardEyre's user avatar
3 votes

How can I convert an HTML site into an ebook?

I went nuts figuring this out. Developed mile long Xpath strings and what not. Then it turned out to be ridiculously simple. I am ignoring op systems in this answer... (a) for the conversion to epub ...
guest's user avatar
  • 31
2 votes

Software recommendation for writing ebook and exporting to multiple formats

I say this as something who doesn't normally use the product, but Adobe InDesign allows for an easy export into PDF and epub. I don't know about formatting code blocks though. Adobe ID has a monthly ...
idiotprogrammer's user avatar
2 votes

Software recommendation for writing ebook and exporting to multiple formats

If you don't want the hassle of setting up the full LaTeX stack, as needed with the, in this respect, unfriendly pandoc, you can have a look at reStructured text and Sphinx. For these tools exists to ...
Anthon's user avatar
  • 7,641
2 votes
Accepted

writing inline footnotes for html to mobi conversion using calibre

I've figured it out. To make the inline footnote works, must put the footnotes in the "Footnotes" section. Here is the example: I have the file: "HDN is the best.html" <html> ...
123iamking's user avatar
2 votes

Is it possible to create anchors in the numbers of an <ol> list?

Earlier in text: <a name="header1">Header 1</a> <a name="header2">Header 2</a> further down... <ol> <li><a href="#header1">item one</a></li> &...
Bulrush's user avatar
  • 367
2 votes

Can I use bold and italics tags?

I have never used Adobe Indesign, but I'm guessing that when they spit out html they use the italic and bold html tags. My guess is that in Adobe Indesign you are not seeing a separate font at all but ...
idiotprogrammer's user avatar
2 votes

section numbers in epub headings

EPUB3 defines a profile for CSS which is pretty much a superset of CSS 2.1 and a subset of CSS 3. I haven't checked to see whether the CSS facilities mentioned are covered in the profile, but if they ...
PBW's user avatar
  • 21
2 votes

How can I create an ebook from existing HTML files?

You could also use Pandoc in conjunction with the kindlegen command-line tool. Converting your HTML files to Markdown files is not necessary but if done will allow (easier) conversion to other ...
Khalid Hussain's user avatar
2 votes

How to convert a html ebook to a pdf file?

Let me tell you the easiest way: you could paste the entire contents from the browser into a MS word/Libre Office file and then export to PDF. Both programs are fairly good at importing HTML -- they ...
idiotprogrammer's user avatar
2 votes
Accepted

Why are epub .xhtml files saved as .html?

This appears to be a distinction between EPUB 2 and EPUB 3. EPUB 2 content files are expected to have .HTML extensions. EPUB 3 content files are expected to have .XHMTL extensions. The same book ...
GraniteStateColin's user avatar
1 vote

Move image to top of the page (like LaTeX’s \begin{figure}[t])

My guess is no. You want the img (or the div container) to be a block element. At the same time, you want the image to act like an inline element -- adjusting to the display. A block element by ...
idiotprogrammer's user avatar
1 vote

How can I create an ebook from existing HTML files?

There are many ways to skin a cat. Calibre is one such way, but not the only way. is there any software available to directly write in mobi format? Some things to thing about: Would it not be ...
idiotprogrammer's user avatar
1 vote

How can I highlight visited anchors in an epub?

You can use these CSS styling for links. /* unvisited link */ a:link { color: green; } /* visited link */ a:visited { color:red; } /* mouse over link */ a:hover { color: blue; } /* selected link *...
Leon William's user avatar
1 vote
Accepted

How can I highlight visited anchors in an epub?

You can use a couple CSS selectors to style links. a:link will select and style all unvisited links, while a:visited, surprisingly enough, will do the same with visited ones. Examples: a:link { ...
Sekhemty's user avatar
  • 6,194
1 vote

How to alternate row colors of tables in ePub files

In HTML just set the fill colours on each row to alternating values some authoring software probably has a table style that does this for you but off the top of my head I can't say which. MS-Word used ...
Steve Barnes's user avatar
1 vote

section numbers in epub headings

First, that tutorial was interesting and useful. But I don't think that CSS is supported in kindle https://www.amazon.com/gp/feature.html?docId=1000729901 or epub. I could not even find that css in ...
idiotprogrammer's user avatar
1 vote

Can I use bold and italics tags?

Old question, but I came in search of an answer and have some things to share on this topic! Adobe InDesign uses character or paragraph styles to format italics and bold, using a relevant font family,...
Coryl's user avatar
  • 11
1 vote

Can I use bold and italics tags?

I'm testing this with Calibre editor, I don't know if InDesign works the same, but html tags are the same regardless of the software. I can render a bold italic text in two ways, with <b> and &...
Sekhemty's user avatar
  • 6,194
1 vote
Accepted

Importing XHTML Files into InDesign

After doing some more research, it appears that X/HTML files can NOT be imported into InDesign. The best you can do is use InDesign to create a framework for your epub, export it as an epub, then use ...
WordBear's user avatar
  • 647
1 vote
Accepted

Table headings that may repeat for several "pages"

Great question. First, you should be making epub3 files because generally epub3 files work on epub2 reading systems. All epub2 readers can view epub3 files -- though perhaps not optimally. My ...
idiotprogrammer's user avatar
1 vote

section numbers in epub headings

You should do it either as you do now, manually, or automated as part of the writing process using markdown, docbook etc, the reason being that most hardware readers are rarely up-to-date. Readers ...
kso's user avatar
  • 11
1 vote
Accepted

Can I expect one chapter per html file in an Epub?

No it is a valid file if there are several chapters in one file. You can even have the whole book as one HTML file. The epub spec says Each Rendition of an EPUB Publication contains one or more ...
mmmmmm's user avatar
  • 1,210
1 vote

Resize readium document if content body has changed

I don't have much ability to answer your question (especially without seeing your code or knowing the required space in the viewport to hide or display). I'm aware of and have occasionally tested ...
idiotprogrammer's user avatar
1 vote

Software recommendation for writing ebook and exporting to multiple formats

Some time ago I created a GitHub repository of eBook Writing Resources. Specifically, this is the current list (as of the time of writing this answer - visit the link above for an up-to-date list as ...
Ofer Zelig's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible