# Adjust typeblocksize in light of paper size

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

\settypeblocksize{*}{\lxvchars}{1.414}


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?

-

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

\documentclass[10pt,crownvopaper,landscape]{memoir}
\usepackage{lipsum}
\usepackage{calc}
\settypeblocksize{\lxvchars*\ratio{\paperheight}{\paperwidth}}{\lxvchars}{*}
\checkandfixthelayout
\begin{document}
\lipsum
\end{document}


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... :)

-
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