Skip to content

Define a capitalized command for each acronym - #16

Merged
roytsmart merged 1 commit into
mainfrom
acronym-capitalized
Aug 18, 2026
Merged

Define a capitalized command for each acronym#16
roytsmart merged 1 commit into
mainfrom
acronym-capitalized

Conversation

@roytsmart

Copy link
Copy Markdown
Contributor

Problem

Instrument names usually carry an article. Writing one into the acronym, as aastex.Acronym("MUSE", "the Multi-slit Solar Explorer"), reads correctly in the middle of a sentence but produces a lowercase "the" when a sentence opens with the acronym.

This is live in the ESIS instrument paper, which currently renders:

... stepping the slit across the target. Interface Region Imaging Spectrograph (IRIS) (B. De Pontieu et al. 2014) ...

Changes

The underlying acronym package already provides \Ac, the capitalized counterpart of \ac, which expands with a capital on first use and abbreviates afterwards. Each acronym now also defines \<name>Capital, and \<name>Capitals where plural forms are requested:

\MUSE          first use -> "the Multi-slit Solar Explorer (MUSE)"   later -> "MUSE"
\MUSECapital   first use -> "The Multi-slit Solar Explorer (MUSE)"   later -> "MUSE"

That removes the need to define a second acronym by hand for the title-cased form, which is how this has been worked around in ccd-noise-paper.

The class and its fields also gain documentation, including the convention of writing the article into the expanded name.

Testing

A test asserts the commands are defined for every parametrized acronym, and a second compiles a document and checks the rendered text, since the point of the change is what appears on the page: "The Multi-slit Solar Explorer (MUSE)" on first use and "MUSE again" after. Suite: 136 passing, coverage 100%.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BYjDL98znSud1yFh9chnkP

An instrument is usually named with an article, "the Multi-slit Solar
Explorer", so writing the article into the acronym reads correctly
mid-sentence but gives a lowercase "the" when a sentence opens with it.

The `acronym` package already solves this with `\Ac`, which capitalizes
the expansion, so each acronym now also defines `\<name>Capital` and,
where plural forms are asked for, `\<name>Capitals`. This replaces
defining a second acronym by hand for the title-cased form.

Also documents the class and its fields, including the convention of
writing the article into the expanded name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BYjDL98znSud1yFh9chnkP
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bf3184b) to head (3c7815c).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          673       702   +29     
=========================================
+ Hits           673       702   +29     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roytsmart
roytsmart merged commit a4b6eb6 into main Aug 18, 2026
16 checks passed
@roytsmart
roytsmart deleted the acronym-capitalized branch August 18, 2026 23:25
roytsmart added a commit to esis-mission/esis-instrument-paper that referenced this pull request Aug 18, 2026
An instrument is named with an article, so "the" now belongs to the
acronym rather than the prose, for the nine instruments and missions
the text currently names. Ordinary terms such as "extreme ultraviolet"
are left alone, since they take no article.

Sentences which open with an acronym use the capitalized command added
in sun-data/aastex#16, so the article is raised. The introduction
previously rendered "... across the target. Interface Region Imaging
Spectrograph (IRIS) ...".

Two places needed rewording rather than a macro change: "The \ESIS\ was
designed" would have doubled the article, and so would "the recently
flown \SNIFS", which now reads "and \SNIFS, flown in 2025,".


Claude-Session: https://claude.ai/code/session_01BYjDL98znSud1yFh9chnkP

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant