[Tex/LaTex] How to show margin distances in mm


I would like to know the distance (in mm) of the margins I just set, and I would like them to be displayed in the document (for debugging purposes, of course).

I use the showframe option of the geometry package in order to denote the margins. How do I get to display the margin values?

This is a super MWE:



I would like it to be something like this (taken from Golden Ratio for vertical poem positioning):

enter image description here

Of course, I don't care about the text inside, just the margins (margin par, topmargin, innermargin, etc.)

Best Answer

Based on Gonzalo Medina' suggestion, and with a little bit of help with the documentation, I was able to achieve this with the layouts package:




\verb|\marginparwidth|: \printinunitsof{mm}\prntlen{\marginparwidth}


With this result:

enter image description here