I am trying type Devanagari Script in LaTeX using Overleaf. But I am getting some formatting error. The "matras" are not reflecting in the output Devanagari text.
\usepackage{devanagari}
{\dn karma}
Output is as follows:
but it should be
I am trying type Devanagari Script in LaTeX using Overleaf. But I am getting some formatting error. The "matras" are not reflecting in the output Devanagari text.
\usepackage{devanagari}
{\dn karma}
Output is as follows:
but it should be
You need to pre-process your input data. If you have a file karma.dn
\documentclass{article}
\usepackage{devanagari}
\begin{document}
{\dn karma}
\end{document}
and call
devnag karma.dn
you get karma.tex
like this:
\def\DevnagVersion{2.16}\documentclass{article}
\usepackage{devanagari}
\begin{document}
{\dn km\0}
\end{document}
Result:
The devnag
program comes with the LaTeX package. It might be easier to use a Unicode capable LaTeX engine like XeLaTeX or LuaLaTeX together with suitable fonts.
You have to make your own .dn file and then input the file in LaTeX. This should solve the matra problem as in making the .dn file, it will add matras phonetically.
If you want to write Devanagari (Hindi) in pdflatex then go through this GitHub link.
Input: मै तुमसे बहुत प्यार करता हूँ।
Output: {\dn m\4 \7{t}ms? b\7{h}t =yAr krtA \8{h}\1. }