Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance inheritance #962

Closed
rpspringuel opened this issue Feb 24, 2016 · 4 comments
Closed

Distance inheritance #962

rpspringuel opened this issue Feb 24, 2016 · 4 comments

Comments

@rpspringuel
Copy link
Contributor

Given the proliferation of circumstantial distances, it might be useful if we set up a system whereby one distance could be specified as inheriting its value from another.

Something like \greinheritdim{bar@virgula@standalone@notext}{bar@virgula@standalone@text} would indicate that the user wants bar@virgula@standalone@text to inherit the value of bar@virgula@standalone@notext so changes to the latter would effect the former.

This could also be implemented as a feature of \grechangedim but the third argument (scalable or fixed) becomes redundant in this case. Perhaps it would be better if that argument was made optional if we decide to go that route.

@rpspringuel rpspringuel added this to the 5.0 milestone Feb 24, 2016
@henryso
Copy link
Contributor

henryso commented Feb 24, 2016

How about \grechangedim{bar@virgula@standalone@notext}{bar@virgula@standalone@text}{inherited} ?

@rpspringuel
Copy link
Contributor Author

Hadn't thought of that. The only potential problem I can see is what do we do if a user enters something like: \grechangedim{bar@virgula@standalone@notext}{bar@virgula@standalone@text}{scalable}? Would raising an error be enough?

@henryso
Copy link
Contributor

henryso commented Feb 24, 2016

I think raising an error would be enough in that case. Same with \grechangedim{bar@virgula@standalone@notext}{1 cm}{inherited}; should be an error.

@eroux
Copy link
Contributor

eroux commented Feb 25, 2016

I thought about an inheritance system based on the name (foo@bar would automatically inherit from foo if it exists), but that's just too complex. @henryso 's proposal looks good to me

@rpspringuel rpspringuel modified the milestones: 4.2, 5.0 Mar 3, 2016
@eroux eroux modified the milestones: 5.0, 4.2 Mar 3, 2016
rpspringuel added a commit to rpspringuel/gregorio that referenced this issue Apr 10, 2016
Addresses gregorio-project#962
Adds `inherited` option for third argument in `\grecreatedim` and `\grechangedim`, allowing the user to link one distance to another.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants