Bon jour,

even without testing your code I see it. It is as I wrote. The
velthuis-sanskrit mapping was created years ago by me and if you look
at velthuis-sanskrit.map, the numerals are handled in a block started
on line 162. The package options can decide which numbering style is
generated automatically. However, when the text is going to the
output, it is processed by Mapping-velthuis-sanskrit. No matter
whether the digits were typed by you or they were automatically
generated, if you \devanagarifont is used, they are mapped to
devanagari digits. If you want to have Latin digits in pagination or
enumeration, you have to switch temporarily to FreeSerif defined
without Mapping=velthuis-sanskrit.

Zdeněk Wagner
https://www.zdenek-wagner.eu/

út 2. 12. 2025 v 18:09 odesílatel François Patte <[email protected]> napsal:
>
> Le 02/12/2025 à 12:20, Zdenek Wagner a écrit :
> > Bon jour,
> >
> > can you provide a MWE?
>
> Thank you for answering. Here is a MWE (I need a minimum of five lines
> to produce the lineation counter):
> <------------------------------------------------
> \listfiles
>
> \documentclass[a4paper,twoside,11pt]{report}
>
> \usepackage{fontspec}
>
> \usepackage{polyglossia}
>
> \setdefaultlanguage[numerals=western]{sanskrit}
> \setotherlanguage{french}
>
> \usepackage[parapparatus,noend,series={A,B},noeledsec]{reledmac}
> \Xnotenumfont{\bfseries}
> \Xhangindent{5pt}
> \newcommandx{\variantes}[2][1,usedefault]{\Afootnote[#1]{#2}}
> \Xlemmadisablefontselection[A]
>
> \newfontfamily{\devanagarifont}[%
>    Mapping=velthuis-sanskrit,%
>    Script=Devanagari,%
>    Extension= .otf,%
>    UprightFeatures={Language=Sanskrit},%
>    BoldFont = FreeSerifBold,%
>    BoldFeatures={Language=Sanskrit},%
>    AutoFakeSlant=0.2,%
>    ItalicFeatures={Language=Sanskrit},%
>    WordSpace=1.2,%
>    ]{%
>      FreeSerif%
>    }%
>
> \newfontfamily{\sanskritrom}[%
> Mapping=velthuis-romanized,%
> Script=Latin]{%
>    FreeSerif}%
>
> \begin{document}
>
> %\sanskritrom%\localnumeral*[lang=french]{page}
>
> \lineation{page}
>
> \linenummargin{outer}
>
> \sidenotemargin{inner}
>
>    \beginnumbering
>
>    \pstart
>
>    \edlabelS{note6-1}\edtext{%
>      atha \ledsidenote{1} "sre.dhiivyavahaara.h| "sre.dhiiti
>      paa.tiiga.nite caya ucyate|}%
>    {\xxref{note6-1:start}{note6-1:end}\lemma{atha\dots{}
>        sa.mkalitaikyam}%
>      \variantes{%
>        atha\dots{}vyavahaara.h-  -uu  vyavahaara.h- aarabhyata
>         -i -.r  ga.nite- ga.nitena -.r| -ka  caya.h-
>         -.r -ka| iti  -.R  ucyate-  -ka  tatra-
>        tathaa -.r  eka(1)- ekam -aa  vi.sayam- vi.saya -.R -ka
>         aakyaa- aakhyam -.r  khalu- kila -.r}%
>    }%
>
>    tatraika"sre.dhiivi.saya.m suutram\edlabelE{note6-1}---
>
>    \pend
>
>    \pstart
>
>    \edlabelS{note6-2}\edtext{%
>      saika.m ca tatpada.m saikapadam| padasyaardha.m padaardham|}%
>    {\xxref{note6-2:start}{note6-2:end}\lemma{saikam\dots{} spa.s.tayati}%
>      \variantes{%
>        ca(1)- cet -.r  tat(1)-  -.r padam(1)- cet  -u
>        -.r  saikapadam- -.r -.R  padaardham(1)- -uu -.R
>        -ka  saikapadena\dots{}padaardham(2)- -.r  gu.nitam-
>        ga.nitam -ka ardham(3)- ardha -aa  evam- aikya -u -kha
>        sa.mkalita- sa.mkalitaa -i  ca(2)-  -ka
>        yuti.h(2)- yuti -ka  padena(2)- -.r  h.rtaa- hataa
>        -u  udaahara.nena- idamudde"sakena -aa| udaa@ -u
>        spa.s.tayati- uddi"sati -aa}%
>    }
>
>    saikapadena hata.m gu.nita.m padaardha.m tatsaikapadaghnapadaardham|
>    eva.m kara.naadi.s.tapadasyaikaadya"nkayuti.h syaat| saa
>    sa.mkalitanaamnii bhavati| saa ca yuti.h dviyutena padena hataa
>    tatastrih.rtaa sa.mkalitasyaikya.m bhavati|
>    udaahara.nena spa.s.tayati---\edlabelE{note6-2}%
>
>    \pend
>
>    \endnumbering
>
> \end{document}
> <-------------------------------------------------
>
> As it is the output is in devanagari script.
>
> If you uncomment the %\sanskritrom it is turned in latin script and
> lineation and page counters remain in devanagari. Side notes and
> footnotes counters are turned in latin script.  Chapter counter is also
> turned in latin script if we use the \chapter command.
>
> I use Velthuis transliteration scheme because I can produce a text in
> devanagari script or in latin script from the same source file, just
> changing a command in the preamble.
>
> It use to work for every thing (all counters...) until a recent update
> of texlive. And I don't know how to get get back to the previous behaviour.
>
> Thank you for helping.
>
> F.P.
>
> I do not use Sanskrit but only Hindi and as you
> > can see at http://icebearsoft.euweb.cz/bilinpoe/, I can control where
> > I use Devanagari numerals and where Latin (Arabic) numerals. I input
> > the text in Devanagari using my keyboard for linux
> > (http://icebearsoft.euweb.cz/cze-dvng-xkb/). If you use
> > transliteration, then the digits are most probably transformed to
> > Devanagari which cannot be later modified by options.
> >
> > Zdeněk Wagner
> > https://www.zdenek-wagner.eu/
> >
> > út 2. 12. 2025 v 12:05 odesílatel François Patte via XeTeX
> > <[email protected]> napsal:
> >>
> >> Le 02/12/2025 à 10:27, Stefan Solbrig a écrit :
> >>>
> >>> Bonjour,
> >>>
> >>>> Bonjour,
> >>>>
> >>>> I recently came across an issue with polyglossia and sanskrit: when
> >>>> you put
> >>>> \setdefaultlanguage{sanskrit} a "\requirepackage{devanagaridigits} is
> >>>> called which turns numbers in devanagari scipt.
> >>>>
> >>>> Is there a way to avoid (or correct) this ie. I want to be able to get
> >>>> numerals in latin script even if the text script is in devanagari.
> >>>
> >>> You can change this via an option to polyglossia:
> >>>
> >>> \setmainlanguage[numerals=western]{sanskrit}
> >>> or
> >>> \setmainlanguage[numerals=devanagari]{sanskrit}
> >>
> >> Thank you for your answer but this does not work the option is accepted
> >> but numerals remain in devanagari...
> >>
> >> There is something which I don't understand in polyglossia doc: on page
> >> 52 we can read:
> >>
> >> "For ← the conversion of counters, the starred version \localnumeral* is
> >> provided. This takes a counter as argument. For instance in an Arabic
> >> environment \localnumeral*{page} yields ٥٢"
> >>
> >> but the number appears where the command is written not where the page
> >> number is set!
> >>
> >> If we put this command in the preamble, it becomes an unknown command.
> >>
> >>
> >>>
> >>>> PS2- Where can we see all the dependencies of a command ie. be aware
> >>>> that  \setdefaultlanguage{sanskrit} will require devanagaridigits for
> >>>> instance.... I discovered this problem thanks to an error message
> >>>
> >>> use xelatex (or xetex) with the -recorder option. This (and also in
> >>> other tex engines) will produce a  *.fls file that lists all included
> >>> files. Compare the *.fls files before and after you added a 
> >>> command/option.
> >>>
> >>
> >> BTW is there an option to see what is the font file used in a
> >> compilation, I mean the file and its location not only the name of the
> >> file... I am confused with this because if I put Extension= .otf, in a
> >> \newfontfamily command, I get a different ligature than the one obtained
> >> without the extension and I don't have any .ttf accessible font!
> >>
> >> Thank you again.
> >>
> >> --
> >> François Patte
> >> tél : +33 (0)6 7892 5822
> >> https://www.pingala.homelinux.org/~fp
> >>
>
>
> --
> François Patte
> tél : +33 (0)6 7892 5822
> https://www.pingala.homelinux.org/~fp

Reply via email to