This works, but I'm almost sure this is not the way to do it.
\setmainfont
, \setsansfont
and \setmonofont
need to specify the font for English because \normalfontlatin
relies on the main document font being a Latin Script (Polyglossia manual, 6).
\newfontfamily\hebrewfont[Script=Hebrew]{Noto Sans Hebrew}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Noto Sans Hebrew}
\newfontfamily\hebrewfonttt[Script=Hebrew]{Noto Sans Hebrew}
\newfontfamily\englishfont[Ligatures=TeX]{Latin Modern Roman}
\setmainfont{Latin Modern Roman}
\setmonofont{Latin Modern Mono}
\setsansfont{Latin Modern Sans}
This may not matter so much if you are using a single font for English and Hebrew, of course.
You need to switch the language to English for the bibliography. This is pretty easy for the entries - just add language=english
to Biblatex's options.
\usepackage[backend=biber,bibstyle=numeric,language=english,autolang=langname]{biblatex}
But you need to also ensure this is done for the title of the chapter, if you want that in English.
\printbibliography[title={\textenglish{Bibliography}}]
I also switched the language of the surrounding document to English using
\begin{english}
...
\end{english}
However, I had greatest trouble with the numeric labels in the bibliography, which are being taken by default from the Hebrew font. On my machine, this means they are just boxes. To ensure a consistent font for the bibliography, I added
\renewcommand\bibfont{\normalfontlatin}
which is why it matters a lot that this behaves as expected, of course.
I've also added the standard TeX ligatures to the Latin font setup since the bibliography uses things like ``, which won't work otherwise.
The final problem was that \MakeUppercase
is then not defined when you switch the language to English. I assume this is a bug in something (Polyglossia?). Anyway, to work around this I created a new command to restore the default definition
\newcommand*\restoreuppercase{%
\DeclareRobustCommand{\MakeUppercase}[1]{{% from base/latex.ltx
\def\i{I}\def\j{J}%
\def\reserved@a####1####2{\let####1####2\reserved@a}%
\expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
\protected@edef\reserved@a{\uppercase{##1}}%
\reserved@a
}%
}%
\protected@edef\MakeUppercase##1{\MakeUppercase{##1}}%
}
and added \restoreuppercase
after starting the english
environment and before executing \printbibliography
.
The result:
Complete code:
\begin{filecontents*}{\jobname.bib}
@inproceedings{domingos2000mining,
title={Mining high-speed data streams},
author={Domingos, Pedro and Hulten, Geoff},
booktitle={Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining},
pages={71--80},
year={2000},
organization={ACM}
}
@article{garcia2010pattern,
title={Pattern classification with missing data: a review},
author={Garc{\'\i}a-Laencina, Pedro J and Sancho-G{\'o}mez, Jos{\'e}-Luis and Figueiras-Vidal, An{\'\i}bal R},
journal={Neural Computing and Applications},
volume={19},
number={2},
pages={263--282},
year={2010},
publisher={Springer}
}
\end{filecontents*}
\documentclass{report}
% % Add XeTeX Packages support for hebrew
\usepackage{polyglossia}% will load fontspec and bidi automatically
% % Set BibTeX
\usepackage[backend=biber,bibstyle=numeric,language=english,autolang=langname]{biblatex}
\addbibresource{\jobname.bib}
% % Font Support
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\newfontfamily\hebrewfont[Script=Hebrew]{Noto Sans Hebrew}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Noto Sans Hebrew}
\newfontfamily\hebrewfonttt[Script=Hebrew]{Noto Sans Hebrew}
\newfontfamily\englishfont[Ligatures=TeX]{Latin Modern Roman}
\setmainfont{Latin Modern Roman}
\setmonofont{Latin Modern Mono}
\setsansfont{Latin Modern Sans}
\renewcommand\bibfont{\normalfontlatin}
\makeatletter
\newcommand*\restoreuppercase{%
\DeclareRobustCommand{\MakeUppercase}[1]{{% from base/latex.ltx
\def\i{I}\def\j{J}%
\def\reserved@a####1####2{\let####1####2\reserved@a}%
\expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
\protected@edef\reserved@a{\uppercase{##1}}%
\reserved@a
}%
}%
\protected@edef\MakeUppercase##1{\MakeUppercase{##1}}%
}
\makeatother
\title{מסמך בדיקה}
\author{יוצר בדיקה}
\begin{document}
\maketitle
\tableofcontents
% Some Text
\chapter{בדיקה ראשונה}
שלום עולם, מה שלום כולם ?
\nocite{*}
% References' List
\begin{english}
\restoreuppercase
\printbibliography[title={\textenglish{Bibliography}}]
\end{english}
\end{document}
I used Biber, but this may well work with BibTeX as the back-end, if you really don't want to use Biber.
The entry type @article
is only for papers that were actually published in a journal. @article
s must always have a journal
(and volume
) field. That means that if an entry was not published in a journal and consequently has no journal
field, it cannot be an @article
.
arXiv preprints that are not yet published in a journal are normally classified as @online
entries. Compare the entries baez/online
, itzhaki
and wassenberg
in biblatex-examples.bib
. You could go with
@online{wegman,
author = {Wegman, D.},
title = {Deviations of Exact Neutrino Textures Using Radiative Neutrino Masses},
date = {2017-11-21},
version = 1,
eprinttype = {arxiv},
eprint = {1711.08004},
eprintclass = {hep-ph},
}
There is no reason to believe that not choosing @article
and using @online
instead somehow demotes the source to a second-class citation. Choosing entry types is not about "rating" the source, it is about picking the correct framework to fit in the publication data.
There might be a general sentiment that online sources are generally less reliable or less citable (is that even a word?), but the entry type in a .bib
should not be seen as an indicator to assess this. If you absolutely can't live with @online
go for @misc
instead.
I will admit that the advent of online publishing may have blurred the lines between periodicals/journals and pre-print servers. And it might be hard to come up with a good definition of what a journals is now. Nevertheless I think that the arXiv is not a journal.
Best Answer
Since
year
/date
is a mandatory field for@article
,biblatex
expects there to be at least a year and does not do any further sanity checking to avoid empty brackets. We can add that withNote though that even papers on the arXiv normally have a year (at least I have yet to happen upon a paper without a date). You should also note that an arXiv paper that has not been published in a journal (if it was published, surely it will have a date) should not be treated as an
@article
, it should rather be an@online
entry.