Improve alignment of text nodes in make-cd #68
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.
Currently text nodes in a commutative diagram are vertically aligned on their baseline. This is an intuitive and reasonable default, but unfortunately it results in incorrect behavior when combined with snapping; in particular, there are many cases (depending on the physical height of a piece of math text) where drawing a fully horizontal or fully vertical arrow from one math node to another is impossible to achieve with precision, and instead it snaps to something that is at a strange angle. This problem is solved by setting the vertical alignment to be centered.
I am not sure that this is the actual best solution, but it solved the immediate problem for me. What do you think?
P.S. I have not yet succeeded in building TeXmacs on my machine, so I have just edited this code blindly --- so please don't merge unless you try it out. The way I tested this functionality was to create a new function in my own TeXmacs initialization script and add my own custom menu item for the new function.