(1) What argument <arg> do I supply to \ltx@ifpackageloaded{<arg>} to specifically catch french babel?
(2) Would you mind compiling the MWE with \usepackage{siunitx} commented out. If it produces compiler error ! Undefined control sequence.<argument> \text{loaded} ...eLoaded[babel]+: \myIsPackageLoaded[babel] as it does for me, I would like to know why?!
\documentclass{minimal}
%RN. 10Aug16. MWE_17_04
\usepackage{ltxcmds}
\usepackage[frenchb,english]{babel}
%\usepackage{siunitx}
\usepackage{MyUtilities}
\begin{document}
\verb+\myIsPackageLoaded[babel]+: \myIsPackageLoaded[babel]
\verb+\myIsPackageLoaded[frenchb]+: \myIsPackageLoaded[frenchb]
\verb+\myIsPackageLoaded[french-babel]+: \myIsPackageLoaded[french-babel]
\end{document}
\ProvidesPackage{MyUtilities}
%\usepackage{expl3}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand\myIsPackageLoaded{O{}}{\myIsPackageLoaded_Main:nn {#1}}
\cs_new:Npn \myIsPackageLoaded_Main:nn #1
{
\ltx@ifpackageloaded{#1}{\text{loaded}}{\text{not~loaded}}
}
\ExplSyntaxOff
\makeatletter...\makeatotherpair needed for\ltx@ifpackageloaded? – Aug 09 '16 at 15:50\makeatletter ...\makeatotheris not required in.styfiles. – Reinhard Neuwirth Aug 09 '16 at 23:20}{}'babeldocs, language names may refer to different things. Checking iffrenchbis used as an option is not the right answer, because you can load thefrenchlanguage withfrenchorfrancais, too. A better test is ifl<@lang>and\date<lang>exist. – Javier Bezos Aug 10 '16 at 06:45\ProvidesPackagecommand -- which is difficult to see, since example code and.styare merged in your post – Aug 10 '16 at 07:37A Babel language definition file for Frenchhas supplied me with following 2-liner which solves my problem perfectly and without fuss:\ifdefined\frenchbsetup \shorthandoff{;} % \shorthandon{;} \fi– Reinhard Neuwirth Aug 11 '16 at 04:54.texand.stycomponents. – Reinhard Neuwirth Aug 11 '16 at 07:14... and here is the package code– Aug 11 '16 at 07:48