Math & ScienceOverlapping Line Segments in Vector Arrow

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Overlapping Line Segments in Vector Arrow

Post by ghostanime2001 »

I am using the esvect package and the vector macro \vv which looks like two line segments overlap in the middle. I want to make the vector arrow a smooth, continuous arrow with no overlap in the middle. You can see this if you compile the below code and see the output PDF.

Code: Select all

    \documentclass[fleqn]{article}
    \usepackage[b]{esvect}

    \makeatletter
    \def\vectfill@{\traitfill@\relbaredd\relbareda\fldr}
    %\end{macrocode}
    %Construction of the arrow:
    % \begin{macrocode}
    \def\traitfill@#1#2#3#4{%
    $\m@th\mkern2mu\relax#4#1\mkern-1.5mu%on met \relbaredd au d\’ebut
    \cleaders\hbox{$#4\mkern0mu#2\mkern0mu$}\hfill % remplit avec relbareda
    \mkern-1.5mu#3$%
    }

    \def\overvect@#1#2#3{\vbox{\ialign{##\crcr%
    \noalign{\kern0pt\nointerlineskip}#1#2\crcr%
    \noalign{\kern1.3pt\nointerlineskip}$\m@th\hfil#2#3\hfil$\crcr}}}
    \makeatother

    \begin{document}
    $\vv{x}$
    \end{document}
If you zoom in at 300% of the output PDF, you can see the vector arrow overlap. When opening the output PDF in illustrator CS6, you can see the line segment overlap of the vector arrow by zooming in. I had to merge the two "halves" of the vector arrow together to make it a smooth line. As I progress with my document, I do not want to do this for every vector. The overlapping halves that look like two line segments stacked on top of the each other near the middle are more apparent when I print the output PDF onto paper.

I have included the definition codes under headings "Definition of the characters used to draw the vector" an "Construction of the whole vector" from the esvect package in my preamble. I have changed the vertical shift of the vector arrow to 1.3pt in this line.

Code: Select all

\noalign{\kern1.3pt\nointerlineskip}$\m@th\hfil#2#3\hfil$\crcr}}}
I find it suitable for clarity. To illustrate what I mean all along, please look at the code and the two images.
Attachments
overlapping-arrow-line-segment-illustrator-CS6.png
overlapping-arrow-line-segment-illustrator-CS6.png (6.58 KiB) Viewed 4200 times
overlapping-arrow-line-segment-reader.png
overlapping-arrow-line-segment-reader.png (1.19 KiB) Viewed 4200 times
Last edited by ghostanime2001 on Sun Jun 23, 2013 7:35 pm, edited 2 times in total.

Recommended reading 2024:

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

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

Post Reply