Lantern is a Pandoc template and toolkit for making OER in multiple formats. Lantern helps you typeset OER projects with Markdown (.md
) from common word processing formats (.docx
) so that you can generate HTML, PDF, and EPUB versions for the public. All of the source control, file processing, and web hosting is handled automatically with GitHub, but you are encouraged to use Lantern on your own computers.
-
Free: Lantern uses open source software and free-of-charge web services for processing, building, deploying, and hosting OER.
-
Portable: Lantern emphasizes the use of plain text file formats that can run on any machine or web host. No databases or server-side applications are required to be purchased, installed, or maintained.
-
Multi-format: Lantern uses semantic markup technologies for distributing OER as Markdown, HTML, PDF, EPUB, and DOCX documents in order to provide versioned, web, print, e-reader, and editable access to the public.
-
Autonomy: Lantern teaches fundamental document organization, formatting, and production skills in order to decrease reliance on monolithic software solutions and platforms.
Lantern provides conversion scripts for a subset of file formats that Pandoc is able to convert. Lantern will convert these file formats to Markdown:
File Extensions | Format | Related Applications |
---|---|---|
.docx |
Open Office XML | Microsoft Word, Google Docs, LibreOffice |
.odt |
Open Document Text | Microsoft Word, Google Docs, LibreOffice |
.tex |
LaTeX | Plain text editor (e.g. VS Code, Overleaf) |
Lantern provides templates for producing multiple publication formats from Markdown. Lantern can produce these publication formats from a single source:
File Extensions | Format | Related Applications |
---|---|---|
.docx |
Office Open XML | Microsoft Word, Google Docs, LibreOffice |
.tex |
LaTeX | Plain text editor (e.g. VS Code) |
.html |
HTML5 | web browsers |
.epub |
EPUB3 | Calibre, Adobe Digital Editions, web browsers |
.pdf |
Adobe Acrobat Reader, web Browsers |
Note: Lantern provides templates and configurations for generating
.tex
files for LaTeX or ConTeXt engines. These files are only recommended for people who are familiar with these typesetting technologies.
- Minimal Working Example
- Introduction to Materials Science and Engineering
- Empirical Methods in Political Science: An Introduction
- Read the documentation to learn more
- Post a question in the discussion forum
- Report a bug or feature request in the issue tracker
While this template is setup to use GitHub Actions and GitHub Pages for file processing and web hosting, you can use the template on your own machine and deploy the outputs to any other web host. Here's what you'd need:
- A text editor (e.g. Visual Studio Code)
- Pandoc: a universal document converter
- PagedJS: Command line version (which itself requires nodejs and npm): for generating PDFs
- (Windows only) Git Bash: for running bash scripts and a few GNU utilities
- Pandoc-crossref: a pandoc filter for numbering figures, equations, tables, and cross-references to them.
- A LaTeX distribution: for LaTeX/PDF typesetting and generation (we like TinyTeX)
Diaz, Chris. 2022. "Lantern: A Pandoc Template for OER Publishing," Code4Lib Journal 53. Available: https://journal.code4lib.org/articles/16329