Introdue the new option parser in Main

Only used for the new Latex backend for now. Fall back on the old code
for the other modes.