[XeTeX] mapping and Latin Modern font

Peter Dyballa Peter_Dyballa at Web.DE
Wed Jul 4 00:47:52 CEST 2007


Am 03.07.2007 um 18:31 schrieb Alex Hamann:

>    \usepackage{xunicode, fontspec}
> gives me everything I want except for the correct mapping of
> ligatures e.g. "--" and "---"

To "convert" (or translate) the "TeX macros" into Unicode you need to  
choose from particular "font features," at least this basic one:  
Mapping=tex-text. Second step is load the font you wish:

	\documentclass[a4paper]{article}
	\usepackage{xunicode, fontspec}
	\defaultfontfeatures{Mapping=tex-text}
	\setromanfont{LM Roman 10pt}
	
	\begin{document}
	  À«--»Ï»---«Á
	\end{document}
	
	
	\documentclass[a4paper]{article}
	\usepackage{xunicode, fontspec}
	\defaultfontfeatures{Mapping=tex-text}
	\setmainfont{LM Roman 10pt}
	
	\begin{document}
	  À«--»Ï»---«Á
	\end{document}


You can "unite" both steps:

	\documentclass[a4paper]{article}
	\usepackage{xunicode, fontspec}
	\setmainfont[Mapping=tex-text]{LM Roman 10pt}
	
	\begin{document}
	  À«--»Ï»---«Á
	\end{document}
	
	
	\documentclass[a4paper]{article}
	\usepackage{xunicode, fontspec}
	\setromanfont[Mapping=tex-text]{LM Roman 10pt}
	
	\begin{document}
	  À«--»Ï»---«Á
	\end{document}


--
Mit friedvollen Grüßen

   Pete

Wenn man die Redlichkeit eines Politikers allzu laut betont, zweifelt  
man an seinen Fähigkeiten.
                                -- Charles Maurice de Talleyrand




More information about the XeTeX mailing list