Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-13 Thread Arthur Reutenauer
On Mon, Apr 13, 2020 at 02:39:34PM +0530, RD Holkar wrote:
> thank you for the inputs. Now I feel that it is better to have a package
> for this purpose. The package is a better idea also as one may
> incorporate traditional marathi aspects of drama in it.

  If you change your mind, I am happy to include the translations in
Polyglossia anyway.  You do not have to write a pull request, just open
an issue on GitHub and write the translated strings.

Best,

Arthur


Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-13 Thread Zdenek Wagner
Hi Rohit,

you need nothing special to write a package. Whatever can go to a
preamble can be in a package. You should only know that inside a
package @ is a character, not a special symbol. If you define a
general purpose macro which for whatever purpose has to call a package
internal macro, you can use @ in its name, e.g. \my@intermal@macro.
Packages often do it and it is recommended to use a short package
identification followed by @ followed by a descriptive name for
internal macros. For instance I use \zwpg@something type internal
macros in my zwpagelayout. the reason is that internal macros are not
documented and this convention prevents redefinition of someone else's
internal macro by accident. It is also recommended to identify the
package by

\ProvidesPackage{packagename}[/MM/DD Descriptive text]

It will be visible in the log file, especially if you also request the
list of packages used. And in \usepackage or \RequirePackage you can
request a package of a specified date or newer. In such a case LaTeX
will check /MM/DD in the square brackets and warn you if you have
an old version installed.

The package can have options but you should firsl try to make a simple
package and learn \DeclareOption and \ProcessOptions later. And maybe
you will never need options. If a package is not too complex, it is
easier to do everything just by macros.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

po 13. 4. 2020 v 12:18 odesílatel Philip Taylor
 napsal:
>
> RD Holkar wrote:
>
> This leads to the next question: where can I find a good resource to learn 
> how to write latex packages? I have, I would say, slightly more than working 
> knowledge of latex. However, when I looked at the packages, I could not 
> figure out how to create them.
>
>
> Rohit, I don't use LaTeX, so have never created a LaTeX package, but this 
> page seems to be useful and informative.  Someone more up-to-date with LaTeX 
> internals than I will need to comment on whether or not the advice given is 
> valid for the current release.
>
> Philip Taylor



Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-13 Thread Philip Taylor

RD Holkar wrote:


This leads to the next question: where can I find a good resource to learn how 
to write latex packages? I have, I would say, slightly more than working 
knowledge of latex. However, when I looked at the packages, I could not figure 
out how to create them.


Rohit, I don't use LaTeX, so have never created a LaTeX package, but this page 
 seems to be 
useful and informative.  Someone more up-to-date with LaTeX internals than I will 
need to comment on whether or not the advice given is valid for the current release.

/Philip Taylor/


Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-13 Thread RD Holkar
Hi all,

thank you for the inputs. Now I feel that it is better to have a package
for this purpose. The package is a better idea also as one may
incorporate traditional marathi aspects of drama in it.
This leads to the next question: where can I find a good resource to learn
how to write latex packages? I have, I would say, slightly more than
working knowledge of latex. However, when I looked at the packages, I could
not figure out how to create them.
If community guidelines demand, then I would start a new thread with this
question.
Thank you all very much!

With best regards,
-Rohit.

On Mon, Apr 13, 2020 at 2:51 AM Ross Moore  wrote:

> Hi Zdenek,
>
> On 13/04/2020, at 0:00, "Zdenek Wagner"  wrote:
>
> Hi all,
>
>
> This can be done with \let and \def, not with \newcommand:
>
> \let\savedLabel\label
> \def\label#1{Do something with #1 \SavedLabel{#1}}
>
> The second line could be replaced with
> \renewcommand*\label[1]{Do something with #1 \SavedLabel{#1}}
>
>
> This idea can be extended somewhat.
>
> \makeatletter
> \def\MY@label#1{Do something with #1 \LTX@label{#1}}
> \AtBeginDocument{
>  \let\LTX@label\label
>  \let\label\MY@label
> }
> \makeatother
>
> This way you retain pointers to both your own version and the original,
> so can change between them if necessary, within different parts of your
> document, or within specially tailored environments.
>
> Delaying the \let rebindings using \AtBeginDocument means that it will
> still work
> if some other package (such as  hyperref ) makes its own changes,
> which you also want to incorporate.
>
>
> \providecommand is useful if you assume that a definition exist but you
> want to provide a default definition.
>
>
> Sure.
> It is particularly useful when devising templates that will be filled with
> information
> provided by a database, and command-line shell software that automates
> calls to TeX or LaTeX or other engine.
>
> latex '\def\name{client name} ... \input{mytemplate.tex}'
>
> where  mytemplate.tex  is the main LaTeX source, having
>   \providecommand{\name}{some default}
> and similarly for all the variable data fields.
>
> I use this kind of setup to automate personalised assignment cover-sheets,
> generated online in response to student requests from a web page.
> Sometimes the full question sheet is done this way,
> with versions personalized, or randomized, based upon student ID numbers.
>
>
> The newcommand family is useful because it offers a default first argument
> but if you use arguments with the newcommand family, use always the star
> version so that the macro is not \long. If you forget a right brace after
> an argument, you will get an error message at the end of a paragraph but
> without  the star you get an error message at the end of a file hence it is
> difficult the source of the error.
>
> Construct \csname scenename\endcsname expands to the contents of
> \scenename if already defined or is defined to be identical with \relax if
> not yet defined. When checking existence of definition, LaTeX does the
> following:
>
> \expandafter\ifx\csname scenename\endcsname\relax
>   code for \scenename not yet defined
> \else
>   code for \scenename already defined
> \fi
>
>
> With \csname  you can test for all kinds of things,
> and even adjust macros like  \begin  and  \end  to patch in extra coding
> for specific environments, whether a package is loaded or not.
>
> The possibilities are endless.
>
>
> Cheers.
> Stay safe.
>
>   Ross
>
>
> Of course, the whole \else part can be omitted if you have nothing to put
> there.
>
> Zdeněk Wagner
> http://ttsm.icpf.cas.cz/team/wagner.shtml
> 
> http://icebearsoft.euweb.cz
> 
>
>
> ne 12. 4. 2020 v 12:49 odesílatel Ross Moore 
> napsal:
>
>> Hi Phil, Zdeněk and others.
>>
>> On 12 Apr 2020, at 7:46 pm, Philip Taylor 
>> wrote:
>>
>> Zdeněk Wagner wrote:
>>
>> I would not do it. Of course, you cannot use \renewcommand because
>> \scenename is not used in any *.ldf. You could use \def\scenename{दरश्य} […]
>>
>>
>> LaTeX has  \providecommand  with the same syntax as \newcommand  and
>>  \renewcommand .
>>
>> It makes the definition *only* if the c-s is not already known.
>> This means that you can always use:
>>
>>   \providecommand\mycs{}
>>   \renewcommand\mycs{ what I really want }
>>
>> to get around such issues.
>>
>>
>> A thought — if \scenename is not known at the point that the last line of
>> [gloss-]marathi.ldf is read, would there be any point in using \def
>> \scenename {दरश्य}, since such definition would either get over-ridden by
>> whatever subsequent definition of \scename is causing the problem (\def,
>> \renewcommand), or would prevent a subsequent \newcommand from working as
>> \scenename would already be defined.  Is this not the case (he asked, as
>> someone who barely understands anything that LaTeX 

Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-12 Thread Ross Moore
Hi Zdenek,

On 13/04/2020, at 0:00, "Zdenek Wagner" 
mailto:zdenek.wag...@gmail.com>> wrote:

Hi all,

This can be done with \let and \def, not with \newcommand:

\let\savedLabel\label
\def\label#1{Do something with #1 \SavedLabel{#1}}

The second line could be replaced with
\renewcommand*\label[1]{Do something with #1 \SavedLabel{#1}}

This idea can be extended somewhat.

\makeatletter
\def\MY@label#1{Do something with #1 \LTX@label{#1}}
\AtBeginDocument{
 \let\LTX@label\label
 \let\label\MY@label
}
\makeatother

This way you retain pointers to both your own version and the original,
so can change between them if necessary, within different parts of your
document, or within specially tailored environments.

Delaying the \let rebindings using \AtBeginDocument means that it will still 
work
if some other package (such as  hyperref ) makes its own changes,
which you also want to incorporate.


\providecommand is useful if you assume that a definition exist but you want to 
provide a default definition.

Sure.
It is particularly useful when devising templates that will be filled with 
information
provided by a database, and command-line shell software that automates
calls to TeX or LaTeX or other engine.

latex '\def\name{client name} ... \input{mytemplate.tex}'

where  mytemplate.tex  is the main LaTeX source, having
  \providecommand{\name}{some default}
and similarly for all the variable data fields.

I use this kind of setup to automate personalised assignment cover-sheets,
generated online in response to student requests from a web page.
Sometimes the full question sheet is done this way,
with versions personalized, or randomized, based upon student ID numbers.


The newcommand family is useful because it offers a default first argument but 
if you use arguments with the newcommand family, use always the star version so 
that the macro is not \long. If you forget a right brace after an argument, you 
will get an error message at the end of a paragraph but without  the star you 
get an error message at the end of a file hence it is difficult the source of 
the error.

Construct \csname scenename\endcsname expands to the contents of \scenename if 
already defined or is defined to be identical with \relax if not yet defined. 
When checking existence of definition, LaTeX does the following:

\expandafter\ifx\csname scenename\endcsname\relax
  code for \scenename not yet defined
\else
  code for \scenename already defined
\fi

With \csname  you can test for all kinds of things,
and even adjust macros like  \begin  and  \end  to patch in extra coding
for specific environments, whether a package is loaded or not.

The possibilities are endless.


Cheers.
Stay safe.

  Ross


Of course, the whole \else part can be omitted if you have nothing to put there.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz


ne 12. 4. 2020 v 12:49 odesílatel Ross Moore 
mailto:ross.mo...@mq.edu.au>> napsal:
Hi Phil, Zdeněk and others.

On 12 Apr 2020, at 7:46 pm, Philip Taylor 
mailto:p.tay...@hellenic-institute.uk>> wrote:

Zdeněk Wagner wrote:


I would not do it. Of course, you cannot use \renewcommand because
\scenename is not used in any *.ldf. You could use \def\scenename{दरश्य} […]


LaTeX has  \providecommand  with the same syntax as \newcommand  and  
\renewcommand .

It makes the definition *only* if the c-s is not already known.
This means that you can always use:

  \providecommand\mycs{}
  \renewcommand\mycs{ what I really want }

to get around such issues.


A thought — if \scenename is not known at the point that the last line of 
[gloss-]marathi.ldf is read, would there be any point in using \def \scenename 
{दरश्य}, since such definition would either get over-ridden by whatever 
subsequent definition of \scename is causing the problem (\def, \renewcommand), 
or would prevent a subsequent \newcommand from working as \scenename would 
already be defined.  Is this not the case (he asked, as someone who barely 
understands anything that LaTeX does ...) ?

There is always a way to get what you want,
whether using Plain TeX or LaTeX or whatever other high-level macro structures.

Thus the important thing is how to make it resistant to updates, as Zdeněk said.


Philip Taylor

Hope this helps.
Stay safe.

Ross


Dr Ross Moore
Department of Mathematics and Statistics
12 Wally’s Walk, Level 7, Room 734
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955  |  F: +61 2 9850 8114
M:+61 407 288 255  |  E: ross.mo...@mq.edu.au
http://www.maths.mq.edu.au

CRICOS Provider Number 2J. Think before you print.
Please consider the environment before printing this email.

This message is intended for the addressee named and may
contain confidential information. If you are not the intended

Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-12 Thread Zdenek Wagner
Hi all,

just to summarize:

\def, \edef, \gdef, \xdef, \let, \chardef, \mathchardef are primitives,
they work always without any check. You can damage anything if you are not
careful.

\newcommand defines a new (fragile) macro (without a star it is \long),
reports an error if already exists

\renewcommand reports an error if the macro does not exist

\DeclareRobustCommand defines a robust macro (\long without a star), no
checks

\providecommand defines a macro only if it does not exist, it is not an
error if it already exists, the existing definition will not be changed

\newcommand\relax{be happy} will tell you that it is an error but
\gdef\relax{be happy} will be executed without an error and it will
probably be the last thing in your LaTeX document which will work,
\providecommand\relax{be happy} will do nothing, \renewcommand assumes that
you know what you are doing, hence you should know why you want to destroy
the whole LaTeX kernel by redefining \relax...

If you know what you are doing, and when preparing package-like macros you
should know it, there is no reason for not using the primitives directly.
For instance, in one document I want \label to do another action with its
argument. I believe that it will always have one argument but the code of
\label can be changed in the future. Thus I store its current definition,
define my addition and then call the original macro. This can be done with
\let and \def, not with \newcommand:

\let\savedLabel\label
\def\label#1{Do something with #1 \SavedLabel{#1}}

The second line could be replaced with
\renewcommand*\label[1]{Do something with #1 \SavedLabel{#1}}

\providecommand is useful if you assume that a definition exist but you
want to provide a default definition.

The newcommand family is useful because it offers a default first argument
but if you use arguments with the newcommand family, use always the star
version so that the macro is not \long. If you forget a right brace after
an argument, you will get an error message at the end of a paragraph but
without  the star you get an error message at the end of a file hence it is
difficult the source of the error.

Construct \csname scenename\endcsname expands to the contents of \scenename
if already defined or is defined to be identical with \relax if not yet
defined. When checking existence of definition, LaTeX does the following:

\expandafter\ifx\csname scenename\endcsname\relax
  code for \scenename not yet defined
\else
  code for \scenename already defined
\fi

Of course, the whole \else part can be omitted if you have nothing to put
there.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz


ne 12. 4. 2020 v 12:49 odesílatel Ross Moore  napsal:

> Hi Phil, Zdeněk and others.
>
> On 12 Apr 2020, at 7:46 pm, Philip Taylor 
> wrote:
>
> Zdeněk Wagner wrote:
>
> I would not do it. Of course, you cannot use \renewcommand because
> \scenename is not used in any *.ldf. You could use \def\scenename{दरश्य} […]
>
>
> LaTeX has  \providecommand  with the same syntax as \newcommand  and
>  \renewcommand .
>
> It makes the definition *only* if the c-s is not already known.
> This means that you can always use:
>
>   \providecommand\mycs{}
>   \renewcommand\mycs{ what I really want }
>
> to get around such issues.
>
>
> A thought — if \scenename is not known at the point that the last line of
> [gloss-]marathi.ldf is read, would there be any point in using \def
> \scenename {दरश्य}, since such definition would either get over-ridden by
> whatever subsequent definition of \scename is causing the problem (\def,
> \renewcommand), or would prevent a subsequent \newcommand from working as
> \scenename would already be defined.  Is this not the case (he asked, as
> someone who barely understands anything that LaTeX does ...) ?
>
>
> There is always a way to get what you want,
> whether using Plain TeX or LaTeX or whatever other high-level macro
> structures.
>
> Thus the important thing is how to make it resistant to updates, as Zdeněk
> said.
>
>
> *Philip Taylor*
>
>
> Hope this helps.
> Stay safe.
>
> Ross
>
>
> Dr Ross Moore
> Department of Mathematics and Statistics
> 12 Wally’s Walk, Level 7, Room 734
> Macquarie University, NSW 2109, Australia
> T: +61 2 9850 8955  |  F: +61 2 9850 8114
> M:+61 407 288 255  |  E: ross.mo...@mq.edu.au
> http://www.maths.mq.edu.au
>
> CRICOS Provider Number 2J. Think before you print.
> Please consider the environment before printing this email.
>
> This message is intended for the addressee named and may
> contain confidential information. If you are not the intended
> recipient, please delete it and notify the sender. Views expressed
> in this message are those of the individual sender, and are not
> necessarily the views of Macquarie University. 
> 
>
>


Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-12 Thread Ross Moore
Hi Phil, Zdeněk and others.

On 12 Apr 2020, at 7:46 pm, Philip Taylor 
mailto:p.tay...@hellenic-institute.uk>> wrote:

Zdeněk Wagner wrote:


I would not do it. Of course, you cannot use \renewcommand because
\scenename is not used in any *.ldf. You could use \def\scenename{दरश्य} […]


LaTeX has  \providecommand  with the same syntax as \newcommand  and  
\renewcommand .

It makes the definition *only* if the c-s is not already known.
This means that you can always use:

  \providecommand\mycs{}
  \renewcommand\mycs{ what I really want }

to get around such issues.


A thought — if \scenename is not known at the point that the last line of 
[gloss-]marathi.ldf is read, would there be any point in using \def \scenename 
{दरश्य}, since such definition would either get over-ridden by whatever 
subsequent definition of \scename is causing the problem (\def, \renewcommand), 
or would prevent a subsequent \newcommand from working as \scenename would 
already be defined.  Is this not the case (he asked, as someone who barely 
understands anything that LaTeX does ...) ?

There is always a way to get what you want,
whether using Plain TeX or LaTeX or whatever other high-level macro structures.

Thus the important thing is how to make it resistant to updates, as Zdeněk said.


Philip Taylor

Hope this helps.
Stay safe.

Ross


Dr Ross Moore
Department of Mathematics and Statistics
12 Wally’s Walk, Level 7, Room 734
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955  |  F: +61 2 9850 8114
M:+61 407 288 255  |  E: ross.mo...@mq.edu.au
http://www.maths.mq.edu.au
[cid:image001.png@01D030BE.D37A46F0]
CRICOS Provider Number 2J. Think before you print.
Please consider the environment before printing this email.

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University. 




Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-12 Thread Philip Taylor

Zdeněk Wagner wrote:


I would not do it. Of course, you cannot use \renewcommand because
\scenename is not used in any *.ldf. You could use \def\scenename{दरश्य} [...]


A thought — if \scenename is not known at the point that the last line of 
[gloss-]marathi.ldf is read, would there be any point in using \def \scenename 
{दरश्य}, since such definition would either get over-ridden by whatever 
subsequent definition of \scename is causing the problem (\def, \renewcommand), 
or would prevent a subsequent \newcommand from working as \scenename would 
already be defined.  Is this not the case (he asked, as someone who barely 
understands anything that LaTeX does ...) ?

/Philip Taylor/




Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-11 Thread Apostolos Syropoulos via XeTeX
A better solution would be to create alittle package with all these 
redefinitions.Or ask the maintainer of the packageto add an option (e.g., 
marathi) thatwill use the new strings instead of theoriginal ones. 
Regards,
Apostolos

Στάλθηκε από το Ταχυδρομείο Yahoo σε Android 
 
  Στις Σάβ, 11 Απρ, 2020 στις 17:39, ο χρήστηςRD 
Holkar έγραψε:   Dear all,

I want to use package dramatist to write a play in language Marathi. I am using 
package polyglossia in XeLaTeX for Marathi. The package dramatist prints some 
theatrical terms via some commands. E.g., the command \scenename prints "Scene 
(and scene number in roman)". I want the word दृश्य to be printed instead of 
"Scene", and have the counter set to Devanagari script. Therefore, following 
the package documentation, I use \renewcommand{\scenename}{ﰞﰟदृश्य} in the 
preamble. Similarly, I change the counter to Devanagari script.

My question is, how can I add these translation commands to the ldf 
(marathi.ldf) file for language Marathi in package poyloglossia so that I do 
not have to keep writing these commands all the time in the preamble? Thank you 
in advance.

What I really want is the command in marathi.ldf. I doubt if \renewcommand can 
be directly put in the .ldf file, can it be? There are other packages also for 
which such translations are required. The goal is to get general trick to add 
the translation commands in the .ldf file, and update these translations on Git 
repository of polyglossia. Then they will become available to all users.

Thank you in advance.

-Rohit Dilip Holkar.
  


Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-11 Thread Zdenek Wagner
Hi,

I would not do it. Of course, you cannot use \renewcommand because
\scenename is not used in any *.ldf. You could use
\def\scenename{दरश्य} but if you do it to the distro marathi.ldf, you
lose it if the file gets updated. If you make your local copy in
texmf-local and edit it, you can potentially get into problems if
polyglossia is updated, the modification is not compatible with the
*.ldf files and all of them are updated at the same time. You local
file will be, however, based on the old copy. Even if this does not
happen, you file will be unportable. If you give the source file to
somebody else, he or she will get an error that \scenename is
undefined (unless it is in dramatist). It would be better to created
eg mrnaatak.sty (I do not know whether नाटक is the same in Hindi and
Marathi) which will contain all definitions. You will then use
\usepackage{mrnaatak} in the preamble. If you put it to texmf-local,
you can just use it. If you give the source file to somebody else, he
or she will understand from the error message, if you forget to
distribute mrnaatak.sty.

So far I wrote two screenplays, I used my own Relax NG scheme, wrote
it in XML, transformed to LaTeX and typeset. Information is here (but
the screenplay is in Czech only):

http://icebearsoft.euweb.cz/Kocka-A-Marketka/index-hi.php
http://icebearsoft.euweb.cz/ZkroceniZleKyseliny/index-hi.php

(Info available also in Czech and English)

When I have more time, I will write an article how I did it.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

so 11. 4. 2020 v 16:39 odesílatel RD Holkar  napsal:
>
> Dear all,
>
> I want to use package dramatist to write a play in language Marathi. I am 
> using package polyglossia in XeLaTeX for Marathi. The package dramatist 
> prints some theatrical terms via some commands. E.g., the command \scenename 
> prints "Scene (and scene number in roman)". I want the word दृश्य to be 
> printed instead of "Scene", and have the counter set to Devanagari script. 
> Therefore, following the package documentation, I use 
> \renewcommand{\scenename}{ﰞﰟदृश्य} in the preamble. Similarly, I change the 
> counter to Devanagari script.
>
> My question is, how can I add these translation commands to the ldf 
> (marathi.ldf) file for language Marathi in package poyloglossia so that I do 
> not have to keep writing these commands all the time in the preamble? Thank 
> you in advance.
>
> What I really want is the command in marathi.ldf. I doubt if \renewcommand 
> can be directly put in the .ldf file, can it be? There are other packages 
> also for which such translations are required. The goal is to get general 
> trick to add the translation commands in the .ldf file, and update these 
> translations on Git repository of polyglossia. Then they will become 
> available to all users.
>
> Thank you in advance.
>
> -Rohit Dilip Holkar.



Re: [XeTeX] Translation commands for package dramatist to put in the marathi.ldf file

2020-04-11 Thread Philip Taylor

RD Holkar wrote:


I want to use package dramatist to write a play in language Marathi. I am using package polyglossia 
in XeLaTeX for Marathi. The package dramatist prints some theatrical terms via some commands. E.g., 
the command |\scenename| prints "Scene (and scene number in roman)". I want the word 
दृश्य to be printed instead of "Scene", and have the counter set to Devanagari script. 
Therefore, following the package documentation, I use |\renewcommand{\scenename}{ﰞﰟदृश्य}| in the 
preamble. Similarly, I change the counter to Devanagari script.

My question is, how can I add these translation commands to the ldf 
(marathi.ldf) file for language Marathi in package poyloglossia so that I do 
not have to keep writing these commands all the time in the preamble? Thank you 
in advance.

What I really want is the command in marathi.ldf. I doubt if \renewcommand can 
be directly put in the .ldf file, can it be?



I can see no reason why not. Although "marathi.ldf" does not appear to be a part of the 
TeX Live 2020 suite, I have looked at what may be a similar file, "gloss-marathi.ldf" and 
it looks to me as if additional XeLaTeX commands could be added at the bottom, provided of course 
that you first clone it to TeXMF-Local (or similar) and modify the copy rather than the original, 
then re-build the file name database.

/Philip Taylor/