TeX - LaTeX Asked by Kώστας Κούδας on October 10, 2020
I want to write something like this SomeCode^MoreCode
, so I wrote the code below.
documentclass{article}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{kerkis}
begin{document}
textlatin{texttt{SomeCode^{}MoreCode}}
textlatin{Some text ^{} more text}
end{document}
The problem is that I don’t get the symbol ^ when it is in texttt{}
. If I delete kerkis-font, everything is OK.
What can I do?
Thanks in advance!
You need T1 encoding to get a larger range of characters, but also I think you want the character ^
which you can get with textasciiicircum
or verb
not a circumflex accent over nothing:
documentclass{article}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{kerkis}
usepackage[T1]{fontenc}
begin{document}
textlatin{texttt{SomeCode^{}MoreCode}}
textlatin{Some text ^{} more text}
textlatin{texttt{SomeCodetextasciicircum{}MoreCode}}
textlatin{Some text textasciicircum{} more text}
begin{otherlanguage}{english} verb|SomeCode^MoreCode| end{otherlanguage}
end{document}
Correct answer by David Carlisle on October 10, 2020
For unknown reasons, the developers of the Kerkis fonts released them with a nonstandard version of the OT1 encoding.
Indeed, in kerkis.sty
we find
DeclareTextAccent{`}{OT1}{30}
DeclareTextAccent{'}{OT1}{180}
DeclareTextAccent{^}{OT1}{25}
and other similar declarations. They work for Kerkis, but break other fonts that conform to the OT1 standard, in particular the Courier font that kerkis.sty
declares as the monospaced font with
renewcommand{ttdefault}{pcr}
To the contrary, the T1 encoded Kerkis fonts follow the standard.
If you only use the serif and sans serif Kerkis fonts, OT1 is good; otherwise, always remember to do
usepackage[T1]{fontenc}
in your documents using Kerkis.
Answered by egreg on October 10, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP