[Tex/LaTex] Command \k unavailable in encoding OT1 (error takes me to line which doesn’t even have “\k” in it

font-encodingsinput-encodings

I am in an incredibly frustrating situation – after weeks and weeks of editing my dissertation in Latex, the inevitable error that just doesn't seem to make any sense has surfaced. I get the error "Command \k unavailable in encoding OT1," whatever this means and it tells me the error is on line 538. I commented out that entire section where I call in the figure (lines 537-543) and compile again only to get the exact same error, for the same line. I have not touched anything near line 538 in a while, since I've been editing things later in my disseration. I've also tried commenting out half of the document, including the newest portion that I've written, and I get the same error on line 538. This error seems to have actually appeared from nowhere. Has anybody ever gotten this or know how to resolve it? Your help will be a life-saver. Thanks.

Screenshot of the error with specified line shown

Best Answer

The error happens when LaTeX is reading line 538 in the bibliography file, probably generated by BibTeX.

The entry refers to an author named

Patrycja Dynarowicz-Łątka

(a chemist at the Jagellonian University in Kraków) whose name, in BibTeX-speak, becomes Dynarowicz-{\L}{\k{a}}tka, where you see \k.

Just add

\usepackage[T1]{fontenc}

to your document preamble.