<div dir="ltr">Hi all,<div><br></div><div>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.</div><div>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.</div><div>If community guidelines demand, then I would start a new thread with this question.</div><div>Thank you all very much!</div><div><br></div><div>With best regards,</div><div>-Rohit.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 13, 2020 at 2:51 AM Ross Moore <<a href="mailto:ross.moore@mq.edu.au">ross.moore@mq.edu.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">



<div bgcolor="#FFFFFF">
<div>Hi Zdenek,<br>
<br>
</div>
<div>On 13/04/2020, at 0:00, "Zdenek Wagner" <<a href="mailto:zdenek.wagner@gmail.com" target="_blank">zdenek.wagner@gmail.com</a>> wrote:<br>
<br>
</div>
<div></div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>Hi all,</div>
</div>
</div>
</blockquote>
<br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>This can be done with \let and \def, not with \newcommand:</div>
<div><br>
</div>
<div>\let\savedLabel\label</div>
<div>\def\label#1{Do something with #1 \SavedLabel{#1}}</div>
<div><br>
</div>
<div>The second line could be replaced with</div>
<div>\renewcommand*\label[1]{Do something with #1 \SavedLabel{#1}}</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>This idea can be extended somewhat.</div>
<div><br>
</div>
<div>\makeatletter</div>
<div>\def\MY@label#1{<span>Do something
 with #1 \LTX@label{#1}}</span></div>
<div><span>\AtBeginDocument{</span></div>
<div><span> \let\LTX@label\label</span></div>
<div><span> \let\label\MY@label</span></div>
<div><span>}</span></div>
<div><span>\makeatother</span></div>
<div><span><br>
</span></div>
<div><span>This way you retain pointers
 to both your own version and the original, </span></div>
<div><span>so can change between them if
 necessary, within different parts of your</span></div>
<div><span>document, or within specially
 tailored environments.</span></div>
<div><span><br>
</span></div>
<div><span>Delaying the \let rebindings
 using \AtBeginDocument means that it will still work</span></div>
<div><span>if some other package (such as
  hyperref ) makes its own changes, </span></div>
<div><span>which you also want to incorporate.</span></div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div><br>
</div>
<div>\providecommand is useful if you assume that a definition exist but you want to provide a default definition.</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Sure.</div>
<div>It is particularly useful when devising templates that will be filled with information </div>
<div>provided by a database, and command-line shell software that automates </div>
<div>calls to TeX or LaTeX or other engine.</div>
<div><br>
</div>
<div>latex '\def\name{client name} ... \input{mytemplate.tex}'</div>
<div><br>
</div>
<div>where  mytemplate.tex  is the main LaTeX source, having</div>
<div>  \providecommand{\name}{some default}</div>
<div>and similarly for all the variable data fields.</div>
<div><br>
</div>
<div>I use this kind of setup to automate personalised assignment cover-sheets,</div>
<div>generated online in response to student requests from a web page.</div>
<div>Sometimes the full question sheet is done this way,</div>
<div>with versions personalized, or randomized, <span>based
 upon student ID numbers.</span></div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div>\expandafter\ifx\csname scenename\endcsname\relax</div>
<div>  code for \scenename not yet defined</div>
<div>\else</div>
<div>  code for \scenename already defined</div>
<div>\fi</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>With \csname  you can test for all kinds of things,</div>
<div>and even adjust macros like  \begin  and  \end  to patch in extra coding</div>
<div>for specific environments, whether a package is loaded or not.</div>
<div><br>
</div>
<div>The possibilities are endless.</div>
<div><br>
</div>
<div><br>
</div>
<div>Cheers.</div>
<div>Stay safe.</div>
<div><br>
</div>
<div>      Ross</div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div><br>
</div>
<div>Of course, the whole \else part can be omitted if you have nothing to put there.</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Zdeněk Wagner<br>
<a href="https://protect-au.mimecast.com/s/QcrSCnx1Z5UgvO8wS9Msu9?domain=ttsm.icpf.cas.cz" target="_blank">http://ttsm.icpf.cas.cz/team/wagner.shtml</a><br>
<a href="https://protect-au.mimecast.com/s/fkdBCoV1Y2S5EqO9HzWPDx?domain=icebearsoft.euweb.cz" target="_blank">http://icebearsoft.euweb.cz</a></div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">ne 12. 4. 2020 v 12:49 odesílatel Ross Moore <<a href="mailto:ross.moore@mq.edu.au" target="_blank">ross.moore@mq.edu.au</a>> napsal:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div>Hi Phil, Zdeněk and others.
<div><br>
<blockquote type="cite">
<div>On 12 Apr 2020, at 7:46 pm, Philip Taylor <<a href="mailto:P.Taylor@Hellenic-Institute.Uk" target="_blank">P.Taylor@Hellenic-Institute.Uk</a>> wrote:</div>
<br>
<div>
<div bgcolor="#FFFFFF">
<div>Zdeněk Wagner wrote:<br>
<br>
</div>
<blockquote type="cite">
<pre>I would not do it. Of course, you cannot use \renewcommand because
\scenename is not used in any *.ldf. You could use \def\scenename{दरश्य} […]
</pre>
</blockquote>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>LaTeX has  \providecommand  with the same syntax as \newcommand  and  \renewcommand .</div>
<div><br>
</div>
<div>It makes the definition *only* if the c-s is not already known.</div>
<div>This means that you can always use:</div>
<div><br>
</div>
<div>  \providecommand\mycs{}</div>
<div>  \renewcommand\mycs{ what I really want }</div>
<div><br>
</div>
<div>to get around such issues.</div>
<br>
<blockquote type="cite">
<div>
<div bgcolor="#FFFFFF">
<blockquote type="cite"></blockquote>
<br>
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 ...) ?<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>There is always a way to get what you want,</div>
<div>whether using Plain TeX or LaTeX or whatever other high-level macro structures.</div>
<div><br>
</div>
<div>Thus the important thing is how to make it resistant to updates, as Zdeněk said.</div>
<br>
<blockquote type="cite">
<div>
<div bgcolor="#FFFFFF"><br>
<i>Philip Taylor</i><br>
</div>
</div>
</blockquote>
</div>
<div><br>
</div>
Hope this helps.
<div>Stay safe.</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>Ross</div>
<div><br>
<div><br>
Dr Ross Moore<br>
Department of Mathematics and Statistics 
<div>12 Wally’s Walk, Level 7, Room 734<br>
Macquarie University, NSW 2109, Australia<br>
T: +61 2 9850 8955  |  F: +61 2 9850 8114<br>
M:+61 407 288 255  |  E: <a href="mailto:ross.moore@mq.edu.au" target="_blank">ross.moore@mq.edu.au</a><br>
<a href="http://www.maths.mq.edu.au" target="_blank">http://www.maths.mq.edu.au</a><span style="font-size:12px;line-height:normal"><a href="http://mq.edu.au/" style="font-size:12px;line-height:normal" target="_blank"><span><br style="color:rgb(0,105,217);font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-family:Arial,sans-serif">
<span style="color:rgb(0,105,217);font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-family:Arial,sans-serif"><span><span><span><span><image001.png></span><br style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none">
<span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">CRICOS
 Provider Number 00002J. Think before you</span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline"> </span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">print. </span><br style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none">
<span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">Please
 consider the environment before printing this</span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline"> </span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">email.</span><br style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none">
<br style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none">
<span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">This
 message is intended for the addressee named</span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline"> </span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">and
 may </span><br style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none">
<span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">contain
 confidential information. If you are not the</span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline"> </span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">intended </span><br style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none">
<span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">recipient,
 please delete it and notify the sender. Views</span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline"> </span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">expressed </span><br style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none">
<span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">in
 this message are those of the individual sender, and</span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline"> </span><span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">are
 not </span><br style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none">
<span style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(0,0,0);font-family:Helvetica;text-decoration:none;float:none;display:inline">necessarily
 the views of Macquarie University.</span> </span></span></span></span></span></a></span></div>
<a href="http://mq.edu.au/" style="font-size:12px;line-height:normal" target="_blank"></a></div>
<br>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>

</blockquote></div>