• fancyhdr and babel

    From =?UTF-8?Q?Fran=C3=A7ois_Patte?=@21:1/5 to All on Sat Jan 11 12:32:44 2025
    Bonjour,

    I try to write a bilingual document (french and sanskrit). Defining an environment to have the sanskrit text in devanagari script, this one
    modify the fancyhdr configuration and I don't understand why.

    Here is a minimal (I hope) working example:

    <-----------------------------------------MWE
    documentclass[a4paper,11pt,twoside]{report}
    \usepackage{fontspec}

    \newenvironment{velthuisdev}{%
    \selectlanguage{sanskrit}%
    \newfontfamily\fontdev[%
    Mapping=velthuis-sanskrit,%
    Script=Devanagari,%
    UprightFeatures={Language=Sanskrit},%
    AutoFakeSlant=0.2,%
    WordSpace=1.2,%
    ]{%
    FreeSerif%
    }%
    \fontdev%
    }%
    {\selectlanguage{french}}

    \setmainfont{FreeSerif}[%
    Mapping=tex-text,%
    ]
    \usepackage[sanskrit,french,provide+=*]{babel}
    \usepackage{datetime}
    \renewcommand{\timeseparator}{:~}

    \usepackage{fancyhdr}
    \pagestyle{fancy}
    \fancyhf{}%
    \fancyfoot[LO,RE]{%
    \tiny\today~--~\currenttime%
    }
    \usepackage{lipsum}

    \begin{document}
    \lipsum[1]
    \newpage
    \begin{velthuisdev}
    \lipsum[2]
    \end{velthuisdev}
    \newpage
    \lipsum[3]
    \end{document}
    -----------------------------------------------------------> MWE

    Once I use the velthuisdev environment, the fancyfoot configuration does
    not diplay the date but: ?today? on the following pages...

    I tried what is suggested by babel style:
    Package babel Warning: \today not set for 'french'. Please,
    (babel) define it after the language has been loaded
    (babel) (typically in the preamble) with:
    (babel) \setlocalecaption{french}{today}{..}

    without any success!

    Why? What is wrong in my environment definition and how can I change this?

    Thank you.

    F.P.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pieter van Oostrum@21:1/5 to francois.patte@mi.parisdescartes.fr on Sat Jan 11 17:32:23 2025
    François Patte <francois.patte@mi.parisdescartes.fr> writes:

    Bonjour,

    I try to write a bilingual document (french and sanskrit). Defining an environment to have the sanskrit text in devanagari script, this one
    modify the fancyhdr configuration and I don't understand why.

    Here is a minimal (I hope) working example:
    [snip]
    Once I use the velthuisdev environment, the fancyfoot configuration does
    not diplay the date but: ?today? on the following pages...

    I tried what is suggested by babel style:
    Package babel Warning: \today not set for 'french'. Please,
    (babel) define it after the language has been loaded
    (babel) (typically in the preamble) with:
    (babel) \setlocalecaption{french}{today}{..}

    without any success!

    Why? What is wrong in my environment definition and how can I change this?


    I tried this document, and it just works (compiled with xelatex). And in the footer there is 11 janvier 2025 on all pages even after the sanskrit text.

    Also I don't get the babel warning.
    So maybe something need to be updated in your LaTeX installation.
    --
    Pieter van Oostrum <pieter@vanoostrum.org>
    www: http://pieter.vanoostrum.org/
    PGP key: [8DAE142BE17999C4]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Fran=C3=A7ois_Patte?=@21:1/5 to All on Sat Jan 11 18:33:43 2025
    Le 11/01/2025 à 17:32, Pieter van Oostrum a écrit :
    François Patte <francois.patte@mi.parisdescartes.fr> writes:

    Bonjour,

    I try to write a bilingual document (french and sanskrit). Defining an
    environment to have the sanskrit text in devanagari script, this one
    modify the fancyhdr configuration and I don't understand why.

    Here is a minimal (I hope) working example:
    [snip]
    Once I use the velthuisdev environment, the fancyfoot configuration does
    not diplay the date but: ?today? on the following pages...

    I tried what is suggested by babel style:
    Package babel Warning: \today not set for 'french'. Please,
    (babel) define it after the language has been loaded
    (babel) (typically in the preamble) with:
    (babel) \setlocalecaption{french}{today}{..}

    without any success!

    Why? What is wrong in my environment definition and how can I change this? >>

    I tried this document, and it just works (compiled with xelatex). And in the footer there is 11 janvier 2025 on all pages even after the sanskrit text.

    Also I don't get the babel warning.
    So maybe something need to be updated in your LaTeX installation.

    Thank you for answering. You are right, I just updated my texlive and
    babel has changed on 01/01/2025 and fancyhdr on 06/01/2025!

    Thank you.

    F.P.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)