フィルターのクリア

How to insert tab \t in text?

179 ビュー (過去 30 日間)
John
John 2020 年 9 月 7 日
編集済み: Star Strider 2020 年 9 月 8 日
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!

回答 (2 件)

Star Strider
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.

Walter Roberson
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.

カテゴリ

Help Center および File ExchangeText Data Preparation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by