[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

\arrow markup command

From: Simon Albrecht
Subject: \arrow markup command
Date: Fri, 23 Dec 2016 22:34:34 +0100


I have just been annoyed by the fact that it takes four commands (\combine, \arrow-head, \override, and \draw-line) to draw an acceptable arrow-head (\override is to match the thickness of the line to the Feta glyph), so I proceeded to code an \arrow markup command simplifying the use.

Find the code with an example attached.

I will put it up for review as normal, but I want to ask one design question first:

It struck me as simplest to have this function supersede the \arrow-head function. I didn’t fully carry that out in the example, but I think the use cases for printing a single arrow-head are much fewer than for printing a complete arrow, and there are already so many markup functions around, that I think it would be better to have only one function. [1]

Though this actually raises a second question: Why does the Feta font have one glyph for each of the 4 directions in which an arrow head generated with \arrow-head can point? Why not simply rotate one glyph in the first place? (I’m sure the Metafont code does just that, though it would strike me more logical to do it on a ‘higher’ level.)

Best, Simon

[1] One could probably write a convert-ly rule as well (sorry, I can’t, not knowing Python), though such a rule would have to compute a rotation angle from the axis and dir properties:

axis 0/X  dir 1/RIGHT  ->  ang 0
axis 0/X  dir -1/LEFT  ->  ang 180
axis 1/Y  dir 1/UP     ->  ang 90
axis 1/Y  dir -1/DOWN  ->  ang -90

Description: Text Data

Attachment: arrow.preview.png
Description: PNG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]