Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am testing microtype v2.5 with XeLaTeX and have checked the font protrusion features. With the default features, the hyphen protrudes at a hyphenation about 50 per cent of its width. Nonetheless, I'd like to increase the protrusion factor for this character when setting text with the default roman font, and I have tried by typing in the preamble

\SetProtrusion{encoding=*,family=rm*}{"002D={1000,1000}}

expecting to get full-width protrusion, but nothing changed. I have also typed directly the hyphen sign - instead of its unicode value 002D (hex), in the code above, but it remained the same. Furthermore, no matter the factor figures I set, nothing seems to change. I may be using the wrong code, but if so, how could I amend it?

EDIT: After having commented upon Honza's answer I checked that the way to refer to unicode glyphs in terms of their hexadecimal encoding is not the TeX way as in \char"002D, but simply "002D without the control sequence \char. Moreover, just in case someone stumbles upon it, in order to set the protrusion factor for a comma it seems that the unicode "002C must be used -- the character "," itself won't do (maybe because it is used as a delimiter in the microtype command).

share|improve this question
    
Please post an MWE that generates the unwanted behavior you're trying to address. –  Mico Jul 31 '12 at 1:39
    
The microtype package v2.4 (the current version that is available for me) does not work with XeTeX. –  stalking is prohibited Jul 31 '12 at 2:48
2  
@HiggsBoson you can find a beta version of v2.5. at tlcontrib: tlcontrib.metatex.org –  Ulrike Fischer Jul 31 '12 at 7:35

1 Answer 1

up vote 2 down vote accepted

I think the problem might be in the character you are trying to adjust. With the hex specification \char"002D the protrusion does not work for me, however, if I replace it with -, which I copied out from the PDF, or a regular hyphen -, it works without problems.

share|improve this answer
2  
I tried an MWE using only memoir as class, together with the packages fontspec, microtype, and lipsum, and there it was. I had been using this in a class of my own loading many different packages, and it didn't work. After checking the MWE, I tried loading microtype as the last package in my class, and then it worked. Hence, it was all about the package loading arrangement. I'm afraid I cannot tell what packages were colliding with microtype, but it was solved like that. Honza's is the right answer anyway if we stick to the question I post. Thanks so much to everyone. –  Marcos Jul 31 '12 at 11:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.