rchaput / acronyms

Adds support for Acronyms, and List of Acronyms, to Quarto documents.
GNU General Public License v3.0
20 stars 2 forks source link

Allow unnumbered Section #6

Closed jmehringer-iis closed 9 months ago

jmehringer-iis commented 1 year ago

Hi!

I'm having a good time using this template :)

I came across the idea to allow for an unnumbered loa, since I usually don't want it to be included as section with a number.

I found a solution to achieve this by modifying this line https://github.com/rchaput/acronyms/blob/6d6606c6b828095023c6a5af1551a350a6c82abe/_extensions/acronyms/parse-acronyms.lua#L110

to local loa_classes = {'unnumbered'}

maybe there is even a way to allow this option globally - I'm just not too experienced with lua filters yet, so I don't really know how to achieve this.

I will work with my local solution, but wanted to let you know anyway.

Cheers Julius

rchaput commented 1 year ago

I'm glad you enjoy this extension!

Using unnumbered sections is a great idea! (Why didn't I think of this earlier...)

I'm not yet sure how I will implement it; I do not want to create too many global options for each possible situation.

  1. A first solution (without modifying the extension as you did) would be to create the header manually:
---
format:
  pdf:
    number-sections: true
acronyms:
  insert_loa: false
  loa_title: ''
  keys:
    - shortname: RL
      longname: Reinforcement Learning
---

# Introduction

(...)

# List of Acronyms {.unnumbered}

\printacronyms

# Last section

Just to prove the numbering works

This solution already works as-is, so I think I will put it as an example in the documentation.

  1. A second solution would be to add an loa_header_classes option (or something like that...), so it can be used with unnumbered like you did, but also any other class. This would avoid multiplying the number of options if someone else wants another behaviour. This requires a simple modification (very similar to what you did).