Compatibility with babel package in french (active colon character)
When using the babel
package with the frenchb
option, the colon character becomes active, which generates troubles with bibleref.
A workaround is to use :
\AtBeginDocument{\shorthandoff{:}}
to deactivate the colon character for the whole document. This works but impacts the normal use of colon in text.
Another workaround has been proposed here:
\usepackage{etoolbox}
\makeatletter
\pretocmd{\@bible@verse}{\shorthandoff:}{}{}
\apptocmd{\@end@@bibleverse}{\shorthandon:}{}{}
\makeatother
This is much better, but still causes some troubles in some cases (using biblical reference within complex environments such as a quotation with references)
Then I propose another workaround : use another character instead of colon :
, for exemple equal sign =
. I just changed a few lines, see the following diff :
--- bibleref.sty
+++ bibleref_modif.sty
@@ -668,12 +668,12 @@
}
\newcommand*{\@nodo@chapter}[1]{%
\ifnum\@bv@tmp<10\relax
- \@bv@addtochidxsort{00#1:}%
+ \@bv@addtochidxsort{00#1=}%
\else
\ifnum\@bv@tmp<100\relax
- \@bv@addtochidxsort{0#1:}%
+ \@bv@addtochidxsort{0#1=}%
\else
- \@bv@addtochidxsort{#1:}%
+ \@bv@addtochidxsort{#1=}%
\fi
\fi
}
@@ -829,21 +829,21 @@
{\BRbkchsep\@bibleverse}%
{\@end@@bibleverse}%
}
-\def\@bibleverse(#1:{%
+\def\@bibleverse(#1={%
\@br@chsty{#1}%
\@@bibleverse
}
-\def\@bibleverser-(#1:{%
+\def\@bibleverser-(#1={%
\def\@bv@tmp{#1}%
\ifx\@bv@tmp\@empty
\else
\ifnum\@bv@tmp<10\relax
- \@bv@addtochidxsort{00#1:}%
+ \@bv@addtochidxsort{00#1=}%
\else
\ifnum\@bv@tmp<100\relax
- \@bv@addtochidxsort{0#1:}%
+ \@bv@addtochidxsort{0#1=}%
\else
- \@bv@addtochidxsort{#1:}%
+ \@bv@addtochidxsort{#1=}%
\fi
\fi
\@bv@do{\protect\BRchapterstyle{#1}}%
Maybe this can be properly implemented, with a macro defining the desired character (colon, equal sign or whatever)? Hope it helps...