Live Editor export in Latex doesn't provide formatted code like it gives in word.

2 vues (au cours des 30 derniers jours)
MAzharul Islam
MAzharul Islam le 19 Avr 2021
I am doing my class assignment in live editor (Matlab - R2021a).
When I directly export my work as a .pdf - the figure quality is not satisfactory. If I export as .docx even then the figure quality is not any beeter.
But exporting in latex provides very good quality figure. But the problem in latex is, it doesn't format the code like matlab-prettifier does.
I noticed that auto genrated latex code from matlab uses a custom package called 'matlab'. For code section it uses the following syntex in latex
If use'matlab-pretifier' package and change the syntex from \begin{matlabcode} to \begin{lstlisting} with some formatting defined in the preamble, my code becomes formatted as I want. But it is very annoying since there are many sagments of code in the live editor and I have to change each segment of the code in latex.
I am looking forward to either of this solution -
  1. Either direct exporting option in pdf or docx will produce decent quality figures
  2. Or latex will give formatted matlab code output

Réponses (0)


En savoir plus sur Printing and Saving dans Help Center et File Exchange





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by