The \show command is extremely useful for figuring out what's going on with a particular macro. Similarly, using \the can tell me the value of a counter. I'd like to know if there's something similar for lengths and skips. At the moment, I end up doing something like \rule{1pt}{\unknownlength} but that's a fairly crude method.


To show registers (which include dimensions, skips and counts) you want \showthe.


Somewhat more friendly than \showthe, which returns lengths in pt, is the printlen package. It gives \printlength{...}, which will typeset (so it's actually more like \the I guess) the length in the units specified by \uselengthunit. E.g., from the documentation:

The \verb|\textwidth| is \printlength{\textwidth} which is also
\uselengthunit{in}\printlength{\textwidth} and
  • This is one of those cases where it'd be nice to be able to accept both answers. Thanks for taking the time to add the extra information. Jul 29 '10 at 11:05
  • @Andrew: Interesting feature request: allow accepting both answers, splitting the 15 points of acceptance between the accepted answers....Meta? Jul 29 '10 at 11:41
  • @Yossi Farjoun: We debated this on MO a bit and decided that it wasn't worth the hassle. In this case, Joseph was first and in practice his is the answer I am most likely to use so the acceptance is defendable. Given that rep isn't quite everything, I hope that my first comment (and vote) is sufficient thanks from me to Will. It only takes two votes from other people to give him more rep than the accepted answer tag would have done so I hope that enough will vote here that he won't feel hard done by. Jul 29 '10 at 11:52
  • @Andrew: I looked this up on meta.SO where they had a discussion of this before. Basically, the idea is that one question has either one correct answer or none....I guess, an good answer will be voted up regardless if it accepted or not. Jul 29 '10 at 12:53
  • 1
    @Yossi Farjoun: Hmm, the mathematician in me wants to say that a question can have several right answers, but that one will be more right than others in a specific situation. I think that your last remark is spot on. (And I think that we should get out of Will's "comment list"! If there is anything further to say on this - which I don't think there is - it should be shifted to meta.) Jul 29 '10 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.