TransWikia.com

Typesetting varepsilon (ε) in normal text

TeX - LaTeX Asked on January 4, 2021

I have a pretty arcane problem, I know, but here we are:
I reference and cite a project called Exodus – companies own spelling: εxodus, i.e.:

logo

ε [GREEK SMALL LETTER EPSILON (varepsilon)] + "odus"

% !TeX program = lualatex
% !BIB TS-program = biber
% !TeX encoding = UTF-8
% !TeX spellcheck = de_DE
documentclass[
    fontsize=12pt,
    oneside,
    a4paper,
    titlepage,
    numbers=noenddot,
%   draft,
]{scrbook}
usepackage[ngerman]{babel}
usepackage{lmodern} % font <--- may be important
usepackage{csquotes}

usepackage[style=numeric,
sortcites=true,
sorting=none,
defernumbers=true,
backref=true,
backend=biber]{biblatex}

begin{filecontents}{mybib2.bib}
@online{exodusHomepage,
    title = {$varepsilon$xodus},
    subtitle = {{varepsilon The privacy audit platform for Android applications}},
    titleaddon = {Startseite},
%   date = {2020-08-29},
    urldate = {2020-08-29},
    language = {english},
    url = {https://reports.exodus-privacy.eu.org/en}
}
@online{exodusHomepageLunar,
    title = {$epsilon$xodus},
    subtitle = {{epsilon The privacy audit platform for Android applications}},
    titleaddon = {Startseite},
%   date = {2020-08-29},
    urldate = {2020-08-29},
    language = {english},
    url = {https://reports.exodus-privacy.eu.org/en}
}
end{filecontents} 

addbibresource{mybib2.bib}

begin{document}
noindent
Exodus/exodus:
% all commented lines cannot compile or so
% companies own spelling: εxoduscite{exodusHomepage}
% companies own spelling: {epsilon}xoduscite{exodusHomepageLunar}
% companies own spelling: {varepsilon}xoduscite{exodusHomepage}
companies own spelling: $epsilon$xoduscite{exodusHomepageLunar} (wrong lunar letter actually)
companies own spelling: $varepsilon$xoduscite{exodusHomepage}

printbibliography
end{document}

In the text, it looks I’d say okay:
enter image description here

(Though the GREEK LUNATE EPSILON SYMBOL (varepsilon) looks way better IMHO, but well… it’s factually/semantically wrong, so I cannot use that.)

But in the bibliography it looks really off though:

Can we typeset/improve that properly?

2 Answers

Your font might have the Latin small letter epsilon, ɛ (U+025B).

In LuaLaTeX or XeLaTeX, you might write something like

newcommandexodus{{textepsilon}xodus}
newcommandtextepsilon{^^^^025b}

Or, if you need to load the symbol from another font,

newcommandtextepsilon{{greekfont ^^^^025b}}

You could also use the Greek ε codepoint.

You won’t see anything unless your current font contains the glyph. The default, Latin Modern Roman, doesn’t have any Greek letters.

You should also add the command tracinglostchars=2. This will tell you what the problem is. Without it, TeX will silently log a warning in the log file.

In legacy 8-bit encodings, you might load the text-mode symbol from textgreek or tipa.

MWE

This version works in LuaLaTeX or XeLaTeX.

documentclass{article}
tracinglostchars=2
usepackage{fontspec}

setmainfont[Scale=1.0]{CMU Sans Serif}

newcommandexodus{{textepsilon}xodus}
newcommandtextepsilon{^^^^025b}

begin{document}
exodus
end{document}

CMU Sans Serif sample

And here is a PDFTeX-compatible version

documentclass{article}
tracinglostchars=2
usepackage[LGR,T1]{fontenc}

newcommandexodus{{fontencoding{LGR}selectfonttextepsilon}xodus}

renewcommand{familydefault}{sfdefault}

begin{document}
exodus
end{document}

Computer Modern Sans-Serif sample

ETA: Changing the Font

As requested, here is a version that does not change the main font.

documentclass{article}
tracinglostchars=2
usepackage{fontspec}

newfontfamilylogofont{CMU Sans Serif}[Scale=MatchLowercase, Ligatures={Common,TeX}]

newcommandexodus{{logofont{textepsilon}xodus}}
newcommandtextepsilon{^^^^025b}

begin{document}
A company named exodus
end{document}

dejaVu Sans sample

The legacy version using 8-bit fonts is similar, except that logofont would be defined as something like fontfamily{DejaVuSans-TLF}selectfont.

Answered by Davislor on January 4, 2021

Try the textGreek package:

documentclass{article}
usepackage[utf8]{inputenc}
usepackage{textgreek}

begin{document}
textepsilon
end{document}

enter image description here

Answered by Cael Warner on January 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP