How can one control the format of text and images during copy-paste or Export-to-Word procedure from Live Editor?

조회 수: 7 (최근 30일)
I am preparing a Word document with MATLAB LiveScript code, ouput equations and images. Questions:
  1. Is it possible to control the size of the font when copying and pasting selected text in Live Editor? I seem always to get Consolaas 10.5 size when pasting into Word, even though I set size 10 in MATLAB Preferences>Fonts>Desktop code font.
  2. Is it possible to control the scaling of the equations while pasting, i.e. images of the equations (I realize that the equations are automatically converted to images)? They are all somehow scaled to 50%, but I would like to play around with that.
  3. If one tries to use the Export to Word option, are there any helpful options regarding questions 1 and 2 (font and image size control)?

채택된 답변

Aabha
Aabha 2025년 2월 11일
편집: Aabha 2025년 2월 12일
I was also trying to create a Word document with MATLAB Live Script code, and I faced the same issues. It seems that while copy-pasting code from the LiveScript, or using the “Export to Word” option, there are limited formatting options that MATLAB provides. However, I managed to find a manual workaround to this problem which might help.
While pasting the code in an independent Word document, if the font and font size of the document are customized as per your requirement, the code pasted from the live editor is also formatted as per those settings.
Additionally, while saving a Live Script as a Word document, the equations are converted to images, and scaling is not enabled to ensure consistent rendering across different platforms and versions of Microsoft Word. However, you can try copying and pasting the equation from the output pane of Live Script. Use the “Copy as MathML” option for copying the equation from output pane and paste it into the equation editor of Microsoft Word. This method of copying will enable you to edit the equations in MS Word.
I hope this workaround is helpful to you.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scripts에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by