Unable to disable hyphens in PDF template report

4 次查看(过去 30 天)
I am using Matlab R2016a and am creating a pdf report using Report Generator with a custom Direct PDF template. When I generate the report my paragraphs have hyphenated words (instead of just having the complete word on a new line). In the .css I have attempted to add "hyphens:none;" to p.rgParagraph{} which is the style specified in the paragraph component. I have also attempted to create my own style to attach to the paragraph component and set "hyphens:none", but the issue persists. I also observe this behaviour in the "Default PDF Template". Any guidance on this issue would be great appreciated.

采纳的回答

Paul Kinnucan
Paul Kinnucan 2017-5-24
In R2016a, add -fo-hyphenation:false to the paragraph style in your PDF style sheet, for example,
p {font-family: rg-body;-fo-hyphenate: false; }
Note that in R2016a you can use a particular style selector only once in a style sheet. For example, the following causes an error:
p {font-family: rg-body;}
p {-fo-hyphenate: false;}
Starting in R2016b, the following suppresses hyphenation:
p { hyphenation: none; }

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by