Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Sebastian Schmid
Sebastian Schmid el 27 de Jul. de 2018
Comentada: Belinda Finlay el 28 de Feb. de 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

Respuestas (2)

Matt C
Matt C el 19 de Jun. de 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 el 27 de Jul. de 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!

Categorías

Más información sobre Live Scripts and Functions en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by