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


Wednesday, November 25, 2020

General Tips For Writing a Formal Letter

  • Your letter should be simple and focused; make the purpose of your letter clear.
  • The subject is optional,but is highly recommended since the letter will not be opened by the intended recipient first. It should start with either subject: or Re:
  • The subject (if you include one) should be left-aligned for full block format, but can be either left aligned or centered for modified block format.
  • Have an margin of 1 in on all sides
  • Use a std font size of 10pt or 12 pt.
  • It is also appropriate to use “To Whom It May Concern” when you are making an inquiry (also known as a prospecting letter or letter of interest), but don’t have details of a contact person.
  • If you are writing to someone whose name you don't know, "Dear Personnel Manager (or other job title)" and "Dear Sir or Madam" are acceptable.
  • Address recipient by personal title. You can address the recipient by starting with "Dear" followed by a personal title, such as Mr. or Ms. If you have the full name of the recipient of your business letter, you can enhance the formal nature of the letter by starting with "Dear" followed by a personal salutation, such as "Dear Ms. Levatson."
  • When in doubt, use Ms. If you want to use a personal title ahead of a female recipient's full name, but you are unsure of her marital status, it is always best to use the title "Ms." followed by the recipient's name instead of Miss or Mrs.
  • Single space your letter and leave a space between each paragraph.
  • Use a serif font like Times New Roman.
  • Left justify your letter.
  • Leave a blank line after the salutation and before the closing.
  • Use the modified block layout since it looks modern and stylish.

References

1. https://www.indeed.com/career-advice/career-development/business-letter-salutation
2. https://www.lexico.com/grammar/how-to-lay-out-a-letter
3. https://www.thebalancecareers.com/sample-letter-format-2063479
4. https://www.dailywritingtips.com/how-to-format-a-us-business-letter/
5. https://www.thebalancecareers.com/business-letter-layout-example-2059703
6. https://penandthepad.com/format-cover-letter-2068849.html
7. https://www.writeawriting.com/letter/formal-letter-format-rules-guide-examples/
8. https://www.letterwritingguide.com/businessletterformat.htm
9. https://letterslibrary.com/writing-tips/structure-of-letters/  --good ref

Saturday, November 21, 2020

Writing a Letter using Latex

Latex is a typesetting system which follows the WISWYM paradigm.It can be used to   typeset any kind of document such as books,reports and even letters.  

To write a letter in you have load the letter class. By default it uses the modified block layout.

Important Packages to Load:

These are the important packages to  load in my perspective, they are

  • Nag 
  • Inputenc
  • fontenc
  • microtype
  • setspace
  • datetime
  • block [if you need the full block layout]

 The package Nag is to prevent from running obsolete or depreciated commands.  

Inputenc  is for loading unicode encodings and fontenc is for the extended character set.

 The microtype package is for character protrusion and font expansion, furthermore the adjustment of interword spacing and additional kerning, as well as hyphenatable letter spacing (tracking) and the possibility to disable all or selected ligatures.

The set space package as the name indicates sets the line spacing. The datetime packages helps modifies the date to our liking. 

Some website may say use the newlfm and isodoc packages but compare to them this package doesn't have any other options and works within the letter class makes it an ideal package for the letter layout

 code for loading the packages:

\RequirePackage[orthodox]{nag}                         \documentclass[a4paper,12pt,oneside]{letter}        \usepackage[utf8]{inputenc}                             \usepackage[T1]{fontenc}              \usepackage{microtype}                  \usepackage{setspace}                           \usepackage[nodayofweek]{datetime}

Page styles:

The letter class supports the following styles

        1. Headings
        2. Empty
        3. First Page
        4. Plain      

We  will be using the page style empty. The code to load the style is 

\pagestyle{empty}  

  Writing the letter:

We are using the empty page style,by default the letter class leaves an 1 inch space for the header and another 1.5 in for the top margin. We will be removing the header in our document. This will make sure there will be 1.5 inch margin from top,left and right.

The commands supported inside the document are 

          1. \address
          2. \signature
          3. \name
          4. \location
          5. \telephone  
          6. \opening
          7. \closing
          8. \encl
          9. \cc 

We begin the document by \begin{document}  in the letter the address of the sender is first written.  The From address is typed within the \address command. using \\ for starting a new line. The \signature command  as the name implies will put your name in closing leaving a space for you to manually sign your letter.

     \begin{document}   

     \address{type your address}             

     \signature{your name}

We begin the letter with the \begin{letter} followed by the receipient address. Next we add the opening greeting of the letter with \opening  followed by the subject of the letter. There is no command for the  subject. The subject must be below 1pt from the  opening and should be left justified  so we use the \begin{spacing} environment were we write our  subject.

   \begin{letter}{receipient's address} 

Before the \opening run the following  commands so that there won't be  a huge space from the top. Use the following commands with caution.If you have an header file then you shouldn't use this command. 

     \makeatletter
  \def\@texttop{}
  \setlength\headheight{0\p@}
  \setlength\headsep{0\p@}
  \setlength\footskip{0\p@}
  \setlength\topmargin{20pt}
  \setlength\footnotesep{0\p@}
  \setlength{\skip\footins}{0\p@}
  \makeatother

               \opening{Dear sir/Madam}
               \begin{spacing}{1}
                 \begin{flushleft}
                    Re: Your subject
                 \end{flushleft}
               \end{spacing}

After this write your content of the letter. A business or formal letters should be a one  page document. Finish the letter with the \closing{Regards,} command. If you have  enclosures with the letter then run the \encl{\\1. xy \\2. xx} and if you have multiple receipients then you should add courtesy copy command          \cc{\\1. aa \\2.bb

End the document with \end{letter} and \end{document}. The signature and closing might not be adequately right justified so use the \hfill command within that command. Finally save the file and compile in pdflatex and if compiled successfully it will produce a pdf containing your letter which you can now print. 

Popular Posts