![默认 Merriweather 字体大小太大](https://linux22.com/image/380963/%E9%BB%98%E8%AE%A4%20Merriweather%20%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F%E5%A4%AA%E5%A4%A7.png)
我想使用 Merriweather 作为我的衬线字体,但默认字体大小太大,使得文档看起来不平衡。
我怎样才能使 Merriweather 变小,以便它与其他字体更好地匹配?我不想缩放所有字体(使用relscale
),因为这仍然无法平衡字体。如果我将无衬线字体放大,脚注和图像标题仍然很糟糕。
下面是我正在使用的示例文档。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
% comment out this line to remove Merriweather
\usepackage{merriweather}
\usepackage{titlesec}
\titleformat*{\section}{\bfseries\Large\sffamily}
\titleformat*{\subsection}{\bfseries\large\sffamily}
\titleformat*{\subsubsection}{\bfseries\normalsize\sffamily}
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage{microtype}
\title{Fonts for \LaTeX}
\begin{document}
\maketitle
\section{Section}
\lipsum[1]
Inline Math $x=4$ more text. An inline link \url{https://www.gogole.com}.
\begin{displaymath}
\Delta G^{\circ}= -R\,T\ln \dfrac{[S_1][S_2]}{[S_1S_2]}.
\end{displaymath}
Some text \texttt{Hello World} and more\footnote{A footnote to test the font size of footnotes.}.
\subsection{Subsection Title}
\lipsum[2]
\subsubsection{Subsubsection Title}
\lipsum[3]
\end{document}
答案1
没有缩放衬线字体的选项,缩放选项仅缩放无衬线字体,但您可以重新定义内部缩放命令:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
% comment out this line to remove Merriweather
\usepackage[]{merriweather}
\usepackage{titlesec}
\titleformat*{\section}{\bfseries\Large\sffamily}
\titleformat*{\subsection}{\bfseries\large\sffamily}
\titleformat*{\subsubsection}{\bfseries\normalsize\sffamily}
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage{microtype}
\title{Fonts for \LaTeX}
\makeatletter
\renewcommand\Merriweather@scale{0.5} %adapt to your liking
\makeatother
\begin{document}
\maketitle
\section{Section}
\lipsum[1]
Inline Math $x=4$ more text. An inline link \url{https://www.gogole.com}.
\begin{displaymath}
\Delta G^{\circ}= -R\,T\ln \dfrac{[S_1][S_2]}{[S_1S_2]}.
\end{displaymath}
Some text \texttt{Hello World} and more\footnote{A footnote to test the font size of footnotes.}.
\subsection{Subsection Title}
\lipsum[2]
\subsubsection{Subsubsection Title}
\lipsum[3]
\end{document}
答案2
我将字体减小到 10 pt,并稍微增加了数学字体的字符。希望没问题。另请参阅此链接:http://www.ctex.org/documents/packages/special/moresize.pdf翻到第 5 页。
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
% comment out this line to remove Merriweather
\usepackage{merriweather}
\usepackage{titlesec}
\titleformat*{\section}{\bfseries\Large\sffamily}
\titleformat*{\subsection}{\bfseries\large\sffamily}
\titleformat*{\subsubsection}{\bfseries\normalsize\sffamily}
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage{microtype}
\makeatletter
\DeclareMathSizes{\@xipt}{\@xiipt}{12}{14}
\makeatother
\title{Fonts for \LaTeX}
\begin{document}
\maketitle
\section{Section}
\lipsum[1]
Inline Math $x=4$ more text. An inline link \url{https://www.google.com}.
\begin{displaymath}
\Delta G^{\circ}= -R\,T\ln \dfrac{[S_1][S_2]}{[S_1S_2]}.
\end{displaymath}
Some text \texttt{Hello World} and more\footnote{A footnote to test the font size of footnotes.}.
\subsection{Subsection Title}
\lipsum[2]
\subsubsection{Subsubsection Title}
\lipsum[3]
\end{document}