# Text width in one sided documents?

Example:

\documentclass[paper=a4, fontsize=10pt, parskip=half, DIV=9]{scrartcl}


How do I calculate text width?

In particular: I understand that DIV=9 specifies that the page is divided into nine stripes, but how many are used for the border, in case the document is single sided?

In the documentation I only found explanation for two sided documents.

I measured text width with a ruler, and it's about: 14cm

• The width of the text block should be the same irrespective of whether you have a one-sided or a two-sided document. Hence, whatever explanations you may have found for two-sided documents should apply to one-sided documents as well. – Mico Oct 14 '13 at 17:39
• @Mico Can you back up this claim? If so, that could make an answer. – feklee Oct 14 '13 at 18:56
• Well, if you run the MWE provided by @AndreaL. both with and without the twoside document class option (or, if you will, the oneside document class option), you get a value for \textwidth of 398.33862pt either way. Doesn't this prove my claim that for a choice of DIV=9, the width of the text block doesn't depend on whether the document is set one-sided or two-sided? – Mico Oct 14 '13 at 20:45

The DIV=n method consists in considering the available paper area (binding correction removed) formed by n2 equal smaller rectangles, by dividing both width and height by n. The upper horizontal stripe and the two lower ones make the upper and lower margin. Similarly the inner vertical stripe and the two outer ones make the inner and outer margins. However, when the oneside option is active, one fourth of the outer margin is transferred to the inner margin (so both are one and a half stripe wide). The upper and lower margins still follow the rule.

So, with DIV=9 on A4 paper, we get a text width of 6 times 21/9 centimeters, that is 14 centimeters, as you found out.

The parameter \oddsidemargin turns out to be 27.31467pt that, added to 1 inch, give exactly 3.5 centimeters. The computations are a bit involved because they must take into account the one inch shift in both vertical and horizontal directions that DVI drivers (and pdfTeX too, for compatibility) always do when printing or previewing a document.

When the twoside option is active, instead, \oddsidemargin is –5.88022pt; adding 1 inch gives 2.33333 cm; the outer margin the double (4.66667 cm), making again for 14 cm textwidth.

I think the most accurate measurement you can obtain is via the basic TeX primitive \the followed by the specific lenght implicity declared inside \documentclass; this command is used to get the value of a counter, eg. \the\mylenght. (that's why the geometry package has to do with appropriatley modifying those parameters!).

Here is the MiniMWE:

\documentclass[paper=a4, fontsize=10pt, parskip=half, DIV=9]{scrartcl}
%
\usepackage{calc}
%
\begin{document}
%
\the\textheight\\ % this is the HEIGHT of the space occupied by whole text
\the\textwidth    % this is the WIDTH  of the space occupied by whole text
%
\end{document}


Which yields:

574.0pt

398.33862pt

Using the appropriate conversion you can have exactly (with the appropriate significant figures, let me be a little more scientific):

20.17cm

14.000001cm

You can see that this is within the accuracy of your measurement.

• \the\numexpr \number\textwidth*3175/59203584\relax{} tenth of a millimeter – user4686 Oct 14 '13 at 19:06
• the formula of my previous comment gives 1400, and if computed exactly from the value \number\textwidth (its exact internal representation in scaled points) one obtains 1400.000141883302... and if I compute from the value you give in points I obtain 1400.000131174761.... So there must be some error in the computation giving 14.026cm. – user4686 Oct 14 '13 at 19:13
• @jfbu I checked the Wikibook article, and here it says that 1cm=28.4pts. – alandella Oct 14 '13 at 19:15
• the exact correspondance is 2.54cm=72.27pts. – user4686 Oct 14 '13 at 19:16
• @jfbu Ahh... Misleading Wikibooks, but I have to admit, I was too lazy to do the appropriate calculation (this make me feel to edit my answer and remove the "scientific" reference because now I don't deserve it...) – alandella Oct 14 '13 at 19:18