Fix latex medium space parsing