Skip to content

chemistry: recognize the state "(ac)" (aqueous in Spanish and Portuguese) - #1166

Open
pablgonz wants to merge 1 commit into
daisy:mainfrom
pablgonz:chem-ac
Open

pablgonz wants to merge 1 commit into
daisy:mainfrom
pablgonz:chem-ac

Conversation

@pablgonz

@pablgonz pablgonz commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #971.

In Spanish and Portuguese the aqueous state is written "(ac)" (acuoso, aquoso). MathCAT only knew "(aq)" and "(eau)":

<math><mi>H</mi><mi>Cl</mi><mo>(</mo><mi>ac</mi><mo>)</mo></math>
  • Before: h, c l, open paren ac close paren
  • After: h, c l, aqueous (es: acuoso, pt: aquoso)

Changes:

  • src/chemistry.rs: "ac" is accepted wherever "aq" is (the split form ( a c ) and the two state checks).
  • Rules/Intent/general.yaml: "ac" added to the chemistry-state rule.
  • Tests ferric_chloride_ac and hydrochloric_acid_split_ac in tests/Languages/en/chemistry.rs.

Non-chemistry input is not changed: b(ac) is still read as b, open paren a c close paren. cargo test and cargo clippy --tests pass.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor
Linux library size: 0.61 MiB (0.00%)
Revision Release liblibmathcat.so
Base (fcc2f04) 0.61 MiB (635,928 bytes)
PR (3c580a2) 0.61 MiB (635,928 bytes)
Change 0 bytes (0.00%)

Built with default features, Rust 1.96.0, and Ubuntu 24.04. Workflow run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Chemistry: recognize the state "(ac)" (Spanish/Portuguese for aqueous)

1 participant