2010-08-23 57 views
0

我正在使用XeTeX 3.1415926-2.2-0.9997.4(TeX Live 2010的一部分)。其新功能之一是字符突出,我想在我的文檔中使用它。問題是我無法完成工作。在xelatex中啓用字符突出的正確方法是什麼?

XeTeX sample來自xetex.tk wiki編譯正確並顯示突出字符。雖然我創建的XeLaTeX文件根本不顯示任何突出部分。

任何人都可以請告訴我做錯了什麼?

\documentclass[12pt]{book} 

\usepackage{xltxtra} 
\usepackage{polyglossia} 

\setmainfont[Mapping=tex-text]{Charis SIL} 
\setmainlanguage{english} 

\def\setprotcode#1{ 
    \rpcode#1 U"0021 55 
    \rpcode#1 U"002C 194 
    \rpcode#1 U"002D 233 
    \rpcode#1 U"002E 194 
    \rpcode#1 U"003B 138 
    \rpcode#1 U"003A 138 
    \rpcode#1 U"003F 94 
    \lpcode#1 U"2018 194 
    \rpcode#1 U"2019 194 
    \lpcode#1 U"201C 250 
    \rpcode#1 U"201D 250 
    \rpcode#1 U"2013 150 
    \rpcode#1 U"2014 200 
} 

\XeTeXprotrudechars=2 
\font\f = "Charis SIL:mapping=tex-text" 
\setprotcode{\f} 

\begin{document} 

In a genetic algorithm, a population of strings (called chromosomes or the 
genotype of the genome), which encode candidate solutions (called individuals, 
creatures, or phenotypes) to an optimization problem, evolves toward better solutions. 
Traditionally, solutions are represented in binary as strings of 0s and 1s, but other 
encodings are also possible. The evolution usually starts from a population of randomly 
generated individuals and happens in generations. In each generation, the fitness of 
every individual in the population is evaluated, multiple individuals are 
stochastically selected from the current population (based on their fitness), 
and modified (recombined and possibly randomly mutated) to form a new population. 
The new population is then used in the next iteration of the algorithm. Commonly, 
the algorithm terminates when either a maximum number of generations has been produced, 
or a satisfactory fitness level has been reached for the population. If the algorithm 
has terminated due to a maximum number of generations, a satisfactory solution may or 
may not have been reached. 

\end{document} 
+0

另外,[here](http://xetex.tk/mediawiki/index.php/Microtype_package_%28preliminary_version%29)中的xelatex示例也不起作用。 Microtype說(即使我像上面的例子那樣手動添加突出部分):「我找不到字體(微型)'EU1/CharisSIL(0)/ m/it/12'的突出列表」 – fjarri 2010-08-23 11:15:28

回答

相關問題