Live Editor export in Latex doesn't provide formatted code like it gives in word.
4 次查看(过去 30 天)
显示 更早的评论
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
\begin{matlabcode}
.
.
\end{matlabcode}
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 -
- Either direct exporting option in pdf or docx will produce decent quality figures
- Or latex will give formatted matlab code output
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!