Bottom margin vs. descenders question

Doug McKenna doug at mathemaesthetics.com
Fri Jun 26 15:29:53 CEST 2020


Thanks for all the interesting responses to my question; they were helpful.

The motivation for it is I have been building a custom program that helps vet formatting violations for paper submissions for a conference and its eventual proceedings in book form.  All submissions are PDF, but a significant number are not created using LaTeX (Word usually).  There's no access to the original LaTeX source or Word file, which remains in authors' hands.  So the editors have to inform authors of all the problems and get them to fix them before resubmitting.

And there are always a variety of formatting problems, such as incorrect or breached margins (typically an illustration too large), wrong paper size, unwanted page numbers, missing abstract or incorrect abstract indentation, etc.  Because there are hundreds of submissions, any automation of the process is a big time-save.

My question had to do with how my application should visually determine a breached margin, without having any knowledge of the document structure inside the PDF.  All I've got are pixels, 72/inch.

The font size is always around 11--12pt.  The automated margin checking, especially at the bottom of pages, required a certain amount of slosh beyond the formal specification of 1 inch from the page bottom, due to descenders.  To reduce false positives, I ended up using a fuzz factor of 3pts for left, top, and right margins, and 6pts along the bottom.

It's all a bunch of heuristics and hacks for one particular set of pages and one particular set of formatting guidelines, but it seems to be working for nearly all cases.

Doug McKenna
Mathemaesthetics, Inc.


More information about the texhax mailing list.