32

Warning

If you're looking for advice how to make your document look like it's been written in Word, this is most likely not the question you're looking for. This question is mostly of theoretical nature, as it results in tiny differences, which will most likely not be noticed by someone who doesn't allow the use of LaTeX.

Questions that might be more helpful for this matter are:


Question

I learned that MS Word uses a slightly different version of the unit "point" (pt) than TeX does:

The 12 point of Word will be PostScript point, which in TeX would be called 12bp. A TeX pt is slightly smaller: it's 1/72.27 inch, while a bp/PostScript point is 1/72 inch. See also http://en.wikipedia.org/wiki/Point_%28typography%29

(Martin Schröder in Latex commands for a specific page format)

I'm writing a paper that would usually be expected to be "typeset" in MS Word, thus I want to use the same font size as Word would.

How do I set a document e.g. in the "12pt" font size that MS Word would use?

In case it matters, I'm using the article document class, Latin Modern (lmodern) as a font with the T1 font encoding and compile with pdfLaTeX, but input on different set-ups is more than welcome.

15
  • 4
    Bonus question: Which "point" is preferable if I have a too high / too low page requirement to fulfill? ;)
    – doncherry
    Commented Nov 7, 2011 at 20:42
  • 2
    The MWE \documentclass{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \begin{document} \fontsize{12bp}{14bp}\selectfont foo \fontsize{12pt}{14pt}\selectfont foo \end{document}​ produces a document with 2 different font sizes for foo: the first is 12bp and the second is 12pt. lmodern has this modification by default. Is this what you're after?
    – Werner
    Commented Nov 7, 2011 at 20:55
  • 1
    @CountZero: Not that using Latin Modern (or any particular font instead of Times New "old 'n' boring" Roman) and TeX's hyphenation wouldn't make a bigger difference than the font sizes ... It's more a theoretical question. I've actually come up with an answer already, I'm just curious if the pros here would do the same; I'll add it in a couple days if it hasn't appeared yet. Plus this whole thing might be helpful if someone's really doing a "Use LaTeX but must be just like Word".
    – doncherry
    Commented Nov 7, 2011 at 20:58
  • 3
    @Werner That might work, but not all lengths are expressed in terms of \p@. What I was saying is that it's almost impossible that somebody can spot the difference between 12pt and 12bp size. Particularly if they require MS Word documents. :)
    – egreg
    Commented Nov 7, 2011 at 21:32
  • 3
    A related question is this one: Globally redefining 1 pt to 1/72 in (PostScript point) and other similar changes.
    – Alan Munn
    Commented Nov 8, 2011 at 0:00

3 Answers 3

18

As per the discussion, one way of achieving this goal is to redefine the "shorthand" length dimension used throughout the standard document classes. Here's an extract of the relevant code snippets from ltxplain.dtx containing the abbreviated definition:

\newdimen\p@ \p@=1pt % this saves macro space and time

As such, issuing

\makeatletter\p@=1bp\makeatother% or \setlength{\p@}{1bp}

modifies the default 1pt reference to 1bp. Looking at article.cls (although other document classes are similar), many related lengths are set using \p@. Here's an excerpt:

\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
...
\setlength\parskip{0\p@ \@plus \p@}
...
\setlength\arraycolsep{5\p@}
\setlength\tabcolsep{6\p@}
\setlength\arrayrulewidth{.4\p@}
\setlength\doublerulesep{2\p@}
...
\setlength\fboxsep{3\p@}
\setlength\fboxrule{.4\p@}
...
\setlength\abovecaptionskip{10\p@}
\setlength\belowcaptionskip{0\p@}
...
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@width.4\columnwidth
  \kern2.6\p@}
...
\setlength\columnsep{10\p@}
\setlength\columnseprule{0\p@}

including some macros like \maketitle and things associated with indexing. So, issue the size change before \documentclass in order to let the effect filter through. You would still "miss" some \p@-related definitions though, as may be seen by viewing latex.ltx.

As a quick way to check the difference in the default pt and modified bp measurements (in lmodern) is using printlen. Here's a brief example with focus on the character X:

enter image description here

\documentclass[12pt]{article}
\usepackage{lmodern}% http://ctan.org/pkg/lmodern
\usepackage{printlen}% http://ctan.org/pkg/printlen
\begin{document}
\uselengthunit{pt} \renewcommand{\arraystretch}{1.5}%
\setbox0=\hbox{\fontsize{12pt}{14pt}\selectfont X}% pt measurement
\setbox1=\hbox{\fontsize{12bp}{14pt}\selectfont X}% bp measurement
\begin{tabular}{ccc}
  X & width & height \\ \hline
  \verb!pt! & \printlength{\wd0} & \printlength{\ht0} \\
  \verb!bp! & \printlength{\wd1} & \printlength{\ht1} \\ \hline
\end{tabular}
\end{document}

The difference in width is around 0.04pt and 0.03pt in height, which translates to about 0.01mm - a roughly 0.3% increase (~ 72.27/72-1). This is virtually negligible to the naked eye at regular font sizes.

Paragraph construction is altered using 12bp rather than 12pt, and therefore also hyphenation. Here's an example showing the effect:

enter image description here

\documentclass[12pt]{article}
\usepackage[margin=0.5in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{lmodern}% http://ctan.org/pkg/lmodern
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\renewcommand{\arraystretch}{1.5}%
\begin{tabular}{p{0.4\linewidth}p{0.4\linewidth}}
  \verb!12pt! font & \verb!12bp! font \\ \hline
  %\fontsize{12pt}{14pt}\selectfont% pt measurement
  \lipsum[1] &
  \fontsize{12bp}{14pt}\selectfont% bp measurement
  \lipsum[1]
\end{tabular}
\end{document}
9
  • 2
    If you resize in bp, it is better to keep the ratio to baseline the same i.e., \fontsize{12bp}{14bp}. Loading babel with [english,latin]{babel} will improve the examples. The real word will be much longer due to bad hyphenation.
    – yannisl
    Commented Nov 8, 2011 at 6:45
  • Thanks; I wanted to keep the baseline reference the same across the examples to highlight the effect of 12bp over 12pt, hence the use of \fontsize{12bp}{14pt}.
    – Werner
    Commented Nov 8, 2011 at 7:18
  • 9
    Changing a such generic command \p@ has severe side effects. \p@ is also used in calculations completely independent from font size/spacing stuff. For example, \usepackage[pdftex]{color}...\textcolor[RGB]{255,0,0}{...} will break with an error message, because 255/255 is now 1.00374 and larger than the allowed maximum value 1. Commented Sep 4, 2014 at 2:37
  • 3
    See tex.stackexchange.com/questions/352580/… for a case where changing the value of \p@ makes for spectacular failure.
    – egreg
    Commented Feb 7, 2017 at 21:23
  • 1
    Werener it would be best to delete the suggestion to redefine \p@ (I already have problems wih some journal classes doing this), it completly breaks any packages such as graphicx using tex dimen arithmetic Commented Apr 4, 2022 at 7:27
15

Every KOMA-Script class has build in support for every font size you want. If you don't like to switch to a KOMA-Script class, this feature is one of the features KOMA-Script package scrextend provides for other classes:

\documentclass[fontsize=12bp]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{scrextend}% provides several KOMA-Script features to other classes
\usepackage[english]{babel}
\usepackage{blindtext}

\begin{document}

\blinddocument

\end{document}

You need a scalable font or a font with support for this font size. Latin Modern is a scalable font.

7
  • Does this change e.g. the title font size to 17bp? (To be precise, it's 17.28pt/bp, cf. egreg's comment to the question.)
    – doncherry
    Commented Nov 8, 2011 at 9:04
  • 3
    @doncherry: It changes all font commands (and several lengths), e.g., \huge, \LARGE, \Large relative to 12bp/10bp. Example: At 10pt (predefined font size at article) \LARGE is \@xviipt, that is 17.28pt. With scrextend and fontsize=12bp it will be 17.28pt*12bp/10pt = 17,28*1,2bp=20.736bp=20.8137pt (try \LARGE\csname f@size\endcsname to see this). Alternative: You may define your own font size file scrsize12bp.clo. In this case this file will be used instead of calculated sizes by scrextend. Use scrsize12pt.clo as template and simply change all lengths from pt to bp. Commented Nov 8, 2011 at 9:14
  • @Schweinebacke I'm a little bit confused there. I always used KOMA-Script with pt. I tried using fontsize=12bp and got less pages than with fontsize=12pt. Should't it be opposite according to @Werner's answer?
    – Thorsten
    Commented Nov 8, 2011 at 12:57
  • 2
    @Thorsten: 1in = 72bp = 72,27pt. So a pt is smaller than a bp, but: With a4paper there's a DIV default for 12pt but not for 12bp. So DIV=calc will be used with 12bp. If I try a document with DIV=9 and \lipsum[1-100] almost nothing changes if I use fontsize=12bp instead of fontsize=12pt. Additionally remember: There's a file scrsize12pt.clo with optimized (not only horizontal) lengths. KOMA-Script may use an optimized scrsize12bp.clo too, but it does not provide it. Commented Nov 8, 2011 at 13:06
  • @Schweinebacke Ah, that's a good point. I didn't think of DIV. Thank you for pointing this out.
    – Thorsten
    Commented Nov 8, 2011 at 13:24
5

There is a package / style by Juergen Fenn which addresses this situation in whole (rather than in part by adjusting the font size): wordlike

I never used it, so I can't speak to its usefulness & friendliness with other classes, packages etc. A first glance at the documentation, however, looks «promising». If you can't get away with «only» the font size adjustment, it may be worth a try.

2
  • Since my goal right now isn't imitating the entire Word set-up as closely as possible but just the font size, I don't think this solves the problem. The documentation says: "No attempt is made to set the default font size to 12pt because this is typically done when loading a document class. So, font size is left to the users’ preferences. If you use article.cls your preamble should start like this: \documentclass[12pt]{article} \usepackage{wordlike}"
    – doncherry
    Commented Nov 7, 2011 at 21:40
  • What I meant to say with above comment, the package wordlike doesn't seem to deal with the pt vs bp difference (nonwithstanding its other potential benefits).
    – doncherry
    Commented Nov 7, 2011 at 21:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .