What I want to do is calculate the actual size between the edge of the paper, and my header. \evenmarginsize and \oddmarginsize do not do this.
\settowidth{\msize}{((\paperwidth - \textwidth)/2)}
Doesn't seem to work, how can this be done?
What I want to do is calculate the actual size between the edge of the paper, and my header. \evenmarginsize and \oddmarginsize do not do this.
\settowidth{\msize}{((\paperwidth - \textwidth)/2)}
Doesn't seem to work, how can this be done?
Use the e-TeX structure:
\newlength{\msize}
\setlength{\msize}{\dimexpr(\paperwidth-\textwidth)/2\relax}
The macro \settowidth is used with finding the width of a portion of text such as in:
\newlength{\mytextwidth}
\settowidth{\mytextwidth}{This is some text whose width I'm measuring}
The documentation can be found by running texdoc etex from the command line. Amoung other things, e-TeX provides several nice commands to facilitate calculations using \dimexpr, \numexpr, and several other flavors. Since I've discovered these, I find I don't use the calc package that much anymore.
\usepackage{calc}
...
\setlength{\msize}{0.5\paperwidth-0.5\textwidth}
However, I recommend you looking at the hcentering option of the package geometry.
\evenmarginsizeand\oddmarginsizedon't exist. Perhaps you meant\oddsidemarginand\evensidemargin. 3.\settowidthtakes a piece of text and calculates its width. For what you want, use\setlengthand you need thecalcpackage to use algebraic notation. 4. One more thing: supply a compilable file that shows what you tried.