7

There seems to be no shortage of questions that ask how to place some symbol (frequently a non-standard arrow) over another symbol. Similarly, many people also want extensible arrows. And as expected, there are many nice solutions out there, but they are usually incomplete (e.g. they don't work in subscripts). The solutions also tend to be only for one of the two major question types: you can have a custom symbol but the solution doesn't deal with extensibility, or you can have an extensible solution but the symbol is not customizable. Additionally, many of the hack solutions have vertical spacing issues that undesirably disrupt interline spacing. For example, a typical recommendation of \overrightarrow{X} looks absolutely horrible inline.

Given how old some of these issues are (even if we restrict ourselves to questions that exist only on tex.stackexchange), it is surprising to me that there is still not a general solution available for users. My feeling toward this is stronger: it just seems wrong.

Anyway, let me link to a few posts to demonstrate what I mean:

  • Dot notation for derivative of a vector:
    This is a nice solution for extensible arrows that does not interrupt interline spacing (so the symbol is not too high above the letter). But note, it uses TikZ to build the arrow (which is perhaps overkill), so you can't make use of existing symbols. The solution also suffers from the fact that it doesn't account for the slant of the letter that is being accented. It also does not work that well for narrow letters, and it does not deal with scriptsize, etc.

  • Dashed left arrow over symbol:
    Another nice solution for a custom, extensible arrow. However, this one is not customizable, doesn't deal with the various mathchoice stuff, and has fairly serious interline spacing issues.

  • How can I make an overset symbol at the same size and height as \bar except with a different symbol?
    One of the better solutions (IMO) for putting an accent over a letter, as it incoprates the slant of the letter. However, the solution is not extensible and unfortunately, it places the vector symbol a bit too high which disrupts interline spacing---and there doesn't appear to be an easy way to adjust the height.

  • Extensible \vec instead of \overrightarrow:
    Another nice, extensible solution for a particular arrow type. The slant of the symbol does not seem to be accounted for. The height of the arrow is good, and does not increase interline spacing. Math styles (subscript, etc) are not supported.

  • Packages esvect and harpoon are nice, but limited.

  • Package extpfeil is really neat for creating customized extensible arrows. You can customize the left, right, and middle portions of the symbol (middle is used to extend). This wouldn't handle swiggles very well, but I'm willing to write off supporting anything like that. Importantly, this package doesn't deal with accenting.

It seems like a potential combination of extpfeil and accents could be quite nice, but I haven't found anything so far. Does anyone have anything that does this?

So I guess I'm just wondering if this is the state-of-the-art? And if so, I'm curious to hear people's thoughts as to why nothing more comprehensive exists...is this too hard of a problem? Not well-specified? Are there other solutions that I should be aware of? Desirable features are:

  • allows the user to customize the accent via a left/right/middle option
  • properly deals with symbol slant, e.g. as in $X$
  • accent is extensible over many symbols (word slant should also be covered)
  • interline spacing is minimally disrupted. the distance above symbol should be customizable with a good default

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.