Fix to using y1 for margin_y
Added detection of <-- Title block ... --> data from template.  Avoid titleblock by choosing vertical or horizontal space.  Does not yet detect if titleblock is avoided anyway.