TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to figure out how to adjust the typeblocksize in memoir in light of the ratio of \paperheight to \paperwidth.

Right now, I have


to adjust the \textheight to 1.414 time the value of \lxvchars (itself calculated based on font and pointsize). This works fine for metric paper whose height is sqrt( 2 ) times the width.

I'd like to replace this with a variable expression based on the paper size selected in the documentclass. I.e. something like

\settypeblocksize{*}{\lxvchars}{\paperheight / \paperwidth}

but I can't figure out how to replace the scalar 1.414 with an expression (either inline or else computed elsewhere.

Can anyone help?

share|improve this question
up vote 3 down vote accepted

The calc package's \ratio command may be of some help:


Note that memoir doesn't seem to like using \ratio as the third parameter.

By the way, I tend to resist the temptation to believe that making the typeblock the same shape (ratio) as the page gives one a good layout automatically... :)

share|improve this answer
Thanks for this. I had looked at calc but had trouble making sense of the instructions. And I agree with your reservation; but I want to try it and see.... – K.G. Feuerherm Oct 6 '12 at 20:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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