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 want to use typographic apostrophe (’) in my document. Using a simple ' don't give the same result.

I can type the ’ on my keyboard. But XeTeX take it as a normal character, ie. like a letter, and it can generate bad hyphenation like this (using the xmemoire class) :

\documentclass{xmemoire}
\usepackage{wrapfig} 
\lccode`\’=0
\begin{document}
\begin{wrapfigure}{R}[1cm]{0.33\linewidth}
         \begin{center}
          \caption{{\normalfont { Logo associé à l’\textit{ERC Starting Grants} d’Analyse de la maturation cérébrale.}}}
          \label{figbb}
        \end{center}
\end{wrapfigure}
\end{document}

How do I avoid hyphenation around ’, or more generally around a given character, in all the document (I know I can use mbox for local forcing).

share|improve this question
2  
Make a small, but complete example that demonstrates your problem. Also tell us the version of your xetex and the packages. –  Ulrike Fischer May 10 '12 at 14:26
    
Are you using a package like Babel or Polyglossia with which you can get the language of the document? Those packages should prevent hyphenation at apostrophes as you are encountering. –  Amphipolis May 10 '12 at 14:35
    
With \usepackage{polyglossia}\setmainlanguage{french} I get only l’apos-trophe. –  egreg May 10 '12 at 16:13
    
Here is a simple example which reproduce my problem, I use xmemoire as document class (sorry but it seems I can't insert new lines in comments): \documentclass{xmemoire} \usepackage{wrapfig} \begin{document} \begin{wrapfigure}{R}[1cm]{0.33\linewidth} \begin{center} \caption{{\normalfont { Logo associé à l’\textit{ERC Starting Grants} d’Analyse de la maturation cérébrale.}}} \label{figbb} \end{center} \end{wrapfigure} \end{document} –  psychoslave May 11 '12 at 7:02
    
My XeTeX version : This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian) –  psychoslave May 11 '12 at 7:07

1 Answer 1

up vote 3 down vote accepted

Something like

\lccode`\’=0

should turn that character into a symbol not considered as a word constituent. Note that I don't really have experience with XeTeX: this is based on the assumption that XeTeX will treat characters beyond 8bit just like below.

share|improve this answer
    
It works, thank you very much. –  psychoslave May 11 '12 at 7:21

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.