Unable to disable hyphens in PDF template report

1 vue (au cours des 30 derniers jours)
Allan Brett
Allan Brett le 23 Mai 2017
Commenté : Allan Brett le 24 Mai 2017
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.

Réponse acceptée

Paul Kinnucan
Paul Kinnucan le 24 Mai 2017
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; }

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by