12

I keep getting this error whenever I start an article with the basic set of packages:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{kpfonts}
\usepackage{fourier}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}
text
\end{document}

I understand it's the command \widering being defined in two different packages at the same time, but I don't know how to get around the problem. How could I fix the issue?

2

1 Answer 1

14

Loading kpfonts together with fourier does not make sense: they are both font packages that define a font family (with accompanying math fonts) for the document. So, even if there were no error message, loading kpfonts before fourier would result in the former package being overridden by the latter.

So the remedy is simple:

  • if you want the Fourier fonts (based on Utopia), remove \usepackage{kpfonts};

  • if you want the KPfonts, remove \usepackage{fourier};

  • if you want the standard Computer Modern fonts, remove both.

1
  • Package yhmath shows a similar conflict with kpfonts, while not with lmodern.
    – Andrestand
    Dec 27, 2023 at 13:29

You must log in to answer this question.