Questions tagged [matlab-prettifier]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
71 views

tcolorbox in a footnote

I want to put a tcolorbox (or actually a lstlisting defined by \newtcblisting ) into a footnote. Thus, something like the following (which does not compile) \documentclass{article} \usepackage{matlab-...
user avatar
  • 409
1 vote
2 answers
57 views

Include MATLAB code listing compiled into HTML with correct colors

I am compiling a LaTeX file my_document.tex into an HTML page my_document.html using htlatex with the following command: htlatex my_document.tex "xhtml,mathml-" " -cmozhtf" I have ...
user avatar
1 vote
0 answers
34 views

How to color second words in blue with matlab-prettifier

I'm using the Matlab-prettifier package quite happy with it. Even if it can mimic almost perfectly the Matlab style it just doesn't color second words in blue (like MATLAB does). Somebody know how to ...
user avatar
  • 363
0 votes
1 answer
69 views

How to improve spacing in `lstlisting` environment?

I would like to post some MATLAB codes in beamer using matlab-prettifier. I want to create a main title for codes using title option from lstlisting. However, the result becomes as follows Is it ...
user avatar
0 votes
1 answer
34 views

Automatically include a listing of all files in a folder [duplicate]

My thesis supervisor requires me to include all my MATLAB code in the PDF. My code is scattered in a dozen .m files, all in the same folder. I know I can include code, using the matlab-prettifier ...
user avatar
2 votes
0 answers
63 views

How to customize \lstset for each \lstinputlisting environment in my document?

These are the settings of my overleaf project (they were given to me by my Professor): % Listings and related stuff \usepackage[hyper]{listings} %%%%%%%%%%%%%%%%%%%%%%%% pacchetto caricato da G....
user avatar
  • 491
1 vote
1 answer
205 views

Matlab Code in a Thesis

I'd like to insert matlab code just by copying and pasting the code I want, I'd like it in black, no colours, if it's possible I'd like in a text box with the number of lines, but not necessary if it ...
user avatar
1 vote
1 answer
132 views

Numbers not shown with matlab-prettifier and beamer

I'm trying to add MATLAB code to a beamer presentation, but using matlab-prettifier package numbering isn't showing. Does anybody knows why this is happening? I'm not even sure that using matlab-...
user avatar
  • 11
1 vote
1 answer
34 views

Run and include output of matlab code in document

I want to run a matlab program and include the output in my document. To do this, I'm trying to combine \input and matlab-prettifier. This is what I tried: \begin{lstlisting}[ style = Matlab-...
user avatar
  • 111
1 vote
1 answer
101 views

Matlab Prettifier Package Question

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 ...
user avatar
  • 411
1 vote
1 answer
168 views

Degree symbol and \lstinputlisting

How can I print a degree symbol (°) in a listing with \lstinputlisting? I have noticed the questions based on the lstlisting environment but it does not work with \lstinputlisting. This illustrate the ...
user avatar
  • 454
1 vote
0 answers
44 views

literate's replace option unable to deal with square brackets?

I am using matlab-pretifier to add some Matlab code to an appendix, and I would like to replace the units [g/cm^3] in the matlab code by $\mathrm{\left[g \cdot {cm}^{-3}\right]}$. For that I use the ...
user avatar
0 votes
1 answer
102 views

latex interpretation of selected German and Latin as well as mathematics-physics characters via matlab-prettifier

I want to append some matlab code to a tex document and I use the matlab-prettifier package for that. I updated my miktex installation yesterday and I am now forced to use the \UseRawInputEncoding ...
user avatar
1 vote
1 answer
28 views

Problem with Chapterbib and Matlab-prettifier

I am trying to insert a Maltab code in a Latex document using Matlab-Prettifier. I am configuring the package as indicated below: \usepackage[framed]{matlab-prettifier} \lstset{ style ...
user avatar
1 vote
1 answer
294 views

Different programming language environment using \newtcblisting

In the code given below, I am attempting to generate different programming languages syntax environments. With the current code, I am not able to get output to show up with color highlighted syntax ...
user avatar
  • 8,674
1 vote
1 answer
242 views

Using matlab prettifier to put 100 lines of code per page

I need to put my code for a software I have written in my thesis appendix. There's about 4000 lines of code across multiple files, so I'd like to have 100 lines of code per page. Using these settings,...
user avatar
  • 13
1 vote
1 answer
65 views

compile/interpret matlab code with one single greek character with matlab prettifier

I use the matlab prettifier package with the matlab editor option to compile a file containing matlab code in LaTeX. Question: is it possible to somehow insert a LaTeX-like command for a single ...
user avatar
0 votes
0 answers
263 views

Matlab prettifier problem with *

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); ...
user avatar
  • 23
3 votes
2 answers
331 views

How do I stop matlab-prettifier thinking print strings are comments?

I am trying to put my code into a Latex document using matlab-prettifier. I am doing this by using \lstinputlisting[style=Matlab-editor]{Trap.m}. An example of Trap.m (a MATLAB file) is as follows ...
user avatar
  • 151
1 vote
0 answers
373 views

Minted vs matlab-prettifier for thesis [closed]

I am writing my PhD thesis now for which I need to list snippets of source-code within the main text and full listings in the appendix. I did my coding entirely in MATLAB using advanced constructs ...
user avatar
0 votes
1 answer
227 views

Can't get Bera font with Matlab-prettifier

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 ... \...
user avatar
1 vote
1 answer
552 views

How do i remove numbered lines from the main text in doccument using Matlab-prettifier

I'm using \usepackage[numbered]{matlab-prettifier} but want to insert one line in the main document WITHOUT line numbers. I'm adding MATLAB codes in appendix for which I need the numbers. I'm ...
user avatar
  • 11
2 votes
1 answer
239 views

numbering isn't showing with matlab-pretifier package

does anybody know why this might be? I tried changing my document class from "Article" to "Beamer" and also tried deleting a bunch of packages but nothing has made the numbering on the Matlab-editor ...
user avatar
1 vote
1 answer
2k views

Adjust matlab-prettifier to page width

According to Richard Johnson's Elements of MATLAB Style paragraph 6, it is a best practice to keep content to within 80 characters. Although matlab-prettifier wraps lines nicely, in my opinion, ...
user avatar
  • 13
1 vote
0 answers
77 views

Why doesn´t this new environment work? [duplicate]

I´m using the Matlab-prettifier package to include Matlab-code in my Latex-file, and it generally works, i.e, when I´m using the custom environment from the package: \begin{lstlisting}[style=Matlab-...
user avatar
2 votes
2 answers
1k views

Use of Bera Mono font with \mlttfamily described by matlab-prettifier

I am using latex with pdftex and trying to use the Bera Mono font with the \mlttfamily described by matlab-prettifier documentation. However, my generated output seams to ignore my \lstset basicstyle ...
user avatar
  • 131
0 votes
1 answer
328 views

\endscname error using package matlab-prettifier

I'm trying to prepare a beamer document using the matlab-prettifier package but I come across errors whenever I include a frame where I use code. I always get the following log: ! Missing \endcsname ...
user avatar
  • 3
1 vote
1 answer
871 views

Move listing numbers outside of framed box in Matlab Prettifier

The question is building off the solution give here. How do you remove the mcode package so that listings 1 - 3 will have the Matlab code that resembles the last listing and also contain the line ...
user avatar
  • 8,674
2 votes
1 answer
1k views

Different Matlab code listings environment in same document with Matlab-prettifier

I wanted to be able to have different Matlab code listings in the same document. The first three listings are from the solution found here. How do I get rid of the thin lined boxes in the first 3 ...
user avatar
  • 8,674
0 votes
1 answer
178 views

matlab-prettifier: How to insert a green-colored dots as prebreak argument?

In this MWE, how can I color \ldots, which is the prebreak argument, in green without getting errors? \RequirePackage{luatex85} \documentclass{article} \usepackage[tuenc]{fontspec} \usepackage[...
user avatar
  • 8,789
3 votes
1 answer
2k views

`\lstinputlisting` not respecting basicstyle=\tiny

I am trying to fit MATLAB code in my document without wrapping, but I cannot change the font size when using matlab-prettifier. Here's a MWE using both lstinputlisting and environment style: \...
user avatar
  • 2,528
3 votes
1 answer
2k views

adding frame=none to lstlisting options in \lstdefinestyle gives error with tabular

lstlisting has an option called frame= But when I use the frame=none in \lstdefinestyle and put the lstlisting command inside tabular or longtable I get an error Forbidden control sequence It ...
user avatar
  • 18.3k
2 votes
1 answer
188 views

why is adding subdepth package makes lstlisting give Matlab error loading file?

If I have a dollar each time I find a conflict between Latex packages I would be a rich man. I added \usepackage[low-sup]{subdepth} and now I am starting to get errors from matlab-prettifier when ...
user avatar
  • 18.3k
4 votes
2 answers
684 views

Why font missing message shows up when using standalone and import packages only?

Took me long time to find the cause of this one. From some bizzar reason, when I use standlone package, the font changes in the lstlisting of my Matlab code due to Latex not finding some fonts. I am ...
user avatar
  • 18.3k
2 votes
2 answers
205 views

Conditional formating of a verbatim type argument

I write problem sets whose answer keys contain matlab code. To accomplish this, I'm using matlab-prettifier, but I need to condition the output on whether I'm outputing the problem set questions or ...
user avatar
  • 2,079
1 vote
1 answer
209 views

enclosing a lstlisting environment inside my own environment using matlab-prettifier

I've just started using matlab-prettifier. Since the line \begin{lstlisting}[style=Matlab-editor] is a lot to type, I created my own environment: \newenvironment{myMP} {\begin{samepage}\begin{...
user avatar
  • 2,079