From 02a8e9e4557b995b87bfac93d5b964668ebc2031 Mon Sep 17 00:00:00 2001 From: aslmx Date: Mon, 14 Mar 2022 19:06:33 +0100 Subject: [PATCH] =?UTF-8?q?Acronym=20Plurals=20+=20kurze=20Doku=20f=C3=BCr?= =?UTF-8?q?=20Acronyms=20in=20README.md=20=20(#52)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Acronym Plurals + kurze Doku für Acronyms in README.md (to be improved allerdings) * Acronym Plurals + kurze Doku für Acronyms in README.md (to be improved allerdings) * Update wbh.tex accept @kreativmonkey s suggestion to use longplural and keep shortplural optional. Co-authored-by: sebbo --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ wbh.tex | 7 +++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index debbecd..9e38037 100644 --- a/README.md +++ b/README.md @@ -182,8 +182,49 @@ Da zuerst die erste Seite des PDFs ausgefüllt wird, muss der Rest des Formulars Es wird entweder das Logo oder der Name der Hochschule auf dem Titelblatt ausgegeben, jedoch nicht beides. Sollte beides gesetzt sein, so wird gar nichts ausgegeben. +### Abkürzungen / Acronyms + +Beispiel für `acronyms.yaml` + + +``` +acronym: + longest: 3gpp + list: + - id: 3gpp + short: 3GPP + long: 3rd Generation Partnership Project + - id: bss + short: BSS + long: Base Station Subsystem + - id: imsi + short: IMSI + shortplural: IMSIs + long: International Mobile Subscriber Identity + longplural: International Mobile Subscriber Identities +``` + +Verwendung im Markdown dann mit + +``` +\acl{3gpp} %% Lang +\acs{3gpp} %% Kurz +\acp{imsi} %% Lang Plural +\acsp{3gpp} %% Kurz Plural + +``` + +Bei den Pluralen ist zu beachten, dass wenn kein Plural definiert ist (siehe `acronyms.yaml` Beispiel), dass einfach ein "s" angehangen wird. + +Für mehr Info über Acronyme, siehe [Dokumentation LaTeX acronym Package](https://mirror.clientvps.com/CTAN/macros/latex/contrib/acronym/acronym.pdf) + + ## ToDo - [ ] Codeblock mit Linenumbers - [ ] Installationsanleitung +- [ ] `metadata.yaml` +- [ ] `defaults.yaml` + + diff --git a/wbh.tex b/wbh.tex index 03910bf..34163c5 100644 --- a/wbh.tex +++ b/wbh.tex @@ -569,10 +569,13 @@ $if(acronym)$ \section*{Abkürzungsverzeichnis} \addcontentsline{toc}{section}{Abkürzungsverzeichnis} -\begin{acronym}[$acronym.longest$] % längste Abkürzung steht in eckigen Klammern - %\setlength{\itemsep}{-\parsep} % geringerer Zeilenabstand +\begin{acronym}[$acronym.longest$] % längste Abkürzung steht in eckigen Klammern + %\setlength{\itemsep}{-\parsep} % geringerer Zeilenabstand $for(acronym.list)$ \acro{$it.id$}[$it.short$]{$it.long$} + $if(it.longplural)$ + \acro{$it.id$}[$if(it.shortplural)$$it.shortplural$$else$$it.short$$endif$]{$it.longplural$} + $endif$ $endfor$ \end{acronym} \pagebreak