Open jdhanyang opened 7 months ago
输入 tab 是用来对齐用的,代码如下:
auto p = doc.AppendParagraph("甲 方:\t\t\t\t乙 方:", 12, "Times New Roman", "宋体");
以上的 \t 并不起作用,生成的文件中被替换成了空格,请教应如何输入 tab 控制符
@jdhanyang, have you tried to do this? Its only and higher C++11 feature.
auto p = doc.AppendParagraph(R"(甲 方:\t\t\t\t乙 方:)", 12, "Times New Roman", "宋体");
@GermanAizek
Thanks, but it doesn't work.
auto p = doc.AppendParagraph(R"(甲 方:\t\t\t\t乙 方:)", 12, "Times New Roman", "宋体");
result is:
甲 方:\t\t\t\t乙 方:
Microsoft Visual Studio Community 2022 (64 位) , ISO C++14 标准 (/std:c++14)
try this:
auto r = doc.AppendParagraph().AppendRun();
r.AppendText(u8"甲方:");
r.AppendTabs(4);
r.AppendText(u8"乙方:");
输入 tab 是用来对齐用的,代码如下:
auto p = doc.AppendParagraph("甲 方:\t\t\t\t乙 方:", 12, "Times New Roman", "宋体");
以上的 \t 并不起作用,生成的文件中被替换成了空格,请教应如何输入 tab 控制符