I want to be able to use the ansinew characters in a latex document. According to the pdf file for the inputenc package, I can do that by putting \usepackage[cp1252]{inputenc}
in my preamble. I do that, but when I put things like \guilsinglleft
in my document, I get the error ! LaTeX Error: Command \guilsinglleft unavailable in encoding OT1.
when compiling.
I'm not going into great detail here, because I assume I am making some very basic mistake, being new to latex.
Best Answer
The
... unavailable in encoding OT1
error means, as Herbert said, that your problem is related to your font encoding and can be solved by loading the appropriate font encoding.As you said you are new to LaTeX, maybe you want to also read What packages do people load by default, where you can learn that if you load T1 font encoding, you should usually also load a vector font, for example
lmodern
, and probably thebabel
package (the order does not matter).Also you could consider to use
utf8
as input encoding instead ofcp1252
, because today most editors do support utf8 and maybe at some point your input will have characters that are not available in cp1252. But you can as well switch any time later.Maybe some time later you want references, then you should take a look at
biblatex
andbiber
.Putting all these hints together, you get a MWE that looks like this (as an answer to your question the 4 lines fontenc...lmodern are sufficient):