Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The LaTeX Template Generator

Oliver Kopp
November 20, 2022

The LaTeX Template Generator

This talk presents the idea behing the "LaTeX Template Generator" (LTG). The LTG generates LaTeX templates based on "best practices" in package usage. It is available at https://github.com/latextemplates/generator-latex-template.

Oliver Kopp

November 20, 2022
Tweet

More Decks by Oliver Kopp

Other Decks in Programming

Transcript

  1. The LaTeX Template Generator
    Dr. Oliver Kopp
    JabRef Maintainer
    https://github.com/koppor/

    View Slide

  2. 2
    About Me
     LaTeX since beginning of 2000
     JabRef developer since 2011
     Maintainer of JabRef
     Maintainer of LaTeX templates

    View Slide

  3. 3
    Scientific Thesis Template
    http://latextemplates.github.io/scientific-thesis-template/

    View Slide

  4. 4
    LNCS Template
    https://latextemplates.github.io/LNCS/

    View Slide

  5. 5
    IEEE
    https://latextemplates.github.io/IEEE/

    View Slide

  6. 6
    University of Stuttgart Dissertation Template

    View Slide

  7. 7
    University of Applied Sciences Esslingen

    View Slide

  8. 8
    Template Confusion
    https://github.com/johannesbottcher/templateConfusion

    View Slide

  9. 9
    Creative CV Template

    View Slide

  10. 10
    What about minimal working examples for each package?

    View Slide

  11. 11
    Proposed Solution

    View Slide

  12. 12
    Roles and Artifacts of Proposed Solution
    microtype
    hyperref
    cmap
    selnolig
    babel
    hypcap
    LNCS
    IEEE
    Master Thesis
    Dissertation
    main.tex
    README.md
    .latexmkrc
    .gitignore
    package expert
    tooling expert
    template expert content expert
    latexmk

    View Slide

  13. 14
    User Experience

    View Slide

  14. 15
    Installation
     Install NodeJS
     Windows with Chocolatey: choco install nodejs
     npm install -g yo generator-latex-template

    View Slide

  15. 16
    User experience: Start generator

    View Slide

  16. 17
    User experience: Choice of LaTeX Compiler

    View Slide

  17. 18
    User experience: Choice of BibTeX tool

    View Slide

  18. 19
    User experience: Document language

    View Slide

  19. 20
    User experience: Use Cleveref?

    View Slide

  20. 21
    User experience: File generation

    View Slide

  21. 22
    LaTeX Compilation

    View Slide

  22. 23
    Implementation
    How to Contriute?

    View Slide

  23. 24
    Technical Details: Use Yeoman As Template Generator
    Context and Problem Statement
    We want to generate the template automatically
    Considered Options
     Yeoman - proposed by @miwurster. Currently in use in different projects
     Andi-Lo/generator-latex
     LeoColomb/generator-latex
     Jinja2 - recommended by @mfa, also because of
    http://eosrei.net/articles/2015/11/latex-templates-python-and-jinja2-generate-pdfs
     Cheetah - recommended at tex.stackexchange.com/q/41875/9075
     Apache Velocity - recommended by http://tex-talk.net/2012/03/generating-latex-code-
    with-a-template-engine
     lualatex - recommended by @Stefan-Kottwitz at http://tex-
    talk.net/2012/03/generating-latex-code-with-a-template-engine/#comment-231
    Decision Outcome
    Chosen option: “Yeoman”, because it seems to be the most easy to use generator.

    View Slide

  24. 25
    Templates for README.md
    README.en.md README.de.md
    Template syntax:
    https://ejs.co/

    View Slide

  25. 26
    Template for main.tex

    View Slide

  26. 27
    Template: cleveref.en.preamble.tex

    View Slide

  27. 28
    Template: figure.en.example.tex

    View Slide

  28. 29
    Questions: Listed in index.js

    View Slide

  29. 30
    Result: main.tex

    View Slide

  30. 31
    Summary and Outlook

    View Slide

  31. 32
    Roles and Artifacts of Proposed Solution
    microtype
    hyperref
    cmap
    selnolig
    babel
    hypcap
    LNCS
    IEEE
    Master Thesis
    Dissertation
    main.tex
    README.md
    .latexmkrc
    .gitignore
    package expert
    tooling expert
    template expert content expert
    latexmk

    View Slide

  32. 33
    Summary and Outlook
    https://github.com/latextemplates/generator-latex-template | https://github.com/koppor/

    View Slide

  33. 34
    Summary and Outlook
    https://github.com/latextemplates/generator-latex-template | https://github.com/koppor/
    • First MVP
    • Release on npm
    • Support
    • LNCS
    • IEEE
    • LNI
    • Dissertation
    • Scientific Thesis Template

    View Slide