Trouble with psfrag and Mathematica's eps-images
up vote
1
down vote
favorite
My system: Windows10, MikTeX2.9, WinEdt10.2
I am preparing/updating a set of lecture notes. I ran into the following issue with psfrag. The relevant source snippet:
begin{figure}[ht]
psfrag{X}{$x$}
psfrag{Y}{$y$}
psfrag{A}{$dA_1$}
psfrag{B}{$dA_2$}
psfrag{dr}{$dr$}
psfrag{df}{$dphi$}
psfrag{r1df}{$r_1,dphi$}
psfrag{r2df}{$r_2,dphi$}
begin{center}
includegraphics[width=240pt]{PolarPlaneElement.eps}
caption{Samanmittaiset napakoordinaattien vaihteluvälit vastaavat pinta-alkion
sijainnista riippuen erikokoisia tasoalueita}
label{PolarPlaneElement}
end{center}
end{figure}
I generated the imagefile PolarPlaneElement.eps with Mathematica.
The problem is with substitutions of strings "A" and "B". My theory is that
the problems are related to the fact that in the PostScript image all the other strings are on white background, but these two troublemakers are on
a (monocolored) pink background. Initially I used more descriptive strings
"dA1" and "dA2" instead of the single letter "A" and "B". Switching to single letter strings as instructed here
did help matters, but a problem remains:
While I can get the substituted $dA_1$ to show in the final product, the
original "A" still shows also. In other words, the relevant TeX-formula was added, but the string it was to replace was not removed!
My current test results:
- If I remove the pink coloring from the eps-image, everything works as expected. Either with "A/B" or "dA1/dA2"
- If I use the longer strings "dA1", "dA2" on a pink background, then nothing is replaced.
- A nearly identical psfrag substitution on monocolored background has worked for me in the past. That was on a powerdot slide set. I can't think
of any key differences in the two images. The successful substitution
was more or less identical. May be the difference was that in a slide the
image was scaled differently?
I will keep trying things. Next on the list is to check whether the ordering
of various parts of the image that Mathematica puts together to produce the eps-file will have an effect on psfrag's ability to ID the string within the eps-file. I will post my findings here.
Is this a known bug/difficulty/feature? Can you suggest other things I could try?
Here is the offending eps file.
More testing:
- When I let Mathematica generate the eps-file the order of the
components seems to matter. My latest idea was to make the text
components of the image to be the last ones on the list. The outcome
was that psfrag could not do any substitutions at all. Having the
text components earlier in the list lead to the "doubled" strings of
which one was replaced, as observed by commenters. - I did more testing with the earlier version of the working image (from 2 years ago). Viewing that older eps in Ghostview gave me a surprise - the text on the pink background was nowhere to be seen! When I recreated that eps file with my current Mathematica,
the same problem appeared with that image also. I have upgraded my Mathematica from version 9 to version 11 in the interim. I view this as evidence that something has changed at Wolfram's end. I will ask at Mathematica.SE, and report here in case somebody else runs into the same problem, no solutions offered there, yet.
Meanwhile, this eps looks like after psfrag has done its magic. See the ghost "A" showing through in the part shown through TeXWorks magnifying glass.
Currently my best attempt is to make Mathematica print those pieces of text using white characters!! When drawn in white the "doubled" graphical outline of the letters won't show. It is still a mystery to me as to why this problem is present only with those pieces of text on colored background, and why it does not apply to all of them. I suspect this is part of the reason - Wolfram made some changes when "up"grading from version 9.
It seems "clear" to me that this problem is due to Wolfram trying to "fix" something that was not broken :-(
psfrag
|
show 4 more comments
up vote
1
down vote
favorite
My system: Windows10, MikTeX2.9, WinEdt10.2
I am preparing/updating a set of lecture notes. I ran into the following issue with psfrag. The relevant source snippet:
begin{figure}[ht]
psfrag{X}{$x$}
psfrag{Y}{$y$}
psfrag{A}{$dA_1$}
psfrag{B}{$dA_2$}
psfrag{dr}{$dr$}
psfrag{df}{$dphi$}
psfrag{r1df}{$r_1,dphi$}
psfrag{r2df}{$r_2,dphi$}
begin{center}
includegraphics[width=240pt]{PolarPlaneElement.eps}
caption{Samanmittaiset napakoordinaattien vaihteluvälit vastaavat pinta-alkion
sijainnista riippuen erikokoisia tasoalueita}
label{PolarPlaneElement}
end{center}
end{figure}
I generated the imagefile PolarPlaneElement.eps with Mathematica.
The problem is with substitutions of strings "A" and "B". My theory is that
the problems are related to the fact that in the PostScript image all the other strings are on white background, but these two troublemakers are on
a (monocolored) pink background. Initially I used more descriptive strings
"dA1" and "dA2" instead of the single letter "A" and "B". Switching to single letter strings as instructed here
did help matters, but a problem remains:
While I can get the substituted $dA_1$ to show in the final product, the
original "A" still shows also. In other words, the relevant TeX-formula was added, but the string it was to replace was not removed!
My current test results:
- If I remove the pink coloring from the eps-image, everything works as expected. Either with "A/B" or "dA1/dA2"
- If I use the longer strings "dA1", "dA2" on a pink background, then nothing is replaced.
- A nearly identical psfrag substitution on monocolored background has worked for me in the past. That was on a powerdot slide set. I can't think
of any key differences in the two images. The successful substitution
was more or less identical. May be the difference was that in a slide the
image was scaled differently?
I will keep trying things. Next on the list is to check whether the ordering
of various parts of the image that Mathematica puts together to produce the eps-file will have an effect on psfrag's ability to ID the string within the eps-file. I will post my findings here.
Is this a known bug/difficulty/feature? Can you suggest other things I could try?
Here is the offending eps file.
More testing:
- When I let Mathematica generate the eps-file the order of the
components seems to matter. My latest idea was to make the text
components of the image to be the last ones on the list. The outcome
was that psfrag could not do any substitutions at all. Having the
text components earlier in the list lead to the "doubled" strings of
which one was replaced, as observed by commenters. - I did more testing with the earlier version of the working image (from 2 years ago). Viewing that older eps in Ghostview gave me a surprise - the text on the pink background was nowhere to be seen! When I recreated that eps file with my current Mathematica,
the same problem appeared with that image also. I have upgraded my Mathematica from version 9 to version 11 in the interim. I view this as evidence that something has changed at Wolfram's end. I will ask at Mathematica.SE, and report here in case somebody else runs into the same problem, no solutions offered there, yet.
Meanwhile, this eps looks like after psfrag has done its magic. See the ghost "A" showing through in the part shown through TeXWorks magnifying glass.
Currently my best attempt is to make Mathematica print those pieces of text using white characters!! When drawn in white the "doubled" graphical outline of the letters won't show. It is still a mystery to me as to why this problem is present only with those pieces of text on colored background, and why it does not apply to all of them. I suspect this is part of the reason - Wolfram made some changes when "up"grading from version 9.
It seems "clear" to me that this problem is due to Wolfram trying to "fix" something that was not broken :-(
psfrag
We need to see that exact eps. I've never seen colors being relevant to psfrac only the exact string (som systems not even have the string in the eps, only an outline path, others break up the string, similar to kerning)
– daleif
Jul 27 at 13:20
@daleif Thanks for your interest. Exactly what do you want to see about the eps-file? Should I upload it on my homepage, and post a link here?
– Jyrki Lahtonen
Jul 27 at 13:31
We need the exact file so we can test your mwe. So upload it somewhere
– daleif
Jul 27 at 13:32
2
You seem to have two "A" in your picture: one text string, which psfrag can replace but also one version on top which is inserted as a outline path or a cut out in the pink color and so stays.
– Ulrike Fischer
Jul 27 at 14:06
Thanks @UlrikeFischer. That is a probable cause. I need to study the details of Mathematica's esp-conversion. I would also welcome that as an answer.
– Jyrki Lahtonen
Jul 27 at 14:45
|
show 4 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
My system: Windows10, MikTeX2.9, WinEdt10.2
I am preparing/updating a set of lecture notes. I ran into the following issue with psfrag. The relevant source snippet:
begin{figure}[ht]
psfrag{X}{$x$}
psfrag{Y}{$y$}
psfrag{A}{$dA_1$}
psfrag{B}{$dA_2$}
psfrag{dr}{$dr$}
psfrag{df}{$dphi$}
psfrag{r1df}{$r_1,dphi$}
psfrag{r2df}{$r_2,dphi$}
begin{center}
includegraphics[width=240pt]{PolarPlaneElement.eps}
caption{Samanmittaiset napakoordinaattien vaihteluvälit vastaavat pinta-alkion
sijainnista riippuen erikokoisia tasoalueita}
label{PolarPlaneElement}
end{center}
end{figure}
I generated the imagefile PolarPlaneElement.eps with Mathematica.
The problem is with substitutions of strings "A" and "B". My theory is that
the problems are related to the fact that in the PostScript image all the other strings are on white background, but these two troublemakers are on
a (monocolored) pink background. Initially I used more descriptive strings
"dA1" and "dA2" instead of the single letter "A" and "B". Switching to single letter strings as instructed here
did help matters, but a problem remains:
While I can get the substituted $dA_1$ to show in the final product, the
original "A" still shows also. In other words, the relevant TeX-formula was added, but the string it was to replace was not removed!
My current test results:
- If I remove the pink coloring from the eps-image, everything works as expected. Either with "A/B" or "dA1/dA2"
- If I use the longer strings "dA1", "dA2" on a pink background, then nothing is replaced.
- A nearly identical psfrag substitution on monocolored background has worked for me in the past. That was on a powerdot slide set. I can't think
of any key differences in the two images. The successful substitution
was more or less identical. May be the difference was that in a slide the
image was scaled differently?
I will keep trying things. Next on the list is to check whether the ordering
of various parts of the image that Mathematica puts together to produce the eps-file will have an effect on psfrag's ability to ID the string within the eps-file. I will post my findings here.
Is this a known bug/difficulty/feature? Can you suggest other things I could try?
Here is the offending eps file.
More testing:
- When I let Mathematica generate the eps-file the order of the
components seems to matter. My latest idea was to make the text
components of the image to be the last ones on the list. The outcome
was that psfrag could not do any substitutions at all. Having the
text components earlier in the list lead to the "doubled" strings of
which one was replaced, as observed by commenters. - I did more testing with the earlier version of the working image (from 2 years ago). Viewing that older eps in Ghostview gave me a surprise - the text on the pink background was nowhere to be seen! When I recreated that eps file with my current Mathematica,
the same problem appeared with that image also. I have upgraded my Mathematica from version 9 to version 11 in the interim. I view this as evidence that something has changed at Wolfram's end. I will ask at Mathematica.SE, and report here in case somebody else runs into the same problem, no solutions offered there, yet.
Meanwhile, this eps looks like after psfrag has done its magic. See the ghost "A" showing through in the part shown through TeXWorks magnifying glass.
Currently my best attempt is to make Mathematica print those pieces of text using white characters!! When drawn in white the "doubled" graphical outline of the letters won't show. It is still a mystery to me as to why this problem is present only with those pieces of text on colored background, and why it does not apply to all of them. I suspect this is part of the reason - Wolfram made some changes when "up"grading from version 9.
It seems "clear" to me that this problem is due to Wolfram trying to "fix" something that was not broken :-(
psfrag
My system: Windows10, MikTeX2.9, WinEdt10.2
I am preparing/updating a set of lecture notes. I ran into the following issue with psfrag. The relevant source snippet:
begin{figure}[ht]
psfrag{X}{$x$}
psfrag{Y}{$y$}
psfrag{A}{$dA_1$}
psfrag{B}{$dA_2$}
psfrag{dr}{$dr$}
psfrag{df}{$dphi$}
psfrag{r1df}{$r_1,dphi$}
psfrag{r2df}{$r_2,dphi$}
begin{center}
includegraphics[width=240pt]{PolarPlaneElement.eps}
caption{Samanmittaiset napakoordinaattien vaihteluvälit vastaavat pinta-alkion
sijainnista riippuen erikokoisia tasoalueita}
label{PolarPlaneElement}
end{center}
end{figure}
I generated the imagefile PolarPlaneElement.eps with Mathematica.
The problem is with substitutions of strings "A" and "B". My theory is that
the problems are related to the fact that in the PostScript image all the other strings are on white background, but these two troublemakers are on
a (monocolored) pink background. Initially I used more descriptive strings
"dA1" and "dA2" instead of the single letter "A" and "B". Switching to single letter strings as instructed here
did help matters, but a problem remains:
While I can get the substituted $dA_1$ to show in the final product, the
original "A" still shows also. In other words, the relevant TeX-formula was added, but the string it was to replace was not removed!
My current test results:
- If I remove the pink coloring from the eps-image, everything works as expected. Either with "A/B" or "dA1/dA2"
- If I use the longer strings "dA1", "dA2" on a pink background, then nothing is replaced.
- A nearly identical psfrag substitution on monocolored background has worked for me in the past. That was on a powerdot slide set. I can't think
of any key differences in the two images. The successful substitution
was more or less identical. May be the difference was that in a slide the
image was scaled differently?
I will keep trying things. Next on the list is to check whether the ordering
of various parts of the image that Mathematica puts together to produce the eps-file will have an effect on psfrag's ability to ID the string within the eps-file. I will post my findings here.
Is this a known bug/difficulty/feature? Can you suggest other things I could try?
Here is the offending eps file.
More testing:
- When I let Mathematica generate the eps-file the order of the
components seems to matter. My latest idea was to make the text
components of the image to be the last ones on the list. The outcome
was that psfrag could not do any substitutions at all. Having the
text components earlier in the list lead to the "doubled" strings of
which one was replaced, as observed by commenters. - I did more testing with the earlier version of the working image (from 2 years ago). Viewing that older eps in Ghostview gave me a surprise - the text on the pink background was nowhere to be seen! When I recreated that eps file with my current Mathematica,
the same problem appeared with that image also. I have upgraded my Mathematica from version 9 to version 11 in the interim. I view this as evidence that something has changed at Wolfram's end. I will ask at Mathematica.SE, and report here in case somebody else runs into the same problem, no solutions offered there, yet.
Meanwhile, this eps looks like after psfrag has done its magic. See the ghost "A" showing through in the part shown through TeXWorks magnifying glass.
Currently my best attempt is to make Mathematica print those pieces of text using white characters!! When drawn in white the "doubled" graphical outline of the letters won't show. It is still a mystery to me as to why this problem is present only with those pieces of text on colored background, and why it does not apply to all of them. I suspect this is part of the reason - Wolfram made some changes when "up"grading from version 9.
It seems "clear" to me that this problem is due to Wolfram trying to "fix" something that was not broken :-(
psfrag
psfrag
edited Oct 1 at 5:35
asked Jul 27 at 13:07
Jyrki Lahtonen
348214
348214
We need to see that exact eps. I've never seen colors being relevant to psfrac only the exact string (som systems not even have the string in the eps, only an outline path, others break up the string, similar to kerning)
– daleif
Jul 27 at 13:20
@daleif Thanks for your interest. Exactly what do you want to see about the eps-file? Should I upload it on my homepage, and post a link here?
– Jyrki Lahtonen
Jul 27 at 13:31
We need the exact file so we can test your mwe. So upload it somewhere
– daleif
Jul 27 at 13:32
2
You seem to have two "A" in your picture: one text string, which psfrag can replace but also one version on top which is inserted as a outline path or a cut out in the pink color and so stays.
– Ulrike Fischer
Jul 27 at 14:06
Thanks @UlrikeFischer. That is a probable cause. I need to study the details of Mathematica's esp-conversion. I would also welcome that as an answer.
– Jyrki Lahtonen
Jul 27 at 14:45
|
show 4 more comments
We need to see that exact eps. I've never seen colors being relevant to psfrac only the exact string (som systems not even have the string in the eps, only an outline path, others break up the string, similar to kerning)
– daleif
Jul 27 at 13:20
@daleif Thanks for your interest. Exactly what do you want to see about the eps-file? Should I upload it on my homepage, and post a link here?
– Jyrki Lahtonen
Jul 27 at 13:31
We need the exact file so we can test your mwe. So upload it somewhere
– daleif
Jul 27 at 13:32
2
You seem to have two "A" in your picture: one text string, which psfrag can replace but also one version on top which is inserted as a outline path or a cut out in the pink color and so stays.
– Ulrike Fischer
Jul 27 at 14:06
Thanks @UlrikeFischer. That is a probable cause. I need to study the details of Mathematica's esp-conversion. I would also welcome that as an answer.
– Jyrki Lahtonen
Jul 27 at 14:45
We need to see that exact eps. I've never seen colors being relevant to psfrac only the exact string (som systems not even have the string in the eps, only an outline path, others break up the string, similar to kerning)
– daleif
Jul 27 at 13:20
We need to see that exact eps. I've never seen colors being relevant to psfrac only the exact string (som systems not even have the string in the eps, only an outline path, others break up the string, similar to kerning)
– daleif
Jul 27 at 13:20
@daleif Thanks for your interest. Exactly what do you want to see about the eps-file? Should I upload it on my homepage, and post a link here?
– Jyrki Lahtonen
Jul 27 at 13:31
@daleif Thanks for your interest. Exactly what do you want to see about the eps-file? Should I upload it on my homepage, and post a link here?
– Jyrki Lahtonen
Jul 27 at 13:31
We need the exact file so we can test your mwe. So upload it somewhere
– daleif
Jul 27 at 13:32
We need the exact file so we can test your mwe. So upload it somewhere
– daleif
Jul 27 at 13:32
2
2
You seem to have two "A" in your picture: one text string, which psfrag can replace but also one version on top which is inserted as a outline path or a cut out in the pink color and so stays.
– Ulrike Fischer
Jul 27 at 14:06
You seem to have two "A" in your picture: one text string, which psfrag can replace but also one version on top which is inserted as a outline path or a cut out in the pink color and so stays.
– Ulrike Fischer
Jul 27 at 14:06
Thanks @UlrikeFischer. That is a probable cause. I need to study the details of Mathematica's esp-conversion. I would also welcome that as an answer.
– Jyrki Lahtonen
Jul 27 at 14:45
Thanks @UlrikeFischer. That is a probable cause. I need to study the details of Mathematica's esp-conversion. I would also welcome that as an answer.
– Jyrki Lahtonen
Jul 27 at 14:45
|
show 4 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
Just for the fun of it here is a drawing of this in tikz. I was mainly done by tracing your EPS.
documentclass[tikz]{standalone}
usetikzlibrary{calc}
begin{document}
begin{tikzpicture}
% node[anchor=south west,inner sep=0pt] at (0,0) {includegraphics{PolarPlaneElement}};
begin{scope}[thick,font=footnotesize,line cap=rect]
draw (0,0.4) -- ++(8.8,0) node[right] {$X$};
draw (0.19,0) -- ++(0,7.9) node[above] {$Y$};
coordinate (O) at (0.19,0.4);
% fill (O) circle (1pt);
defangA{20}
defangB{40}
draw (O) -- ++ (angA:9.2);
draw (O) -- ++ (angB:11);
begin{scope}[blue]
defRadius{1.3}
draw ($(O)+(angA:Radius)$) arc [start angle=angA,delta
angle=angB-angA,radius=Radius]
node[pos=0.35,above right=0mm] {$df$}
;
defRadius{2.95}
defRadiusDR{1.5}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (A1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.45,below left=0mm] {$r_1df$}
-- ++ (angB:RadiusDR)
coordinate (A2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(A1)!0.5!(A2)$) {$A$}
;
defRadius{6.6}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (B1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.55,below left=0mm] {$r_2df$}
-- ++ (angB:RadiusDR)
coordinate (B2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(B1)!0.5!(B2)$) {$B$}
;
end{scope}
end{scope}
end{tikzpicture}
end{document}
It can be a lot of fun. And often, when you get stuck, a quick google will lead you so solutions on this site.
– daleif
Jul 30 at 13:47
-1: This has nothing to do with the question.
– Henri Menke
Oct 1 at 5:28
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Just for the fun of it here is a drawing of this in tikz. I was mainly done by tracing your EPS.
documentclass[tikz]{standalone}
usetikzlibrary{calc}
begin{document}
begin{tikzpicture}
% node[anchor=south west,inner sep=0pt] at (0,0) {includegraphics{PolarPlaneElement}};
begin{scope}[thick,font=footnotesize,line cap=rect]
draw (0,0.4) -- ++(8.8,0) node[right] {$X$};
draw (0.19,0) -- ++(0,7.9) node[above] {$Y$};
coordinate (O) at (0.19,0.4);
% fill (O) circle (1pt);
defangA{20}
defangB{40}
draw (O) -- ++ (angA:9.2);
draw (O) -- ++ (angB:11);
begin{scope}[blue]
defRadius{1.3}
draw ($(O)+(angA:Radius)$) arc [start angle=angA,delta
angle=angB-angA,radius=Radius]
node[pos=0.35,above right=0mm] {$df$}
;
defRadius{2.95}
defRadiusDR{1.5}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (A1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.45,below left=0mm] {$r_1df$}
-- ++ (angB:RadiusDR)
coordinate (A2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(A1)!0.5!(A2)$) {$A$}
;
defRadius{6.6}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (B1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.55,below left=0mm] {$r_2df$}
-- ++ (angB:RadiusDR)
coordinate (B2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(B1)!0.5!(B2)$) {$B$}
;
end{scope}
end{scope}
end{tikzpicture}
end{document}
It can be a lot of fun. And often, when you get stuck, a quick google will lead you so solutions on this site.
– daleif
Jul 30 at 13:47
-1: This has nothing to do with the question.
– Henri Menke
Oct 1 at 5:28
add a comment |
up vote
0
down vote
Just for the fun of it here is a drawing of this in tikz. I was mainly done by tracing your EPS.
documentclass[tikz]{standalone}
usetikzlibrary{calc}
begin{document}
begin{tikzpicture}
% node[anchor=south west,inner sep=0pt] at (0,0) {includegraphics{PolarPlaneElement}};
begin{scope}[thick,font=footnotesize,line cap=rect]
draw (0,0.4) -- ++(8.8,0) node[right] {$X$};
draw (0.19,0) -- ++(0,7.9) node[above] {$Y$};
coordinate (O) at (0.19,0.4);
% fill (O) circle (1pt);
defangA{20}
defangB{40}
draw (O) -- ++ (angA:9.2);
draw (O) -- ++ (angB:11);
begin{scope}[blue]
defRadius{1.3}
draw ($(O)+(angA:Radius)$) arc [start angle=angA,delta
angle=angB-angA,radius=Radius]
node[pos=0.35,above right=0mm] {$df$}
;
defRadius{2.95}
defRadiusDR{1.5}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (A1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.45,below left=0mm] {$r_1df$}
-- ++ (angB:RadiusDR)
coordinate (A2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(A1)!0.5!(A2)$) {$A$}
;
defRadius{6.6}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (B1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.55,below left=0mm] {$r_2df$}
-- ++ (angB:RadiusDR)
coordinate (B2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(B1)!0.5!(B2)$) {$B$}
;
end{scope}
end{scope}
end{tikzpicture}
end{document}
It can be a lot of fun. And often, when you get stuck, a quick google will lead you so solutions on this site.
– daleif
Jul 30 at 13:47
-1: This has nothing to do with the question.
– Henri Menke
Oct 1 at 5:28
add a comment |
up vote
0
down vote
up vote
0
down vote
Just for the fun of it here is a drawing of this in tikz. I was mainly done by tracing your EPS.
documentclass[tikz]{standalone}
usetikzlibrary{calc}
begin{document}
begin{tikzpicture}
% node[anchor=south west,inner sep=0pt] at (0,0) {includegraphics{PolarPlaneElement}};
begin{scope}[thick,font=footnotesize,line cap=rect]
draw (0,0.4) -- ++(8.8,0) node[right] {$X$};
draw (0.19,0) -- ++(0,7.9) node[above] {$Y$};
coordinate (O) at (0.19,0.4);
% fill (O) circle (1pt);
defangA{20}
defangB{40}
draw (O) -- ++ (angA:9.2);
draw (O) -- ++ (angB:11);
begin{scope}[blue]
defRadius{1.3}
draw ($(O)+(angA:Radius)$) arc [start angle=angA,delta
angle=angB-angA,radius=Radius]
node[pos=0.35,above right=0mm] {$df$}
;
defRadius{2.95}
defRadiusDR{1.5}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (A1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.45,below left=0mm] {$r_1df$}
-- ++ (angB:RadiusDR)
coordinate (A2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(A1)!0.5!(A2)$) {$A$}
;
defRadius{6.6}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (B1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.55,below left=0mm] {$r_2df$}
-- ++ (angB:RadiusDR)
coordinate (B2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(B1)!0.5!(B2)$) {$B$}
;
end{scope}
end{scope}
end{tikzpicture}
end{document}
Just for the fun of it here is a drawing of this in tikz. I was mainly done by tracing your EPS.
documentclass[tikz]{standalone}
usetikzlibrary{calc}
begin{document}
begin{tikzpicture}
% node[anchor=south west,inner sep=0pt] at (0,0) {includegraphics{PolarPlaneElement}};
begin{scope}[thick,font=footnotesize,line cap=rect]
draw (0,0.4) -- ++(8.8,0) node[right] {$X$};
draw (0.19,0) -- ++(0,7.9) node[above] {$Y$};
coordinate (O) at (0.19,0.4);
% fill (O) circle (1pt);
defangA{20}
defangB{40}
draw (O) -- ++ (angA:9.2);
draw (O) -- ++ (angB:11);
begin{scope}[blue]
defRadius{1.3}
draw ($(O)+(angA:Radius)$) arc [start angle=angA,delta
angle=angB-angA,radius=Radius]
node[pos=0.35,above right=0mm] {$df$}
;
defRadius{2.95}
defRadiusDR{1.5}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (A1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.45,below left=0mm] {$r_1df$}
-- ++ (angB:RadiusDR)
coordinate (A2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(A1)!0.5!(A2)$) {$A$}
;
defRadius{6.6}
draw[fill=pink] ($(O)+(angA:Radius)$)
coordinate (B1)
arc [start angle=angA,delta angle=angB-angA,radius=Radius]
node[pos=0.55,below left=0mm] {$r_2df$}
-- ++ (angB:RadiusDR)
coordinate (B2)
node[pos=0.4,above=0.5mm] {$dr$}
arc [start angle=angB,delta
angle=angA-angB,radius=Radius+RadiusDR]
-- cycle
node at ($(B1)!0.5!(B2)$) {$B$}
;
end{scope}
end{scope}
end{tikzpicture}
end{document}
answered Jul 30 at 13:31
daleif
31.8k252113
31.8k252113
It can be a lot of fun. And often, when you get stuck, a quick google will lead you so solutions on this site.
– daleif
Jul 30 at 13:47
-1: This has nothing to do with the question.
– Henri Menke
Oct 1 at 5:28
add a comment |
It can be a lot of fun. And often, when you get stuck, a quick google will lead you so solutions on this site.
– daleif
Jul 30 at 13:47
-1: This has nothing to do with the question.
– Henri Menke
Oct 1 at 5:28
It can be a lot of fun. And often, when you get stuck, a quick google will lead you so solutions on this site.
– daleif
Jul 30 at 13:47
It can be a lot of fun. And often, when you get stuck, a quick google will lead you so solutions on this site.
– daleif
Jul 30 at 13:47
-1: This has nothing to do with the question.
– Henri Menke
Oct 1 at 5:28
-1: This has nothing to do with the question.
– Henri Menke
Oct 1 at 5:28
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f443431%2ftrouble-with-psfrag-and-mathematicas-eps-images%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
We need to see that exact eps. I've never seen colors being relevant to psfrac only the exact string (som systems not even have the string in the eps, only an outline path, others break up the string, similar to kerning)
– daleif
Jul 27 at 13:20
@daleif Thanks for your interest. Exactly what do you want to see about the eps-file? Should I upload it on my homepage, and post a link here?
– Jyrki Lahtonen
Jul 27 at 13:31
We need the exact file so we can test your mwe. So upload it somewhere
– daleif
Jul 27 at 13:32
2
You seem to have two "A" in your picture: one text string, which psfrag can replace but also one version on top which is inserted as a outline path or a cut out in the pink color and so stays.
– Ulrike Fischer
Jul 27 at 14:06
Thanks @UlrikeFischer. That is a probable cause. I need to study the details of Mathematica's esp-conversion. I would also welcome that as an answer.
– Jyrki Lahtonen
Jul 27 at 14:45