Z LaTeXu do EPUB: konverze strukturovaných dokumentů obsahujících nestandardní makra Společně s vývojem technologie nabývají stále většího významu elektronické knihy. Čtečky elektronických knih nejsou dostatečně dobře uzpůsobeny na čtení souborů ve formátu PDF. Pro pohodlné čtení je vhodnější, když si čtenář může uzpůsobit velikost písma podle svého zraku. Odstavce se podle toho musí automaticky přesadit. Tuto vlastnost nabízí formát EPUB. Ze strany nakladatelů tudíž přichází tlak na to, aby staré knihy byly převedeny do tohoto formátu. Formát EPUB je v podstatě kontejner obsahující texty ve formátu XHTML a kaskádové styly definující vzhled. Konverzi do EPUB lze tedy provést různými metodami. Protože v PDF určeném pro tisk žádné strukturní informace nejsou, konverzní program v principu nemůže spolehlivě identifikovat nadpisy kapitol. Pro konverzi z LaTeXu se nabízejí programy ttn a tex4ht, ale pokud zdrojový dokument pro nadpisy nepoužívá standardní makra \chapter, \section, \subsection, nebo jsou tato makra předefinována a mají jinou syntaxi, zmíněné programy zkonvertují text špatně, případně havarují. Přednáška ukáže postup, jak lze pomocí jednoduchých nástrojů zkonvertovat dokument z LaTeXu do EPUB. Bude vysvětlena problematika fontů včetně licenčních omezení a ukázána metoda, jak zpracovat objekty, které jsou v LaTeXu běžné, ale v kaskádových stylech není k dispozici odpovídající ekvivalent. From LaTeX to EPUB: conversion of structured documents containing nonstandard macros Hand in hand with advances in technology, eBooks are becoming more an more important. The eBook readers are not suitable for viewing the PDF files. For comfortable reading the reader should be granted the possibility of setting the font size that is pleasant to his or her eyes. The paragraphs must then be automatically reflown. This feature is offered by the EPUB format. The publishers therefore insist that the old books be converted into this very format. The EPUB format is in fact a container of texts in the XHTML format accompanied with cascading stylesheets for layout definition. The conversion into EPUB can be carried out by several methods. Since the PDF files, that were prepared for printing, do not contain any structure information, a conversion program is unable to reliably recognize the chapter titles. Conversion from LaTeX can be done by the ttn and tex4ht programs but if the titles in the source document are not marked with the \chapter, \section, \subsection standard macros or these macros are redefined and have a different syntax, the above mentioned programs do not convert the file correctly or even fail. The lecture will demonstrate a workflow how the LaTeX document can be converted into EPUB using simple tools. The font related topics included license will be discussed. It will also be shown how to cope with objects that are supported in LaTeX but their equivalents in cascaded stylesheets are not available.