\documentclass{book}
\usepackage{fontspec}
\usepackage{appendix}
\usepackage{kantlipsum}
\newfontfamily\chapterfont{Verdana}
\makeatletter % https://tex.stackexchange.com/questions/18604/chapter-formatting
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright \chapterfont\fontsize{14pt}{0pt}\bfseries
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter % Check if we are in the main matter
\thechapter.\ % <-- Chapter # (without "Chapter")
%\if@appendix
\appendixname~\thechapter:% <-- "Appendix A:"
\fi
\fi
\interlinepenalty\@M
#1\par\nobreak% <------------------ Chapter title
\vskip 12pt% <------------------ Space between chapter title and first paragraph
}}
\makeatother
\begin{document}
\frontmatter
\chapter{Preface}
\kant[10]
\tableofcontents
\mainmatter
\chapter{This is a chapter}
\kant[1]
\chapter{Second chapter}
\kant
\appendix
\chapter{Appendix title}
\kant[6]
\end{document}
I have adapted the appearance of my main matter chapter titles to be on the same line and without the label "Chapter". However, I would like for my appendices to have the label Appendix. The MWE doesn't achieve this, I've just managed to get LaTeX to print the title twice. Any thougths?
Edit: code should compile now. Generally, I use XeLaTeX because of fontspec.

