Some kind souls mentioned in some of my past questions that my using \usepackage{fontspec}
is wrong. One of them suggested that I use \setmainfont[Scale=1.0, Ligatures={Common, Rare, TeX}]{Palatino Linotype}
, but it failed to work as I need to produce a lot of letters with unusual accents and symbols, such as \ae
or \'{\"{u}}
or {\~o}
, among others.
All I'm trying to do is use Candara for my chapters and sections/subsections, etc., and something like Palatino for the core text.
% 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}
! Undefined control sequence. l.66 \newfontfamily
as\newfontfamily
is a fontspec command. – David Carlisle Apr 30 at 20:00fontspec
package! It's now fixed and the code is now compilable... and my question (which I've edited in parts) remains. Hope it makes sense. – CyanideBaby Apr 30 at 20:13