Clever Geek Handbook
📜 ⬆️ ⬇️

XeTeX

XeTeX (English pronunciation of “zi- teh ”, that is, ˈziːtɛx or ˈziːtɛk ) is a TeX- like layout system. Supports modern fonts, such as OpenType and AAT . Created by Jonathan Kew under the X11 License , Khaled Hosny is currently developing.

XeTeX
XeTeX-logo.svg
Rare and ancient ligatures in XeTeX.svg
Using various ligatures in XeTeX
Type ofDesktop Publishing Software
AuthorJonathan kew
DeveloperKhaled Hosny
Written onC , C ++ , Pascal
operating systemCross-platform
First edition2004
Latest version0.99996 ( March 19, 2016 )
LicenseMIT License
Sitescripts.sil.org/xetex

Originally developed only for Mac OS X. Now available for all major platforms . It has built-in Unicode support. It is assumed that the input file is encoded in UTF-8 [1] [2] .

Features

XeTeX-logo.svg can use any fonts installed in this OS without configuring TeX fonts .

This allows you to use:

  • OpenType technologies (including localization and extensions), AAT and Graphite as alternative to glyphs and their own ;
  • customizable historical ligatures ;
  • change the font width.

It is also possible to make math using Unicode fonts containing mathematical extensions. You can use Cambria Math as an alternative to the standard layout of formulas.

Example

Next, we describe an example . For readability, it is broken into several pieces. If you combine everything, you get a full Τ Ε Χ file. On the side you can find a thumbnail of the result of such a file in XeTeX-logo.svg . At the very end of the example, an SVG file showing the same result. It was successfully compiled by xelatex from the MikTeX package

Preamble

  \ documentclass { article }		
 \ usepackage { polyglossia } %% downloads a multilingual typesetting package
 \ setdefaultlanguage { russian } %% sets the main language of the document
     % \ setdefaultlanguage [babelshorthands = true] {russian} %% instead of the previous line;  commands from the babel package for the Russian language are available
 \ setotherlanguage { english } %% declares a second document language
 \ defaultfontfeatures { Ligatures = { TeX } , Renderer = Basic } %% font properties by default.  For XeTeX, the Renderer = Basic option can be omitted; it is necessary for LuaTeX
 \ setmainfont [Ligatures = {TeX, Historic}] { CMU Serif } %% sets the main font of the document
 \ setsansfont { CMU Sans Serif } %% sets the sans-serif font
 \ setmonofont { CMU Typewriter Text } %% sets a monospace font
  • The multilingual polyglossia layout package downloads transfer templates. It is necessary if several languages ​​are used in one document; polyglossia replaces the babel package [3] , which has the same functions, but, starting with version 3.9, it can be used with any of the existing compilers, including TeX , PdfTeX , XeTeX, and LuaTeX [4] . Unlike polyglossia, the babel [3] package does not automatically call the fontspec [5] package, which de facto downloads the fonts, so the above example should be modified if the babel [3] package is used:
  \ documentclass { article }		
 \ usepackage [main = russian, english] { babel } %% downloads a multilingual layout package
 \ usepackage { fontspec } %% prepares loading of Open Type, True Type, etc. fonts.
 \ defaultfontfeatures { Ligatures = { TeX } , Renderer = Basic } %% font properties by default
 \ setmainfont [Ligatures = {TeX, Historic}] { CMU Serif } %% sets the main font of the document
 \ setsansfont { CMU Sans Serif } %% sets the sans-serif font
 \ setmonofont { CMU Typewriter Text } %% sets a monospace font
  • The fontspec [5] package prepares the loading of OpenType , TrueType, and other fonts . The \ setmainfont, \ setsansfont, \ setmonofont commands load the three main fonts that are used in normal LaTeX to print text with the commands \ textrm, \ textsf and \ texttt. The \ defaultfontfeatures declaration declares the common properties of all fonts downloaded after it. In this example, Computer Modern Unicode fonts are downloaded, which are included in all modern TeX distributions, including MiKTeX and TeX Live , and the font properties are set to reproduce the behavior of regular LaTeX as closely as possible. Instead of the specified fonts, you can use any other installed in the computer operating system.

Body Text

Pseudographics

We use the symbols of pseudographics :

  \ begin { document }
 \ section { Features }

 \ subsection { A bit of pseudographics }

 The presence of such opportunities illustrates well 
 that you can take full advantage of the font
 \ begin { quote } \ underline { \ itshape Times New Roman: }
	 \ fontspec { Times New Roman } { 
		 │ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟ ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ▀ 
		 █ ▌ ░ ▒ ▓ ■ □ ▪ ▫ ▬ ▲ ► ▼ ◄ ◊ ○ ◌ ● ◘ ◙ ◦ ☺ ☻ ☼ ♀ ♂ ♠ ♣ ♥ ♦ ♪ ♫ ♯ 
	 }
 \ end { quote }

Pangrams

Below, with the help of the panogram "Aerial photography of the landscape has already revealed the land of the rich and prosperous peasants", fonts are tested. When using some PostScript fonts, there are problems with Russian characters.

  \ subsection { Variety of Fonts }

 We will write the pangrams:
 \ begin { quote } \ underline { \ itshape Mechanica: } 
	 \ fontspec { Mechanica } { Aerial photography of the landscape has already revealed the lands of the rich and prosperous peasants.  }
 \ end { quote } 
 \ begin { quote } \ underline { \ itshape Comic Sans MS: } 
	 \ fontspec { Comic Sans MS } { Aerial photography of the landscape has already revealed the land of the rich and prosperous peasants.  }
 \ end { quote } 
 \ begin { quote } \ underline { \ itshape PragmaticaC: } 
	 \ fontspec { PragmaticaC } { Aerial photography of the landscape has already revealed the lands of the rich and prosperous peasants.  }
 \ end { quote } 
 \ begin { quote } \ underline { \ itshape ZhikharevC: } 
	 \ fontspec { ZhikharevC } { Aerial photography of the landscape has already revealed the land of the rich and prosperous peasants.  }
 \ end { quote } 
 \ begin { quote } \ underline { \ itshape Europe: } 
	 \ fontspec { Europe } { Aerial photography of the landscape has already revealed the land of the rich and prosperous peasants.  }
 \ end { quote } 
 \ begin { quote } \ underline { \ itshape IzhitsaC: } 
	 \ fontspec { IzhitsaC } { Aerial photography of the landscape has already revealed the land of the rich and prosperous peasants.  }
 \ end { quote }

Unicode

Let's write the definition of the word Wikipedia in different languages. Note that transcription is typed directly in Unicode .

  \ subsection { Diversity of Languages }
 \ subsubsection { English }  
 Wikipedia (Wikipedia, pronounced / ˌwɪkɪˈpiːdɪə /)
 - free, open, multilingual universal encyclopedia, 
 supported by a nonprofit organization 
 Wikimedia Foundation.

 \ subsubsection { Türkmençe } %% Turkmen
 Wikipedia birnäçe dilde 2001-nji ýylda ýazylmaga başlandy. 
 Örän gysga wagtyň içinde ol tanymal webtaslamasy boldy. 
 Iňlis dilinde 2.8 million, beýleki dillerde bolsa 
 12 milliondan gowrak makala neşir edildi.

 \ subsubsection { Ελληνικά } %% Greek
 Η Βικιπαίδεια (ο όρος προήλθε από το Αγγλικό Wikipedia σε ελεύθερη μεταγραφή) 
 είναι μία διεθνής, ελεύθερου περιεχομένου, 
 εξελισσόμενη δια συνεργασίας εγκυκλοπαίδεια, 
 η οποία βρίσκεται στη διεύθυνση http://www.wikipedia.org στο διαδίκτυο. 
 \ end { document }

Conclusion

The result will look like:

 

Additional features

A separate interesting feature is the ability to use Russian-language commands and macro definitions (in the preamble) (not recommended for use):

  \ newcommand { \ and cop } { $ x $ }
 \ newcommand { \ and Greek } { $ y $ }
 \ newcommand { \ z et } { $ z $ }

 \ newcommand { \ q itata } [1]
     { 
         \ begin { quote } 
             \ textcolor { gray } { # 1 } 
         \ end { quote } 
     }

See also

  • LaTeX
  • LuaTex
  • Tex live
  • MiKTeX

Notes

  1. ↑ Jonathan Kew - Interview . TeX User Community (April 3, 2007). - Interview with the author and chief developer of XeTeX. Date of treatment February 19, 2010.
  2. ↑ Jonathan Kew. An introduction to XeTeX . Official site of the project (June 15, 2005). - Slides for presentation. Date of treatment February 19, 2010.
  3. ↑ 1 2 3 babel - Multilingual support for Plain TEX or LATEX . TeX user community. - Support package for Russian and other languages. Date of treatment April 11, 2013.
  4. ↑ LuaTeX (English) . Wikipedia - A TeX-based computer typesetting system. Date of treatment April 11, 2013.
  5. ↑ 1 2 fontspec - Advanced font selection in X∃LATEX and LuaLATEX . TeX user community. - fontspec - a package for selecting fonts in the X∃LATEX and LuaLATEX system. Date of treatment April 11, 2013.

Literature

  • Michel Goossens. The XeTeX Companion. TeX meets OpenType and Unicode . - 2010.

Links

  • Official site of the project (English)
  • Project Page in TeX Users Group
  • Reference Documentation
  • Documentation and Examples
  • XeTeX mailing list
  • Frequently Asked Questions

Related Package Documentation

  • fontspec (English)
  • polyglossia
  • xltxtra (English)

Tutorials, Articles

  • David J. Perry. Creating Scholarly Multilingual Documents Using Unicode, OpenType, and XeTeX . - 2010.
Source - https://ru.wikipedia.org/w/index.php?title=XeTeX&oldid=98080278


More articles:

  • Virginity
  • Gaul
  • DRI
  • Hinnom Valley
  • Kasyanovka (Sakhnovschinsky district)
  • Lopez, Paci
  • Scaeva
  • Olkhovets (Kimovsky District)
  • Magnetobiology
  • Mozambique at the 1980 Summer Olympics

All articles

Clever Geek | 2019