Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using pstricks to highlight by boxing or circling replacement text in my math equations. But, I don't want this highlighting to occlude what's behind it. So, I've been setting opacity or strokeopacity to accomplish this. Everything seemed to be working as I wanted it to until I started trying to connect the nodes. Then where the arrows and connects and boxes overlapped, I got annoying additive side effects from the opacity. What really surprised me was to learn that arrows and their lines are treated as two separated objects by pstricks.

Anyway, does anyone know a way around this? I'm open to any suggestions. I know pratically nothing about tikz: really only enough to make myself constantly frustrated. Nevertheless, I am open to tikz solutions too.

Here is my MWE:

\documentclass{article}
\usepackage{amsmath}
\usepackage{pst-node}
\pagestyle{empty}
\begin{document}
    \newcommand{\myboxn}[3][red!60]{%
            \rnode{#2}{\psframebox[boxsep=false,
                                   framesep=0.5pt,
                                   linewidth=3pt,
                                   strokeopacity=0.4,
                                   linecolor=#1]{#3}}}
    \begin{align*}
         \sqrt{2} - 1   & = \frac{1}{\sqrt{2}+1}                                   \\[2ex]
         \sqrt{2} - 1   & = \dfrac{1}{2 + \myboxn{A}{\sqrt{2}-1}}                  \\[2ex]
         \sqrt{2} - 1   & = \dfrac{1}{2 + \myboxn{B}{\dfrac{1}{2+\sqrt{2}-1}}}    
    \end{align*}

    \ncline[arrows=-D>,
            linecolor=red,
            linewidth=3pt,
            arrowscale=1.25,
            strokeopacity=.40]{A}{B}


\end{document}

By the way, I know I can set the parameters using \psset{...} but in the actually document, there is a lot going on with different different styles. So, I'd prefer to stick to passing the parameters individually to \ncline etc.

enter image description here

share|improve this question
    
A pstricks solution would definitely be my preference. At least that way I would learn it better. –  azetina Dec 11 '12 at 3:56
    
I will offer a bounty of 500! (not 500 factorial). –  I am who I say I am Dec 11 '12 at 14:33
    
create an arrow which doesn't overlap with the line end. –  Herbert Mar 21 '13 at 20:52
    
@Herbert but it's not just the arrow heads. There seem to be a lot of small parts overlapping---even with just the boxes. –  A.Ellett Mar 21 '13 at 20:55
    
@A.Ellett: that is a problem with your viewer. I cannot see it with Okular 0.15.5 under Linux –  Herbert Mar 21 '13 at 21:01
show 3 more comments

1 Answer

use arrowinset=0, in the settings:

enter image description here

share|improve this answer
1  
I still see overlapping pieces with an additive effect to the hue. –  A.Ellett Mar 21 '13 at 21:12
    
OK. So the rectangles are better. That had to have been a LaTeX issue (I updated LaTeX between now and when I originally posted this question). But that still leaves a question about how to find the arrow. –  A.Ellett Mar 21 '13 at 21:15
1  
@A.Ellett: I'll have a look at weekend to create another arrow. –  Herbert Mar 21 '13 at 21:16
    
@A.Ellett: already done, I forgot about the arrowinset option. see new image –  Herbert Mar 21 '13 at 21:28
    
I hadn't thought about that. But the problem with that approach is that I'll have inconsistent arrows---however, that's just a minor complaint. Still, how to correct the overlapping with the squares remains. –  A.Ellett Mar 21 '13 at 21:41
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.