
나는 이 titlesec
패키지를 사용하여 챕터 제목을 사용자 정의합니다. 패키지 에 있는 글꼴을 사용하고 싶습니다 librebodoni
.이미 설치되어있다(명령어는 \usepackage{LibreBodoni}
잘 작동하지만 전체 문서의 글꼴이 변경됩니다).
\fontfamily{librebodonifamily}\selectfont
이것이 에 정의된 글꼴 모음의 이름인 것 같아서 시도했지만 librebodoni.sty
작동하지 않고 다음 메시지를 반환했습니다.
LaTeX 글꼴 경고:
T1/librebodonifamily/bx/n' undefined (Font) using
입력 줄 1에 글꼴 모양이 T1/librebodonifamily/m/n'입니다.LaTeX 글꼴 경고:
T1/librebodonifamily/bx/it' undefined (Font) using
입력 줄 1에 글꼴 모양이 T1/librebodonifamily/bx/n'입니다.
다른 합리적인 성을 시도했지만 아무 것도 작동하지 않습니다. 누구든지 이 문제를 해결하는 방법에 대한 단서가 있습니까? 미리 감사드립니다.
나는 사용한다 pdflatex
.
답변1
글꼴로 전환하는 새 명령을 정의할 수 있습니다. 이 예에서는 \librebodoni
글꼴로 전환하고 글꼴을 \textlb{<text>}
조판합니다 .<text>
\documentclass{article}
\usepackage[T1]{fontenc}% you seem to be using this encoding
\makeatletter
\DeclareRobustCommand\librebodoni{\not@math@alphabet\librebodoni\relax\fontencoding{T1}\fontfamily{LibreBodoni-TLF}\selectfont}
\makeatother
\DeclareTextFontCommand\textlb{\librebodoni}
\begin{document}
Some text in ordinary serif.
\textlb{A short text in Libre Bodoni}
Back to default.
{\librebodoni
A longer text with more than one paragraph.
This is the other one.%
}
Back to default.
\end{document}
기본 문서 글꼴에 따라 굵은 글꼴을 사용하지 않을 수도 있습니다. 예를 들어 Computer Modern과 비교하면 Libre Bodoni의 일반 무게는 이미 대담해 보이고 대담한 무게는 정말 극도로 시끄럽습니다. 물론 기본 글꼴이 더 무거운 경우에는 그렇지 않을 수도 있습니다.