Skip to content

How to embed slides on a web page? #487

Answered by jeertmans
jeertmans asked this question in Q&A
Discussion options

You must be logged in to vote

Embedding slides on the web is relatively simple, and can be performed in two steps:

  1. Convert your animations to an HTML file with manim-slides convert MySlides slides.html, see the documentation;
  2. In your web page (I assume index.html, but it can be any HTML page), add the following:
<div style="position:relative;padding-bottom:56.25%;">
    <!-- 56.25 comes from aspect ratio of 16:9, change this accordingly -->
    <iframe
        style="width:100%;height:100%;position:absolute;left:0px;top:0px;"
        frameborder="0"
        width="100%"
        height="100%"
        allowfullscreen
        allow="autoplay"
        src="slides.html">
    </iframe>
</div>

Important

You need to make su…

Replies: 1 comment

Comment options

jeertmans
Nov 8, 2024
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by jeertmans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested html-convert Related to converting to HTML slides
1 participant