1

I'm using asciidoctor-pdf to create a PDF, and it is working nicely. But when I use asciidoctor-epub3 to convert it to an epub it shows a warning message:

asciidoctor: WARNING: conversion missing in backend epub3 for toc

However, the toc is added in the generated epub and I cannot figure out why I'm seeing this warning.

This is the minimal .adoc file to reproduce the problem.

= Book title
:doctype: book
:toc: macro

toc::[]
Ken White
  • 123,280
  • 14
  • 225
  • 444
lifeisfoo
  • 15,478
  • 6
  • 74
  • 115

1 Answers1

1

Asciidoctor-epub3 added support for inline TOC in v 1.5.0, honoring the :toc: attribute.

If you use set :toc: attribute your epub will have an inline table of contents just after the cover/frontmatter page.

But, the support for custom placed TOC is still in progress. So, if you set :toc: macro and then use it with toc::[] to place your TOC in a custom location, it will be ignored and a warning message will be shown during compilation.

asciidoctor: WARNING: conversion missing in backend epub3 for toc

So, despite this warning your TOC is still placed in your epub but in a fixed position.

To avoid this warning you can wrap your toc code with a conditional:

= Book title
:doctype: book
:toc: macro

//...

ifdef::backend-pdf[]
// add custom placed toc only in pdf
toc::[]
endif::[]
eskwayrd
  • 3,691
  • 18
  • 23
lifeisfoo
  • 15,478
  • 6
  • 74
  • 115