-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hey,
firstly, thank you for creating this package! I've used it now for quite a bit and it worked really well :)
I do, however, think that the way that the user is required to provide info for the title-sub-parameter in the tudaexercise template is quite confusing. The documentation for title-sub.submission() and title-sub.excercise() is only found in the source code and therefore quite inaccessible for anyone, who does not want to change anything in the template. Also, the way the implementation is at the moment, it's difficult to extend and adapt the code, e.g. for a unified language handling system for all templates (which I am going to open another Issue & PR for shortly).
In short, I get why the implementation is how it is, but I want to suggest a more user-friendly implementation of differentiation between "exercise" and "submission" as laid out in the following:
- Remove parameter
title-sub - The user can switch between exercise template "exercise" and "submission" via a top level parameter of
tudaexercise - Predefined fields (
term,date,sheet,group,tutor,lecturer) are all provided via theinfodictionary. Logic can then select the needed predefined fields depending on the type of exercise (submissionorexercise) - Any custom additional fields should also be specified by the user in
infobut using string notation. - To allow for customization of the previous
title-sublayout, introduce new parameterinfo-layout. Here, keys specified ininfocan be assigned toleftorrightby adding the key to the respective array.
#show: tudaexercise.with(
type: "exercise" // Choose between "exercise" and "submission"
language: "en",
info: (
title: "Usage of TUDaExercise",
subtitle: "A small guide.",
author: (("Andreas", "129219"), "Dennis"),
term: "Summer semester 2021",
date: datetime.today(),
sheet: 5,
group: 1,
tutor: "Dr. John Smith",
lecturer: "Prof. Dr. Jane Doe",
"A custom key": "A custom value",
),
info-layout: (
left: ("term", "date", "sheet", "group"),
right: ("tutor", "lecturer", "A custom key"),
),
logo: image("logos/tuda_logo_replace.svg"),
design: (
accentcolor: "0b",
colorback: true,
darkmode: false,
),
task-prefix: none,
)Please let me know what you think about that suggestion. I will open a PR soon.