3

I would like to disable the italics for the titles in Greek from my .bib file, but not for the entire document. How should I do?

I believe that the best way is to use \emph{} with Greek characters when needed without using \textgreek{} [I need italics for Greek only a few times], and to disable italics options for \textgreek{}, but I don't know how to do the last operation in the preamble of the main document.

% !TeX encoding = UTF-8
% !TeX TS-program = xelatex
% !TeX spellcheck = it_IT
% !TeX root = Italics.tex
% !BIB TS-program = biber


\documentclass[a4paper,12pt]{article}

\usepackage[no-math]{fontspec} 
    \setmainfont[Ligatures=TeX,Numbers=OldStyle]{Linux Libertine O}

\usepackage{polyglossia} 
    \setmainlanguage[babelshorthands=true]{italian}
    \setotherlanguages{latin,greek,english,german,russian,serbian}
        \setkeys{greek}{variant=polytonic}


\usepackage[style=phys, sorting=none, defernumbers=true]{biblatex}

\addbibresource{bibliography.bib}
\begin{document}

\emph{ἄνθρωπος}

\printbibliography[keyword=regular,title={Bibliography}]
\nocite{*}


\end{document}

@book{Sathas.1872,
 editor = {Sathas, Konstantinos N.},
 year = {1872-1894},
 title = {\textgreek{Μεσαιωνικὴ Βιβλιοθήκη. Συλλογὴ ἀνεκδότων μνημείων τῆς Ἑλλενικῆς ἱστορίας}},
 volumes = {I-VII},
 address = {\textgreek{Παρίσι}},
 publisher = {\textgreek{Ἑταιρεία Μακεδονικῶν Σπουδῶν}}
}

1 Answer 1

2

If you want to change the title formatting only for a certain language, you need to set the languageid in the entry and check for it in the formatting command with \iffieldequalstr.

In SathasA the field languageid is set to greek while in SathasB the field is completely omitted:

\documentclass[a4paper,12pt]{article}

\begin{filecontents*}{\jobname.bib}
  @book{SathasA,
    editor = {Sathas, Konstantinos N.},
    date = {1872},
    title = {Μεσαιωνικὴ Βιβλιοθήκη. Συλλογὴ ἀνεκδότων μνημείων τῆς Ἑλλενικῆς ἱστορίας},
    volumes = {I-VII},
    address = {Παρίσι},
    publisher = {Ἑταιρεία Μακεδονικῶν Σπουδῶν},
    langid = {greek}
  }
  @book{SathasB,
    editor = {Sathas, Konstantinos N.},
    date = {1872},
    title = {Μεσαιωνικὴ Βιβλιοθήκη. Συλλογὴ ἀνεκδότων μνημείων τῆς Ἑλλενικῆς ἱστορίας},
    volumes = {I-VII},
    address = {Παρίσι},
    publisher = {Ἑταιρεία Μακεδονικῶν Σπουδῶν},
  }
\end{filecontents*}

\usepackage{fontspec} 
  \setmainfont[Ligatures=TeX,Numbers=OldStyle]{Linux Libertine O}

\usepackage{csquotes}

\usepackage{polyglossia} 
  \setmainlanguage{italian}
    \setotherlanguages{greek,english}
      \setkeys{greek}{variant=polytonic}

\usepackage[style=phys, sorting=none]{biblatex}
  \addbibresource{\jobname.bib}
  \DeclareFieldFormat{title}{% <-- change the format of the title field
    \iffieldequalstr{langid}{greek}{\normalfont{#1}}{\mkbibitalic{#1}}}
    % if langid = greek, then use \normalfont else use \mkbibitalic
  
\begin{document}

\emph{ἄνθρωπος} \autocite{SathasA}
\emph{ἄνθρωπος} \autocite{SathasB}
\printbibliography[title={Bibliography}]
\end{document}

enter image description here


If you want the whole citation in greek (translated strings, etc.), then add the biblatex option autolang=other:

enter image description here

4
  • In this way, are the titles in Latin characters still with italics or not? I would like to disable the italics for the Greek only.
    – Giacomo
    Nov 20, 2020 at 11:17
  • @Giacomo - Only greek entries are upright
    – DG'
    Nov 24, 2020 at 21:30
  • Thank you. Why the n.1 is upright and the n.2 is in italics?
    – Giacomo
    Nov 27, 2020 at 9:57
  • The first citation has the field languageid = {greek} which is responsible for the upright title. In the second case the languageid is not set, therefor it remains italicised
    – DG'
    Nov 27, 2020 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .