Tato práce má nejprve čtenáře seznámit s existujícími nástroji pro převod dokumentů do TeX (LaTeX) formátu. Zabývá se výhodami a nevýhodami jednotlivých převodníků, popisuje postupy které využívají a vysvětluje situace, ve kterých budeme chtít dokumenty převádět. Konvertory používané pro převody dokumentů z LaTeXu nebo do LaTeXu využívají některých principů zpracování formálních jazyků.
Vyskytují se zde problémy s převáděním libovolných dokumentů do zdrojového textu LaTeX. Nelze najít obecné řešení pro každou situaci. Praktická část této práce se zabývá implementací softwarového nástroje, který zjednodušší práci s výsledným zdrojovým kódem a pomůže jej vyčistit. Implementace softwarového nástroje řeší problémy s rozdělením textu do abstraktního syntaktického stromu a identifikací stylů. Protože následné úpravy kódu nemusí mít vždy jasný postup či výsledek, není plně automatizován a software slouží pouze pro usnadnění nejčastějších postupů při editaci kódu.
Tento nástroj bude použit na vzorový dokument pro demostraci jeho možností a efektivity. Protože jsou kladeny požadavky na zdrojový dokument, budou předvedeny výsledky překladu a následné úpravy dvou dokumentů. Jednoho dokumentu, který využívá styly, a druhého, který je nevyužívá. Výsledky budou vyhodnoceny.
Anotace v angličtině
This work is an overview of existing document to TeX (LaTeX) convertors. It
focuses on advantages and disadvantages of dierent approaches of these tools.
There are many situatins in which text convertors can be used. This work explains many possible impacts for each choice of convertor. Convertors specifically used for document to LaTeX or LaTeX to document conversions are using some principes of formal language theory.
There are some formal problems with converting any document in LaTeX source code. Because of those, it is hard to nd an ideal solution for every situation. The practical part of this work treats of implementation of software tool, which will ease some problems with structure of the final LaTeX code and it will help to clean it. It is focused on parsing strategies and it will help to indetify styles to retain them. The software will help user with code editing. This process will not be fully automatic as it still requires a lot of user interaction. The goal is to make this process easier.
This software tool will be used to convert sample document for demonstration of its possibilities and eectiveness. Since the result depends on both source document and user interaction, it will be demonstrated on two documents. The rst document will keep the specied rules for its formatting and styles and the second will not. Each step will be described and specied for the user interaction. In the end the results will be evaluated.
Klíčová slova
konverze dokumentů, TeX, LaTeX, formální jazyky, abstraktní syntaktické stromy, derivační stromy, lexikální analýza, syntaktická analýza, sémantická analýza, styly textu
Tato práce má nejprve čtenáře seznámit s existujícími nástroji pro převod dokumentů do TeX (LaTeX) formátu. Zabývá se výhodami a nevýhodami jednotlivých převodníků, popisuje postupy které využívají a vysvětluje situace, ve kterých budeme chtít dokumenty převádět. Konvertory používané pro převody dokumentů z LaTeXu nebo do LaTeXu využívají některých principů zpracování formálních jazyků.
Vyskytují se zde problémy s převáděním libovolných dokumentů do zdrojového textu LaTeX. Nelze najít obecné řešení pro každou situaci. Praktická část této práce se zabývá implementací softwarového nástroje, který zjednodušší práci s výsledným zdrojovým kódem a pomůže jej vyčistit. Implementace softwarového nástroje řeší problémy s rozdělením textu do abstraktního syntaktického stromu a identifikací stylů. Protože následné úpravy kódu nemusí mít vždy jasný postup či výsledek, není plně automatizován a software slouží pouze pro usnadnění nejčastějších postupů při editaci kódu.
Tento nástroj bude použit na vzorový dokument pro demostraci jeho možností a efektivity. Protože jsou kladeny požadavky na zdrojový dokument, budou předvedeny výsledky překladu a následné úpravy dvou dokumentů. Jednoho dokumentu, který využívá styly, a druhého, který je nevyužívá. Výsledky budou vyhodnoceny.
Anotace v angličtině
This work is an overview of existing document to TeX (LaTeX) convertors. It
focuses on advantages and disadvantages of dierent approaches of these tools.
There are many situatins in which text convertors can be used. This work explains many possible impacts for each choice of convertor. Convertors specifically used for document to LaTeX or LaTeX to document conversions are using some principes of formal language theory.
There are some formal problems with converting any document in LaTeX source code. Because of those, it is hard to nd an ideal solution for every situation. The practical part of this work treats of implementation of software tool, which will ease some problems with structure of the final LaTeX code and it will help to clean it. It is focused on parsing strategies and it will help to indetify styles to retain them. The software will help user with code editing. This process will not be fully automatic as it still requires a lot of user interaction. The goal is to make this process easier.
This software tool will be used to convert sample document for demonstration of its possibilities and eectiveness. Since the result depends on both source document and user interaction, it will be demonstrated on two documents. The rst document will keep the specied rules for its formatting and styles and the second will not. Each step will be described and specied for the user interaction. In the end the results will be evaluated.
Klíčová slova
konverze dokumentů, TeX, LaTeX, formální jazyky, abstraktní syntaktické stromy, derivační stromy, lexikální analýza, syntaktická analýza, sémantická analýza, styly textu