Support repeat/logic control for `newcommand` extension
Open
Nobody has claimed this yet.
Feature Request
Good first contribution
- Dominant language
- JavaScript
- Stars
- 10.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
I want to simulate some commands which supported by amsmath package, but without logic control, it won't be possible, so I wonder is there any way to do this, or will you add this feature?
Syntax might like this:
\newcommand\hdotsfor[1]{%
\foreach \index in {1, ..., #1} {%
\ifnum\index!=1{$} \cdots %
}}
Invoke \hdotsfor{3} will get:
$$
\cdots & \cdots & \cdots
$$
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the newcommand extension and the requested repeat/logic syntax, including the foreach and ifnum example. Done means newcommand definitions can express the shown control flow and invoking hdotsfor{3} produces the expected repeated dots.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100