I am having difficulties changing the font size of the matlab-prettifier
package. Here is a MWE.
This works great if I am okay with the default font size. But it's too big I think. I'd like to shrink it to something like footnotesize
.
For reference, I am compiling with LuaLaTex.
\documentclass{article}
% Preamble
% ===========================================
\usepackage{fontspec}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage[numbered,framed]{matlab-prettifier}
\usepackage{polyglossia}
\setdefaultlanguage[variant=American]{english}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}
\begin{document}
\begin{lstlisting}[style=Matlab-editor]
view([150 25])
plot(t,sol(:,1))
xlabel('Time')
ylabel('Temperature u(0,t)')
title('Temperature change at center of disc')
\end{lstlisting}
\end{document}
So I try do something like
\begin{lstlisting}[basicstyle=\mlttfamily\footnotesize]
view([150 25])
plot(t,sol(:,1))
xlabel('Time')
ylabel('Temperature u(0,t)')
title('Temperature change at center of disc')
\end{lstlisting}
But it shows up as TeX Gyre Pagella
(I think) and loses all syntax formatting. Definitely not the MATLAB editor font, like it shows when I use just style=Matlab-editor
. I also get a warning saying Font shape `TU/fvm/m/n' undefined. Maybe I am missing a font on my system?