** rework for relative sectioning (brokken pdf build)

Signed-off-by: Dmitry Ponyatov <dponyatov@gmail.com>