Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

EDIT: The Post has been updated considering the first 19 comments

In my LaTeX document

 \href{en.wikipedia.org/wiki/Pr%C3%A9lude_%C3%A0_l'apr%C3%A8s-midi_d'un_faune}{en.wikipedia.org/wiki/Prélude\_à\_l'après-midi\_d'un\_faune}

works perfectly and produces a correct link. I want to use that link in my .bib file too, but I can't get it working. Alone the presence of

en.wikipedia.org/wiki/Pr%C3%A9lude_%C3%A0_l'apr%C3%A8s-midi_d'un_faune

is enough to produce an error when compiling with biber. I don't know where to search for the error. I thought biblatex in combination with biber is capable of utf8, so this should not be a problem at all, right?

So I have prepared two example files, which do not work on my system (Ubuntu 13.04): Please consider:

bibfile.bib:

@misc{wiki3,
author = {Wikipedia},
title = {Prélude à l’après-midi d’un faune},
howpublished = {\href{http://en.wikipedia.org/wiki/Pr%C3%A9lude_%C3%A0_l'apr%C3%A8s-midi_d'un_faune}{en.wikipedia.org/wiki/Prélude\_à\_l'après-midi\_d'un\_faune}},
note = "[Zugriff am 12. Mai 2013 um 19:35]"
}

test.tex:

\documentclass{article}
\usepackage[style=numeric, backend=biber]{biblatex}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\addbibresource{bibfile.bib}
\usepackage{hyperref}
\begin{document}
EXAMPLE CONTENT
\nocite{*}
\printbibliography

\end{document}

Running pdflatex test.tex is successful. Running biber test produces:

INFO - This is Biber 0.9.9
INFO - Logfile is 'test.blg'
INFO - Reading 'test.bcf'
INFO - Using all citekeys in bib section 0
INFO - Processing bib section 0
INFO - Looking for bibtex format file 'bibfile.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Finished Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'bibfile.bib'
INFO - Sorting list 'MAIN' keys
INFO - No sort tailoring available for locale 'en_US.UTF-8'
INFO - Sorting list 'SHORTHANDS' keys
INFO - No sort tailoring available for locale 'en_US.UTF-8'
INFO - Writing 'test.bbl' with encoding 'UTF-8'
INFO - Output to test.bbl

Rerunning pdflatex test.tex outputs (with pressing ENTER a couple times in between):

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation,         lo
aded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/latex/biblatex/biblatex.sty
(/usr/share/texmf/tex/latex/etoolbox/etoolbox.sty
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/latex/logreq/logreq.sty
(/usr/share/texmf/tex/latex/logreq/logreq.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty)
(/usr/share/texmf/tex/latex/biblatex/blx-compat.def)
(/usr/share/texmf/tex/latex/biblatex/biblatex.def)
(/usr/share/texmf/tex/latex/biblatex/bbx/numeric.bbx
(/usr/share/texmf/tex/latex/biblatex/bbx/standard.bbx))
(/usr/share/texmf/tex/latex/biblatex/cbx/numeric.cbx)
(/usr/share/texmf/tex/latex/biblatex/biblatex.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg))

Package hyperref Message: Driver (autodetected): hpdftex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texmf/tex/latex/biblatex/lbx/english.lbx) (./test.aux)     (./test.bbl)

Runaway argument?
{\href {en.wikipedia.org/wiki/Pr\field {note}{[Zugriff am 12. Mai 201\ETC.
! File ended while scanning use of \field.
<inserted text>
            \par
l.7 \begin{document}

?
! Undefined control sequence.
<argument> \blx@bbl@data

l.7 \begin{document}

?
! Missing number, treated as zero.
<to be read again>
               \xdef
l.7 \begin{document}

?
! Missing = inserted for \ifnum.
<to be read again>
               \xdef
l.7 \begin{document}

?
! Missing number, treated as zero.
<to be read again>
               \xdef
l.7 \begin{document}

?
! Undefined control sequence.
<argument> \blx@bbl@data

l.7 \begin{document}

?
! Undefined control sequence.
<argument> \blx@bbl@data

l.7 \begin{document}

?
! You can't use `\xdef' after \advance.
<argument> \xdef
             \csname\endcsname{\expandonce \csname\endcsname\csname c@1\...
l.7 \begin{document}

?
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty)
! Undefined control sequence.
<argument> \blx@bbl@data

l.133 \newcounter{section@level}

?
! Missing number, treated as zero.
<to be read again>
               \xdef
l.133 \newcounter{section@level}

?
! Missing = inserted for \ifnum.
<to be read again>
               \xdef
l.133 \newcounter{section@level}

?
! Missing number, treated as zero.
<to be read again>
               \xdef
l.133 \newcounter{section@level}

?
! Undefined control sequence.
<argument> \blx@bbl@data

l.133 \newcounter{section@level}

?
! Undefined control sequence.
<argument> \blx@bbl@data

l.133 \newcounter{section@level}

?
! You can't use `\xdef' after \advance.
<argument> \xdef
             \csname\endcsname{\expandonce \csname\endcsname\csname c@1\...
l.133 \newcounter{section@level}

?
) (./test.out) (./test.out)
! Undefined control sequence.
<argument> \blx@bbl@data

l.7 \begin{document}

?
! Missing number, treated as zero.
<to be read again>
               \xdef
l.7 \begin{document}

?
! Missing = inserted for \ifnum.
<to be read again>
               \xdef
l.7 \begin{document}

?
! Missing number, treated as zero.
<to be read again>
               \xdef
l.7 \begin{document}

?
! Undefined control sequence.
<argument> \blx@bbl@data

l.7 \begin{document}

?
! Missing number, treated as zero.
<to be read again>
               \xdef
l.7 \begin{document}

?
! Undefined control sequence.
<argument> \blx@bbl@data

l.7 \begin{document}

?
! You can't use `\xdef' after \advance.
<argument> \xdef
             \csname\endcsname{\expandonce \csname\endcsname\csname c@1\...
l.7 \begin{document}

?
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map
}] (./test.aux)

Package rerunfilecheck Warning: File `test.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.


LaTeX Warning: There were undefined references.


Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                test
(biblatex)                and rerun LaTeX afterwards.

 )
(\end occurred inside a group at level 2)

### semi simple group (level 2) entered at line 7 (\begingroup)
### semi simple group (level 1) entered at line 7 (\begingroup)
### bottom level </home/user/.texmf-        var/fonts/pk/ljfour/jknappen/ec/ecrm1000.60
0pk>
Output written on test.pdf (1 page, 6365 bytes).

No reference is produced.

My aim is to have an entry like:

@misc{wiki3,
author = {Wikipedia},
title = {Prélude à l’après-midi d’un faune},
howpublished = {\href{http://en.wikipedia.org/wiki/Pr%C3%A9lude_%C3%A0_l'apr%C3%A8s-midi_d'un_faune}{en.wikipedia.org/wiki/Prélude\_à\_l'après-midi\_d'un\_faune}},
note = "[Zugriff am 12. Mai 2013 um 19:35]"
}

in my bibfile.bib.

I would very very glad if someone could help me, as I have tried everything that came to my mind with no solution. Maybe my code works for you and my installation is broken?

EDIT 2: A bug was discovered and reported during looking in this problem: https://sourceforge.net/p/biblatex-biber/bugs/144/

share|improve this question
2  
Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. –  Mario S. E. May 31 '13 at 18:31
1  
...As a quick fix, use '\' before the percentage sign. –  Mario S. E. May 31 '13 at 18:32
1  
you have to write \ before every %. This is not the right approach (I'm also waiting for the answer), but does work. –  Mario S. E. May 31 '13 at 18:39
1  
Have you used \usepackage[T1]{fontenc} and \usepackage[utf8]{inputenc} ? –  Mario S. E. May 31 '13 at 18:48
1  
+1 so you should be able to modify your own question –  karlkoeller May 31 '13 at 20:01
show 14 more comments

1 Answer 1

up vote 5 down vote accepted

I think the problem is that you did not insert http:// inside \href in your .bib file, together with the fact that you have to insert \ before each %.

Try to modify it in this way, it seems to work for me:

@misc{wiki3,
author = {Wikipedia},
title = {Prélude à l’après-midi d’un faune},
howpublished = {\href{http://en.wikipedia.org/wiki/Pr\%C3\%A9lude_\%C3\%A0_l'apr\%C3\%A8s-midi_d'un_faune}{en.wikipedia.org/wiki/Prélude\_à\_l'après-midi\_d'un\_faune}},
note = "[Zugriff am 12. Mai 2013 um 19:35]"
}

ADDENDUM

This is just a suggestion.

When your bibliography item is an online resource, the online entry can be used instead of misc.

You can then substitute

@misc{wiki3,

with

@online{wiki3,

and

howpublished = {\href{http://en.wikipedia.org/wiki/Pr\%C3\%A9lude_\%C3\%A0_l'apr\%C3\%A8s-midi_d'un_faune}{en.wikipedia.org/wiki/Prélude\_à\_l'après-midi\_d'un\_faune}},

with

url = {http://en.wikipedia.org/wiki/Prélude_à_l'après-midi_d'un_faune},

Note that, in any case, the field url can be used inside any entry type, misc included.

share|improve this answer
    
It does not work for me :(. I left out http:// because I did not have the rights to post more than two urls, so I had to remove it. –  GEO May 31 '13 at 21:14
1  
I've also added \ before each %. Did you try it as I've written? –  karlkoeller May 31 '13 at 21:18
    
Maybe something is wrong with my texlive install? It would really help me if sb. could confirm the code compiles without errors for them. –  GEO May 31 '13 at 21:21
    
okay ... it seems to work ... I tried your answer again and it worked :) –  GEO May 31 '13 at 21:27
1  
@GEO -- the escaping of % and _ have nothing to do with UTF-8. –  jon May 31 '13 at 23:08
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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