Proibir a hifenização entre a etiqueta biblatatex e os números de prefixo

Proibir a hifenização entre a etiqueta biblatatex e os números de prefixo

Se alguém usa prefixos para rótulos de babador no biblatex, frequentemente ocorre a hifenização entre o prefixo e o rótulo de babador real, especialmente para prefixos mais longos.

insira a descrição da imagem aqui

Como isso pode ser evitado?

Soluções oferecidas aquinão tem nenhum efeito. Tenho certezairá consertar na maioria dos casos, mas nem sempre estou usando e gostaria de uma solução mais segura.

Também estou ciente \mbox{...}, mas não gostaria de colocar todos os comandos de citação lá manualmente.

\begin{filecontents}{references.bib}
@InProceedings{Baader1989,
  Title                    = {Direct self control of inverter-fed induction machine, a basis for speed control without speed-measurement},
  Author                   = {Baader, U. and Depenbrock, M. and Gierse, Georg},
  Booktitle                = {Industry Applications Society Annual Meeting, 1989., Conference Record of the 1989 IEEE},
  Year                     = {1989},
  Month                    = {Oct},
  Pages                    = {486-492 vol.1},
}
\end{filecontents}

\documentclass{article}

\usepackage[style=alphabetic,%
            backend=biber,
            maxnames=99,
            maxalphanames=1,    
            backref=true,
            doi=false,isbn=false,url=false,
            backref=false,
            ]{biblatex}
\renewcommand*{\labelalphaothers}{}

\bibliography{references.bib} 

\begin{document}
\noindent This is a looong sentence which will lead to hyphenation in the bib label:  \cite{Baader1989}
\printbibliography[prefixnumbers = P-]
\end{document}

Responder1

O prefixnumbersnão é mais compatível com a versão mais recente do biblatex.

\begin{filecontents}{\jobname.bib}
@InProceedings{Baader1989,
  Title                    = {Direct self control of inverter-fed induction machine, a basis for speed control without speed-measurement},
  Author                   = {Baader, U. and Depenbrock, M. and Gierse, Georg},
  Booktitle                = {Industry Applications Society Annual Meeting, 1989., Conference Record of the 1989 IEEE},
  Year                     = {1989},
  Month                    = {Oct},
  Pages                    = {486-492 vol.1},
}
\end{filecontents}

\documentclass{article}

\usepackage[style=alphabetic,%
            backend=biber,
            maxnames=99,
            maxalphanames=1,    
            backref=true,
            doi=false,isbn=false,url=false,
            backref=false,
            ]{biblatex}
\renewcommand*{\labelalphaothers}{}

\addbibresource{\jobname.bib}

\newrobustcmd{\safehyphen}{\ifincsname-\else\mbox{-}\fi}

\begin{document}
\newrefcontext[labelprefix=P\safehyphen]

\noindent This is a looong sentence which will lead to 
hyphenation in the bib label:  \cite{Baader1989}

\printbibliography

\end{document}

Acredito que a mesma estratégia funcionará da maneira antiga. O problema é que o prefixo é usado em dois lugares distintos: para imprimir e para formar nomes de sequência de controle, então adicionar uma macro lá não funcionará a menos que usemos o \ifincsnametruque.

insira a descrição da imagem aqui

Nota: testei com TeX Live 2014 e

\newrobustcmd{\safehyphen}{\ifincsname-\else\mbox{-}\fi}

no preâmbulo junto com

\printbibliography[prefixnumbers = P\safehyphen]

funciona.

informação relacionada