下午好,我購買了 Minion Pro 字體(常規字體和斜體字體),以便在經典論文文件中使用它們。按照您最近給我的指示,我使用 Xelatex 運行,但它不起作用。我必須在哪裡放置以下命令?\setmainfont{Minion Pro}
我認為我的序言有問題。請您檢查一下可以嗎?
% book example for classicthesis.sty
\documentclass[11pt,a4paper,footinclude=true,headinclude=true]{scrbook} % KOMA-Script book
\usepackage[T1]{fontenc}
\usepackage[applemac]{inputenc}
\usepackage[frenchb]{babel}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{epigraph}
\usepackage{scrpage2}
\usepackage{graphicx} %% For \scalebox
\usepackage[tight,french]{minitoc}
\usepackage{lipsum}
\usepackage[linedheaders,parts,pdfspacing,dottedtoc]{../classicthesis} % ,manychapters
%\usepackage[osf]{libertine}
\usepackage[numberedbib,nosectionbib]{apacite}
\usepackage{hyperref}
\usepackage{chngcntr}
\counterwithout{footnote}{chapter}
\usepackage[titles]{tocloft}
\renewcommand\cftchapfont{\scshape}
\usepackage[left=4cm,right=4cm,top=3cm,bottom=3cm]{geometry}
\newcounter{qcounter}
\usepackage{imakeidx}
\makeindex[name=npr, title=Index des noms propres]
\makeindex[name=mat, title=Index des matières]
\renewcommand\textflush{flushright}
\usepackage{etoolbox}
\makeatletter
\newlength\epitextskip
\pretocmd{\@epitext}{\em}{}{}
\apptocmd{\@epitext}{\em}{}{}
\patchcmd{\epigraph}{\@epitext{#1}\\}{\@epitext{#1}\\[\epitextskip]}{}{}
\makeatother
\setlength\epigraphrule{0pt}
\setlength\epitextskip{2ex}
\setlength\epigraphwidth{.8\textwidth}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\chapter}[display]%
{\relax}
{\mbox{}\oldmarginpar{\vspace*{4\baselineskip}%
\color{halfgray}\scalebox{1.2}{\chapterNumber\thechapter}}}
{0pt}%
{\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
\titlespacing*{\chapter}{0pt}{0pt}{1.2\baselineskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\FrenchFootnotes
\usepackage{amsthm}
\usepackage{lineno}
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{3}
\AtBeginDocument{\renewcommand{\thepart}{\Roman{part}}}
\frontmatter
\begin{document}
% \pagestyle{scrheadings}
% \manualmark
% \markboth{\spacedlowsmallcaps{\contentsname}} {\spacedlowsmallcaps{\contentsname}}
\pagestyle{scrheadings}
\tableofcontents
\clearpage
答案1
Mac 電腦多年來一直使用 unicode 字型。我會嘗試透過設定一個簡單的文件(如下所示)來隔離您的問題。檢查它是否正確編譯並顯示字體,然後將設定合併到您的檔案中。
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Minion Pro}
\begin{document}
The quick brown fox \dots{}.
\end{document}
答案2
根據您提出的許多建議,我修改了序言。因此,這是我的新序言......它效果很好:
\documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook}
\XeTeXinputencoding iso-8859-1
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{epigraph}
\usepackage{scrpage2}
\usepackage{graphicx} %% For \scalebox
\usepackage[tight,french]{minitoc}
\usepackage{lipsum}
\usepackage[linedheaders,parts,pdfspacing,dottedtoc]{classicthesis}
\usepackage{fontspec}
\usepackage[applemac]{inputenc}
\usepackage[frenchb]{babel}
\setmainfont{Minion Pro}
\usepackage[numberedbib,nosectionbib]{apacite}
\usepackage{hyperref}
\usepackage{chngcntr}
\counterwithout{footnote}{chapter}
\usepackage[titles]{tocloft}
\renewcommand\cftchapfont{\scshape}
\usepackage[left=4cm,right=4cm,top=3cm,bottom=3cm]{geometry}
\newcounter{qcounter}
\usepackage{imakeidx}
\makeindex[name=npr, title=Index des noms propres]
\makeindex[name=mat, title=Index des matières]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\chapter}[display]%
{\relax}
{\mbox{}\oldmarginpar{\vspace*{4\baselineskip}%
\color{halfgray}\scalebox{1.2}{\chapterNumber\thechapter}}}
{0pt}%
{\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
\titlespacing*{\chapter}{0pt}{0pt}{1.2\baselineskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand\textflush{flushright}
\usepackage{etoolbox}
\makeatletter
\newlength\epitextskip
\pretocmd{\@epitext}{\em}{}{}
\apptocmd{\@epitext}{\em}{}{}
\patchcmd{\epigraph}{\@epitext{#1}\\}{\@epitext{#1}\\[\epitextskip]}{}{}
\makeatother
\setlength\epigraphrule{0pt}
\setlength\epitextskip{2ex}
\setlength\epigraphwidth{.8\textwidth}
\FrenchFootnotes
\usepackage{lineno}
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{3}
\AtBeginDocument{\renewcommand{\thepart}{\Roman{part}}}
\frontmatter
\begin{document}
% \pagestyle{scrheadings}
% \manualmark
% \markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}
\pagestyle{scrheadings}
\tableofcontents
\clearpage