Math & ScienceExtended Vector Arrow

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
tommytex
Posts: 39
Joined: Wed Jan 23, 2013 10:04 pm

Extended Vector Arrow

Post by tommytex »

thank you cgnieder!

i really like this ;)
at least for me it is a beautiful vector arrow...
i changed the numbers a bit but generally your code does the job!

Code: Select all

% changed definition:
\makeatletter
\def\overvect@#1#2#3{\vbox{\ialign{##\crcr%
 \noalign{\kern.4pt\nointerlineskip}#1#2\crcr%
 \noalign{\kern1.5pt\nointerlineskip}$\m@th\hfil#2#3\hfil$\crcr}}}
\makeatother
Attachments
arrows.png
arrows.png (63.39 KiB) Viewed 8730 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Extended Vector Arrow

Post by cgnieder »

Glad I could be of help :)

BTW: your picture nicely shows a reason for the default values: the raised arrow destroys the leading when it is used inline.

Regards
site moderator & package author
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Extended Vector Arrow

Post by ghostanime2001 »

Actually, what about having harpoon arrows with single pointed side rather than double pointed arrow ? cgnieder: how would one retain leading if the vector arrow is chosen to be the modified vertically shifted one ?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Extended Vector Arrow

Post by cgnieder »

ghostanime2001 wrote:how would one retain leading if the vector arrow is chosen to be the modified vertically shifted one ?
You can't, at least not in a satisfying way. These are choices:
  • Don't modify the arrow position and retain the leading
  • Modify the arrow position like we did and live with the fact that the vector then is to large for inline uses
  • modify the height of the arrow in a way that it overlaps with the space above; this might work in many cases but could also overlap with letters from the line above...
Regards
site moderator & package author
User avatar
tommytex
Posts: 39
Joined: Wed Jan 23, 2013 10:04 pm

Re: Extended Vector Arrow

Post by tommytex »

well there is one other method:

make the letters under the arrow be smaller than normal size and put the arrow on top...this might work quite well i suppose.... :ugeek:
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Extended Vector Arrow

Post by ghostanime2001 »

What about the overlap of the vector arrow? using adobe reader & adobe acrobat I see a overlap or thickened region in the middle of the arrow. How do you make it one, continuous line?
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Extended Vector Arrow

Post by ghostanime2001 »

any ideas?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Extended Vector Arrow

Post by Johannes_B »

Dumb question, but: Did you try another reader? or another zoomlevel? Or did you actually print the page and examined the example?

Sometimes pdf-viewers just do a bad job.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Extended Vector Arrow

Post by ghostanime2001 »

You can look here. I'm sure it's not a viewer issue, I have tried several PDF viewers.
Post Reply