As we look toward the future of education in the 21st century, the prominence of a robust STEM (Science, Technology, Engineering, and Mathematics) curriculum is unquestioned. However, low achievement in mathematics education has been an increasing problem in several countries. Mobile devices, smartphones, phablets and tablets, are widely available. This is a generation of digital natives. We cannot ignore that they are no longer the same students for which the education system was designed traditionally. Studying math is many times a cumbersome task. But this can be changed if the teacher takes advantage of the technology that is currently available. In this paper, we present the design and development of an ebook for STEM teaching and learning of mathematics. The teacher uses the template that we developed so that he can, in a user-friendly platform, write the ebook with the contents he designs for his students. In this way, the teacher has the possibility to include the problems that he finds suitable for the student. The teacher can produce and deliver the contents easily to students. Students can use this ebook in the classroom or outside the classroom in a blended learning model to solve problems. When students have difficulties in solving a problem they can watch the resolution of it. In this way, we want to provide the same opportunities to low achieving students that may struggle to learn the materials covered in class. Students have also access to complex problems that may provide additional stimulation for top performers students. In this way, we can provide a platform that is student-centered and teacher-friendly. We also describe the workflow for developing this ebook. It was implemented with the free and open standard EPUB 3 that is available for Android and iOS platforms. This specification supports video embedded in the ebook. In this paper it is shown how to take advantage of this feature, making videos available about lectures and problems resolutions, which is especially interesting for learning mathematics. We describe the difficulties found in the integration of mathematics expressions in the MathML description in EPUB 3.