0

I think the problem is with the \usepackage{ucharclasses}. I may not have set it up correctly. I'm using said package because I need TeX to recognize Greek, Hebrew and English and change the font automatically.

Simplified MWE

\documentclass[12pt]{article}

\usepackage{fontspec}

\setmainfont{LibertinusSerif-Italic.otf} \newfontfamily\greekfont{LibertinusSans-Bold.otf}[ Script=Greek, Scale=MatchUppercase, Ligatures=TeX ] \newfontfamily\hebrewfont{LibertinusSans-Bold.otf}[ Script=Hebrew, Contextuals=Alternate, Ligatures=Required ] \usepackage{ucharclasses} \setDefaultTransitions{\greekfont}{\rmfamily} \setDefaultTransitions{\rmfamily}{\greekfont}

\begin{document} Adrados, Francisco R. and Rodríguez Somolinos, Juan

Diccionario Griego-Español \end{document}

"Adrados, Francisco R. and Rodrí{guez} Somolinos, Juan Diccionario Griego-Españ{ol}" the parts highlighted in "{...}" have a different font

More complex example

\documentclass[letterpaper,openany,12pt,oneside]{book}
\usepackage[letterpaper,left=1.25in,right=1.25in,top=1in,bottom=1in,headheight=12pt,headsep=12pt,ignorehead,ignorefoot]{geometry}
\usepackage[series={A,B},nocritical,noend,noeledsec,nofamiliar,noledgroup]{reledmac}
\linenumsep=-30pt plus 50pt minus 50pt
\ledlsnotesep=-100pt
\ledrsnotesep=-30pt

\usepackage{fontspec} \usepackage{polyglossia}

\setmainlanguage[variant=us]{english} \setotherlanguage{hebrew} \setotherlanguage[variant=ancient]{greek} \SetLanguageKeys{english}{indentfirst=true}

\setmainfont{Times New Roman} \newfontfamily\greekfont{SBL BibLit}[ Script=Greek, Scale=MatchUppercase, Ligatures=TeX ] \newfontfamily\hebrewfont{SBL BibLit}[ Script=Hebrew, Contextuals=Alternate, Ligatures=Required ] \usepackage{ucharclasses} \setDefaultTransitions{\greekfont}{\rmfamily} \setDefaultTransitions{\rmfamily}{\greekfont}

\usepackage[style=sbl,maxcitenames=3,maxbibnames=100,minnames=1,backend=biber,citepages=omit,fullbibrefs=true,sblfootnotes=false,citereset=chapter,doi=false,url=false,accessdate]{biblatex}

\begin{filecontents}{web.bib}

@mvlexicon{DGE, title={Diccionario Griego-Español}, editor={Adrados, Francisco R. and Rodríguez Somolinos, Juan}, publisher={Consejo Superior de Investigaciones Científicas}, shorttitle = {DGE}, shorthand = {DGE}, volumes={7}, address={Madrid} } \end{filecontents}

\addbibresource{web.bib}

\begin{document} Text.\autocite{DGE}

\printbibliography[title=\normalfont BIBLIOGRAPHY]

\end{document}

In the Bibliography the title should be in italics. It does this, except for the last two letters. So, it will output Diccionario Griego-Español. As you can see the o and the l should also be in italics.

moewe
  • 175,683
Rob28
  • 378
  • 1
    Two questions: Is your input file coded as utf8? Are there any associated warnings or errors in your log file? – barbara beeton Nov 27 '22 at 03:33
  • 1
    This shouldn't happen and does not happen if I whip up a small example document. You need to show us a fully compilable example document that reproduces the issue with as little excess code as possible. (Your font setting would be relevant as well.) – moewe Nov 27 '22 at 10:26
  • 2
    I do not think you could get the output you describe without an error message. If asking about any error it's best to show the complete message from the log, not describe any pdf output, which is not intended to be useful. – David Carlisle Nov 27 '22 at 10:48
  • 1
    Any news here? Can you come up with an example document that reproduces the issue? If not, it is next to impossible to help you, so the question will probably be closed. – moewe Dec 01 '22 at 19:48
  • @moewe I have edited the question and provided an MWE. – Rob28 Dec 02 '22 at 01:09
  • 1
    Yes, this appears to be a ucharclasses problem that has nothing to do with the bibliography and biblatex as such. I have added a smaller example document that reproduces the issue without the bibliography. – moewe Dec 02 '22 at 06:31
  • Thank you for that. – Rob28 Dec 02 '22 at 14:24

1 Answers1

0

I'll take the simplified MWE. With \setDefaultTransitions you insert those tokens any time you leave a block and enter another one. The second declaration overrides the first.

What happens is that í belongs to a different code block than g, respectively Latin-1 Supplement and Basic Latin. Then the space causes the transition to \rmfamily.

What you need is to set transitions for the block sets you need, namely Latin, Greek and Hebrew.

\documentclass[12pt]{article}

\usepackage{fontspec} \usepackage{ucharclasses}

\setmainfont{LibertinusSerif-Italic.otf} \newfontfamily\greekfont{LibertinusSans-Bold.otf}[ Script=Greek, Scale=MatchUppercase, Ligatures=TeX ] \newfontfamily\hebrewfont{Arial Hebrew}[ Script=Hebrew, % Contextuals=Alternate, % Ligatures=Required ]

\setTransitionsForLatin{\rmfamily}{} \setTransitionsForGreek{\greekfont}{\rmfamily} \setTransitionTo{Hebrew}{\hebrewfont}

\begin{document}

Adrados, Francisco R. and Rodríguez Somolinos, Juan

Diccionario Griego-Español Ελληνική מְדִינַת יִשְׂרָאֵל text

Diccionario Griego-Español Ελληνική text מְדִינַת יִשְׂרָאֵל text

\end{document}

I set up a distinctive Hebrew font just to be sure of the result.

enter image description here

egreg
  • 1,121,712