仅为标题页 Latex 设置字体

仅为标题页 Latex 设置字体

我只想更改标题页的字体现在,我的代码如下所示:

\begin{titlepage}   
    \raggedleft % Right align the title page

    \rule{1pt}{\textheight} % Vertical line
    \hspace{0.05\textwidth} % Whitespace between the vertical line and title page text
    \parbox[b]{0.75\textwidth}{ % Paragraph box for holding the title page text, adjust the width to move the title page left or right on the page
         {\large\textit{...... ...... ...... }}\\[4\baselineskip]

        {\Huge\bfseries Some Title}\\[2\baselineskip] % Title

        {\Large\textsc{Some Author}} % Author name, lower case for consistent small caps

        \vspace{0.47\textheight} % Whitespace between the title block and the publisher
        {\noindent a: b}\\[0.1\baselineskip]
        {\noindent c:d}\\[\baselineskip]
    }

\end{titlepage}

我该如何将字体\usepackage{stix}仅添加到标题页?

答案1

扉页开头只有一行:

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{lipsum} 

\begin{document}

\begin{titlepage}
\fontfamily{stix}\selectfont
\raggedleft % Right align the title page

\rule{1pt}{\textheight} % Vertical line
\hspace{0.05\textwidth} % Whitespace between the vertical line and title page text
\parbox[b]{0.75\textwidth}{ % Paragraph box for holding the title page text, adjust the width to move the title page left or right on the page
     {\large\textit{...... ...... ...... }}\\[4\baselineskip]

    {\Huge\bfseries Some Title}\\[2\baselineskip] % Title

    {\Large\textsc{Some Author}} % Author name, lower case for consistent small caps

    \vspace{0.47\textheight} % Whitespace between the title block and the publisher
    {\noindent a: b}\\[0.1\baselineskip]
    {\noindent c:d}\\[\baselineskip]
}

\end{titlepage}

\lipsum

\end{document} 

答案2

使用下面的代码(MWE),标题页使用 stix 字体,可以通过我在标题页末尾附近添加的一些额外数学符号来观察。在标题页之后,您可以将文档其余部分的字体设置为其他字体,在本例中为 lmodern。您可以禁用 lmodern 字体选择以观察标题页后面的文本的效果。

\documentclass{article}
\usepackage{stix}

\begin{document}

\begin{titlepage}   

    \raggedleft % Right align the title page

    \rule{1pt}{\textheight} % Vertical line
    \hspace{0.05\textwidth} % Whitespace between the vertical line and title page text
    \parbox[b]{0.75\textwidth}{ % Paragraph box for holding the title page text, adjust the width to move the title page left or right on the page
        {\large\textit{...... ...... ...... }}\\[4\baselineskip]

        {\Huge\bfseries Some Title}\\[2\baselineskip] % Title

        {\Large\textsc{Some Author}} % Author name, lower case for consistent small caps

        \vspace{0.47\textheight} % Whitespace between the title block and the publisher
        {\noindent $\Gamma \Theta \Psi \chi$ a: b}\\[0.1\baselineskip]
        {\noindent c:d}\\[\baselineskip]
    }

\end{titlepage}

\fontfamily{lmodern}\selectfont

Some text, and a math formula \(a+b=\sqrt{c}\).

\end{document}

希望这可以帮助。

相关内容