0

In the MWE below, I have a class called test.cls which loads scrartcl with the fleqn option. In main.tex, I load this class, however, the fleqn option seems to be lost--unless I pass fleqn--which I would rather not. I think the problem relates to kpfonts-otf. Perhaps it checks if fleqn was passed to the base-class and loads amsmath (which is needed for align?)?

test.cls

\ProvidesClass{test}
\LoadClass[fleqn]{scrartcl}
\usepackage{kpfonts-otf}
% If I don't load kpfonts-otf (and load amsmath instead), it works
% \usepackage{amsmath}
\PassOptionsToClass{fleqn}{scrartcl}  % doesn't help

main.tex

%%% test 1: behaviour I want, but I don't want to pass fleqn
% \documentclass[fleqn]{test} % required 
%%% 

%%% test 2: "interface" I want, but fleqn seems to be lost
\documentclass{test}
%%%

%%% test 3: but if I move the contents of test.cls in here instead
% \documentclass[fleqn]{scrartcl}
% \usepackage{kpfonts-otf}
%%% it works

\begin{document}

hello.

\begin{align}
y = mx + b 
\end{align}

\end{document}

1 Answer 1

0

The fix is to load amsmath with fleqn before the font.

\usepackage[fleqn]{amsmath}
\usepackage{kpfonts-otf}

You must log in to answer this question.

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