LaTeX/C3/Indic-Language-Typesetting-in-LaTeX/English
Title of script: Indic Language Typesetting
Author: Meenal Gaba and Preeti Bamane
Keywords: Video tutorial, XeLaTeX, TeXWorks, Ubuntu, Linux, Unicode, Indic languages, Hindi typesetting
Visual Cue | Narration |
Slide 1: Title | Hello and welcome to the spoken tutorial on “Indic language typesetting” |
Slide 2: Learning Objectives | In this tutorial we will learn to,
|
Slide 3: System Requirements | This tutorial is recorded using
The steps demonstrated will work in all operating systems. |
Slide 4: Prerequisites |
|
Slide 5: Code Files |
|
In the downloaded folder
Point to Nirmala.ttf |
In this tutorial we will be installing Nirmala UI font. |
Slide 6: Nirmala UI | This font supports 12 indic scripts as mentioned here. |
Go to Downloads folder >> Indic-Code-Files | First go to the folder where all the files are downloaded. |
Double-click on Nirmala.ttf | Now double-click on the file Nirmala.ttf
|
Click on Install | Click on the Install button located at the top right corner of the window.
|
Point to Installed | Once done, the Install option will be changed to Installed. |
Click on the back button on the left of the Font name.
|
Let us cross verify this.
|
Scroll down | Scroll down to find the newly installed Nirmala UI font in the fonts folder.
|
Slide 7: Font Installation | If Nirmala font file is present in that folder, then installation of the font is successful.
|
Slide 8: Demonstration | Now we will typeset a document in XeLaTeX.
|
[TeXworks] multiLang.tex | I have already opened the file multiLang.tex in TeXworks editor. |
Now let me give an overview of few commands. | |
Highlight fontspec package | Fontspec package allows us to use opentype fonts without installing them.
|
Highlight polyglossia package
|
Polyglossia package allows us to typeset indic languages in a XeLaTeX document.
|
Highlight \setdefaultlanguage{english} | I have set the default language as English using the command setdefaultlanguage.
|
Highlight
\setotherlanguages{hindi, tamil, bengali, telugu, malayalam} |
setotherlanguages command helps us to mention the languages which we are going to use here.
|
Highlight \newfontfamily
|
Using the newfontfamily command I have declared the font for each language. |
Highlight Nirmala UI font | Here I have used Nirmala UI font for all the languages.
|
Highlight
\bigskip \par \textbf{English} \par Knowledge is the supreme goal \medskip \textbf{Tamil} |
Next to the begin document, I have written a few lines of code.
|
Highlight \selectlanguage
|
Before typing the text in a language other than the default one, we have to use the command selectlanguage.
|
Highlight
\par \selectlanguage{tamil} அறிவு மிகச் சிறந்த இலக்கு \medskip |
Say, in this piece of code, I wish to display my text in Tamil.
|
Highlight the complete code. | Likewise, I have written the code for the rest of the languages.
|
Point to the drop down in the top left corner.
|
Select XeLaTeX as the compiler from the dropdown on the top toolbar.
|
Click on the green Typeset button
|
Run the code by clicking on the green Typeset button at the top left corner. |
Point to the output | Observe the output pdf.
|
[TeXworks] multiLang.tex
\newfontfamily\tamilfont[Script=Tamil]{Nirmala UI} \newfontfamily\bengalifont[Script=Bengali]{Nirmala UI} \newfontfamily\telugufont[Script=Telugu]{Nirmala UI} \newfontfamily\malayalamfont[Script=Malayalam]{Nirmala UI} |
In this example, I have used the font bundle Nirmala UI for all the languages.
|
Slide 9: Indic Fonts
|
For this part of the demonstration, I will be using these fonts for the respective languages.
|
[TeXworks] multiLang.tex
\newfontfamily\tamilfont[Script=Tamil]{Latha} \newfontfamily\bengalifont[Script=Bengali]{Shonar Bangla} \newfontfamily\telugufont[Script=Telugu]{Gautami} \newfontfamily\malayalamfont[Script=Malayalam]{Kartika} |
In the multiLang.tex file, update the font declaration as shown here.
|
Compile the file. | Let us compile this file to see the output.
|
Point to the output | Observe that there is no change in the output, other than the font style. |
Only Narration | So using any one of these methods, one can typeset indic languages in a LaTeX document. |
[TeXworks] multiLang.tex
|
Important note.
|
[TeXworks] multiLang.tex
அறிவு மிகச் சிறந்த இலக்கு |
Copy the text written in any language and paste it next to the line, Knowledge is the supreme goal.
|
Compile the file. | Let us compile this file to see the output. |
[TeXworks] multiLang.tex
\par Knowledge is the supreme goal அறிவு மிகச் சிறந்த இலக்கு \medskip
\par \selectlanguage{tamil} அறிவு மிகச் சிறந்த இலக்கு \medskip |
In this code we have written a line of text in Telugu twice.
|
Point to the output | But in the output pdf, we can only see the text which is written after the selectlanguage command.
|
With this we have come to the end of this tutorial.
Let us summarise. | |
Slide 10: Summary | In this tutorial we learnt
|
Slide 11: Assignment | As an assignment:
|
Slide 12: About Spoken Tutorial project | The video at the following link summarises the Spoken Tutorial project.
|
Slide 13: Spoken Tutorial workshops | The Spoken Tutorial Project Team conducts workshops and
gives certificates.
|
Slide 14: Forum for specific questions | Please post your timed queries in this forum |
Slide 15: Acknowledgement | Spoken Tutorial Project is funded by MHRD, Government of India.
More information on this Mission is available at this link. |
Slide 16: Thanks Slide | The script was contributed by Meenal and Preeti, FOSSEE Summer Fellows 2019.
Thanks for joining. |