How do I include line breaks without extra space using report generation toolbox?
Afficher commentaires plus anciens
Hello!
I am trying to place a footer into a word document with four lines that do not have extra space between lines. I have tracked the problem down to the "after" field in the paragraph settings in word. So far I have tried : [1]to put each line into a text object, add each object into a paragraph and append that to the document. This gets four lines with a large space between lines related to the number in 'above' in the word paragraph menu. [2] use 'sprintf('%s\n','line of text') as the input into the text object, (textObj = Text();). same result as [1] [3] WhiteSpace(1) into the 'Style' of the text object and/or the paragraph object. No effect if in the text object or paragraph. In the paragraph, the output is one continuous line and the line break does not get registered. [4] add the text as one text object with sprintf with three line breaks. same as [3]
Thanks!
Réponses (1)
Archita P
le 8 Août 2016
0 votes
When trying to include line breaks without extra space in a word document, you can use the option: Style > Retain spaces and carriage returns.
The following documentation contains more details on formatting and inserting text in a report: http://www.mathworks.com/help/rptgen/ug/text.html
-Archita
Catégories
En savoir plus sur Work with Components dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!