全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 LATEX论坛
1299 0
2016-03-06

By now, most LaTeX users have probably heard of XeLaTeX, if only because it is an option in the latest versions of the standard LaTeX editors such as TeXnicCenter, WinEdt and TeXWorks. But most LaTeXers have probably not yet become XeLaTeXers. Why should you?

XeLaTeX is essentially a replacement for pdfLaTeX. It was primarily developed to enable better font handling, especially non-Roman scripts. If you want to write in Telugu, then XeLaTeX is going to make your life much easier. For English writers, the main benefit of XeLaTeX is the ability to use the fonts on your computer, just as you can with other software. If you’ve grown to love using Georgia in MS-Word and always wanted to write a LaTeX document in Georgia, now you can.

Here is a very simple example:

复制代码


Note the following features:

  • The fontspec package is almost always necessary with XeLaTeX and contains commands to load the required fonts.
  • You usually need the command \defaultfontfeatures{Ligatures=TeX}. This is so the new fonts behave in the way we’ve come to expect with LaTeX, such as allowing an em-dash to be written as ---.
  • The two fonts that are loaded (Georgia and Tahoma in this example) are fonts available in my Windows fonts directory.
  • The titlesec package is loaded only so headings are in sans-serif bold in order to show the effect of the font changes.
  • The lipsum package provides some nonsense text for testing purposes.

A disadvantage of using XeLaTeX is that most of the fonts on your computer will not come with enough fancy characters (known as glyphs) for mathematics. So maths has to be set using a standard LaTeX font. Consequently, I am not using XeLaTeX for my mathematical documents, but I have started trying it out on non-mathematical documents.



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群