luong-komorebi / Begin-Latex-in-minutes

📜 Brief Intro to LaTeX for beginners that helps you use LaTeX with ease.
https://luong-komorebi.github.io/Begin-Latex-in-minutes/
3.28k stars 269 forks source link

On LaTeX compilers and Unicode #9

Closed Kwpolska closed 8 years ago

Kwpolska commented 8 years ago

Some languages won't work right out of the box. You will need to include some packages for the font to render. Also, you will learn about "packages" later. For example:

\documentclass[a4paper]{article}

\usepackage[T5]{fontenc}
\usepackage[utf8]{inputenc}

\begin{document}

Xin chào thế giới. This is Hellow World in Vietnamese.

\end{document}

It looks like you’re still living in the 90s where Unicode support was neglected. You see, two projects have solved this problem: XeTeX and LuaTeX. Those are two compilers with Unicode support.

\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainfont[]{Baskerville} % any TTF or OTF fonts from my system will do
\begin{document}
Xin chào thế giới. This is Hello World in Vietnamese.

The quick brown fox jumps over the lazy dog.

Pchnąć w tę łódź jeża lub ośm skrzyń fig.

Quiere la boca exhausta vid, kiwi, piña y fugaz jamón.

Vogt Nyx: »Büß du ja zwölf Qirsch, Kämpe!«

Любя, съешь щипцы, — вздохнёт мэр, — кайф жгуч.
\end{document}

International TeX with Baskerville

If I don’t set any font (remove line with comment), the font will default to Latin Modern, which is a reworking of Computer Modern with support for many Latin diacritic characters. The Russian part fails.

International-ish TeX with Latin Modern

In TeXstudio (and probably TeXMaker): change Build → Default Compiler in the settings. I’m using LuaLaTeX.

luong-komorebi commented 8 years ago

It looks like you’re still living in the 90s where Unicode support was neglected.

I was sharing what I was taught 😃 It may be limited so yeah, maybe I am a little outdated. I will try your suggestion and update the guide ASAP. Thank you for your suggestions 👍

@Kwpolska Can you do a pull request adding LaTeX compilers / editors that you favor in the Additional Tools section?