# How to use Bodoni Italic (non-default font)

This is the gfsbodoni.sty file. I don't know how to italicise the text. The text is only for a section in the document. Using Overleaf, pdflatex.

What I tried and they produce non-italicised text:

• \textit{{\fontfamily{gfs}\selectfont Bodoni Italic. \lipsum[2-4]}}
• \fontfamily{gfs}\selectfont \itshape Bodoni Italic. \lipsum[2-4]}

The font is non-default. So I use some fonts using specific commands (\fibrabook is an example), and some using these 3 letters. The fonts all work, because I read that I can find info in the .sty file. However, I am confused on how to italicise it now that I have it

EDIT: Complete shortcode

\documentclass[a5paper,pagesize,10pt,bibtotoc,pointlessnumbers,

\KOMAoptions{DIV=last}
\usepackage{gfsbodoni}
\usepackage[scaled]{berasans}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{scholax}
\usepackage{palatino}

\usepackage[T1]{fontenc}

\begin{document}
\newpage
\poiretonefamily
PoiretOne. \lipsum[2-4]
\newpage
\textbf{\textit{Times. \lipsum[2-4]}}
\newpage
\textit{{\fontfamily{gfs}\selectfont Bodoni Italic. \lipsum[2-4]} }
\end{document}


I probably didn't include everything necessary, but I don't see how the problem is not clear, so please give me details of why the problem is not clear. I imagine \textit or \itshape would italicise a font, but they don't. The font shows normally.

• Could you please post a complete short code reproducing your problem? Jul 31 at 18:56
• I edited the post to include the code
– Eric
Jul 31 at 19:14
• Which is your default font? Jul 31 at 19:16
• It's Palatino, that is why I have no idea how to control whether Bodoni shows in italics only using those 3 letters
– Eric
Jul 31 at 19:20
• I have several error messages, one of them saying that gfsbodoni is not defined in T1 encoding, albeit I have a T1bodoni.fd file on my system, which looks very strange. Jul 31 at 20:24

According to the package documentation of gfsbodoni the package defines the command \textbodoni{} for short texts and the environment \begin{bodoni}\end{bodoni} for longer texts.

Both indeed work (note that I removed some deprecated options for scrbook):

\documentclass[DIV=9,twoside=false]{scrbook}

\KOMAoptions{DIV=last}
\usepackage{gfsbodoni}
\usepackage[scaled]{berasans}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{scholax}
\usepackage{palatino}

\usepackage[T1]{fontenc}
\usepackage{lipsum}

\begin{document}
Default font \lipsum[1]

\textbodoni{Bodoni Regular \lipsum[2]}

\begin{bodoni}
\textit{Bodoni Italic. \lipsum[3]}
\end{bodoni}
\end{document}


Font properties of the PDF:

• Out of curiosity, which distribution do you have? I couldn't make it work with MiKTeX. Jul 31 at 21:28
• This worked. However, future readers, please be aware my problem was also related to package clashes. I had too many fonts that defined properties that gfs bodoni was using. Good luck and thank you @Marijn
– Eric
Jul 31 at 21:33
• What about the error stopping every LaTeX run? Aug 1 at 8:23
• @egreg I'm not really sure which error you refer to? When I run the code in my answer I don't get any errors or warnings (TeX Live 2019). Maybe a newer compiler has introduced errors? Aug 1 at 8:59
• @Marijn With TL 2021 the error is about \textfrac being already defined (the culprit is gfsbodoni). Aug 1 at 9:20

\usepackage{gfsbodoni}
\usepackage[scaled]{berasans}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{scholax}
\usepackage{palatino}


does not make sense. The packages do, for their main job,

% gfsbodoni
\renewcommand{\rmdefault}{bodoni}}% if loaded with the default option
\renewcommand{\sfdefault}{qag}
% berasans
\renewcommand{\sfdefault}{fvs}
% mathdesign with bitstream-charter
\renewcommand{\rmdefault}{mdbch}
% scholax
\renewcommand*{\rmdefault}{TeXGyreScholaX-TLF}% at begin document
% palatino
\renewcommand{\rmdefault}{ppl}
\renewcommand{\sfdefault}{phv}
\renewcommand{\ttdefault}{pcr}


The net result is that the chosen fonts are

• TeX Gyre Schola as default font
• Helvetica for sans serif
• Courier for monospace

plus setting up math with Charter (very incompatible with Schola).

You should make a decision about what main fonts you want to use, taking into account that palatino is obsolete.

If you want Schola and also support for math, you can use fouriernc.

You might want to choose accompanying sans serif and monospaced fonts. But do yourself a favor: never load several font packages, as incompatibilities are behind the corner.

You also use \poiretonefamily that's not defined in any of the packages you load. This is defined in a further font package.

Now let's tackle the problem. For your own reasons you want some paragraphs in Bodoni italic. There are two choices, one is gfsbodoni, the other is librebodoni.

\documentclass[
a5paper,
pagesize,
10pt,
bibliography=totoc,
numbers=noenddot,
DIV=9,
twoside=false
]{scrbook}

\usepackage[T1]{fontenc}
\usepackage{fouriernc} % math compatible with New Century Schoolbook
\usepackage{scholax}   % clone of New Century Schoolbook

\usepackage{lipsum}

\KOMAoptions{DIV=last}

\makeatletter
\def\LibreBodoni@scale{0.95}
\makeatother

\newenvironment{gfsbodoniitalic}
{\fontfamily{bodoni}\itshape}%
{}
\newenvironment{librebodoniitalic}
{\fontfamily{LibreBodoni-TLF}\itshape}
{}

\begin{document}

This is Schola with $a+b=\sin x$ some math.

\lipsum[2][1-4]

\begin{gfsbodoniitalic}
This is Bodoni Italic (GFS Bodoni)

\lipsum[3][1-4]
\end{gfsbodoniitalic}

\begin{librebodoniitalic}
This is Bodoni Italic (Libre Bodoni)

\lipsum[3][1-4]
\end{librebodoniitalic}

Is the scale RIGHT\begin{gfsbodoniitalic}RIGHT\end{gfsbodoniitalic} or not?

Is the scale RIGHT\begin{librebodoniitalic}RIGHT\end{librebodoniitalic} or not?

\end{document}


After comparing the possibilities, I'd go with LibreBodoni (that is, assuming you really want an extraneous font in your document).

Note also the options to the document class, with the newer ones instead of the deprecated ones.

• According to the documentation, as I understand it, it seems gsfbodoni defines bodoni as the default if you add the [default] option at load time. Jul 31 at 22:30
• @Bernard Yes. But it also does several dubious things and I'd not use it. Aug 1 at 8:01
• I agree with you. In another comment, I pointed that I could not make the code work with MiKTeX. Aug 1 at 8:05
• @Bernard I reworked the answer after a deeper plunge in those packages. Aug 1 at 8:22
• You could make it work! I confess I'm not a TeXpert, I only know well a number of packages, and understand roughly how they work. Aug 1 at 8:30