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

Merge branch 'pre1.19' into issue16

parents a35a6370 e1406717
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).
1.18:
* Fix bug with indexing when using non unicode engine.
1.17:
......
......@@ -973,7 +973,7 @@
% Declare package
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bibleref}[2018/07/21 1.18 (NLCT and MR)]
\ProvidesPackage{bibleref}[2018/07/29 1.19 (NLCT and MR)]
% \end{macrocode}
% Need to do some conditional stuff
% \begin{macrocode}
......@@ -2081,6 +2081,7 @@ defined}{}}}
%\end{macro}
%
%\begin{macro}{\bibleverse}
%\changes{v1.19}{2018/07/29}{\cs{bibleverse} is now robust}
%\begin{definition}
%\cs{bibleverse}\marg{name}
%\end{definition}
......@@ -2097,6 +2098,11 @@ defined}{}}}
% \begin{macrocode}
\newcommand*{\@bible@verse}[1]{%
% \end{macrocode}
% Makes \verb+:+ normal character (babel-french).
%\changes{1.19}{2018/07/29}{Add \cs{shorthandoff}\verb+:+ (for babel)}
% \begin{macrocode}
\shorthandoff:%
% \end{macrocode}
% This looks for a command called
% \cs{br@}\meta{name} (defined earlier).
% After the book title, it then checks
......@@ -2283,8 +2289,10 @@ defined}{}}}
\fi
% \end{macrocode}
%\changes{1.14}{2011/01/19}{added \cs{@bv@restore}}
%\changes{1.19}{2018/07/29}{Add \cs{shorthandon}\verb+:+ (for babel)}
% \begin{macrocode}
\@bv@restore
\shorthandon:%
}
% \end{macrocode}
%\end{macro}
......@@ -2426,6 +2434,7 @@ defined}{}}}
%\end{macro}
%
%\begin{macro}{\ibibleverse}
%\changes{v1.19}{2018/07/29}{\cs{ibibleverse} is now robust}
% This is like \cs{bibleverse},
% but also adds an index entry. The optional argument indicates
% how to format the page number (without the preceding backslash)
......@@ -2487,6 +2496,15 @@ defined}{}}}
\newcommand*{\bvidxpgformat}{textrm}
% \end{macrocode}
%\end{macro}
% Define \cs{shorthandoff} and \cs{shortandon} if babel is not loaded.
% \begin{macrocode}
\AtBeginDocument{%
\ifdefined\shorthandoff\else%
\let\shorthandoff\@gobble%
\let\shorthandon\@gobble%
\fi%
}%
% \end{macrocode}
%\iffalse
% \begin{macrocode}
%</bibleref.sty>
......
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{bibleref}
\begin{document}
\tableofcontents
\listoffigures
Here a reference in the text which works: \bibleverse{Gn}(1:1-3)
\section{Here a reference within a title: \bibleverse{Gn}(1:1-3) } % Don't work
\begin{table}
\caption{Here a reference within a caption: \bibleverse{Gn}(1:1-3) } % Don't work
\end{table}
\end{document}
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