Helper function to modify a position based on the context of the document. Returns position relative to the embedded section when the context is an embedded section, otherwise returns the position as is.
The position to modify.
The context of the document.
The modified position.
Helper function to modify a position based on the context of the document. Returns position relative to the embedded section when the context is an embedded section, otherwise returns the position as is.