I have the following document, which uses fonts stored in a fonts/ directory (specifically several subdirectories of fonts/), as well as defined font subfamilies. I'm trying to compile it into a PDF using latexmk:
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=0.75in]{geometry}
\usepackage[colorlinks=true]{hyperref}
\usepackage{metalogo}
\usepackage{fontspec}
\setmainfont{FRABK.TTF}[
ItalicFont = FRABKIT.TTF,
BoldFont = FRAMD.TTF,
BoldItalicFont = FRAMDIT.TTF,
FontFace = {db}{n}{ Font = FRADM.TTF, Path = fonts/franklin-gothic/ },
FontFace = {db}{i}{ Font = FRADMIT.TTF, Path = fonts/franklin-gothic/ },
Path = fonts/franklin-gothic/
]
\setsansfont{CGOR45W.TTF}[
ItalicFont=CGOR46W.TTF,
BoldFont=CGOR65W.TTF,
BoldItalicFont=CGOR66W.TTF,
Path = fonts/cg-omega/
]
\setmonofont{CONSOLA.TTF}[
ItalicFont=CONSOLAI.TTF,
BoldFont=CONSOLAB.TTF,
BoldItalicFont=CONSOLAZ.TTF,
Path = fonts/consolas/
]
\newcommand{\lmr}{\fontfamily{lmr}\selectfont} % Latin Modern Roman
\newcommand{\lmss}{\fontfamily{lmss}\selectfont} % Latin Modern Sans
\newcommand{\lmtt}{\fontfamily{lmtt}\selectfont} % Latin Modern Mono
\begin{document}
\section{Foo}
\fontseries{db}\selectfont
Demibold text \\
\normalfont
\textbf{Medium text} \\
Normal text
\noindent
\hrulefill \par
\noindent
\hypersetup{linkcolor=gray}
\small
\url{http://www.example.org/} \hfill \textbf{Date}
\end{document}
Since I'm using fontspec, this would require xelatex. However, when I run latexmk -pdf -xelatex main.tex, I receive:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! LaTeX error: "kernel/key-unknown"
!
! The key 'fontspec/Path' is unknown and is being ignored.
!
! See the LaTeX3 documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.17 ]
? h
|'''''''''''''''''''''''''''''''''''''''''''''''
| The module 'fontspec' does not have a key called fontspec/Path'.
| Check that you have spelled the key name correctly.
|...............................................
Why is fontspec/Path unknown, and how can I get it to be recognized? Is my latexmk invocation incorrect, perhaps causing it not to use xelatex at a time when it should?
More generally, could this be alleviated by better methods of organizing the font definitions or how the document is compiled?


Pathkey inside theFontFacekey. I'm not sure if this is intended and you should make a bug report https://github.com/wspr/fontspec/issues. But in your case it is probably not needed anyway. – Ulrike Fischer Sep 09 '15 at 07:31fontspeccan search. – Davislor Sep 09 '15 at 08:45Path = ...setting you might fix the problem. – Will Robertson Sep 21 '15 at 03:00