使用 psfrag 根据方程式更改标签

使用 psfrag 根据方程式更改标签

我想改为tag xlabPolygonal vertices $\xi_1$图和tex 如上。

我的身影

%!PS-Adobe-3.0 EPSF-3.0
%%DocumentNeededResources: font Helvetica
%%+ font Helvetica-Bold
%%+ font Helvetica-Oblique
%%+ font Helvetica-BoldOblique
%%+ font Symbol
%%Title: R Graphics Output
%%Creator: R Software
%%Pages: (atend)
%%BoundingBox: 0 0 415 414
%%EndComments
%%BeginProlog
/bp  { gs gs } def
% begin .ps.prolog
/gs  { gsave } bind def
/gr  { grestore } bind def
/ep  { showpage gr gr } bind def
/m   { moveto } bind def
/l  { rlineto } bind def
/np  { newpath } bind def
/cp  { closepath } bind def
/f   { fill } bind def
/o   { stroke } bind def
/c   { newpath 0 360 arc } bind def
/r   { 4 2 roll moveto 1 copy 3 -1 roll exch 0 exch rlineto 0 rlineto -1 mul 0 exch rlineto closepath } bind def
/p1  { stroke } bind def
/p2  { gsave bg fill grestore newpath } bind def
/p3  { gsave bg fill grestore stroke } bind def
/p6  { gsave bg eofill grestore newpath } bind def
/p7  { gsave bg eofill grestore stroke } bind def
/t   { 5 -2 roll moveto gsave rotate
       1 index stringwidth pop
       mul neg 0 rmoveto show grestore } bind def
/ta  { 4 -2 roll moveto gsave rotate show } bind def
/tb  { 2 -1 roll 0 rmoveto show } bind def
/cl  { grestore gsave newpath 3 index 3 index moveto 1 index
       4 -1 roll lineto  exch 1 index lineto lineto
       closepath clip newpath } bind def
/rgb { setrgbcolor } bind def
/s   { scalefont setfont } bind def
% end   .ps.prolog
%%IncludeResource: font Helvetica
/Helvetica findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding ISOLatin1Encoding def
  currentdict
  end
/Font1 exch definefont pop
%%IncludeResource: font Helvetica-Bold
/Helvetica-Bold findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding ISOLatin1Encoding def
  currentdict
  end
/Font2 exch definefont pop
%%IncludeResource: font Helvetica-Oblique
/Helvetica-Oblique findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding ISOLatin1Encoding def
  currentdict
  end
/Font3 exch definefont pop
%%IncludeResource: font Helvetica-BoldOblique
/Helvetica-BoldOblique findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding ISOLatin1Encoding def
  currentdict
  end
/Font4 exch definefont pop
%%IncludeResource: font Symbol
/Symbol findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  currentdict
  end
/Font5 exch definefont pop
%%EndProlog
%%Page: 1 1
bp
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
/bg { 1 setgray } def
1 setgray
1.07 setlinewidth
[] 0 setdash
1 setlinecap
1 setlinejoin
10.00 setmiterlimit
0.00 0.00 414.75 414.00 r p3
0.00 0.00 414.75 414.00 cl
38.80 30.25 409.27 408.52 cl
0 setgray
1.07 setlinewidth
[] 0 setdash
1 setlinecap
1 setlinejoin
10.00 setmiterlimit
np
134.73 272.57 m
0 -183.06 l
155.26 91.53 l
-155.26 91.53 l
o
np
124.85 237.54 m
0 -151.42 l
128.44 75.71 l
-128.44 75.71 l
o
np
116.60 242.45 m
0 -168.33 l
142.78 84.16 l
-142.78 84.17 l
o
np
146.14 310.69 m
0 -216.62 l
183.73 108.31 l
-183.73 108.31 l
o
np
189.60 337.53 m
0 -194.38 l
164.87 97.19 l
-164.87 97.19 l
o
np
137.19 239.44 m
0 -137.86 l
116.93 68.93 l
-116.93 68.93 l
o
np
135.43 357.39 m
0 -289.70 l
245.71 144.85 l
-245.71 144.85 l
o
np
153.49 256.55 m
0 -138.45 l
117.43 69.22 l
-117.43 69.23 l
o
np
154.17 322.71 m
0 -221.46 l
187.84 110.73 l
-187.84 110.73 l
o
np
143.49 264.47 m
0 -161.44 l
136.93 80.72 l
-136.93 80.72 l
o
np
134.15 240.97 m
0 -143.74 l
121.91 71.87 l
-121.91 71.87 l
o
np
116.31 194.94 m
0 -108.48 l
92.00 54.24 l
-92.00 54.24 l
o
np
131.94 234.39 m
0 -138.25 l
117.27 69.12 l
-117.27 69.13 l
o
np
152.62 282.88 m
0 -172.96 l
146.71 86.48 l
-146.71 86.48 l
o
np
132.18 214.38 m
0 -112.57 l
95.49 56.29 l
-95.49 56.28 l
o
np
101.57 200.78 m
0 -134.96 l
114.46 67.48 l
-114.46 67.48 l
o
np
123.21 239.47 m
0 -156.01 l
132.32 78.01 l
-132.32 78.00 l
o
np
105.36 236.31 m
0 -175.11 l
148.51 87.56 l
-148.51 87.55 l
o
np
118.90 338.67 m
0 -287.36 l
243.73 143.68 l
-243.73 143.68 l
o
np
155.09 348.36 m
0 -252.79 l
214.41 126.40 l
-214.41 126.39 l
o
np
130.05 222.19 m
0 -125.23 l
106.22 62.62 l
-106.22 62.61 l
o
np
116.12 285.43 m
0 -223.45 l
189.52 111.72 l
-189.52 111.73 l
o
np
144.50 262.60 m
0 -157.76 l
133.81 78.88 l
-133.81 78.88 l
o
np
138.28 239.48 m
0 -136.51 l
115.78 68.26 l
-115.78 68.25 l
o
np
132.33 333.25 m
0 -263.10 l
223.15 131.55 l
-223.15 131.55 l
o
np
146.06 271.31 m
0 -166.78 l
141.46 83.39 l
-141.46 83.39 l
o
np
166.70 320.15 m
0 -201.99 l
171.32 100.99 l
-171.32 101.00 l
o
np
147.25 242.73 m
0 -129.01 l
109.43 64.51 l
-109.43 64.50 l
o
np
97.84 199.21 m
0 -137.79 l
116.87 68.89 l
-116.87 68.90 l
o
np
90.90 213.18 m
0 -164.49 l
139.51 82.24 l
-139.51 82.25 l
o
np
125.36 261.99 m
0 -181.77 l
154.17 90.89 l
-154.17 90.88 l
o
np
96.57 236.06 m
0 -186.16 l
157.90 93.08 l
-157.90 93.08 l
o
np
137.34 306.63 m
0 -222.86 l
189.03 111.43 l
-189.03 111.43 l
o
np
191.31 357.89 m
0 -217.99 l
184.89 109.00 l
-184.89 108.99 l
o
np
119.28 261.92 m
0 -189.55 l
160.78 94.78 l
-160.78 94.77 l
o
np
139.34 240.82 m
0 -136.83 l
116.06 68.42 l
-116.06 68.41 l
o
np
147.71 244.84 m
0 -131.09 l
111.18 65.54 l
-111.18 65.55 l
o
np
153.57 189.93 m
0 -53.87 l
45.70 26.93 l
-45.70 26.94 l
o
np
101.14 227.06 m
0 -168.84 l
143.20 84.42 l
-143.20 84.42 l
o
np
148.60 278.32 m
0 -172.39 l
146.21 86.20 l
-146.21 86.19 l
o
np
152.09 225.45 m
0 -100.83 l
85.52 50.41 l
-85.52 50.42 l
o
np
120.30 256.50 m
0 -181.36 l
153.82 90.68 l
-153.82 90.68 l
o
np
134.88 233.72 m
0 -133.59 l
113.31 66.79 l
-113.31 66.80 l
o
np
88.75 168.78 m
0 -110.99 l
94.13 55.50 l
-94.13 55.49 l
o
np
134.13 359.12 m
0 -293.57 l
249.00 146.79 l
-249.00 146.78 l
o
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0 setgray
1.07 setlinewidth
[] 0 setdash
0 setlinecap
1 setlinejoin
10.00 setmiterlimit
np
38.80 30.25 m
0 378.27 l
o
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
/Font1 findfont 9 s
0.3020 setgray
33.87 44.21 (40) 1 0 t
33.87 69.69 (60) 1 0 t
33.87 95.16 (80) 1 0 t
33.87 120.63 (100) 1 0 t
33.87 146.10 (120) 1 0 t
33.87 171.58 (140) 1 0 t
33.87 197.05 (160) 1 0 t
33.87 222.52 (180) 1 0 t
33.87 248.00 (200) 1 0 t
33.87 273.47 (220) 1 0 t
33.87 298.94 (240) 1 0 t
33.87 324.41 (260) 1 0 t
33.87 349.89 (280) 1 0 t
33.87 375.36 (300) 1 0 t
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.2000 setgray
1.07 setlinewidth
[] 0 setdash
0 setlinecap
1 setlinejoin
10.00 setmiterlimit
np
36.06 47.44 m
2.74 0 l
o
np
36.06 72.92 m
2.74 0 l
o
np
36.06 98.39 m
2.74 0 l
o
np
36.06 123.86 m
2.74 0 l
o
np
36.06 149.34 m
2.74 0 l
o
np
36.06 174.81 m
2.74 0 l
o
np
36.06 200.28 m
2.74 0 l
o
np
36.06 225.75 m
2.74 0 l
o
np
36.06 251.23 m
2.74 0 l
o
np
36.06 276.70 m
2.74 0 l
o
np
36.06 302.17 m
2.74 0 l
o
np
36.06 327.64 m
2.74 0 l
o
np
36.06 353.12 m
2.74 0 l
o
np
36.06 378.59 m
2.74 0 l
o
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0 setgray
1.07 setlinewidth
[] 0 setdash
0 setlinecap
1 setlinejoin
10.00 setmiterlimit
np
38.80 30.25 m
370.47 0 l
o
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.2000 setgray
1.07 setlinewidth
[] 0 setdash
0 setlinecap
1 setlinejoin
10.00 setmiterlimit
np
55.64 27.51 m
0 2.74 l
o
np
80.59 27.51 m
0 2.74 l
o
np
105.53 27.51 m
0 2.74 l
o
np
130.48 27.51 m
0 2.74 l
o
np
155.43 27.51 m
0 2.74 l
o
np
180.38 27.51 m
0 2.74 l
o
np
205.32 27.51 m
0 2.74 l
o
np
230.27 27.51 m
0 2.74 l
o
np
255.22 27.51 m
0 2.74 l
o
np
280.17 27.51 m
0 2.74 l
o
np
305.11 27.51 m
0 2.74 l
o
np
330.06 27.51 m
0 2.74 l
o
np
355.01 27.51 m
0 2.74 l
o
np
379.96 27.51 m
0 2.74 l
o
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
/Font1 findfont 9 s
0.3020 setgray
55.64 18.86 (40) .5 0 t
80.59 18.86 (60) .5 0 t
105.53 18.86 (80) .5 0 t
130.48 18.86 (100) .5 0 t
155.43 18.86 (120) .5 0 t
180.38 18.86 (140) .5 0 t
205.32 18.86 (160) .5 0 t
230.27 18.86 (180) .5 0 t
255.22 18.86 (200) .5 0 t
280.17 18.86 (220) .5 0 t
305.11 18.86 (240) .5 0 t
330.06 18.86 (260) .5 0 t
355.01 18.86 (280) .5 0 t
379.96 18.86 (300) .5 0 t
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
/Font1 findfont 11 s
0 setgray
224.04 5.48 (xlab) .5 0 t
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
/Font1 findfont 11 s
0 setgray
13.38 219.39 (ylab) .5 90 t
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
0.00 0.00 414.75 414.00 cl
ep
%%Trailer
%%Pages: 1
%%EOF

我的短信

\documentclass[review]{elsarticle}
\usepackage[T1]{fontenc}
%\usepackage{ebgaramond}
%\usepackage[garamondx]{newtxmath}

\usepackage{epstopdf}
\usepackage{graphicx}
\usepackage{psfrag}

\begin{document}
$\ast$

\begin{figure}
    \centering  
    \psfrag{xlab}{Polygonal vertices $\xi_1$} 
    \includegraphics[scale = .85]{test.eps}
    \caption{Example of type of polygons} 
    \label{fig:test}
\end{figure}
\end{document}

答案1

psfrag要求您使用 LaTeX 编译文档。在 Overleaf 中的项目设置中强制更改此设置以选择“LaTeX dvipdf”LaTeX 引擎:

在此处输入图片描述

然后你的编译会产生预期的输出:

在此处输入图片描述

相关内容