Why is there no code folding option for live scrip editor?
1 view (last 30 days)
Show older comments
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 Comments
Answers (2)
Matt C
on 19 Jun 2019
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
on 27 Jul 2018
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 Comments
See Also
Categories
Find more on Live Scripts and Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!