I use the KOMA scrreprt document class and I specify a BCOR. Now I want to draw with a TikZ overlay, which respects the BCOR.

My command to get the BCOR setting is the following. Maybe that can be improved?


Anyways, now I want to draw 1cm from the page border plus BCOR. I tried:

\draw[semithick,rounded corners=0.5cm]
      ($(current page.north west) + ( 1cm,-1cm) + (\myBCOR,0)$) --
      ($(current page.north east) + (-1cm,-1cm)$) --
      ($(current page.south east) + (-1cm, 1.5cm)$);

However, this gives the error Missing number, treated as zero. I found nothing on how to integrate commands into coordinate calculations.

  • 1
    \makeatletter and \makeatother should enclose the \newcommand definition, so they should be moved outside. – Alenanno May 30 '16 at 11:28
  • 1
    Also, when you have a problem related to an error, it's always necessary to include a minimal example that shows it. We cannot know what is going on without seeing the code that generates the problem. – Alenanno May 30 '16 at 11:29
  • 1
    Ok fixed your suggestions – qznc May 30 '16 at 11:38
  • Actually, @Alennano fixed my problem. Moving them outside made it work. :) – qznc May 30 '16 at 11:42
  • your code is now working? – Alenanno May 30 '16 at 11:44

The \makeatletter and \makeatother should enclose the whole \newcommand definition, so you should write it this way:

| improve this answer | |

If you do not change the BCOR inside the document it may be better to use


Note that \ta@bcor is an undocument internal length. So its name can be changed in the future.

| improve this answer | |

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.