How to insert tab \t in text?
조회 수: 169 (최근 30일)
이전 댓글 표시
import mlreportgen.dom.*
rpt = Document('Report_Pages','pdf');
open(rpt);
text = '\n This is a line \t\t with a space.';
title = make_paragraph(text,[],[],'12pt');
append(rpt, title);
...
The '\t' doen't have any effect.
Thank you for help!
댓글 수: 0
답변 (2개)
Star Strider
2020년 9월 7일
편집: Star Strider
2020년 9월 8일
The text-based functions (including legend, title, xlabel, ylabel, and zlabel) do not recognise ‘\t’. Insert spaces manually instead.
EDIT — (8 Sep 2020 at 0:46)
I add that using ‘\t’ with sprintf in any text-based function has never worked when I tried it. Just use spaces, as I suggested earlier.
댓글 수: 0
Walter Roberson
2020년 9월 8일
편집: Walter Roberson
2020년 9월 8일
title = make_paragraph(sprintf(text),[],[],'12pt');
Whether this will have any effect on the output is a completely different question.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Data Preparation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!