0

In previous questions (see Special character \oe and BiblateX with XeLateX andProblem of compilation with XelateX (Package soul error), I presented my problem related to the taking into account of the special character \oe by BibLateX in a Tufte-book documentclass. Actually, I just found the root of the problem, but don't know how to fix it: the problem is solved when I delete the \usepackage[T1]{fontenc}, which conflics with \usepackage[utf8,french,latin9]{inputenc}.Unfortunately, I need to keep the inputenc package for formatting special characters for other functions (TikZ for example). How to modify the code so that BibLateX alone uses \usepackage[T1]{fontenc}?

This is my code:

\documentclass[nobib,twoside,symmetric,justified,marginals=raggedouter]{tufte-book}

\usepackage{fontspec} \usepackage{fbb}

\usepackage[utf8,french,latin9]{inputenc}% Required for including letters with accents \usepackage[T1]{fontenc}% Use 8-bit encoding that has 256 glyphs \usepackage[french]{babel}%.................. Language setup \addto\captionsfrench{\def\tablename{Tableau}} \addto\captionsfrench{\def\figurename{Figure}}

\usepackage{csquotes} \usepackage[backend=biber, style=authoryear-icomp]{biblatex} \makeatletter \newbibmacro{adtcite}{% \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldequals{namehash}{\cbx@lasthash} {\setunit{\compcitedelim}} {\printnames{labelname}% \setunit{\printdelim{nameyeardelim}}% \printlabeldateextra \setunit{\printdelim{nametitledelim}}% \savefield{namehash}{\cbx@lasthash}}% \usebibmacro{cite:title}}}% {\usebibmacro{cite:shorthand}% \usebibmacro{cite:reinit}}% \setunit{\multicitedelim}} \makeatother \newbibmacro{cite:title}{% \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}} \DeclareCiteCommand{\fadtcite}[\mkbibfootnote] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{adtcite}} {} {\usebibmacro{cite:postnote}} \DeclareMultiCiteCommand{\fadtcites}[\mkbibfootnote]{\fadtcite}{\setunit{\multicitedelim}} \DeclareAutoCiteCommand{fadt}{\fadtcite}{\fadtcites} \ExecuteBibliographyOptions{autocite=fadt} \usepackage{mdframed} \newmdenv[skipabove=3.5ex plus 1ex minus .2ex,% Equal to section title spacing innerleftmargin=0pt,innerrightmargin=0pt,% innerbottommargin=0pt,innertopmargin=0pt,linewidth=0pt,innermargin=0pt,% outermargin=\dimexpr-\marginparwidth-\marginparsep\relax]{mdfullwidth} \defbibenvironment{bibliography} {\list{}{\parsep\bibparsep}} {\endlist} {\item} \AtEveryBibitem{\hskip-\bibhang} \begin{filecontents}{\jobname.bib} @BOOK{Buchet, author = {Buchet, Edmond}, title = {Jean-S'{e}bastien Bach. L'\oe uvre et la vie. Deux si`{e}cles d''{e}tudes et de t'{e}moignages}, year = {1963}, publisher = {'{E}ditions Les Libraires Associ'{e}s}, place = {Saverne}, pagetotal = {267}, } \end{filecontents} \addbibresource{\jobname.bib} \PassOptionsToPackage{hyphens}{url}

\begin{document} \frenchspacing \newthought{How to fix} the problem with "\oe uvre"\autocite[42]{Buchet}?

\begin{fullwidth} \bibhang=0pt \printbibliography \end{fullwidth} \end{document}

Phil8544
  • 407

1 Answers1

1

The problem is solved with the following modifications:

\documentclass[nobib,twoside,symmetric,justified,marginals=raggedouter]{tufte-book}

\usepackage{fontspec} %\usepackage{fbb} <= DELETED

%\usepackage[utf8,french,latin9]{inputenc}% <= DELETED %\usepackage[T1]{fontenc}% <= DELETED \usepackage[french]{babel}%.................. Language setup \addto\captionsfrench{\def\tablename{Tableau}} \addto\captionsfrench{\def\figurename{Figure}}

\usepackage{csquotes} \usepackage[backend=biber, style=authoryear-icomp]{biblatex} \makeatletter \newbibmacro{adtcite}{% \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldequals{namehash}{\cbx@lasthash} {\setunit{\compcitedelim}} {\printnames{labelname}% \setunit{\printdelim{nameyeardelim}}% \printlabeldateextra \setunit{\printdelim{nametitledelim}}% \savefield{namehash}{\cbx@lasthash}}% \usebibmacro{cite:title}}}% {\usebibmacro{cite:shorthand}% \usebibmacro{cite:reinit}}% \setunit{\multicitedelim}} \makeatother \newbibmacro{cite:title}{% \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}} \DeclareCiteCommand{\fadtcite}[\mkbibfootnote] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{adtcite}} {} {\usebibmacro{cite:postnote}} \DeclareMultiCiteCommand{\fadtcites}[\mkbibfootnote]{\fadtcite} {\setunit{\multicitedelim}} \DeclareAutoCiteCommand{fadt}{\fadtcite}{\fadtcites} \ExecuteBibliographyOptions{autocite=fadt} \usepackage{mdframed} \newmdenv[skipabove=3.5ex plus 1ex minus .2ex,% Equal to section title spacing innerleftmargin=0pt,innerrightmargin=0pt,% innerbottommargin=0pt,innertopmargin=0pt,linewidth=0pt,innermargin=0pt,% outermargin=\dimexpr-\marginparwidth-\marginparsep\relax]{mdfullwidth} \defbibenvironment{bibliography} {\list{}{\parsep\bibparsep}} {\endlist} {\item} \AtEveryBibitem{\hskip-\bibhang} \begin{filecontents}{\jobname.bib} @BOOK{Buchet, author = {Buchet, Edmond}, title = {Jean-Sébastien Bach. L'\oe uvre et la vie. Deux siècles d'études et de témoignages}, year = {1963}, publisher = {'{E}ditions Les Libraires Associés}, place = {Saverne}, pagetotal = {267}, } \end{filecontents} \addbibresource{\jobname.bib} \PassOptionsToPackage{hyphens}{url}

\begin{document} \frenchspacing \newthought{How to fix} the problem with "\oe uvre"\autocite[42]{Buchet}?

\begin{fullwidth} \bibhang=0pt \printbibliography \end{fullwidth} \end{document}

Phil8544
  • 407
  • If you wanted to keep the fbb font, you could have replaced \usepackage{fbb} with \setmainfont{fbb} (as indeed you did in https://tex.stackexchange.com/q/548738/35864). In any case inputenc and fontenc should definitely not be used with XeLaTeX (https://tex.stackexchange.com/q/2984/35864, https://tex.stackexchange.com/q/470976/35864) and \usepackage{fbb} is also not compatible with XeTeX/LuaTeX because it loads fontenc with the T1 option. – moewe Jul 22 '20 at 15:04
  • That all said, if you use XeLaTeX it is much nicer to give the Unicode characters directly instead of their ASCII-macro version. I.e. Jean-Sébastien Bach instead of Jean-S\'{e}bastien Bach and siècles instead of si\{e}cles`. – moewe Jul 22 '20 at 15:05