我需要使用以下序言,但無法使瑞典字母 å、ä 和 ö 出現。瑞典語部分位於名為 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}