# Trouble setting a length [closed]

I'm starting with LaTeX, and there are things that puzzle me. I'm trying to set a length that's the \textwidth minus (let's say for example) two inches. In the preamble, I wrote:

\newlength{\bplen}
\setlength{\bplen}{\textwidth}


The compiler tells me:

! Undefined control sequence. <argument> \pblen
! You can't use blank space  ' after \advance.
#2\relax
! LaTeX Error: Missing \begin{document}.


I've just defined \bplen and what's that about a missing \begin{document}? Aren't I allowed to set lengths in the preamble?

-

## closed as too localized by cgnieder, lockstep, Stefan Kottwitz♦Nov 15 '12 at 17:04

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Is pblen a typo you made in the document? –  Seamus Nov 26 '10 at 17:41
@Seamus: I'm not sure how to handle question like this one, but you were faster and should have gotten the upvote reputation. –  lockstep Nov 26 '10 at 17:55
I feel shame. I do. Sorry. –  eje211 Nov 26 '10 at 18:01
@lockstep Don't worry about it. Your answer included the useful \the trick which I'd forgotten about, so that's value added. But I am going to spend the next week trawling through all your posts on this site and downvoting every single one. –  Seamus Nov 26 '10 at 18:56

Could it be simply a typo? Your first and your second code line contain \bplen, but your third \pblen.

EDIT: Without the typo your code works as intended:

\documentclass{article}

\newlength{\bplen}
\setlength{\bplen}{\textwidth}

@eje211 typos are unavoidable. I spent some time today raging that LaTeX kept telling me that the vebratim` environment doesn't exist... –  Seamus Nov 26 '10 at 22:00