3

When trying to use an emdash after a verse citation, the parser fails, presumably because it thinks the dash following the close parenthesis is a verse separator.

\documentclass{minimal}
\usepackage{bibleref}

\begin{document}
\bibleverse{Mt}(1:1-3)---the first verses.
\end{document}

Is there a way to tell the \bibleverse command to end without leaving a space after it?

  • 1
    You could put \relax in before the emdash. – David Purton Feb 7 '19 at 3:05
  • @DavidPurton That works ! I gave some alternative solutions as my answer... and deliberately omitted putting your tip in the code, as you might like to post it as an answer yourself. That would be best, I think. As a second option, I could add it in my set of alternatives too-- if you want. – Partha D. Feb 7 '19 at 5:11
  • That's a good suggestion. I was looking for a way to do that late last night and had forgotten that specific command. Thanks! – Logan Feb 7 '19 at 12:20
3

As @DavidPurton put it (with \relax), or with \protect or \/ or {}... or even if you embrace the em-dash in curly brackets {---}, things seem to work correctly for me:

\documentclass{minimal}
\usepackage{bibleref}

\begin{document}
\bibleverse{Mt}(1:1-3)\/---the first verses.
% Alternate solutions:
% \bibleverse{Mt}(1:1-3){}---the first verses.
% \bibleverse{Mt}(1:1-3){---}the first verses.
% \bibleverse{Mt}(1:1-3)\protect---the first verses.
% \bibleverse{Mt}(1:1-3)\relax---the first verses. %% @DavidPurton
\end{document}

which compiles without any error to give:

enter image description here

However, if you ask me for formatting, I would have preferred a brief space before and after the em-gap... but that's a different issue altogether.

Hope your problem should be solved with any of these hacks.

  • 1
    I appreciate it and those are good workarounds. I have actually encapsulated the \bibleverse command in another command, so the \relax is what I was looking for, I'd just forgotten the specific command. As to the em-dash, if I were using an en-dash as the separator I'd agree, but since I'm republishing a 18th century book, I think the current style will suffice :) – Logan Feb 7 '19 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.