旧版 8 位字体 + fontspec 的字体问题

旧版 8 位字体 + fontspec 的字体问题

一些好心人在我的一些问题中提到我的用法\usepackage{fontspec}是错误的。其中一位建议我使用\setmainfont[Scale=1.0, Ligatures={Common, Rare, TeX}]{Palatino Linotype},但它不起作用,因为我需要写出很多带有不常见重音和符号的字母,例如\ae\'{\"{u}}{\~o}等等。

我所做的就是使用 Candara 来编写章节和部分/小节等,并使用 Palatino 之类的字体来编写核心文本。

我的文档中使用的 LaTex 命令

% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[oneside,centered,twocolumn]{book}
%\documentclass[a4paper,oneside,centered,twocolumn]{book}
\special{papersize=215.9mm,279.4mm}
%\usepackage[top=3cm, bottom=3.2cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage[english]{babel}

\usepackage{tocloft} % Customization of TOC LOF LOT
\usepackage[table,xcdraw]{xcolor} % For shading in tables
%\usepackage{pdfcolmk} <==== not needed with xelatex
\usepackage{multirow}

%\usepackage{lscape} %to put the long table of dwellings sideways
%\usepackage{wallpaper}
\usepackage{blindtext}
%\usepackage{showframe}

\usepackage{caption} % To change way captions are labelled
\usepackage{pdfpages}
\usepackage{ltablex}
\usepackage{nicefrac} % to write fractions
\usepackage{attrib} % For source of quotations
\usepackage{lettrine} % For NewThought formatting
\usepackage{array} % To define width of columns in long table
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists

\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{etoolbox} % To make table footnote font smaller
\usepackage{threeparttablex}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{textcomp} % For Numero symbol
%\usepackage[T1]{fontenc}
\usepackage{titlesec}
\usepackage{xcolor}
\usepackage[linguistics,edges]{forest}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{titling}
\usepackage{fontspec}
%\setmainfont[Scale=1.0, Ligatures={Common, Rare, TeX}]{Palatino Linotype}

\usepackage{newpxtext} % Font for document instead of obsolete Palatino
\usepackage{fancyhdr}
\usepackage{etoolbox}

\newcommand{\mysplit}[1]{%
    \begin{tabular}[t]{@{}l@{}}   %% remove [t] if you need vertical centered things.
        #1
    \end{tabular}
}

% CHAPTER, SECTION, SUBSECTION STYLE %%%%%%%%%%%%%%%%%%%%%%%%

% DEFINING CHAPTER AND SECTION COLORS %%%%%%%%%%%%%%%%%%%%%%%

\definecolor{green}{HTML}{3f8854}
\definecolor{runeg}{HTML}{3d857c}
\definecolor{blue}{HTML}{3d587e}
\definecolor{runeo}{HTML}{b6732b}
\definecolor{runer}{HTML}{af1824}

% CHAPTER, SECTION, SUBSECTION STYLE %%%%%%%%%%%%%%%%%%%%%%%%

\newfontfamily\headingfont[]{Candara}
\titleformat{\chapter}[display]
{\bfseries\color{runeg}\filcenter\fontsize{35}{35}\headingfont} % Size of Chapter1&Chapter
{\huge\MakeUppercase\headingfont{\chaptertitlename} \thechapter}
{12pt}
{\tikz[remember picture,overlay]\node[inner sep=0pt] at ($(current page.north) +
    (0pt,-117pt)$) {\includegraphics[width=14cm]{chapterHead_10cm}};}
\titlespacing{\chapter}{0pt}{50mm}{42.5mm}
\titleformat*{\section}{\LARGE\color{runer}\headingfont}
\titleformat*{\subsection}{\Large\color{runeo}\headingfont}
\titleformat*{\subsubsection}{\large\color{runeo}\headingfont}
\renewcommand{\maketitlehooka}{\headingfont}

\begin{document}

\ae
\'{\"{u}}
{\~o}
{\'o}
{\`o}
{\"o}
{\^o}
{\'u}
{\`u}
{\'e}
\u{\i}
{\`o}
{\'i}
{\`a}
{\'a}
``
''

\end{document}

答案1

如果您将测试文档缩减为更适合此站点的内容,那么您可以轻松地测试加载 palatino 克隆,例如 TeX Gyre Pagella。

在此处输入图片描述

\documentclass[oneside,twocolumn]{book}

\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella} % Palatino clone
\begin{document}

\ae
\'{\"{u}}
{\~o}
{\'o}
{\`o}
{\"o}
{\^o}
{\'u}
{\`u}
{\'e}
\u{\i}
{\`o}
{\'i}
{\`a}
{\'a}
``
''

\end{document}

相关内容