BibTeX, biblatex and biberChapterbib messing hyperref links

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
ConstantMTL
Posts: 2
Joined: Fri Nov 14, 2014 9:01 pm

Chapterbib messing hyperref links

Post by ConstantMTL »

Hi all!

I am currently writing my thesis using my university's template. Since I have to write several chapters in different languages, I am using the chapterbib package to be able to have different \bibliographystyle per chapter. Though, I only have one bibliography at the end of the document (\nobibliogrphy for all my chapters).

However the links in the pdf don't work when you click on a citation. It jumps back to the top of the document instead of jumping to the appropriate line in the final bibliography. Note that this problem is solved when the chapterbib package is removed.

I've spent a lot of time online looking for answers, made sure that Hyperref is the last package to be called, etc... It still doesn't work!

Here's my main:

Code: Select all

\documentclass[letterpaper,12pt,oneside,final]{book}

\usepackage[utf8]{inputenc}
\usepackage[cyr]{aeguill}
\usepackage[english,frenchb]{babel}

\usepackage{natbib}
\usepackage[nolist]{acronym}
\usepackage{MemoireThese}	
\usepackage{chapterbib}						
\usepackage{subfigure}
\usepackage{bibentry}
\usepackage{hyperref}

\begin{document}

\bibliographystyle{polymtl}
\include{Theme1}
\bibliography{Bibliographie}

\end{document}
And theme1 is just:

Code: Select all

\Chapter{ARTICLE 1}\label{sec:art1}
\begin{otherlanguage}{english}
\citep{price_1984}.
\bibliographystyle{polymtlbis}
\nobibliography{Bibliographie}
\end{otherlanguage}
I have enclosed a simple test case that still generates the link issue.
Has anyone had the same problem or can help me?

Thanks a lot
Attachments
MWE.zip
(15.03 KiB) Downloaded 441 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Chapterbib messing hyperref links

Post by Johannes_B »

It took me a while to figure out what you are trying to
achieve.
First of all, hyperref tries to link the cites to the
bibliography, which is prevented from being typeset. So the links
get lost. But why do you want different bibliography styles i was
wondering? The output of cites looks similar, a diff on the bst
files reveals that there are localized strings (master thesis vs.
mémoire de maîrise). An entry will be typeset in the bibliography
by the style currently in use. This can vary from chapter to
chapter if the chapterbib is typeset. If you omit typesetting and
let everything being typeset at the very end, you won't gain
anything. Nothing at all.

Why did it took so long for me to figure that out? The whole
system of BibTeX is getting old. You need a crutch for this and a
wheel chair for that. The modern package biblatex
(combining the features of natbib, chapterbib, bibentry ...) is
much more flexible and along with the new bibliography processor
biber (the new alternative to bibtex, the program) you can do
pretty fancy stuff.

But with biblatex as well, there will be no switch between and et
et with every new item. Also, who would winn if an entry was
cited in an english and a french chapter?

Code: Select all

\documentclass[letterpaper,12pt,oneside,final]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,frenchb]{babel}
\usepackage{MemoireThese}	
\usepackage[natbib,style=authoryear,hyperref]{biblatex}
\addbibresource{Bibliographie.bib}
\usepackage{blindtext}
\usepackage{hyperref}
\begin{document}
\Chapter{ARTICLE 1}\label{sec:art1}
\begin{otherlanguage}{english}
\citep{master}.
\printbibliography
\end{otherlanguage}
\printbibliography
\end{document}

Code: Select all

@article{price_1984,
	author    = "S. J. Price and M. P. Pa{\"{i}}doussis",
	title     = "An improved mathematical model for the stability of cylinder rows subject to cross-flow",
	journal   = "Journal of {S}ound and {V}ibrations",
	volume   = "97",
	number   = "4",
	pages    = "615-640",
	year      = "1984"
}

@mastersthesis{master,
author = "Thor, A. U.",
title  = "Titles of master thesis can be quite nice, or not",
school = "LaTeX",
year   = "2014",
}

Code: Select all

\begin{filecontents}{includedChapter.tex}
\Chapter{ARTICLE 1}\label{sec:art1}
\begin{otherlanguage}{english}
\citep{master}.
\bibliographystyle{polymtlbis}
%\nobibliography{Bibliographie}
\bibliography{Bibliographie}
\end{otherlanguage}
\end{filecontents}
\documentclass[letterpaper,12pt,oneside,final]{book}

\usepackage[utf8]{inputenc}
\usepackage[cyr]{aeguill}
\usepackage[english,frenchb]{babel}

\usepackage{natbib}
\usepackage[nolist]{acronym}
\usepackage{MemoireThese}	
\usepackage{chapterbib}						
%\usepackage{subfigure}%deprecated, subcaption!
\usepackage{bibentry}
\usepackage{blindtext}
\usepackage{hyperref}

\begin{document}
\bibliographystyle{polymtl}
\include{includedChapter}
\bibliography{Bibliographie}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ConstantMTL
Posts: 2
Joined: Fri Nov 14, 2014 9:01 pm

Chapterbib messing hyperref links

Post by ConstantMTL »

Hey, thanks for your answer. I want several bibliography styles because of the citations with two authors only. Indeed, I don't want two have something like " We acknowledge the work by Price et Paidoussis (1984)...". What I want is " We acknowledge the work by Price and Paidoussis (1984)...". Hence, the second bibliography style.

However, at the end of the document, I only want one general list of references with the French style ("et" instead of "and").
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Chapterbib messing hyperref links

Post by Johannes_B »

This can be easily done with biblatex and biber.
It is impossible to do that with natbib and get the links (as described in you initial question).

Biblatex is the new standard, it was developed to overcome all those limitations of the old system.

Code: Select all

\begin{filecontents}{\jobname.bib}
@article{price_1984,
        author    = "S. J. Price and M. P. Pa{\"{i}}doussis",
        title     = "An improved mathematical model for the stability of cylinder rows subject to cross-flow",
        journal   = "Journal of {S}ound and {V}ibrations",
        volume   = "97",
        number   = "4",
        pages    = "615-640",
        year      = "1984"
}

@mastersthesis{master,
author = "Thor, A. U.",
title  = "Titles of master thesis can be quite nice, or not",
school = "LaTeX",
year   = "2014",
}
\end{filecontents}
\documentclass[letterpaper,12pt,oneside,final]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,frenchb]{babel}
%\usepackage{MemoireThese}       
\usepackage[natbib,style=authoryear,hyperref]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{blindtext}
\usepackage{hyperref}
\begin{document}
\chapter{ARTICLE 1}\label{sec:art1}
\begin{otherlanguage}{english}
Language in use is: \languagename\par
\citep{master}.
\citep{price_1984}.
\end{otherlanguage}

Language in use is: \languagename\par
\citep{price_1984}.
\printbibliography
\end{document}
Hint: click on »Open in Writelatex« to see the output.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
qwertysef

Chapterbib messing hyperref links

Post by qwertysef »

may I ask why the first post in that thread has doubled up?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Chapterbib messing hyperref links

Post by Stefan Kottwitz »

It has not doubled up. Perhaps post a screenshot. Otherwise it looks similar to what some spammers do: post meaningless stuff for creating a bit activity and then posting spam. We watch and remove advertisements and spam here.

Stefan
LaTeX.org admin
Post Reply