xsize=8.2
ysize=9
size xsize ysize

begin texpreamble
    % set fonts used for text and maths to Palatino
    \usepackage{mathpazo}
    \renewcommand{\familydefault}{ppl}
    \usepackage{upgreek}
    \usepackage[load=abbr]{siunitx}
    \usepackage{bm}
end texpreamble

pt=0.0352777778 ! 1 postscript point

set font texcmr
set hei 12*pt
set texscale scale

! crystal structure image
amove 0 1
bitmap "CuHF2pyz2PF6-structure.png" 8.1 8.1

! crystal structure key
displacex=0.6  !to move text away from atom horizontally
displacey=0.13 !to line up atom key pic and text vertically
xstart=1.25
xdisp=1.1
ytop=0.3
amove xstart+0.125+0.1 ytop+0.125
bitmap "sphere-H.png" 0.25 0.25
amove xstart+displacex-0.05 ytop+displacey
text \tex{H}
amove xstart+1*xdisp ytop
bitmap "sphere-C.png" 0.5 0.5
amove xstart+1*xdisp+displacex ytop+displacey
text \tex{C}
amove xstart+2*xdisp ytop
bitmap "sphere-N.png" 0.5 0.5
amove xstart+2*xdisp+displacex ytop+displacey
text \tex{N}
amove xstart+3*xdisp ytop
bitmap "sphere-F.png" 0.5 0.5
amove xstart+3*xdisp+displacex ytop+displacey
text \tex{F}
amove xstart+4*xdisp ytop
bitmap "sphere-P.png" 0.5 0.5
amove xstart+4*xdisp+displacex ytop+displacey
text \tex{P}
amove xstart+5*xdisp-0.08 ytop-0.25
bitmap "sphere-Cu.png" 1 1
amove xstart+5*xdisp+displacex+0.32 ytop+displacey
text \tex{Cu}

amove 0.1 0.3
rline 1 0 arrow end
rmove -0.2 0.15
tex "$\bm{a}$"

amove 0.1 0.3
angle=40/180*3.1415926535
rline 0.8*sin(angle) 0.8*cos(angle) arrow end
rmove 0 0.1
tex "$\bm{b}$"

amove 0.1 0.3
rline 0 1 arrow end
rmove -0.075 0.1
tex "$\bm{c}$"
