Add \seq macro for tight R-style colon ranges - #72
Merged
Merged
Conversation
Owner
Author
|
Working on this — paws off until I'm done. |
Contributor
There was a problem hiding this comment.
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
\seqmacro definition adjacent to existing range-related macros inmacros.qmd. - Add the corresponding
\seqinterpretation row ininterpretations.tsvto keepmacros-table.qmdrendering 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. |
Owner
Author
|
Merged. |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
\seqmacro so index sets can render a tight, unspaced colon range like1:ninstead 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.qmdstays a flat, comment-free definition list per CONTRIBUTING.md.interpretations.tsv: matching row (required — themacros-table.qmdbuild fails on any macro lacking an interpretation).Usage
$i \in \set{\seq{1}{n}}$rendersi ∈ {1:n}with a tight colon.Testing
The bcs conda R env here lacks knitr/rmarkdown, so a full
quarto rendercan't run locally — CI (preview/publish) covers it. I did validate the exact R parsing logic frommacros-table.qmdagainst the edited files: all 638 macros parse and none are missing an interpretation, and\seqparses to 2 args with its interpretation.🤖 Generated with Claude Code