Showing posts with label LaTeX devanagari graphics. Show all posts
Showing posts with label LaTeX devanagari graphics. Show all posts

Wednesday, February 11, 2015

LaTeX Devanagari-III

Visit this post (click here) to see the final solution for LaTeX Devanagari.

This is the third article about LaTeX Devanagari. In the previous article about LaTeX Devanagari (click here for the article) I gave a code for a XeLaTeX book document. The code was customised to write a book in Marathi. But there were tips to change the customisation to any other devanagari using language. In the article I give a LaTeX code for the same document and discuss the differences. I would insist you to have a look at the last article before you start reading this.
At the end of the article is a GoogleDrive link of a folder that contains an example of LaTeX Devanagari article. The readers may download and play around with the example.

The best way to learn LaTeX is to play with it! :)

LaTeX Devanagari

  1. Create a new empty file in you LaTeX editor. Copy the code bellow and paste it to the file. Save the file in a folder. Name the file with a .dn ending and NOT with .tex. For example Devanagari-book.dn .  
  2. Save .png picture in the same folder and this .dn file. Name the picture Image.png.
  3. Open the terminal and type the command \devnag. Then tpye the path of the above file after the command. If that is hard, then simple drag the file from the folder and drop in front of the command.
  4. Press enter.
  5. Now a file with .tex ending can be seen the folder.
  6. Open this .tex file and run using LaTeX. Run it at least twice (may be thrice) to get a proper index in the output PDF.
  7. If you do not like the font either remove \dnpenbombay or replace it with \dnbombay.
  8. Important note(s): 

  • The file could have some typos, as I am not yet very comfortable with the Velthuis style of transliteration. But care should be taken for श which is written as "s  . Because, some editors change " to `` automatically. This makes the output look like "स् .
  • Remember, in XeLaTeX Devanagari a dot . means a full stop. But in LaTeX Devanagari . is a special character and having a single dot gives an error (but not for .s which stands for ष). The terminal would read, Illegal character . found on line number XYZ. The full stop for LaTeX Devanagari is dotdot, that is, .. This produces a stop.


The screenshots and explanations for this code are same as in the last article, excpet that the font changes. Click here for that. At the end we discuss differences between LaTeX and XeLaTeX codes.

LaTeX aslo sufferes from same nested list and page counting issues as XeLaTeX.

\documentclass{book}
\usepackage{devanagari}
\usepackage{graphicx}%package for including graphics
\usepackage{setspace}%to manage spacing between two lines
\usepackage{enumitem}

%Changing the titles of standard parts in LaTeX to Devanagari
\def\abstractname{{\dn\dnpenbombay sArA.m"sa}}
\def\appendixname{{\dn\dnpenbombay pri"sI.s.ta}}
\def\contentsname{{\dn\dnpenbombay vi.saya sUcI}}
\def\chaptername{{\dn\dnpenbombay dha.dA}}
\def\tablename{{\dn\dnpenbombay taktA}}
\def\figurename{{\dn\dnpenbombay citra}}
\def\listfigurename{{\dn\dnpenbombay citrA.mcI yAdI}}
\def\listtablename{{\dn\dnpenbombay taktyA.mcI yAdI}}

%Changing the counter and the arabic numerals in the counter to the Devanagari numerals
\pagenumbering{devanagari} %page numbers
\renewcommand\thechapter{\devanagari{chapter}}
\renewcommand\thesection{\devanagari{chapter}. \devanagari{section}}
\renewcommand\thesubsection{\devanagari{chapter}. \devanagari{section}. \devanagari{subsection}}
\renewcommand\thefigure{\devanagari{chapter}. \devanagari{figure}}
\renewcommand\thetable{\devanagari{chapter}. \devanagari{table}}

%Document info
\title{\LaTeX{\dn\dnpenbombay{} devanAgarItIla pu.dhIla prayoga}}
\author{{\dn\dnpenbombay rohita dilIpa hoLakara}}
\datemodernhindi{\date{\today}} %I dont know if Marathi is available


%Page Layout
\usepackage[inner=2cm,outer=2cm]{geometry}%left-right margin

\onehalfspacing %increases spacing between two lines to 1.5

%Main document begins

\begin{document}
\let\MakeUppercase\relax
\maketitle %making the default title page
\tableofcontents % making the default table of contents


\chapter*{{\dn\dnpenbombay prastAvanA}}

\verb+\chapter{name of the chapter}+
{\dn\dnpenbombay kamA.m.da buka envhAyarname.n.tamaDeca vAparatA yete ni tI tIna kAme karate.. pahile kAma he, kI hI kamA.m.da }
Chapter
{\dn\dnpenbombay mha.najeca `prakara.na' ki.mvA `Da.dA' hA "sabda lihIte.. dusare ase, kI prakara.nAce nAva tI mo.thyA ak.sarAta A.ni vegaLyA u.mcIvara lihIte.. tisare ni mahatvAce kAma he, kI prakara.ne moja.nyAsa.thI tI kA{}un.tara surU karate.. yA tIna paikI dusare kAma spesi.mgace Ahe ni itara kAmA.mmaDe lipI mahatvAcI Ahe..}
\verb+\def\chaptername{{+\verb+\dn+\ \verb+name of your choice}}+
{\dn\dnpenbombay vAparUna `c~ap.tara' "sabdA{}aivajI kAya have te .tharavatA yete.. jase kI mI `Da.dA' hA "sabda vAparalA Ahe.. tumhAla have tara `prakara.na' ki.mvA `kavitA' vA `aDyAya', asA ko.natAhI "sabda vAparatA yeIla..}
\verb+\renewcommand\thechapter{\devanagari{chapter}}+
{\dn\dnpenbombay vAparUna kA{}u.m.tara devanAgarIta .tAkatA yeto..}

{\dn\dnpenbombay
prastAvanA lihI.nyAsA.thI nehamIpramA.ne}~\verb+\chapter+*~{\dn\dnpenbombay vAparAve.. tyAmuLe navIna prakara.nAsA.thIcAca mathaLA yeto, mAtra to mojalA jAta nAhI, tyaamuLe yA mathaLyaacyaa bAjulA Aka.de yeta nAhIta..}


\chapter{{\dn\dnpenbombay calA suruvAta karU}}

{\dn\dnpenbombay c~ap.taracI kamA.m.da ka"sI badalalI Ahe, he prastAvanetaca vi"sada kele Ahe.. iTe tIca kamA.m.da vAparalI Ahe, fakta prastAvaneta jI cA.mda.nI` *' vAparalI Ahe, tI eTe vAparalI nahI..  cA.mda.nI vAparalI kI kA{}u.m.tara ba.mda hoto..} 


\section{{\dn\dnpenbombay pahilA vibhAga}}
{\dn\dnpenbombay ithe kAhI citrehI .tAkalI Aheta..}
\begin{figure}[htb]
  \centering
\includegraphics[scale=0.1]{Image}
  \caption{{\dn\dnpenbombay taLe}}
\end{figure}

{\dn\dnpenbombay yA citrAkhAlI ``citra'' hA "sabda lihI.nyAkarItA pri{}embalamadhe } \verb+\renewcommand\thefigure{\devanagari{figure}}+ {\dn\dnpenbombay vAparale Ahe.. citrA.mcI moja.nI devanAgarIta kara.nyAkarItA}\verb+\renewcommand\thefigure{\devanagari{figure}}+ {\dn\dnpenbombay vAparuna kA{}U.m.tara devanAgarIta kelA Ahe.. nehamIpramA.ne `grAphiksa' p~akeja vAparuna citre .tAkatA yetAta.. likhA.nAcyA "sevA.tI} \verb+\listoffigures+ {\dn\dnpenbombay vAparUna citra.mcI yAdI karatA yete..}
\newpage

\subsection{{\dn\dnpenbombay pahilA upavibhAga}}

{\dn\dnpenbombay nehamIce} 
tabular
{\dn\dnpenbombay envhAyaranme.n.ta vAparUna khAlIla taktA banavalA Ahe..}

\begin{table}[htb]
  \centering
  \begin{tabular}[htb]{|c|c|c|}
\hline
{\dn\dnpenbombay sarvAta .dAvA ni sarvAta varacA koparA} & a & a\\
\hline
a & b & {\dn\dnpenbombay sarvAta ujavA ni taLatila koparA}\\
\hline
  \end{tabular}
  \caption{{\dn\dnpenbombay asAca eka taktA}}
  \label{tab:1}
\end{table}

{\dn\dnpenbombay yA taktyAkhAlI ``taktA'' ha "sabda lihI.nyAkarItA pri{}embalamadhe } \verb+\renewcommand\thetable{\devanagari{table}}+ {\dn\dnpenbombay vAparale Ahe.. prastAvanemaDe citr.mbaddala spa.s.tIkara.na dile Ahe.. citrA.mprama.neca taktyA.mcehI n.mbarI.mga kele Ahe ni "seva.tI taktA.mcI yAdI} \verb+\listoftables+ {\dn\dnpenbombay vAparUna banavalI Ahe..}


\section{{\dn\dnpenbombay dusarA vibhAga}}

{\dn\dnpenbombay citrA.mcI yAdI jarA vA.dhAvI mhAnUna ajUna eka citra .tAkUyAta!}
\begin{figure}[htb]
  \centering
\includegraphics[scale=0.1]{Image-2}
  \caption{{\dn\dnpenbombay taLe A.ni fule}}
\end{figure}


\chapter{{\dn\dnpenbombay dusarA Da.dA}}

{\dn\dnpenbombay To.de jAstIce sAhitya bharale tara anukrama.nikA barI disela ni kA{}u.n.taras{}ce kAma nI.ta pAhatA yeIla, mha.nUna he prakara.na suRu kele Ahe..}

\section{{\dn\dnpenbombay Da.dA dona maDIla eka viBaga}}
{\dn\dnpenbombay  
  \begin{center}
    yathA "sikhA mayUrA.nA.m nAgA.nA.m ma.nayo yathA |\\
    tathA vedA"nga "sAstrA.nA.m ga.nita.m mUrdhani sthitam ||
  \end{center}
}
As the (beautiful) crests (on the heads) of the peacocks and the (precious) stones (on the heads) of the (holy) cobras, Mathematics resides at the topmost position among all of the auxiliary disciplines\footnote{The Vedas have six auxiliary disciplines which are called the  ``\emph{Vedangashatrani}''. It is considered that the \emph{Vedangashatrani'} have all the knowledge, that describes the physical universe.} of the Vedas.

{\dn\dnpenbombay eka taktA..}

\begin{table}[htb]
  \centering
  \begin{tabular}[htb]{|c|c|c|}
\hline
hi & ha & hi\\
\hline
hi & ha & hi\\
\hline
  \end{tabular}
  \caption{{\dn\dnpenbombay asAca eka taktA}}
  \label{tab:2}
\end{table}

\section{{\dn\dnpenbombay kAhI "sere}}

\begin{figure}[htb]
  \centering
\includegraphics[scale=0.1]{Image-2}
  \caption{{\dn\dnpenbombay taLe A.ni fule}}
\end{figure}

{\dn\dnpenbombay Apa.na citre A.ni tAkte ka{}u.m.ta karatAnA ``Da.dA.. citrAca (taktyAcA) tyaa Da.dyAtIla kramA.mka'' asA ka{}u.m.tara se.ta kelA Ahe.. khalI kAhI "sere dile Aheta}:


\begin{enumerate}[label={\dn\arabic*}.]
\item {\dn\dnpenbombay ajunahI enyumare.ta envAyaraname.n.tacA kA{}u.m.tara se.ta kara.ne jamale nAhiye.. udAhara.nArTa iTe enumare.ta vAparatoya, pa.n .davIka.dIla a.mka mAtra arebIkaca Aheta.. mAtra he hoUna jAina ase disateya..}

\item {\dn\dnpenbombay prIambala maDe} \verb+\date+ {\dn\dnpenbombay vAparale tara te mahine hi.mdImaDe lihIte.. mara.thI kase karAyace ajuna samajale nAhI.. ya pra"snAkarItA, mara.thI sA.thi devanAgarI le.teka madhe kAhI khAsa se.tI.mga Aheta kA he pahAve lAgela..}

\begin{enumerate}[label={\alph*}]
    \item {\dn\dnpenbombay dusarA muddA}
    \item {\dn\dnpenbombay tisarA muddA}
    \item {\dn\dnpenbombay cauTA muddA}
\end{enumerate}
\item {\dn\dnpenbombay anukrama.nikA A.ni prastAvanA lihIlyAvara pAnacyA varIla koparyAvara `anukrama.nikA' ni `prastAvanA' ase Ale pAhIje.. mAtra eTe kAhItarI asa.mbaddha likhA.na disateya.. hA le.tekacA mUlabhuta pr~oblema disatoya.. so.dava.ne avagha.da disataya..}
\end{enumerate}


\listoffigures
\listoftables
\end{document}

The discussion

  1. In Devanagari LaTeX one has to creat a .dn file which needs to be processed by the terminal. Sometimes this file itself has few error and it is a cumbersome job to find them out and resolve them. Whereas in XeLaTeX it is simpler.
  2. The counting of parts of document (for example counting of chapter, pictures) has to manually adjusted. In XeLaTeX once you announce that the language is sanskrit or hindi, this issue is taken care of.
  3. Devanagari LaTeX has fewer fonts. I do not like the default one. \dnbombay is better. But XeLaTeX comes with more and better fonts. For example Sanskrit 2003 used in previous document is a good font.
  4. Writing the \dn command all the time is cumbersome in LaTeX. In XeLaTeX this is not an issue at all!
  5. One cannot give a Devanagari Unicode input in LaTeX. In XeLaTeX it is possible. See the last part of previous article.
  6. However, writing Mathematics is better in LaTeX. One can simply close the braces for \dn command and do the heavy mathematical writing. I do not know if this is so easy in XeLaTeX.
  7. Though the names and counter for table and picture can be customized for Devanagari, \ref does note work inside Devanagari command. One has to close the braces limiting the \dn command, then use \ref and again start with \dn. Which is indeed cumbersome.  
  8. The digit 8 in LaTeX is written in Hindi. In Marathi it is written as ८. The developers told me, now it is a hard job to change this shape.
  9. Package xindy-devanagari is developed by Zdenek Wagner (one of the developer of LaTeX Devanagari) for writing Glossaries. But the example files use XeLaTeX and babel.  I do not know if it can be used for LaTeX. (PS: Take care while using this package. There could be some issues.)   
Thus, LaTeX and XeLaTeX Devanagari both have certain benefits over one another. You may use the one that suits your needs. 

Zdenek Wagner advised me to try Polyglossia and XeLaTeX. The Polyglossia package documentation says that it supports Marathi, Bangla, Gurumikhi and many other Indian languages. Not only scripts but languages! However, I had some trouble with its Marathi translation. If I succeed to use it, I shall write an article.

If you come across some development, please update me by comment here.


                                            
                                                                    ∆  ∆


Wednesday, November 5, 2014

LaTeX Devanagari-II

 
In last article about LaTeX Devanagari (click here for the article) I explained how to make simple documents in Devanagari using LaTeX. However, the LaTeX users know that one of the biggest power of LaTeX is editing the documents efficiently. For example, if one wants to write a book using LaTeX, then, creating table of contents, chapter names or names of many parts of the book, listing tables or graphics, writing appendices, creating list of special words this all can be done by LaTeX within a stroke of line! Here I am giving and examples for writing a book in Deanagari using LaTeX and XeLaTeX. I try to incorporate as many features, as possible. In the end, I discuss some good and bad issues related to this piece of work.

XeLaTeX Devanagari

Following are the things I wish to achieve:
  1. Use the book environment for LaTeX Devanagari
  2. Include graphics, tables and customise their original commands so that the name the graphics and the tables appear in Devanagari. Then customise the commands \listoffiures and \listoftables for LaTeX Devanagari.
  3. Customise the frontmatter (the title page, the index, the preface part) and the backmatter (the appendices, various lists, glossaries for LaTeX Devanagari.
  4. Customize all numberings to Devanagari.
  5. Customise the mainmatter (chapter names, sections etc) for Devanagari.

Using XeLaTeX
The best way to learn LaTeX is play to with it! :) Following is my code for a XeLaTeX writing. Marathi readers, forgive me for so many typos in the tex file. I am still not very comfortable with the transliteration.

  1. Copy and paste the code to your LaTeX editor.  Save this file to a folder with an ending .tex . 
  2. Add a .png photo to this same folder. Rename the photo as Image.png
  3. Then set the editor to XeLaTeX. NOT on LaTeX or pdfLaTeX.
  4. Run the file two or three times, at least. See the beautiful output.
  5. Some precautions are:
  • There could be some typos. I shall keep updating the articles, until all the typos are eliminated. But take care about "s which stands for श्  . Few LaTeX editors change the character " to `` automatically. This produces ``s instead of "s and the output becomes "स् or ``स् .
  • The sixth line has command \setmainfont which sets the main font for whole of the document. The extra parameter Mapping in this command can take many values. And they all behave differently. For example, Mapping= devanagarinumerals would let you give the input in Devanagari Unicode itself! Which means to get an output रोहित I need not type rohita but simply type रोहित with a Unicode keyboard! 
  • However if you use some other mapping, then the rules of transliteration change! Click here to see the different types of mappings and the corresponding transliteration rules. 

Screenshots of this output are given bellow. Comments close to many commands explain what these commands are meant for.

\documentclass[a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fontspec}

\usepackage[english, hindi]{babel}
\setmainfont[Script=Devanagari,Mapping=velthuis]{Sanskrit 2003}
%\setmainfont[Script=Devanagari,Mapping=devanagarinumerals]{Sanskrit
%2003} this mapping let you give input in Devangari itself

%Changing the titles of standard parts in LaTeX to Devanagari

\addto\captionshindi{%
\renewcommand{\abstractname}{sArA.m"sa}%
\renewcommand{\contentsname}{ anukrama.nikA}%
\renewcommand{\chaptername}{dha.dA}%
\renewcommand{\tablename}{taktA}%
\def\appendixname{parI"sI.s.ta}%
%\def\figurename{}%
\def\listfigurename{citrA.mcI yAdI}%
\def\listtablename{taktyA.mcI yAdI}%
}
\catcode`\~=12

%Document Info
\author{rohita dilIpa hoLakara}
\title{ksele.tek ni bebela}
\date{phebruvarI 1, 2015}

%Page Layout
\usepackage[inner=2.4cm,outer=2cm]{geometry}%left-right margin
%\onehalfspacing %increases spacing between two lines to 1.5


\begin{document}
\let\MakeUppercase\relax
\frontmatter
\maketitle
\tableofcontents

\mainmatter
\chapter{eka}
\section{vibhAga}
mitraho, malA uttara sApa.dale Ahe. udAhara.nAdakhala he likhA.na pa.thavata Ahe.\\
hyA .tAIpase.tI.mgacA phAyadA.
\begin{enumerate}
    \item kI ithe sArakhe  devanAgarIcI kamA.m.da dyAvI lAgata nAhI. 
    \begin{enumerate}
       \item eka
       \item dona
           \begin{enumerate}
       \item he
       \item ase
       \item Ahe
    \end{enumerate}

       \item tina
    \end{enumerate}
    \item sagaLe Aka.de devanAgarIta yetAheta. 
    \item phAIla .tarmInalavara vegaLI ka.mpAIla karAyacI garaja nAhI.
    \item bharapUra phA/.ta upalabdha Aheta (hA sa.msk.rta 2003 Ahe).
    \item pur.navirAmAcA pra"sna su.talAya! :)
        \begin{enumerate}
        \item A.ni hI eka bhArI bAta, ekAta eka Aka.de Ale kI barobara na.mbarI.mga badalate!
        \item ithe ga.nitacii sutre lihi.nyaabaabata maatra tho.daa
go.mdhaLa aahe. kaara.na khaaliila sutra uttama disate,
\[
\int f(x)\, d(x) = \phi^{k(t)^2}
\]
para.mtu nityaacyaa niyamaapramaane jara ".dii" laa .teks.ta-apa kele tara maatra haa go.mdhaLa hoto,
\[
\int f(x)\, \textup{d}(x) = \phi^{k(t)^2}
\]

      \end{enumerate} 
\end{enumerate}

\subsection{upa-vibhAga}
dona mahAtvAce pra"sna rAhileta.
\begin{enumerate}
    \item devanAgarI ni ii.mgrajI kase ekatra lihAyace he malA  ajuna kaLale nahIye.
    \item durdaivane hyA paddhatInehI "bImara" devanAgarImadhe banavAtA yeta nahIye! :(
    
\end{enumerate}

\chapter{aseca}
astu, malA mAgIla drAvi.dI pra.nayAmAhUna hec bare va.tateya! varIla paikI pahilA pra"sna su.tela lavakara a"sI A"sA Ahe! ethe kAhI citre .takUna pAhUyAta kI tyA.mcI nAve ka"sI yetIla. "sIvAya eka taktAhI banavUna .takatoya, he.nekarUna takte A.ni tyA.ncI nAve nI.ta disatIla kI nAhI he kaLela. sarvAta "seva.tI \verb+\listoffigures+ A.ni \verb+\listoftables+ vAparUna citre ni takyA.mcI yAdI suddhA banavalI Ahe.

\begin{figure}[htb]
  \centering
\includegraphics[scale=0.1]{Image}
  \caption{eka citra}
\end{figure}

\begin{table}[htb]
  \centering
  \begin{tabular}[htb]{|c|c|c|}
\hline
hi & ha & hi\\
\hline
hi & ha & hi\\
\hline
  \end{tabular}  \caption{eka taktA}
  \label{tab:2}
\end{table}


\chapter{kAhItarI}
ethe bebela pyAkejamaDIla i.mgrajI BA.sA vAparUna  lihI.nyAcA prayatna
karatoya. matra kAhI sAdhya hota nAhIye.

 \begin{enumerate}
\item
\begin{verbatim} 
\foreignlanguage{english}{This text should be in English}
\end{verbatim}
vAparUna he miLateya,\\
\foreignlanguage{english}{This text should be in English}
\item 
\begin{verbatim}
\selectlanguage{english}{This text should be in English}
\end{verbatim}
vAparUna he miLateya,\\
\selectlanguage{english}{This text should be in English}
\item
\begin{verbatim}
\begin{otherlanguage}{english}
This text should be in English\end{otherlanguage}
\end{verbatim}
vAparUna he miLateya,\\
\begin{otherlanguage}{english}
This text should be in English
\end{otherlanguage}
\end{enumerate}

\chapter{"sere}
\label{cha:sere}

\begin{enumerate}
\item eTe bebela vAparale tarI i.mgrajI vA itara bhA.seta kase
  lihAyace hA pra''sna ajuna su.talA nAhIye.
\item inara lis.ta a, ba, ca, da, a"sIca ye.nare, kAra.na
  devanAgarIsa.thI ajuna k, kha, ga, ... a"sI inara lis.ta
  .devhalapararsanIca .tAkalI nahiye.
\item inara lis.ta prama.neca \verb+\frontmatter+ A.ni
  \verb+\backmatter+ maDila pAna.mce kramA.mka romana Aka.dyA.mce
  devanAgarI Ba.sA.mtara mhanu.naca ye.naret. tyAla kAhI upAya nAhI
\item appara kesa ril~aks kelI kI \verb+\today+ bebela hi.mdIsA.thI
  cAlate. matra bebela maDe ajuna mara.thI nahIye.
\item jhedneka vAgnerane pA.thavalele \verb+xindy+ vAparun pahAyace
  Ahe.
\item eka uttama bAba hI kI \verb+mapping=devanagarinumerals+
  karuna .teka fAIla maDe yuniko.da devanAgarI .tAkUna lihItA yete! he
  phAraca uttama Ahe!
\end{enumerate}


\backmatter
\appendix
\chapter{a}
iTe eka pari"sI.s.ta surU hote.

\listoffigures
\listoftables

\end{document}

Once you give the information \author, \title and \date the \maketitle produces this title page. The command \today for date produces a date in Hindi and not in other language, neither Sanskrit nor Marathi nor Nepali. Babel does not support Marathi yet.

Using Babel I have chosen Hindi as the main language of the text. The table of contents produces name विषय सूची, if \renewcommand{\contentsname}{anukrama.nikA}is not used. विषय सूची is fine for Marathi (as well as Nepali, if think!). But I want to use the work अनुक्रमणिका. The renewed command above does it for me. One had to run XeLaTeX twice or thrice to generate the index properly. LaTeX cannot produce detailed index in a single run.

Following is the first chapter. If you use \chapter*{prastavanA} in the front matter, it would produce the preface page. Using \chapter{eka} in the main matter gives following.  \renewcommand{\chaptername}{dha.dA} makes the name of a chapter appear as "धडा" a standard word for Chapter in Marathi. Changing dha.dA in the command to aDyAya would say अध्याय instead of धडा or pA.tha would yield पाठ. The listing is a problematic issue. For the first list, LaTeX counts properly in devanagari. But for inner lists, it simply translated the standard English innerlist numbers to devanagari. We count the second list as क, ख, ग, घ, च, ... or अ, आ, इ, ई, ... but here it counts as अ =a, ब =b, च =c, द् =d, ... The third list translation of roman counting numbers i, ii, iii,... I contacted the developers, but they replied that these lists we not added at all! They are like to add them now.


Here is an example of graphics and tables. As you can see, the name of the table and graphics as well as their counting appears in devanagari. See the preamble to observe how it is done.

Here I tried using English as a foreign language and I failed! I don't feel comfortable with Babel yet.  I shall try to fix this problem. If you come up with a solution please post here.
In the backmatter, adding \chapter after \appendix stops counting the chapter name, removes the word Chapter (here धडा) and makes only the title visible. Here is an appendix. Appendices are counted differently in the index.

\listoffigures and \listoftables is customized to produce चित्रांची यादी and तक्यांची यादी respectively. For Hindi the default is set but you may modify it to चित्रों की सूची and तालिकांओ की सूची.


Some remarks:

  1. In the Preamble, change \setmainfont [Script=Devanagari, Mapping=velthuis]{Sanskrit 2003} to \setmainfont [Script=Devanagari, Mapping=devanagarinumerals]{Sanskrit 2003}. Then remove all the text inside document. That is, write nothing between the commands \begin{document} and \end{document}. Then, use a unicode Devanagari keyboard and write and input in Devanagari. Then XeLaTeX it and see that LaTeX can process Devanagari input! This is cool. This would help me LaTeXify most of my writing. This is a very valuable feature of XeLaTeX. But use a good editor like Emacs or Aquamacs. Some editors might not like your input and give you errors. For example, on my machine, Aquamacs gives a nice output (its a sturdy editor) but TeXShop confuses!
  2. Devanagari LaTeX is unable to count nested lists as seen above. It does the same error for counting the pages in frontmatter and the backmatter. But these things need to be changed by the Developers. I do not know any other solution, at the moment.
  3. The command \today give only Hindi output. One of the developer told me that Polyglossia package can handle marathi, but I could not make it work for Marathi!
In the next article I shall post a code for LaTeX file and discuss few differences about XeLaTeX and LaTeX files.

                                            
                                                                    ∆  ∆