I have the following code in Latex:

\documentclass[a4paper,12pt,two side]{book}

\usepackage{thmtools, thm-restate}
\usepackage[LGR, T1]{fontenc}



I have also a refference.bib file to write my references. Everything with @article and @book citations work fine. The problem is with @online types of references and especially with url..... For example when I write:

    author        = {\textlatin{Pandano}},
    title         = {\textlatin{Knuth: Computers and Typesetting}},
    year          = {1984},
    url           = {\textlatin{http://www-cs-faculty.stanford.edu/~uno/abcde.html}}

I get as url ugly things in Greek.

enter image description here

How can I fix it, please??


1 Answer 1


If using either LuaLaTeX or XeLaTeX to compile your document is an option for you, the formatting issue you've encountered can be fixed easily by employing the fontspec package along with a suitable font family, i.e., one that features the required Greek glyphs. No need for \textlatin wrappers.

enter image description here

Aside: When switching from using pdfLaTeX to using either XeLaTeX or LuaLaTeX to compile your document, be sure to not load the inputenc and fontenc packages any longer. Instead, you should load either the fontspec or the unicode-math package. The latter will be useful if you need to specify a non-default math font. (The default math font is (still) Computer Modern Math Italics.)

% !TEX TS-program = xelatex
    author        = {Pandano},
    title         = {Knuth: Computers and Typesetting},
    year          = {1984},
    url           = {http://www-cs-faculty.stanford.edu/~uno/abcde.html}

\usepackage{ebgaramond} % or some other suitable font 



  • Thanks, Actually I write in overleaf, I hope this also works for me.
    – dmtri
    Jan 22, 2022 at 8:53
  • 2
    @dmtri - You're welcome. Overleaf lets you switch to XeLaTeX/LuaLaTeX quite easily: Click on the "Menu" button in the upper left corner; about halfway down the column, you'll see choices for "Compiler". Open the drop-down list and select either XeLaTeX or LuaLaTeX. While you're at it, you can (should?) also change the version of the TeXLive distribution you work with to the latest year (currently 2021).
    – Mico
    Jan 22, 2022 at 9:02

You must log in to answer this question.

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