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

feature request: math expressions in dvisvgm:raw text #130

Closed
agrahn opened this issue Mar 19, 2020 · 3 comments
Closed

feature request: math expressions in dvisvgm:raw text #130

agrahn opened this issue Mar 19, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@agrahn
Copy link

@agrahn agrahn commented Mar 19, 2020

The dvisvgm:raw special accepts a number of macros, such as {?x} and {?y}, that are substituted with appropriate values during DVI to SVG conversion. In some situations, such as transformations of SVG objects, it would be desirable to make simple calculations on the substituted values. Therefore, it would be nice to have a macro {?...} that accepts a mathematical expression to be evaluated and which is substituted with the expression's result in the SVG output. In the expression, it should be possible to use the variables x and y that represent the current location's coordinates.

@mgieseki mgieseki self-assigned this Mar 19, 2020
@mgieseki mgieseki added the feature label Mar 19, 2020
@mgieseki

This comment has been minimized.

Copy link
Owner

@mgieseki mgieseki commented Mar 19, 2020

Thanks for summarizing your feature request here. I've already a working implementation ready but it needs a bit more testing. If it works reliably on my test files, I'll push the changes.

@agrahn

This comment has been minimized.

Copy link
Author

@agrahn agrahn commented Mar 19, 2020

Thank you so much!

@mgieseki mgieseki closed this in 6005e50 Mar 20, 2020
@mgieseki

This comment has been minimized.

Copy link
Owner

@mgieseki mgieseki commented Mar 20, 2020

You're welcome. Even if you've found a direct solution to negate the coordinates, feel free to test the new expression {?(...)}.

@mgieseki mgieseki added this to the 2.9.1 milestone Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.