使瑞典字符 å、ä 和 ö 出现

使瑞典字符 å、ä 和 ö 出现

我需要使用以下序言,但无法显示瑞典字母 å、ä 和 ö。瑞典语部分位于名为 intro_summary.tex 的单独文件中。我使用 TeXShop 作为编辑器。我认为这与行“\usepackage[latin1]{inputenc}”有关,因为如果没有它,我可以编译文档,但符号无法正确显示。

过去当我用瑞典语书写时,我必须包含“\usepackage[applemac]{inputenc}”才能使其工作,但这次,当我需要使用这个特定的模板时,它对我没有帮助。

有任何想法吗?

\documentclass{UUThesisTemplate}

% Package to determine wether XeTeX is used
\usepackage{ifxetex}

\ifxetex
% XeTeX specific packages and settings
% Language, diacritics and hyphenation
\usepackage[babelshorthands]{polyglossia}
\setmainlanguage{english}
\setotherlanguages{swedish}
%\usepackage[applemac]{inputenc} %additional

% Font settings
\setmainfont{Times New Roman}
\setromanfont{Times New Roman}
\setsansfont{Arial}
\setmonofont{Courier New}
\else
% Plain LaTeX specific packages and settings
% Language, diacritics and hyphenation
    % Use English and Swedish languages. 

\usepackage[swedish,english]{babel} 

\usepackage{graphicx}
% Font settings
\usepackage{type1cm}


\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{mathptmx}
\usepackage{amsmath,amssymb,amsthm,amscd,dsfont,psfrag,color}

% Enable scaling of images on import

\fi 
\begin{document}
\input{intro_summary.tex}
\end{document}

相关内容