I am trying to assess ConTeXt as a source format for producing PDF and HTML output. I've discovered the feature:


but running the example from this page, does not result in the image being included in the html or xhtml output. The docName-export/images directory is empty and the HTML has comments where the image tags should be:

<div class="combinationcontent"><div class="image label-3.463cm" id="image-1"><!--empty--></div>

I am working on the assumption that all source files (.tex, .css, .png) should be stored in the same directory. PDFs build correctly.

I have Context 1.02 from TeX Live 2018 on OSX 10.13.1

My question: is exporting images supported for HTML/XHTML, and if so, what am I missing?

Thanks for any help.

  • If you running the exact example from the linked page, do you have a cow.png image in the current directory? – Aditya Aug 20 '18 at 20:49
  • Yes, I have a cow.png file in the current directory. The graphics are presented properly in PDF, so ConTeXt is finding them. – Ron Aug 20 '18 at 22:56
  • 1
    You need to manually copy the image to example-export/images folder. Then everything should work correctly. A similar question was asked on the context mailing list, where Wolfgang's reply was to manually copy the images. – Aditya Aug 20 '18 at 23:50
  • Great. That fixed it. Thanks for the assistance. – Ron Aug 21 '18 at 12:41
  • @Aditya Please post this as an answer. – Henri Menke Aug 21 '18 at 13:34

Images are not copied automatically. I assume that the rationale is that one might want different resolution images for print and web. So, you have to manually copy (or convert) the images and place them in the filename-export/images folder.

Also see this thread on the context mailing list for related discussion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.