我正在努力适应jhsph beamer主题(https://github.com/jfiksel/jhsphbeamer) 更广泛地适用于 JHU 的其他部门,理想情况下,主题至少接近 JHU 的“官方”字体系列(https://brand.jhu.edu/typography/)。
我已经取得了很大进展,但在使一些字体正常工作方面遇到了困难。
使用 lualatex 和 fontspec,我可以执行以下操作:
\newfontfamily\quadonmed{Quadon Medium}
\newfontfamily\arnhem{Arnhem Pro Bln}
\newfontfamily\arnbold{Arnhem Pro Bold}
...
\setbeamerfont{frametitle}{family=\quadonmed}
\setbeamerfont{framesubtitle}{family=\quadonmed}
这适用于一些模板:frametitle、framesubtitle、item、itemize/enumerate body、itemize/enumerate subbody、itemize/enumerate subsubbody。但它确实不是适用于标题、副标题、作者、机构、日期或(最成问题的)结构或普通文本。
我可以通过以下方法使普通文本以正确的字体显示:
\setsansfont{Arnhem Pro Bln}
但随后会以该字体呈现所有文本,包括标题和副标题。
我没有找到\setbeamerfont
详细使用命令的文档或示例,因此非常感谢您的帮助或指点。
更新于 2/3/22:这是 MWE:beamerthemeJHUKSAS.sty:
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage[no-math]{fontspec}
\usepackage{luatextra}
%\usefonttheme{professonalfonts}
% Use Helvetica, as requested
%\usepackage[scaled]{helvet}
%\usepackage[T1]{fontenc}
%\renewcommand\familydefault{\sfdefault}
%For some reason this is the only way I can get the regular body text
% to show up in Arnhem.
%\setsansfont{Arnhem Pro Bln}
%This seems to work but want to tweak the specific elements. Take a look at
% http://www.cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf
% for more on each element. As of now the normal text one isn't working
\newfontfamily\quadonxb{Quadon ExtraBold}
\newfontfamily\quadonmed{Quadon Medium}
\newfontfamily\arnhem{Arnhem Pro Bln}
\newfontfamily\arnbold{Arnhem Pro Bold}
%%Arrgh, the title page isn't reading these commands for some reason!
\setbeamerfont{title}{family=\quadonmed}
\setbeamerfont{frametitle}{family=\quadonmed}
\setbeamerfont{framesubtitle}{family=\quadonmed}
\setbeamerfont{structure}{family=\arnhem}
\setbeamerfont{normal text}{family=\arnhem}
\setbeamerfont{block}{parent=normal text}
\setbeamerfont{item}{family=\arnbold}
\setbeamerfont{itemize/enumerate body}{parent=normal text}
\setbeamerfont{itemize/enumerate subbody}{parent=itemize/enumerate body}
\setbeamerfont{itemize/enumerate subsubbody}{parent=itemize/enumerate subbody}
\setbeamerfont{description body}{parent=normal text}
\setbeamerfont{subtitle}{parent=title}
\setbeamerfont{author}{parent=title}
\setbeamerfont{institute}{parent=title}
\setbeamerfont{date}{parent=title}
mwe.tex:
\documentclass[slides]{beamer}
\usepackage{pgfpages,url,comment}
\usetheme{JHUKSAS}
\mode<handout>{\pgfpagesuselayout{2 on 1}[letterpaper,border
shrink=5mm]\setbeameroption{show notes}}
\title{Minimal Working Example (MWE)}
\date{Sociology 101}
\author{Andrew J. Perrin}
\begin{document}
\begin{frame}
\titlepage
\note{~}
\end{frame}
\begin{frame}{The title will be rendered correctly but}
This text is not going to show up right
\begin{itemize}
\item and this will be fine
\end{itemize}
\note{~}
\end{frame}
\end{document}