Friday, December 11, 2020

Typesetting in Tamil For Multilingual Documents

 

When you are typesetting Multilingual document it doesn't make sense to load Polyglossia or Babel package just for a single line. All one has to load is the Fontspec package and the requisite font. Whenever Fontspec package is loaded it must be compiled in either XeLaTeX or LuaLaTex. Here is the minimal working example.

\RequirePackage[orthodox]{nag}
\documentclass[12pt,a4paper]{article}
\usepackage{fontspec}
\usepackage{ClearSans}
\usepackage{courier}
\newfontfamily{\TACtam}{Lohit Tamil}
\newfontfamily{\ctam}{Noto Sans Tamil Supplement}
\begin{document}
    normal  \emph{italic} \textbf{extra bold} \textit{italy} \texttt{help}
    {\TACtam அய்யா வணக்கம்.}{\ctam 𑿀}
\end{document}

You can name the Commands \TACtam and \ctam , wordings of your choice, this is saying to XeLaTeX to encode the fonts in Tamil.

 Reference: 

https://tex.stackexchange.com/a/241960/229186

Setting up Font For Bold and Italic in LaTeX

 To Set up font for bold and italic in LaTeX, one has to load the Fontspec package. But first make sure the font you are using has both the bold and italic glyphs or make sure the fonts you are going to use matches else it would be very awkward and look very unprofessional. Most of the time  the fontspec package can load a font with its given name such as Times New Roman or Noto Sans. If you mentioned a font by its file name then make sure you mention the Bold and Italic fonts.In This you can also set the default typewriter font, For example if you want to load the courier as the default typewriter font all you had to is load the package Here is the Minimal Working example.

\Requirepackage[orthodox]{nag}                    \documentclass{article}                       \usepackage{fontspec}               \setmainfont{texgyrepagella-regular.otf}[BoldFont= texgyrepagella-bold.otf ,ItalicFont= texgyrepagella-italic.otf , BoldItalicFont = texgyrepagella-bolditalic.otf]          \usepackage{courier}                                \begin{ document}                                  \end{document}

 

Reference:

https://tug.org/FontCatalogue/courier/

https://www.ctan.org/search?phrase=fontspec

https://tex.stackexchange.com/a/31743/229186 


Thursday, December 10, 2020

Typesetting in Tamil using Babel in XeLaTeX

 

 I have written in an previous post on how to typeset in Tamil  using the Polyglossia Package. In this post we will typeset in Tamil using the Babel Package. To typeset as usual we have to load a few packages and these are the most important to load 

\usepackage{babel}
\usepackage{fontspec}    
                        \usepackage{microtype}
\usepackage{geometry}
\usepackage{blindtext}
\usepackage{seqsplit}
\usepackage[absolute]{textpos}
\usepackage[utf8]{inputenc} \usepackage[T1,TS1,OT1,OT4,TU,EU1,QX,T5,LY1]{fontenc}
  

Set the Following options in your preamble 

\babelprovide[main, import]{tamil}
\babelprovide[import]{english}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TAU-Barathi}[Renderer=Harfbuzz,Script=Tamil]
\newfontfamily\englishfont{Times New Roman}[Scale=0.98,Renderer=Harfbuzz,Ligatures=TeX]

Now we can begin our document 

 \begin{document}
  வணக்கம்                                            \end{document} 
 

 Now you can typeset in Tamil.

Reference: 

https://tex.stackexchange.com/a/498941/229186

https://tex.stackexchange.com/a/171448/229186

Tuesday, December 8, 2020

How to Set font of Our choice in LaTeX

 To Set a Font our choice say Georgia or Charis SIL in latex we have to use the  fontspec  package. To load the fontspec package run:

\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\setmainfont{Georgia}
\begin{document}
\end{document}

and compile the document in either XeLaTeX  or LuaLaTex.

Monday, December 7, 2020

UPDATE : Installing canon canoscan lide 110 in Debian

When I wrote that post Debian it didn't have any drivers in that version. Now Especially after version 6 a.k.a Squeeze Debian has included the drivers for the  canon Canoscan lide 110. Just make sure you have installed all the firmware in your system.

UPDATE: Adobe Flash EOL

  

 

 Adobe flash  will reach End of Life by December 31,2020 and will no longer receive any updates nor will be maintained. So it is advised to uninstall or remove Adobe flash from your computer. Instead  of  using Adobe Flash you can now use HTML5, WebGL, and WebAssembly that is inbuilt in your browser as an alternative to Flash.

 Reference:

1. https://www.blog.google/products/chrome/saying-goodbye-flash-chrome/

2. https://blog.mozilla.org/futurereleases/2017/07/25/firefox-roadmap-flash-end-life/

3. https://developers.facebook.com/blog/post/2017/07/25/Games-Migration-to-Open-Web-Standards/ 

4. https://www.adobe.com/products/flashplayer/end-of-life.html#

 


Saturday, December 5, 2020

Extract data from PDF in Debian

Every one of us in our lifetime have encountered a PDF file from which we need to extract the texts from it. There are commercial solutions and some free solutions available in the web. In Debian for most of the time there is an application called Ghostscript that would have been installed by default. By using Ghostscript we can extract our textual data from PDF with no hassle. If it's not installed you can use synaptic package manager to install it or you can use the command line to install. 

apt-get install ghostscript

Now open your terminal and type the following command

/usr/bin/gs  -sDEVICE=txtwrite -o output.txt input.pdf

That's it. You can now check the output.txt in the working directory to check your data.

Reference:

https://stackoverflow.com/questions/3650957/how-to-extract-text-from-a-pdf


Popular Posts