5

harvmac is an old set of macros for scientific documents in plain TeX. I can't figure out what font is used for the title produced by harvmac, and how I could use the same font in LaTeX. Here's an example:

\input harvmac
\Title{}{Your title goes here}
\end

You need to compile this with plain TeX, and you get this:

enter image description here

As you can see the font is slightly thicker than normal (i.e. thicker than what you'd get by using \huge or \Huge in LaTeX), but it is not bold.

This font is some variant of Computer Modern. How can I use the same font in LaTeX?

6

It's \show\titlerm which says:

> \titlerm=select font cmr10 at 17.28pt.

in other words it's a scaled cmr10 rather than cmr17 which latex would give you by default

enter image description here

\documentclass{article}

\DeclareFontShape{OT1}{cmr}{mx}{n}%
     {<->cmr10}{}

 \DeclareMathAlphabet {\mathzzz}{OT1}{cmr}{mx}{n}

\begin{document}

\showoutput

\Huge

Hello World

\fontseries{mx}\selectfont

Hello World


$\mathrm{xxxx}$

$\mathzzz{xxxx}$

\end{document}
  • Great, thanks! Is it possible to use the scaled version in math mode too? – AndyS Aug 1 '14 at 15:02
  • 1
    @AndyS \DeclareMathAlphabet {\mathzzz}{OT1}{cmr}{mx}{n} probably works – David Carlisle Aug 1 '14 at 15:11
  • This throws an error: Encoding scheme `cmr' unknown. – AndyS Aug 1 '14 at 15:19
  • 1
    @AndyS, no it doesn't:-) See updated answer – David Carlisle Aug 1 '14 at 15:22
  • You're right, there's no error! – AndyS Aug 1 '14 at 15:27
2

Just to explain the background to the accepted answer: harvmac.tex sets cmr10 as the title font and then scales it by \magstep3 (resulting in 17.28pt). Here is a plain TeX MWE that demonstrates the difference between the scaled-up cmr10, unscaled cmr17, and default cmr10.

The code is excerpted from the original harvmac.tex, lines 77 (\Title definition), and 244-258 (the section beginning "Unpleasantness in calling in abstract and title fonts"!).

This is compiled with tex -> dvips -> ps2pdf.

\edef\tfontsize{ scaled\magstep3}
\font\titlerm=cmr10 \tfontsize
\def\titlefont{\def\rm{\fam0\titlerm}\textfont0=\titlerm \rm}
\def\Title#1{{\titlefont #1}}

\Title{Title Font cmr10 scaled by magstep 3 (17.28pt)}

\vskip 12pt

\font\titlerm=cmr17 
\Title{Title Font cmr17 no scaling}

\vskip 12pt

Normal text font cmr10

\bye

enter image description here

  • One has just to add \font\titlerm=cmr17 after \input harvmac. – egreg Aug 1 '14 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.