楼主: oliyiyi
1070 0

Getting started with XeLaTeX [推广有奖]

版主

泰斗

0%

还不是VIP/贵宾

-

TA的文库  其他...

计量文库

威望
7
论坛币
271951 个
通用积分
31269.3721
学术水平
1435 点
热心指数
1554 点
信用等级
1345 点
经验
383775 点
帖子
9598
精华
66
在线时间
5470 小时
注册时间
2007-5-21
最后登录
2024-4-30

初级学术勋章 初级热心勋章 初级信用勋章 中级信用勋章 中级学术勋章 中级热心勋章 高级热心勋章 高级学术勋章 高级信用勋章 特级热心勋章 特级学术勋章 特级信用勋章

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

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:

  1. \documentclass{article}
  2. \usepackage{fontspec,lipsum}
  3. \defaultfontfeatures{Ligatures=TeX}
  4. \usepackage[small,sf,bf]{titlesec}

  5. \setromanfont{Georgia}
  6. \setsansfont{Tahoma}

  7. \begin{document}
  8. \section{Introduction}

  9. \lipsum[1]

  10. \section{Nonsense}

  11. \lipsum[2-4]
  12. \end{document}
复制代码


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.



二维码

扫码加我 拉你入群

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

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

关键词:getting Started Start LaTeX atex started

缺少币币的网友请访问有奖回帖集合
https://bbs.pinggu.org/thread-3990750-1-1.html
您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-1 03:05