0

I've used Matlab-Prettifier in the past to format my Matlab code, but having moved out of ShareLaTeX and into a local environment, I can't seem to get the Bera Mono font. E.g., the code ...

\documentclass[11pt]{article}

% Matlab-Prettifier Setup
\usepackage{listings}
\usepackage{xcolor}
\usepackage[T1]{fontenc}
\usepackage[numbered,framed]{matlab-prettifier}
\let\ph\mlplaceholder % shorter macro
\lstMakeShortInline"
\lstset{
style              = Matlab-editor,
basicstyle         = \mlttfamily,
mlshowsectionrules = true
}

\begin{document}

\begin{lstlisting}[
    style=Matlab-editor,
    basicstyle=\mlttfamily,
    escapechar=`,
    caption={For educational purposes},
]
if a == b
    a
end
\end{lstlisting}
\end{document}

... produces the output without the Bera font:

enter image description here

1 Answers1

1

Following suggestions in the comments it turned out the font was simply missing (I'm using a very slim distribution) – a set of warnings could be found in the log file.

Fixed the problem by downloading font files, and installing them by following the instructions in the included Readme file & these instructions.