Fonts & Character SetsCitation fails (foreign font?)

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
StefanT
Posts: 8
Joined: Wed Dec 17, 2014 12:10 am

Citation fails (foreign font?)

Post by StefanT »

Hello,

I am trying to use the following citation:

@BOOK{Bogoli︠u︡bov1965,
AUTHOR = {Bogoli︠u︡bov, Nikolaĭ Nikolaevich AND Mitropolʹskiĭ, I︠U︡riĭ Alekseevich},
...

and I get the warning:
Package natbib Warning: Citation 'Bogoli︠u︡bov1965' undefined.

The bib data is from http://www.literatur-generator.de.

I suppose that it is because of the foreign font, but I do not know how to use it right!?

Thanks a lot for your help,

Stefan

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

Citation fails (foreign font?)

Post by Johannes_B »

natbib can only work with classic bibtex, this is a 7-bit system. Hence you would have to describe all foreign charackters as their 7 bit replacement, for example \"u for the ü (U+00FC, latin small letter u with dieresis). Drawback is the lost kerning.

There is quite a simple solution. Using biblatex along with the bibliography processor biber. The combo can handle utf8 encoded files (like yours seems to be) natively. There is a compatibility mode for natbib as well. biblatex doesn't work with bst-files, all decisions about what and how stuff is written to the bibliography happens at the LaTeX layer. That means changing the appearance of the bibliography is quite easy, once you understand what's going on.

Did you do bibliographies before? The warning is an indication, that you have never run a bibliography processor, which is needed to extract the relevant information from the external file, sort it and give back the data to LaTeX in the bbl-file.

If you post a compilable but minimal example we could easily do some tests.

Please note, that encoding issues are always about a what, while the font defines how the what (ü) should look like.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
StefanT
Posts: 8
Joined: Wed Dec 17, 2014 12:10 am

Citation fails (foreign font?)

Post by StefanT »

Hi Johannes,

I recognized that BibTex will not work for my citation. Like you posted, I tried to work with BibLatex, but obviously did not implement it right. Here is a short example of my *.tex file:

Code: Select all

Code, edit and compile here:
\documentclass[review]{elsarticle}
\usepackage[backend=biber,
style=authoryear,
natbib=true,
hyperref=true,
]{biblatex}
\addbibresource{testbibfile}
\begin{document}
Das ist der Text mit dem Zitat \cite{Bogoli︠u︡bov1965}.
\section*{References}
\printbibliography
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
and this is my according testbibfile.bib file:

Code: Select all

@BOOK{Bogoli︠u︡bov1965,
AUTHOR = {Bogoli︠u︡bov, Nikolaĭ Nikolaevich AND Mitropolʹskiĭ, I︠U︡riĭ Alekseevich},
YEAR = {1965},
TITLE = {blabla},
EDITION = {},
ISBN = {},
PUBLISHER = {Akademie-Verlag},
ADDRESS = {Berlin},
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Additionally, I changed the path for the bibtex compiler in the "profile definition" of MikTeX to C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\biber.exe.

Compilation of the above leads to several errors.

Thanks a lot for your help,

Stefan
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Citation fails (foreign font?)

Post by Johannes_B »

elsarticle uses natbib internally to deal with bib-stuff.
Natbib relies on bibtex. After years (decades) of doing the stuff with bibtex, a publisher like elsevier hesitates to implement modern and new stuff (which is more likely to break).

That probably means you have to convert everything to plain ascii. Sorry.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
StefanT
Posts: 8
Joined: Wed Dec 17, 2014 12:10 am

Re: Citation fails (foreign font?)

Post by StefanT »

OK, so that is what I did. Since my article is in english, I changed the umlaut in the german titles and I also modified the capital letters of the german titles by adding \MakeUppercase{}. The output is ok, but in MikTex I get errors for every \MakeUppercase{}. It says: Undefined control sequence. Why is it complaining ?!

Thanks Stefan
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Citation fails (foreign font?)

Post by Johannes_B »

Sorry, i don't have psychic powers. Please prepare a inimal working example so i can see what's going on.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
StefanT
Posts: 8
Joined: Wed Dec 17, 2014 12:10 am

Citation fails (foreign font?)

Post by StefanT »

Sorry! Here is the main file:

Code: Select all

Code, edit and compile here:
\documentclass[review]{elsarticle}
\bibliographystyle{elsarticle-num}
\begin{document}
Hier wird zitiert \cite{Meier2013}.
\section*{References}
\bibliography{testbibfile}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
and this is the content of the testbibfile.bib:

Code: Select all

@PHDTHESIS{Meier2013,
AUTHOR = {Meier, Hans},
TITLE = {Experimentelle \MakeUppercase{M}odellbildung zum \MakeUppercase{T}est},
SCHOOL = {Rheinisch-Westfalisch Technische Hochschule Aachen},
YEAR = {2013},
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
After compilation the error is:

Code: Select all

Code, edit and compile here:
> H.~Meier, Experimentelle \makeuppercase
> .............................................................{M}odellbildung zum
> ! Undefined control sequence.
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The output is korrekt, despite the errors.
Thanks a lot :P
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Citation fails (foreign font?)

Post by Johannes_B »

LaTeX converts the string to lowercase so that the english words aren't printed uppercased, which you tried to solve via \MakeUppercase. But this is converted as well and LateX doesn't know that new command. The same happens fairly often when people are putting stuff in the header which is uppercased in the standard classes.

The solution here is quite simple, enclose the words you don't want to change in curly brackets:

Code: Select all

Code, edit and compile here:
\begin{filecontents}{\jobname.bib}
@PHDTHESIS{Meier2013,
AUTHOR = {Meier, Hans},
TITLE = {Experimentelle {Modellbildung} zum {Test}},
SCHOOL = {Rheinisch-Westf\"alisch Technische Hochschule Aachen},
YEAR = {2013},
}
\end{filecontents}
\documentclass[review]{elsarticle}
\bibliographystyle{elsarticle-num}
\begin{document}
Hier wird zitiert \cite{Meier2013}.
\section*{References}
\bibliography{\jobname}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
StefanT
Posts: 8
Joined: Wed Dec 17, 2014 12:10 am

Re: Citation fails (foreign font?)

Post by StefanT »

Now everything works like it is supposed to. Thanks a lot for helping me through the citations :D !
Post Reply