0

I'm trying to use the matlab-prettifier. Following code does not compile:

\begin{lstlisting}[
style      = Matlab-editor,
basicstyle = \mlttfamily,
]
ro=zeros(length(prec),length(prec)+length(h)-1);
for i=t
    ro(i,i:i+length(h)-1)=prec(i) * h;
end 
runoff = sum(ro,1);
\end{lstlisting}

As soon as I remove the *, it works. Also if I just use the lstlisting environment without

[
    style      = Matlab-editor,
    basicstyle = \mlttfamily,
    ]

and put the * back in, everything works fine. I followed the official documentation: https://github.com/Jubobs/matlab-prettifier/wiki Is there a bug in the matlab-prettifier, or am I doing sth wrong?

*EDIT: Following you will find a MWE:

\documentclass[10pt,a4paper]{report}
\usepackage[a4paper, left=2cm, right=2cm, top=2cm]{geometry}

\usepackage[numbered,framed]{matlab-prettifier}

\begin{document}

    \begin{lstlisting}[
    style      = Matlab-editor,
    basicstyle = \mlttfamily,
    ]
    ro=zeros(length(prec),length(prec)+length(h)-1);
    for i=t
    ro(i,i:i+length(h)-1)=prec(i) * h;
    end 
    runoff = sum(ro,1);
    \end{lstlisting}

\end{document}

This is the output of Texstudio:

Prozess gestartet: pdflatex.exe -synctex=1 -interaction=nonstopmode "matlabprettifier".tex

Sorry, but miktex-makemf did not succeed. The log file hopefully contains the information to get MiKTeX going again: C:\Users\Karl\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.l

og

Sorry, but miktex-makepk did not succeed. The log file hopefully contains the information to get MiKTeX going again: C:\Users\Karl\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makepk.log

Prozess endete mit Fehler(n)

*EDIT2 Following, you will find the output of makepk and makemf:

makepk:

2019-04-06 17:25:23,589+0200 INFO miktex-makepk - starting with command line: miktex-makepk --enable-installer --verbose fvmr8r 510 600 0+510/600 2019-04-06 17:25:23,592+0200 INFO makepk - Trying to make PK font fvmr8r at 510 DPI... 2019-04-06 17:25:23,604+0200 INFO makepk - The METFAONT mode is: ljfour 2019-04-06 17:25:23,614+0200 INFO makepk - Running miktex-makemf.exe... 2019-04-06 17:25:23,614+0200 INFO makepk - running: miktex-makemf.exe --miktex-enable-installer --verbose fvmr8r 2019-04-06 17:25:23,956+0200 INFO makepk - Running miktex-ttf2pk.exe... 2019-04-06 17:25:23,957+0200 INFO makepk - running: miktex-ttf2pk.exe --miktex-enable-installer -q -t fvmr8r 2019-04-06 17:25:24,507+0200 FATAL miktex-makepk - PK font fvmr8r could not be created. 2019-04-06 17:25:24,507+0200 FATAL miktex-makepk - PK font fvmr8r could not be created. 2019-04-06 17:25:24,507+0200 FATAL miktex-makepk - Info: 2019-04-06 17:25:24,507+0200 FATAL miktex-makepk - Source: 2019-04-06 17:25:24,507+0200 FATAL miktex-makepk - Line: 0

makemf:

2019-04-06 17:25:23,888+0200 INFO miktex-makemf - starting with command line: miktex-makemf.exe --miktex-enable-installer --verbose fvmr8r 2019-04-06 17:25:23,899+0200 FATAL miktex-makemf - The fvmr8r source file could not be found. 2019-04-06 17:25:23,899+0200 FATAL miktex-makemf - The fvmr8r source file could not be found. 2019-04-06 17:25:23,899+0200 FATAL miktex-makemf - Info: 2019-04-06 17:25:23,899+0200 FATAL miktex-makemf - Source: 2019-04-06 17:25:23,899+0200 FATAL miktex-makemf - Line: 0

  • Could you please make a MWE (minimal working example that allows others to reproduce the issue you describe. Adding the error message to your question could also be helpful. If I use your code and add a documentclass as well as the relevant packages your code compiles just fine. – leandriis Apr 6 at 15:16
  • ok, one moment, I will add it as an edit – Karl Apr 6 at 15:21
  • sorry I already edited it, didn't notice your comment. The document runs without error when I try it. – David Carlisle Apr 6 at 15:26
  • ok, I will also add the error logs of makemf and makepk, maybe you or someone else can find something – Karl Apr 6 at 15:29
  • 1
    so it is not directly related to the matlab code at all, you simply don't have tha bera fonts installed, in texlive I get /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/bera/fvmr8r.tfm not sure how to update miktex to have the fonts – David Carlisle Apr 6 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.