[tex-k] Where does conversion of PostScript pts to TeX pts occur?

Doug McKenna doug at mathemaesthetics.com
Sat Jan 26 16:08:16 CET 2019

All -

When a Tex source file wants to place an illustration in PDF or other supported graphic file format, it needs to know the bounding box of that illustration, which for PDF is recorded inside that PDF file in PostScript points (72 per inch).  But TeX operates in TeX points, which are 72.27/inch.

So some high-level macro in LaTeX (or whatever format or library) such as \includegraphics[]{} gets invoked and it presumably relies on some low-level primitive extension command implemented in pdftex (or equivalent) that reaches out to some directory and examines the PDF file requested to get that PDF's bounding box info.

My question is this: deep down at the primitive level, whose responsibility is it to convert from PostScript points to TeX points in order know what the equivalent bounding box will be on the TeX page?

Does some back-end implementation of a primitive do it on behalf of the primitive command, so that the primitive command delivers values in TeX points, or does it deliver values in PostScript points, and some TeX source code surrounding the invocation of that primitive then adjust the numbers to TeX points (and perhaps then scale them according to the argument to \includegraphics[]{}?

I'm guessing the former, but I'm not familiar with the source code enough to know what's going on.  And I don't want to guess.

Doug McKenna

More information about the tex-k mailing list