My requirement is to compose text in Sanskrit with (roman or devanagri) numbers and symbols placed over the Sanskrit text.
Before knowing anything about Latex, I asked this question in SU.SE - how-to-type-one-character-over-another-in-microsoft-word where my problem is explained in detail.
After knowing about Latex a bit I was able to compose the text in the desired way (sort of) using https://www.overleaf.com as it seems to help me start quick. I have volumes of pages to be typed in this way and I am sure there will be good number of errors after proof reading and hence editing after composing is key.
I get small issues like unable to align to left etc; but I guess I can solve them by going through sites like these.
Basically I am asking this question to know whether the approach (choice of Latex itself included) is the way to go and suggestions on how I can be productive in case if I have to use Latex. I am okay to switch to any online editor or any offline Windows based Latex editors.
Thanks for your time.
Update:
Thanks to IRadha, I used these lines to generate this Sama veda text shown in this image:
This is just a small part that I am about to compose and I see the approach given below seems to make this operation bit easier.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{polyglossia}
\usepackage{xargs}
\setdefaultlanguage{hindi}
\newfontfamily{\hindifont}[Script=Devanagari]{Lohit Devanagari}
\setotherlanguage{English}
\newcommand{\hi}[1]{\begin{hindifont}#1\end{hindifont}}
\newcommandx*{\up}[3]{$\overset{\text{\hi{#2#3}}}{\text{\begin{hindifont}#1\end{hindifont}}}$}
\begin{document}
\up{ऒ}{4}{}ग्नाइ || \up{आ}{2}{0}\up{या}{0}{}हिs3\up{वॊ}{1}{}इतॊयाs2इ
\end{document}
This is how it is in Latex using enter link description here
Posting it here so that it could be useful for others.



\newcommand{\two}[2][ ]{$\overset{\text{\hi{२#2}}}{\text{\begin{hindifont}#1\end{hindifont}}}$}failed miserably. Can you help? Thanks. – Narayanan Oct 28 '19 at 11:50xargspackage, which provides optional arguments. Normal\newcommandcommand takes only first argument as optional. – lRadha Oct 29 '19 at 03:41