Commit 6fce2a80 authored by Maïeul Rouquette's avatar Maïeul Rouquette
Browse files

tester si : est un shorthand avant de le desactiver (sinon message d'erreur et...

tester si : est un shorthand avant de le desactiver (sinon message d'erreur et pas simple warning, cf https://tex.stackexchange.com/q/443956/7712)
parent 6a8cb02a
1.20:
* Before switching off `:` shorthand, test if it is a shorthand.
1.19:
* \bibleverse and \ibibleverse are now robust, and so can be used in section title, caption, etc.
* Fix bug when using french and frenchb option of babel with pdflatex (because `:` character is active with this configuration).
......
......@@ -973,7 +973,7 @@
% Declare package
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bibleref}[2018/07/29 1.19 (NLCT and MR)]
\ProvidesPackage{bibleref}[2018/07/31 1.20 (NLCT and MR)]
% \end{macrocode}
% Need to do some conditional stuff
% \begin{macrocode}
......@@ -2100,8 +2100,11 @@ defined}{}}}
% \end{macrocode}
% Makes \verb+:+ normal character (babel-french).
%\changes{1.19}{2018/07/29}{Add \cs{shorthandoff}\verb+:+ (for babel)}
%\changes{1.20}{2018/07/31}{Check before using \cs{shorthandoff}\verb+:+ (for babel)}
% \begin{macrocode}
\shorthandoff:%
\bbl@ifunset{bbl@active@\string:}%
{}%
{\shorthandoff:}%
% \end{macrocode}
% This looks for a command called
% \cs{br@}\meta{name} (defined earlier).
......@@ -2290,9 +2293,12 @@ defined}{}}}
% \end{macrocode}
%\changes{1.14}{2011/01/19}{added \cs{@bv@restore}}
%\changes{1.19}{2018/07/29}{Add \cs{shorthandon}\verb+:+ (for babel)}
%\changes{1.20}{2018/07/31}{Check before using \cs{shorthandon}\verb+:+ (for babel)}
% \begin{macrocode}
\@bv@restore
\shorthandon:%
\bbl@ifunset{bbl@active@\string:}%
{}%
{\shorthandon:}%
}
% \end{macrocode}
%\end{macro}
......@@ -2496,12 +2502,11 @@ defined}{}}}
\newcommand*{\bvidxpgformat}{textrm}
% \end{macrocode}
%\end{macro}
% Define \cs{shorthandoff} and \cs{shortandon} if babel is not loaded.
% Define \cs{bbl@ifunset} if babel is not loaded.
% \begin{macrocode}
\AtBeginDocument{%
\ifdefined\shorthandoff\else%
\let\shorthandoff\@gobble%
\let\shorthandon\@gobble%
\ifdefined\bbl@ifunset\else%
\def\bbl@ifunset#1#2#3{}%
\fi%
}%
% \end{macrocode}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment