2

I am new to LaTeX, so I hope this is not obvious, but have searched for straightforward documentation on how to do this and can't find it.

I am creating a chapter for a book that has very specific formatting:

  • The normal paragraph must be in 10pt Bookman old Style
  • The chapter title must be 20pt Verdana bold without a chapter number.
  • The section header must be 12 pt Arial Narrow Small-Caps with 6pts extra space above, and no extra space below.
  • The subsection header must be 10Pt Bookman Old Style Bold Italic, no extra space above or below

I am using pdflatex to produce the PDF output, and scrbook class:

\documentclass[11pt,executivepaper,headsepline,footsepline]{scrbook}

%Eliminate the chapter numbers from section numbering
\usepackage{chngcntr}
\counterwithout{section}{chapter}

\voffset=0in
\topmargin = 0in
\headheight = 12pt
\headsep = 25pt
\textheight = 8.5in
\footskip = 30pt

\hoffset=0in
\marginparwidth = 0pt
\marginparsep = 0pt
\textwidth = 5.25in
\oddsidemargin = 0pt
\marginparpush = 0pt

\begin{document}

I found that there is a command for setting the font of a element: \setkomafont{element}{commands} but I have not figured out how to specify Arial Narrow typface. The KOMA -Script bundle documentation says 'just about any command will work' which is not really helping me at this moment.

Is there a way to get the desired typfaces in use for my section headers in scrbook with pdflatex?

5
  • 1
    Welcome to the hardest part in my opinion when learning LaTeX: the fonts. – Sigur Jul 25 '14 at 23:59
  • 1
    There is a LaTeX support for Arial, but not for Arial Narrow, nor an URW clone. So if you want to use it you have to use fontspec and compile with Xe/LuaLaTeX. – Bernard Jul 26 '14 at 0:33
  • Or install the fonts yourself... but you don't want to do that ;(. – cfr Jul 26 '14 at 0:54
  • OK, I tried XeLaTeX, and I got one error, but it seems to produce a PDF that looks the same as that from pdflatex. I will try some experimentation with fontspec later tonight. – AgilePro Jul 26 '14 at 1:03
  • @cfr, I did that once time. So my opinion on hardest part... lol – Sigur Jul 26 '14 at 1:11
2

The short answer appears to be: don't do it with pdflatex. Thanks to Bernard, cfr, and Sigur and I was able to find a solution which I can share.

You can import and use named fonts using the fontspec package. This package does not work with pdflatex. I had to switch to xelatex. Initial tests showed that xelatex would compile my existing document with only one small error that could be easily fixed.

Here is the commands to import and use those fonts

\usepackage{fontspec}
\fontspec{Bookman Old Style}
\fontspec{Arial Narrow}
\fontspec{Verdana}
\setmainfont{Bookman Old Style}

\setkomafont{section}{\fontspec{Arial Narrow}\fontsize{12}{15}\scshape}
\setkomafont{subsection}{\fontspec{Bookman Old Style}\bfseries\slshape}
\setkomafont{pagehead}{\fontspec{Arial Narrow}\footnotesize\scshape}

\usepackage{titlesec}
\titleformat{\chapter}{\fontspec{Verdana}\bfseries
             \fontsize{20pt}{24pt}\centering\selectfont}{}{0em}{}

This worked for the most part except for the small caps (\scshape) on the section titles. It seems that LaTeX treats small caps as a font, and requires a separate font for that. Most word processors simply simulate this by using a regular capital letter at a smaller size. This would seem like something that LaTeX could do, and maybe it does with the inclusion of yet another obscure package.

Using \fontsize I was able to specify the size in points of the various header pieces. While the documentation is not clear, aparently sometimes you need to use both the \fontsize command followed by the \selectfont command. That was the case for the \titleformat command. Without the \selectfont the settings would not appear.

1
  • 1
    Regarding "exact" (absolute) font sizes, take a look at the \fontsize{}{} command. – Gonzalo Medina Jul 27 '14 at 1:53

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.