slds-lmu / teaching_devops_issues

Meta-repo for teaching infrastructure issues
0 stars 0 forks source link

Slides with and without margins #13

Closed jemus42 closed 1 year ago

jemus42 commented 1 year ago

Goal

Current status

Plan

The previous adaptive solution from I2ML is implemented in the lmu-lecture.sty file and controlled via the Makefile for the slides, see also this section of the .sty file.

Unless we can figure out a better solution[^1] I propose to take the previous implementation and flip the logic such that compiling with margins is the default, and make nomargin or something like that can be used locally to compile the other version.

[^1]: The implementation hinges on the creation and detection of a dummy .tex file, which is not necessarily robust but presumably one of the least arcane options when it comes to pretending that LaTeX or latexmk are designed for humans. I would have preferred some argument to be passed to latexmk to set a flag or something along those lines but so far have not come up with anything more promising.

Additional complexity: slides/all

slides-pdf contains the PDF files as they will be included on the website, and these are the files that are typically aggregated in slides/all/ with an additional .tex file that then creates an "all the slides" PDF file which is distributed to students. These should most likely all be 4:3 since students maybe don't need the extra margin with the logo. The current version in e.g. I2ML does not quite look nice with the margin version because the first slide has the logo centered and an additional logo in the margin to the right. It's not terrible, but not great.

The 16:9 versions are required for video recordings though.

I would very much like to not store both versions of the slides in slides-pdf, because PDFs in git is bad enough (cloning i2ml takes a while), but also because of the added complexity. I wish we could move the final PDFs to some external storage location but I guess that's just another layer of complexity to manage.

@lisa-wm @mb706 please let me know if you have additional input, or something I overlooked maybe.

jemus42 commented 1 year ago

As for the "how to render both versions": I'm starting to lean towards a version where a script just runs both versions, and the "layout switch" is accomplished by changing a symlink in style, something like:

style
├── color
├── common.tex
├── lmu-lecture-nomargin.sty
├── lmu-lecture-margin.sty
├── lmu-lecture.sty -> lmu-lecture-margin.sty (symlink to either version)
├── logo.pdf
├── preamble.tex
...

Benefit: No changes to Makefiles etc. would be needed, you'd just need to flip that switch once and then everything else still works. Downside would be that it's maybe not as transparent. Also, unless we modularize the .sty file appropriately or add an additional .sty file that only contains the layout definition, we'd duplicate most of the .sty file which of course is not great.

jemus42 commented 1 year ago

Should be addressed now in i2ml and the relevant changes are collected in the service repo.

No perfect solution for doing both versions on overleaf but oh well.