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'm using XeTeX (MacTex 2010, Mac OSX 10.6) to render a document in Apple Hoefler Text. However, although I can make it render common ligatures, such as fi and ffi, I can't seem to be able to force it using some extended ligatures as those displayed here. Any suggestions? Here's the code I am using:

\documentclass[10pt]{article}
\usepackage{fontspec,xltxtra}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\fontspec[Mapping=tex-text, Ligatures={Common, Rare, Historic}]{Hoefler Text}

\begin{document}\noindent
Que dictes vous de mon appel, \\
Toute beste garde sa pel \\
Qui la constraint, efforce ou lie
\end{document}
share|improve this question
    
Possible duplicate: Ligatures in Hoefler with XeTeX? –  Hendrik Vogt Feb 7 '11 at 18:13
    
It seems the duplicated article is only focused on rendering any ligatures, while my question is about rendering the extended family of ligatures. –  Hugo S Ferreira Feb 7 '11 at 18:18
    
@Hugo: Thanks for explaining. –  Hendrik Vogt Feb 7 '11 at 18:23
    
Are you running OSX 10.5.x or 10.6.x? –  morbusg Feb 7 '11 at 18:32
    
@morbusg: Just added the MacTex and OSX versions. –  Hugo S Ferreira Feb 7 '11 at 18:35
show 5 more comments

2 Answers 2

up vote 3 down vote accepted

Did you try to compile the examples given by Dario Taraborelli on his page, The Beauty of LATEX, especially the Hoefler sample? It seems to work for me (OS X 10.6, TexLive 2010). The trick is to pass Alternate=1 to \fontspec (see the fontspec documentation with e.g. texdoc), as in

\fontspec[Ligatures={Common, Rare}, Alternate=1]{Hoefler Text}
\fontsize{24pt}{30pt}\selectfont 
\noindent
Que dictes vous de mon appel, \\
Toute beste garde sa pel \\
Qui la constraint, efforce ou lie\\

for the third paragraph below:

enter image description here

share|improve this answer
    
Thank you, that worked. Do you know how to disable the Alternate for \emphs{} and keep it for normal font? –  Hugo S Ferreira Feb 7 '11 at 19:45
1  
Found the answer: \setmainfont[Mapping=tex-text, ItalicFeatures={Alternate = 0}, Ligatures={Common,Rare,Historic},Alternate=1]{Hoefler Text} –  Hugo S Ferreira Feb 7 '11 at 20:15
add comment

For me

\documentclass[10pt]{article}
\usepackage{fontspec}
\setromanfont[Mapping=tex-text,Ligatures={Common, Rare}]{Hoefler Text}
\begin{document}
\noindent
Que dictes vous de mon appel, \\
Toute beste garde sa pel \\
Qui la constraint, efforce ou lie
\end{document}

works but something like

\documentclass[10pt]{article}
\usepackage{fontspec}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\fontspec[Ligatures={Common, Rare}]{Hoefler Text}
\begin{document}
\noindent
Que dictes vous de mon appel, \\
Toute beste garde sa pel \\
Qui la constraint, efforce ou lie
\end{document}

does not. So you need to watch that you set your font features with the main loading, if you do it in the preamble (all is fine if you put \fontspec[Ligatures={Common, Rare}]{Hoefler Text} after \begin{document}).

share|improve this answer
    
(+1) That's very nice because I've look for old sample code where I saw that behavior but without any success.... –  chl Feb 7 '11 at 21:50
add comment

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.