Thanks Juan for prompt response, my replies inline below:

On Thu, Sep 21, 2023 at 10:24 AM Juan Manuel Macías <maciaschain@posteo.net> wrote:
Hi,

I would recommend that you use babel, as it is the official package for
language support and now has many more options than polyglossia.

Thanks for the pointer and explanation.
 
You can
try this preamble (compiles in LuaLaTeX):

\documentclass{article}
\usepackage[english]{babel}
\usepackage{fontspec}
\newfontscript{Devanagari}{deva}
\babelprovide[onchar=ids fonts]{sanskrit-devanagari}
\babelfont[sanskrit-devanagari]{rm}{Noto Sans Devanagari}

Where does this preamble goes to? Any example?
 

With \babelprovide... there is no need to add a \selectlanguage or other
similar command. The problem with your example is that you need to put a
command to select the language before the Devanagari text, like
\selectlanguage{sanskrit}

Yet I am a bit confused because the Sanskrit/Devanagari words are used not in a whole block, but in between English sentences, eg.:

Old expression goes like स्वस्ति सत्यं वचति (meaning 'Always tell the truth with positive vibes') where स्वस्ति means positive, सत्यं means truth and वचति means tell or speak out.

 Any example would be appreciated for pdf export. Thanks again.


Best regards,

Juan Manuel

Zenny <garbytrash@gmail.com> escribió:

> Hi,
>
> I tried to export to pdf with the following:
>
>     #+LATEX_HEADER: \usepackage{polyglossia}
>     #+LATEX_HEADER: \usepackage{fontspec}
>     #+LATEX_COMPILER: xelatex (also tried with lualatex)
>     #+LATEX_HEADER:  \setmainlanguage{english}
>     #+LATEX_HEADER:  \setotherlanguage{sanskrit}
>     #+LATEX_HEADER:   \newfontfamily\devanagarifont{Noto Serif
>     Devanagari}
>
>     स्वस्ति सत्यं वचति
>
> but it exports alright to odt, and even pandoc exports alright
> directly from org file to docx file, but the Sanskrit/Devanagari fonts
> are skipped (blank) in pdf output when exported directly from org file
> with C-c C-e l o.
>
> Already tried with the solutions provided in
> https://emacs.stackexchange.com/questions/27576/exporting-devanagarai-text-from-org-mode-to-latex,
> but there are no such options (variables defined) after 'M-x
> customize-group' available.

--
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com




--
Cheers,
/z

-.. .. ... -.-. .-.. .- .. -- . .-. | -.. .. ... -.-. .-.. .- .. -- . .-.
CONFIDENTIALITY NOTICE AND DISCLAIMER: Access to this e-mail and its contents by anyone other than the intended recipient is unauthorized as it contains privileged and confidential information, and is subject to legal privilege. Please do not re/distribute it.  If you are not the intended recipient (or responsible for delivery of the message to such person), you may not use, copy, distribute or deliver the email and part of its contents to anyone this message (or any part of its contents or take any action in connection to it. In such case, you should destroy this message, and notify the sender immediately. If you have received this email in error, please notify the sender or your sysadmin immediately by e-mail or telephone, and delete the e-mail from any computer. If you or your employer does not consent to internet e-mail messages of this kind, please notify the sender immediately. All reasonable precautions have been taken to ensure no viruses are present in this e-mail and attachments included. As the sender  cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments it is recommended that you are responsible to follow your virus checking procedures prior to use. The views, opinions, conclusions and other informations expressed in this electronic mail are not given or endorsed by any company including the network providers unless otherwise indicated by an authorized representative independent of this message.
-.. .. ... -.-. .-.. .- .. -- . .-. | -.. .. ... -.-. .-.. .- .. -- . .-.