Skip to content

Add \seq macro for tight R-style colon ranges - #72

Merged
d-morrison merged 1 commit into
mainfrom
add-seq-macro
Jul 2, 2026
Merged

d-morrison merged 1 commit into
mainfrom
add-seq-macro

Conversation

@d-morrison

Copy link
Copy Markdown
Owner

Summary

Adds a \seq macro so index sets can render a tight, unspaced colon range like 1:n instead of the spaced binary-relation that a bare : produces in math mode.

  • macros.qmd: \providecommand{\seq}[2]{#1{:}#2}, placed next to the range macros (\range/\rangef). No comment added — macros.qmd stays a flat, comment-free definition list per CONTRIBUTING.md.
  • interpretations.tsv: matching row (required — the macros-table.qmd build fails on any macro lacking an interpretation).

Usage

$i \in \set{\seq{1}{n}}$ renders i ∈ {1:n} with a tight colon.

Testing

The bcs conda R env here lacks knitr/rmarkdown, so a full quarto render can't run locally — CI (preview/publish) covers it. I did validate the exact R parsing logic from macros-table.qmd against the edited files: all 638 macros parse and none are missing an interpretation, and \seq parses to 2 args with its interpretation.

🤖 Generated with Claude Code

Add \providecommand{\seq}[2]{#1{:}#2} so index sets can render a
tight, unspaced colon range (1:n) instead of the spaced relation
that a bare : produces in math mode. Also add the required
interpretations.tsv entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 2, 2026 19:27
@d-morrison

Copy link
Copy Markdown
Owner Author

Working on this — paws off until I'm done.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new LaTeX macro for “tight” colon-style index ranges (e.g., 1:n) and wires it into the macro-reference tooling by providing the required interpretation entry.

Changes:

  • Add \seq macro definition adjacent to existing range-related macros in macros.qmd.
  • Add the corresponding \seq interpretation row in interpretations.tsv to keep macros-table.qmd rendering valid.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
macros.qmd Introduces \providecommand{\seq}[2]{#1{:}#2} for tight colon ranges.
interpretations.tsv Adds the required interpretation row for \seq so the macro table build doesn’t fail.

Comment thread macros.qmd
@d-morrison
d-morrison merged commit e7f88b7 into main Jul 2, 2026
5 checks passed
@d-morrison
d-morrison deleted the add-seq-macro branch July 2, 2026 19:32
@d-morrison

Copy link
Copy Markdown
Owner Author

Merged. \seq is now on main; unclaiming.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

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.

2 participants