quarto-journals / acm

Quarto template for the Association of Computing Machinery
https://quarto-journals.github.io/acm/
MIT License
16 stars 9 forks source link

Provide an option to select different acm styles #11

Open AlarithUhde opened 1 year ago

AlarithUhde commented 1 year ago

The current template uses the "manuscript" format, which cannot be changed through an option if I understand it correctly. The relevant code is in the first line of this file:

\documentclass[manuscript,screen$if(acm-metadata.final)$$else$,review$endif$$if(acm-metadata.anonymous)$,anonymous$endif$]{acmart}

It would be nice to have an option to switch between formats during editing, for example to test the positioning and layout of tables and figures that are meant for only one column in a two-column format. This also helps to better estimate the final page length.

A quick solution like this seems to work, but it just piggybacks on the "final" option and only offers sigconf as the alternative:

\documentclass[sigconf$if(acm-metadata.final)$$else$manuscript$endif$,screen$if(acm-metadata.final)$$else$,review$endif$$if(acm-metadata.anonymous)$,anonymous$endif$]{acmart}

cscheid commented 1 year ago

You're right, we should do better with this. I don't want to change the behavior we have now, but I think we can achieve what you want with an escape hatch option, which should probably have been there to begin with. So what about:

\documentclass[$if(acm-metadata.acmart-options)$$acm-metadata.acmart-options$$else$manuscript,screen$if(acm-metadata.final)$$else$,review$endif$$if(acm-metadata.anonymous)$,anonymous$endif$$endif$]{acmart}

Specifically, this will use acmart-options and override all options if it exists, and revert to the current processing if it doesn't. That would solve your use case, right?

AlarithUhde commented 1 year ago

Yes, this looks good and works on my end. I have created a pull request (I hope that is the way to do this?), that also includes a comment with an example in the quarto template.

Thanks again, this works wonderfully otherwise!