I am setting a book using KOMA-Script and EB Garamond font. Mostly it works well, but there are certain fairly standard glyphs that just produce errors. E.g., neither \copyright not \textcopyright produce a copyright symbol, and \textonehalf and \textonequarter don't produce the corresponding numbers. Yet according to the font tables I have seen, EB Garamond includes these glyphs. I am using TeXLive in an openSuSe 13.2 installation. Am I doing something wrong, or do I need a different version of the font?
Asked
Active
Viewed 624 times
1
1 Answers
3
(too long for a comment, hence posted as an answer)
Do check if there's something missing or installed incorrectly in your TeX distribution. With a properly installed, up-to-date TeX distribution, the following code should compile equally well under pdfLaTeX, XeLaTeX, and LuaLaTeX.
\documentclass{scrbook}
\usepackage{ifluatex,ifxetex} % load EB Garamond font
\ifluatex
\usepackage{fontspec}\setmainfont{EB Garamond}
\else
\ifxetex
\usepackage{fontspec}\setmainfont{EB Garamond}
\else
\usepackage{ebgaramond}
\fi
\fi
\begin{document}
\copyright, \textcopyright, \textonehalf, \textonequarter
\end{document}
Mico
- 506,678
-
Looking at the code of
ebgaramond.styI'd say that\usepackage{ebgaramond}is enough for all engines: the package properly checks for Xe/LuaTeX and loadsfontspec, and sets up the font with more details than just\setmainfont{EB Garamond}. But +1 anyway:-)– campa Jul 13 '18 at 11:28 -
1@campa - Thanks. I can't quite remember what I was thinking when I wrote this answer almost 2-1/2 years ago. I think that I was quite concerned that the OP possibly had a faulty TeX installation and hence that the tests for which engine is in use should be handled explicitly rather than via the package's built-in capabilities. Also, I seem to remember that the
ebgaramondpackage didn't acquire the ability to check which engine is in use until sometime in late 2014. Given that I wrote this answer in early 2016, I didn't want to have to assume that the OP's TeX distribution was up to date. – Mico Jul 13 '18 at 12:14 -
Are the commands like
\textonehalflisted somewhere? On the ctan page of the package a pdf of font samples is available and another pdf (http://mirrors.ctan.org/fonts/ebgaramond/doc/EBGaramond-Regular-Glyphs.pdf) with all the glyphs is available. But how can one access those glyphs via commands like\textonehalf? – Damitr Apr 12 '23 at 06:04 -
@Damitr - I'm afraid I'm not enough of a font specialist to answer your question in adequate depth. May I suggest you post a new query, in which you'd ask your question for many more people to see (and hopefull come up with answers). Thanks. – Mico Apr 12 '23 at 07:04
-
1

\documentclass{scrartcl}and\usepackage{ebgaramond}on a Mac. – dedded Feb 13 '16 at 22:15memoirclass andscrrprtas well asscratcl– HATEthePLOT Feb 13 '16 at 22:24