Kääntäjä verkkopohjaisille oppimateriaaleille: rSTLa – LarST kääntäen
Söderholm, Santtu (2021)
Söderholm, Santtu
2021
Teknis-luonnontieteellinen DI-ohjelma - Master's Programme in Science and Engineering
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2021-04-28
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202104142992
https://urn.fi/URN:NBN:fi:tuni-202104142992
Tiivistelmä
Formaali kieli reStructuredText on laajassa käytössä Aalto-yliopistossa kehitettyä sähköistä oppimisympäristöä A+ varten kirjoitettujen tietojenkäsittelytieteiden ja matemaattisten oppimateriaalien lähdekoodina. Kyseinen kieli ei kuitenkaan tähän mennessä ole ollut kovin helposti käännettävissä korkealaatuisesti muuhun kuin HTML-muotoon. Tähän ongelmaan pyrkii vastaamaan kielen LaTeX osajoukko tai fragmentti LarST eli LaTeX to reStructuredText, joka olisi erinäisten kääntäjien kautta käännettävissä eri esitysmuotoihin. Esimerkiksi kääntäjä pdflatex voisi tehdä käännöksen PDF-muotoon, kun taas kielen LarST nimen jakava kääntäjä voisi nimensä mukaisesti olla vastuussa muunnoksesta LaTeX → reStructuredText. LarSTin käyttöönoton helpottamiseksi täytyisi kuitenkin olla olemassa jokin automaattinen tapa siirtää mainittuja reStructuredText-muotoisia oppimateriaaleja LarST-formattiin.
Tämän vuoksi tässä diplomityössä toteutettiin kääntäjä nimeltä rSTLa tai ruSTLa, eli reStructuredText to LaTeX. Kääntäjä on kirjoitettu kielellä Rust ja kykenee versiossa 0.38 kääntämään noin 38 erilaista kielen reStructuredText tuntemaa tekstirakennetta LarST-formaattiin. Näihin sisältyvät suuri osa Docutilsin, kuin myös sen laajennosten Sphinx ja A+ rST Tools tarjoamista rakenteista. Kääntäjän lähdekoodi ja dokumentaatio ovat löydettävissä vastaavasti tämän työn lähteistä [1] ja [2]. The formal language reStructuredText is in wide use as a source code of online study materials in computer science and mathematics, written for the learning management system A+, developed at Aalto University. Thus far it has been difficult to tranform the sources into high quality presentation formats, other than HTML pages. A possible solution to this problem is provided by a subset or fragment of the language LaTeX, called LarST or LaTeX to reStructuredText, that is transformable to different presentation formats or intermediary source code via different compilers. For example, a transformation to PDF form is achievable via the compiler pdflatex, whereas the transformation LaTeX → reStructuredText can be performed by a compiler that shares its name with LarST. In order to ease the adoption of LarST, there should exist some automatic means of translating the already mentioned existing libary of study materials into the LarST format.
That is why a compiler called rSTLa or ruSTLa, short for reStructuredText to LaTeX, was developed along with this Master’s Thesis. The compiler was written in the Rust programming language and as of version 0.38, it provides support for roughly 38 reStructuredText language constructs, being able to transform them into LarST. These constructs include many of the text elements provided by the standard implementation of reStructuredText, Docutils, but also by its extensions Sphinx and A+ rST Tools. The locations of the source code and documentation of ruSTLa can be found from the reference entries [1] and [2] of this work, respectively.
Tämän vuoksi tässä diplomityössä toteutettiin kääntäjä nimeltä rSTLa tai ruSTLa, eli reStructuredText to LaTeX. Kääntäjä on kirjoitettu kielellä Rust ja kykenee versiossa 0.38 kääntämään noin 38 erilaista kielen reStructuredText tuntemaa tekstirakennetta LarST-formaattiin. Näihin sisältyvät suuri osa Docutilsin, kuin myös sen laajennosten Sphinx ja A+ rST Tools tarjoamista rakenteista. Kääntäjän lähdekoodi ja dokumentaatio ovat löydettävissä vastaavasti tämän työn lähteistä [1] ja [2].
That is why a compiler called rSTLa or ruSTLa, short for reStructuredText to LaTeX, was developed along with this Master’s Thesis. The compiler was written in the Rust programming language and as of version 0.38, it provides support for roughly 38 reStructuredText language constructs, being able to transform them into LarST. These constructs include many of the text elements provided by the standard implementation of reStructuredText, Docutils, but also by its extensions Sphinx and A+ rST Tools. The locations of the source code and documentation of ruSTLa can be found from the reference entries [1] and [2] of this work, respectively.