Why is there no code folding option for live scrip editor?
8 次查看(过去 30 天)
显示 更早的评论
I have currently version 2017b and overall I'm very happy with the live editor. I like being able to put scientific code with a lot of background information and then create a .pdf report from that. But there are 2 things which are not implemented well:
- There is no code folding option to hide repeating, not so important parts
- The .pdf export does not wrap the code lines to fit A4 pages, so most of the time it cuts it to the side (In contrast it works well for text)
- No option to change font sizes
0 个评论
回答(2 个)
Matt C
2019-6-19
I second the pdf code cutoff. I get that I can manually break lines of code, but that is tedious. The HTML export automatically resizes to fit code on one line, but not the PDF.
It would be nice to at least have that option.
As a workaround, print to pdf and use landscape orientation.
Alex Fratila
2018-7-27
I'm not sure about hiding repeated code, but if you would like to wrap code lines around (i.e. you have lines of code which are too long, and you'd like to split them over multiple lines), you can do so!
To do this, add ... to the end of each line you're splitting. For example, if I wanted to split the following over three lines:
a = 1 + 2 + 3 + 4 + 5 + 6;
I could do so like this:
a = 1 + 2 + ...
3 + 4 + ...
5 + 6;
Here 's the page for this info. Hope that helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Live Scripts and Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!