Effacer les filtres
Effacer les filtres

Why is there no code folding option for live scrip editor?

2 vues (au cours des 30 derniers jours)
Sebastian Schmid
Sebastian Schmid le 27 Juil 2018
Commenté : Belinda Finlay le 28 Fév 2020
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

Réponses (2)

Matt C
Matt C le 19 Juin 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
Alex Fratila le 27 Juil 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!

Catégories

En savoir plus sur Live Scripts and Functions dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by