将 Minion Pro 与 Classicthesis 结合使用

将 Minion Pro 与 Classicthesis 结合使用

下午好,我购买了 Minion Pro 字体(常规和斜体),以便将它们用于 classicthesis 文档。按照您最近给我的说明,我运行了 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

相关内容