Closed jbezos closed 1 year ago
With the version currently in GitHub if I add to japanese.ldf
the following:
\setlocalecaption{\CurrentOption}{chapter.template}%
{[[prechapter]] [chapter] [[postchapter]]}
and with the following document:
\documentclass{book}
\usepackage[japanese]{babel}
\babelfont{rm}{IPAexMincho}
\begin{document}
\chapter{Blah}
\end{document}
I get
If I then modify the latter as follows:
\documentclass{book}
\usepackage[japanese]{babel}
\babelfont{rm}{IPAexMincho}
\babelprovide[labels=map, labels/arabic.map = informal]{japanese}
\setlocalecaption{japanese}
{chapter.template}
{[[prechapter]][chapter][[postchapter]]}
\begin{document}
\chapter{Blah}
\end{document}
I get
Thanks!
Could you tell me how to detect whether this feature is available or not? I'd like to add
\if<something>
\setlocalecaption{\CurrentOption}{part.template}%
{[[prepart]] [part] [[postpart]]}
\setlocalecaption{\CurrentOption}{chapter.template}%
{[[prechapter]] [chapter] [[postchapter]]}
\fi
into japanese.ldf.
Another issue I have is that the opposite format change is not available. For example, ltjbook.cls is a Japanese class which already has a format of [[prechapter]] [chapter] [[postchapter]]
. In this case, \usepackage[english]{babel}
cannot change the format. If we could avoid such a problem by using \usepackage[japanese,english]{babel}
, it would be useful too.
\ifx\setlocalecaption\@undefined
should work, to avoid an error. But those two settings will be just ignored in the current published version (well, not quite, but the internal changes are harmless).
As discussed here: https://github.com/texjporg/babel-japanese/issues/3 .