# Exporting OverHat to EPS shifts the hat?

**URL:** <https://community.wolfram.com/t/exporting-overhat-to-eps-shifts-the-hat/25327>\
**Category:** Questions\
**Tags:** graphics-and-visualization, import-and-export\
**Created:** [April 2, 2025, 12:36am UTC](https://community.wolfram.com/t/exporting-overhat-to-eps-shifts-the-hat/25327 "2025-04-02T00:36:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alongcamp](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@alongcamp](https://community.wolfram.com/u/alongcamp)\
**Post date:** [April 2, 2025, 12:36am UTC](https://community.wolfram.com/t/exporting-overhat-to-eps-shifts-the-hat/25327/1 "2025-04-02T00:36:35Z")

</div>

I am trying to export a figure as a .EPS file using `Export["Fig.eps", Fig, "EPS"]`.

However, the exported image looks slightly different than that in the notebook. Specifically, the custom overhat I am using is no longer centered over the symbol below it. Here is the code I am using for the overhat and a simple example:

```
OverHat /: MakeBoxes[OverHat[a_], form_] := 
  With[{s = 0.9*First[Rasterize[a, "RasterSize"]], ab = MakeBoxes[a]},
    With[{sl = N[2 Log[2 s]]}, 
    InterpretationBox[
     OverscriptBox[ab, 
      TagBox[GraphicsBox[{Thickness[0.105], 
         LineBox[{{-s, 0}, {0, sl}, {s, 0}}]}, 
        ImageSize -> {s, Automatic}], "LongOverHat", 
       Selectable -> False], DiacriticalPositioning -> True], 
     OverHat[a]]]];

OverHat[a]
Export["fig.eps", %];
Import["fig.eps"]

```

I read elsewhere that the following code allows one to export images exactly as they appear in the notebook:

```
SetOptions[$FrontEnd, PrintingStyleEnvironment -> "Working"]
Export["fig.eps", OverHat[a], "EPS"]

```

However, my exported image still differs from the image in the notebook.

Is there a way to solve this problem?
