keyboard character used is undefined

The official TeXShop Support Forum.

keyboard character used is undefined

Postby ccl4 » Tue Jan 04, 2011 10:36 pm

hello,

i am using texshop 2.7.3 with german keyboard and when i want to type german characters like ö,ä and ü, error occurs

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[version=3]{mhchem}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[pdftex,bookmarks,breaklinks]{hyperref}
\usepackage[font=footnotesize]{caption}
\pagestyle{myheadings}
ccl4
 
Posts: 2
Joined: Tue Jan 04, 2011 10:08 pm

Re: keyboard character used is undefined

Postby Herbert Schulz » Wed Jan 05, 2011 12:35 pm

Howdy,

Try using

\usepackage[applemac]{inputenc}

rather than

\usepackage[latin1]{inputenc}

and see if that works.

Unless you changed the default encoding produced by TeXShop the file you are creating is NOT in latin1 encoding (what TeXShop calls IsoLatin) but rather in applemac (what TeXShop calls MacOSRoman).

You can change the default encoding in TeXShop->Preferences->Source->Encoding and, from then on, new files will have the new encoding.

The easiest way to make sure that files are initially saved and then opened by TeXShop with the correct encoding, no matter what the default encoding set in Preferences, is to place a line like

% !TEX encoding = IsoLatin

(for latin1 encoding) near the top of your source file. Use `UTF-8 Unicode' (without the quotes) for utf-8 encoding and `MacOSRoman' for applemac encoding.

If you really want the file to be in latin1 fist make a copy of the file (in case things get messed up). Then open the file, add the proper encoding line, and do a Save As... and choose the encoding you want from the popup menu on the Save As... sheet.

Hope this straightens things out.



You are telling LaTeX that it should interpret the source file you are giving it is in latin1 encoding (\usepackage[latin1]{inputenc}) but you may not actually be saving the file in latin1 (what TeXShop calls IsoLatin) but rather the default encoding that comes with TeXShop, what TeXShop calls MacOSRoman and inputenc refers to as
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: keyboard character used is undefined

Postby Herbert Schulz » Wed Jan 05, 2011 2:04 pm

Howdy,

By the way, I just noticed that you say ``when i want to type'' are you talking about what appears in the source (.tex) file or when you typeset? My assumption above was the the problem was when you typeset and that the characters appear correctly in the source file.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm


Return to TeXShop (engl.)

Who is online

Users browsing this forum: BarbDAlb, EddieGar, JamikaRa, Oscar095, SabinaMa and 1 guest

cron