Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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

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
add comment

Your Answer

 
discard

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.