Modified ExportToSvg to handle irregular lectures.